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 |   44 ++++++++++++++++++++++----------------------
 1 files changed, 22 insertions(+), 22 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 be45676..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,15 +1,11 @@
 package com.moral.api.controller;
 
 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.constant.ResponseCodeEnum;
 import com.moral.constant.ResultMessage;
@@ -17,6 +13,7 @@
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
+
 
 @Slf4j
 @Api(tags = {"������������������"})
@@ -26,6 +23,8 @@
 public class AccountController {
     @Autowired
     ManageAccountService accountService;
+    @Autowired
+    ManageAccountRoleService manageAccountRoleService;
 
     @PostMapping("insert")
     public ResultMessage insert(@RequestBody AccountInsertForm form) {
@@ -35,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);
         }
@@ -43,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")
@@ -57,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);
         }
@@ -65,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")
@@ -81,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")
@@ -104,8 +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