Commit a3c0babb authored by hanfeng's avatar hanfeng

修改该获取用户会员

parent 99879a5b
......@@ -11,6 +11,7 @@ import com.github.wxiaoqi.security.common.msg.ObjectRestResponse;
import com.github.wxiaoqi.security.common.rest.BaseController;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.aspectj.weaver.ast.Var;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
......@@ -38,7 +39,9 @@ public class BaseUserMemberController extends BaseController<BaseUserMemberBiz,
@ApiOperation(value = "根据用户id获取用户会员信息")
@GetMapping("/findOne/{userId}")
public ObjectRestResponse<BaseUserMemberVO> findOneByUserId(@PathVariable Integer userId)throws Exception{
return ObjectRestResponse.succ(baseBiz.findOneByUserId(userId));
BaseUserMemberVO oneByUserId = baseBiz.findOneByUserId(userId);
oneByUserId=(oneByUserId==null? new BaseUserMemberVO(): oneByUserId);
return ObjectRestResponse.succ(oneByUserId);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment