| @@ -228,10 +228,17 @@ public class WxCarCallBackController extends BaseController { | |||||
| logger.info("["+getIpAddr()+"etcpPaidCallback: " + paramMap.toString()); | logger.info("["+getIpAddr()+"etcpPaidCallback: " + paramMap.toString()); | ||||
| String carNumber = paramMap.get("plateNumber"); | String carNumber = paramMap.get("plateNumber"); | ||||
| // TODO how to get the parkId | |||||
| // 根据orderId获取入场信息,确定租户ID | |||||
| String orderId = paramMap.get("orderId"); | |||||
| HashMap<String, String> map = new HashMap<String, String>(); | |||||
| map.put("synId", orderId); | |||||
| String tenant_id = wxCarCmdLogService.getTenantIdBySynId(map); | |||||
| Date currentDate = new Date(); | Date currentDate = new Date(); | ||||
| WxCarCmdLog wxCarCmdLog = new WxCarCmdLog(); | WxCarCmdLog wxCarCmdLog = new WxCarCmdLog(); | ||||
| if(StringUtils.isNotBlank(tenant_id)) { | |||||
| wxCarCmdLog.setTenantId(tenant_id); | |||||
| } | |||||
| wxCarCmdLog.setVendorType(EnumCarVendor.CAR_ETCP.getCode()); | wxCarCmdLog.setVendorType(EnumCarVendor.CAR_ETCP.getCode()); | ||||
| wxCarCmdLog.setCmdType(EnumCarCmd.CAR_ETCP_CALLBACK_PAY_MANUAL.getCode()); | wxCarCmdLog.setCmdType(EnumCarCmd.CAR_ETCP_CALLBACK_PAY_MANUAL.getCode()); | ||||
| wxCarCmdLog.setCmdJson(JSON.toJSONString(paramMap)); | wxCarCmdLog.setCmdJson(JSON.toJSONString(paramMap)); | ||||
| @@ -23,4 +23,6 @@ public interface WxCarCmdLogMapper extends CommonMapper<WxCarCmdLog, Long> { | |||||
| List<Map<String,Object>> queryPlateNumberList(Map<String,Object> carParams); | List<Map<String,Object>> queryPlateNumberList(Map<String,Object> carParams); | ||||
| String queryTenantIdBySynId(HashMap<String,String> params); | |||||
| } | } | ||||
| @@ -3,14 +3,16 @@ package com.iformall.service; | |||||
| import com.github.pagehelper.PageInfo; | import com.github.pagehelper.PageInfo; | ||||
| import com.iformall.domain.po.WxCarCmdLog; | import com.iformall.domain.po.WxCarCmdLog; | ||||
| import java.util.HashMap; | |||||
| public interface WxCarCmdLogService { | public interface WxCarCmdLogService { | ||||
| /** | /** | ||||
| * 根据实体查询分页列表 | * 根据实体查询分页列表 | ||||
| * | * | ||||
| * @param record | * @param record | ||||
| * @param offset | |||||
| * @param limit | |||||
| * @param pageIndex | |||||
| * @param pageSize | |||||
| * @return | * @return | ||||
| */ | */ | ||||
| PageInfo<WxCarCmdLog> listAsPage(WxCarCmdLog record, Integer pageIndex, Integer pageSize); | PageInfo<WxCarCmdLog> listAsPage(WxCarCmdLog record, Integer pageIndex, Integer pageSize); | ||||
| @@ -36,12 +38,20 @@ public interface WxCarCmdLogService { | |||||
| * @param id | * @param id | ||||
| */ | */ | ||||
| void deleteById(Long id); | void deleteById(Long id); | ||||
| /** | |||||
| * 根据synId获取tenantId | |||||
| * @param params | |||||
| * @return | |||||
| */ | |||||
| String getTenantIdBySynId(HashMap<String, String> params); | |||||
| } | } | ||||
| @@ -11,6 +11,8 @@ import org.springframework.beans.factory.annotation.Autowired; | |||||
| import org.springframework.stereotype.Service; | import org.springframework.stereotype.Service; | ||||
| import com.iformall.common.IdWorker; | import com.iformall.common.IdWorker; | ||||
| import java.util.HashMap; | |||||
| @Service | @Service | ||||
| public class WxCarCmdLogServiceImpl implements WxCarCmdLogService { | public class WxCarCmdLogServiceImpl implements WxCarCmdLogService { | ||||
| private final Logger logger = LoggerFactory.getLogger(this.getClass()); | private final Logger logger = LoggerFactory.getLogger(this.getClass()); | ||||
| @@ -47,7 +49,11 @@ public class WxCarCmdLogServiceImpl implements WxCarCmdLogService { | |||||
| } | } | ||||
| @Override | |||||
| public String getTenantIdBySynId(HashMap<String,String> params) { | |||||
| return wxCarCmdLogMapper.queryTenantIdBySynId(params); | |||||
| } | |||||
| @@ -103,8 +103,11 @@ | |||||
| and json_unquote(JSON_EXTRACT(cmd_json,'$.plateNumber')) is not null | and json_unquote(JSON_EXTRACT(cmd_json,'$.plateNumber')) is not null | ||||
| group by plateNumber | group by plateNumber | ||||
| </select> | </select> | ||||
| <select id="queryTenantIdBySynId" parameterType="hashmap" resultType="String"> | |||||
| select `tenant_id` from wx_car_cmd_log | |||||
| where cmd_type = 601 and json_extract(cmd_json, "$.synId") = #{synId} | |||||
| </select> | |||||
| </mapper> | </mapper> | ||||