提交代码

dev-discount
袁野 3 years ago
parent 7a9fe9cb8f
commit 6127d31e2c
  1. 2
      hai-cweb/src/main/java/com/cweb/config/AuthConfig.java
  2. 13
      hai-cweb/src/main/java/com/cweb/controller/OutRechargeOrderController.java
  3. 9
      hai-cweb/src/main/java/com/cweb/controller/OutRechargePriceController.java
  4. 8
      hai-cweb/src/main/java/com/cweb/controller/pay/CzOrderController.java
  5. 4
      hai-service/src/main/java/com/hai/service/impl/OutRechargePriceServiceImpl.java

@ -132,6 +132,8 @@ public class AuthConfig implements WebMvcConfigurer {
.excludePathPatterns("/highGoodsType/*")
.excludePathPatterns("/sendSms/*")
.excludePathPatterns("/sms/*")
.excludePathPatterns("/outRechargePrice/*")
.excludePathPatterns("/czOrder/*")
;
}

@ -69,7 +69,7 @@ public class OutRechargeOrderController {
private HighOrderService highOrderService;
@Resource
private TelApiService telApiService;
private OutRechargePriceService outRechargePriceService;
@Resource
private WechatPayUtil wechatPayUtil;
@ -124,14 +124,6 @@ public class OutRechargeOrderController {
// 判断充值模式:1 电信 2. 移动 3. 联通
// 拼接内容
remarks = outRechargeOrder.getRechargeContent() + "充值" + outRechargeOrder.getOrderPrice() + "元";
// JSONObject telObject = telApiService.outApiTel(outRechargeOrder.getRechargeContent());
// if (telObject.get("status").equals(0)) {
// JSONObject o = telObject.getObject("result",JSONObject.class);
//
// } else {
// log.error("orderToPay error!");
// throw ErrorHelp.genException(SysCode.System, ErrorCode.PHONE_NUM_IS_ERROR);
// }
HighDiscountUserRel highDiscountUserRel = null;
if (outRechargeOrder.getMemDiscountId() != null) {
@ -195,6 +187,8 @@ public class OutRechargeOrderController {
}
}
OutRechargePrice outRechargePrice = outRechargePriceService.findById(outRechargeOrder.getObjectId().longValue());
HighUserCard highUserCard = highUserCardService.getUserHtlCardNo(userInfoModel.getHighUser().getId());
if (highUserCard != null) {
outRechargeOrder.setIdCard(highUserCard.getCardNo());
@ -204,6 +198,7 @@ public class OutRechargeOrderController {
outRechargeOrder.setOrderNo("CZ" + DateUtil.date2String(new Date(),"yyyyMMddHHmmss") + IDGenerator.nextId(5));
outRechargeOrder.setUserId(userInfoModel.getHighUser().getId());
outRechargeOrder.setUserName(userInfoModel.getHighUser().getName());
outRechargeOrder.setRechargeType(outRechargePrice.getRechargeType());
outRechargeOrder.setUserPhone(userInfoModel.getHighUser().getPhone());
outRechargeOrder.setCreateTimed(new Date());

@ -36,7 +36,7 @@ import java.util.List;
import java.util.Map;
@Controller
@RequestMapping(value = "/outRechargePrice")
@RequestMapping(value = "/outRechargePrice")
@Api(value = "查询充值金额接口")
public class OutRechargePriceController {
@ -60,7 +60,8 @@ public class OutRechargePriceController {
public ResponseData getListOutRechargePrice(
@RequestParam(value = "type", required = false) Integer type,
@RequestParam(name = "regionId", required = true) String regionId,
@RequestParam(name = "showType", required = true) Integer showType
@RequestParam(name = "showType", required = true) Integer showType,
@RequestParam(name = "rechargeType", required = true) Integer rechargeType
) {
try {
Map<String, String> map = new HashMap<>();
@ -75,6 +76,10 @@ public class OutRechargePriceController {
map.put("showType", String.valueOf(showType));
}
if (type != null ) {
map.put("rechargeType", String.valueOf(rechargeType));
}
if (type != null ) {
map.put("type", String.valueOf(type));
}

@ -39,8 +39,6 @@ public class CzOrderController {
@Resource
private OutRechargeOrderService outRechargeOrderService;
@RequestMapping(value = "/orderRefundNotify", method = RequestMethod.POST)
@ApiOperation(value = "退款回调")
@ResponseBody
@ -58,15 +56,15 @@ public class CzOrderController {
highGasOrderRefundMapper.insert(highGasOrderRefund);
// 查询订单
OutRechargeOrder order = outRechargeOrderService.findByOrderNo(object.getString("orderNumber"));
OutRechargeOrder order = outRechargeOrderService.findByOrderNo(object.getString("out_order_id"));
// 订单状态 : 1.待支付 2.已支付 3.已完成 4.已取消 5.已退款 6.充值失败
if (order != null && order.getStatus() == 5) {
// 退单结果 true:成功 false:失败
if (object.getInteger("rechargeState") == 1 && order != null) {
if (object.getInteger("status") == 3) {
order.setStatus(3);
outRechargeOrderService.updateOrder(order);
} else if (object.getInteger("rechargeState") == 0 && order != null) {
} else if (object.getInteger("rechargeState") == 4) {
order.setStatus(6);
outRechargeOrderService.updateOrder(order);
}

@ -52,6 +52,10 @@ public class OutRechargePriceServiceImpl implements OutRechargePriceService {
if (StringUtils.isNotBlank(map.get("companyId"))) {
criteria.andCompanyIdEqualTo(Long.valueOf(map.get("companyId")));
}
if (StringUtils.isNotBlank(map.get("rechargeType"))) {
criteria.andRechargeTypeEqualTo(Integer.valueOf(map.get("rechargeType")));
}
example.setOrderByClause("sort asc");
return outRechargePriceMapper.selectByExample(example);
}

Loading…
Cancel
Save