Browse Source

fix:账户中心用户绑定关系同步异常处理

Hu Jie 7 years ago
parent
commit
f98e0a38df

+ 3 - 2
src/main/java/com/uas/platform/b2c/common/account/v2/service/impl/UserServiceImpl.java

@@ -9,6 +9,7 @@ import com.uas.platform.b2c.common.account.model.Role;
 import com.uas.platform.b2c.common.account.model.User;
 import com.uas.platform.b2c.common.account.v2.service.UserService;
 import com.uas.platform.b2c.core.constant.IntegerConstant;
+import com.uas.platform.core.exception.IllegalOperatorException;
 import com.uas.sso.entity.UserView;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -172,11 +173,11 @@ public class UserServiceImpl implements UserService {
         Enterprise enterprise = enterpriseDao.findByUu(enuu);
         if (null == user) {
             logger.info("绑定用户", uu + "用户不存在!");
-            return;
+            throw new IllegalOperatorException("绑定用户" + uu + "用户不存在!");
         }
         if (null == enterprise) {
             logger.info("绑定用户", uu + "企业不存在!");
-            return;
+            throw new IllegalOperatorException("绑定用户" + uu + "企业不存在!");
         }
         if (null != type) {
             if (type.equals(IntegerConstant.YES_SHORT)) { //1为绑定,0为解绑