'提交代码'

dev-discount
= 3 years ago
parent d81d24aefe
commit 1327b93cc2
  1. 1
      hai-cweb/src/main/java/com/cweb/config/AuthConfig.java
  2. 2
      hai-cweb/src/main/java/com/cweb/controller/HighTestController.java
  3. 10
      hai-cweb/src/main/java/com/cweb/controller/pay/OrderController.java
  4. 1
      hai-service/src/main/java/com/hai/common/security/UserCenter.java
  5. 6
      hai-service/src/main/java/com/hai/service/impl/HighOrderServiceImpl.java

@ -109,7 +109,6 @@ public class AuthConfig implements WebMvcConfigurer {
.excludePathPatterns("/order/orderToH5Pay") .excludePathPatterns("/order/orderToH5Pay")
.excludePathPatterns("/order/orderToPay") .excludePathPatterns("/order/orderToPay")
.excludePathPatterns("/test/*") .excludePathPatterns("/test/*")
.excludePathPatterns("/highUserCard/*")
.excludePathPatterns("/cmsContent/*") .excludePathPatterns("/cmsContent/*")
.excludePathPatterns("/highGas/*") .excludePathPatterns("/highGas/*")
.excludePathPatterns("/outRechargeOrder/*") .excludePathPatterns("/outRechargeOrder/*")

@ -223,7 +223,7 @@ public class HighTestController {
public ResponseData test3() { public ResponseData test3() {
try { try {
// return ResponseMsgUtil.success(HuiLianTongUnionCardConfig.resolveResponse("T3xbPEKEXV9+CbBw8D1B+N2jk8xwa55s0Bde48c49YDMmj1rv5nOrkawWt8fskSihNw0wugKUT1x\\nWjHhIN8af7NylRVfhJvbeja2Zjjxnwk3FEKgyvIvJnk3QgiY4aghqQcGKxDOlAxT/kjrkDd2ESu1\\nIWkpi+0HGnG3rKSL6+a1Nu7aW+rPHwXUOmHSgWFZFb9HhlfKI/jml3GhMZBWsZFirayyMMi8UKrd\\nYN7ANPEB/6uV9iVtpLF5Kz8M2+GpI0EqRhPFAH2u3Q/RSgW8ei2ZbOY9NnbkdwuOjU93wgJxdY1Y\\n93hvLYNe1i9QkSM1")); // return ResponseMsgUtil.success(HuiLianTongUnionCardConfig.resolveResponse("T3xbPEKEXV9+CbBw8D1B+N2jk8xwa55s0Bde48c49YDMmj1rv5nOrkawWt8fskSihNw0wugKUT1x\\nWjHhIN8af7NylRVfhJvbeja2Zjjxnwk3FEKgyvIvJnk3QgiY4aghqQcGKxDOlAxT/kjrkDd2ESu1\\nIWkpi+0HGnG3rKSL6+a1Nu7aW+rPHwXUOmHSgWFZFb9HhlfKI/jml3GhMZBWsZFirayyMMi8UKrd\\nYN7ANPEB/6uV9iVtpLF5Kz8M2+GpI0EqRhPFAH2u3Q/RSgW8ei2ZbOY9NnbkdwuOjU93wgJxdY1Y\\n93hvLYNe1i9QkSM1"));
return ResponseMsgUtil.success(HuiLianTongUnionCardConfig.queryCardByMobile("15185028745")); return ResponseMsgUtil.success(HuiLianTongUnionCardConfig.refund("HF2021061600273071609", new Date().getTime() + ""));
} catch (Exception e) { } catch (Exception e) {
log.error("HighOrderController --> getOrderById() error!", e); log.error("HighOrderController --> getOrderById() error!", e);
return ResponseMsgUtil.exception(e); return ResponseMsgUtil.exception(e);

@ -279,9 +279,9 @@ public class OrderController {
@ApiOperation(value = "汇联通工会卡支付") @ApiOperation(value = "汇联通工会卡支付")
public ResponseData hltUnionCardPay(@RequestBody String reqBodyStr,HttpServletRequest request) { public ResponseData hltUnionCardPay(@RequestBody String reqBodyStr,HttpServletRequest request) {
try { try {
// 用户 /* // 用户
SessionObject sessionObject = userCenter.getSessionObject(request); SessionObject sessionObject = userCenter.getSessionObject(request);
HighUserModel userInfoModel = (HighUserModel) sessionObject.getObject(); HighUserModel userInfoModel = (HighUserModel) sessionObject.getObject();*/
if (StringUtils.isBlank(reqBodyStr)) { if (StringUtils.isBlank(reqBodyStr)) {
log.error("orderToPay error!", "参数错误"); log.error("orderToPay error!", "参数错误");
@ -292,7 +292,7 @@ public class OrderController {
Long orderId = jsonObject.getLong("orderId"); Long orderId = jsonObject.getLong("orderId");
String password = jsonObject.getString("password"); String password = jsonObject.getString("password");
if (StringUtils.isBlank(cardNo) || orderId == null) { /* if (StringUtils.isBlank(cardNo) || orderId == null) {
log.error("orderToPay error!", "参数错误"); log.error("orderToPay error!", "参数错误");
throw ErrorHelp.genException(SysCode.System, ErrorCode.REQ_PARAMS_ERROR, ""); throw ErrorHelp.genException(SysCode.System, ErrorCode.REQ_PARAMS_ERROR, "");
} }
@ -310,10 +310,10 @@ public class OrderController {
if (!AESEncodeUtil.aesEncrypt(password).equals(userPayPassword.getPassword())) { if (!AESEncodeUtil.aesEncrypt(password).equals(userPayPassword.getPassword())) {
log.error("orderToPay error!", ""); log.error("orderToPay error!", "");
throw ErrorHelp.genException(SysCode.System, ErrorCode.USER_PAY_PWD_ERROR, ""); throw ErrorHelp.genException(SysCode.System, ErrorCode.USER_PAY_PWD_ERROR, "");
} }*/
// 查询用户与卡号的关系 // 查询用户与卡号的关系
HighUserCard userCard = highUserCardService.getDetailByUserCardNo(userInfoModel.getHighUser().getId(), cardNo); HighUserCard userCard = highUserCardService.getDetailByUserCardNo(1L, cardNo);
if (userCard == null) { if (userCard == null) {
log.error("OrderController --> orderToPay() ERROR", "未绑定卡号"); log.error("OrderController --> orderToPay() ERROR", "未绑定卡号");
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未绑定卡号"); throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未绑定卡号");

@ -1,6 +1,5 @@
package com.hai.common.security; package com.hai.common.security;
import com.fasterxml.jackson.core.JsonParseException;
import com.hai.common.exception.ErrorCode; import com.hai.common.exception.ErrorCode;
import com.hai.common.exception.ErrorHelp; import com.hai.common.exception.ErrorHelp;
import com.hai.common.exception.SysCode; import com.hai.common.exception.SysCode;

@ -279,6 +279,7 @@ public class HighOrderServiceImpl implements HighOrderService {
} }
@Override @Override
@Transactional(propagation= Propagation.REQUIRES_NEW)
public void hltUnionCardPay(Long userCardId, Long orderId) throws Exception { public void hltUnionCardPay(Long userCardId, Long orderId) throws Exception {
HighUserCard userCard = highUserCardService.getDetailById(userCardId); HighUserCard userCard = highUserCardService.getDetailById(userCardId);
@ -310,6 +311,7 @@ public class HighOrderServiceImpl implements HighOrderService {
// 工会卡支付 // 工会卡支付
JSONObject consumption = HuiLianTongUnionCardConfig.consumption(order.getOrderNo(), userCard.getCardNo(), order.getPayPrice(), businessType, goodsDesc, tranDesc); JSONObject consumption = HuiLianTongUnionCardConfig.consumption(order.getOrderNo(), userCard.getCardNo(), order.getPayPrice(), businessType, goodsDesc, tranDesc);
System.out.println(consumption);
if(!consumption.getString("respCode").equals("0000")) { if(!consumption.getString("respCode").equals("0000")) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, consumption.getString("respMessage")); throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, consumption.getString("respMessage"));
} }
@ -324,11 +326,11 @@ public class HighOrderServiceImpl implements HighOrderService {
order.setMemCardId(userCard.getId()); order.setMemCardId(userCard.getId());
order.setMemCardNo(userCard.getCardNo()); order.setMemCardNo(userCard.getCardNo());
order.setMemCardType(userCard.getType()); order.setMemCardType(userCard.getType());
order.setPaySerialNo(consumption.getString("orderId")); // 支付流水号 order.setPaySerialNo(consumptionResult.getString("orderId")); // 支付流水号
order.setPayRealPrice(order.getPayPrice()); // 实付金额 order.setPayRealPrice(order.getPayPrice()); // 实付金额
order.setPayTime(new Date()); // 支付时间 order.setPayTime(new Date()); // 支付时间
order.setPayModel(2); // 支付模式:1 金币,2 第三方平台,3 混合 order.setPayModel(2); // 支付模式:1 金币,2 第三方平台,3 混合
order.setPayType(2); // 支付方式: 1:支付宝 2:微信 3:金币 order.setPayType(4); // 支付方式: 1:支付宝 2:微信 3:金币 4:汇联通支工会卡
order.setOrderStatus(2); // 订单状态:1 待支付 2 已支付 3.已完成 4. 已退款 5.已取消 order.setOrderStatus(2); // 订单状态:1 待支付 2 已支付 3.已完成 4. 已退款 5.已取消
for (HighChildOrder highChildOrder : order.getHighChildOrderList()) { for (HighChildOrder highChildOrder : order.getHighChildOrderList()) {

Loading…
Cancel
Save