| @@ -101,13 +101,6 @@ public class WxCarCallBackController extends BaseController { | |||||
| wxCarCmdLog.setTenantId(park.getTenantId()); | wxCarCmdLog.setTenantId(park.getTenantId()); | ||||
| } | } | ||||
| try { | |||||
| wxCarCmdLogService.saveOrUpdate(wxCarCmdLog); | |||||
| } catch (Exception e) { | |||||
| logger.error("etcpParkInCallback: 入库错误 " + paramMap.toString()); | |||||
| return true; | |||||
| } | |||||
| String carNumber = paramMap.get("plateNumber"); | String carNumber = paramMap.get("plateNumber"); | ||||
| String synId = paramMap.get("synId"); | String synId = paramMap.get("synId"); | ||||
| String parkId = paramMap.get("parkId"); | String parkId = paramMap.get("parkId"); | ||||
| @@ -117,6 +110,23 @@ public class WxCarCallBackController extends BaseController { | |||||
| String fixParkingId = paramMap.get("fixParkingId"); | String fixParkingId = paramMap.get("fixParkingId"); | ||||
| String remainingDays = paramMap.get("remainingDays"); | String remainingDays = paramMap.get("remainingDays"); | ||||
| // 检查是否有重复数据 | |||||
| HashMap<String, Object> map = new HashMap<String, Object>(); | |||||
| map.put("synId", synId); | |||||
| map.put("cmdType", EnumCarCmd.CAR_ETCP_CALLBACK_PARK_IN.getCode()); | |||||
| Long count = wxCarCmdLogService.getCountBySynId(map); | |||||
| if(count > 1) { | |||||
| logger.error("ETCP synId已入库: " + paramMap.toString()); | |||||
| return true; | |||||
| } | |||||
| try { | |||||
| wxCarCmdLogService.saveOrUpdate(wxCarCmdLog); | |||||
| } catch (Exception e) { | |||||
| logger.error("etcpParkInCallback: 入库错误 " + paramMap.toString()); | |||||
| return true; | |||||
| } | |||||
| String phoneStrs = ""; | String phoneStrs = ""; | ||||
| // 停车发券 | // 停车发券 | ||||
| @@ -28,5 +28,7 @@ public interface WxCarCmdLogMapper extends CommonMapper<WxCarCmdLog, Long> { | |||||
| Long queryWeekCarPayCount(HashMap<String,Object> params); | Long queryWeekCarPayCount(HashMap<String,Object> params); | ||||
| Long queryPaidInfoByOrderId(HashMap<String,String> params); | |||||
| Long countPaidInfoByOrderId(HashMap<String,String> params); | |||||
| Long countBySynId(HashMap<String,Object> params); | |||||
| } | } | ||||
| @@ -52,6 +52,8 @@ public interface WxCarCmdLogService { | |||||
| Long getCountByOrderId(HashMap<String, String> params); | Long getCountByOrderId(HashMap<String, String> params); | ||||
| Long getCountBySynId(HashMap<String, Object> params); | |||||
| @@ -61,9 +61,13 @@ public class WxCarCmdLogServiceImpl implements WxCarCmdLogService { | |||||
| } | } | ||||
| @Override | @Override | ||||
| public | |||||
| Long getCountByOrderId(HashMap<String, String> params) { | |||||
| return wxCarCmdLogMapper.queryPaidInfoByOrderId(params); | |||||
| public Long getCountByOrderId(HashMap<String, String> params) { | |||||
| return wxCarCmdLogMapper.countPaidInfoByOrderId(params); | |||||
| } | |||||
| @Override | |||||
| public Long getCountBySynId(HashMap<String, String> params) { | |||||
| return wxCarCmdLogMapper.countBySynId(params); | |||||
| } | } | ||||
| @@ -127,7 +127,7 @@ | |||||
| where cmd_type = 601 and json_extract(cmd_json, "$.synId") = #{synId} | where cmd_type = 601 and json_extract(cmd_json, "$.synId") = #{synId} | ||||
| </select> | </select> | ||||
| <select id="queryPaidInfoByOrderId" parameterType="hashmap" resultType="Long"> | |||||
| <select id="countPaidInfoByOrderId" parameterType="hashmap" resultType="Long"> | |||||
| select count(id) | select count(id) | ||||
| from wx_car_cmd_log | from wx_car_cmd_log | ||||
| where cmd_type = 604 | where cmd_type = 604 | ||||
| @@ -138,6 +138,21 @@ | |||||
| and json_extract(cmd_json, "$.orderId") = #{orderId} | and json_extract(cmd_json, "$.orderId") = #{orderId} | ||||
| </if> | </if> | ||||
| </select> | </select> | ||||
| <select id="countBySynId" parameterType="hashmap" resultType="Long"> | |||||
| select count(id) | |||||
| from wx_car_cmd_log | |||||
| where | |||||
| <if test=" null != tenantId"> | |||||
| and tenant_id = #{tenantId} | |||||
| </if> | |||||
| <if test=" null != cmdType"> | |||||
| and cmd_type = #{cmdType} | |||||
| </if> | |||||
| <if test=" null != synId"> | |||||
| and json_extract(cmd_json, "$.synId") = #{synId} | |||||
| </if> | |||||
| </select> | |||||
| </mapper> | </mapper> | ||||