分销代码

dev-discount
袁野 2 years ago
parent 51ba4959cc
commit e66833057c
  1. 2
      hai-cweb/src/main/resources/dev/config.properties
  2. 2
      hai-cweb/src/main/resources/prod-9401/config.properties
  3. 2
      hai-cweb/src/main/resources/prod/config.properties
  4. 8
      hai-schedule/src/main/java/com/hai/schedule/HighOrderSchedule.java
  5. 3
      hai-service/src/main/java/com/hai/service/impl/BsDistributionUserRelServiceImpl.java
  6. 11
      hai-service/src/main/java/com/hai/service/impl/BsIntegralRebateServiceImpl.java
  7. 6
      hai-service/src/main/java/com/hai/service/impl/HighOrderServiceImpl.java

@ -24,4 +24,4 @@ fileUrl=/home/project/hsg/filesystem
cmsPath=/home/project/hsg/filesystem/cmsPath
couponCodePath=/home/project/hsg/filesystem/couponCode
qrCodeUrl=https://hsgcs.dctpay.com/hsgH5?accountId=000009&key=&code=
qrCodeUrl=https://hsgcs.dctpay.com/hsgH5?accountId=0000010&key=&code=

@ -23,4 +23,4 @@ cmsPath=/home/project/hsg/filesystem/cmsPath
couponCodePath=/home/project/hsg/filesystem/couponCode
qrCodeUrl=https://hsg.dctpay.com/hsgH5?accountId=000009&key=&code=
qrCodeUrl=https://hsg.dctpay.com/hsgH5?accountId=0000010&key=&code=

@ -25,4 +25,4 @@ cmsPath=/home/project/hsg/filesystem/cmsPath
couponCodePath=/home/project/hsg/filesystem/couponCode
qrCodeUrl=https://hsg.dctpay.com/hsgH5?accountId=000009&key=&code=
qrCodeUrl=https://hsg.dctpay.com/hsgH5?accountId=0000010&key=&code=

@ -431,6 +431,14 @@ public class HighOrderSchedule {
}
}
}
/**
* @Author Sum1Dream
* @name integralRebateOrder.java
* @Description // 执行返利操作
* @Date 15:13 2022/8/22
* @Param []
* @return void
*/
@Scheduled(cron="0 0/1 * * * ?") //每1分钟执行一次
public void integralRebateOrder() {
List<HighOrder> order = highOrderService.integralRebateOrder();

@ -56,7 +56,7 @@ public class BsDistributionUserRelServiceImpl implements BsDistributionUserRelSe
map.put("userId" , popularizeUserId);
BsDistributionUserRel popularizeUser = findDistributionUserRel(map);
if (pUser != null) {
if (pUser.getIsAgent() != null) {
distributionUserRel.setAgentId(pUser.getId());
distributionUserRel.setAgentName(pUser.getName());
@ -108,6 +108,7 @@ public class BsDistributionUserRelServiceImpl implements BsDistributionUserRelSe
}
}).start();
}
}

@ -118,16 +118,8 @@ public class BsIntegralRebateServiceImpl implements BsIntegralRebateService {
BigDecimal integralNumFirst = object.getBigDecimal("price").multiply(bsIntegralRebate.getFirstDistribution()).setScale( 0, BigDecimal.ROUND_HALF_UP );
BigDecimal integralNumSecond = object.getBigDecimal("price").multiply(bsIntegralRebate.getSecondDistribution()).setScale( 0, BigDecimal.ROUND_HALF_UP );
/*
HighOrder order = highOrderService.getOrderById(object.getLong("orderId"));
*/
order.setWhetherRebate(true);
highOrderService.updateOrder(order);
highUserService.goldHandle(object.getLong("userId"), integralNum.intValue(), 1, 4, object.getLong("orderId") , object.getString("remark") + integralNum);
JSONObject jsonObject = new JSONObject();
jsonObject.put("integralNumFirst" , integralNumFirst);
@ -138,6 +130,9 @@ public class BsIntegralRebateServiceImpl implements BsIntegralRebateService {
jsonObject.put("logoImg" , object.getString("logoImg"));
bsDistributionUserRelService.distributionRebate(jsonObject);
highOrderService.updateOrder(order);
highUserService.goldHandle(object.getLong("userId"), integralNum.intValue(), 1, 4, object.getLong("orderId") , object.getString("remark") + integralNum);
}

@ -3013,10 +3013,10 @@ public class HighOrderServiceImpl implements HighOrderService {
HighCoupon coupon = highCouponService.getCouponById(goodsId);
object.put("type" , 1);
object.put("productId", coupon.getCouponSource());
object.put("productId", 1);
object.put("companyId", coupon.getCompanyId());
object.put("remark" , "卡券订单:"+ coupon + "-" + orderNo + "积分返利:");
object.put("name" , "购买卡券产品:"+ coupon);
object.put("remark" , "卡券订单:"+ coupon.getCouponName() + "-" + orderNo + "积分返利:");
object.put("name" , "购买卡券产品:"+ coupon.getCouponName());
}
if (goodsType == 3) {

Loading…
Cancel
Save