| | |
| | | import com.fzzy.api.utils.*; |
| | | import com.fzzy.api.view.repository.ApiLogRep; |
| | | import com.fzzy.push.gd2022.dto.*; |
| | | import com.fzzy.push.gd2022.dto.Api1101; |
| | | import com.fzzy.push.gd2022.dto.Api1109; |
| | | import com.fzzy.push.gd2022.dto.Api1208; |
| | | import com.fzzy.push.gd2022.dto.Api1307; |
| | | import com.fzzy.push.gd2022.dto.Api1308; |
| | | import com.fzzy.push.gd2022.dto.Gd2022Api1101; |
| | | import com.fzzy.push.gd2022.dto.Gd2022Api1109; |
| | | import com.fzzy.push.gd2022.dto.Gd2022Api1208; |
| | | import com.fzzy.push.gd2022.dto.Gd2022Api1307; |
| | | import com.fzzy.push.gd2022.dto.Gd2022Api1308; |
| | | import lombok.Data; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.commons.lang.StringUtils; |
| | | import org.apache.commons.lang.time.DateFormatUtils; |
| | | import org.apache.commons.lang.time.DateUtils; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | |
| | | |
| | | private String getJsonData(String inteId, Object data, String url, GD2022AuthToken authToken) throws Exception { |
| | | if (Constant.API_CODE_1101.equals(inteId)) { |
| | | Api1101 api1101 = new Api1101(); |
| | | Gd2022Api1101 api1101 = new Gd2022Api1101(); |
| | | BeanUtils.copyProperties(data, api1101); |
| | | return JSON.toJSONString(api1101); |
| | | } else if (Constant.API_CODE_1109.equals(inteId)) { |
| | | //封装数据 |
| | | Api1109 api1109 = new Api1109(); |
| | | Gd2022Api1109 api1109 = new Gd2022Api1109(); |
| | | BeanUtils.copyProperties(data, api1109); |
| | | |
| | | if (null == authToken) { |
| | |
| | | api1109.setFileStorageId((String) responseDto.getData()); |
| | | return JSON.toJSONString(api1109); |
| | | } else if (Constant.API_CODE_1208.equals(inteId)) { |
| | | Api1208 api1208 = new Api1208(); |
| | | Gd2022Api1208 api1208 = new Gd2022Api1208(); |
| | | BeanUtils.copyProperties(data, api1208); |
| | | return JSON.toJSONString(api1208); |
| | | } else if (Constant.API_CODE_1307.equals(inteId)) { |
| | | //封装数据 |
| | | Api1307 api1307 = new Api1307(); |
| | | Gd2022Api1307 api1307 = new Gd2022Api1307(); |
| | | BeanUtils.copyProperties(data, api1307); |
| | | |
| | | if (null == authToken) { |
| | |
| | | return JSON.toJSONString(api1307); |
| | | } else if (Constant.API_CODE_1308.equals(inteId)) { |
| | | //封装数据 |
| | | Api1308 api1308 = new Api1308(); |
| | | Gd2022Api1308 api1308 = new Gd2022Api1308(); |
| | | BeanUtils.copyProperties(data, api1308); |
| | | |
| | | if (null == authToken) { |