Explorar o código

根据id删除薪资记录

yusm hai 1 ano
pai
achega
19b38f53f2

+ 6 - 0
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/controller/UserController.java

@@ -237,6 +237,12 @@ public class UserController {
         return userService.getUserSalaryList(id);
     }
 
+    @RequestMapping("/deleteUserSalaryById")
+    public HttpRespMsg deleteUserSalaryById(String id) {
+        HttpRespMsg httpRespMsg=new HttpRespMsg();
+        return userService.deleteUserSalaryById(id);
+    }
+
 
     @RequestMapping("/setActive")
     public HttpRespMsg setActive(String id, int isActive) {

+ 2 - 0
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/UserService.java

@@ -105,4 +105,6 @@ public interface UserService extends IService<User> {
     HttpRespMsg syncDeptWithAD(HttpServletRequest request) throws Exception;
 
     HttpRespMsg setActiveByIds(String ids, int isActive);
+
+    HttpRespMsg deleteUserSalaryById(String id);
 }

+ 10 - 0
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/UserServiceImpl.java

@@ -1847,6 +1847,16 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements Us
         }
         return msg;
     }
+
+    @Override
+    public HttpRespMsg deleteUserSalaryById(String id) {
+        HttpRespMsg msg = new HttpRespMsg();
+        int count = userSalaryMapper.deleteById(id);
+        if (count<=0){
+            msg.setError(MessageUtils.message("file.deleteError"));
+        }
+        return msg;
+    }
 //
 //    private String getAccessToken(String code) {
 //        String accessToken = "";