提交代码

dev-discount
胡锐 2 years ago
parent c0b4ed31f2
commit b8d184734f
  1. 14
      hai-cweb/src/main/java/com/cweb/controller/pay/UnionPayController.java
  2. 13
      hai-schedule/src/main/java/com/hai/schedule/HighGasSchedule.java
  3. 20
      hai-service/src/main/java/com/hai/service/impl/HighOrderServiceImpl.java
  4. 13
      hai-service/src/main/java/com/hai/service/pay/impl/GoodsOrderServiceImpl.java

@ -17,6 +17,7 @@ import com.hai.dao.HighUserCouponMapper;
import com.hai.entity.*; import com.hai.entity.*;
import com.hai.enum_type.MerStoreAmountSourceTypeEnum; import com.hai.enum_type.MerStoreAmountSourceTypeEnum;
import com.hai.enum_type.MerStoreAmountTypeEnum; import com.hai.enum_type.MerStoreAmountTypeEnum;
import com.hai.enum_type.MerchantStoreSourceType;
import com.hai.enum_type.OrderPushType; import com.hai.enum_type.OrderPushType;
import com.hai.model.HighMerchantStoreModel; import com.hai.model.HighMerchantStoreModel;
import com.hai.model.ResponseData; import com.hai.model.ResponseData;
@ -118,6 +119,9 @@ public class UnionPayController {
@Resource @Resource
private ApiMemberProductService apiMemberProductService; private ApiMemberProductService apiMemberProductService;
@Resource
private ShellGroupService shellGroupService;
@RequestMapping(value = "/notify", method = RequestMethod.POST) @RequestMapping(value = "/notify", method = RequestMethod.POST)
@ApiOperation(value = "银联支付 -> 异步回调") @ApiOperation(value = "银联支付 -> 异步回调")
public void notify(@RequestBody String params,HttpServletRequest request, HttpServletResponse response) { public void notify(@RequestBody String params,HttpServletRequest request, HttpServletResponse response) {
@ -343,6 +347,16 @@ public class UnionPayController {
if (orderPushObject != null && orderPushObject.getString("code").equals("200")) { if (orderPushObject != null && orderPushObject.getString("code").equals("200")) {
highChildOrder.setGasOrderNo(orderPushObject.getJSONObject("result").getString("orderNo")); highChildOrder.setGasOrderNo(orderPushObject.getJSONObject("result").getString("orderNo"));
} }
} else if (store.getSourceType().equals(MerchantStoreSourceType.type3.getNumber())) {
// 推送壳牌
JSONObject syncPayment = shellGroupService.gasSyncPayment(order.getOrderNo(),
store.getStoreKey(),
order.getPayTime(),
highChildOrder.getGasPriceGun(),
highChildOrder.getGasOilNo(),
highChildOrder.getGasGunNo(),
order.getTotalPrice());
} }
} }
if (highChildOrder.getGoodsType() == 4 || highChildOrder.getGoodsType() == 9) { if (highChildOrder.getGoodsType() == 4 || highChildOrder.getGoodsType() == 9) {

@ -12,10 +12,7 @@ import com.hai.entity.HighMerchantStore;
import com.hai.enum_type.GasOilPriceStatusEnum; import com.hai.enum_type.GasOilPriceStatusEnum;
import com.hai.model.HighMerchantModel; import com.hai.model.HighMerchantModel;
import com.hai.model.HighMerchantStoreModel; import com.hai.model.HighMerchantStoreModel;
import com.hai.service.HighGasOilPriceOfficialService; import com.hai.service.*;
import com.hai.service.HighGasOilPriceService;
import com.hai.service.HighMerchantService;
import com.hai.service.HighMerchantStoreService;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import org.springframework.beans.BeanUtils; import org.springframework.beans.BeanUtils;
@ -42,6 +39,9 @@ public class HighGasSchedule {
@Resource @Resource
private HighGasOilPriceOfficialService gasOilPriceOfficialService; private HighGasOilPriceOfficialService gasOilPriceOfficialService;
@Resource
private HighGasService gasService;
@Scheduled(cron = "0 0 1 * * ?") //每日凌晨1点执行一次 @Scheduled(cron = "0 0 1 * * ?") //每日凌晨1点执行一次
public void certification() throws Exception { public void certification() throws Exception {
HighMerchantModel merchant = highMerchantService.getMerchantById(39L); HighMerchantModel merchant = highMerchantService.getMerchantById(39L);
@ -151,6 +151,11 @@ public class HighGasSchedule {
} }
} }
@Scheduled(cron = "0 1 0 * * ?") //每日凌晨12点01分执行一次
public void getJiaHaoYouAllStation() throws Exception {
gasService.getJiaHaoYouAllStation();
}
/* @Scheduled(cron = "0 30 7 * * ?") //每日7点1分执行一次 /* @Scheduled(cron = "0 30 7 * * ?") //每日7点1分执行一次
public void refreshPriceOfficial() throws Exception { public void refreshPriceOfficial() throws Exception {
gasOilPriceOfficialService.refreshPriceOfficial(); gasOilPriceOfficialService.refreshPriceOfficial();

@ -749,6 +749,16 @@ public class HighOrderServiceImpl implements HighOrderService {
if (orderPushObject != null && orderPushObject.getString("code").equals("200")) { if (orderPushObject != null && orderPushObject.getString("code").equals("200")) {
highChildOrder.setGasOrderNo(orderPushObject.getJSONObject("result").getString("orderNo")); highChildOrder.setGasOrderNo(orderPushObject.getJSONObject("result").getString("orderNo"));
} }
} else if (store.getSourceType().equals(MerchantStoreSourceType.type3.getNumber())) {
// 推送壳牌
JSONObject syncPayment = shellGroupService.gasSyncPayment(order.getOrderNo(),
store.getStoreKey(),
order.getPayTime(),
highChildOrder.getGasPriceGun(),
highChildOrder.getGasOilNo(),
highChildOrder.getGasGunNo(),
order.getTotalPrice());
} }
} }
@ -1054,6 +1064,16 @@ public class HighOrderServiceImpl implements HighOrderService {
if (orderPushObject != null && orderPushObject.getString("code").equals("200")) { if (orderPushObject != null && orderPushObject.getString("code").equals("200")) {
highChildOrder.setGasOrderNo(orderPushObject.getJSONObject("result").getString("orderNo")); highChildOrder.setGasOrderNo(orderPushObject.getJSONObject("result").getString("orderNo"));
} }
} else if (store.getSourceType().equals(MerchantStoreSourceType.type3.getNumber())) {
// 推送壳牌
JSONObject syncPayment = shellGroupService.gasSyncPayment(order.getOrderNo(),
store.getStoreKey(),
order.getPayTime(),
highChildOrder.getGasPriceGun(),
highChildOrder.getGasOilNo(),
highChildOrder.getGasGunNo(),
order.getTotalPrice());
} }
} }

@ -128,6 +128,9 @@ public class GoodsOrderServiceImpl implements PayService {
@Resource @Resource
private HighGasChannelConfigService gasChannelConfigService; private HighGasChannelConfigService gasChannelConfigService;
@Resource
private ShellGroupService shellGroupService;
@Override @Override
@Transactional(propagation= Propagation.REQUIRES_NEW) @Transactional(propagation= Propagation.REQUIRES_NEW)
public void paySuccess(Map<String, String> map, String payType) throws Exception { public void paySuccess(Map<String, String> map, String payType) throws Exception {
@ -336,6 +339,16 @@ public class GoodsOrderServiceImpl implements PayService {
if (orderPushObject != null && orderPushObject.getString("code").equals("200")) { if (orderPushObject != null && orderPushObject.getString("code").equals("200")) {
highChildOrder.setGasOrderNo(orderPushObject.getJSONObject("result").getString("orderNo")); highChildOrder.setGasOrderNo(orderPushObject.getJSONObject("result").getString("orderNo"));
} }
} else if (store.getSourceType().equals(MerchantStoreSourceType.type3.getNumber())) {
// 推送壳牌
JSONObject syncPayment = shellGroupService.gasSyncPayment(order.getOrderNo(),
store.getStoreKey(),
order.getPayTime(),
highChildOrder.getGasPriceGun(),
highChildOrder.getGasOilNo(),
highChildOrder.getGasGunNo(),
order.getTotalPrice());
} }
} }

Loading…
Cancel
Save