Merge branch 'new-dev' into 2.0-dev

# Conflicts:
#	hai-service/src/main/java/com/hai/openApi/service/impl/ApiOrderCreateHandleServiceImpl.java
#	hai-service/src/main/java/com/hai/openApi/service/impl/ApiOrderServiceImpl.java
master
袁野 7 months ago
parent a7c82de2c4
commit 67e71fd697
  1. 3
      hai-bweb/src/main/java/com/bweb/controller/Etc/EtcCustomerController.java
  2. 1
      hai-cweb/src/main/java/com/cweb/config/AuthConfig.java
  3. 59
      hai-cweb/src/main/java/com/cweb/controller/Etc/EtcCustomerController.java
  4. 4
      hai-schedule/src/main/java/com/hai/schedule/EtcSchedule.java
  5. 3
      hai-service/src/main/java/com/hai/config/EtcService.java
  6. 3
      hai-service/src/main/java/com/hai/entity/HighCoupon.java
  7. 6
      hai-service/src/main/java/com/hai/order/service/impl/OrderCreateHandleServiceImpl.java
  8. 5
      hai-service/src/main/java/com/hai/order/service/impl/OrderPaySuccessServiceImpl.java
  9. 2
      hai-service/src/main/java/com/hai/service/impl/OutRechargeOrderServiceImpl.java

