显式抛出
This commit is contained in:
@@ -1,7 +1,9 @@
|
|||||||
package com.czg.market.service;
|
package com.czg.market.service;
|
||||||
|
|
||||||
|
import cn.hutool.core.exceptions.ValidateException;
|
||||||
import com.czg.account.entity.UserInfo;
|
import com.czg.account.entity.UserInfo;
|
||||||
import com.czg.constant.TableValueConstant;
|
import com.czg.constant.TableValueConstant;
|
||||||
|
import com.czg.exception.CzgException;
|
||||||
import com.czg.market.dto.MkDistributionUserDTO;
|
import com.czg.market.dto.MkDistributionUserDTO;
|
||||||
import com.czg.market.dto.MkDistributionWithdrawFlowDTO;
|
import com.czg.market.dto.MkDistributionWithdrawFlowDTO;
|
||||||
import com.czg.market.entity.MkDistributionConfig;
|
import com.czg.market.entity.MkDistributionConfig;
|
||||||
@@ -57,7 +59,7 @@ public interface MkDistributionUserService extends IService<MkDistributionUser>
|
|||||||
/**
|
/**
|
||||||
* 分销员中心-绑定邀请人
|
* 分销员中心-绑定邀请人
|
||||||
*/
|
*/
|
||||||
void bindInviteUser(MkDistributionUserDTO param);
|
void bindInviteUser(MkDistributionUserDTO param) throws CzgException, ValidateException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取分销员分页列表
|
* 获取分销员分页列表
|
||||||
@@ -85,6 +87,7 @@ public interface MkDistributionUserService extends IService<MkDistributionUser>
|
|||||||
* 更新分销员
|
* 更新分销员
|
||||||
*/
|
*/
|
||||||
void updateDistributionUserById(MkDistributionUserDTO param);
|
void updateDistributionUserById(MkDistributionUserDTO param);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 重置分销员等级
|
* 重置分销员等级
|
||||||
*/
|
*/
|
||||||
@@ -100,15 +103,14 @@ public interface MkDistributionUserService extends IService<MkDistributionUser>
|
|||||||
void deleteDistributionUser(Long id, Long shopId);
|
void deleteDistributionUser(Long id, Long shopId);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Boolean cashPayOrder(long adminId, MkDistributionPayDTO payParam);
|
Boolean cashPayOrder(long adminId, MkDistributionPayDTO payParam);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 分销员开通
|
* 分销员开通
|
||||||
*
|
*
|
||||||
* @param shopUserId 用户
|
* @param shopUserId 用户
|
||||||
* @param amount 金额
|
* @param amount 金额
|
||||||
* @param shopId 店铺id
|
* @param shopId 店铺id
|
||||||
*/
|
*/
|
||||||
void open(Long shopUserId, BigDecimal amount, Long shopId, Long sourceId);
|
void open(Long shopUserId, BigDecimal amount, Long shopId, Long sourceId);
|
||||||
|
|
||||||
@@ -141,15 +143,16 @@ public interface MkDistributionUserService extends IService<MkDistributionUser>
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 微信转账回调
|
* 微信转账回调
|
||||||
|
*
|
||||||
* @param outBillNo 转账单号
|
* @param outBillNo 转账单号
|
||||||
* @param state ACCEPTED:单据已受理
|
* @param state ACCEPTED:单据已受理
|
||||||
* PROCESSING:单据处理中,转账结果尚未明确,如一直处于此状态,建议检查账户余额是否足够
|
* PROCESSING:单据处理中,转账结果尚未明确,如一直处于此状态,建议检查账户余额是否足够
|
||||||
* WAIT_USER_CONFIRM:待收款用户确认,可拉起微信收款确认页面进行收款确认
|
* WAIT_USER_CONFIRM:待收款用户确认,可拉起微信收款确认页面进行收款确认
|
||||||
* TRANSFERING:转账中,转账结果尚未明确,可拉起微信收款确认页面再次重试确认收款
|
* TRANSFERING:转账中,转账结果尚未明确,可拉起微信收款确认页面再次重试确认收款
|
||||||
* SUCCESS: 转账成功
|
* SUCCESS: 转账成功
|
||||||
* FAIL: 转账失败
|
* FAIL: 转账失败
|
||||||
* CANCELING: 撤销中
|
* CANCELING: 撤销中
|
||||||
* CANCELLED: 已撤销
|
* CANCELLED: 已撤销
|
||||||
*/
|
*/
|
||||||
void withdrawNotify(String outBillNo, String state, String failReason);
|
void withdrawNotify(String outBillNo, String state, String failReason);
|
||||||
|
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ package com.czg.service.market.service.impl;
|
|||||||
import cn.hutool.core.bean.BeanUtil;
|
import cn.hutool.core.bean.BeanUtil;
|
||||||
import cn.hutool.core.collection.CollUtil;
|
import cn.hutool.core.collection.CollUtil;
|
||||||
import cn.hutool.core.date.DateUtil;
|
import cn.hutool.core.date.DateUtil;
|
||||||
|
import cn.hutool.core.exceptions.ValidateException;
|
||||||
import cn.hutool.core.util.IdUtil;
|
import cn.hutool.core.util.IdUtil;
|
||||||
import cn.hutool.core.util.IdcardUtil;
|
import cn.hutool.core.util.IdcardUtil;
|
||||||
import cn.hutool.core.util.StrUtil;
|
import cn.hutool.core.util.StrUtil;
|
||||||
@@ -234,7 +235,7 @@ public class MkDistributionUserServiceImpl extends ServiceImpl<MkDistributionUse
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
@GlobalTransactional
|
@GlobalTransactional
|
||||||
public void bindInviteUser(MkDistributionUserDTO param) {
|
public void bindInviteUser(MkDistributionUserDTO param) throws CzgException, ValidateException {
|
||||||
ShopUser shopUser = shopUserService.getById(param.getId());
|
ShopUser shopUser = shopUserService.getById(param.getId());
|
||||||
AssertUtil.isNull(shopUser, "店铺用户不存在");
|
AssertUtil.isNull(shopUser, "店铺用户不存在");
|
||||||
ShopUserInvite shopUserInvite = shopUserInviteService.getOneByShopIdAndShopUserId(param.getShopId(), shopUser.getId());
|
ShopUserInvite shopUserInvite = shopUserInviteService.getOneByShopIdAndShopUserId(param.getShopId(), shopUser.getId());
|
||||||
@@ -611,7 +612,7 @@ public class MkDistributionUserServiceImpl extends ServiceImpl<MkDistributionUse
|
|||||||
if (count >= config.getRewardCount()) {
|
if (count >= config.getRewardCount()) {
|
||||||
log.info("分销员{}已达到奖励次数上限, 次数: {}", currentDistributionUser.getId(), config.getRewardCount());
|
log.info("分销员{}已达到奖励次数上限, 次数: {}", currentDistributionUser.getId(), config.getRewardCount());
|
||||||
return;
|
return;
|
||||||
}else {
|
} else {
|
||||||
log.info("分销员奖励次数: {}", count);
|
log.info("分销员奖励次数: {}", count);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user