'提交代码'

dev-discount
= 3 years ago
parent bc51a9cfb4
commit 1b470f729f
  1. 92
      hai-cweb/src/main/java/com/cweb/config/SysConfig.java
  2. 9
      hai-cweb/src/main/java/com/cweb/controller/HighGasController.java
  3. 31
      hai-cweb/src/main/java/com/cweb/controller/HighOrderController.java
  4. 15
      hai-cweb/src/main/java/com/cweb/controller/HighTestController.java
  5. 4
      hai-cweb/src/main/resources/dev/config.properties
  6. 4
      hai-cweb/src/main/resources/prod/config.properties
  7. 9
      hai-service/pom.xml
  8. 39
      hai-service/src/main/java/com/hai/config/CommonSysConfig.java
  9. 19
      hai-service/src/main/java/com/hai/config/CommonSysConst.java
  10. 23
      hai-service/src/main/java/com/hai/config/ConfigListener.java
  11. 50
      hai-service/src/main/java/com/hai/config/TuanYouConfig.java
  12. 11
      hai-service/src/main/java/com/hai/dao/HighChildOrderMapper.java
  13. 28
      hai-service/src/main/java/com/hai/dao/HighChildOrderSqlProvider.java
  14. 32
      hai-service/src/main/java/com/hai/entity/HighChildOrder.java
  15. 120
      hai-service/src/main/java/com/hai/entity/HighChildOrderExample.java
  16. 6
      hai-service/src/main/java/com/hai/service/HighOrderService.java
  17. 5
      hai-service/src/main/java/com/hai/service/impl/HighOrderServiceImpl.java
  18. 31
      hai-service/src/main/java/com/hai/service/pay/impl/GoodsOrderServiceImpl.java
  19. 3
      hai-service/src/main/resources/dev/commonConfig.properties
  20. 3
      hai-service/src/main/resources/prod/commonConfig.properties

@ -17,10 +17,6 @@ public class SysConfig {
private String wxH5AppId; private String wxH5AppId;
private String wxH5AppSecret; private String wxH5AppSecret;
private String tuanYouUrl;
private String tuanYouAppKey;
private String tuanYouAppSecret;
private String wxApiKey; private String wxApiKey;
private String wxMchId; private String wxMchId;
private String wxMchAppId; private String wxMchAppId;
@ -30,14 +26,6 @@ public class SysConfig {
private String couponCodePath; private String couponCodePath;
private String notifyUrl; private String notifyUrl;
public String getTuanYouUrl() {
return tuanYouUrl;
}
public void setTuanYouUrl(String tuanYouUrl) {
this.tuanYouUrl = tuanYouUrl;
}
public String getFileUrl() { public String getFileUrl() {
return fileUrl; return fileUrl;
} }
@ -62,52 +50,36 @@ public class SysConfig {
this.wxAppSecret = wxAppSecret; this.wxAppSecret = wxAppSecret;
} }
public String getWxApiKey() { public String getWxH5AppId() {
return wxApiKey; return wxH5AppId;
}
public void setWxApiKey(String wxApiKey) {
this.wxApiKey = wxApiKey;
}
public String getWxMchId() {
return wxMchId;
}
public void setWxMchId(String wxMchId) {
this.wxMchId = wxMchId;
}
public String getWxUnifiedOrderUrl() {
return wxUnifiedOrderUrl;
} }
public void setWxUnifiedOrderUrl(String wxUnifiedOrderUrl) { public void setWxH5AppId(String wxH5AppId) {
this.wxUnifiedOrderUrl = wxUnifiedOrderUrl; this.wxH5AppId = wxH5AppId;
} }
public String getNotifyUrl() { public String getWxH5AppSecret() {
return notifyUrl; return wxH5AppSecret;
} }
public void setNotifyUrl(String notifyUrl) { public void setWxH5AppSecret(String wxH5AppSecret) {
this.notifyUrl = notifyUrl; this.wxH5AppSecret = wxH5AppSecret;
} }
public String getCouponCodePath() { public String getWxApiKey() {
return couponCodePath; return wxApiKey;
} }
public void setCouponCodePath(String couponCodePath) { public void setWxApiKey(String wxApiKey) {
this.couponCodePath = couponCodePath; this.wxApiKey = wxApiKey;
} }
public String getWxSubMchId() { public String getWxMchId() {
return wxSubMchId; return wxMchId;
} }
public void setWxSubMchId(String wxSubMchId) { public void setWxMchId(String wxMchId) {
this.wxSubMchId = wxSubMchId; this.wxMchId = wxMchId;
} }
public String getWxMchAppId() { public String getWxMchAppId() {
@ -126,35 +98,35 @@ public class SysConfig {
this.wxSubAppId = wxSubAppId; this.wxSubAppId = wxSubAppId;
} }
public String getWxH5AppId() { public String getWxSubMchId() {
return wxH5AppId; return wxSubMchId;
} }
public void setWxH5AppId(String wxH5AppId) { public void setWxSubMchId(String wxSubMchId) {
this.wxH5AppId = wxH5AppId; this.wxSubMchId = wxSubMchId;
} }
public String getWxH5AppSecret() { public String getWxUnifiedOrderUrl() {
return wxH5AppSecret; return wxUnifiedOrderUrl;
} }
public void setWxH5AppSecret(String wxH5AppSecret) { public void setWxUnifiedOrderUrl(String wxUnifiedOrderUrl) {
this.wxH5AppSecret = wxH5AppSecret; this.wxUnifiedOrderUrl = wxUnifiedOrderUrl;
} }
public String getTuanYouAppKey() { public String getCouponCodePath() {
return tuanYouAppKey; return couponCodePath;
} }
public void setTuanYouAppKey(String tuanYouAppKey) { public void setCouponCodePath(String couponCodePath) {
this.tuanYouAppKey = tuanYouAppKey; this.couponCodePath = couponCodePath;
} }
public String getTuanYouAppSecret() { public String getNotifyUrl() {
return tuanYouAppSecret; return notifyUrl;
} }
public void setTuanYouAppSecret(String tuanYouAppSecret) { public void setNotifyUrl(String notifyUrl) {
this.tuanYouAppSecret = tuanYouAppSecret; this.notifyUrl = notifyUrl;
} }
} }

