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

new-dev
胡锐 1 year ago
commit b1d3fc07c9
  1. 2
      hai-bweb/src/main/java/com/bweb/controller/HighGasController.java
  2. 2
      hai-bweb/src/main/java/com/bweb/controller/HighTestController.java
  3. 7
      hai-cweb/src/main/java/com/cweb/controller/HighGasController.java
  4. 5
      hai-order/src/main/java/com/web/controller/OrderPayController.java
  5. 3
      hai-service/src/main/java/com/hai/dao/HighGasOilPriceMapperExt.java
  6. 4
      hai-service/src/main/java/com/hai/order/service/impl/OrderCreateHandleServiceImpl.java
  7. 2
      hai-service/src/main/java/com/hai/service/HighGasOilPriceService.java
  8. 6
      hai-service/src/main/java/com/hai/service/impl/HighCouponAgentServiceImpl.java
  9. 6
      hai-service/src/main/java/com/hai/service/impl/HighCouponCodeServiceImpl.java
  10. 7
      hai-service/src/main/java/com/hai/service/impl/HighDiscountAgentCodeServiceImpl.java
  11. 4
      hai-service/src/main/java/com/hai/service/impl/HighGasOilPriceServiceImpl.java
  12. 7
      hai-service/src/main/resources/prod-9401/commonConfig.properties
  13. 7
      hai-service/src/main/resources/prod/commonConfig.properties

