jiangqs
2023-07-05 32bd52ec49d25021b6a35d8ee5f32c70df788165
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
package com.ruoyi.system.controller.conslole;
 
import com.ruoyi.common.core.domain.R;
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 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
 * @version 1.0
 * @classname ConfigController
 * @description: TODO
 * @date 2023 2023/4/30 15:53
 */
@RestController
@RequestMapping("/config")
public class ConfigController {
 
    @Resource
    private SysTagService sysTagService;
 
    @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.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);
    }
 
 
}