..
This commit is contained in:
+14
-1
@@ -15,6 +15,8 @@ import com.budwk.app.web.commons.slog.SLogService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.nutz.dao.Chain;
|
||||
import org.nutz.dao.Cnd;
|
||||
import org.nutz.dao.Dao;
|
||||
import org.nutz.integration.jedis.RedisService;
|
||||
import org.nutz.ioc.loader.annotation.Inject;
|
||||
@@ -89,7 +91,7 @@ public class ClientAuthController {
|
||||
}
|
||||
}
|
||||
|
||||
@At("/info")
|
||||
@At(value = {"/info", "/user-info"})
|
||||
@Ok("json")
|
||||
@SaCheckLogin(type = StpClientUtil.TYPE)
|
||||
public Result info() {
|
||||
@@ -97,6 +99,17 @@ public class ClientAuthController {
|
||||
return Result.success(user);
|
||||
}
|
||||
|
||||
@At("/update-user-info")
|
||||
@Ok("json")
|
||||
@SaCheckLogin(type = StpClientUtil.TYPE)
|
||||
@ApiOperation(value = "修改用户信息", nickname = "/update-user-info", httpMethod = "POST")
|
||||
@AdaptBy(type = JsonAdaptor.class)
|
||||
public Result updateUserInfo(Client_user user) {
|
||||
user.setId(StpClientUtil.STP.getLoginIdAsLong());
|
||||
user.setAvatar("https://tdesign.gtimg.com/mobile/demos/avatar1.png");
|
||||
dao.updateIgnoreNull(user);
|
||||
return Result.success(user);
|
||||
}
|
||||
|
||||
/**
|
||||
* 退出登录
|
||||
|
||||
@@ -38,6 +38,11 @@ public class Client_user extends BaseModel implements Serializable {
|
||||
@Comment("身份证")
|
||||
private String idCard;
|
||||
|
||||
@Column
|
||||
@ColDefine(type = ColType.VARCHAR, width = 255)
|
||||
@Comment("头像")
|
||||
private String avatar;
|
||||
|
||||
@Column
|
||||
@ColDefine(type = ColType.VARCHAR, width = 255)
|
||||
@Comment("openId")
|
||||
|
||||
Reference in New Issue
Block a user