diff --git a/hai-bweb/src/main/java/com/bweb/controller/Etc/EtcCustomerController.java b/hai-bweb/src/main/java/com/bweb/controller/Etc/EtcCustomerController.java index c8ae31fd..675e7e2e 100644 --- a/hai-bweb/src/main/java/com/bweb/controller/Etc/EtcCustomerController.java +++ b/hai-bweb/src/main/java/com/bweb/controller/Etc/EtcCustomerController.java @@ -11,6 +11,7 @@ import com.hai.common.security.SessionObject; import com.hai.common.security.UserCenter; import com.hai.common.utils.DateUtil; import com.hai.common.utils.ResponseMsgUtil; +import com.hai.config.CommonConfig; import com.hai.config.EtcService; import com.hai.entity.*; import com.hai.enum_type.CarTypeEnum; @@ -66,7 +67,13 @@ public class EtcCustomerController { map.put("custName", custName); map.put("phone", phone); - return ResponseMsgUtil.success(etcCustMsgService.getEtcCustList(map)); + List list = etcCustMsgService.getEtcCustList(map); + + for(EtcCustMsg custMsg : list){ + custMsg.setCustIdNo(CommonConfig.desensitize(custMsg.getCustIdNo())); + } + + return ResponseMsgUtil.success(list); } catch (Exception e) { log.error("BsMsgController --> getMsgByList() error!", e); @@ -269,7 +276,7 @@ public class EtcCustomerController { @ResponseBody @ApiOperation(value = "查询车辆列表") public ResponseData getEtcCarMsgList( - @RequestParam(value = "vehPlateNo", required = false) String vehPlateNo, HttpServletRequest request + @RequestParam(value = "vehPlateNo", required = false) String vehPlateNo, @RequestParam(value = "custId", required = false) String custId, HttpServletRequest request ) { try { @@ -280,21 +287,20 @@ public class EtcCustomerController { map.put("userId", userInfoModel.getSecUser().getId()); map.put("vehPlateNo", vehPlateNo); + map.put("custId", custId); List list = etcCarMsgService.getEtcCarList(map); for (EtcCarMsg etcCarMsg :list) { JSONObject car = EtcService.getVehStatus(etcCarMsg); if (car.getString("errCode").equals("0")) { - - if (car.getJSONObject("result").getInteger("vehStatus") == 11) { - etcCarMsg.setVehStatus(13); - } else { - etcCarMsg.setVehStatus(car.getJSONObject("result").getInteger("vehStatus")); - } + etcCarMsg.setVehStatus(car.getJSONObject("result").getInteger("vehStatus")); etcCarMsg.setPayStatus(car.getJSONObject("result").getInteger("payStatus")); etcCarMsg.setSignStatus(car.getJSONObject("result").getInteger("signStatus")); + etcCarMsg.setCardNo(car.getJSONObject("result").getString("cardNo")); + etcCarMsg.setObuNo(car.getJSONObject("result").getString("obuNo")); etcCarMsg.setExt2(car.getJSONObject("result").getString("docException")); + etcCarMsgService.updateEtcCar(etcCarMsg); } } @@ -380,6 +386,57 @@ public class EtcCustomerController { } } + + @RequestMapping(value = "/deleteEtcCar", method = RequestMethod.GET) + @ResponseBody + @ApiOperation(value = "删除车辆信息") + public ResponseData deleteEtcCar(@RequestParam(value = "id", required = true) Long id) { + try { + + EtcCarMsg etcCarMsg = etcCarMsgService.findEtcCarById(id); + + if (etcCarMsg == null) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未查询到相关内容!"); + } + + if (etcCarMsg.getVehStatus() == 11 || etcCarMsg.getVehStatus() == 12 || etcCarMsg.getVehStatus() == 13 || etcCarMsg.getVehStatus() == 15 || etcCarMsg.getVehStatus() == 20) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "状态错误!"); + } + + etcCarMsgService.deleteEtcCar(id); + return ResponseMsgUtil.success("删除成功!"); + + } catch (Exception e) { + log.error("HighUserController --> findByUserId() error!", e); + return ResponseMsgUtil.exception(e); + } + } + + @RequestMapping(value = "/deleteEtcCust", method = RequestMethod.GET) + @ResponseBody + @ApiOperation(value = "删除用户信息") + public ResponseData deleteEtcCust(@RequestParam(value = "id", required = true) Long id) { + try { + + EtcCustMsg etcCustMsg = etcCustMsgService.findEtcCustById(id); + + if (etcCustMsg == null) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未查询到相关内容!"); + } + + etcCustMsg.setStatus(0); + etcCustMsgService.editEtcCust(etcCustMsg); + + return ResponseMsgUtil.success("删除成功!"); + + } catch (Exception e) { + log.error("HighUserController --> findByUserId() error!", e); + return ResponseMsgUtil.exception(e); + } + } + + + @RequestMapping(value = "/getVehStatus", method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "根据id查询详情") diff --git a/hai-cweb/src/main/java/com/cweb/config/AuthConfig.java b/hai-cweb/src/main/java/com/cweb/config/AuthConfig.java index 9df59cb2..2d9a1bfb 100644 --- a/hai-cweb/src/main/java/com/cweb/config/AuthConfig.java +++ b/hai-cweb/src/main/java/com/cweb/config/AuthConfig.java @@ -149,6 +149,7 @@ public class AuthConfig implements WebMvcConfigurer { .excludePathPatterns("/highThirdParty/*") .excludePathPatterns("/group/*") .excludePathPatterns("/couponCodeOther/*") + .excludePathPatterns("/tPig/*") ; } diff --git a/hai-cweb/src/main/java/com/cweb/controller/Etc/EtcCustomerController.java b/hai-cweb/src/main/java/com/cweb/controller/Etc/EtcCustomerController.java index 5f62d346..64e98f76 100644 --- a/hai-cweb/src/main/java/com/cweb/controller/Etc/EtcCustomerController.java +++ b/hai-cweb/src/main/java/com/cweb/controller/Etc/EtcCustomerController.java @@ -162,7 +162,7 @@ public class EtcCustomerController { } // 查询微信签约代扣信息 - JSONObject object = EtcService.checkNeedSignWechatWithhold( contractOrder.getProductId() , contractOrder.getCardVarietyId()); + JSONObject object = EtcService.checkNeedSignWechatWithhold( contractOrder.getProductId() , contractOrder.getCardVarietyId() , contractOrder.getVehId()); if (object.getString("errCode").equals("0")) { contractOrder.setWechatSign(object.getJSONObject("result").getBoolean("alreadySignFlag")? 1:0); contractOrder.setNeedSignWechat(object.getJSONObject("result").getBoolean("needSignFlag")? 1:0); @@ -299,7 +299,7 @@ public class EtcCustomerController { EtcContractOrder contractOrder = etcCarMsgService.findContractOrderById(contractId); if (type == 1) { - JSONObject object = EtcService.checkNeedSignWechatWithhold( contractOrder.getProductId() , contractOrder.getCardVarietyId()); + JSONObject object = EtcService.checkNeedSignWechatWithhold( contractOrder.getProductId() , contractOrder.getCardVarietyId() , contractOrder.getVehId()); if (object.getString("errCode").equals("0")) { return ResponseMsgUtil.success(object.getJSONObject("result")); } else { diff --git a/hai-cweb/src/main/java/com/cweb/controller/tPigController.java b/hai-cweb/src/main/java/com/cweb/controller/tPigController.java index b9ca5242..16a9d75e 100644 --- a/hai-cweb/src/main/java/com/cweb/controller/tPigController.java +++ b/hai-cweb/src/main/java/com/cweb/controller/tPigController.java @@ -41,7 +41,7 @@ public class tPigController { try { HighUser highUser = highUserService.findByUserId(userId); - JSONObject token = QianZhuConfig.getToken(highUser.getUnionId() , highUser.getName() , highUser.getPhone()); + JSONObject token = QianZhuConfig.getToken(highUser.getId().toString() , highUser.getName() , highUser.getPhone()); String url = ""; if (token.getBoolean("success")) { JSONObject data = token.getJSONObject("data"); @@ -60,7 +60,7 @@ public class tPigController { try { HighUser highUser = highUserService.findByUserId(userId); - JSONObject token = QianZhuConfig.getToken(highUser.getUnionId() , highUser.getName() , highUser.getPhone()); + JSONObject token = QianZhuConfig.getToken(highUser.getId().toString() , highUser.getName() , highUser.getPhone()); String url = ""; if (token.getBoolean("success")) { JSONObject data = token.getJSONObject("data"); diff --git a/hai-schedule/src/main/java/com/hai/schedule/EtcSchedule.java b/hai-schedule/src/main/java/com/hai/schedule/EtcSchedule.java index 3f47b9ea..6ad0c934 100644 --- a/hai-schedule/src/main/java/com/hai/schedule/EtcSchedule.java +++ b/hai-schedule/src/main/java/com/hai/schedule/EtcSchedule.java @@ -36,34 +36,34 @@ public class EtcSchedule { private EtcCarMsgService etcCarMsgService; - @Scheduled(cron = "0 0/10 * * * ?") //每10分钟执行一次 - public void etcCarMsg() { - try { - - JSONObject object = EtcService.queryActivateVehicleInfoPage(DateUtil.format(DateUtil.reduceDate(new Date() , 2) , "yyyy-MM-dd HH:mm:ss") , DateUtil.format(new Date() , "yyyy-MM-dd HH:mm:ss") ); - if (Objects.equals(object.getString("errCode"), "0") && object.getJSONObject("result").getJSONArray("records") != null) { - JSONArray jsonArray = object.getJSONObject("result").getJSONArray("records"); - - for (int i = 0; i < jsonArray.size(); i++) { - Map map = new HashMap<>(); - map.put("vehPlateNo" , jsonArray.getJSONObject(i).getString("vehPlateNo")); - map.put("vehPlateColor" , CarTypeEnum.getNameByName(jsonArray.getJSONObject(i).getString("vehPlateColor"))); - map.put("vehStatus" , 20); - - EtcCarMsg carMsg = etcCarMsgService.findEtcCarByMap(map); - carMsg.setCardNo(jsonArray.getJSONObject(i).getString("cardNo")); - carMsg.setObuNo(jsonArray.getJSONObject(i).getString("obuNo")); - carMsg.setUpdateTime(jsonArray.getJSONObject(i).getDate("activeTime")); - - etcCarMsgService.updateEtcCar(carMsg); - - } - } - - } catch (Exception e) { - log.error("HighUserController --> findByUserId() error!", e); - } - } +// @Scheduled(cron = "0 0/10 * * * ?") //每10分钟执行一次 +// public void etcCarMsg() { +// try { +// +// JSONObject object = EtcService.queryActivateVehicleInfoPage(DateUtil.format(DateUtil.reduceDate(new Date() , 2) , "yyyy-MM-dd HH:mm:ss") , DateUtil.format(new Date() , "yyyy-MM-dd HH:mm:ss") ); +// if (Objects.equals(object.getString("errCode"), "0") && object.getJSONObject("result").getJSONArray("records") != null) { +// JSONArray jsonArray = object.getJSONObject("result").getJSONArray("records"); +// +// for (int i = 0; i < jsonArray.size(); i++) { +// Map map = new HashMap<>(); +// map.put("vehPlateNo" , jsonArray.getJSONObject(i).getString("vehPlateNo")); +// map.put("vehPlateColor" , CarTypeEnum.getNameByName(jsonArray.getJSONObject(i).getString("vehPlateColor"))); +// map.put("vehStatus" , 20); +// +// EtcCarMsg carMsg = etcCarMsgService.findEtcCarByMap(map); +// carMsg.setCardNo(jsonArray.getJSONObject(i).getString("cardNo")); +// carMsg.setObuNo(jsonArray.getJSONObject(i).getString("obuNo")); +// carMsg.setUpdateTime(jsonArray.getJSONObject(i).getDate("activeTime")); +// +// etcCarMsgService.updateEtcCar(carMsg); +// +// } +// } +// +// } catch (Exception e) { +// log.error("HighUserController --> findByUserId() error!", e); +// } +// } } diff --git a/hai-schedule/src/main/java/com/hai/schedule/HighGasSchedule.java b/hai-schedule/src/main/java/com/hai/schedule/HighGasSchedule.java index 7c41c835..a329c96b 100644 --- a/hai-schedule/src/main/java/com/hai/schedule/HighGasSchedule.java +++ b/hai-schedule/src/main/java/com/hai/schedule/HighGasSchedule.java @@ -158,10 +158,10 @@ public class HighGasSchedule { // gasService.getPayloAllStation(); // } -// @Scheduled(cron = "5 0 0 * * ?") // 每日凌晨00:00:5执行一次 -// public void getDianAllStation() throws Exception { -// gasService.getDianAllStation(); -// } + @Scheduled(cron = "5 0 0 * * ?") // 每日凌晨00:00:5执行一次 + public void getDianAllStation() throws Exception { + gasService.getDianAllStation(); + } @Scheduled(cron = "0 0 3 * * ?") // 每日凌晨00:00:7执行一次 public void deleteOilNo() { diff --git a/hai-service/src/main/java/com/hai/config/CommonConfig.java b/hai-service/src/main/java/com/hai/config/CommonConfig.java index 41d6545d..b3804678 100644 --- a/hai-service/src/main/java/com/hai/config/CommonConfig.java +++ b/hai-service/src/main/java/com/hai/config/CommonConfig.java @@ -184,5 +184,13 @@ public class CommonConfig { return HttpsUtils.doGet("https://express3.market.alicloudapi.com/express3" , querys ,headers); } + // 对身份证号码进行脱敏处理 + public static String desensitize(String idCard) { + if (idCard == null || idCard.length() != 18) { + return idCard; + } + return idCard.substring(0, 6) + "**********" + idCard.substring(14); + } + } diff --git a/hai-service/src/main/java/com/hai/config/EtcService.java b/hai-service/src/main/java/com/hai/config/EtcService.java index 83d60c39..8eeaead2 100644 --- a/hai-service/src/main/java/com/hai/config/EtcService.java +++ b/hai-service/src/main/java/com/hai/config/EtcService.java @@ -258,7 +258,7 @@ public class EtcService { * @Param cardVarietyId * @return com.alibaba.fastjson.JSONObject */ - public static JSONObject checkNeedSignWechatWithhold(Integer productId , Integer cardVarietyId) throws Exception { + public static JSONObject checkNeedSignWechatWithhold(Integer productId , Integer cardVarietyId , String vehId) throws Exception { // 组装数据 JSONObject map = new JSONObject(); map.put("orgCode" , CommonSysConst.getSysConfig().getNdOrgCode()); @@ -266,6 +266,7 @@ public class EtcService { JSONObject jsonObject = new JSONObject(); jsonObject.put("productId" , productId); jsonObject.put("cardVarietyId" , cardVarietyId); + jsonObject.put("vehId" , vehId); map.put("body" , jsonObject.toJSONString()); String sign = WxUtils.generateSignByEtc(map , CommonSysConst.getSysConfig().getNdKey()); diff --git a/hai-service/src/main/java/com/hai/etc/EtcCarMsgService.java b/hai-service/src/main/java/com/hai/etc/EtcCarMsgService.java index daea39fe..ae6d1bc4 100644 --- a/hai-service/src/main/java/com/hai/etc/EtcCarMsgService.java +++ b/hai-service/src/main/java/com/hai/etc/EtcCarMsgService.java @@ -29,6 +29,8 @@ public interface EtcCarMsgService { void addEtcCar(EtcCarMsg etcCarMsg) throws Exception; + void deleteEtcCar(Long id) throws Exception; + void updateEtcCar(EtcCarMsg etcCarMsg); /** diff --git a/hai-service/src/main/java/com/hai/etc/EtcCustMsgService.java b/hai-service/src/main/java/com/hai/etc/EtcCustMsgService.java index 1cd76f87..d14b6b9d 100644 --- a/hai-service/src/main/java/com/hai/etc/EtcCustMsgService.java +++ b/hai-service/src/main/java/com/hai/etc/EtcCustMsgService.java @@ -34,6 +34,9 @@ public interface EtcCustMsgService { */ void updateEtcCust(EtcCustMsg etcCustMsg) throws Exception; + + void editEtcCust(EtcCustMsg etcCustMsg) throws Exception; + /** * @Author Sum1Dream * @Name getCustInfoList diff --git a/hai-service/src/main/java/com/hai/etc/impl/EtcCarMsgServiceImpl.java b/hai-service/src/main/java/com/hai/etc/impl/EtcCarMsgServiceImpl.java index 2295e8ac..60d9ed67 100644 --- a/hai-service/src/main/java/com/hai/etc/impl/EtcCarMsgServiceImpl.java +++ b/hai-service/src/main/java/com/hai/etc/impl/EtcCarMsgServiceImpl.java @@ -84,6 +84,11 @@ public class EtcCarMsgServiceImpl implements EtcCarMsgService { etcCarMsgMapper.insert(etcCarMsg); } + @Override + public void deleteEtcCar(Long id) throws Exception { + etcCarMsgMapper.deleteByPrimaryKey(id); + } + @Override public void updateEtcCar(EtcCarMsg etcCarMsg) { etcCarMsgMapper.updateByPrimaryKey(etcCarMsg); diff --git a/hai-service/src/main/java/com/hai/etc/impl/EtcCustMsgServiceImpl.java b/hai-service/src/main/java/com/hai/etc/impl/EtcCustMsgServiceImpl.java index 7cd98e88..402004b4 100644 --- a/hai-service/src/main/java/com/hai/etc/impl/EtcCustMsgServiceImpl.java +++ b/hai-service/src/main/java/com/hai/etc/impl/EtcCustMsgServiceImpl.java @@ -42,6 +42,11 @@ public class EtcCustMsgServiceImpl implements EtcCustMsgService { } + @Override + public void editEtcCust(EtcCustMsg etcCustMsg) throws Exception { + etcCustMsgMapper.updateByPrimaryKey(etcCustMsg); + } + @Override public List getEtcCustList(Map map) { @@ -57,6 +62,9 @@ public class EtcCustMsgServiceImpl implements EtcCustMsgService { if (MapUtils.getString(map , "phone") != null) { criteria.andPhoneEqualTo(MapUtils.getString(map , "phone")); } + criteria.andStatusNotEqualTo(0); + + example.setOrderByClause("create_time desc"); return etcCustMsgMapper.selectByExample(example); } diff --git a/hai-service/src/main/java/com/hai/service/impl/HighGasServiceImpl.java b/hai-service/src/main/java/com/hai/service/impl/HighGasServiceImpl.java index b635f74c..cef7c97e 100644 --- a/hai-service/src/main/java/com/hai/service/impl/HighGasServiceImpl.java +++ b/hai-service/src/main/java/com/hai/service/impl/HighGasServiceImpl.java @@ -824,8 +824,8 @@ public class HighGasServiceImpl implements HighGasService { Map param = new HashMap<>(); param.put("sourceType", 2); -// param.put("regionId", "500000"); -// param.put("storeName", "壳牌"); + param.put("regionId", "500000"); + param.put("storeName", "壳牌"); param.put("status", 1); List merchantStoreList = merchantStoreService.getMerchantStoreList(param); diff --git a/hai-service/src/main/resources/dev/commonConfig.properties b/hai-service/src/main/resources/dev/commonConfig.properties index 58131761..767b4ce2 100644 --- a/hai-service/src/main/resources/dev/commonConfig.properties +++ b/hai-service/src/main/resources/dev/commonConfig.properties @@ -178,9 +178,9 @@ EtcPublicKey = MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCMyQb5gR1rweB5oHKqRPJtJjLQK EtcPrivateKey = MIICeQIBADANBgkqhkiG9w0BAQEFAASCAmMwggJfAgEAAoGBAO8+KWh/OmBahFk7TWOEjPl13BT5NdlbGvQ/311Yua6CQqul9w1DIR2TwFUUh/Bko/eVoLROfF2XVjHbw2bImTdJ7y9C3511HI59YPNzqyql0DHjLxbH0VW92eUgk8mG09wtrUMu1ImN0b7aFE3uqAgz6pwh3TUiQWsDWz+l/MG7AgMBAAECgYEA7nYsOd8OpbmzT2m/omEdTwz9993KocKgZDJCBj4InftyTrrXO93cZSm/PE6BjMgTcxUuIGpWpcbRgFLHOmzZ4Qd+k/6Yb1ErMTfdGlgrxv2B+vztWYfjmFzEiXpecFH47ED6iYrrqm14X3InpnBv4rUkGdqqNbyPGgTO2ncs/3kCQQD+xqRAQSb/TROlqJdO91y6z9v0PO2GLmokqYg444rKYZKhDE0tdJeLU/sfK8SMg5+SlwdQm4nlo8EDJ/w2CEn3AkEA8GRqVkKgIuH413/a6+luYDjlf30WY7Mi1sm3QPSZ6+eH35UwsL6mdX6mjRpUN9Hez6FMfE7s3XOldoPVMzR1XQJBAOa2VTkGhtz8HEWQZOySXfuhjSogHmu7Dk2C5CO4Eg/wycpjDGSUR0NZWnfAt60S6GbjszEQmJBGeNt10xPO78MCQQCWXwnRaZ3IFDhXfQfRWFSN5ilQ5UszFGQvnUB/ZkI+ObdZmXY6qRdxGcdPLnAN9r78fDZe7/Pk1qljCDY98IuVAkEAnSeO/221gDhL1wnbUhGuX1yo8f5Eo/wDTW5cBxXFGZeexhB8I4jnEV4E/xmikkb3jDFvmrnFk+XUtDqkrvicRQ== #NUODE -NdPostUrl = http://nuode-test.yuetong18.cn/nuode-module-supplier/ -NdOrgCode = 19181483-91e9-4e13-9236-fb917ed9529d -NdKey= 5df3f620-e269-458d-9556-87e26d30256a +NdPostUrl = https://nuode.qianbao18.com/nuode-module-supplier/ +NdOrgCode = 414a3d16-30f9-40d1-a2cd-b06066b38708 +NdKey= 4a6a6836-42f5-4ead-8629-ca1265bfb98c #Sph SphPostUrl = https://api.coupon.shuangpenghui.com//business/entry