用户基础功能
This commit is contained in:
parent
1cbcf12ad7
commit
69f5dec219
@ -7,6 +7,7 @@ import com.cdzy.activity.service.UserService;
|
|||||||
import com.cdzy.activity.uitls.VerifyUtil;
|
import com.cdzy.activity.uitls.VerifyUtil;
|
||||||
import com.mybatisflex.core.query.QueryWrapper;
|
import com.mybatisflex.core.query.QueryWrapper;
|
||||||
import jakarta.annotation.Resource;
|
import jakarta.annotation.Resource;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestParam;
|
import org.springframework.web.bind.annotation.RequestParam;
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
@ -54,4 +55,18 @@ public class UserController {
|
|||||||
return JsonResult.success("微信登录成功", openid);
|
return JsonResult.success("微信登录成功", openid);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户微信无感登录。
|
||||||
|
*
|
||||||
|
* @param openId 微信登陆openId
|
||||||
|
* @return 登陆结果
|
||||||
|
*/
|
||||||
|
@GetMapping("info")
|
||||||
|
public JsonResult<?> info(@RequestParam("openId")String openId) {
|
||||||
|
QueryWrapper queryWrapper = QueryWrapper.create()
|
||||||
|
.eq(User::getWxOpenId, openId);
|
||||||
|
User user = userService.getOne(queryWrapper);
|
||||||
|
return JsonResult.success(user);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -75,7 +75,7 @@ public class User implements Serializable {
|
|||||||
private Integer heath;
|
private Integer heath;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*是否已填写资料:1-未填写 2-已填
|
||||||
*/
|
*/
|
||||||
private Integer isFilled;
|
private Integer isFilled;
|
||||||
|
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -3,63 +3,21 @@ package com.cdzy.activity.model.table;
|
|||||||
import com.mybatisflex.core.query.QueryColumn;
|
import com.mybatisflex.core.query.QueryColumn;
|
||||||
import com.mybatisflex.core.table.TableDef;
|
import com.mybatisflex.core.table.TableDef;
|
||||||
|
|
||||||
// Auto generate by mybatis-flex, do not modify it.
|
|
||||||
public class UserTableDef extends TableDef{
|
public class UserTableDef extends TableDef{
|
||||||
|
|
||||||
/**
|
|
||||||
* 实体类。
|
|
||||||
|
|
||||||
@author attiya
|
|
||||||
@since 2025-09-19
|
|
||||||
*/
|
|
||||||
public static final UserTableDef USER=new UserTableDef();
|
public static final UserTableDef USER=new UserTableDef();
|
||||||
|
|
||||||
/**
|
public final QueryColumn IS_FILLED =new QueryColumn(this,"isFilled");
|
||||||
* 年龄
|
public final QueryColumn CHRONIC_DISEASES_HISTORY =new QueryColumn(this,"chronicDiseasesHistory");
|
||||||
*/
|
|
||||||
public final QueryColumn AGE = new QueryColumn(this, "age");
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 姓名
|
|
||||||
*/
|
|
||||||
public final QueryColumn NAME = new QueryColumn(this, "name");
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 健康:1-健康 2-不健康
|
|
||||||
*/
|
|
||||||
public final QueryColumn HEATH = new QueryColumn(this, "heath");
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 手机号
|
|
||||||
*/
|
|
||||||
public final QueryColumn PHONE = new QueryColumn(this, "phone");
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 性别
|
|
||||||
*/
|
|
||||||
public final QueryColumn GENDER = new QueryColumn(this, "gender");
|
|
||||||
|
|
||||||
public final QueryColumn USER_ID = new QueryColumn(this, "user_id");
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 地址
|
|
||||||
*/
|
|
||||||
public final QueryColumn ADDRESS =new QueryColumn(this,"address");
|
public final QueryColumn ADDRESS =new QueryColumn(this,"address");
|
||||||
|
public final QueryColumn PHONE =new QueryColumn(this,"phone");
|
||||||
public final QueryColumn IS_FILLED = new QueryColumn(this, "is_filled");
|
public final QueryColumn CHRONIC_DISEASE =new QueryColumn(this,"chronicDisease");
|
||||||
|
public final QueryColumn GENDER =new QueryColumn(this,"gender");
|
||||||
public final QueryColumn WX_OPEN_ID = new QueryColumn(this, "wx_open_id");
|
public final QueryColumn USER_ID =new QueryColumn(this,"userId");
|
||||||
|
public final QueryColumn HEATH =new QueryColumn(this,"heath");
|
||||||
/**
|
public final QueryColumn WX_OPEN_ID =new QueryColumn(this,"wxOpenId");
|
||||||
* 所患慢性病
|
public final QueryColumn AGE =new QueryColumn(this,"age");
|
||||||
*/
|
public final QueryColumn NAME =new QueryColumn(this,"name");
|
||||||
public final QueryColumn CHRONIC_DISEASE = new QueryColumn(this, "chronic_disease");
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 慢性病史:1-有 2-无
|
|
||||||
*/
|
|
||||||
public final QueryColumn CHRONIC_DISEASES_HISTORY = new QueryColumn(this, "chronic_diseases_history");
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 所有字段。
|
* 所有字段。
|
||||||
*/
|
*/
|
||||||
@ -68,19 +26,13 @@ public class UserTableDef extends TableDef {
|
|||||||
/**
|
/**
|
||||||
* 默认字段,不包含逻辑删除或者 large 等字段。
|
* 默认字段,不包含逻辑删除或者 large 等字段。
|
||||||
*/
|
*/
|
||||||
public final QueryColumn[] DEFAULT_COLUMNS = new QueryColumn[]{AGE, NAME, HEATH, PHONE, GENDER, USER_ID, ADDRESS, IS_FILLED, WX_OPEN_ID, CHRONIC_DISEASE, CHRONIC_DISEASES_HISTORY};
|
public final QueryColumn[]DEFAULT_COLUMNS=new QueryColumn[]{ IS_FILLED , CHRONIC_DISEASES_HISTORY , ADDRESS , PHONE , CHRONIC_DISEASE , GENDER , USER_ID , HEATH , WX_OPEN_ID , AGE , NAME };
|
||||||
|
public UserTableDef(){super("","user");}
|
||||||
public UserTableDef() {
|
|
||||||
super("", "user");
|
|
||||||
}
|
|
||||||
|
|
||||||
private UserTableDef(String schema, String name, String alisa) {
|
private UserTableDef(String schema, String name, String alisa) {
|
||||||
super(schema, name, alisa);
|
super(schema, name, alisa);
|
||||||
}
|
}
|
||||||
|
|
||||||
public UserTableDef as(String alias) {
|
public UserTableDef as(String alias) {
|
||||||
String key = getNameWithSchema() + "." + alias;
|
String key = getNameWithSchema() + "." + alias;
|
||||||
return getCache(key, k -> new UserTableDef("", "user", alias));
|
return getCache(key, k -> new UserTableDef("", "user", alias));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user