新增用户实名认证模块
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -29,3 +29,4 @@ build/
|
||||
|
||||
### VS Code ###
|
||||
.vscode/
|
||||
/cert/
|
||||
|
||||
@@ -88,7 +88,6 @@ public class SettingController extends BaseController {
|
||||
public ApiResult<?> update(@RequestBody Setting setting) {
|
||||
if (settingService.updateById(setting)) {
|
||||
// 更新系统设置信息到缓存 key = ""
|
||||
// String key = StrUtil.upperFirst(setting.getSettingKey()).concat(":").concat(getTenantId().toString());
|
||||
String key = setting.getSettingKey().concat(":").concat(setting.getTenantId().toString());
|
||||
redisUtil.set(key, JSON.parseObject(setting.getContent()));
|
||||
// 更新租户信息
|
||||
|
||||
@@ -0,0 +1,122 @@
|
||||
package com.gxwebsoft.common.system.controller;
|
||||
|
||||
import com.gxwebsoft.common.core.annotation.OperationLog;
|
||||
import com.gxwebsoft.common.core.web.ApiResult;
|
||||
import com.gxwebsoft.common.core.web.BaseController;
|
||||
import com.gxwebsoft.common.core.web.BatchParam;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
import com.gxwebsoft.common.system.entity.SysFileType;
|
||||
import com.gxwebsoft.common.system.param.SysFileTypeParam;
|
||||
import com.gxwebsoft.common.system.service.SysFileTypeService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 存储类型控制器
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2025-05-16 14:24:28
|
||||
*/
|
||||
@Api(tags = "存储类型管理")
|
||||
@RestController
|
||||
@RequestMapping("/api/system/sys-file-type")
|
||||
public class SysFileTypeController extends BaseController {
|
||||
@Resource
|
||||
private SysFileTypeService sysFileTypeService;
|
||||
|
||||
@PreAuthorize("hasAuthority('sys:sysFileType:list')")
|
||||
@ApiOperation("分页查询存储类型")
|
||||
@GetMapping("/page")
|
||||
public ApiResult<PageResult<SysFileType>> page(SysFileTypeParam param) {
|
||||
// 使用关联查询
|
||||
return success(sysFileTypeService.pageRel(param));
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('sys:sysFileType:list')")
|
||||
@ApiOperation("查询全部存储类型")
|
||||
@GetMapping()
|
||||
public ApiResult<List<SysFileType>> list(SysFileTypeParam param) {
|
||||
// 使用关联查询
|
||||
return success(sysFileTypeService.listRel(param));
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('sys:sysFileType:list')")
|
||||
@ApiOperation("根据id查询存储类型")
|
||||
@GetMapping("/{id}")
|
||||
public ApiResult<SysFileType> get(@PathVariable("id") Integer id) {
|
||||
// 使用关联查询
|
||||
return success(sysFileTypeService.getByIdRel(id));
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('sys:sysFileType:save')")
|
||||
@OperationLog
|
||||
@ApiOperation("添加存储类型")
|
||||
@PostMapping()
|
||||
public ApiResult<?> save(@RequestBody SysFileType sysFileType) {
|
||||
if (sysFileTypeService.save(sysFileType)) {
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('sys:sysFileType:update')")
|
||||
@OperationLog
|
||||
@ApiOperation("修改存储类型")
|
||||
@PutMapping()
|
||||
public ApiResult<?> update(@RequestBody SysFileType sysFileType) {
|
||||
if (sysFileTypeService.updateById(sysFileType)) {
|
||||
return success("修改成功");
|
||||
}
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('sys:sysFileType:remove')")
|
||||
@OperationLog
|
||||
@ApiOperation("删除存储类型")
|
||||
@DeleteMapping("/{id}")
|
||||
public ApiResult<?> remove(@PathVariable("id") Integer id) {
|
||||
if (sysFileTypeService.removeById(id)) {
|
||||
return success("删除成功");
|
||||
}
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('sys:sysFileType:save')")
|
||||
@OperationLog
|
||||
@ApiOperation("批量添加存储类型")
|
||||
@PostMapping("/batch")
|
||||
public ApiResult<?> saveBatch(@RequestBody List<SysFileType> list) {
|
||||
if (sysFileTypeService.saveBatch(list)) {
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('sys:sysFileType:update')")
|
||||
@OperationLog
|
||||
@ApiOperation("批量修改存储类型")
|
||||
@PutMapping("/batch")
|
||||
public ApiResult<?> removeBatch(@RequestBody BatchParam<SysFileType> batchParam) {
|
||||
if (batchParam.update(sysFileTypeService, "id")) {
|
||||
return success("修改成功");
|
||||
}
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('sys:sysFileType:remove')")
|
||||
@OperationLog
|
||||
@ApiOperation("批量删除存储类型")
|
||||
@DeleteMapping("/batch")
|
||||
public ApiResult<?> removeBatch(@RequestBody List<Integer> ids) {
|
||||
if (sysFileTypeService.removeByIds(ids)) {
|
||||
return success("删除成功");
|
||||
}
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,120 @@
|
||||
package com.gxwebsoft.common.system.controller;
|
||||
|
||||
import com.gxwebsoft.common.core.web.BaseController;
|
||||
import com.gxwebsoft.common.system.service.UserVerifyService;
|
||||
import com.gxwebsoft.common.system.entity.UserVerify;
|
||||
import com.gxwebsoft.common.system.param.UserVerifyParam;
|
||||
import com.gxwebsoft.common.core.web.ApiResult;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
import com.gxwebsoft.common.core.web.PageParam;
|
||||
import com.gxwebsoft.common.core.web.BatchParam;
|
||||
import com.gxwebsoft.common.core.annotation.OperationLog;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 实名认证控制器
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2025-05-29 23:01:04
|
||||
*/
|
||||
@Api(tags = "实名认证管理")
|
||||
@RestController
|
||||
@RequestMapping("/api/system/user-verify")
|
||||
public class UserVerifyController extends BaseController {
|
||||
@Resource
|
||||
private UserVerifyService userVerifyService;
|
||||
|
||||
@PreAuthorize("hasAuthority('sys:userVerify:list')")
|
||||
@ApiOperation("分页查询实名认证")
|
||||
@GetMapping("/page")
|
||||
public ApiResult<PageResult<UserVerify>> page(UserVerifyParam param) {
|
||||
// 使用关联查询
|
||||
return success(userVerifyService.pageRel(param));
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('sys:userVerify:list')")
|
||||
@ApiOperation("查询全部实名认证")
|
||||
@GetMapping()
|
||||
public ApiResult<List<UserVerify>> list(UserVerifyParam param) {
|
||||
// 使用关联查询
|
||||
return success(userVerifyService.listRel(param));
|
||||
}
|
||||
|
||||
@ApiOperation("根据id查询实名认证")
|
||||
@GetMapping("/{id}")
|
||||
public ApiResult<UserVerify> get(@PathVariable("id") Integer id) {
|
||||
// 使用关联查询
|
||||
return success(userVerifyService.getByIdRel(id));
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('sys:userVerify:save')")
|
||||
@ApiOperation("添加实名认证")
|
||||
@PostMapping()
|
||||
public ApiResult<?> save(@RequestBody UserVerify userVerify) {
|
||||
if (userVerifyService.save(userVerify)) {
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('sys:userVerify:update')")
|
||||
@ApiOperation("修改实名认证")
|
||||
@PutMapping()
|
||||
public ApiResult<?> update(@RequestBody UserVerify userVerify) {
|
||||
if (userVerifyService.updateById(userVerify)) {
|
||||
return success("修改成功");
|
||||
}
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('sys:userVerify:remove')")
|
||||
@OperationLog
|
||||
@ApiOperation("删除实名认证")
|
||||
@DeleteMapping("/{id}")
|
||||
public ApiResult<?> remove(@PathVariable("id") Integer id) {
|
||||
if (userVerifyService.removeById(id)) {
|
||||
return success("删除成功");
|
||||
}
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('sys:userVerify:save')")
|
||||
@OperationLog
|
||||
@ApiOperation("批量添加实名认证")
|
||||
@PostMapping("/batch")
|
||||
public ApiResult<?> saveBatch(@RequestBody List<UserVerify> list) {
|
||||
if (userVerifyService.saveBatch(list)) {
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('sys:userVerify:update')")
|
||||
@OperationLog
|
||||
@ApiOperation("批量修改实名认证")
|
||||
@PutMapping("/batch")
|
||||
public ApiResult<?> removeBatch(@RequestBody BatchParam<UserVerify> batchParam) {
|
||||
if (batchParam.update(userVerifyService, "id")) {
|
||||
return success("修改成功");
|
||||
}
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('sys:userVerify:remove')")
|
||||
@OperationLog
|
||||
@ApiOperation("批量删除实名认证")
|
||||
@DeleteMapping("/batch")
|
||||
public ApiResult<?> removeBatch(@RequestBody List<Integer> ids) {
|
||||
if (userVerifyService.removeByIds(ids)) {
|
||||
return success("删除成功");
|
||||
}
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
}
|
||||
@@ -25,6 +25,13 @@ public class FileRecord implements Serializable {
|
||||
@TableId(type = IdType.AUTO)
|
||||
private Integer id;
|
||||
|
||||
@ApiModelProperty("文件类型, 0本地存储, 1阿里云oss, 2腾讯云cos,3七牛云,4其他")
|
||||
private Integer type;
|
||||
|
||||
@ApiModelProperty("访问域名")
|
||||
@TableField(exist = false)
|
||||
private String domain;
|
||||
|
||||
@ApiModelProperty("分组ID")
|
||||
private Integer groupId;
|
||||
|
||||
|
||||
@@ -0,0 +1,44 @@
|
||||
package com.gxwebsoft.common.system.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 存储类型
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2025-05-16 14:24:28
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value = "SysFileType对象", description = "存储类型")
|
||||
public class SysFileType implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty(value = "主键id")
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Integer id;
|
||||
|
||||
@ApiModelProperty(value = "0本地存储,1阿里云oss,2腾讯云cos,3七牛云,4其他")
|
||||
private Integer type;
|
||||
|
||||
@ApiModelProperty(value = "名称")
|
||||
private String name;
|
||||
|
||||
@ApiModelProperty(value = "访问域名")
|
||||
private String path;
|
||||
|
||||
@ApiModelProperty(value = "租户id")
|
||||
private Integer tenantId;
|
||||
|
||||
@ApiModelProperty(value = "创建时间")
|
||||
private Date createTime;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,77 @@
|
||||
package com.gxwebsoft.common.system.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import java.time.LocalDate;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import java.time.LocalDateTime;
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* 实名认证
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2025-05-29 23:01:04
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value = "UserVerify对象", description = "实名认证")
|
||||
@TableName("sys_user_verify")
|
||||
public class UserVerify implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty(value = "自增ID")
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Integer id;
|
||||
|
||||
@ApiModelProperty(value = "用户ID")
|
||||
private Integer userId;
|
||||
|
||||
@ApiModelProperty(value = "认证类型, 0个人 1企业")
|
||||
private Integer type;
|
||||
|
||||
@ApiModelProperty(value = "真实姓名")
|
||||
private String realName;
|
||||
|
||||
@ApiModelProperty(value = "证件号码")
|
||||
private String idCard;
|
||||
|
||||
@ApiModelProperty(value = "出生日期")
|
||||
private LocalDate birthday;
|
||||
|
||||
@ApiModelProperty(value = "正面")
|
||||
private String sfz1;
|
||||
|
||||
@ApiModelProperty(value = "反面")
|
||||
private String sfz2;
|
||||
|
||||
@ApiModelProperty(value = "企业名称")
|
||||
private String company;
|
||||
|
||||
@ApiModelProperty(value = "备注")
|
||||
private String comments;
|
||||
|
||||
@ApiModelProperty(value = "状态, 0在线, 1离线")
|
||||
private Integer status;
|
||||
|
||||
@ApiModelProperty(value = "是否删除, 0否, 1是")
|
||||
@TableLogic
|
||||
private Integer deleted;
|
||||
|
||||
@ApiModelProperty(value = "租户id")
|
||||
private Integer tenantId;
|
||||
|
||||
@ApiModelProperty(value = "注册时间")
|
||||
private Date createTime;
|
||||
|
||||
@ApiModelProperty(value = "修改时间")
|
||||
private Date updateTime;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
package com.gxwebsoft.common.system.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.gxwebsoft.common.system.entity.SysFileType;
|
||||
import com.gxwebsoft.common.system.param.SysFileTypeParam;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 存储类型Mapper
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2025-05-16 14:24:28
|
||||
*/
|
||||
public interface SysFileTypeMapper extends BaseMapper<SysFileType> {
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*
|
||||
* @param page 分页对象
|
||||
* @param param 查询参数
|
||||
* @return List<SysFileType>
|
||||
*/
|
||||
List<SysFileType> selectPageRel(@Param("page") IPage<SysFileType> page,
|
||||
@Param("param") SysFileTypeParam param);
|
||||
|
||||
/**
|
||||
* 查询全部
|
||||
*
|
||||
* @param param 查询参数
|
||||
* @return List<User>
|
||||
*/
|
||||
List<SysFileType> selectListRel(@Param("param") SysFileTypeParam param);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
package com.gxwebsoft.common.system.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.gxwebsoft.common.system.entity.UserVerify;
|
||||
import com.gxwebsoft.common.system.param.UserVerifyParam;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 实名认证Mapper
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2025-05-29 23:01:04
|
||||
*/
|
||||
public interface UserVerifyMapper extends BaseMapper<UserVerify> {
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*
|
||||
* @param page 分页对象
|
||||
* @param param 查询参数
|
||||
* @return List<UserVerify>
|
||||
*/
|
||||
List<UserVerify> selectPageRel(@Param("page") IPage<UserVerify> page,
|
||||
@Param("param") UserVerifyParam param);
|
||||
|
||||
/**
|
||||
* 查询全部
|
||||
*
|
||||
* @param param 查询参数
|
||||
* @return List<User>
|
||||
*/
|
||||
List<UserVerify> selectListRel(@Param("param") UserVerifyParam param);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.gxwebsoft.common.system.mapper.SysFileTypeMapper">
|
||||
|
||||
<!-- 关联查询sql -->
|
||||
<sql id="selectSql">
|
||||
SELECT a.*
|
||||
FROM sys_file_type a
|
||||
<where>
|
||||
<if test="param.id != null">
|
||||
AND a.id = #{param.id}
|
||||
</if>
|
||||
<if test="param.type != null">
|
||||
AND a.type = #{param.type}
|
||||
</if>
|
||||
<if test="param.name != null">
|
||||
AND a.name LIKE CONCAT('%', #{param.name}, '%')
|
||||
</if>
|
||||
<if test="param.path != null">
|
||||
AND a.path LIKE CONCAT('%', #{param.path}, '%')
|
||||
</if>
|
||||
<if test="param.createTimeStart != null">
|
||||
AND a.create_time >= #{param.createTimeStart}
|
||||
</if>
|
||||
<if test="param.createTimeEnd != null">
|
||||
AND a.create_time <= #{param.createTimeEnd}
|
||||
</if>
|
||||
<if test="param.keywords != null">
|
||||
AND (a.comments LIKE CONCAT('%', #{param.keywords}, '%')
|
||||
)
|
||||
</if>
|
||||
</where>
|
||||
</sql>
|
||||
|
||||
<!-- 分页查询 -->
|
||||
<select id="selectPageRel" resultType="com.gxwebsoft.common.system.entity.SysFileType">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
<!-- 查询全部 -->
|
||||
<select id="selectListRel" resultType="com.gxwebsoft.common.system.entity.SysFileType">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,68 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.gxwebsoft.common.system.mapper.UserVerifyMapper">
|
||||
|
||||
<!-- 关联查询sql -->
|
||||
<sql id="selectSql">
|
||||
SELECT a.*
|
||||
FROM sys_user_verify a
|
||||
<where>
|
||||
<if test="param.id != null">
|
||||
AND a.id = #{param.id}
|
||||
</if>
|
||||
<if test="param.userId != null">
|
||||
AND a.user_id = #{param.userId}
|
||||
</if>
|
||||
<if test="param.type != null">
|
||||
AND a.type = #{param.type}
|
||||
</if>
|
||||
<if test="param.realName != null">
|
||||
AND a.real_name LIKE CONCAT('%', #{param.realName}, '%')
|
||||
</if>
|
||||
<if test="param.idCard != null">
|
||||
AND a.id_card LIKE CONCAT('%', #{param.idCard}, '%')
|
||||
</if>
|
||||
<if test="param.birthday != null">
|
||||
AND a.birthday LIKE CONCAT('%', #{param.birthday}, '%')
|
||||
</if>
|
||||
<if test="param.sfz1 != null">
|
||||
AND a.sfz_1 LIKE CONCAT('%', #{param.sfz1}, '%')
|
||||
</if>
|
||||
<if test="param.sfz2 != null">
|
||||
AND a.sfz_2 LIKE CONCAT('%', #{param.sfz2}, '%')
|
||||
</if>
|
||||
<if test="param.company != null">
|
||||
AND a.company LIKE CONCAT('%', #{param.company}, '%')
|
||||
</if>
|
||||
<if test="param.comments != null">
|
||||
AND a.comments LIKE CONCAT('%', #{param.comments}, '%')
|
||||
</if>
|
||||
<if test="param.status != null">
|
||||
AND a.status = #{param.status}
|
||||
</if>
|
||||
<if test="param.deleted != null">
|
||||
AND a.deleted = #{param.deleted}
|
||||
</if>
|
||||
<if test="param.deleted == null">
|
||||
AND a.deleted = 0
|
||||
</if>
|
||||
<if test="param.createTimeStart != null">
|
||||
AND a.create_time >= #{param.createTimeStart}
|
||||
</if>
|
||||
<if test="param.createTimeEnd != null">
|
||||
AND a.create_time <= #{param.createTimeEnd}
|
||||
</if>
|
||||
</where>
|
||||
</sql>
|
||||
|
||||
<!-- 分页查询 -->
|
||||
<select id="selectPageRel" resultType="com.gxwebsoft.common.system.entity.UserVerify">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
<!-- 查询全部 -->
|
||||
<select id="selectListRel" resultType="com.gxwebsoft.common.system.entity.UserVerify">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,39 @@
|
||||
package com.gxwebsoft.common.system.param;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.gxwebsoft.common.core.annotation.QueryField;
|
||||
import com.gxwebsoft.common.core.annotation.QueryType;
|
||||
import com.gxwebsoft.common.core.web.BaseParam;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* 存储类型查询参数
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2025-05-16 14:24:28
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||
@ApiModel(value = "SysFileTypeParam对象", description = "存储类型查询参数")
|
||||
public class SysFileTypeParam extends BaseParam {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty(value = "主键id")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer id;
|
||||
|
||||
@ApiModelProperty(value = "0本地存储,1阿里云oss,2腾讯云cos,3七牛云,4其他")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer type;
|
||||
|
||||
@ApiModelProperty(value = "名称")
|
||||
private String name;
|
||||
|
||||
@ApiModelProperty(value = "访问域名")
|
||||
private String path;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,66 @@
|
||||
package com.gxwebsoft.common.system.param;
|
||||
|
||||
import com.gxwebsoft.common.core.annotation.QueryField;
|
||||
import com.gxwebsoft.common.core.annotation.QueryType;
|
||||
import com.gxwebsoft.common.core.web.BaseParam;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* 实名认证查询参数
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2025-05-29 23:01:04
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||
@ApiModel(value = "UserVerifyParam对象", description = "实名认证查询参数")
|
||||
public class UserVerifyParam extends BaseParam {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty(value = "自增ID")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer id;
|
||||
|
||||
@ApiModelProperty(value = "用户ID")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer userId;
|
||||
|
||||
@ApiModelProperty(value = "认证类型, 0个人 1企业")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer type;
|
||||
|
||||
@ApiModelProperty(value = "真实姓名")
|
||||
private String realName;
|
||||
|
||||
@ApiModelProperty(value = "证件号码")
|
||||
private String idCard;
|
||||
|
||||
@ApiModelProperty(value = "出生日期")
|
||||
private String birthday;
|
||||
|
||||
@ApiModelProperty(value = "正面")
|
||||
private String sfz1;
|
||||
|
||||
@ApiModelProperty(value = "反面")
|
||||
private String sfz2;
|
||||
|
||||
@ApiModelProperty(value = "企业名称")
|
||||
private String company;
|
||||
|
||||
@ApiModelProperty(value = "备注")
|
||||
private String comments;
|
||||
|
||||
@ApiModelProperty(value = "状态, 0在线, 1离线")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer status;
|
||||
|
||||
@ApiModelProperty(value = "是否删除, 0否, 1是")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer deleted;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
package com.gxwebsoft.common.system.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
import com.gxwebsoft.common.system.entity.SysFileType;
|
||||
import com.gxwebsoft.common.system.param.SysFileTypeParam;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 存储类型Service
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2025-05-16 14:24:28
|
||||
*/
|
||||
public interface SysFileTypeService extends IService<SysFileType> {
|
||||
|
||||
/**
|
||||
* 分页关联查询
|
||||
*
|
||||
* @param param 查询参数
|
||||
* @return PageResult<SysFileType>
|
||||
*/
|
||||
PageResult<SysFileType> pageRel(SysFileTypeParam param);
|
||||
|
||||
/**
|
||||
* 关联查询全部
|
||||
*
|
||||
* @param param 查询参数
|
||||
* @return List<SysFileType>
|
||||
*/
|
||||
List<SysFileType> listRel(SysFileTypeParam param);
|
||||
|
||||
/**
|
||||
* 根据id查询
|
||||
*
|
||||
* @param id 主键id
|
||||
* @return SysFileType
|
||||
*/
|
||||
SysFileType getByIdRel(Integer id);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
package com.gxwebsoft.common.system.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
import com.gxwebsoft.common.system.entity.UserVerify;
|
||||
import com.gxwebsoft.common.system.param.UserVerifyParam;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 实名认证Service
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2025-05-29 23:01:04
|
||||
*/
|
||||
public interface UserVerifyService extends IService<UserVerify> {
|
||||
|
||||
/**
|
||||
* 分页关联查询
|
||||
*
|
||||
* @param param 查询参数
|
||||
* @return PageResult<UserVerify>
|
||||
*/
|
||||
PageResult<UserVerify> pageRel(UserVerifyParam param);
|
||||
|
||||
/**
|
||||
* 关联查询全部
|
||||
*
|
||||
* @param param 查询参数
|
||||
* @return List<UserVerify>
|
||||
*/
|
||||
List<UserVerify> listRel(UserVerifyParam param);
|
||||
|
||||
/**
|
||||
* 根据id查询
|
||||
*
|
||||
* @param id 自增ID
|
||||
* @return UserVerify
|
||||
*/
|
||||
UserVerify getByIdRel(Integer id);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
package com.gxwebsoft.common.system.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.gxwebsoft.common.core.web.PageParam;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
import com.gxwebsoft.common.system.entity.SysFileType;
|
||||
import com.gxwebsoft.common.system.mapper.SysFileTypeMapper;
|
||||
import com.gxwebsoft.common.system.param.SysFileTypeParam;
|
||||
import com.gxwebsoft.common.system.service.SysFileTypeService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 存储类型Service实现
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2025-05-16 14:24:28
|
||||
*/
|
||||
@Service
|
||||
public class SysFileTypeServiceImpl extends ServiceImpl<SysFileTypeMapper, SysFileType> implements SysFileTypeService {
|
||||
|
||||
@Override
|
||||
public PageResult<SysFileType> pageRel(SysFileTypeParam param) {
|
||||
PageParam<SysFileType, SysFileTypeParam> page = new PageParam<>(param);
|
||||
page.setDefaultOrder("sort_number asc, create_time desc");
|
||||
List<SysFileType> list = baseMapper.selectPageRel(page, param);
|
||||
return new PageResult<>(list, page.getTotal());
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<SysFileType> listRel(SysFileTypeParam param) {
|
||||
List<SysFileType> list = baseMapper.selectListRel(param);
|
||||
// 排序
|
||||
PageParam<SysFileType, SysFileTypeParam> page = new PageParam<>();
|
||||
page.setDefaultOrder("sort_number asc, create_time desc");
|
||||
return page.sortRecords(list);
|
||||
}
|
||||
|
||||
@Override
|
||||
public SysFileType getByIdRel(Integer id) {
|
||||
SysFileTypeParam param = new SysFileTypeParam();
|
||||
param.setId(id);
|
||||
return param.getOne(baseMapper.selectListRel(param));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
package com.gxwebsoft.common.system.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.gxwebsoft.common.system.mapper.UserVerifyMapper;
|
||||
import com.gxwebsoft.common.system.service.UserVerifyService;
|
||||
import com.gxwebsoft.common.system.entity.UserVerify;
|
||||
import com.gxwebsoft.common.system.param.UserVerifyParam;
|
||||
import com.gxwebsoft.common.core.web.PageParam;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 实名认证Service实现
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2025-05-29 23:01:04
|
||||
*/
|
||||
@Service
|
||||
public class UserVerifyServiceImpl extends ServiceImpl<UserVerifyMapper, UserVerify> implements UserVerifyService {
|
||||
|
||||
@Override
|
||||
public PageResult<UserVerify> pageRel(UserVerifyParam param) {
|
||||
PageParam<UserVerify, UserVerifyParam> page = new PageParam<>(param);
|
||||
page.setDefaultOrder("create_time desc");
|
||||
List<UserVerify> list = baseMapper.selectPageRel(page, param);
|
||||
return new PageResult<>(list, page.getTotal());
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<UserVerify> listRel(UserVerifyParam param) {
|
||||
List<UserVerify> list = baseMapper.selectListRel(param);
|
||||
// 排序
|
||||
PageParam<UserVerify, UserVerifyParam> page = new PageParam<>();
|
||||
page.setDefaultOrder("create_time desc");
|
||||
return page.sortRecords(list);
|
||||
}
|
||||
|
||||
@Override
|
||||
public UserVerify getByIdRel(Integer id) {
|
||||
UserVerifyParam param = new UserVerifyParam();
|
||||
param.setId(id);
|
||||
return param.getOne(baseMapper.selectListRel(param));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -50,7 +50,8 @@ public class SysGenerator {
|
||||
// "sys_website",
|
||||
// "sys_website_field",
|
||||
// "sys_domain",
|
||||
"sys_company"
|
||||
// "sys_company",
|
||||
// "sys_user_verify"
|
||||
};
|
||||
// 需要去除的表前缀
|
||||
private static final String[] TABLE_PREFIX = new String[]{
|
||||
|
||||
Reference in New Issue
Block a user