Merge branch 'master' into dev_yy

* master:
  修改话费定时任务问题
  提交代码
  修改话费定时任务问题
  提交代码
  提交代码
  修改话费定时任务问题
  提交代码
  提交代码

# Conflicts:
#	hai-service/src/main/java/com/hai/service/impl/BsIntegralRebateServiceImpl.java
dev-discount
袁野 2 years ago
commit dbd98fdf32
  1. 4
      hai-bweb/src/main/java/com/bweb/controller/BsIntegralRebateController.java
  2. 18
      hai-cweb/src/main/java/com/cweb/controller/HighOrderController.java
  3. 2
      hai-cweb/src/main/java/com/cweb/controller/HighTestController.java
  4. 5
      hai-schedule/src/main/java/com/hai/schedule/HighGasSchedule.java
  5. 1
      hai-schedule/src/main/java/com/hai/schedule/HighOrderSchedule.java
  6. 5
      hai-service/src/main/java/com/hai/config/ThirdProductConfig.java
  7. 3
      hai-service/src/main/java/com/hai/dao/HighOrderMapperExt.java
  8. 27
      hai-service/src/main/java/com/hai/model/GasOrderModel.java
  9. 5
      hai-service/src/main/java/com/hai/service/impl/BsIntegralRebateServiceImpl.java
  10. 9
      hai-service/src/main/java/com/hai/service/impl/HighOrderServiceImpl.java
  11. 2
      hai-service/src/main/resources/prod-9401/commonConfig.properties
  12. 2
      hai-service/src/main/resources/prod/commonConfig.properties

