| | |
| | | package com.ruoyi.system.controller.conslole; |
| | | |
| | | import com.ruoyi.common.core.domain.R; |
| | | import com.ruoyi.common.security.annotation.InnerAuth; |
| | | import com.ruoyi.system.api.domain.dto.MgtBaseBathDto; |
| | | import com.ruoyi.system.api.domain.dto.MgtUserIdByDept; |
| | | import com.ruoyi.system.api.domain.poji.config.Activeness; |
| | | import com.ruoyi.system.api.domain.poji.config.SysClassification; |
| | | import com.ruoyi.system.api.domain.poji.config.SysTag; |
| | | import com.ruoyi.system.api.domain.vo.MgtSysSimpleUserVo; |
| | | import com.ruoyi.system.service.config.ActivenessService; |
| | | import com.ruoyi.system.service.config.SysClassificationService; |
| | | import com.ruoyi.system.service.config.SysTagService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import com.ruoyi.system.service.sys.ISysUserService; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * @author jqs34 |
| | |
| | | @RequestMapping("/config") |
| | | public class ConfigController { |
| | | |
| | | @Autowired |
| | | @Resource |
| | | private SysTagService sysTagService; |
| | | |
| | | @InnerAuth |
| | | @Resource |
| | | private ActivenessService activenessService; |
| | | |
| | | @Resource |
| | | private SysClassificationService sysClassificationService; |
| | | |
| | | @Resource |
| | | private ISysUserService sysUserService; |
| | | |
| | | |
| | | |
| | | /** |
| | | * 获取系统标签 |
| | | * @param sysTagId |
| | | * @return |
| | | */ |
| | | @PostMapping("/getSysTag") |
| | | public R<SysTag> getSysTag(@RequestBody Long sysTagId) |
| | | { |
| | | SysTag sysTag = sysTagService.getById(sysTagId); |
| | | SysTag sysTag = sysTagService.getByTagId(sysTagId); |
| | | return R.ok(sysTag); |
| | | } |
| | | |
| | | /** |
| | | * 获取系统标签列表 |
| | | * @param tagType |
| | | * @return |
| | | */ |
| | | @PostMapping("/listSysTag") |
| | | public R<List<SysTag>> listSysTag(@RequestBody Integer tagType) |
| | | { |
| | | List<SysTag> sysTagList = sysTagService.listByType(tagType); |
| | | return R.ok(sysTagList); |
| | | } |
| | | |
| | | /** |
| | | * 获取活跃度配置 |
| | | * @return |
| | | */ |
| | | @PostMapping("/listActiveness") |
| | | public R<List<Activeness>> listActiveness() |
| | | { |
| | | List<Activeness> activenessList = activenessService.listActiveness(); |
| | | return R.ok(activenessList); |
| | | } |
| | | |
| | | /** |
| | | * 通过id获取分类 |
| | | * @return |
| | | */ |
| | | @PostMapping("/getSysClassification") |
| | | public R<SysClassification> getSysClassification(@RequestBody Long classId) |
| | | { |
| | | SysClassification sysClassification = sysClassificationService.getById(classId); |
| | | return R.ok(sysClassification); |
| | | } |
| | | |
| | | /** |
| | | * 通过ids获取分类 |
| | | * @return |
| | | */ |
| | | @PostMapping("/getSysClassificationList") |
| | | public R<Map<Long,SysClassification>> getSysClassificationList(@RequestBody List<Long> classIds) |
| | | { |
| | | Map<Long,SysClassification> sysClassificationMap = sysClassificationService.getSysClassificationList(classIds); |
| | | return R.ok(sysClassificationMap); |
| | | } |
| | | |
| | | /** |
| | | * @description 获取部门用户 |
| | | * @author jqs |
| | | * @date 2023/6/21 16:00 |
| | | * @param userIdByDept |
| | | * @return R<MgtShopIdByCodeDto> |
| | | */ |
| | | @PostMapping("/getUserIdByDept") |
| | | public R<MgtUserIdByDept> getUserIdByDept(@RequestBody MgtUserIdByDept userIdByDept) |
| | | { |
| | | userIdByDept = sysUserService.getUserIdByDept(userIdByDept); |
| | | return R.ok(userIdByDept); |
| | | } |
| | | |
| | | /** |
| | | * @description 通过id获取用户简易信息 |
| | | * @author jqs |
| | | * @date 2023/6/25 14:41 |
| | | * @param mgtBaseBathDto |
| | | * @return R<List<MgtSysSimpleUserVo>> |
| | | */ |
| | | @PostMapping("/listSimpleUserVo") |
| | | public R<List<MgtSysSimpleUserVo>> listSimpleUserVo(@RequestBody MgtBaseBathDto mgtBaseBathDto) |
| | | { |
| | | List<MgtSysSimpleUserVo> sysSimpleUserVoList = sysUserService.listSimpleUserVo(mgtBaseBathDto); |
| | | return R.ok(sysSimpleUserVoList); |
| | | } |
| | | |
| | | /** |
| | | * @description 通过名称获取活跃度 |
| | | * @author jqs |
| | | * @date 2023/6/29 17:20 |
| | | * @param name |
| | | * @return R<Activeness> |
| | | */ |
| | | @PostMapping("/getActivenessByName") |
| | | public R<Activeness> getActivenessByName(@RequestBody String name) |
| | | { |
| | | Activeness activeness = activenessService.getActivenessByName(name); |
| | | return R.ok(activeness); |
| | | } |
| | | } |