罗元桥
2021-06-23 2b322522e7b801377cdba46c66a1c4ae61f56be0
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
package com.panzhihua.service_community.api;
 
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.panzhihua.common.constants.Constants;
import com.panzhihua.common.model.vos.R;
import com.panzhihua.service_community.model.dos.SysConfDO;
import com.panzhihua.service_community.service.SysConfService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.*;
 
import javax.annotation.Resource;
 
@Slf4j
@RestController
@RequestMapping("/sys/conf/")
public class SysConfApi {
 
    @Resource
    private SysConfService sysConfService;
 
    @GetMapping("get")
    public R get(@RequestParam("code") String code) {
        SysConfDO sysConfDO = sysConfService.getOne(new QueryWrapper<SysConfDO>().lambda().eq(SysConfDO::getCode,code));
        String value = Constants.ZZ_APP_TAG_LIST;
        if(sysConfDO != null){
            value = sysConfDO.getValue();
        }
        return R.ok(value);
    }
}