package com.jeequan.jeepay.agent.ctrl.applyment;

import com.alibaba.fastjson.JSONObject;
import com.jeequan.jeepay.agent.ctrl.CommonCtrl;
import com.jeequan.jeepay.core.model.ApiRes;
import com.jeequan.jeepay.core.model.DBDefaultConfig;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 系统默认配置
 *
 * @author xiaoyu
 *
 * @date 2023/4/11 9:38
 */
@RestController
@RequestMapping("/api/defaultConfig")
public class DefaultConfigController extends CommonCtrl {

    /** 平台默认配置查询 **/
    @GetMapping("")
    public ApiRes getDefaultConfig() {
        JSONObject result = new JSONObject();
        // 进件图片大小默认配置
        DBDefaultConfig defaultConfig = sysConfigService.getDBDefaultConfig();
        result.put("applymentImgUploadSize", defaultConfig.getApplymentImgUploadSize());

        return ApiRes.ok(result);
    }


}