@ -96,6 +96,8 @@ public class BsIntegralRebateController {
if (integralRebate.getPercentage() == null || if (integralRebate.getPercentage() == null ||
integralRebate.getType() == null || integralRebate.getType() == null ||
integralRebate.getStartTime() == null ||
integralRebate.getEndTime() == null ||
integralRebate.getProductId() == null integralRebate.getProductId() == null
) { ) {
log.error("OutRechargePriceController -> insertPrice() error!"); log.error("OutRechargePriceController -> insertPrice() error!");
@ -142,6 +144,8 @@ public class BsIntegralRebateController {
if (integralRebate.getPercentage() == null || if (integralRebate.getPercentage() == null ||
integralRebate.getId() == null || integralRebate.getId() == null ||
integralRebate.getStartTime() == null ||
integralRebate.getEndTime() == null ||
integralRebate.getType() == null || integralRebate.getType() == null ||
integralRebate.getProductId() == null integralRebate.getProductId() == null
) { ) {

@ -233,7 +233,6 @@ public class HighOrderController {
log.error("HighOrderController --> addOrder() error!", "未找到用户"); log.error("HighOrderController --> addOrder() error!", "未找到用户");
throw ErrorHelp.genException(SysCode.System, ErrorCode.UN_MEMBER_ERROR, ""); throw ErrorHelp.genException(SysCode.System, ErrorCode.UN_MEMBER_ERROR, "");
} }
highOrder.setPayType(2); // 第三方平台
childOrder.setGoodsActualPrice(childOrder.getGoodsPrice()); childOrder.setGoodsActualPrice(childOrder.getGoodsPrice());
childOrder.setGoodsName(user.getName()); childOrder.setGoodsName(user.getName());
childOrder.setGoodsImg(user.getHeaderImg()); childOrder.setGoodsImg(user.getHeaderImg());
@ -306,8 +305,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, "未找到门店信息");
} }
highOrder.setPayType(2); // 第三方平台
if (highOrder.getIsTyAgent() != null && highOrder.getIsTyAgent().equals(true)) { if (highOrder.getIsTyAgent() != null && highOrder.getIsTyAgent().equals(true)) {
// 查询加油站 // 查询加油站
HighTyAgentOilStation oilStation = tyAgentOilStationService.getDetailByOilStationId(childOrder.getGoodsId()); HighTyAgentOilStation oilStation = tyAgentOilStationService.getDetailByOilStationId(childOrder.getGoodsId());
@ -330,15 +327,15 @@ public class HighOrderController {
childOrder.setGoodsActualPrice(childOrder.getGoodsPrice()); childOrder.setGoodsActualPrice(childOrder.getGoodsPrice());
// 油价信息 // 油价信息
childOrder.setGasPriceGun(priceModel.getPriceGun()); childOrder.setGasPriceGun(priceModel.getPriceGun());
childOrder.setGasPriceVip(priceModel.getPriceVip()); childOrder.setGasPriceVip(priceModel.getPriceGun());
childOrder.setGasPriceOfficial(priceModel.getPriceOfficial()); childOrder.setGasPriceOfficial(new BigDecimal("0"));
childOrder.setGasPricePlatform(priceModel.getPriceVip()); childOrder.setGasPricePlatform(priceModel.getPriceGun());
childOrder.setGasOilLiters(priceModel.getOilLiters()); childOrder.setGasOilLiters(priceModel.getOilLiters());
childOrder.setGasDiscount(new BigDecimal("0")); childOrder.setGasDiscount(new BigDecimal("0"));
childOrder.setExt1(childOrder.getGasPricePlatform().toString()); childOrder.setExt1(childOrder.getGasPricePlatform().toString());
childOrder.setGasOilSubsidy(new BigDecimal("0")); childOrder.setGasOilSubsidy(new BigDecimal("0"));
childOrder.setGasLitersPreferences(new BigDecimal("0")); childOrder.setGasLitersPreferences(new BigDecimal("0"));
childOrder.setGasPricePreferences(priceModel.getPriceVip()); childOrder.setGasPricePreferences(priceModel.getPriceGun());
} else { } else {
// 支付价格 // 支付价格
childOrder.setGoodsActualPrice(priceModel.getPayPrice()); childOrder.setGoodsActualPrice(priceModel.getPayPrice());
@ -445,10 +442,11 @@ public class HighOrderController {
} }
} }
SecRegion region = commonService.getParentByRegion(Long.valueOf(request.getHeader("regionId")));
BsCompany bsCompany = bsCompanyService.selectCompanyByRegion(region.getRegionId().toString());
if (bsCompany != null) {
if (request.getHeader("regionId") != null) {
SecRegion region = commonService.getParentByRegion(Long.valueOf(request.getHeader("regionId")));
BsCompany bsCompany = bsCompanyService.selectCompanyByRegion(region.getRegionId().toString());
highOrder.setCompanyId(bsCompany.getId()); highOrder.setCompanyId(bsCompany.getId());
} }

File diff suppressed because one or more lines are too long

@ -156,6 +156,11 @@ public class HighGasSchedule {
gasService.getJiaHaoYouAllStation(); gasService.getJiaHaoYouAllStation();
} }
@Scheduled(cron = "0 1 0 * * ?") //每日凌晨12点01分执行一次
public void getJinZhuAllStation() throws Exception {
gasService.getJinZhuAllStation();
}
/* @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();

@ -452,6 +452,7 @@ public class HighOrderSchedule {
object.put("userId" , highOrder.getMemId()); object.put("userId" , highOrder.getMemId());
object.put("orderId" , highOrder.getId()); object.put("orderId" , highOrder.getId());
object.put("companyId" , highOrder.getCompanyId()); object.put("companyId" , highOrder.getCompanyId());
object.put("createTime" , highOrder.getCreateTime());
bsIntegralRebateService.integralRebate(object); bsIntegralRebateService.integralRebate(object);

@ -9,9 +9,7 @@ import org.springframework.stereotype.Component;
import javax.annotation.Resource; import javax.annotation.Resource;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.util.HashMap; import java.util.*;
import java.util.List;
import java.util.Map;
/** /**
* @author hurui * @author hurui
@ -78,4 +76,5 @@ public class ThirdProductConfig {
return object; return object;
} }
} }

@ -1154,9 +1154,12 @@ public interface HighOrderMapperExt {
" b.id orderId," + " b.id orderId," +
" b.order_no orderNo," + " b.order_no orderNo," +
" a.gas_order_no gasOrderNo," + " a.gas_order_no gasOrderNo," +
" b.mem_discount_name memDiscountName," +
" b.pay_type payType," + " b.pay_type payType," +
" b.total_price totalPrice," + " b.total_price totalPrice," +
" b.deduction_price deductionPrice," + " b.deduction_price deductionPrice," +
" b.payable_price payablePrice," +
" b.pay_gold payGold," +
" b.pay_real_price payRealPrice," + " b.pay_real_price payRealPrice," +
" b.order_status status," + " b.order_status status," +
" REPLACE(b.mem_phone, SUBSTR(b.mem_phone,4,4), '****') merPhone," + " REPLACE(b.mem_phone, SUBSTR(b.mem_phone,4,4), '****') merPhone," +

@ -12,9 +12,12 @@ public class GasOrderModel {
private Long orderId; private Long orderId;
private String orderNo; private String orderNo;
private String gasOrderNo; private String gasOrderNo;
private String memDiscountName;
private Integer payType; private Integer payType;
private BigDecimal totalPrice; private BigDecimal totalPrice;
private BigDecimal deductionPrice; private BigDecimal deductionPrice;
private BigDecimal payablePrice;
private BigDecimal payGold;
private BigDecimal payRealPrice; private BigDecimal payRealPrice;
private Integer status; private Integer status;
private String merPhone; private String merPhone;
@ -39,6 +42,30 @@ public class GasOrderModel {
private Boolean printStatus; private Boolean printStatus;
private Integer printNum; private Integer printNum;
public BigDecimal getPayablePrice() {
return payablePrice;
}
public void setPayablePrice(BigDecimal payablePrice) {
this.payablePrice = payablePrice;
}
public BigDecimal getPayGold() {
return payGold;
}
public void setPayGold(BigDecimal payGold) {
this.payGold = payGold;
}
public String getMemDiscountName() {
return memDiscountName;
}
public void setMemDiscountName(String memDiscountName) {
this.memDiscountName = memDiscountName;
}
public String getGasStaffName() { public String getGasStaffName() {
return gasStaffName; return gasStaffName;
} }

@ -1,6 +1,7 @@
package com.hai.service.impl; package com.hai.service.impl;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.hai.common.utils.DateUtil;
import com.hai.dao.BsIntegralRebateMapper; import com.hai.dao.BsIntegralRebateMapper;
import com.hai.entity.BsIntegralRebate; import com.hai.entity.BsIntegralRebate;
import com.hai.entity.BsIntegralRebateExample; import com.hai.entity.BsIntegralRebateExample;
@ -103,16 +104,16 @@ public class BsIntegralRebateServiceImpl implements BsIntegralRebateService {
BsIntegralRebate bsIntegralRebate = findIntegralRebateByMap(map); BsIntegralRebate bsIntegralRebate = findIntegralRebateByMap(map);
if (bsIntegralRebate != null) { if (DateUtil.isEffectiveDate(object.getDate("createTime"), bsIntegralRebate.getStartTime() , bsIntegralRebate.getEndTime())) {
BigDecimal integralNum = object.getBigDecimal("price").multiply(bsIntegralRebate.getPercentage()).setScale( 0, BigDecimal.ROUND_HALF_UP ); BigDecimal integralNum = object.getBigDecimal("price").multiply(bsIntegralRebate.getPercentage()).setScale( 0, BigDecimal.ROUND_HALF_UP );
HighOrder order = highOrderService.getOrderById(object.getLong("orderId")); HighOrder order = highOrderService.getOrderById(object.getLong("orderId"));
highUserService.goldHandle(object.getLong("userId"), integralNum.intValue(), 1, 4, object.getLong("orderId") , object.getString("remark") + integralNum); highUserService.goldHandle(object.getLong("userId"), integralNum.intValue(), 1, 4, object.getLong("orderId") , object.getString("remark") + integralNum);
} }
} }
} }

@ -312,10 +312,11 @@ public class HighOrderServiceImpl implements HighOrderService {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "支付的积分金额大于支付金额"); throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "支付的积分金额大于支付金额");
} }
// 应付金额 减去 积分抵扣金额 = 支付金额
highOrder.setPayPrice(highOrder.getPayablePrice().subtract(goldPrice));
// 积分金额小于应付金额 // 积分金额小于应付金额
if (goldPrice.compareTo(highOrder.getPayablePrice()) == -1) { if (goldPrice.compareTo(highOrder.getPayablePrice()) == -1) {
// 应付金额 减去 积分抵扣金额 = 支付金额
highOrder.setPayPrice(highOrder.getPayablePrice().subtract(goldPrice));
updateOrderDetail(highOrder); updateOrderDetail(highOrder);
// 扣除用户积分 // 扣除用户积分
@ -334,7 +335,7 @@ public class HighOrderServiceImpl implements HighOrderService {
throw ErrorHelp.genException(SysCode.System, ErrorCode.NOT_SET_USER_PAY_PWD, ""); throw ErrorHelp.genException(SysCode.System, ErrorCode.NOT_SET_USER_PAY_PWD, "");
} }
// 校验支付密码是否正确 // 校验支付密码是否正确
if (userPayPwd.getPassword().equals(AESEncodeUtil.aesEncrypt(highOrder.getPayPwd()))) { if (!userPayPwd.getPassword().equals(AESEncodeUtil.aesEncrypt(highOrder.getPayPwd()))) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.USER_PAY_PWD_ERROR, ""); throw ErrorHelp.genException(SysCode.System, ErrorCode.USER_PAY_PWD_ERROR, "");
} }
// 扣除用户积分 // 扣除用户积分
@ -342,7 +343,9 @@ public class HighOrderServiceImpl implements HighOrderService {
"抵扣积分订单:" + highOrder.getOrderNo() + ",使用积分:" + highOrder.getPayGold()); "抵扣积分订单:" + highOrder.getOrderNo() + ",使用积分:" + highOrder.getPayGold());
highOrder.setOrderStatus(OrderStatusEnum.type3.getType()); highOrder.setOrderStatus(OrderStatusEnum.type3.getType());
highOrder.setPayRealPrice(highOrder.getPayPrice());
highOrder.setPayTime(new Date()); highOrder.setPayTime(new Date());
for (HighChildOrder childOrder : highOrder.getHighChildOrderList()) { for (HighChildOrder childOrder : highOrder.getHighChildOrderList()) {
childOrder.setChildOrdeStatus(3); childOrder.setChildOrdeStatus(3);
} }

@ -33,7 +33,7 @@ qianzhuOrderNotify=https://hsg.dctpay.com/crest/qianzhu/orderNotify
thirdAppKey=211394653 thirdAppKey=211394653
thirdAppSecret=cyQpQKMaGUG186iEZRt1uQ== thirdAppSecret=cyQpQKMaGUG186iEZRt1uQ==
thirdPostUrl=http://mbsmemberwebapi.test.onfishes.com/ thirdPostUrl=http://mbapiq.mbs.scyshy.com/
huiliantongUrl=https://gzapi.deepermobile.com.cn huiliantongUrl=https://gzapi.deepermobile.com.cn

@ -32,7 +32,7 @@ qianzhuOrderNotify=https://hsg.dctpay.com/crest/qianzhu/orderNotify
thirdAppKey=211395334 thirdAppKey=211395334
thirdAppSecret=VxNTJua4FkmRVgIm8HgCSg== thirdAppSecret=VxNTJua4FkmRVgIm8HgCSg==
thirdPostUrl=http://mbsmemberclient.scyshy.com/ thirdPostUrl=http://mbapiq.mbs.scyshy.com/
huiliantongUrl=https://gzapi.deepermobile.com.cn huiliantongUrl=https://gzapi.deepermobile.com.cn
huiliantongAppNo=guizhouhuilt huiliantongAppNo=guizhouhuilt

Loading…
Cancel
Save