driver-server/src/main/java/com/jwl/driver/server/controller/TdSysConfigController.java

54 lines
1.7 KiB
Java
Raw Normal View History

2023-08-11 11:51:09 +08:00
package com.jwl.driver.server.controller;
2023-08-13 00:46:18 +08:00
import cn.hutool.core.util.StrUtil;
import com.jwl.driver.server.response.BaseResponse;
import com.jwl.driver.server.service.ITdSysConfigService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
2023-08-11 11:51:09 +08:00
2023-08-13 00:46:18 +08:00
import java.util.Arrays;
import java.util.Map;
2023-08-11 11:51:09 +08:00
/**
* <p>
* ;
* </p>
*
* @author Automated procedures
* @since 2023-08-10
*/
2023-08-13 00:46:18 +08:00
@Api(tags = "字典值配置")
@RestController
@RequestMapping("/tdSysConfig")
@Slf4j
2023-08-11 11:51:09 +08:00
public class TdSysConfigController {
2023-08-13 00:46:18 +08:00
@Autowired
private ITdSysConfigService configService;
/**
* keycarTypeId,carTypeId-1
*/
@ApiOperation("根据配置key和carTypeId获取配置信息,配置与车型无关则carTypeId为-1")
@GetMapping(value = "/queryConfigByKey")
public BaseResponse queryConfigByKey(@RequestParam("configKey") String configKey,@RequestParam("carTypeId") Integer carTypeId) {
return BaseResponse.success(configService.queryConfigByKey(configKey,carTypeId));
}
/**
* keycarTypeId,carTypeId-1
*/
@ApiOperation("根据配置key获取配置值")
@GetMapping(value = "/queryConfigValueByKey")
public BaseResponse<String> queryConfigValueByKey(@RequestParam("configKey") String configKey,@RequestParam("carTypeId") Integer carTypeId) {
return BaseResponse.success(configService.queryConfigValueByKey(configKey,carTypeId));
}
2023-08-11 11:51:09 +08:00
}