xyh
2021-06-29 c61d4e4aef58a162d26dee9f011ba59a15ba6d69
综治后台增加系统配置接口
1个文件已修改
1个文件已添加
36 ■■■■■ 已修改文件
springcloud_k8s_panzhihuazhihuishequ/grid_backstage/src/main/java/com/panzhihua/grid_backstage/api/SystemApi.java 34 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/service/impl/UserServiceImpl.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/grid_backstage/src/main/java/com/panzhihua/grid_backstage/api/SystemApi.java
New file
@@ -0,0 +1,34 @@
package com.panzhihua.grid_backstage.api;
import com.panzhihua.common.controller.BaseController;
import com.panzhihua.common.model.vos.R;
import com.panzhihua.common.model.vos.user.ComMngUserTagVO;
import com.panzhihua.common.service.user.UserService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
/**
 * @author xyh
 * @date 2021/6/29 14:45
 */
@Api(tags = {"系统管理"})
@Slf4j
@RequestMapping("/system")
@RestController
public class SystemApi extends BaseController {
    @Resource
    private UserService userService;
    @ApiOperation(value = "获取用户标签",response = ComMngUserTagVO.class)
    @GetMapping("/tags")
    public R config(){
        return userService.listComMngUserTag(this.getCommunityId());
    }
}
springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/service/impl/UserServiceImpl.java
@@ -1157,7 +1157,7 @@
     */
    @Override
    public R listComMngUserTag(Long communityId) {
        List<ComMngUserTagDO> comMngUserTagDOS = comMngUserTagDAO.selectList(new QueryWrapper<ComMngUserTagDO>().lambda().eq(ComMngUserTagDO::getCommunityId, communityId));
        List<ComMngUserTagDO> comMngUserTagDOS = comMngUserTagDAO.selectList(new QueryWrapper<ComMngUserTagDO>().or().lambda().eq(ComMngUserTagDO::getSysFlag,1).or().eq(ComMngUserTagDO::getCommunityId, communityId));
        if (ObjectUtils.isEmpty(comMngUserTagDOS)) {
            return R.fail();
        }