瀏覽代碼

fixed 预约分类管理接口

fushengqian 8 月之前
父節點
當前提交
706d43e826

+ 4 - 1
fuint-application/src/main/java/com/fuint/common/service/impl/BookServiceImpl.java

@@ -152,9 +152,12 @@ public class BookServiceImpl extends ServiceImpl<MtBookMapper, MtBook> implement
             throw new BusinessCheckException("该预约项目状态异常");
             throw new BusinessCheckException("该预约项目状态异常");
         }
         }
         book.setId(book.getId());
         book.setId(book.getId());
-        if (book.getLogo() != null) {
+        if (mtBook.getLogo() != null) {
             book.setLogo(mtBook.getLogo());
             book.setLogo(mtBook.getLogo());
         }
         }
+        if (mtBook.getCateId() != null) {
+            book.setCateId(mtBook.getCateId());
+        }
         if (book.getName() != null) {
         if (book.getName() != null) {
             book.setName(mtBook.getName());
             book.setName(mtBook.getName());
         }
         }

+ 2 - 2
fuint-application/src/main/java/com/fuint/module/backendApi/controller/BackendBookCateController.java

@@ -220,11 +220,11 @@ public class BackendBookCateController extends BaseController {
             return getFailureResult(1001, "请先登录");
             return getFailureResult(1001, "请先登录");
         }
         }
 
 
-        MtBookCate bookCate = bookCateService.getBookCateById(id);
+        MtBookCate bookCateInfo = bookCateService.getBookCateById(id);
         String imagePath = settingService.getUploadBasePath();
         String imagePath = settingService.getUploadBasePath();
 
 
         Map<String, Object> result = new HashMap<>();
         Map<String, Object> result = new HashMap<>();
-        result.put("bookCate", bookCate);
+        result.put("bookCateInfo", bookCateInfo);
         result.put("imagePath", imagePath);
         result.put("imagePath", imagePath);
 
 
         return getSuccessResult(result);
         return getSuccessResult(result);

+ 4 - 0
fuint-application/src/main/java/com/fuint/module/backendApi/controller/BackendBookController.java

@@ -175,6 +175,7 @@ public class BackendBookController extends BaseController {
     public ResponseObject saveHandler(HttpServletRequest request, @RequestBody Map<String, Object> params) throws BusinessCheckException {
     public ResponseObject saveHandler(HttpServletRequest request, @RequestBody Map<String, Object> params) throws BusinessCheckException {
         String token = request.getHeader("Access-Token");
         String token = request.getHeader("Access-Token");
         String id = params.get("id") == null ? "" : params.get("id").toString();
         String id = params.get("id") == null ? "" : params.get("id").toString();
+        String cateId = params.get("cateId") == null ? "0" : params.get("cateId").toString();
         String name = params.get("name") == null ? "" : params.get("name").toString();
         String name = params.get("name") == null ? "" : params.get("name").toString();
         String description = params.get("description") == null ? "" : params.get("description").toString();
         String description = params.get("description") == null ? "" : params.get("description").toString();
         String logo = params.get("logo") == null ? "" : params.get("logo").toString();
         String logo = params.get("logo") == null ? "" : params.get("logo").toString();
@@ -203,6 +204,9 @@ public class BackendBookController extends BaseController {
         mtBook.setSort(Integer.parseInt(sort));
         mtBook.setSort(Integer.parseInt(sort));
         mtBook.setMerchantId(accountInfo.getMerchantId());
         mtBook.setMerchantId(accountInfo.getMerchantId());
         mtBook.setServiceDates(dates);
         mtBook.setServiceDates(dates);
+        if (StringUtil.isNotEmpty(cateId)) {
+            mtBook.setCateId(Integer.parseInt(cateId));
+        }
         String timeStr = "";
         String timeStr = "";
         if (times != null && times.size() > 0) {
         if (times != null && times.size() > 0) {
             List<String> timeArr = new ArrayList<>();
             List<String> timeArr = new ArrayList<>();