|
@@ -174,15 +174,25 @@ public class UserBusinessFrontServiceImpl implements UserBusinessFrontService {
|
|
|
*/
|
|
*/
|
|
|
@Override
|
|
@Override
|
|
|
public void taskYhShopDistributeRateBenefits(Long shopUserId, Long businessId, Integer goodsType, OrderDon order, Integer distributeRate) {
|
|
public void taskYhShopDistributeRateBenefits(Long shopUserId, Long businessId, Integer goodsType, OrderDon order, Integer distributeRate) {
|
|
|
- LambdaQueryWrapper<YhShopUserDistributeBusinessRate> wrapper = Wrappers.lambdaQuery(YhShopUserDistributeBusinessRate.class)
|
|
|
|
|
- .eq(YhShopUserDistributeBusinessRate::getBusinessId, businessId)
|
|
|
|
|
- .eq(YhShopUserDistributeBusinessRate::getGoodsId, order.getGoodsId())
|
|
|
|
|
|
|
+ LambdaQueryWrapper<UserDistributeBusinessRate> wrapper = Wrappers.lambdaQuery(UserDistributeBusinessRate.class)
|
|
|
|
|
+ .eq(UserDistributeBusinessRate::getBusinessId, businessId)
|
|
|
|
|
+ .eq(UserDistributeBusinessRate::getGoodsId, order.getGoodsId())
|
|
|
.last("limit 1");
|
|
.last("limit 1");
|
|
|
- //虚拟平台
|
|
|
|
|
if (goodsType == 1) {
|
|
if (goodsType == 1) {
|
|
|
- wrapper.eq(YhShopUserDistributeBusinessRate::getSkuId, order.getSkuId());
|
|
|
|
|
|
|
+ wrapper.eq(UserDistributeBusinessRate::getSkuId, order.getSkuId());
|
|
|
|
|
+ }
|
|
|
|
|
+ //和渠道商务用一套提成比例
|
|
|
|
|
+ UserDistributeBusinessRate businessRate = userDistributeBusinessRateMapper.selectOne(wrapper);
|
|
|
|
|
+ //06-21 奈飞平台商务比例特殊处理
|
|
|
|
|
+ UserDistributeSpecial userDistributeSpecial = UserDistributeSpecialMapper.selectOne(Wrappers.lambdaQuery(UserDistributeSpecial.class)
|
|
|
|
|
+ .eq(UserDistributeSpecial::getSkuId, order.getSkuId())
|
|
|
|
|
+ .eq(UserDistributeSpecial::getSharedId, shopUserId)
|
|
|
|
|
+ .eq(UserDistributeSpecial::getBusinessId, businessId)
|
|
|
|
|
+ .last("limit 1"));
|
|
|
|
|
+ if (userDistributeSpecial != null) {
|
|
|
|
|
+ businessRate.setFirstOrderRate(userDistributeSpecial.getFirstRate());
|
|
|
|
|
+ businessRate.setRenewOrderRate(userDistributeSpecial.getRenewRate());
|
|
|
}
|
|
}
|
|
|
- YhShopUserDistributeBusinessRate businessRate = yhShopUserDistributeBusinessRateMapper.selectOne(wrapper);
|
|
|
|
|
if (businessRate != null) {
|
|
if (businessRate != null) {
|
|
|
if (order.getOrderType() == 1) {
|
|
if (order.getOrderType() == 1) {
|
|
|
//实物商务分销提成 无首单
|
|
//实物商务分销提成 无首单
|