diff --git a/.gitignore b/.gitignore index a2a3040..2374b22 100644 --- a/.gitignore +++ b/.gitignore @@ -29,3 +29,4 @@ build/ ### VS Code ### .vscode/ +/cert/ diff --git a/src/main/java/com/gxwebsoft/common/system/controller/SettingController.java b/src/main/java/com/gxwebsoft/common/system/controller/SettingController.java index e9e3bea..5420d06 100644 --- a/src/main/java/com/gxwebsoft/common/system/controller/SettingController.java +++ b/src/main/java/com/gxwebsoft/common/system/controller/SettingController.java @@ -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())); // 更新租户信息 diff --git a/src/main/java/com/gxwebsoft/common/system/controller/SysFileTypeController.java b/src/main/java/com/gxwebsoft/common/system/controller/SysFileTypeController.java new file mode 100644 index 0000000..04d495f --- /dev/null +++ b/src/main/java/com/gxwebsoft/common/system/controller/SysFileTypeController.java @@ -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> page(SysFileTypeParam param) { + // 使用关联查询 + return success(sysFileTypeService.pageRel(param)); + } + + @PreAuthorize("hasAuthority('sys:sysFileType:list')") + @ApiOperation("查询全部存储类型") + @GetMapping() + public ApiResult> list(SysFileTypeParam param) { + // 使用关联查询 + return success(sysFileTypeService.listRel(param)); + } + + @PreAuthorize("hasAuthority('sys:sysFileType:list')") + @ApiOperation("根据id查询存储类型") + @GetMapping("/{id}") + public ApiResult 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 list) { + if (sysFileTypeService.saveBatch(list)) { + return success("添加成功"); + } + return fail("添加失败"); + } + + @PreAuthorize("hasAuthority('sys:sysFileType:update')") + @OperationLog + @ApiOperation("批量修改存储类型") + @PutMapping("/batch") + public ApiResult removeBatch(@RequestBody BatchParam batchParam) { + if (batchParam.update(sysFileTypeService, "id")) { + return success("修改成功"); + } + return fail("修改失败"); + } + + @PreAuthorize("hasAuthority('sys:sysFileType:remove')") + @OperationLog + @ApiOperation("批量删除存储类型") + @DeleteMapping("/batch") + public ApiResult removeBatch(@RequestBody List ids) { + if (sysFileTypeService.removeByIds(ids)) { + return success("删除成功"); + } + return fail("删除失败"); + } + +} diff --git a/src/main/java/com/gxwebsoft/common/system/controller/UserVerifyController.java b/src/main/java/com/gxwebsoft/common/system/controller/UserVerifyController.java new file mode 100644 index 0000000..8cc7b32 --- /dev/null +++ b/src/main/java/com/gxwebsoft/common/system/controller/UserVerifyController.java @@ -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> page(UserVerifyParam param) { + // 使用关联查询 + return success(userVerifyService.pageRel(param)); + } + + @PreAuthorize("hasAuthority('sys:userVerify:list')") + @ApiOperation("查询全部实名认证") + @GetMapping() + public ApiResult> list(UserVerifyParam param) { + // 使用关联查询 + return success(userVerifyService.listRel(param)); + } + + @ApiOperation("根据id查询实名认证") + @GetMapping("/{id}") + public ApiResult 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 list) { + if (userVerifyService.saveBatch(list)) { + return success("添加成功"); + } + return fail("添加失败"); + } + + @PreAuthorize("hasAuthority('sys:userVerify:update')") + @OperationLog + @ApiOperation("批量修改实名认证") + @PutMapping("/batch") + public ApiResult removeBatch(@RequestBody BatchParam batchParam) { + if (batchParam.update(userVerifyService, "id")) { + return success("修改成功"); + } + return fail("修改失败"); + } + + @PreAuthorize("hasAuthority('sys:userVerify:remove')") + @OperationLog + @ApiOperation("批量删除实名认证") + @DeleteMapping("/batch") + public ApiResult removeBatch(@RequestBody List ids) { + if (userVerifyService.removeByIds(ids)) { + return success("删除成功"); + } + return fail("删除失败"); + } + +} diff --git a/src/main/java/com/gxwebsoft/common/system/entity/FileRecord.java b/src/main/java/com/gxwebsoft/common/system/entity/FileRecord.java index 51ce35e..efb1be4 100644 --- a/src/main/java/com/gxwebsoft/common/system/entity/FileRecord.java +++ b/src/main/java/com/gxwebsoft/common/system/entity/FileRecord.java @@ -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; diff --git a/src/main/java/com/gxwebsoft/common/system/entity/SysFileType.java b/src/main/java/com/gxwebsoft/common/system/entity/SysFileType.java new file mode 100644 index 0000000..5729383 --- /dev/null +++ b/src/main/java/com/gxwebsoft/common/system/entity/SysFileType.java @@ -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; + +} diff --git a/src/main/java/com/gxwebsoft/common/system/entity/UserVerify.java b/src/main/java/com/gxwebsoft/common/system/entity/UserVerify.java new file mode 100644 index 0000000..14a18ed --- /dev/null +++ b/src/main/java/com/gxwebsoft/common/system/entity/UserVerify.java @@ -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; + +} diff --git a/src/main/java/com/gxwebsoft/common/system/mapper/SysFileTypeMapper.java b/src/main/java/com/gxwebsoft/common/system/mapper/SysFileTypeMapper.java new file mode 100644 index 0000000..026b0d9 --- /dev/null +++ b/src/main/java/com/gxwebsoft/common/system/mapper/SysFileTypeMapper.java @@ -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 { + + /** + * 分页查询 + * + * @param page 分页对象 + * @param param 查询参数 + * @return List + */ + List selectPageRel(@Param("page") IPage page, + @Param("param") SysFileTypeParam param); + + /** + * 查询全部 + * + * @param param 查询参数 + * @return List + */ + List selectListRel(@Param("param") SysFileTypeParam param); + +} diff --git a/src/main/java/com/gxwebsoft/common/system/mapper/UserVerifyMapper.java b/src/main/java/com/gxwebsoft/common/system/mapper/UserVerifyMapper.java new file mode 100644 index 0000000..44fb323 --- /dev/null +++ b/src/main/java/com/gxwebsoft/common/system/mapper/UserVerifyMapper.java @@ -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 { + + /** + * 分页查询 + * + * @param page 分页对象 + * @param param 查询参数 + * @return List + */ + List selectPageRel(@Param("page") IPage page, + @Param("param") UserVerifyParam param); + + /** + * 查询全部 + * + * @param param 查询参数 + * @return List + */ + List selectListRel(@Param("param") UserVerifyParam param); + +} diff --git a/src/main/java/com/gxwebsoft/common/system/mapper/xml/SysFileTypeMapper.xml b/src/main/java/com/gxwebsoft/common/system/mapper/xml/SysFileTypeMapper.xml new file mode 100644 index 0000000..980c752 --- /dev/null +++ b/src/main/java/com/gxwebsoft/common/system/mapper/xml/SysFileTypeMapper.xml @@ -0,0 +1,45 @@ + + + + + + + SELECT a.* + FROM sys_file_type a + + + AND a.id = #{param.id} + + + AND a.type = #{param.type} + + + AND a.name LIKE CONCAT('%', #{param.name}, '%') + + + AND a.path LIKE CONCAT('%', #{param.path}, '%') + + + AND a.create_time >= #{param.createTimeStart} + + + AND a.create_time <= #{param.createTimeEnd} + + + AND (a.comments LIKE CONCAT('%', #{param.keywords}, '%') + ) + + + + + + + + + + + diff --git a/src/main/java/com/gxwebsoft/common/system/mapper/xml/UserVerifyMapper.xml b/src/main/java/com/gxwebsoft/common/system/mapper/xml/UserVerifyMapper.xml new file mode 100644 index 0000000..d094a5d --- /dev/null +++ b/src/main/java/com/gxwebsoft/common/system/mapper/xml/UserVerifyMapper.xml @@ -0,0 +1,68 @@ + + + + + + + SELECT a.* + FROM sys_user_verify a + + + AND a.id = #{param.id} + + + AND a.user_id = #{param.userId} + + + AND a.type = #{param.type} + + + AND a.real_name LIKE CONCAT('%', #{param.realName}, '%') + + + AND a.id_card LIKE CONCAT('%', #{param.idCard}, '%') + + + AND a.birthday LIKE CONCAT('%', #{param.birthday}, '%') + + + AND a.sfz_1 LIKE CONCAT('%', #{param.sfz1}, '%') + + + AND a.sfz_2 LIKE CONCAT('%', #{param.sfz2}, '%') + + + AND a.company LIKE CONCAT('%', #{param.company}, '%') + + + AND a.comments LIKE CONCAT('%', #{param.comments}, '%') + + + AND a.status = #{param.status} + + + AND a.deleted = #{param.deleted} + + + AND a.deleted = 0 + + + AND a.create_time >= #{param.createTimeStart} + + + AND a.create_time <= #{param.createTimeEnd} + + + + + + + + + + + diff --git a/src/main/java/com/gxwebsoft/common/system/param/SysFileTypeParam.java b/src/main/java/com/gxwebsoft/common/system/param/SysFileTypeParam.java new file mode 100644 index 0000000..8285f29 --- /dev/null +++ b/src/main/java/com/gxwebsoft/common/system/param/SysFileTypeParam.java @@ -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; + +} diff --git a/src/main/java/com/gxwebsoft/common/system/param/UserVerifyParam.java b/src/main/java/com/gxwebsoft/common/system/param/UserVerifyParam.java new file mode 100644 index 0000000..9576985 --- /dev/null +++ b/src/main/java/com/gxwebsoft/common/system/param/UserVerifyParam.java @@ -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; + +} diff --git a/src/main/java/com/gxwebsoft/common/system/service/SysFileTypeService.java b/src/main/java/com/gxwebsoft/common/system/service/SysFileTypeService.java new file mode 100644 index 0000000..73c5211 --- /dev/null +++ b/src/main/java/com/gxwebsoft/common/system/service/SysFileTypeService.java @@ -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 { + + /** + * 分页关联查询 + * + * @param param 查询参数 + * @return PageResult + */ + PageResult pageRel(SysFileTypeParam param); + + /** + * 关联查询全部 + * + * @param param 查询参数 + * @return List + */ + List listRel(SysFileTypeParam param); + + /** + * 根据id查询 + * + * @param id 主键id + * @return SysFileType + */ + SysFileType getByIdRel(Integer id); + +} diff --git a/src/main/java/com/gxwebsoft/common/system/service/UserVerifyService.java b/src/main/java/com/gxwebsoft/common/system/service/UserVerifyService.java new file mode 100644 index 0000000..b8bb118 --- /dev/null +++ b/src/main/java/com/gxwebsoft/common/system/service/UserVerifyService.java @@ -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 { + + /** + * 分页关联查询 + * + * @param param 查询参数 + * @return PageResult + */ + PageResult pageRel(UserVerifyParam param); + + /** + * 关联查询全部 + * + * @param param 查询参数 + * @return List + */ + List listRel(UserVerifyParam param); + + /** + * 根据id查询 + * + * @param id 自增ID + * @return UserVerify + */ + UserVerify getByIdRel(Integer id); + +} diff --git a/src/main/java/com/gxwebsoft/common/system/service/impl/SysFileTypeServiceImpl.java b/src/main/java/com/gxwebsoft/common/system/service/impl/SysFileTypeServiceImpl.java new file mode 100644 index 0000000..6724f17 --- /dev/null +++ b/src/main/java/com/gxwebsoft/common/system/service/impl/SysFileTypeServiceImpl.java @@ -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 implements SysFileTypeService { + + @Override + public PageResult pageRel(SysFileTypeParam param) { + PageParam page = new PageParam<>(param); + page.setDefaultOrder("sort_number asc, create_time desc"); + List list = baseMapper.selectPageRel(page, param); + return new PageResult<>(list, page.getTotal()); + } + + @Override + public List listRel(SysFileTypeParam param) { + List list = baseMapper.selectListRel(param); + // 排序 + PageParam 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)); + } + +} diff --git a/src/main/java/com/gxwebsoft/common/system/service/impl/UserVerifyServiceImpl.java b/src/main/java/com/gxwebsoft/common/system/service/impl/UserVerifyServiceImpl.java new file mode 100644 index 0000000..3560005 --- /dev/null +++ b/src/main/java/com/gxwebsoft/common/system/service/impl/UserVerifyServiceImpl.java @@ -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 implements UserVerifyService { + + @Override + public PageResult pageRel(UserVerifyParam param) { + PageParam page = new PageParam<>(param); + page.setDefaultOrder("create_time desc"); + List list = baseMapper.selectPageRel(page, param); + return new PageResult<>(list, page.getTotal()); + } + + @Override + public List listRel(UserVerifyParam param) { + List list = baseMapper.selectListRel(param); + // 排序 + PageParam 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)); + } + +} diff --git a/src/test/java/com/gxwebsoft/generator/SysGenerator.java b/src/test/java/com/gxwebsoft/generator/SysGenerator.java index bf6c616..dedabe2 100644 --- a/src/test/java/com/gxwebsoft/generator/SysGenerator.java +++ b/src/test/java/com/gxwebsoft/generator/SysGenerator.java @@ -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[]{