@ -666,7 +666,7 @@ public class HighGasController {
if (StringUtils.isBlank(storeName)) {
storeName = null;
}
List<Map<String, Object>> storeList = highGasOilPriceService.getStoreListByOilNo(storeName,regionId, oilNoName);
List<Map<String, Object>> storeList = highGasOilPriceService.getStoreListByOilNo(storeName,regionId, oilNoName , null);
for (Map<String, Object> store : storeList) {
double distance = CoordCommonUtil.getDistance(Double.valueOf(store.get("latitude").toString()), Double.valueOf(store.get("longitude").toString()), Double.valueOf(latitude), Double.valueOf(longitude));
store.put("distance", Math.round(distance/100d)/10d);

File diff suppressed because one or more lines are too long

@ -77,6 +77,7 @@ public class HighGasController {
@ApiOperation(value = "查询加油站列表")
public ResponseData getGasStoreList(@RequestParam(name = "isTyAgent", required = false) Boolean isTyAgent,
@RequestParam(name = "storeName", required = false) String storeName,
@RequestParam(name = "sourceType", required = false) Integer sourceType,
@RequestParam(name = "distance", required = true) Integer distanceRecent,
@RequestParam(name = "regionId", required = true) Long regionId,
@RequestParam(name = "oilNoName", required = true) String oilNoName,
@ -86,12 +87,16 @@ public class HighGasController {
@RequestParam(name = "pageSize", required = true) Integer pageSize
) {
try {
String type = "1,2,3,4,5,6";
if (StringUtils.isBlank(storeName)) {
storeName = null;
}
if (sourceType != null && sourceType.equals(7)) {
type = "7";
}
SecRegion region = commonService.getParentByRegion(regionId);
if (region != null) {
List<Map<String, Object>> storeList = highGasOilPriceService.getStoreListByOilNo(storeName,region.getRegionId(), oilNoName);
List<Map<String, Object>> storeList = highGasOilPriceService.getStoreListByOilNo(storeName,region.getRegionId(), oilNoName , type);
for (Map<String, Object> store : storeList) {
if (MapUtils.getInteger(store, "source_type").equals(1)) {
if (StringUtils.isNotBlank(MapUtils.getString(store, "store_logo"))) {

@ -141,7 +141,6 @@ public class OrderPayController {
// 微信支付
String nonce_str = MD5Util.MD5Encode(String.valueOf(ThreadLocalRandom.current().nextInt(10000)), "UTF-8");
int total_fee = order.getPayPrice().multiply(new BigDecimal("100")).intValue();
BigDecimal totalAmount = order.getPayPrice();
WeChatPayReqInfo weChatPayReqInfo = new WeChatPayReqInfo();
weChatPayReqInfo.setAppid(SysConst.getSysConfig().getWxPayMchAppId()); // 公众号id
weChatPayReqInfo.setMch_id(SysConst.getSysConfig().getWxPayMchId()); // 商户号
@ -327,8 +326,6 @@ public class OrderPayController {
profitSharing = gasChannelConfig.getProfitSharingStatus().equals(true) ? "Y" : "N";
} else if (store.getSourceType().equals(MerchantStoreSourceType.type7.getNumber())) {
totalAmount = order.getTotalPrice();
// 查询支付配置
HighGasChannelConfig gasChannelConfig = gasChannelConfigService.getConfig(GasChannel.type7);
if (gasChannelConfig == null) {
@ -397,7 +394,7 @@ public class OrderPayController {
objectGas.put("outTradeNo" , order.getOrderNo());
objectGas.put("transType" , "JSAPI");
objectGas.put("payMode" , "WECHAT");
objectGas.put("totalAmount" , totalAmount);
objectGas.put("totalAmount" , order.getPayPrice());
objectGas.put("profitSharing" , 0);
objectGas.put("notifyUrl" , SysConst.getSysConfig().getHuiPayNotify());
objectGas.put("subject" , orderTitle);

@ -36,8 +36,9 @@ public interface HighGasOilPriceMapperExt {
" AND b.longitude is not null" +
" AND b.latitude is not null" +
"<if test='storeName != null'> and b.store_name like '%${storeName}%'</if>" +
"<if test='sourceType != null'> and b.source_type in (${sourceType})</if>" +
" </script>" )
List<Map<String,Object>> selectStoreListByOilNo(@Param("storeName") String storeName, @Param("regionId") Long regionId, @Param("oilNoName") String oilNoName);
List<Map<String,Object>> selectStoreListByOilNo(@Param("storeName") String storeName, @Param("regionId") Long regionId, @Param("oilNoName") String oilNoName, @Param("sourceType") String sourceType);
@Select({" SELECT a.store_key storeKey,ROUND((st_distance_sphere(point(a.longitude, a.latitude) , point(${longitude},${latitude}))/1000),2) as distance" +

@ -198,7 +198,7 @@ public class OrderCreateHandleServiceImpl implements OrderCreateHandleService {
String childOrderNo = OrderUtil.generateChildOrderNo();
// 如果不是来源不是贵州中石化,需要校验库存
if (!coupon.getCouponSource().equals(4) && !coupon.getCouponSource().equals(5) && !coupon.getCouponSource().equals(6)) {
if (!coupon.getCouponSource().equals(4) && !coupon.getCouponSource().equals(5) && !coupon.getCouponSource().equals(6) && !coupon.getCouponSource().equals(7)) {
if (couponService.assignOrderStock(coupon.getId(), childOrderNo) == null) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "库存不足");
}
@ -576,7 +576,7 @@ public class OrderCreateHandleServiceImpl implements OrderCreateHandleService {
if (store.getSourceType() == 7 ){
HighOilCardOrder oilCardOrder = new HighOilCardOrder();
oilCardOrder.setPrice(createOrderChild.getGoodsPrice());
oilCardOrder.setPrice(priceModel.getPayPrice());
oilCardOrder.setCardNo(createOrderChild.getOilCardNo());
oilCardOrder.setOrderNo(createOrderModel.getOrderNo());
oilCardOrder.setThirdOrderNo("HF" + OrderUtil.generateOrderNo());

@ -49,7 +49,7 @@ public interface HighGasOilPriceService {
* @param oilNoName
* @return
*/
List<Map<String,Object>> getStoreListByOilNo(String storeName,Long regionId, String oilNoName);
List<Map<String,Object>> getStoreListByOilNo(String storeName,Long regionId, String oilNoName , String sourceType);
/**
* 查询最近的油站

@ -379,13 +379,17 @@ public class HighCouponAgentServiceImpl implements HighCouponAgentService {
String data = ScPetroConfig.decrypt(jsonObject.getString("biz_content"));
JSONObject object = JSONObject.parseObject(data);
Object ticketList = object.getJSONArray("ticket_list").get(0);
JSONObject ticketListObject = (JSONObject) ticketList;;
HighCouponCodeOther couponCodeOther = new HighCouponCodeOther();
couponCodeOther.setType(5);
couponCodeOther.setCouponAgentCodeId(couponAgentCodeId);
couponCodeOther.setCouTypeCode(object.getString("request_code"));
couponCodeOther.setCouNo(object.getString("ticket_num"));
couponCodeOther.setCouNo(ticketListObject.getString("ticket_num"));
couponCodeOther.setActiveTime(new Date());
couponCodeOther.setValidStartDate(new Date());
couponCodeOther.setValidEndDate(coupon.getSalesEndTime());
couponCodeOther.setStatus(20);
couponCodeOther.setCreateTime(new Date());
couponCodeOtherService.insertCouponCodeOther(couponCodeOther);

@ -537,14 +537,18 @@ public class HighCouponCodeServiceImpl implements HighCouponCodeService {
String data = ScPetroConfig.decrypt(jsonObject.getString("biz_content"));
JSONObject object = JSONObject.parseObject(data);
Object ticketList = object.getJSONArray("ticket_list").get(0);
JSONObject ticketListObject = (JSONObject) ticketList;;
HighCouponCodeOther couponCodeOther = new HighCouponCodeOther();
couponCodeOther.setType(5);
couponCodeOther.setOrderId(order.getId());
couponCodeOther.setChildOrderId(childOrder.getId());
couponCodeOther.setCouTypeCode(object.getString("request_code"));
couponCodeOther.setCouNo(object.getString("ticket_num"));
couponCodeOther.setCouNo(ticketListObject.getString("ticket_num"));
couponCodeOther.setActiveTime(new Date());
couponCodeOther.setValidStartDate(new Date());
couponCodeOther.setValidEndDate(coupon.getSalesEndTime());
couponCodeOther.setStatus(20);
couponCodeOther.setCreateTime(new Date());
couponCodeOtherService.insertCouponCodeOther(couponCodeOther);

@ -319,14 +319,17 @@ public class HighDiscountAgentCodeServiceImpl implements HighDiscountAgentCodeSe
String data = ScPetroConfig.decrypt(preSendCoupon.getString("biz_content"));
JSONObject object = JSONObject.parseObject(data);
Object ticketList = object.getJSONArray("ticket_list").get(0);
JSONObject ticketListObject = (JSONObject) ticketList;;
HighCouponCodeOther couponCodeOther = new HighCouponCodeOther();
couponCodeOther.setType(3);
couponCodeOther.setDiscountAgentCodeId(discountAgentCode.getId());
couponCodeOther.setCouTypeCode(object.getString("request_code"));
couponCodeOther.setCouNo(object.getString("ticket_num"));
couponCodeOther.setCouNo(ticketListObject.getString("ticket_num"));
couponCodeOther.setActiveTime(new Date());
couponCodeOther.setValidStartDate(new Date());
couponCodeOther.setValidEndDate(discount.getSalesEndTime());
couponCodeOther.setStatus(20);
couponCodeOther.setCreateTime(new Date());
highCouponCodeOtherMapper.insert(couponCodeOther);

@ -56,8 +56,8 @@ public class HighGasOilPriceServiceImpl implements HighGasOilPriceService {
}
@Override
public List<Map<String,Object>> getStoreListByOilNo(String storeName,Long regionId, String oilNoName) {
return highGasOilPriceMapper.selectStoreListByOilNo(storeName,regionId,oilNoName);
public List<Map<String,Object>> getStoreListByOilNo(String storeName,Long regionId, String oilNoName , String sourceType) {
return highGasOilPriceMapper.selectStoreListByOilNo(storeName,regionId,oilNoName , sourceType);
}
@Override

@ -128,3 +128,10 @@ blxPostUrl=https://gateway.vf.bilinxing.com
diandianwPostUrl=http://www.diandianw.cn/youdianyou/
diandianwAppid=1016145002rmz7dkti3f5oqh1razswc0
diandianwAppSecret=msk48q5jinmpsfdgpcyryx6lhkoiii4s
groupCode = https://pay.dctpay.com/cweb?accountId=0001&key=
ScPetroUrl = http://43.136.176.177:8081/hd-api/out/
ScPetroAppid = 510000526745391907
ScPetroAppKey = 5100006xmbmM2NBpm5HXT
ScPetroAesKey = AueRgSEVwPg87ebYhbYvfxMM3XAkvimu

@ -134,3 +134,10 @@ blxPostUrl=https://gateway.vf.bilinxing.com
diandianwPostUrl=http://www.diandianw.cn/youdianyou/
diandianwAppid=1016145002rmz7dkti3f5oqh1razswc0
diandianwAppSecret=msk48q5jinmpsfdgpcyryx6lhkoiii4s
groupCode = https://pay.dctpay.com/cweb?accountId=0001&key=
ScPetroUrl = http://43.136.176.177:8081/hd-api/out/
ScPetroAppid = 510000526745391907
ScPetroAppKey = 5100006xmbmM2NBpm5HXT
ScPetroAesKey = AueRgSEVwPg87ebYhbYvfxMM3XAkvimu

Loading…
Cancel
Save