yuanliang пре 1 година
родитељ
комит
50ca63b3d7

+ 1 - 1
cooleshow-app/src/main/java/com/yonge/cooleshow/student/controller/SysSuggestionController.java

@@ -46,7 +46,7 @@ public class SysSuggestionController extends BaseController {
             sysSuggestion.setClientType(ClientEnum.TENANT_STUDENT.getCode());
         }
 
-        sysSuggestionService.insert(sysSuggestion);
+        sysSuggestionService.save(sysSuggestion);
         return succeed();
     }
 

+ 36 - 36
cooleshow-user/user-admin/src/main/java/com/yonge/cooleshow/admin/controller/SysSuggestionController.java

@@ -20,41 +20,41 @@ import com.yonge.cooleshow.common.controller.BaseController;
 @RestController
 public class SysSuggestionController extends BaseController {
 
-    @Autowired
-    private SysSuggestionService sysSuggestionService;
-    @Autowired
-    private SysUserFeignService sysUserFeignService;
-
-    @ApiOperation(value = "新增")
-    @RequestMapping("sysSuggestion/add")
-    @PreAuthorize("@pcs.hasPermissions('sysSuggestion/add')")
-    public Object add(SysSuggestion sysSuggestion) {
-        SysUser sysUser = sysUserFeignService.queryUserInfo();
-        if (sysUser == null) {
-            return failed("用户信息获取失败");
-        }
-        sysSuggestion.setUserId(sysUser.getId().longValue());
-        sysSuggestion.setClientType("TEACHER");
-        if(StringUtils.isEmpty(sysSuggestion.getMobileNo())){
-            sysSuggestion.setMobileNo(sysUser.getPhone());
-        }
-        sysSuggestionService.insert(sysSuggestion);
-        return succeed();
-    }
-
-    @ApiOperation(value = "删除")
-    @RequestMapping("sysSuggestion/del")
-    @PreAuthorize("@pcs.hasPermissions('sysSuggestion/del')")
-    public Object del(Long id) {
-        sysSuggestionService.delete(id);
-        return succeed();
-    }
-
-    @ApiOperation(value = "分页查询")
-    @RequestMapping("sysSuggestion/queryPage")
-    @PreAuthorize("@pcs.hasPermissions('sysSuggestion/queryPage')")
-    public Object queryPage(SysSuggestionQueryInfo queryInfo) {
-        return succeed(sysSuggestionService.queryPage(queryInfo));
-    }
+//    @Autowired
+//    private SysSuggestionService sysSuggestionService;
+//    @Autowired
+//    private SysUserFeignService sysUserFeignService;
+//
+//    @ApiOperation(value = "新增")
+//    @RequestMapping("sysSuggestion/add")
+//    @PreAuthorize("@pcs.hasPermissions('sysSuggestion/add')")
+//    public Object add(SysSuggestion sysSuggestion) {
+//        SysUser sysUser = sysUserFeignService.queryUserInfo();
+//        if (sysUser == null) {
+//            return failed("用户信息获取失败");
+//        }
+//        sysSuggestion.setUserId(sysUser.getId().longValue());
+//        sysSuggestion.setClientType("TEACHER");
+//        if(StringUtils.isEmpty(sysSuggestion.getMobileNo())){
+//            sysSuggestion.setMobileNo(sysUser.getPhone());
+//        }
+//        sysSuggestionService.insert(sysSuggestion);
+//        return succeed();
+//    }
+//
+//    @ApiOperation(value = "删除")
+//    @RequestMapping("sysSuggestion/del")
+//    @PreAuthorize("@pcs.hasPermissions('sysSuggestion/del')")
+//    public Object del(Long id) {
+//        sysSuggestionService.delete(id);
+//        return succeed();
+//    }
+//
+//    @ApiOperation(value = "分页查询")
+//    @RequestMapping("sysSuggestion/queryPage")
+//    @PreAuthorize("@pcs.hasPermissions('sysSuggestion/queryPage')")
+//    public Object queryPage(SysSuggestionQueryInfo queryInfo) {
+//        return succeed(sysSuggestionService.queryPage(queryInfo));
+//    }
 
 }

+ 1 - 1
cooleshow-user/user-teacher/src/main/java/com/yonge/cooleshow/teacher/controller/SysSuggestionController.java

@@ -36,7 +36,7 @@ public class SysSuggestionController extends BaseController {
         if(StringUtils.isEmpty(sysSuggestion.getMobileNo())){
             sysSuggestion.setMobileNo(sysUser.getPhone());
         }
-        sysSuggestionService.insert(sysSuggestion);
+        sysSuggestionService.save(sysSuggestion);
         return succeed();
     }