Merge branch '2.0-master' into 2.0-dev

new-dev
袁野 1 year ago
commit eee564380e
  1. 2
      hai-service/src/main/java/com/hai/config/ThirdProductConfig.java
  2. 2
      hai-service/src/main/java/com/hai/entity/ApiStarbucksProductsExample.java
  3. 6
      hai-service/src/main/java/com/hai/order/service/impl/OrderCreateHandleServiceImpl.java
  4. 5
      hai-service/src/main/java/com/hai/service/BsConfigService.java
  5. 62
      hai-service/src/main/java/com/hai/service/BsPushScheduleTaskService.java
  6. 51
      hai-service/src/main/java/com/hai/service/impl/BsConfigServiceImpl.java
  7. 35
      hai-service/src/main/java/com/hai/service/impl/BsPushScheduleTaskServiceImpl.java
  8. 8
      hai-service/src/main/java/com/hai/service/impl/HighDiscountAgentCodeServiceImpl.java

@ -120,7 +120,7 @@ public class ThirdProductConfig {
} else {
object.put("productPayType" , bsConfigService.getProductPayTypeByMap(listMap));
}
object.put("productPayTypeNew" , bsConfigService.getProductPayTypeNewByMap(listMap));
object.put("productPlatform" , bsConfigService.getProductPlatformByMap(listMap));
return object;

@ -1921,4 +1921,4 @@ public class ApiStarbucksProductsExample {
this(condition, value, secondValue, null);
}
}
}
}

@ -217,6 +217,12 @@ public class OrderCreateHandleServiceImpl implements OrderCreateHandleService {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, response.getString("msg"));
}
childOrder.setChannelOrderNo(response.getJSONObject("data").getString("rechargeOrderId"));
} else if (coupon.getCouponSource().equals(5)) {
// 重庆中石油业务状态
SecConfig cqCnpcStatus = secConfigService.findByCodeType("CQ_CNPC_STATUS_" + coupon.getCouponKey());
if (cqCnpcStatus != null && StringUtils.isNotBlank(cqCnpcStatus.getCodeValue())) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, cqCnpcStatus.getCodeValue());
}
}
// 校验优惠券是否可用 如果使用优惠券就只能使用卡券的原价

@ -1,9 +1,11 @@
package com.hai.service;
import com.alibaba.fastjson.JSONObject;
import com.hai.entity.BsProductDiscount;
import com.hai.entity.BsProductPayType;
import com.hai.entity.BsProductPlatform;
import java.util.List;
import java.util.Map;
/**
@ -45,4 +47,7 @@ public interface BsConfigService {
*/
String getProductPayTypeByMap(Map<String, Object> map);
List<BsProductPayType> getProductPayTypeNewByMap(Map<String, Object> map);
}

@ -0,0 +1,62 @@
package com.hai.service;
import com.hai.entity.BsMsg;
import com.hai.entity.BsPushScheduleTask;
import com.hai.entity.HighUser;
import java.util.List;
import java.util.Map;
/**
* @serviceName BsPushScheduleTaskService.java
* @author Sum1Dream
* @version 1.0.0
* @Description // 定时发布任务功能
* @createTime 15:41 2023/6/27
**/
public interface BsPushScheduleTaskService {
/**
* @Author Sum1Dream
* @Name insertPushScheduleTask
* @Description // 新增发布任务
* @Date 18:06 2023/6/28
* @Param [bsPushScheduleTask]
* @Return void
*/
void insertPushScheduleTask(BsPushScheduleTask bsPushScheduleTask);
/**
* @Author Sum1Dream
* @Name updatePushScheduleTask
* @Description // 更新发布任务
* @Date 18:07 2023/6/28
* @Param [bsPushScheduleTask5]
* @Return void
*/
void updatePushScheduleTask(BsPushScheduleTask bsPushScheduleTask5);
/**
* @Author Sum1Dream
* @Name findPushScheduleTask
* @Description // 查询发布任务详情
* @Date 18:07 2023/6/28
* @Param [id]
* @Return com.hai.entity.BsMsg
*/
BsMsg findPushScheduleTask(Long id);
/**
* @Author Sum1Dream
* @Name getPushScheduleTaskByList
* @Description // 查询发布任务列表
* @Date 18:07 2023/6/28
* @Param [map]
* @Return java.util.List<com.hai.entity.BsMsg>
*/
List<BsMsg> getPushScheduleTaskByList(Map<String , Object> map);
}

