ErpReq.java 880 Bytes
package com.huaheng.api.general.domain;

import com.alibaba.fastjson.JSON;
import com.huaheng.common.constant.QuantityConstant;
import com.huaheng.common.utils.spring.SpringUtils;
import com.huaheng.framework.web.service.ConfigService;
import lombok.Data;

import javax.annotation.Resource;

public class ErpReq {
    String token;
    String data;

    public String toJson(String data){
        ConfigService configService = SpringUtils.getBean(ConfigService.class);
        this.data = data;
        this.token = configService.getKey(QuantityConstant.ERP_TOKEN);
        return JSON.toJSONString(this);
    }

    public String getToken() {
        return token;
    }

    public void setToken(String token) {
        this.token = token;
    }

    public String getData() {
        return data;
    }

    public void setData(String data) {
        this.data = data;
    }
}