package com.galaxis.manatee.constant;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;

/**
 * @author zcj
 * @version 0.1
 * @date 2020/1/8 5:52 下午
 */
@Service
public class DingTalkConstant {

    /**
     * 钉钉token
     */
    public static String DING_TALK_TOKEN = "";

    /**
     * 钉钉appKey
     */
    public static String DING_TALK_APP_KEY;

    /**
     * 钉钉appSecret
     */
    public static String DING_TALK_APP_SECRET;

    /**
     * 钉钉出差审批流编码
     */
    public static String PROCESS_CODE_BUSINESS_TRIP;

    /**
     * 物料补发
     */
    public static String PROCESS_CODE_MATERIAL_RESEND;

    @Value(value = "${dingTalk.appKey}")
    public void setDingTalkAppKey(String dingTalkAppKey) {
        DingTalkConstant.DING_TALK_APP_KEY = dingTalkAppKey;
    }

    @Value(value = "${dingTalk.appSecret}")
    public void setDingTalkAppSecret(String dingTalkAppSecret) {
        DingTalkConstant.DING_TALK_APP_SECRET = dingTalkAppSecret;
    }

    @Value(value = "${dingTalk.processCode.businessTrip}")
    public void setProcessCodeBusinessTrip(String processCodeBusinessTrip) {
        DingTalkConstant.PROCESS_CODE_BUSINESS_TRIP = processCodeBusinessTrip;
    }

    @Value(value = "${dingTalk.processCode.materialResend}")
    public void setMaterialResend(String materialResend) {
        DingTalkConstant.PROCESS_CODE_MATERIAL_RESEND = materialResend;
    }
}
