he2802 2 年之前
父节点
当前提交
55547a8d42

+ 5 - 0
zhongzheng-admin/src/main/java/com/zhongzheng/controller/distribution/DistributionSellerController.java

@@ -1,11 +1,13 @@
 package com.zhongzheng.controller.distribution;
 
+import cn.hutool.core.lang.Validator;
 import com.zhongzheng.common.annotation.Log;
 import com.zhongzheng.common.core.controller.BaseController;
 import com.zhongzheng.common.core.domain.AjaxResult;
 import com.zhongzheng.common.core.domain.model.LoginUser;
 import com.zhongzheng.common.core.page.TableDataInfo;
 import com.zhongzheng.common.enums.BusinessType;
+import com.zhongzheng.common.exception.CustomException;
 import com.zhongzheng.common.utils.ServletUtils;
 import com.zhongzheng.framework.web.service.TokenService;
 import com.zhongzheng.framework.web.service.WxLoginService;
@@ -125,6 +127,9 @@ public class DistributionSellerController extends BaseController {
     {
         LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest());
         DistributionSellerVo vo = iDistributionSellerService.findDetail(loginUser.getUser().getSellerId());
+        if(Validator.isEmpty(vo)){
+            throw new CustomException("非法用户");
+        }
         vo.setSelfNull();
         return AjaxResult.success(vo);
     }