doum
2025-12-12 dce1e83ec27a066ebc6c17a4ac6d03c9ad6ff703
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
package com.doumee.api.web;
 
import com.doumee.core.model.ApiResponse;
import com.doumee.core.utils.Constants;
import com.doumee.dao.system.model.SystemDictData;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;
 
import java.util.Objects;
 
/**
 * @author 江蹄蹄
 * @date 2023/03/21 15:48
 */
@Api(tags = "字典值")
@RestController
@RequestMapping("/web/dictData")
public class DictDataApi extends ApiController{
 
 
    @ApiOperation("项目信息介绍")
    @GetMapping("/detail")
    public ApiResponse<String> detail( @RequestParam String label){
        SystemDictData query = new SystemDictData();
        query.setLabel(label);
        SystemDictData one = systemDictDataService.findOne(query);
        return ApiResponse.success(Objects.nonNull(one) ? one.getCode() : "");
    }
 
    @ApiOperation("项目配置资源地址")
    @GetMapping("/detailUrl")
    public ApiResponse<String> detailUrl( @RequestParam String label){
        SystemDictData query = new SystemDictData();
        query.setLabel(label);
        SystemDictData one = systemDictDataService.findOne(query);
        query.setLabel(Constants.PROJECT_HEAD_IMG);
        SystemDictData resource = systemDictDataService.findOne(query);
 
        return ApiResponse.success(Objects.nonNull(one) ? resource.getCode()+one.getCode() : "");
    }
 
    /**
     * 获取咖啡背景图
     * @return
     */
    @ApiOperation("获取咖啡百科背景图")
    @GetMapping("/findCoffeeArticleBackground")
    public ApiResponse<SystemDictData> findCoffeeArticleBackground(){
        return ApiResponse.success(systemDictDataBiz.findCoffeeArticleBackground(Constants.COFFEE_ARTICLE_BACKGROUND));
    }
 
 
}