@ -1,5 +1,6 @@
package com.hai.service.impl;
import com.alibaba.fastjson.JSONObject;
import com.hai.dao.BsProductDiscountMapper;
import com.hai.dao.BsProductPayTypeMapper;
import com.hai.dao.BsProductPlatformMapper;
@ -9,6 +10,7 @@ import org.apache.commons.collections4.MapUtils;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
@ -121,4 +123,53 @@ public class BsConfigServiceImpl implements BsConfigService {
}
}
@Override
public List<BsProductPayType> getProductPayTypeNewByMap(Map<String, Object> map) {
try {
BsProductPayTypeExample example = new BsProductPayTypeExample();
BsProductPayTypeExample.Criteria criteria = example.createCriteria();
// 获取平台编码
Integer platformId = MapUtils.getInteger(map , "platformId");
if (MapUtils.getInteger(map , "productType") != null) {
criteria.andProductTypeEqualTo(MapUtils.getInteger(map , "productType"));
}
if (MapUtils.getLong(map , "sourceId") != null) {
criteria.andSourceIdEqualTo(MapUtils.getLong(map , "sourceId"));
}
List<BsProductPayType> list = bsProductPayTypeMapper.selectByExample(example);
List<BsProductPayType> productPayTypes = new ArrayList<>();
// 1:支付宝 2:微信 3:汇联通工会卡 4:银联 5:银联分期 6 嗨森逛油卡 7:嗨森逛车队油卡 8:积分兑换
for (BsProductPayType productPayType : list) {
// platformId 1:小程序 2:h5 3:银联
if (platformId != null) {
if (platformId == 1 || platformId == 2) {
if (!(productPayType.getPayTypeId() == 4 || productPayType.getPayTypeId() == 5 )) {
productPayTypes.add(productPayType);
}
} else if (platformId == 3) {
if (productPayType.getPayTypeId() != 2) {
productPayTypes.add(productPayType);
}
}
}
}
return productPayTypes;
} catch (Exception e) {
System.out.println(e);
return null;
}
}
}

@ -0,0 +1,35 @@
package com.hai.service.impl;
import com.hai.entity.BsMsg;
import com.hai.entity.BsPushScheduleTask;
import com.hai.service.BsPushScheduleTaskService;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.List;
import java.util.Map;
@Service("bsPushScheduleTaskService")
public class BsPushScheduleTaskServiceImpl implements BsPushScheduleTaskService {
@Override
public void insertPushScheduleTask(BsPushScheduleTask bsPushScheduleTask) {
}
@Override
public void updatePushScheduleTask(BsPushScheduleTask bsPushScheduleTask5) {
}
@Override
public BsMsg findPushScheduleTask(Long id) {
return null;
}
@Override
public List<BsMsg> getPushScheduleTaskByList(Map<String, Object> map) {
return null;
}
}

@ -78,6 +78,9 @@ public class HighDiscountAgentCodeServiceImpl implements HighDiscountAgentCodeSe
@Resource
private RedisTemplate redisTemplate;
@Resource
private SecConfigService secConfigService;
@Override
public void insertCodeList(List<HighDiscountAgentCode> discountAgentCodeList) {
highDiscountAgentCodeMapper.insertListCode(discountAgentCodeList);
@ -258,6 +261,11 @@ public class HighDiscountAgentCodeServiceImpl implements HighDiscountAgentCodeSe
if (couponList.size() == 0) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "优惠券未配置重庆中石油卡券");
}
// 重庆中石油业务状态
SecConfig cqCnpcStatus = secConfigService.findByCodeType("CQ_CNPC_STATUS_" + couponList.get(0).getHighCoupon().getCouponKey());
if (cqCnpcStatus != null && StringUtils.isNotBlank(cqCnpcStatus.getCodeValue())) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, cqCnpcStatus.getCodeValue());
}
String tradeId = discountAgentCode.getId()+""+System.currentTimeMillis()+"";
// 预发码
JSONObject preSendCoupon = ChongQingCNPCService.preSendCoupon(couponList.get(0).getHighCoupon().getCouponKey(), tradeId, 1, userModel.getHighUser().getPhone());

Loading…
Cancel
Save