| | |
| | | package com.fzzy.push.sh2023; |
| | | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.fzzy.api.Constant; |
| | | import com.fzzy.api.data.ApiParam; |
| | | import com.fzzy.api.data.PushProtocol; |
| | | import com.fzzy.api.dto.ResponseDto; |
| | |
| | | apiLog.setId(ContextUtil.getUUID()); |
| | | |
| | | //若为财务1501、1502、1503接口,则接口编码填写1114 |
| | | if (SH2023Constant.SH_2023_API_CODE_1114_1501.equals(param.getInteId()) |
| | | || SH2023Constant.SH_2023_API_CODE_1114_1502.equals(param.getInteId()) |
| | | || SH2023Constant.SH_2023_API_CODE_1114_1503.equals(param.getInteId())) { |
| | | inteId = SH2023Constant.SH_2023_API_CODE_1114; |
| | | if (Constant.API_CODE_1114_1501.equals(param.getInteId()) |
| | | || Constant.API_CODE_1114_1502.equals(param.getInteId()) |
| | | || Constant.API_CODE_1114_1503.equals(param.getInteId())) { |
| | | inteId = Constant.API_CODE_1114; |
| | | } |
| | | apiLog.setInteId(inteId); |
| | | |
| | |
| | | |
| | | //获取指令id |
| | | String key = RedisConst.buildKey(RedisConst.KYE_ORDER, conf.getKqdm()); |
| | | OrderCommonData orderCommonData = (OrderCommonData) redisUtil.get(key); |
| | | if (null == orderCommonData || StringUtils.isEmpty(orderCommonData.getOrderid())) { |
| | | String orderId = (String) redisUtil.get(key); |
| | | if (StringUtils.isEmpty(orderId)) { |
| | | log.error("指令id失效=" + jsonData); |
| | | ResponseDto responseDto = new ResponseDto(99, "指令id失效"); |
| | | apiLog.setStatus(99); |
| | |
| | | //获取身份ID,即行政区划码 |
| | | reqData.setUid(conf.getUserName()); |
| | | //指令id |
| | | reqData.setOrderid(orderCommonData.getOrderid()); |
| | | reqData.setOrderid(orderId); |
| | | |
| | | //身份签名,使用自有RSA私钥进行加密(地区行政区划代码_当天日期) |
| | | reqData.setAccess_token(ShRSAUtils.sign(reqData.getUid() + "_" + DateFormatUtils.format(new Date(), "yyyy-MM-dd"), conf.getPassword())); |