Merge branch '2.0-dev' of http://gitea.dctpay.com/hurui/hai-server into 2.0-dev

2.0-dev
胡锐 7 months ago
commit ed151e7be3
  1. 35
      hai-bweb/src/main/java/com/bweb/controller/Etc/EtcCustomerController.java
  2. 2
      hai-bweb/src/main/java/com/bweb/controller/HighTestController.java
  3. 2
      hai-cweb/src/main/java/com/cweb/controller/HighTestController.java
  4. 2
      hai-order/src/main/java/com/web/controller/OrderPayController.java
  5. 8
      hai-schedule/src/main/java/com/hai/schedule/HighGasSchedule.java
  6. 25
      hai-service/src/main/java/com/hai/config/EtcService.java
  7. 2
      hai-service/src/main/java/com/hai/etc/EtcCarMsgService.java
  8. 6
      hai-service/src/main/java/com/hai/etc/impl/EtcCarMsgServiceImpl.java
  9. 4
      hai-service/src/main/java/com/hai/service/impl/HighGasServiceImpl.java
  10. 32
      hai-user/src/main/java/com/web/controller/WechatController.java
  11. 2
      v1/src/main/java/com/v1/controller/WxMsgController.java

@ -78,19 +78,30 @@ public class EtcCustomerController {
@RequestMapping(value = "insertCustomer" , method = RequestMethod.POST)
@ResponseBody
@ApiOperation(value = "新增客户基本信息")
public ResponseData insertCustomer(@RequestBody EtcCustMsg etcCustMsg , HttpServletRequest request) {
public ResponseData insertCustomer(@RequestBody JSONObject body , HttpServletRequest request) {
try {
SessionObject sessionObject = userCenter.getSessionObject(request);
UserInfoModel userInfoModel = (UserInfoModel) sessionObject.getObject();
if (etcCustMsg == null
|| etcCustMsg.getPhone() == null
if (body == null
|| body.getString("phone") == null
|| body.getString("vehPlateNo") == null
|| body.getInteger("vehPlateColor") == null
) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.REQ_PARAMS_ERROR, "");
}
JSONObject object = EtcService.checkVehPlateNo(body.getString("vehPlateNo") , body.getString("vehPlateColor"));
if (!Objects.equals(object.getString("errCode"), "0")) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, object.getString("errMsg"));
}
EtcCustMsg etcCustMsg = new EtcCustMsg();
etcCustMsg.setUserId(userInfoModel.getSecUser().getId());
etcCustMsg.setPhone(body.getString("phone"));
etcCustMsg.setUserName(userInfoModel.getSecUser().getUserName());
etcCustMsg.setCreateTime(new Date());
etcCustMsg.setUpdateTime(new Date());
@ -106,6 +117,18 @@ public class EtcCustomerController {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "当前用户已存在,请勿重复提交!");
}
EtcCarMsg carMsg = new EtcCarMsg();
carMsg.setUpdateTime(new Date());
carMsg.setCreateTime(new Date());
carMsg.setUserId(userInfoModel.getSecUser().getId());
carMsg.setUserName(userInfoModel.getSecUser().getUserName());
carMsg.setVehStatus(11);
carMsg.setVehPlateNo(body.getString("vehPlateNo"));
carMsg.setVehPlateColor(body.getInteger("vehPlateColor"));
etcCarMsgService.addEtcCar(carMsg);
etcCustMsgService.insertEtcCust(etcCustMsg);
return ResponseMsgUtil.success(etcCustMsg.getId());
@ -131,7 +154,7 @@ public class EtcCustomerController {
@RequestMapping(value = "editCustomer" , method = RequestMethod.POST)
@ResponseBody
@ApiOperation(value = "编辑客户基本信息")
public ResponseData editCustomer(@RequestBody EtcCustMsg etcCustMsg , HttpServletRequest request) {
public ResponseData editCustomer(@RequestBody EtcCustMsg etcCustMsg) {
try {
if (etcCustMsg == null
@ -232,7 +255,6 @@ public class EtcCustomerController {
etcCarMsg.setUserName(userInfoModel.getSecUser().getUserName());
etcCarMsg.setUpdateTime(new Date());
etcCarMsg.setVehStatus(11);
etcCarMsgService.insertEtcCar(etcCarMsg);
return ResponseMsgUtil.success(etcCarMsg.getExt1());
@ -381,8 +403,6 @@ public class EtcCustomerController {
public ResponseData queryActivateVehicleInfoPage() {
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) {
@ -396,6 +416,7 @@ public class EtcCustomerController {
EtcCarMsg carMsg = etcCarMsgService.findEtcCarByMap(map);
carMsg.setCardNo(jsonArray.getJSONObject(i).getString("cardNo"));
carMsg.setObuNo(jsonArray.getJSONObject(i).getString("obuNo"));
carMsg.setObuNo(jsonArray.getJSONObject(i).getString("obuNo"));
etcCarMsgService.updateEtcCar(carMsg);

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -279,8 +279,6 @@ public class OrderPayController {
}
}
} else if (store.getSourceType().equals(MerchantStoreSourceType.type2.getNumber())) {
// 查询支付配置

@ -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() {

@ -387,6 +387,31 @@ public class EtcService {
return HttpsUtils.doPost(CommonSysConst.getSysConfig().getNdPostUrl()+"/api/v1/queryActivateVehicleInfoPage" , map);
}
/**
* @Author Sum1Dream
* @Name checkVehPlateNo
* @Description // 车牌校验接口
* @Date 14:12 2024/4/13
* @Param activeStartTime
* @Param activeEndTime
* @return com.alibaba.fastjson.JSONObject
*/
public static JSONObject checkVehPlateNo(String vehPlateNo , String vehPlateColor) throws Exception {
// 组装数据
JSONObject map = new JSONObject();
map.put("orgCode" , CommonSysConst.getSysConfig().getNdOrgCode());
map.put("timestamps", String.valueOf(System.currentTimeMillis()));
JSONObject jsonObject = new JSONObject();
jsonObject.put("vehPlateColor" , vehPlateColor);
jsonObject.put("vehPlateNo" , vehPlateNo);
map.put("body" , jsonObject.toJSONString());
String sign = WxUtils.generateSignByEtc(map , CommonSysConst.getSysConfig().getNdKey());
map.put("sign" , DigestUtils.md5Hex((sign).getBytes()));
return HttpsUtils.doPost(CommonSysConst.getSysConfig().getNdPostUrl()+"/api/v1/checkVehPlateNo" , map);
}
/**
* @Author Sum1Dream
* @Name convertToBase64

@ -27,6 +27,8 @@ public interface EtcCarMsgService {
*/
void insertEtcCar(EtcCarMsg etcCarMsg) throws Exception;
void addEtcCar(EtcCarMsg etcCarMsg) throws Exception;
void updateEtcCar(EtcCarMsg etcCarMsg);
/**

@ -54,6 +54,7 @@ public class EtcCarMsgServiceImpl implements EtcCarMsgService {
contractOrder.setVehId(etcCarMsg.getVehId());
contractOrder.setPayStatus(1);
contractOrder.setStatus(1);
contractOrder.setVehStatus(13);
contractOrder.setVehStatus(etcCarMsg.getVehStatus());
contractOrder.setSignStatus(0);
contractOrder.setBankSign(0);
@ -78,6 +79,11 @@ public class EtcCarMsgServiceImpl implements EtcCarMsgService {
}
}
@Override
public void addEtcCar(EtcCarMsg etcCarMsg) throws Exception {
etcCarMsgMapper.insert(etcCarMsg);
}
@Override
public void updateEtcCar(EtcCarMsg etcCarMsg) {
etcCarMsgMapper.updateByPrimaryKey(etcCarMsg);

@ -824,8 +824,8 @@ public class HighGasServiceImpl implements HighGasService {
Map<String, Object> 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<HighMerchantStore> merchantStoreList = merchantStoreService.getMerchantStoreList(param);

@ -1,7 +1,12 @@
package com.web.controller;
import com.hai.common.exception.ErrorCode;
import com.hai.common.exception.ErrorHelp;
import com.hai.common.exception.SysCode;
import com.hai.common.utils.*;
import com.hai.enum_type.LoginPlatform;
import com.hai.model.ResponseData;
import com.hai.service.HighUserService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.stereotype.Controller;
@ -10,6 +15,9 @@ import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.HashMap;
import java.util.Map;
@ -18,6 +26,9 @@ import java.util.Map;
@Api(value = "微信授权")
public class WechatController {
@Resource
private HighUserService userService;
@RequestMapping(value = "/getH5AccessToken", method = RequestMethod.GET)
@ResponseBody
@ApiOperation(value = "【H5】获取AccessToken")
@ -35,4 +46,25 @@ public class WechatController {
}
}
@RequestMapping(value = "/loginBySilence", method = RequestMethod.GET)
@ResponseBody
@ApiOperation(value = "【H5】根据手机号登录")
public ResponseData loginBySilence(@RequestParam(value = "phone", required = true) String phone ,
HttpServletRequest request, HttpServletResponse response) {
try {
// 客户端
LoginPlatform platform = LoginPlatform.getDataByType("H5");
if (platform == null) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未知客户端");
}
return ResponseMsgUtil.success(userService.loginAndRegister(platform, phone, null, new HashMap<>(), request, response));
} catch (Exception e) {
return ResponseMsgUtil.exception(e);
}
}
}

@ -519,7 +519,7 @@ public class WxMsgController {
@RequestMapping(value = "/verifyWx", method = RequestMethod.GET)
@ResponseBody
@ApiOperation(value = "微信签名")
@ApiOperation(value = "微信编译URL")
public ResponseData verifyWx(@RequestParam(value = "url", required = true) String url) {
try {

Loading…
Cancel
Save