# Conflicts: # mallinkService/src/main/resources/mapper/WxCarCmdLogMapper.xmlrelease_toaliyun_real
| @@ -0,0 +1,2 @@ | |||||
| alter table wx_car_cmd_log | |||||
| add column fee_time VARCHAR(50) GENERATED ALWAYS AS (`cmd_json` ->> '$.time') NULL; | |||||
| @@ -319,6 +319,7 @@ public class WxCarCallBackController extends BaseController { | |||||
| // 根据orderId获取入场信息,确定租户ID | // 根据orderId获取入场信息,确定租户ID | ||||
| String orderId = paramMap.get(ETCPUtil.ETCP_ORDER_ID); | String orderId = paramMap.get(ETCPUtil.ETCP_ORDER_ID); | ||||
| String etcpTime = paramMap.get(ETCPUtil.ETCP_TIME); | |||||
| HashMap<String, String> map = new HashMap<String, String>(); | HashMap<String, String> map = new HashMap<String, String>(); | ||||
| map.put("synId", orderId); | map.put("synId", orderId); | ||||
| String tenantId = wxCarCmdLogService.getTenantIdBySynId(map); | String tenantId = wxCarCmdLogService.getTenantIdBySynId(map); | ||||
| @@ -326,8 +327,9 @@ public class WxCarCallBackController extends BaseController { | |||||
| // 检查是否有重复数据 | // 检查是否有重复数据 | ||||
| map.put("tenantId", tenantId); | map.put("tenantId", tenantId); | ||||
| map.put("orderId", orderId); | map.put("orderId", orderId); | ||||
| Long count = wxCarCmdLogService.getCountByOrderId(map); | |||||
| if(count > 0) { | |||||
| map.put("feeTime", etcpTime); | |||||
| WxCarCmdLog carCmdLog = wxCarCmdLogService.getByOrderId(map); | |||||
| if(carCmdLog != null) { | |||||
| logger.error("ETCP order已入库: " + orderId); | logger.error("ETCP order已入库: " + orderId); | ||||
| return new Result(EnumETCPCode.SUCCESS.getCode(), EnumETCPCode.SUCCESS.getMessage()); | return new Result(EnumETCPCode.SUCCESS.getCode(), EnumETCPCode.SUCCESS.getMessage()); | ||||
| } | } | ||||
| @@ -350,7 +352,7 @@ public class WxCarCallBackController extends BaseController { | |||||
| } | } | ||||
| String paidServiceFee = paramMap.get(ETCPUtil.ETCP_PAID_SERVICE_FEE); | String paidServiceFee = paramMap.get(ETCPUtil.ETCP_PAID_SERVICE_FEE); | ||||
| String etcpTime = paramMap.get(ETCPUtil.ETCP_TIME); | |||||
| String fee = paramMap.get("fee"); | String fee = paramMap.get("fee"); | ||||
| try { | try { | ||||
| @@ -28,7 +28,7 @@ public interface WxCarCmdLogMapper extends CommonMapper<WxCarCmdLog, Long> { | |||||
| Long queryWeekCarPayCount(HashMap<String,Object> params); | Long queryWeekCarPayCount(HashMap<String,Object> params); | ||||
| Long countPaidInfoByOrderId(HashMap<String,String> params); | |||||
| WxCarCmdLog queryByOrderId(HashMap<String,String> params); | |||||
| Long countBySynId(HashMap<String,Object> params); | Long countBySynId(HashMap<String,Object> params); | ||||
| } | } | ||||
| @@ -50,7 +50,7 @@ public interface WxCarCmdLogService { | |||||
| */ | */ | ||||
| String getTenantIdBySynId(HashMap<String, String> params); | String getTenantIdBySynId(HashMap<String, String> params); | ||||
| Long getCountByOrderId(HashMap<String, String> params); | |||||
| WxCarCmdLog getByOrderId(HashMap<String, String> params); | |||||
| Long getCountBySynId(HashMap<String, Object> params); | Long getCountBySynId(HashMap<String, Object> params); | ||||
| @@ -61,8 +61,8 @@ public class WxCarCmdLogServiceImpl implements WxCarCmdLogService { | |||||
| } | } | ||||
| @Override | @Override | ||||
| public Long getCountByOrderId(HashMap<String, String> params) { | |||||
| return wxCarCmdLogMapper.countPaidInfoByOrderId(params); | |||||
| public WxCarCmdLog getByOrderId(HashMap<String, String> params) { | |||||
| return wxCarCmdLogMapper.queryByOrderId(params); | |||||
| } | } | ||||
| @Override | @Override | ||||
| @@ -127,15 +127,18 @@ | |||||
| where cmd_type = 601 and syn_id = #{synId} | where cmd_type = 601 and syn_id = #{synId} | ||||
| </select> | </select> | ||||
| <select id="countPaidInfoByOrderId" parameterType="hashmap" resultType="Long"> | |||||
| select count(id) | |||||
| <select id="queryByOrderId" parameterType="hashmap" resultType="com.iformall.domain.po.WxCarCmdLog"> | |||||
| select * | |||||
| from wx_car_cmd_log | from wx_car_cmd_log | ||||
| where cmd_type = 604 | where cmd_type = 604 | ||||
| <if test=" null != tenantId"> | <if test=" null != tenantId"> | ||||
| and tenant_id = #{tenantId} | |||||
| and tenant_id = #{tenantId} | |||||
| </if> | </if> | ||||
| <if test=" null != orderId"> | <if test=" null != orderId"> | ||||
| and order_id = #{orderId} | |||||
| and order_id = #{orderId} | |||||
| </if> | |||||
| <if test=" null != feeTime"> | |||||
| and fee_time = #{feeTime} | |||||
| </if> | </if> | ||||
| </select> | </select> | ||||