【代码优化】商城:分销用户绑定移除 try catch,错误消息由前端进行特殊处理
This commit is contained in:
parent
b1c115d221
commit
2451942cf2
|
@ -29,7 +29,6 @@ import cn.iocoder.yudao.module.trade.enums.brokerage.BrokerageRecordStatusEnum;
|
|||
import cn.iocoder.yudao.module.trade.service.config.TradeConfigService;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import jakarta.annotation.Resource;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
|
@ -46,7 +45,6 @@ import static cn.iocoder.yudao.module.trade.enums.ErrorCodeConstants.*;
|
|||
*
|
||||
* @author owen
|
||||
*/
|
||||
@Slf4j
|
||||
@Service
|
||||
@Validated
|
||||
public class BrokerageUserServiceImpl implements BrokerageUserService {
|
||||
|
@ -176,7 +174,6 @@ public class BrokerageUserServiceImpl implements BrokerageUserService {
|
|||
|
||||
@Override
|
||||
public boolean bindBrokerageUser(Long userId, Long bindUserId) {
|
||||
try {
|
||||
// 1. 获得分销用户
|
||||
boolean isNewBrokerageUser = false;
|
||||
BrokerageUserDO brokerageUser = brokerageUserMapper.selectById(userId);
|
||||
|
@ -205,10 +202,6 @@ public class BrokerageUserServiceImpl implements BrokerageUserService {
|
|||
brokerageUserMapper.updateById(fillBindUserData(bindUserId, new BrokerageUserDO().setId(userId)));
|
||||
}
|
||||
return true;
|
||||
} catch (Exception e) {
|
||||
log.error("[bindBrokerageUser][userId({}) 绑定推广员失败 bindUserId({})]", userId, bindUserId, e);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in New Issue