dev-discount
袁野 2 years ago
parent a4e7c3c890
commit affbe9a6d9
  1. 2
      hai-bweb/src/main/java/com/bweb/controller/OutRechargePriceController.java
  2. 27
      hai-order/src/main/java/com/web/controller/business/OrderThirdPartyController.java
  3. 4
      hai-service/src/main/java/com/hai/order/service/impl/OrderServiceImpl.java
  4. 2
      hai-service/src/main/java/com/hai/service/BsDistributionUserRelService.java
  5. 2
      hai-service/src/main/java/com/hai/service/HighUserService.java
  6. 2
      hai-service/src/main/java/com/hai/service/impl/BsConfigServiceImpl.java
  7. 10
      hai-service/src/main/java/com/hai/service/impl/BsDistributionUserRelServiceImpl.java
  8. 3
      hai-service/src/main/java/com/hai/service/impl/CommonServiceImpl.java
  9. 2
      hai-service/src/main/java/com/hai/service/impl/HighUserServiceImpl.java
  10. 3
      hai-service/src/main/java/com/hai/service/impl/OutRechargePriceServiceImpl.java

@ -98,7 +98,9 @@ public class OutRechargePriceController {
listMap.put("productType", "3"); listMap.put("productType", "3");
listMap.put("sourceId", list.getId()); listMap.put("sourceId", list.getId());
BeanUtils.copyProperties(list, outRechargePriceModel); BeanUtils.copyProperties(list, outRechargePriceModel);
if (bsConfigService.getProductDiscountByMap(listMap) != null) {
outRechargePriceModel.setIntegralDiscount(bsConfigService.getProductDiscountByMap(listMap).getDiscount()); outRechargePriceModel.setIntegralDiscount(bsConfigService.getProductDiscountByMap(listMap).getDiscount());
}
outRechargePriceModel.setProductPayTypeString(bsConfigService.getProductPayTypeByMap(listMap)); outRechargePriceModel.setProductPayTypeString(bsConfigService.getProductPayTypeByMap(listMap));
outRechargePriceModel.setProductPlatformString(bsConfigService.getProductPlatformByMap(listMap)); outRechargePriceModel.setProductPlatformString(bsConfigService.getProductPlatformByMap(listMap));
outRechargePriceModelList.add(outRechargePriceModel); outRechargePriceModelList.add(outRechargePriceModel);

@ -7,7 +7,6 @@ import com.hai.common.exception.ErrorHelp;
import com.hai.common.exception.SysCode; import com.hai.common.exception.SysCode;
import com.hai.common.security.UserCenter; import com.hai.common.security.UserCenter;
import com.hai.common.utils.ResponseMsgUtil; import com.hai.common.utils.ResponseMsgUtil;
import com.hai.entity.HighOrder;
import com.hai.enum_type.UserObjectTypeEnum; import com.hai.enum_type.UserObjectTypeEnum;
import com.hai.model.ResponseData; import com.hai.model.ResponseData;
import com.hai.model.UserInfoModel; import com.hai.model.UserInfoModel;
@ -26,7 +25,6 @@ import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.util.HashMap; import java.util.HashMap;
import java.util.List;
import java.util.Map; import java.util.Map;
@Controller @Controller
@ -43,10 +41,10 @@ public class OrderThirdPartyController {
private OrderService orderService; private OrderService orderService;
@RequestMapping(value = "/getOrderKfcList", method = RequestMethod.GET) @RequestMapping(value = "/getOrderList", method = RequestMethod.GET)
@ResponseBody @ResponseBody
@ApiOperation(value = "查询肯德基订单列表") @ApiOperation(value = "查询第三方订单列表")
public ResponseData getOrderKfcList(@RequestParam(name = "orderNo", required = false) String orderNo, public ResponseData getOrderList(@RequestParam(name = "orderNo", required = false) String orderNo,
@RequestParam(name = "memPhone", required = false) String memPhone, @RequestParam(name = "memPhone", required = false) String memPhone,
@RequestParam(name = "memCardNo", required = false) String memCardNo, @RequestParam(name = "memCardNo", required = false) String memCardNo,
@RequestParam(name = "payType", required = false) Integer payType, @RequestParam(name = "payType", required = false) Integer payType,
@ -56,6 +54,7 @@ public class OrderThirdPartyController {
@RequestParam(name = "createTimeE", required = false) Long createTimeE, @RequestParam(name = "createTimeE", required = false) Long createTimeE,
@RequestParam(name = "payTimeS", required = false) Long payTimeS, @RequestParam(name = "payTimeS", required = false) Long payTimeS,
@RequestParam(name = "payTimeE", required = false) Long payTimeE, @RequestParam(name = "payTimeE", required = false) Long payTimeE,
@RequestParam(name = "productType", required = false) Integer productType,
@RequestParam(name = "finishTimeS", required = false) Long finishTimeS, @RequestParam(name = "finishTimeS", required = false) Long finishTimeS,
@RequestParam(name = "finishTimeE", required = false) Long finishTimeE, @RequestParam(name = "finishTimeE", required = false) Long finishTimeE,
@RequestParam(name = "pageNum", required = true) Integer pageNum, @RequestParam(name = "pageNum", required = true) Integer pageNum,
@ -90,7 +89,7 @@ public class OrderThirdPartyController {
map.put("orderNo", orderNo); map.put("orderNo", orderNo);
map.put("memPhone", memPhone); map.put("memPhone", memPhone);
map.put("memCardNo", memCardNo); map.put("memCardNo", memCardNo);
map.put("productType", 2); map.put("productType", productType);
map.put("orderStatus", orderStatus); map.put("orderStatus", orderStatus);
map.put("payType", payType); map.put("payType", payType);
@ -103,4 +102,20 @@ public class OrderThirdPartyController {
} }
} }
@RequestMapping(value="/getOrderDetail",method = RequestMethod.GET)
@ResponseBody
@ApiOperation(value = "查询订单详情")
public ResponseData getOrderDetail(@RequestParam(name = "orderNo", required = true) String orderNo) {
try {
Map<String, Object> map = new HashMap<>();
map.put("tradeOrder", orderService.getOrderDetailByNo(orderNo));
return ResponseMsgUtil.success(map);
} catch (Exception e) {
log.error("OrderIntegralRechargeController -> getOrderDetail() error!",e);
return ResponseMsgUtil.exception(e);
}
}
} }

@ -662,8 +662,8 @@ public class OrderServiceImpl implements OrderService {
criteria.andMemPhoneLike("%" + MapUtils.getString(param, "memPhone") + "%"); criteria.andMemPhoneLike("%" + MapUtils.getString(param, "memPhone") + "%");
} }
if (MapUtils.getInteger(param, "status") != null) { if (MapUtils.getInteger(param, "orderStatus") != null) {
criteria.andOrderStatusEqualTo(MapUtils.getInteger(param, "status")); criteria.andOrderStatusEqualTo(MapUtils.getInteger(param, "orderStatus"));
} }
if (StringUtils.isNotBlank(MapUtils.getString(param, "createTimeS")) && StringUtils.isNotBlank(MapUtils.getString(param, "createTimeE"))) { if (StringUtils.isNotBlank(MapUtils.getString(param, "createTimeS")) && StringUtils.isNotBlank(MapUtils.getString(param, "createTimeE"))) {
criteria.andCreateTimeBetween( criteria.andCreateTimeBetween(

@ -25,7 +25,7 @@ public interface BsDistributionUserRelService {
* @Param [java.lang.Long, java.lang.Long] * @Param [java.lang.Long, java.lang.Long]
* @return void * @return void
*/ */
void insertDistributionRebate(Long userId , Long popularizeUserId , String regionId); void insertDistributionRebate(Long userId , Long popularizeUserId , String regionId) throws Exception;
/** /**
* @Author Sum1Dream * @Author Sum1Dream

@ -123,7 +123,7 @@ public interface HighUserService {
* @param: [highUser] 用户信息 * @param: [highUser] 用户信息
* @return: com.hai.entity.HighUser * @return: com.hai.entity.HighUser
*/ */
void insertUser(HighUser highUser , Long popularizeUserId , String regionId); void insertUser(HighUser highUser , Long popularizeUserId , String regionId) throws Exception;
/** /**
* @Author 胡锐 * @Author 胡锐

@ -37,7 +37,7 @@ public class BsConfigServiceImpl implements BsConfigService {
criteria.andSourceIdEqualTo(MapUtils.getLong(map , "sourceId")); criteria.andSourceIdEqualTo(MapUtils.getLong(map , "sourceId"));
} }
if (bsProductDiscountMapper.selectByExample(example) == null) { if (bsProductDiscountMapper.selectByExample(example).size() == 0) {
return null; return null;
} }

@ -43,7 +43,7 @@ public class BsDistributionUserRelServiceImpl implements BsDistributionUserRelSe
private HighUserMapper highUserMapper; private HighUserMapper highUserMapper;
@Override @Override
public void insertDistributionRebate(Long userId, Long popularizeUserId , String regionId) { public void insertDistributionRebate(Long userId, Long popularizeUserId , String regionId) throws Exception {
HighUser user = highUserService.findByUserId(userId); HighUser user = highUserService.findByUserId(userId);
HighUser pUser = highUserService.findByUserId(popularizeUserId); HighUser pUser = highUserService.findByUserId(popularizeUserId);
@ -78,10 +78,13 @@ public class BsDistributionUserRelServiceImpl implements BsDistributionUserRelSe
bsDistributionUserRelMapper.insert(distributionUserRel); bsDistributionUserRelMapper.insert(distributionUserRel);
}
new Thread(() -> { new Thread(() -> {
try { try {
if (regionId != null) {
SecRegion region = commonService.getParentByRegion(Long.valueOf(regionId)); SecRegion region = commonService.getParentByRegion(Long.valueOf(regionId));
BsCompany bsCompany = bsCompanyService.selectCompanyByRegion(region.getRegionId().toString()); BsCompany bsCompany = bsCompanyService.selectCompanyByRegion(region.getRegionId().toString());
@ -93,7 +96,7 @@ public class BsDistributionUserRelServiceImpl implements BsDistributionUserRelSe
freeMap.put("userPhone", user.getPhone()); freeMap.put("userPhone", user.getPhone());
highDiscountPackageService.freeUserDiscountPackage(freeMap); highDiscountPackageService.freeUserDiscountPackage(freeMap);
if (pUser.getIsAgent() == null) { if (pUser != null && pUser.getIsAgent() == null) {
// 查询推广有礼优惠券包 // 查询推广有礼优惠券包
HighDiscountPackage promoteDiscountPackage = highDiscountPackageService.getCallExclusive(4 , bsCompany.getId().intValue()); HighDiscountPackage promoteDiscountPackage = highDiscountPackageService.getCallExclusive(4 , bsCompany.getId().intValue());
Map<String, Object> freeMap1 = new HashMap<>(); Map<String, Object> freeMap1 = new HashMap<>();
@ -102,6 +105,7 @@ public class BsDistributionUserRelServiceImpl implements BsDistributionUserRelSe
freeMap1.put("userPhone", pUser.getPhone()); freeMap1.put("userPhone", pUser.getPhone());
highDiscountPackageService.freeUserDiscountPackage(freeMap1); highDiscountPackageService.freeUserDiscountPackage(freeMap1);
} }
}
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
@ -110,8 +114,6 @@ public class BsDistributionUserRelServiceImpl implements BsDistributionUserRelSe
}).start(); }).start();
} }
}
@Override @Override
public List<BsDistributionUserRel> getDistributionUserRelList(Map<String, Object> map) { public List<BsDistributionUserRel> getDistributionUserRelList(Map<String, Object> map) {

@ -609,6 +609,7 @@ public class CommonServiceImpl implements CommonService {
// 配置展示平台 // 配置展示平台
JSONArray productPlatformArray = object.getJSONArray("productPlatform"); JSONArray productPlatformArray = object.getJSONArray("productPlatform");
for (Object platform : productPlatformArray) { for (Object platform : productPlatformArray) {
if (String.valueOf(platform).length() > 0) {
productPlatform = new BsProductPlatform(); productPlatform = new BsProductPlatform();
SecDictionary dictionary = mappingSysCode("SHOW_PLATFORM", String.valueOf(platform)); SecDictionary dictionary = mappingSysCode("SHOW_PLATFORM", String.valueOf(platform));
productPlatform.setProductType(object.getInteger("productType")); productPlatform.setProductType(object.getInteger("productType"));
@ -619,10 +620,10 @@ public class CommonServiceImpl implements CommonService {
productPlatform.setOperatorId(object.getLong("operatorId")); productPlatform.setOperatorId(object.getLong("operatorId"));
productPlatform.setOperatorName(object.getString("operatorName")); productPlatform.setOperatorName(object.getString("operatorName"));
productPlatform.setSourceId(object.getLong("sourceId")); productPlatform.setSourceId(object.getLong("sourceId"));
bsProductPlatformMapper.insert(productPlatform); bsProductPlatformMapper.insert(productPlatform);
} }
} }
}
@Override @Override
public ApiCity findCityByName(String name) { public ApiCity findCityByName(String name) {

@ -300,7 +300,7 @@ public class HighUserServiceImpl implements HighUserService {
@Override @Override
@Transactional(propagation= Propagation.REQUIRES_NEW) @Transactional(propagation= Propagation.REQUIRES_NEW)
public void insertUser(HighUser highUser , Long popularizeUserId , String regionId) { public void insertUser(HighUser highUser , Long popularizeUserId , String regionId) throws Exception {
highUserMapper.insert(highUser); highUserMapper.insert(highUser);
if (highUser.getPhone() != null) { if (highUser.getPhone() != null) {

@ -85,8 +85,9 @@ public class OutRechargePriceServiceImpl implements OutRechargePriceService {
listMap.put("returnType", 1); listMap.put("returnType", 1);
listMap.put("sourceId", outRechargePrice.getId()); listMap.put("sourceId", outRechargePrice.getId());
listMap.put("platformId", platformId); listMap.put("platformId", platformId);
if (bsConfigService.getProductDiscountByMap(listMap) != null) {
outRechargePriceModel.setIntegralDiscount(bsConfigService.getProductDiscountByMap(listMap).getDiscount()); outRechargePriceModel.setIntegralDiscount(bsConfigService.getProductDiscountByMap(listMap).getDiscount());
}
outRechargePriceModel.setProductPayTypeString(bsConfigService.getProductPayTypeByMap(listMap)); outRechargePriceModel.setProductPayTypeString(bsConfigService.getProductPayTypeByMap(listMap));
outRechargePriceModel.setProductPlatformString(bsConfigService.getProductPlatformByMap(listMap)); outRechargePriceModel.setProductPlatformString(bsConfigService.getProductPlatformByMap(listMap));
return outRechargePriceModel; return outRechargePriceModel;

Loading…
Cancel
Save