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