@ -1,16 +1,15 @@
package com.cweb.controller; package com.cweb.controller;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.cweb.config.SysConst;
import com.cweb.config.TuanYouConfig;
import com.github.pagehelper.PageInfo; import com.github.pagehelper.PageInfo;
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;
import com.hai.common.security.AESEncodeUtil;
import com.hai.common.utils.CoordCommonUtil; import com.hai.common.utils.CoordCommonUtil;
import com.hai.common.utils.PageUtil; import com.hai.common.utils.PageUtil;
import com.hai.common.utils.ResponseMsgUtil; import com.hai.common.utils.ResponseMsgUtil;
import com.hai.config.CommonSysConst;
import com.hai.config.TuanYouConfig;
import com.hai.model.ResponseData; import com.hai.model.ResponseData;
import com.hai.service.HighGasOilPriceService; import com.hai.service.HighGasOilPriceService;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
@ -200,7 +199,9 @@ public class HighGasController {
String data = "{\"data\":\"ui2KbK5jpLtw7YaA52uSt1TzDpaE5OjeW5O6xg+saM4nN4aVnpoT1aTgJwQt/DuNSbs7LrX6q1B0cpW5T531ltYl1ERxyKXqZyMKBNWzDFuB5QSww22VGfypchGNm+oW\",\"timestamp\":1624611912047,\"companyCode\":\"208241666939552\"}"; String data = "{\"data\":\"ui2KbK5jpLtw7YaA52uSt1TzDpaE5OjeW5O6xg+saM4nN4aVnpoT1aTgJwQt/DuNSbs7LrX6q1B0cpW5T531ltYl1ERxyKXqZyMKBNWzDFuB5QSww22VGfypchGNm+oW\",\"timestamp\":1624611912047,\"companyCode\":\"208241666939552\"}";
JSONObject jsonObject = JSONObject.parseObject(data, JSONObject.class); JSONObject jsonObject = JSONObject.parseObject(data, JSONObject.class);
return ResponseMsgUtil.success(AESEncodeUtil.aesDecryptByBytes(AESEncodeUtil.base64Decode(jsonObject.getString("data")), SysConst.getSysConfig().getTuanYouAppSecret()));
//return ResponseMsgUtil.success(AESEncodeUtil.aesDecryptByBytes(AESEncodeUtil.base64Decode(jsonObject.getString("data")), SysConst.getSysConfig().getTuanYouAppSecret()));
return ResponseMsgUtil.success(CommonSysConst.getSysConfig().getTuanYouUrl());
} catch (Exception e) { } catch (Exception e) {
log.error("HighGasController -> queryThirdOrderDretail() error!",e); log.error("HighGasController -> queryThirdOrderDretail() error!",e);

@ -1,7 +1,6 @@
package com.cweb.controller; package com.cweb.controller;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.cweb.config.TuanYouConfig;
import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo; import com.github.pagehelper.PageInfo;
import com.hai.common.exception.ErrorCode; import com.hai.common.exception.ErrorCode;
@ -12,8 +11,8 @@ import com.hai.common.security.UserCenter;
import com.hai.common.utils.DateUtil; import com.hai.common.utils.DateUtil;
import com.hai.common.utils.IDGenerator; import com.hai.common.utils.IDGenerator;
import com.hai.common.utils.ResponseMsgUtil; import com.hai.common.utils.ResponseMsgUtil;
import com.hai.config.TuanYouConfig;
import com.hai.entity.*; import com.hai.entity.*;
import com.hai.model.HighCouponModel;
import com.hai.model.HighMerchantStoreModel; import com.hai.model.HighMerchantStoreModel;
import com.hai.model.HighUserModel; import com.hai.model.HighUserModel;
import com.hai.model.ResponseData; import com.hai.model.ResponseData;
@ -175,10 +174,6 @@ public class HighOrderController {
log.error("HighOrderController --> addOrder() error!", "未找到门店信息"); log.error("HighOrderController --> addOrder() error!", "未找到门店信息");
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未找到门店信息"); throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未找到门店信息");
} }
childOrder.setGoodsName(store.getStoreName());
childOrder.setGoodsImg(store.getStoreLogo());
childOrder.setGoodsSpecName("默认");
childOrder.setTotalPrice(childOrder.getGoodsPrice().multiply(new BigDecimal(childOrder.getSaleCount().toString())));
// 获取当前加油价格 // 获取当前加油价格
JSONObject jsonObject = TuanYouConfig.queryCompanyPriceDetail(store.getStoreKey(), childOrder.getGasOilNo()); JSONObject jsonObject = TuanYouConfig.queryCompanyPriceDetail(store.getStoreKey(), childOrder.getGasOilNo());
@ -189,24 +184,12 @@ public class HighOrderController {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未获取到加油价格"); throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未获取到加油价格");
} }
JSONObject priceDetail = JSONObject.parseObject(JSONObject.toJSONString(jsonObject.getJSONArray("result").get(0)), JSONObject.class); JSONObject priceDetail = JSONObject.parseObject(JSONObject.toJSONString(jsonObject.getJSONArray("result").get(0)), JSONObject.class);
// 推送订单 childOrder.setGoodsName(store.getStoreName());
Map<String,Object> map = new HashMap<>(); childOrder.setGoodsImg(store.getStoreLogo());
map.put("gasId", store.getStoreKey()); childOrder.setGasPriceGun(priceDetail.getBigDecimal("priceGun"));
map.put("oilNo", childOrder.getGasOilNo()); childOrder.setGasPriceVip(priceDetail.getBigDecimal("priceVip"));
map.put("gunNo", childOrder.getGasGunNo()); childOrder.setGoodsSpecName("默认");
BigDecimal priceGun = new BigDecimal(priceDetail.getString("priceGun")); childOrder.setTotalPrice(childOrder.getGoodsPrice().multiply(new BigDecimal(childOrder.getSaleCount().toString())));
BigDecimal priceVip = new BigDecimal(priceDetail.getString("priceVip"));
map.put("priceGun", priceGun); // 枪单价
map.put("priceVip", priceVip); // 优惠价
map.put("driverPhone", userInfoModel.getHighUser().getPhone());
map.put("thirdSerialNo", highOrder.getOrderNo());
BigDecimal refuelingAmount = new BigDecimal(childOrder.getTotalPrice().toString()).divide(priceGun,2,BigDecimal.ROUND_HALF_UP).multiply(priceVip).setScale(2,BigDecimal.ROUND_HALF_UP);
map.put("refuelingAmount", refuelingAmount);
JSONObject orderPushObject = TuanYouConfig.refuelingOrderPush(map);
if (orderPushObject == null || !orderPushObject.getString("code").equals("200")) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "提交订单,出现了未知错误");
}
childOrder.setGasOrderNo(orderPushObject.getJSONObject("result").getString("orderNo"));
} }
childOrder.setMemId(userInfoModel.getHighUser().getId()); childOrder.setMemId(userInfoModel.getHighUser().getId());

