New file |
| | |
| | | package com.moral.api.controller; |
| | | |
| | | import com.moral.api.pojo.dto.group.GroupDTO; |
| | | import com.moral.api.pojo.form.group.AdminGroupUpdateMenuForm; |
| | | import com.moral.api.service.GroupService; |
| | | import com.moral.constant.ResponseCodeEnum; |
| | | import com.moral.constant.ResultMessage; |
| | | import io.swagger.annotations.Api; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | /** |
| | | * @ClassName GroupController |
| | | * @Description TODO |
| | | * @Author 陈凯裕 |
| | | * @Date 2021/5/13 15:29 |
| | | * @Version TODO |
| | | **/ |
| | | @Slf4j |
| | | @Api(tags = {"前台角色管理"}) |
| | | @RestController |
| | | @CrossOrigin(origins = "*", maxAge = 3600) |
| | | @RequestMapping("/group") |
| | | public class GroupController { |
| | | |
| | | @Autowired |
| | | GroupService groupService; |
| | | |
| | | @PostMapping("updateAdminGroupMenu") |
| | | public ResultMessage updateMenu(@RequestBody AdminGroupUpdateMenuForm form) { |
| | | |
| | | //判断是否缺少参数 |
| | | if (!form.valid()) |
| | | return ResultMessage.fail(ResponseCodeEnum.PARAMETERS_IS_MISSING.getCode(), |
| | | ResponseCodeEnum.PARAMETERS_IS_MISSING.getMsg()); |
| | | |
| | | //处理分配业务 |
| | | GroupDTO dto = groupService.updateAdminGroupMenu(form); |
| | | |
| | | return new ResultMessage(dto.getCode(), dto.getMsg(), null); |
| | | } |
| | | } |