dev-discount
胡锐 2 years ago
commit 9072216f24
  1. 8
      hai-bweb/src/main/java/com/bweb/controller/BsIntegralRebateController.java
  2. 2
      hai-bweb/src/main/java/com/bweb/controller/HighTestController.java
  3. 11
      hai-cweb/src/main/java/com/cweb/controller/CmsContentController.java
  4. 2
      hai-cweb/src/main/java/com/cweb/controller/CommonController.java
  5. 2
      hai-schedule/src/main/java/com/hai/schedule/HighOrderSchedule.java
  6. 2
      hai-schedule/src/main/resources/dev/application.yml
  7. 10
      hai-service/src/main/java/com/hai/service/HighOrderService.java
  8. 2
      hai-service/src/main/java/com/hai/service/impl/BsDistributionUserRelServiceImpl.java
  9. 4
      hai-service/src/main/java/com/hai/service/impl/BsIntegralRebateServiceImpl.java
  10. 29
      hai-service/src/main/java/com/hai/service/impl/HighOrderServiceImpl.java
  11. 1
      hai-service/src/main/java/com/hai/service/impl/HighUserServiceImpl.java

@ -105,8 +105,8 @@ public class BsIntegralRebateController {
Map<String, Object> map = new HashMap<>();
map.put("type" , integralRebate.getType());
map.put("productId" , integralRebate.getProductId());
map.put("companyId" , userInfoModel.getBsCompany().getId());
map.put("status" , 101);
BsIntegralRebate bsIntegralRebate = bsIntegralRebateService.findIntegralRebateByMap(map);
@ -145,8 +145,7 @@ public class BsIntegralRebateController {
integralRebate.getId() == null ||
integralRebate.getStartTime() == null ||
integralRebate.getEndTime() == null ||
integralRebate.getType() == null ||
integralRebate.getProductId() == null
integralRebate.getType() == null
) {
log.error("OutRechargePriceController -> insertPrice() error!");
throw ErrorHelp.genException(SysCode.System, ErrorCode.REQ_PARAMS_ERROR, "");
@ -154,7 +153,8 @@ public class BsIntegralRebateController {
Map<String, Object> map = new HashMap<>();
map.put("type" , integralRebate.getType());
map.put("productId" , integralRebate.getProductId());
map.put("companyId" , userInfoModel.getBsCompany().getId());
map.put("status" , 101);
BsIntegralRebate bsIntegralRebate = bsIntegralRebateService.findIntegralRebateByMap(map);

File diff suppressed because one or more lines are too long

@ -49,9 +49,6 @@ public class CmsContentController {
@Resource
private BsMsgService bsMsgService;
@Autowired
private RedisUtil redisUtil;
@Autowired
private UserCenter userCenter;
@ -142,9 +139,17 @@ public class CmsContentController {
}
object.put("childDate" , list);
}
if (cmsCategory.getType() == 3 || cmsCategory.getType() == 6 || cmsCategory.getType() == 9) {
if (object.getJSONArray("childDate").size() >0) {
objectList.add(object);
}
} else {
objectList.add(object);
}
}
return ResponseMsgUtil.success(objectList);
} else {
JSONObject object = new JSONObject();

@ -374,7 +374,6 @@ public class CommonController {
if (object.getInteger("type") == null ||
object.getLong("companyId") == null ||
object.getLong("productId") == null ||
object.getBigDecimal("price") == null
) {
log.error("CommonController -> getRebateIntegral() error!","请求参数校验失败");
@ -384,7 +383,6 @@ public class CommonController {
// 查询订单来源
Map<String, Object> map = new HashMap<>();
map.put("type" , object.getInteger("type"));
map.put("productId" , object.getLong("productId"));
map.put("companyId" , object.getLong("companyId"));
BsIntegralRebate bsIntegralRebate = bsIntegralRebateService.findIntegralRebateByMap(map);

@ -253,7 +253,7 @@ public class HighOrderSchedule {
* @Param []
* @return void
*/
@Scheduled(cron="0 0/1 * * * ?") //每 5分钟执行一次
@Scheduled(cron="0 0/1 * * * ?") //每 1分钟执行一次
public void integralRebateOrder() {
// 查询满足初步返利条件订单

@ -9,7 +9,7 @@ debug: false
#datasource数据源设置
spring:
datasource:
url: jdbc:mysql://139.159.177.244:3306/hsg_order?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false
url: jdbc:mysql://139.159.177.244:3306/hsg_2.0?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false
username: root
password: HF123456.
type: com.alibaba.druid.pool.DruidDataSource

@ -559,5 +559,15 @@ public interface HighOrderService {
* @return java.util.List<com.hai.entity.HighOrder>
*/
List<HighOrder> orderListByAgentId(Map<String , Object> map) throws Exception;
/**
* @Author Sum1Dream
* @Name phoneBillOrderMigration
* @Description // 话费订单迁移
* @Date 10:19 2023/2/2
* @Param [highOrder]
* @Return void
*/
void phoneBillOrderMigration(HighOrder highOrder);
}

@ -60,7 +60,7 @@ public class BsDistributionUserRelServiceImpl implements BsDistributionUserRelSe
BsDistributionUserRel popularizeUser = findDistributionUserRel(map);
if (pUser != null) {
if (pUser.getIsAgent() != null) {
if (pUser.getIsAgent()) {
distributionUserRel.setAgentId(pUser.getId());
distributionUserRel.setAgentName(pUser.getName());
} else {

@ -47,8 +47,8 @@ public class BsIntegralRebateServiceImpl implements BsIntegralRebateService {
if (MapUtils.getLong(map , "companyId") != null) {
criteria.andCompanyIdEqualTo(MapUtils.getLong(map , "companyId"));
}
if (MapUtils.getLong(map , "productId") != null) {
criteria.andProductIdEqualTo(MapUtils.getLong(map , "productId"));
if (MapUtils.getInteger(map , "status") != null) {
criteria.andStatusEqualTo(MapUtils.getInteger(map , "status"));
}
List<BsIntegralRebate> list = bsIntegralRebateMapper.selectByExample(example);

@ -16,10 +16,12 @@ import com.hai.common.utils.WxUtils;
import com.hai.config.*;
import com.hai.dao.*;
import com.hai.entity.*;
import com.hai.entity.OutRechargeOrder;
import com.hai.enum_type.*;
import com.hai.model.*;
import com.hai.msg.entity.MsgTopic;
import com.hai.order.type.OrderPayType;
import com.hai.order.utils.OrderUtil;
import com.hai.service.*;
import com.hai.service.pay.impl.GoodsOrderServiceImpl;
import org.apache.commons.collections4.MapUtils;
@ -2265,4 +2267,31 @@ public class HighOrderServiceImpl implements HighOrderService {
return null;
}
@Override
public void phoneBillOrderMigration(HighOrder highOrder) {
highOrderMapper.insert(highOrder);
HighChildOrder highChildOrder = new HighChildOrder();
highChildOrder.setOrderNo(highOrder.getOrderNo());
highChildOrder.setChildOrderNo(OrderUtil.generateChildOrderNo());
highChildOrder.setChildOrderStatus(highOrder.getOrderStatus());
highChildOrder.setTotalPrice(highOrder.getTotalPrice());
highChildOrder.setGoodsPrice(highOrder.getTotalPrice());
highChildOrder.setGoodsActualPrice(highOrder.getPayPrice());
highChildOrder.setGoodsName(highOrder.getTitle());
highChildOrder.setGoodsType(6);
highChildOrder.setSaleCount(1);
highChildOrder.setGiveawayType(false);
highChildOrder.setMemId(highOrder.getMemId());
highChildOrder.setTotalDeductionPrice(highOrder.getTotalDeductionPrice());
highChildOrder.setGoodsSpecName("话费充值");
highChildOrder.setCreateTime(highOrder.getCreateTime());
highChildOrder.setOrderId(highOrder.getId());
highChildOrder.setCancelTime(highOrder.getCancelTime());
highChildOrder.setFinishTime(highOrder.getFinishTime());
highChildOrder.setRefundTime(highOrder.getRefundTime());
highChildOrder.setPayTime(highOrder.getPayTime());
highChildOrderMapper.insert(highChildOrder);
}
}

@ -121,6 +121,7 @@ public class HighUserServiceImpl implements HighUserService {
}
SecRegion region = commonService.getRegionsByName(loginLog.getProvinceName());
// distributionUserRelService.insertDistributionRebate(user.getId(), popularizeUserId, "500000");
if (region != null) {
// 绑定推广关联关系
distributionUserRelService.insertDistributionRebate(user.getId(), popularizeUserId, region.getRegionId().toString());

Loading…
Cancel
Save