@ -1,21 +1,15 @@
package com.cweb.controller; package com.cweb.controller;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.cweb.config.TuanYouConfig;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
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;
import com.hai.common.security.SessionObject;
import com.hai.common.security.UserCenter;
import com.hai.common.utils.*; import com.hai.common.utils.*;
import com.hai.config.TuanYouConfig;
import com.hai.entity.*; import com.hai.entity.*;
import com.hai.model.HighMerchantModel; import com.hai.model.HighMerchantModel;
import com.hai.model.HighMerchantStoreModel; import com.hai.model.HighMerchantStoreModel;
import com.hai.model.HighUserModel;
import com.hai.model.ResponseData; import com.hai.model.ResponseData;
import com.hai.service.*; import com.hai.service.*;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
@ -23,18 +17,11 @@ import io.swagger.annotations.ApiOperation;
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;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller; import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource; import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import java.math.BigDecimal;
import java.util.Date; import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
/** /**
* @Auther: 胡锐 * @Auther: 胡锐

@ -5,10 +5,6 @@ wxAppSecret=d8d6dcaef77d3b659258a01b5ddba5df
wxH5AppId=wxa075e8509802f826 wxH5AppId=wxa075e8509802f826
wxH5AppSecret=0e606fc1378d35e359fcf3f15570b2c5 wxH5AppSecret=0e606fc1378d35e359fcf3f15570b2c5
tuanYouUrl=https://test02-motorcade-hcs.czb365.com
tuanYouAppKey=208241666939552
tuanYouAppSecret=adecc3cff077834cb8632c8ab3bec0e6
wxApiKey=Skufk5oi85wDFGl888i6wsRSTkdd5df5 wxApiKey=Skufk5oi85wDFGl888i6wsRSTkdd5df5
wxMchAppId=wx637bd6f7314daa46 wxMchAppId=wx637bd6f7314daa46
wxMchId=1289663601 wxMchId=1289663601

@ -5,10 +5,6 @@ wxAppSecret=d8d6dcaef77d3b659258a01b5ddba5df
wxH5AppId=wxa075e8509802f826 wxH5AppId=wxa075e8509802f826
wxH5AppSecret=0e606fc1378d35e359fcf3f15570b2c5 wxH5AppSecret=0e606fc1378d35e359fcf3f15570b2c5
tuanYouUrl=https://test02-motorcade-hcs.czb365.com
tuanYouAppKey=208241666939552
tuanYouAppSecret=adecc3cff077834cb8632c8ab3bec0e6
wxApiKey=Skufk5oi85wDFGl888i6wsRSTkdd5df5 wxApiKey=Skufk5oi85wDFGl888i6wsRSTkdd5df5
wxMchAppId=wx637bd6f7314daa46 wxMchAppId=wx637bd6f7314daa46
wxMchId=1289663601 wxMchId=1289663601

@ -304,5 +304,12 @@
<version>0.2.2</version> <version>0.2.2</version>
</dependency> </dependency>
</dependencies> </dependencies>
<build>
<resources>
<resource>
<directory>src/main/resources/${env}</directory>
<filtering>false</filtering>
</resource>
</resources>
</build>
</project> </project>

@ -0,0 +1,39 @@
package com.hai.config;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.PropertySource;
import org.springframework.stereotype.Component;
@Component("commonSysConfig")
@ConfigurationProperties
@PropertySource("classpath:/commonConfig.properties")
public class CommonSysConfig {
private String tuanYouUrl;
private String tuanYouAppKey;
private String tuanYouAppSecret;
public String getTuanYouUrl() {
return tuanYouUrl;
}
public void setTuanYouUrl(String tuanYouUrl) {
this.tuanYouUrl = tuanYouUrl;
}
public String getTuanYouAppKey() {
return tuanYouAppKey;
}
public void setTuanYouAppKey(String tuanYouAppKey) {
this.tuanYouAppKey = tuanYouAppKey;
}
public String getTuanYouAppSecret() {
return tuanYouAppSecret;
}
public void setTuanYouAppSecret(String tuanYouAppSecret) {
this.tuanYouAppSecret = tuanYouAppSecret;
}
}

@ -0,0 +1,19 @@
package com.hai.config;
public class CommonSysConst {
private static CommonSysConfig sysConfig;
public static void setSysConfig(CommonSysConfig arg){
sysConfig = arg;
}
public static CommonSysConfig getSysConfig(){
if (null == sysConfig) {
//防止空指针异常
sysConfig = new CommonSysConfig();
return sysConfig;
}
return sysConfig;
}
}

@ -0,0 +1,23 @@
package com.hai.config;
import javax.annotation.Resource;
import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;
import javax.servlet.annotation.WebListener;
@WebListener
public class ConfigListener implements ServletContextListener {
@Resource
private CommonSysConfig commonSysConfig;
@Override
public void contextInitialized(ServletContextEvent sce) {
CommonSysConst.setSysConfig(commonSysConfig);
}
@Override
public void contextDestroyed(ServletContextEvent sce) {
}
}

@ -1,4 +1,4 @@
package com.cweb.config; package com.hai.config;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
@ -27,12 +27,12 @@ public class TuanYouConfig {
*/ */
public static JSONObject queryGasInfoListByPage(Integer pageIndex,Integer pageSize) throws Exception { public static JSONObject queryGasInfoListByPage(Integer pageIndex,Integer pageSize) throws Exception {
Map<String,Object> paramMap = new HashMap<>(); Map<String,Object> paramMap = new HashMap<>();
paramMap.put("app_key", SysConst.getSysConfig().getTuanYouAppKey()); paramMap.put("app_key", CommonSysConst.getSysConfig().getTuanYouAppKey());
paramMap.put("timestamp", new Date().getTime()); paramMap.put("timestamp", new Date().getTime());
paramMap.put("pageIndex", pageIndex); paramMap.put("pageIndex", pageIndex);
paramMap.put("pageSize", pageSize); paramMap.put("pageSize", pageSize);
paramMap.put("sign", MD5Util.encode(generateTuanYouSignature(paramMap,SysConst.getSysConfig().getTuanYouAppSecret()).getBytes()).toLowerCase()); paramMap.put("sign", MD5Util.encode(generateTuanYouSignature(paramMap,CommonSysConst.getSysConfig().getTuanYouAppSecret()).getBytes()).toLowerCase());
return HttpsUtils.doPost(SysConst.getSysConfig().getTuanYouUrl()+"/services/vp/openapi/queryGasInfoListByPage", JSON.toJSONString(paramMap)); return HttpsUtils.doPost(CommonSysConst.getSysConfig().getTuanYouUrl()+"/services/vp/openapi/queryGasInfoListByPage", JSON.toJSONString(paramMap));
} }
/** /**
@ -43,11 +43,11 @@ public class TuanYouConfig {
*/ */
public static JSONObject queryGasInfoByGasId(String gasId) throws Exception { public static JSONObject queryGasInfoByGasId(String gasId) throws Exception {
Map<String,Object> paramMap = new HashMap<>(); Map<String,Object> paramMap = new HashMap<>();
paramMap.put("app_key", SysConst.getSysConfig().getTuanYouAppKey()); paramMap.put("app_key", CommonSysConst.getSysConfig().getTuanYouAppKey());
paramMap.put("timestamp", new Date().getTime()); paramMap.put("timestamp", new Date().getTime());
paramMap.put("gasId", gasId); paramMap.put("gasId", gasId);
paramMap.put("sign", MD5Util.encode(generateTuanYouSignature(paramMap,SysConst.getSysConfig().getTuanYouAppSecret()).getBytes()).toLowerCase()); paramMap.put("sign", MD5Util.encode(generateTuanYouSignature(paramMap,CommonSysConst.getSysConfig().getTuanYouAppSecret()).getBytes()).toLowerCase());
return HttpsUtils.doPost(SysConst.getSysConfig().getTuanYouUrl()+"/services/vp/openapi/queryGasInfoByGasId", JSON.toJSONString(paramMap)); return HttpsUtils.doPost(CommonSysConst.getSysConfig().getTuanYouUrl()+"/services/vp/openapi/queryGasInfoByGasId", JSON.toJSONString(paramMap));
} }
/** /**
@ -59,12 +59,12 @@ public class TuanYouConfig {
*/ */
public static JSONObject queryCompanyPriceDetail(String gasId,String oilNo) throws Exception { public static JSONObject queryCompanyPriceDetail(String gasId,String oilNo) throws Exception {
Map<String,Object> paramMap = new HashMap<>(); Map<String,Object> paramMap = new HashMap<>();
paramMap.put("app_key", SysConst.getSysConfig().getTuanYouAppKey()); paramMap.put("app_key", CommonSysConst.getSysConfig().getTuanYouAppKey());
paramMap.put("timestamp", new Date().getTime()); paramMap.put("timestamp", new Date().getTime());
paramMap.put("gasId", gasId); paramMap.put("gasId", gasId);
paramMap.put("oilNo", oilNo); paramMap.put("oilNo", oilNo);
paramMap.put("sign", MD5Util.encode(generateTuanYouSignature(paramMap,SysConst.getSysConfig().getTuanYouAppSecret()).getBytes()).toLowerCase()); paramMap.put("sign", MD5Util.encode(generateTuanYouSignature(paramMap,CommonSysConst.getSysConfig().getTuanYouAppSecret()).getBytes()).toLowerCase());
return HttpsUtils.doPost(SysConst.getSysConfig().getTuanYouUrl()+"/services/vp/openapi/queryCompanyPriceDetail", JSON.toJSONString(paramMap)); return HttpsUtils.doPost(CommonSysConst.getSysConfig().getTuanYouUrl()+"/services/vp/openapi/queryCompanyPriceDetail", JSON.toJSONString(paramMap));
} }
/** /**
@ -75,13 +75,13 @@ public class TuanYouConfig {
*/ */
public static JSONObject refuelingOrderPush(Map<String,Object> map) throws Exception { public static JSONObject refuelingOrderPush(Map<String,Object> map) throws Exception {
Map<String,Object> paramMap = new HashMap<>(); Map<String,Object> paramMap = new HashMap<>();
paramMap.put("app_key", SysConst.getSysConfig().getTuanYouAppKey()); paramMap.put("app_key", CommonSysConst.getSysConfig().getTuanYouAppKey());
paramMap.put("timestamp", new Date().getTime()); paramMap.put("timestamp", new Date().getTime());
for (Map.Entry<String, Object> entry : map.entrySet()) { for (Map.Entry<String, Object> entry : map.entrySet()) {
paramMap.put(entry.getKey(), entry.getValue().toString()); paramMap.put(entry.getKey(), entry.getValue().toString());
} }
paramMap.put("sign", MD5Util.encode(generateTuanYouSignature(paramMap,SysConst.getSysConfig().getTuanYouAppSecret()).getBytes()).toLowerCase()); paramMap.put("sign", MD5Util.encode(generateTuanYouSignature(paramMap,CommonSysConst.getSysConfig().getTuanYouAppSecret()).getBytes()).toLowerCase());
return HttpsUtils.doPost(SysConst.getSysConfig().getTuanYouUrl()+"/services/vp/openapi/refuelingOrderPush", JSON.toJSONString(paramMap)); return HttpsUtils.doPost(CommonSysConst.getSysConfig().getTuanYouUrl()+"/services/vp/openapi/refuelingOrderPush", JSON.toJSONString(paramMap));
} }
/** /**
@ -94,13 +94,13 @@ public class TuanYouConfig {
*/ */
public static JSONObject refuelingOrderRefund(String driverPhone,String thirdSerialNo,String refundReason) throws Exception { public static JSONObject refuelingOrderRefund(String driverPhone,String thirdSerialNo,String refundReason) throws Exception {
Map<String,Object> paramMap = new HashMap<>(); Map<String,Object> paramMap = new HashMap<>();
paramMap.put("app_key", SysConst.getSysConfig().getTuanYouAppKey()); paramMap.put("app_key", CommonSysConst.getSysConfig().getTuanYouAppKey());
paramMap.put("timestamp", new Date().getTime()); paramMap.put("timestamp", new Date().getTime());
paramMap.put("driverPhone", driverPhone); paramMap.put("driverPhone", driverPhone);
paramMap.put("thirdSerialNo", thirdSerialNo); paramMap.put("thirdSerialNo", thirdSerialNo);
paramMap.put("refundReason", refundReason); paramMap.put("refundReason", refundReason);
paramMap.put("sign", MD5Util.encode(generateTuanYouSignature(paramMap,SysConst.getSysConfig().getTuanYouAppSecret()).getBytes()).toLowerCase()); paramMap.put("sign", MD5Util.encode(generateTuanYouSignature(paramMap,CommonSysConst.getSysConfig().getTuanYouAppSecret()).getBytes()).toLowerCase());
return HttpsUtils.doPost(SysConst.getSysConfig().getTuanYouUrl()+"/services/vp/openapi/refuelingOrderRefund", JSON.toJSONString(paramMap)); return HttpsUtils.doPost(CommonSysConst.getSysConfig().getTuanYouUrl()+"/services/vp/openapi/refuelingOrderRefund", JSON.toJSONString(paramMap));
} }
/** /**
@ -111,11 +111,11 @@ public class TuanYouConfig {
*/ */
public static JSONObject queryThirdOrderDretail(String thirdSerialNo) throws Exception { public static JSONObject queryThirdOrderDretail(String thirdSerialNo) throws Exception {
Map<String,Object> paramMap = new HashMap<>(); Map<String,Object> paramMap = new HashMap<>();
paramMap.put("app_key", SysConst.getSysConfig().getTuanYouAppKey()); paramMap.put("app_key", CommonSysConst.getSysConfig().getTuanYouAppKey());
paramMap.put("timestamp", new Date().getTime()); paramMap.put("timestamp", new Date().getTime());
paramMap.put("thirdSerialNo", thirdSerialNo); paramMap.put("thirdSerialNo", thirdSerialNo);
paramMap.put("sign", MD5Util.encode(generateTuanYouSignature(paramMap,SysConst.getSysConfig().getTuanYouAppSecret()).getBytes()).toLowerCase()); paramMap.put("sign", MD5Util.encode(generateTuanYouSignature(paramMap,CommonSysConst.getSysConfig().getTuanYouAppSecret()).getBytes()).toLowerCase());
return HttpsUtils.doPost(SysConst.getSysConfig().getTuanYouUrl()+"/services/vp/openapi/queryThirdOrderDetail", JSON.toJSONString(paramMap)); return HttpsUtils.doPost(CommonSysConst.getSysConfig().getTuanYouUrl()+"/services/vp/openapi/queryThirdOrderDetail", JSON.toJSONString(paramMap));
} }
/** /**
@ -131,7 +131,7 @@ public class TuanYouConfig {
*/ */
public static JSONObject queryOrderInfoList(String companyCode,String startTime,String endTime,Integer page,Integer rows,Integer orderPayFlag) throws Exception { public static JSONObject queryOrderInfoList(String companyCode,String startTime,String endTime,Integer page,Integer rows,Integer orderPayFlag) throws Exception {
Map<String,Object> paramMap = new HashMap<>(); Map<String,Object> paramMap = new HashMap<>();
paramMap.put("app_key", SysConst.getSysConfig().getTuanYouAppKey()); paramMap.put("app_key", CommonSysConst.getSysConfig().getTuanYouAppKey());
paramMap.put("timestamp", new Date().getTime()); paramMap.put("timestamp", new Date().getTime());
paramMap.put("companyCode", companyCode); paramMap.put("companyCode", companyCode);
paramMap.put("startTime", startTime); paramMap.put("startTime", startTime);
@ -145,8 +145,8 @@ public class TuanYouConfig {
if (orderPayFlag != null) { if (orderPayFlag != null) {
paramMap.put("orderPayFlag", orderPayFlag); paramMap.put("orderPayFlag", orderPayFlag);
} }
paramMap.put("sign", MD5Util.encode(generateTuanYouSignature(paramMap,SysConst.getSysConfig().getTuanYouAppSecret()).getBytes()).toLowerCase()); paramMap.put("sign", MD5Util.encode(generateTuanYouSignature(paramMap,CommonSysConst.getSysConfig().getTuanYouAppSecret()).getBytes()).toLowerCase());
return HttpsUtils.doPost(SysConst.getSysConfig().getTuanYouUrl()+"/services/vp/openapi/queryOrderInfoList", JSON.toJSONString(paramMap)); return HttpsUtils.doPost(CommonSysConst.getSysConfig().getTuanYouUrl()+"/services/vp/openapi/queryOrderInfoList", JSON.toJSONString(paramMap));
} }
/** /**
@ -157,11 +157,11 @@ public class TuanYouConfig {
*/ */
public static JSONObject loopShangQiOrder(String thirdSerialNo) throws Exception { public static JSONObject loopShangQiOrder(String thirdSerialNo) throws Exception {
Map<String,Object> paramMap = new HashMap<>(); Map<String,Object> paramMap = new HashMap<>();
paramMap.put("app_key", SysConst.getSysConfig().getTuanYouAppKey()); paramMap.put("app_key", CommonSysConst.getSysConfig().getTuanYouAppKey());
paramMap.put("timestamp", new Date().getTime()); paramMap.put("timestamp", new Date().getTime());
paramMap.put("thirdSerialNo", thirdSerialNo); paramMap.put("thirdSerialNo", thirdSerialNo);
paramMap.put("sign", MD5Util.encode(generateTuanYouSignature(paramMap,SysConst.getSysConfig().getTuanYouAppSecret()).getBytes()).toLowerCase()); paramMap.put("sign", MD5Util.encode(generateTuanYouSignature(paramMap,CommonSysConst.getSysConfig().getTuanYouAppSecret()).getBytes()).toLowerCase());
return HttpsUtils.doPost(SysConst.getSysConfig().getTuanYouUrl()+"/services/vp/openapi/loopShangQiOrder", JSON.toJSONString(paramMap)); return HttpsUtils.doPost(CommonSysConst.getSysConfig().getTuanYouUrl()+"/services/vp/openapi/loopShangQiOrder", JSON.toJSONString(paramMap));
} }
/** /**

@ -47,6 +47,7 @@ public interface HighChildOrderMapper extends HighChildOrderMapperExt {
"giveaway_type, child_orde_status, ", "giveaway_type, child_orde_status, ",
"praise_status, gas_oil_no, ", "praise_status, gas_oil_no, ",
"gas_gun_no, gas_order_no, ", "gas_gun_no, gas_order_no, ",
"gas_price_gun, gas_price_vip, ",
"ext_1, ext_2, ext_3)", "ext_1, ext_2, ext_3)",
"values (#{orderId,jdbcType=BIGINT}, #{memId,jdbcType=BIGINT}, ", "values (#{orderId,jdbcType=BIGINT}, #{memId,jdbcType=BIGINT}, ",
"#{goodsType,jdbcType=INTEGER}, #{goodsId,jdbcType=BIGINT}, ", "#{goodsType,jdbcType=INTEGER}, #{goodsId,jdbcType=BIGINT}, ",
@ -56,6 +57,7 @@ public interface HighChildOrderMapper extends HighChildOrderMapperExt {
"#{giveawayType,jdbcType=BIT}, #{childOrdeStatus,jdbcType=INTEGER}, ", "#{giveawayType,jdbcType=BIT}, #{childOrdeStatus,jdbcType=INTEGER}, ",
"#{praiseStatus,jdbcType=INTEGER}, #{gasOilNo,jdbcType=VARCHAR}, ", "#{praiseStatus,jdbcType=INTEGER}, #{gasOilNo,jdbcType=VARCHAR}, ",
"#{gasGunNo,jdbcType=VARCHAR}, #{gasOrderNo,jdbcType=VARCHAR}, ", "#{gasGunNo,jdbcType=VARCHAR}, #{gasOrderNo,jdbcType=VARCHAR}, ",
"#{gasPriceGun,jdbcType=DECIMAL}, #{gasPriceVip,jdbcType=DECIMAL}, ",
"#{ext1,jdbcType=VARCHAR}, #{ext2,jdbcType=VARCHAR}, #{ext3,jdbcType=VARCHAR})" "#{ext1,jdbcType=VARCHAR}, #{ext2,jdbcType=VARCHAR}, #{ext3,jdbcType=VARCHAR})"
}) })
@Options(useGeneratedKeys=true,keyProperty="id") @Options(useGeneratedKeys=true,keyProperty="id")
@ -84,6 +86,8 @@ public interface HighChildOrderMapper extends HighChildOrderMapperExt {
@Result(column="gas_oil_no", property="gasOilNo", jdbcType=JdbcType.VARCHAR), @Result(column="gas_oil_no", property="gasOilNo", jdbcType=JdbcType.VARCHAR),
@Result(column="gas_gun_no", property="gasGunNo", jdbcType=JdbcType.VARCHAR), @Result(column="gas_gun_no", property="gasGunNo", jdbcType=JdbcType.VARCHAR),
@Result(column="gas_order_no", property="gasOrderNo", jdbcType=JdbcType.VARCHAR), @Result(column="gas_order_no", property="gasOrderNo", jdbcType=JdbcType.VARCHAR),
@Result(column="gas_price_gun", property="gasPriceGun", jdbcType=JdbcType.DECIMAL),
@Result(column="gas_price_vip", property="gasPriceVip", jdbcType=JdbcType.DECIMAL),
@Result(column="ext_1", property="ext1", jdbcType=JdbcType.VARCHAR), @Result(column="ext_1", property="ext1", jdbcType=JdbcType.VARCHAR),
@Result(column="ext_2", property="ext2", jdbcType=JdbcType.VARCHAR), @Result(column="ext_2", property="ext2", jdbcType=JdbcType.VARCHAR),
@Result(column="ext_3", property="ext3", jdbcType=JdbcType.VARCHAR) @Result(column="ext_3", property="ext3", jdbcType=JdbcType.VARCHAR)
@ -94,7 +98,8 @@ public interface HighChildOrderMapper extends HighChildOrderMapperExt {
"select", "select",
"id, order_id, mem_id, goods_type, goods_id, goods_name, goods_img, goods_spec_name, ", "id, order_id, mem_id, goods_type, goods_id, goods_name, goods_img, goods_spec_name, ",
"goods_price, sale_count, total_price, giveaway_type, child_orde_status, praise_status, ", "goods_price, sale_count, total_price, giveaway_type, child_orde_status, praise_status, ",
"gas_oil_no, gas_gun_no, gas_order_no, ext_1, ext_2, ext_3", "gas_oil_no, gas_gun_no, gas_order_no, gas_price_gun, gas_price_vip, ext_1, ext_2, ",
"ext_3",
"from high_child_order", "from high_child_order",
"where id = #{id,jdbcType=BIGINT}" "where id = #{id,jdbcType=BIGINT}"
}) })
@ -116,6 +121,8 @@ public interface HighChildOrderMapper extends HighChildOrderMapperExt {
@Result(column="gas_oil_no", property="gasOilNo", jdbcType=JdbcType.VARCHAR), @Result(column="gas_oil_no", property="gasOilNo", jdbcType=JdbcType.VARCHAR),
@Result(column="gas_gun_no", property="gasGunNo", jdbcType=JdbcType.VARCHAR), @Result(column="gas_gun_no", property="gasGunNo", jdbcType=JdbcType.VARCHAR),
@Result(column="gas_order_no", property="gasOrderNo", jdbcType=JdbcType.VARCHAR), @Result(column="gas_order_no", property="gasOrderNo", jdbcType=JdbcType.VARCHAR),
@Result(column="gas_price_gun", property="gasPriceGun", jdbcType=JdbcType.DECIMAL),
@Result(column="gas_price_vip", property="gasPriceVip", jdbcType=JdbcType.DECIMAL),
@Result(column="ext_1", property="ext1", jdbcType=JdbcType.VARCHAR), @Result(column="ext_1", property="ext1", jdbcType=JdbcType.VARCHAR),
@Result(column="ext_2", property="ext2", jdbcType=JdbcType.VARCHAR), @Result(column="ext_2", property="ext2", jdbcType=JdbcType.VARCHAR),
@Result(column="ext_3", property="ext3", jdbcType=JdbcType.VARCHAR) @Result(column="ext_3", property="ext3", jdbcType=JdbcType.VARCHAR)
@ -149,6 +156,8 @@ public interface HighChildOrderMapper extends HighChildOrderMapperExt {
"gas_oil_no = #{gasOilNo,jdbcType=VARCHAR},", "gas_oil_no = #{gasOilNo,jdbcType=VARCHAR},",
"gas_gun_no = #{gasGunNo,jdbcType=VARCHAR},", "gas_gun_no = #{gasGunNo,jdbcType=VARCHAR},",
"gas_order_no = #{gasOrderNo,jdbcType=VARCHAR},", "gas_order_no = #{gasOrderNo,jdbcType=VARCHAR},",
"gas_price_gun = #{gasPriceGun,jdbcType=DECIMAL},",
"gas_price_vip = #{gasPriceVip,jdbcType=DECIMAL},",
"ext_1 = #{ext1,jdbcType=VARCHAR},", "ext_1 = #{ext1,jdbcType=VARCHAR},",
"ext_2 = #{ext2,jdbcType=VARCHAR},", "ext_2 = #{ext2,jdbcType=VARCHAR},",
"ext_3 = #{ext3,jdbcType=VARCHAR}", "ext_3 = #{ext3,jdbcType=VARCHAR}",

@ -92,6 +92,14 @@ public class HighChildOrderSqlProvider {
sql.VALUES("gas_order_no", "#{gasOrderNo,jdbcType=VARCHAR}"); sql.VALUES("gas_order_no", "#{gasOrderNo,jdbcType=VARCHAR}");
} }
if (record.getGasPriceGun() != null) {
sql.VALUES("gas_price_gun", "#{gasPriceGun,jdbcType=DECIMAL}");
}
if (record.getGasPriceVip() != null) {
sql.VALUES("gas_price_vip", "#{gasPriceVip,jdbcType=DECIMAL}");
}
if (record.getExt1() != null) { if (record.getExt1() != null) {
sql.VALUES("ext_1", "#{ext1,jdbcType=VARCHAR}"); sql.VALUES("ext_1", "#{ext1,jdbcType=VARCHAR}");
} }
@ -130,6 +138,8 @@ public class HighChildOrderSqlProvider {
sql.SELECT("gas_oil_no"); sql.SELECT("gas_oil_no");
sql.SELECT("gas_gun_no"); sql.SELECT("gas_gun_no");
sql.SELECT("gas_order_no"); sql.SELECT("gas_order_no");
sql.SELECT("gas_price_gun");
sql.SELECT("gas_price_vip");
sql.SELECT("ext_1"); sql.SELECT("ext_1");
sql.SELECT("ext_2"); sql.SELECT("ext_2");
sql.SELECT("ext_3"); sql.SELECT("ext_3");
@ -218,6 +228,14 @@ public class HighChildOrderSqlProvider {
sql.SET("gas_order_no = #{record.gasOrderNo,jdbcType=VARCHAR}"); sql.SET("gas_order_no = #{record.gasOrderNo,jdbcType=VARCHAR}");
} }
if (record.getGasPriceGun() != null) {
sql.SET("gas_price_gun = #{record.gasPriceGun,jdbcType=DECIMAL}");
}
if (record.getGasPriceVip() != null) {
sql.SET("gas_price_vip = #{record.gasPriceVip,jdbcType=DECIMAL}");
}
if (record.getExt1() != null) { if (record.getExt1() != null) {
sql.SET("ext_1 = #{record.ext1,jdbcType=VARCHAR}"); sql.SET("ext_1 = #{record.ext1,jdbcType=VARCHAR}");
} }
@ -255,6 +273,8 @@ public class HighChildOrderSqlProvider {
sql.SET("gas_oil_no = #{record.gasOilNo,jdbcType=VARCHAR}"); sql.SET("gas_oil_no = #{record.gasOilNo,jdbcType=VARCHAR}");
sql.SET("gas_gun_no = #{record.gasGunNo,jdbcType=VARCHAR}"); sql.SET("gas_gun_no = #{record.gasGunNo,jdbcType=VARCHAR}");
sql.SET("gas_order_no = #{record.gasOrderNo,jdbcType=VARCHAR}"); sql.SET("gas_order_no = #{record.gasOrderNo,jdbcType=VARCHAR}");
sql.SET("gas_price_gun = #{record.gasPriceGun,jdbcType=DECIMAL}");
sql.SET("gas_price_vip = #{record.gasPriceVip,jdbcType=DECIMAL}");
sql.SET("ext_1 = #{record.ext1,jdbcType=VARCHAR}"); sql.SET("ext_1 = #{record.ext1,jdbcType=VARCHAR}");
sql.SET("ext_2 = #{record.ext2,jdbcType=VARCHAR}"); sql.SET("ext_2 = #{record.ext2,jdbcType=VARCHAR}");
sql.SET("ext_3 = #{record.ext3,jdbcType=VARCHAR}"); sql.SET("ext_3 = #{record.ext3,jdbcType=VARCHAR}");
@ -332,6 +352,14 @@ public class HighChildOrderSqlProvider {
sql.SET("gas_order_no = #{gasOrderNo,jdbcType=VARCHAR}"); sql.SET("gas_order_no = #{gasOrderNo,jdbcType=VARCHAR}");
} }
if (record.getGasPriceGun() != null) {
sql.SET("gas_price_gun = #{gasPriceGun,jdbcType=DECIMAL}");
}
if (record.getGasPriceVip() != null) {
sql.SET("gas_price_vip = #{gasPriceVip,jdbcType=DECIMAL}");
}
if (record.getExt1() != null) { if (record.getExt1() != null) {
sql.SET("ext_1 = #{ext1,jdbcType=VARCHAR}"); sql.SET("ext_1 = #{ext1,jdbcType=VARCHAR}");
} }

@ -98,6 +98,16 @@ public class HighChildOrder implements Serializable {
*/ */
private String gasOrderNo; private String gasOrderNo;
/**
* 加油站油枪价
*/
private BigDecimal gasPriceGun;
/**
* 加油站优惠价
*/
private BigDecimal gasPriceVip;
private String ext1; private String ext1;
private String ext2; private String ext2;
@ -242,6 +252,22 @@ public class HighChildOrder implements Serializable {
this.gasOrderNo = gasOrderNo; this.gasOrderNo = gasOrderNo;
} }
public BigDecimal getGasPriceGun() {
return gasPriceGun;
}
public void setGasPriceGun(BigDecimal gasPriceGun) {
this.gasPriceGun = gasPriceGun;
}
public BigDecimal getGasPriceVip() {
return gasPriceVip;
}
public void setGasPriceVip(BigDecimal gasPriceVip) {
this.gasPriceVip = gasPriceVip;
}
public String getExt1() { public String getExt1() {
return ext1; return ext1;
} }
@ -295,6 +321,8 @@ public class HighChildOrder implements Serializable {
&& (this.getGasOilNo() == null ? other.getGasOilNo() == null : this.getGasOilNo().equals(other.getGasOilNo())) && (this.getGasOilNo() == null ? other.getGasOilNo() == null : this.getGasOilNo().equals(other.getGasOilNo()))
&& (this.getGasGunNo() == null ? other.getGasGunNo() == null : this.getGasGunNo().equals(other.getGasGunNo())) && (this.getGasGunNo() == null ? other.getGasGunNo() == null : this.getGasGunNo().equals(other.getGasGunNo()))
&& (this.getGasOrderNo() == null ? other.getGasOrderNo() == null : this.getGasOrderNo().equals(other.getGasOrderNo())) && (this.getGasOrderNo() == null ? other.getGasOrderNo() == null : this.getGasOrderNo().equals(other.getGasOrderNo()))
&& (this.getGasPriceGun() == null ? other.getGasPriceGun() == null : this.getGasPriceGun().equals(other.getGasPriceGun()))
&& (this.getGasPriceVip() == null ? other.getGasPriceVip() == null : this.getGasPriceVip().equals(other.getGasPriceVip()))
&& (this.getExt1() == null ? other.getExt1() == null : this.getExt1().equals(other.getExt1())) && (this.getExt1() == null ? other.getExt1() == null : this.getExt1().equals(other.getExt1()))
&& (this.getExt2() == null ? other.getExt2() == null : this.getExt2().equals(other.getExt2())) && (this.getExt2() == null ? other.getExt2() == null : this.getExt2().equals(other.getExt2()))
&& (this.getExt3() == null ? other.getExt3() == null : this.getExt3().equals(other.getExt3())); && (this.getExt3() == null ? other.getExt3() == null : this.getExt3().equals(other.getExt3()));
@ -321,6 +349,8 @@ public class HighChildOrder implements Serializable {
result = prime * result + ((getGasOilNo() == null) ? 0 : getGasOilNo().hashCode()); result = prime * result + ((getGasOilNo() == null) ? 0 : getGasOilNo().hashCode());
result = prime * result + ((getGasGunNo() == null) ? 0 : getGasGunNo().hashCode()); result = prime * result + ((getGasGunNo() == null) ? 0 : getGasGunNo().hashCode());
result = prime * result + ((getGasOrderNo() == null) ? 0 : getGasOrderNo().hashCode()); result = prime * result + ((getGasOrderNo() == null) ? 0 : getGasOrderNo().hashCode());
result = prime * result + ((getGasPriceGun() == null) ? 0 : getGasPriceGun().hashCode());
result = prime * result + ((getGasPriceVip() == null) ? 0 : getGasPriceVip().hashCode());
result = prime * result + ((getExt1() == null) ? 0 : getExt1().hashCode()); result = prime * result + ((getExt1() == null) ? 0 : getExt1().hashCode());
result = prime * result + ((getExt2() == null) ? 0 : getExt2().hashCode()); result = prime * result + ((getExt2() == null) ? 0 : getExt2().hashCode());
result = prime * result + ((getExt3() == null) ? 0 : getExt3().hashCode()); result = prime * result + ((getExt3() == null) ? 0 : getExt3().hashCode());
@ -350,6 +380,8 @@ public class HighChildOrder implements Serializable {
sb.append(", gasOilNo=").append(gasOilNo); sb.append(", gasOilNo=").append(gasOilNo);
sb.append(", gasGunNo=").append(gasGunNo); sb.append(", gasGunNo=").append(gasGunNo);
sb.append(", gasOrderNo=").append(gasOrderNo); sb.append(", gasOrderNo=").append(gasOrderNo);
sb.append(", gasPriceGun=").append(gasPriceGun);
sb.append(", gasPriceVip=").append(gasPriceVip);
sb.append(", ext1=").append(ext1); sb.append(", ext1=").append(ext1);
sb.append(", ext2=").append(ext2); sb.append(", ext2=").append(ext2);
sb.append(", ext3=").append(ext3); sb.append(", ext3=").append(ext3);

@ -1205,6 +1205,126 @@ public class HighChildOrderExample {
return (Criteria) this; return (Criteria) this;
} }
public Criteria andGasPriceGunIsNull() {
addCriterion("gas_price_gun is null");
return (Criteria) this;
}
public Criteria andGasPriceGunIsNotNull() {
addCriterion("gas_price_gun is not null");
return (Criteria) this;
}
public Criteria andGasPriceGunEqualTo(BigDecimal value) {
addCriterion("gas_price_gun =", value, "gasPriceGun");
return (Criteria) this;
}
public Criteria andGasPriceGunNotEqualTo(BigDecimal value) {
addCriterion("gas_price_gun <>", value, "gasPriceGun");
return (Criteria) this;
}
public Criteria andGasPriceGunGreaterThan(BigDecimal value) {
addCriterion("gas_price_gun >", value, "gasPriceGun");
return (Criteria) this;
}
public Criteria andGasPriceGunGreaterThanOrEqualTo(BigDecimal value) {
addCriterion("gas_price_gun >=", value, "gasPriceGun");
return (Criteria) this;
}
public Criteria andGasPriceGunLessThan(BigDecimal value) {
addCriterion("gas_price_gun <", value, "gasPriceGun");
return (Criteria) this;
}
public Criteria andGasPriceGunLessThanOrEqualTo(BigDecimal value) {
addCriterion("gas_price_gun <=", value, "gasPriceGun");
return (Criteria) this;
}
public Criteria andGasPriceGunIn(List<BigDecimal> values) {
addCriterion("gas_price_gun in", values, "gasPriceGun");
return (Criteria) this;
}
public Criteria andGasPriceGunNotIn(List<BigDecimal> values) {
addCriterion("gas_price_gun not in", values, "gasPriceGun");
return (Criteria) this;
}
public Criteria andGasPriceGunBetween(BigDecimal value1, BigDecimal value2) {
addCriterion("gas_price_gun between", value1, value2, "gasPriceGun");
return (Criteria) this;
}
public Criteria andGasPriceGunNotBetween(BigDecimal value1, BigDecimal value2) {
addCriterion("gas_price_gun not between", value1, value2, "gasPriceGun");
return (Criteria) this;
}
public Criteria andGasPriceVipIsNull() {
addCriterion("gas_price_vip is null");
return (Criteria) this;
}
public Criteria andGasPriceVipIsNotNull() {
addCriterion("gas_price_vip is not null");
return (Criteria) this;
}
public Criteria andGasPriceVipEqualTo(BigDecimal value) {
addCriterion("gas_price_vip =", value, "gasPriceVip");
return (Criteria) this;
}
public Criteria andGasPriceVipNotEqualTo(BigDecimal value) {
addCriterion("gas_price_vip <>", value, "gasPriceVip");
return (Criteria) this;
}
public Criteria andGasPriceVipGreaterThan(BigDecimal value) {
addCriterion("gas_price_vip >", value, "gasPriceVip");
return (Criteria) this;
}
public Criteria andGasPriceVipGreaterThanOrEqualTo(BigDecimal value) {
addCriterion("gas_price_vip >=", value, "gasPriceVip");
return (Criteria) this;
}
public Criteria andGasPriceVipLessThan(BigDecimal value) {
addCriterion("gas_price_vip <", value, "gasPriceVip");
return (Criteria) this;
}
public Criteria andGasPriceVipLessThanOrEqualTo(BigDecimal value) {
addCriterion("gas_price_vip <=", value, "gasPriceVip");
return (Criteria) this;
}
public Criteria andGasPriceVipIn(List<BigDecimal> values) {
addCriterion("gas_price_vip in", values, "gasPriceVip");
return (Criteria) this;
}
public Criteria andGasPriceVipNotIn(List<BigDecimal> values) {
addCriterion("gas_price_vip not in", values, "gasPriceVip");
return (Criteria) this;
}
public Criteria andGasPriceVipBetween(BigDecimal value1, BigDecimal value2) {
addCriterion("gas_price_vip between", value1, value2, "gasPriceVip");
return (Criteria) this;
}
public Criteria andGasPriceVipNotBetween(BigDecimal value1, BigDecimal value2) {
addCriterion("gas_price_vip not between", value1, value2, "gasPriceVip");
return (Criteria) this;
}
public Criteria andExt1IsNull() { public Criteria andExt1IsNull() {
addCriterion("ext_1 is null"); addCriterion("ext_1 is null");
return (Criteria) this; return (Criteria) this;

@ -22,6 +22,12 @@ public interface HighOrderService {
**/ **/
void insertOrder(HighOrder highOrder) throws Exception; void insertOrder(HighOrder highOrder) throws Exception;
/**
* 修子订单信息
* @param highChildOrder
*/
void updateChildOrder(HighChildOrder highChildOrder);
/** /**
* @Author 胡锐 * @Author 胡锐
* @Description 金币支付订单 * @Description 金币支付订单

@ -135,6 +135,11 @@ public class HighOrderServiceImpl implements HighOrderService {
} }
} }
@Override
public void updateChildOrder(HighChildOrder highChildOrder) {
highChildOrderMapper.updateByPrimaryKey(highChildOrder);
}
@Override @Override
@Transactional(propagation= Propagation.REQUIRES_NEW) @Transactional(propagation= Propagation.REQUIRES_NEW)
public void goldPayOrder(Long userId, Long orderId) { public void goldPayOrder(Long userId, Long orderId) {

@ -7,8 +7,10 @@ import com.hai.common.exception.SysCode;
import com.hai.common.pay.util.XmlUtil; import com.hai.common.pay.util.XmlUtil;
import com.hai.common.pay.util.sdk.WXPayConstants; import com.hai.common.pay.util.sdk.WXPayConstants;
import com.hai.common.utils.WxUtils; import com.hai.common.utils.WxUtils;
import com.hai.config.TuanYouConfig;
import com.hai.dao.HighUserCouponMapper; import com.hai.dao.HighUserCouponMapper;
import com.hai.entity.*; import com.hai.entity.*;
import com.hai.model.HighMerchantStoreModel;
import com.hai.model.ResultProfitSharing; import com.hai.model.ResultProfitSharing;
import com.hai.service.*; import com.hai.service.*;
import com.hai.service.pay.PayService; import com.hai.service.pay.PayService;
@ -59,6 +61,9 @@ public class GoodsOrderServiceImpl implements PayService {
@Resource @Resource
private HighUserCouponMapper highUserCouponMapper; private HighUserCouponMapper highUserCouponMapper;
@Resource
private HighMerchantStoreService highMerchantStoreService;
@Resource @Resource
private HighProfitSharingRecordService highProfitSharingRecordService; private HighProfitSharingRecordService highProfitSharingRecordService;
@ -125,6 +130,29 @@ public class GoodsOrderServiceImpl implements PayService {
Integer goldNum = new BigDecimal(highChildOrder.getTotalPrice().toString()).multiply(new BigDecimal("100")).intValue(); Integer goldNum = new BigDecimal(highChildOrder.getTotalPrice().toString()).multiply(new BigDecimal("100")).intValue();
highUserService.goldHandle(highChildOrder.getGoodsId(), goldNum, 1, 1, highChildOrder.getId()); highUserService.goldHandle(highChildOrder.getGoodsId(), goldNum, 1, 1, highChildOrder.getId());
} }
if (highChildOrder.getGoodsType() == 3) {
highChildOrder.setChildOrdeStatus(3);
HighMerchantStoreModel store = highMerchantStoreService.getMerchantStoreById(highChildOrder.getGoodsId());
// 推送团油订单
Map<String,Object> paramMap = new HashMap<>();
paramMap.put("gasId", store.getStoreKey());
paramMap.put("oilNo", highChildOrder.getGasOilNo());
paramMap.put("gunNo", highChildOrder.getGasGunNo());
BigDecimal priceGun = highChildOrder.getGasPriceGun();
BigDecimal priceVip = highChildOrder.getGasPriceVip();
paramMap.put("priceGun", priceGun); // 枪单价
paramMap.put("priceVip", priceVip); // 优惠价
paramMap.put("driverPhone", order.getMemPhone());
paramMap.put("thirdSerialNo", order.getOrderNo());
BigDecimal refuelingAmount = new BigDecimal(highChildOrder.getTotalPrice().toString()).divide(priceGun,2,BigDecimal.ROUND_HALF_UP).multiply(priceVip).setScale(2,BigDecimal.ROUND_HALF_UP);
paramMap.put("refuelingAmount", refuelingAmount);
JSONObject orderPushObject = TuanYouConfig.refuelingOrderPush(paramMap);
if (orderPushObject != null || orderPushObject.getString("code").equals("200")) {
highChildOrder.setGasOrderNo(orderPushObject.getJSONObject("result").getString("orderNo"));
}
highOrderService.updateChildOrder(highChildOrder);
}
} }
highOrderService.updateOrder(order); highOrderService.updateOrder(order);
@ -141,9 +169,6 @@ public class GoodsOrderServiceImpl implements PayService {
// 计算分账金额 手续费后的价格 * 0.01 注:如果与两个相邻数字的距离相等,则为上舍入的舍入模式。 // 计算分账金额 手续费后的价格 * 0.01 注:如果与两个相邻数字的距离相等,则为上舍入的舍入模式。
BigDecimal profitSharingAmount = price.multiply(rake).setScale(2,BigDecimal.ROUND_DOWN); BigDecimal profitSharingAmount = price.multiply(rake).setScale(2,BigDecimal.ROUND_DOWN);
this.wxProfitsharing(order.getPaySerialNo(),order.getOrderNo(),profitSharingAmount); this.wxProfitsharing(order.getPaySerialNo(),order.getOrderNo(),profitSharingAmount);
} catch (InterruptedException e) { } catch (InterruptedException e) {
e.printStackTrace(); e.printStackTrace();
} }

@ -0,0 +1,3 @@
tuanYouUrl=https://test02-motorcade-hcs.czb365.com
tuanYouAppKey=208241666939552
tuanYouAppSecret=adecc3cff077834cb8632c8ab3bec0e6

@ -0,0 +1,3 @@
tuanYouUrl=https://test04-motorcade-hcs.czb365.com
tuanYouAppKey=208241666939552
tuanYouAppSecret=adecc3cff077834cb8632c8ab3bec0e6
Loading…
Cancel
Save