@ -247,7 +247,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 {
@ -258,6 +258,7 @@ public class EtcCustomerController {
map.put("userId", userInfoModel.getSecUser().getId());
map.put("vehPlateNo", vehPlateNo);
map.put("custId", custId);
List<EtcCarMsg> list = etcCarMsgService.getEtcCarList(map);

@ -149,6 +149,7 @@ public class AuthConfig implements WebMvcConfigurer {
.excludePathPatterns("/highThirdParty/*")
.excludePathPatterns("/group/*")
.excludePathPatterns("/couponCodeOther/*")
.excludePathPatterns("/etcCustomer/getEquity")
;
}

@ -8,16 +8,13 @@ import com.hai.common.security.SessionObject;
import com.hai.common.security.UserCenter;
import com.hai.common.utils.ResponseMsgUtil;
import com.hai.config.EtcService;
import com.hai.entity.EtcCarMsg;
import com.hai.entity.EtcContractOrder;
import com.hai.entity.EtcCustMsg;
import com.hai.entity.SecDictionary;
import com.hai.entity.*;
import com.hai.etc.EtcCarMsgService;
import com.hai.etc.EtcCustMsgService;
import com.hai.model.HighUserModel;
import com.hai.model.ResponseData;
import com.hai.model.UserInfoModel;
import com.hai.service.CommonService;
import com.hai.service.*;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.slf4j.Logger;
@ -44,6 +41,15 @@ public class EtcCustomerController {
@Resource
private EtcCarMsgService etcCarMsgService;
@Resource
private SecConfigService secConfigService;
@Resource
private HighDiscountPackageService highDiscountPackageService;
@Resource
private HighDiscountPackageDetailsService highDiscountPackageDetailsService;
@RequestMapping(value = "/getEtcCarMsgList", method = RequestMethod.GET)
@ResponseBody
@ApiOperation(value = "查询车辆列表")
@ -241,12 +247,16 @@ public class EtcCustomerController {
@RequestParam(value = "type", required = true) Integer type) {
try {
EtcContractOrder contractOrder = etcCarMsgService.findContractOrderById(contractId);
if (contractOrder == null) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "订单不存在!");
}
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 {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, object.getString("errMsg"));
@ -310,6 +320,8 @@ public class EtcCustomerController {
public ResponseData signWithhold(@RequestBody JSONObject object, HttpServletRequest request) {
try {
System.out.println(object);
if (object.getString("custId") == null ||
object.getString("cardNo") == null ||
object.getInteger("bankCardType") == null ||
@ -339,7 +351,40 @@ public class EtcCustomerController {
}
}
@RequestMapping(value = "/getEquity", method = RequestMethod.POST)
@ResponseBody
@ApiOperation(value = "获取权益")
public ResponseData getEquity() {
try {
// 查询赠送优惠券
SecConfig secConfig = secConfigService.findByCodeType("GIVE_DISCOUNT_PACKAGE");
// 获取卡券数量
String[] discountPackageId = secConfig.getCodeValue().split(",");
List<JSONObject> list = new ArrayList<>();
for (String id : discountPackageId) {
JSONObject jsonObject = new JSONObject();
HighDiscountPackage discountPackage = highDiscountPackageService.findDiscountPackageById(Integer.valueOf(id));
if (discountPackage != null) {
jsonObject.put("packageDetail", discountPackage);
// 查询包内的优惠券
List<HighDiscountPackageDetails> detailsList = highDiscountPackageDetailsService.getDetailByPackage(Integer.valueOf(id));
jsonObject.put("discountList", detailsList);
list.add(jsonObject);
}
}
return ResponseMsgUtil.success(list);
} catch (Exception e) {
log.error("HighUserController --> findByUserId() error!", e);
return ResponseMsgUtil.exception(e);
}
}
}

@ -44,7 +44,7 @@ public class EtcSchedule {
* @Date 14:18 2022/5/31
* @Param []
*/
@Scheduled(cron = "0 0/10 * * * ?") //每10分钟执行一次
@Scheduled(cron = "0 0/2 * * * ?") //每10分钟执行一次
public void getEtcCarList() {
try {
@ -70,7 +70,7 @@ public class EtcSchedule {
}
@Scheduled(cron = "0 0/60 * * * ?") //每60分钟执行一次
@Scheduled(cron = "0 0/10 * * * ?") //每60分钟执行一次
public void etcCarMsg() {
try {

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

@ -143,7 +143,8 @@ public class HighCoupon extends HighCouponModel implements Serializable {
private Integer displayArea;
/**
* 卡券来源1.中石化 2.消费券 3.其他 4贵州中石化 5: 预发码 6停车券
* 卡券来源1.中石化 2.消费券 3.其他 4贵州中石化 5: 预发码 6停车券 7 四川中石油 8贵州中石油 9ETC中石油 10中油优途中石油
*
*/
private Integer couponSource;

@ -1335,12 +1335,14 @@ public class OrderCreateHandleServiceImpl implements OrderCreateHandleService {
}
@Override
public HighChildOrder etcUser(HighOrder order, CreateOrderChildModel createOrderChildModel) throws Exception {
public HighChildOrder etcUser(HighOrder order, CreateOrderChildModel createOrderChildModel) {
HighChildOrder childOrder = new HighChildOrder();
childOrder.setOrderNo(order.getOrderNo());
childOrder.setMemId(order.getMemId());
childOrder.setMemName(order.getMemName());
childOrder.setMemPhone(order.getMemPhone());
childOrder.setSkuId(createOrderChildModel.getSkuId());
childOrder.setChildOrderNo(OrderUtil.generateChildOrderNo());
childOrder.setGoodsType(OrderChildGoodsType.TYPE20.getNumber());
childOrder.setGoodsId(createOrderChildModel.getGoodsId());
@ -1356,7 +1358,7 @@ public class OrderCreateHandleServiceImpl implements OrderCreateHandleService {
childOrder.setTotalDeductionPrice(childOrder.getTotalPrice().subtract(childOrder.getTotalActualPrice()));
childOrder.setPraiseStatus(0);
childOrder.setCreateTime(new Date());
return childOrder;
}
}

@ -816,11 +816,8 @@ public class OrderPaySuccessServiceImpl implements OrderPaySuccessService {
carMsg.setPayStatus(2);
etcCarMsgService.updateEtcCar(carMsg);
// 查询赠送优惠券
SecConfig secConfig = secConfigService.findByCodeType("GIVE_DISCOUNT_PACKAGE");
// 赠送优惠券
highDiscountPackageService.giveAway(Long.parseLong(secConfig.getCodeValue()) , order.getMemPhone() , 2 , order.getMemId().toString());
highDiscountPackageService.giveAway(order.getHighChildOrderList().get(0).getSkuId() , order.getMemPhone() , 2 , order.getMemId().toString());
}

@ -791,7 +791,7 @@ public class OutRechargeOrderServiceImpl implements OutRechargeOrderService {
object.put("orderNo" , childOrder.getOrderNo());
JSONObject jsonObject = RechargeConfig.checkOrderByJn(object);
childOrder.setExt3("畅停查询"+ jsonObject);
childOrder.setExt3("简牛查询"+ jsonObject);
if (jsonObject.getJSONObject("data") != null) {
JSONObject objectData= jsonObject.getJSONObject("data");
// // 10充值中 20充值完成 -10 充值失败

Loading…
Cancel
Save