|
@@ -1,4 +1,4 @@
|
|
-package com.cdf.controller;
|
|
|
|
|
|
+package com.cdf.controller.back;
|
|
|
|
|
|
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
@@ -8,10 +8,12 @@ import com.cdf.common.PageInfo;
|
|
import com.cdf.common.ResultData;
|
|
import com.cdf.common.ResultData;
|
|
import com.cdf.entity.Dept;
|
|
import com.cdf.entity.Dept;
|
|
import com.cdf.entity.Shop;
|
|
import com.cdf.entity.Shop;
|
|
|
|
+import com.cdf.entity.ShopCategory;
|
|
import com.cdf.request.ShopRequest;
|
|
import com.cdf.request.ShopRequest;
|
|
import com.cdf.request.UserRequest;
|
|
import com.cdf.request.UserRequest;
|
|
import com.cdf.response.ShopVo;
|
|
import com.cdf.response.ShopVo;
|
|
import com.cdf.service.IDeptService;
|
|
import com.cdf.service.IDeptService;
|
|
|
|
+import com.cdf.service.IShopCategoryService;
|
|
import com.cdf.service.IShopService;
|
|
import com.cdf.service.IShopService;
|
|
import com.dtflys.forest.annotation.Post;
|
|
import com.dtflys.forest.annotation.Post;
|
|
import org.apache.commons.lang3.StringUtils;
|
|
import org.apache.commons.lang3.StringUtils;
|
|
@@ -31,6 +33,8 @@ public class ShopBackController {
|
|
IShopService shopService;
|
|
IShopService shopService;
|
|
@Autowired
|
|
@Autowired
|
|
IDeptService deptService;
|
|
IDeptService deptService;
|
|
|
|
+ @Autowired
|
|
|
|
+ IShopCategoryService categoryService;
|
|
|
|
|
|
@PostMapping("/saveOrUpdate")
|
|
@PostMapping("/saveOrUpdate")
|
|
@SysLog("店铺新增或修改")
|
|
@SysLog("店铺新增或修改")
|
|
@@ -56,6 +60,10 @@ public class ShopBackController {
|
|
if(dept !=null){
|
|
if(dept !=null){
|
|
shopVo.setDeptName(dept.getDeptName());
|
|
shopVo.setDeptName(dept.getDeptName());
|
|
}
|
|
}
|
|
|
|
+ ShopCategory category = categoryService.getById(shop.getCategoryId());
|
|
|
|
+ if(category !=null){
|
|
|
|
+ shopVo.setCategoryName(category.getCategoryName());
|
|
|
|
+ }
|
|
pageVo.add(shopVo);
|
|
pageVo.add(shopVo);
|
|
}
|
|
}
|
|
return ResultData.ok(PageInfo.PageInfo(page.getCurrent(),page.getSize(),page.getTotal(),pageVo));
|
|
return ResultData.ok(PageInfo.PageInfo(page.getCurrent(),page.getSize(),page.getTotal(),pageVo));
|