From f9f8f90ac63d6ce3274410d3721b173f40db6e41 Mon Sep 17 00:00:00 2001
From: jinpengyong <jpy123456>
Date: Fri, 25 Aug 2023 14:12:48 +0800
Subject: [PATCH] chore:过滤海城小时数据

---
 screen-manage/src/main/java/com/moral/api/controller/AccountController.java |   50 +++++++++++++++++++++++++-------------------------
 1 files changed, 25 insertions(+), 25 deletions(-)

diff --git a/screen-manage/src/main/java/com/moral/api/controller/AccountController.java b/screen-manage/src/main/java/com/moral/api/controller/AccountController.java
index ced4963..3d6d8af 100644
--- a/screen-manage/src/main/java/com/moral/api/controller/AccountController.java
+++ b/screen-manage/src/main/java/com/moral/api/controller/AccountController.java
@@ -1,18 +1,12 @@
 package com.moral.api.controller;
 
-import com.moral.api.entity.SysArea;
 import com.moral.api.pojo.dto.account.*;
-import com.moral.api.pojo.dto.organization.OrganizationDTO;
-import com.moral.api.pojo.form.account.AccountDeleteForm;
-import com.moral.api.pojo.form.account.AccountInsertForm;
-import com.moral.api.pojo.form.account.AccountQueryForm;
-import com.moral.api.pojo.form.account.AccountUpdateForm;
-import com.moral.api.pojo.vo.account.AccountDeleteVO;
-import com.moral.api.pojo.vo.account.AccountInsertVO;
+import com.moral.api.pojo.dto.accountRole.AccountRoleDTO;
+import com.moral.api.pojo.form.account.*;
+import com.moral.api.pojo.form.accountRole.AccountRoleUpdateForm;
 import com.moral.api.pojo.vo.account.AccountQueryVO;
-import com.moral.api.pojo.vo.account.AccountUpdateVO;
+import com.moral.api.service.ManageAccountRoleService;
 import com.moral.api.service.ManageAccountService;
-import com.moral.api.service.SysAreaService;
 import com.moral.constant.ResponseCodeEnum;
 import com.moral.constant.ResultMessage;
 import io.swagger.annotations.*;
@@ -20,7 +14,6 @@
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 
-import java.util.List;
 
 @Slf4j
 @Api(tags = {"������������������"})
@@ -30,6 +23,8 @@
 public class AccountController {
     @Autowired
     ManageAccountService accountService;
+    @Autowired
+    ManageAccountRoleService manageAccountRoleService;
 
     @PostMapping("insert")
     public ResultMessage insert(@RequestBody AccountInsertForm form) {
@@ -39,7 +34,7 @@
                     ResponseCodeEnum.PARAMETERS_IS_MISSING.getMsg());
 
         //������������������������
-        AccountInsertDTO conditionDTO = form.paramValid();
+        AccountDTO conditionDTO = form.paramValid();
         if (conditionDTO.getCode() != ResponseCodeEnum.SUCCESS.getCode()) {
             return new ResultMessage(conditionDTO.getCode(), conditionDTO.getMsg(), null);
         }
@@ -47,10 +42,7 @@
         //������������������
         AccountDTO dto = accountService.insertAccount(form);
 
-        //������������������������
-        AccountInsertVO accountInsertVO = AccountInsertVO.convert(dto);
-
-        return new ResultMessage(dto.getCode(), dto.getMsg(), accountInsertVO);
+        return new ResultMessage(dto.getCode(), dto.getMsg(), null);
     }
 
     @PostMapping("update")
@@ -61,7 +53,7 @@
                     ResponseCodeEnum.PARAMETERS_IS_MISSING.getMsg());
 
         //������������������������
-        AccountUpdateDTO conditionDTO = form.paramValid();
+        AccountDTO conditionDTO = form.paramValid();
         if (conditionDTO.getCode() != ResponseCodeEnum.SUCCESS.getCode()) {
             return new ResultMessage(conditionDTO.getCode(), conditionDTO.getMsg(), null);
         }
@@ -69,10 +61,7 @@
         //������������������
         AccountDTO dto = accountService.updateAccount(form);
 
-        //���������������������������
-        AccountUpdateVO vo = AccountUpdateVO.convert(dto);
-
-        return new ResultMessage(dto.getCode(), dto.getMsg(), vo);
+        return new ResultMessage(dto.getCode(), dto.getMsg(), null);
     }
 
     @PostMapping("delete")
@@ -85,10 +74,7 @@
         //������������������
         AccountDTO dto = accountService.deleteAccount(form);
 
-        //���������������������������
-        AccountDeleteVO vo = AccountDeleteVO.convert(dto);
-
-        return new ResultMessage(dto.getCode(), dto.getMsg(), vo);
+        return new ResultMessage(dto.getCode(), dto.getMsg(), null);
     }
 
     @GetMapping("query")
@@ -108,4 +94,18 @@
         return new ResultMessage(accountQueryDTO.getCode(), accountQueryDTO.getMsg(), accountQueryVO);
     }
 
+    @PostMapping("updateRole")
+    public ResultMessage updateRole(@RequestBody AccountRoleUpdateForm form){
+
+        //������������������������
+        if (!form.valid())
+            return ResultMessage.fail(ResponseCodeEnum.PARAMETERS_IS_MISSING.getCode(),
+                    ResponseCodeEnum.PARAMETERS_IS_MISSING.getMsg());
+
+        //������������������
+        AccountRoleDTO dto = manageAccountRoleService.updateAccountRole(form);
+
+        return new ResultMessage(dto.getCode(), dto.getMsg(), null);
+    }
+
 }

--
Gitblit v1.8.0