|
@@ -3,15 +3,16 @@ package com.fdkk.sxz.webApi.controller;
|
|
import com.fdkk.sxz.annotation.auth.NoAuthentication;
|
|
import com.fdkk.sxz.annotation.auth.NoAuthentication;
|
|
import com.fdkk.sxz.annotation.log.AroundLog;
|
|
import com.fdkk.sxz.annotation.log.AroundLog;
|
|
import com.fdkk.sxz.base.BaseController;
|
|
import com.fdkk.sxz.base.BaseController;
|
|
-import com.fdkk.sxz.webApi.service.*;
|
|
|
|
-import com.github.pagehelper.Page;
|
|
|
|
-import com.github.pagehelper.PageHelper;
|
|
|
|
-import com.github.pagehelper.PageInfo;
|
|
|
|
|
|
+import com.fdkk.sxz.base.Result;
|
|
import com.fdkk.sxz.constant.CodeConstant;
|
|
import com.fdkk.sxz.constant.CodeConstant;
|
|
import com.fdkk.sxz.entity.RenovationPartsDetailEntity;
|
|
import com.fdkk.sxz.entity.RenovationPartsDetailEntity;
|
|
-import com.fdkk.sxz.base.Result;
|
|
|
|
|
|
+import com.fdkk.sxz.vo.request.RequestBuildDetail;
|
|
import com.fdkk.sxz.vo.request.RequestRenovationParts;
|
|
import com.fdkk.sxz.vo.request.RequestRenovationParts;
|
|
import com.fdkk.sxz.vo.response.ResponseRenovationPartsDetail;
|
|
import com.fdkk.sxz.vo.response.ResponseRenovationPartsDetail;
|
|
|
|
+import com.fdkk.sxz.webApi.service.*;
|
|
|
|
+import com.github.pagehelper.Page;
|
|
|
|
+import com.github.pagehelper.PageHelper;
|
|
|
|
+import com.github.pagehelper.PageInfo;
|
|
import io.swagger.annotations.Api;
|
|
import io.swagger.annotations.Api;
|
|
import io.swagger.annotations.ApiImplicitParam;
|
|
import io.swagger.annotations.ApiImplicitParam;
|
|
import io.swagger.annotations.ApiImplicitParams;
|
|
import io.swagger.annotations.ApiImplicitParams;
|
|
@@ -74,54 +75,77 @@ public class RenovationController extends BaseController {
|
|
|
|
|
|
/**
|
|
/**
|
|
* 获取所有装修配件
|
|
* 获取所有装修配件
|
|
|
|
+ *
|
|
* @return
|
|
* @return
|
|
*/
|
|
*/
|
|
@ApiOperation("获取所有装修配件")
|
|
@ApiOperation("获取所有装修配件")
|
|
@RequestMapping(value = "/getRenovationPartsList", method = RequestMethod.POST)
|
|
@RequestMapping(value = "/getRenovationPartsList", method = RequestMethod.POST)
|
|
@NoAuthentication
|
|
@NoAuthentication
|
|
@AroundLog(name = "获取所有装修配件")
|
|
@AroundLog(name = "获取所有装修配件")
|
|
- public Result getRenovationPartsList(){
|
|
|
|
|
|
+ public Result getRenovationPartsList() {
|
|
return Result.success(renovationPartsService.getRenovationPartsList());
|
|
return Result.success(renovationPartsService.getRenovationPartsList());
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
* 获取所有墙面地板的数据
|
|
* 获取所有墙面地板的数据
|
|
|
|
+ *
|
|
* @return
|
|
* @return
|
|
*/
|
|
*/
|
|
@ApiOperation("获取所有墙面地板的数据")
|
|
@ApiOperation("获取所有墙面地板的数据")
|
|
@RequestMapping(value = "/getRenovationBuildList", method = RequestMethod.POST)
|
|
@RequestMapping(value = "/getRenovationBuildList", method = RequestMethod.POST)
|
|
@NoAuthentication
|
|
@NoAuthentication
|
|
@AroundLog(name = "获取所有墙面地板的数据")
|
|
@AroundLog(name = "获取所有墙面地板的数据")
|
|
- public Result getRenovationBuildList(){
|
|
|
|
|
|
+ public Result getRenovationBuildList() {
|
|
return Result.success(renovationBuildService.getRenovationBuildList());
|
|
return Result.success(renovationBuildService.getRenovationBuildList());
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * 获取所有墙面地板的数据
|
|
|
|
+ *
|
|
|
|
+ * @return
|
|
|
|
+ */
|
|
|
|
+ @ApiOperation("获取所有墙面地板的数据")
|
|
|
|
+ @RequestMapping(value = "/getRenovationBuildByQuery", method = RequestMethod.POST)
|
|
|
|
+ @ApiImplicitParams({
|
|
|
|
+ @ApiImplicitParam(name = "id", value = "装饰总类id", dataType = "number"),
|
|
|
|
+ @ApiImplicitParam(name = "keyWord", value = "分类(FLOOR,WALLPAPER)", dataType = "String")})
|
|
|
|
+ @NoAuthentication
|
|
|
|
+ @AroundLog(name = "获取所有墙面地板的数据")
|
|
|
|
+ public Result getRenovationBuildByQuery(@RequestBody RequestBuildDetail parts) {
|
|
|
|
+ return Result.success(renovationBuildService.getRenovationBuildByQuery(parts));
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
/**
|
|
/**
|
|
* 获取所有装饰总类
|
|
* 获取所有装饰总类
|
|
|
|
+ *
|
|
* @return
|
|
* @return
|
|
*/
|
|
*/
|
|
@ApiOperation("获取所有装饰总类")
|
|
@ApiOperation("获取所有装饰总类")
|
|
@RequestMapping(value = "/findAllParts", method = RequestMethod.POST)
|
|
@RequestMapping(value = "/findAllParts", method = RequestMethod.POST)
|
|
@NoAuthentication
|
|
@NoAuthentication
|
|
@AroundLog(name = "获取所有装饰总类")
|
|
@AroundLog(name = "获取所有装饰总类")
|
|
- public Result findAllParts(){
|
|
|
|
|
|
+ public Result findAllParts() {
|
|
return Result.success(renovationPartsService.list());
|
|
return Result.success(renovationPartsService.list());
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
* 获取所有硬装总类
|
|
* 获取所有硬装总类
|
|
|
|
+ *
|
|
* @return
|
|
* @return
|
|
*/
|
|
*/
|
|
@ApiOperation("获取所有硬装总类")
|
|
@ApiOperation("获取所有硬装总类")
|
|
@RequestMapping(value = "/findAllBuild", method = RequestMethod.POST)
|
|
@RequestMapping(value = "/findAllBuild", method = RequestMethod.POST)
|
|
@NoAuthentication
|
|
@NoAuthentication
|
|
@AroundLog(name = "获取所有硬装总类")
|
|
@AroundLog(name = "获取所有硬装总类")
|
|
- public Result findAllBuild(){
|
|
|
|
|
|
+ public Result findAllBuild() {
|
|
return Result.success(renovationBuildService.list());
|
|
return Result.success(renovationBuildService.list());
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
* 根据总类id获取装饰细类
|
|
* 根据总类id获取装饰细类
|
|
|
|
+ *
|
|
* @return
|
|
* @return
|
|
*/
|
|
*/
|
|
@ApiOperation("根据总类id获取装饰细类")
|
|
@ApiOperation("根据总类id获取装饰细类")
|
|
@@ -130,8 +154,8 @@ public class RenovationController extends BaseController {
|
|
@ApiImplicitParam(name = "id", value = "装饰总类id", dataType = "String")})
|
|
@ApiImplicitParam(name = "id", value = "装饰总类id", dataType = "String")})
|
|
@NoAuthentication
|
|
@NoAuthentication
|
|
@AroundLog(name = "根据总类id获取装饰细类")
|
|
@AroundLog(name = "根据总类id获取装饰细类")
|
|
- public Result findPartsTypeById(@RequestBody RequestRenovationParts parts){
|
|
|
|
- if(parts.getId() == null){
|
|
|
|
|
|
+ public Result findPartsTypeById(@RequestBody RequestRenovationParts parts) {
|
|
|
|
+ if (parts.getId() == null) {
|
|
return Result.failure(CodeConstant.FAILURE_CODE_3001, CodeConstant.FAILURE_MSG_3001);
|
|
return Result.failure(CodeConstant.FAILURE_CODE_3001, CodeConstant.FAILURE_MSG_3001);
|
|
}
|
|
}
|
|
return Result.success(renovationPartsTypeService.findTypeByPartsId(parts.getId()));
|
|
return Result.success(renovationPartsTypeService.findTypeByPartsId(parts.getId()));
|
|
@@ -139,6 +163,7 @@ public class RenovationController extends BaseController {
|
|
|
|
|
|
/**
|
|
/**
|
|
* 根据细类id获取装饰详情
|
|
* 根据细类id获取装饰详情
|
|
|
|
+ *
|
|
* @return
|
|
* @return
|
|
*/
|
|
*/
|
|
@ApiOperation("根据细类id获取装饰详情")
|
|
@ApiOperation("根据细类id获取装饰详情")
|
|
@@ -151,18 +176,18 @@ public class RenovationController extends BaseController {
|
|
@ApiImplicitParam(name = "pageSize", value = "页数", dataType = "String")})
|
|
@ApiImplicitParam(name = "pageSize", value = "页数", dataType = "String")})
|
|
@NoAuthentication
|
|
@NoAuthentication
|
|
@AroundLog(name = "根据细类id获取装饰详情")
|
|
@AroundLog(name = "根据细类id获取装饰详情")
|
|
- public Result findPartsDetailById(@RequestBody RequestRenovationParts parts){
|
|
|
|
- if(parts.getId() == null){
|
|
|
|
- return Result.failure(CodeConstant.FAILURE_CODE_3001, CodeConstant.FAILURE_MSG_3001);
|
|
|
|
- }
|
|
|
|
|
|
+ public Result findPartsDetailById(@RequestBody RequestRenovationParts parts) {
|
|
|
|
+ if (parts.getId() == null) {
|
|
|
|
+ return Result.failure(CodeConstant.FAILURE_CODE_3001, CodeConstant.FAILURE_MSG_3001);
|
|
|
|
+ }
|
|
|
|
|
|
- Page page = PageHelper.startPage(parts.getPageNum(), parts.getPageSize(), true);
|
|
|
|
|
|
+ Page page = PageHelper.startPage(parts.getPageNum(), parts.getPageSize(), true);
|
|
// PageHelper.orderBy(" a.create_time desc");
|
|
// PageHelper.orderBy(" a.create_time desc");
|
|
|
|
|
|
- List<ResponseRenovationPartsDetail> list = renovationPartsDetailService.findDetailByTypeId(parts.getId(), parts.getColorId(), parts.getClassifyId());
|
|
|
|
|
|
+ List<ResponseRenovationPartsDetail> list = renovationPartsDetailService.findDetailByTypeId(parts.getId(), parts.getColorId(), parts.getClassifyId());
|
|
|
|
|
|
- Page<ResponseRenovationPartsDetail> a = new Page<ResponseRenovationPartsDetail>(parts.getPageNum(), parts.getPageSize());
|
|
|
|
- a.setTotal(page.getTotal());
|
|
|
|
|
|
+ Page<ResponseRenovationPartsDetail> a = new Page<ResponseRenovationPartsDetail>(parts.getPageNum(), parts.getPageSize());
|
|
|
|
+ a.setTotal(page.getTotal());
|
|
PageInfo<ResponseRenovationPartsDetail> pageInfo = a.toPageInfo();
|
|
PageInfo<ResponseRenovationPartsDetail> pageInfo = a.toPageInfo();
|
|
pageInfo.setList(list);
|
|
pageInfo.setList(list);
|
|
|
|
|
|
@@ -171,6 +196,7 @@ public class RenovationController extends BaseController {
|
|
|
|
|
|
/**
|
|
/**
|
|
* 根据硬装总类id获取硬装详情
|
|
* 根据硬装总类id获取硬装详情
|
|
|
|
+ *
|
|
* @return
|
|
* @return
|
|
*/
|
|
*/
|
|
@ApiOperation("根据硬装总类id获取硬装详情")
|
|
@ApiOperation("根据硬装总类id获取硬装详情")
|
|
@@ -179,8 +205,8 @@ public class RenovationController extends BaseController {
|
|
@ApiImplicitParam(name = "id", value = "硬装总类id", dataType = "String")})
|
|
@ApiImplicitParam(name = "id", value = "硬装总类id", dataType = "String")})
|
|
@NoAuthentication
|
|
@NoAuthentication
|
|
@AroundLog(name = "根据硬装总类id获取硬装详情")
|
|
@AroundLog(name = "根据硬装总类id获取硬装详情")
|
|
- public Result findBuildDetailById(@RequestBody RequestRenovationParts parts){
|
|
|
|
- if(parts.getId() == null){
|
|
|
|
|
|
+ public Result findBuildDetailById(@RequestBody RequestRenovationParts parts) {
|
|
|
|
+ if (parts.getId() == null) {
|
|
return Result.failure(CodeConstant.FAILURE_CODE_3001, CodeConstant.FAILURE_MSG_3001);
|
|
return Result.failure(CodeConstant.FAILURE_CODE_3001, CodeConstant.FAILURE_MSG_3001);
|
|
}
|
|
}
|
|
return Result.success(renovationBuildDetailService.findBuildDetail(parts.getId()));
|
|
return Result.success(renovationBuildDetailService.findBuildDetail(parts.getId()));
|
|
@@ -188,6 +214,7 @@ public class RenovationController extends BaseController {
|
|
|
|
|
|
/**
|
|
/**
|
|
* 根据硬装详情id获取
|
|
* 根据硬装详情id获取
|
|
|
|
+ *
|
|
* @return
|
|
* @return
|
|
*/
|
|
*/
|
|
@ApiOperation("根据硬装详情id获取")
|
|
@ApiOperation("根据硬装详情id获取")
|
|
@@ -196,8 +223,8 @@ public class RenovationController extends BaseController {
|
|
@ApiImplicitParam(name = "id", value = "硬装详情id", dataType = "String")})
|
|
@ApiImplicitParam(name = "id", value = "硬装详情id", dataType = "String")})
|
|
@NoAuthentication
|
|
@NoAuthentication
|
|
@AroundLog(name = "根据硬装详情id获取")
|
|
@AroundLog(name = "根据硬装详情id获取")
|
|
- public Result findBuildDetailOne(@RequestBody RequestRenovationParts parts){
|
|
|
|
- if(parts.getId() == null){
|
|
|
|
|
|
+ public Result findBuildDetailOne(@RequestBody RequestRenovationParts parts) {
|
|
|
|
+ if (parts.getId() == null) {
|
|
return Result.failure(CodeConstant.FAILURE_CODE_3001, CodeConstant.FAILURE_MSG_3001);
|
|
return Result.failure(CodeConstant.FAILURE_CODE_3001, CodeConstant.FAILURE_MSG_3001);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -206,6 +233,7 @@ public class RenovationController extends BaseController {
|
|
|
|
|
|
/**
|
|
/**
|
|
* 根据装饰id获取
|
|
* 根据装饰id获取
|
|
|
|
+ *
|
|
* @return
|
|
* @return
|
|
*/
|
|
*/
|
|
@ApiOperation("根据装饰id获取")
|
|
@ApiOperation("根据装饰id获取")
|
|
@@ -214,12 +242,12 @@ public class RenovationController extends BaseController {
|
|
@ApiImplicitParam(name = "id", value = "细类id", dataType = "String")})
|
|
@ApiImplicitParam(name = "id", value = "细类id", dataType = "String")})
|
|
@NoAuthentication
|
|
@NoAuthentication
|
|
@AroundLog(name = "根据装饰id获取")
|
|
@AroundLog(name = "根据装饰id获取")
|
|
- public Result findPartsDetailOne(@RequestBody RequestRenovationParts parts){
|
|
|
|
- if(parts.getId() == null){
|
|
|
|
|
|
+ public Result findPartsDetailOne(@RequestBody RequestRenovationParts parts) {
|
|
|
|
+ if (parts.getId() == null) {
|
|
return Result.failure(CodeConstant.FAILURE_CODE_3001, CodeConstant.FAILURE_MSG_3001);
|
|
return Result.failure(CodeConstant.FAILURE_CODE_3001, CodeConstant.FAILURE_MSG_3001);
|
|
}
|
|
}
|
|
RenovationPartsDetailEntity partsDetailEntity = renovationPartsDetailService.findById(parts.getId());
|
|
RenovationPartsDetailEntity partsDetailEntity = renovationPartsDetailService.findById(parts.getId());
|
|
- if(partsDetailEntity == null){
|
|
|
|
|
|
+ if (partsDetailEntity == null) {
|
|
return Result.success();
|
|
return Result.success();
|
|
}
|
|
}
|
|
ResponseRenovationPartsDetail partsDetail = new ResponseRenovationPartsDetail();
|
|
ResponseRenovationPartsDetail partsDetail = new ResponseRenovationPartsDetail();
|
|
@@ -233,18 +261,20 @@ public class RenovationController extends BaseController {
|
|
|
|
|
|
/**
|
|
/**
|
|
* 获取所有家装色系
|
|
* 获取所有家装色系
|
|
|
|
+ *
|
|
* @return
|
|
* @return
|
|
*/
|
|
*/
|
|
@ApiOperation("获取所有家装色系")
|
|
@ApiOperation("获取所有家装色系")
|
|
@RequestMapping(value = "/findPartsColorList", method = RequestMethod.POST)
|
|
@RequestMapping(value = "/findPartsColorList", method = RequestMethod.POST)
|
|
@NoAuthentication
|
|
@NoAuthentication
|
|
@AroundLog(name = "获取所有家装色系")
|
|
@AroundLog(name = "获取所有家装色系")
|
|
- public Result findPartsColorList(){
|
|
|
|
|
|
+ public Result findPartsColorList() {
|
|
return Result.success(renovationPartsColorService.list());
|
|
return Result.success(renovationPartsColorService.list());
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
* 搜索获取装修详情
|
|
* 搜索获取装修详情
|
|
|
|
+ *
|
|
* @return
|
|
* @return
|
|
*/
|
|
*/
|
|
@ApiOperation("搜索获取装修详情")
|
|
@ApiOperation("搜索获取装修详情")
|
|
@@ -253,12 +283,12 @@ public class RenovationController extends BaseController {
|
|
@ApiImplicitParam(name = "keyWord", value = "搜索关键词", dataType = "String")})
|
|
@ApiImplicitParam(name = "keyWord", value = "搜索关键词", dataType = "String")})
|
|
@NoAuthentication
|
|
@NoAuthentication
|
|
@AroundLog(name = "搜索获取装修详情")
|
|
@AroundLog(name = "搜索获取装修详情")
|
|
- public Result findPartsDetailKeyWord(@RequestBody RequestRenovationParts parts){
|
|
|
|
- if(StringUtils.isEmpty(parts.getKeyWord())){
|
|
|
|
|
|
+ public Result findPartsDetailKeyWord(@RequestBody RequestRenovationParts parts) {
|
|
|
|
+ if (StringUtils.isEmpty(parts.getKeyWord())) {
|
|
return Result.failure(CodeConstant.FAILURE_CODE_3001, CodeConstant.FAILURE_MSG_3001);
|
|
return Result.failure(CodeConstant.FAILURE_CODE_3001, CodeConstant.FAILURE_MSG_3001);
|
|
}
|
|
}
|
|
List<ResponseRenovationPartsDetail> list = renovationPartsDetailService.findByKeyWord(parts.getKeyWord());
|
|
List<ResponseRenovationPartsDetail> list = renovationPartsDetailService.findByKeyWord(parts.getKeyWord());
|
|
- if(list == null || list.size() <= 0){
|
|
|
|
|
|
+ if (list == null || list.size() <= 0) {
|
|
return Result.success();
|
|
return Result.success();
|
|
}
|
|
}
|
|
|
|
|
|
@@ -272,50 +302,54 @@ public class RenovationController extends BaseController {
|
|
|
|
|
|
/**
|
|
/**
|
|
* 获取所有家装风格
|
|
* 获取所有家装风格
|
|
|
|
+ *
|
|
* @return
|
|
* @return
|
|
*/
|
|
*/
|
|
@ApiOperation("获取所有家装风格")
|
|
@ApiOperation("获取所有家装风格")
|
|
@RequestMapping(value = "/findPartsStyleList", method = RequestMethod.POST)
|
|
@RequestMapping(value = "/findPartsStyleList", method = RequestMethod.POST)
|
|
@NoAuthentication
|
|
@NoAuthentication
|
|
@AroundLog(name = "获取所有家装风格")
|
|
@AroundLog(name = "获取所有家装风格")
|
|
- public Result findPartsStyleList(){
|
|
|
|
|
|
+ public Result findPartsStyleList() {
|
|
return Result.success(renovationPartsStyleService.list());
|
|
return Result.success(renovationPartsStyleService.list());
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
* 获取所有家装分类
|
|
* 获取所有家装分类
|
|
|
|
+ *
|
|
* @return
|
|
* @return
|
|
*/
|
|
*/
|
|
@ApiOperation("获取所有家装分类")
|
|
@ApiOperation("获取所有家装分类")
|
|
@RequestMapping(value = "/findPartsClassifyList", method = RequestMethod.POST)
|
|
@RequestMapping(value = "/findPartsClassifyList", method = RequestMethod.POST)
|
|
@NoAuthentication
|
|
@NoAuthentication
|
|
@AroundLog(name = "获取所有家装分类")
|
|
@AroundLog(name = "获取所有家装分类")
|
|
- public Result findPartsClassifyList(){
|
|
|
|
|
|
+ public Result findPartsClassifyList() {
|
|
return Result.success(renovationPartsClassifyService.list());
|
|
return Result.success(renovationPartsClassifyService.list());
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
* 获取所有家装分形状
|
|
* 获取所有家装分形状
|
|
|
|
+ *
|
|
* @return
|
|
* @return
|
|
*/
|
|
*/
|
|
@ApiOperation("获取所有家装形状")
|
|
@ApiOperation("获取所有家装形状")
|
|
@RequestMapping(value = "/findPartsShapeList", method = RequestMethod.POST)
|
|
@RequestMapping(value = "/findPartsShapeList", method = RequestMethod.POST)
|
|
@NoAuthentication
|
|
@NoAuthentication
|
|
@AroundLog(name = "获取所有家装形状")
|
|
@AroundLog(name = "获取所有家装形状")
|
|
- public Result findPartsShapeList(){
|
|
|
|
|
|
+ public Result findPartsShapeList() {
|
|
return Result.success(renovationPartsShapeService.list());
|
|
return Result.success(renovationPartsShapeService.list());
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
* 获取所有品牌
|
|
* 获取所有品牌
|
|
|
|
+ *
|
|
* @return
|
|
* @return
|
|
*/
|
|
*/
|
|
@ApiOperation("获取所有品牌")
|
|
@ApiOperation("获取所有品牌")
|
|
@RequestMapping(value = "/findPartsBrandList", method = RequestMethod.POST)
|
|
@RequestMapping(value = "/findPartsBrandList", method = RequestMethod.POST)
|
|
@NoAuthentication
|
|
@NoAuthentication
|
|
@AroundLog(name = "获取所有品牌")
|
|
@AroundLog(name = "获取所有品牌")
|
|
- public Result findPartsBrandList(){
|
|
|
|
|
|
+ public Result findPartsBrandList() {
|
|
return Result.success(renovationPartsBrandService.list());
|
|
return Result.success(renovationPartsBrandService.list());
|
|
}
|
|
}
|
|
}
|
|
}
|