pom.xml
@@ -170,6 +170,8 @@ <version>${ruoyi.version}</version> </dependency> </dependencies> </dependencyManagement> @@ -192,6 +194,11 @@ <build> <plugins> <plugin> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven-plugin</artifactId> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>3.1</version> ruoyi-admin/pom.xml
@@ -37,7 +37,7 @@ <version>1.6.2</version> </dependency> <!-- Mysql驱动包 --> <!-- Mysql驱动包 --> <dependency> <groupId>mysql</groupId> <artifactId>mysql-connector-java</artifactId> @@ -91,15 +91,15 @@ </execution> </executions> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-war-plugin</artifactId> <version>3.1.0</version> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-war-plugin</artifactId> <version>3.1.0</version> <configuration> <failOnMissingWebXml>false</failOnMissingWebXml> <warName>${project.artifactId}</warName> </configuration> </plugin> </configuration> </plugin> </plugins> <finalName>${project.artifactId}</finalName> </build> ruoyi-admin/src/main/java/com/ruoyi/web/controller/common/CaptchaController.java
@@ -89,6 +89,8 @@ ajax.put("uuid", uuid); ajax.put("img", Base64.encode(os.toByteArray())); ajax.put("code",200); ajax.put("value",code); return ajax; } } ruoyi-admin/src/main/java/com/ruoyi/web/controller/common/CommonController.java
@@ -10,6 +10,7 @@ import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.MediaType; import org.springframework.security.core.parameters.P; import org.springframework.web.bind.annotation.*; import org.springframework.web.multipart.MultipartFile; import com.ruoyi.common.config.RuoYiConfig; @@ -43,7 +44,7 @@ * @param delete 是否删除 */ @GetMapping("/download") public void fileDownload(@PathParam("fileName") String fileName,@PathParam("delete") Boolean delete, HttpServletResponse response, HttpServletRequest request) public void fileDownload(@PathParam("fileName") String fileName, @PathParam("delete") Boolean delete, HttpServletResponse response, HttpServletRequest request) { try { ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/ZInfoUserController.java
New file @@ -0,0 +1,21 @@ package com.ruoyi.web.controller.system; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; /** * <p> * 前端控制器 * </p> * * @author ojq * @since 2023-03-14 */ @RestController @RequestMapping("/self/user") public class ZInfoUserController { } ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/ZfPropertyController.java
@@ -1,11 +1,14 @@ package com.ruoyi.web.controller.system; import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.ruoyi.common.annotation.Log; import com.ruoyi.common.core.controller.BaseController; import com.ruoyi.common.core.domain.AjaxResult; import com.ruoyi.common.core.page.TableDataInfo; import com.ruoyi.common.enums.BusinessType; import com.ruoyi.common.utils.poi.ExcelUtil; import com.ruoyi.domain.PageParams; import com.ruoyi.domain.ZfProperty; import com.ruoyi.service.IZfPropertyService; import org.springframework.beans.factory.annotation.Autowired; @@ -28,10 +31,18 @@ private IZfPropertyService zfPropertyService; @GetMapping("/all") public TableDataInfo listAll(){ startPage(); List<ZfProperty> list = zfPropertyService.list(); return getDataTable(list); public AjaxResult listAll(PageParams pageParams){ Page<ZfProperty> page = new Page<ZfProperty>(pageParams.getPageNum(),pageParams.getPageSize()); Page<ZfProperty> pageResult = zfPropertyService.page(page); AjaxResult success = AjaxResult.success(); success.put("msg","操作成功"); success.put("code",200); success.put("data",pageResult.getRecords()); success.put("total",pageResult.getTotal()); success.put("pageNum",pageResult.getCurrent()); success.put("pageSize",pageResult.getSize()); return success; } // /** ruoyi-admin/src/main/java/com/ruoyi/web/core/config/MybatisPlusConfig.java
New file @@ -0,0 +1,27 @@ package com.ruoyi.web.core.config; import com.baomidou.mybatisplus.annotation.DbType; import com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor; import com.baomidou.mybatisplus.extension.plugins.inner.PaginationInnerInterceptor; import org.mybatis.spring.annotation.MapperScan; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; /** * @Version 1.0 * @Author Jin_quan Ou * @Date 2023-03-15 14:58 */ @Configuration public class MybatisPlusConfig { //定义分页的拦截器 @Bean public MybatisPlusInterceptor getMybatisPlusInterceptor() { MybatisPlusInterceptor mybatisPlusInterceptor = new MybatisPlusInterceptor(); mybatisPlusInterceptor.addInnerInterceptor(new PaginationInnerInterceptor(DbType.MYSQL)); return mybatisPlusInterceptor; } } ruoyi-admin/src/main/resources/application-druid.yml
@@ -8,7 +8,7 @@ master: url: jdbc:mysql://localhost:3306/ruoyi?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 username: root password: 123456 password: ZhangApp123! # 从库数据源 slave: # 从数据源开关/默认关闭 ruoyi-admin/src/main/resources/application.yml
@@ -9,7 +9,7 @@ # 实例演示开关 demoEnabled: true # 文件路径 示例( Windows配置D:/ruoyi/uploadPath,Linux配置 /home/ruoyi/uploadPath) profile: D:/ruoyi/uploadPath profile: C:/ruoyi/uploadPath # 获取ip地址开关 addressEnabled: false # 验证码类型 math 数组计算 char 字符验证 @@ -70,13 +70,13 @@ # redis 配置 redis: # 地址 host: 192.168.138.100 host: localhost # 端口,默认为6379 port: 6379 # 数据库索引 database: 0 # 密码 password: 123456 # # 密码 # password: 123456 # 连接超时时间 timeout: 10s lettuce: @@ -97,7 +97,7 @@ # 令牌密钥 secret: abcdefghijklmnopqrstuvwxyz # 令牌有效期(默认30分钟) expireTime: 30 expireTime: 60 # MyBatis配置 mybatis-plus: ruoyi-admin/src/main/resources/banner.txt
File was deleted ruoyi-admin/src/test/java/com/ruoyi/generatorTest.java
@@ -41,14 +41,28 @@ .strategyConfig(builder -> { // builder.addInclude("zf_clean") // 设置需要生成的表名 // .addInclude("zf_collection") // 设置需要生成的表名 builder.addInclude("zf_contact") // 设置需要生成的表名 .addInclude("zf_doctor") // 设置需要生成的表名 .addInclude("zf_economy") // 设置需要生成的表名 .addInclude("zf_equipment") // 设置需要生成的表名 .addInclude("zf_event") // 设置需要生成的表名 .addInclude("zf_master") // 设置需要生成的表名 .addInclude("zf_pet") // 设置需要生成的表名 .addInclude("zf_pet_note"); // 设置需要生成的表名 builder.addInclude("z_abroad") // 设置需要生成的表名 .addInclude("z_autobiography") // 设置需要生成的表名 .addInclude("z_certificate") // 设置需要生成的表名 .addInclude("z_child") // 设置需要生成的表名 .addInclude("z_dict") // 设置需要生成的表名 .addInclude("z_experience") // 设置需要生成的表名 .addInclude("z_health_base") // 设置需要生成的表名 .addInclude("z_health_habit") // 设置需要生成的表名 .addInclude("z_health_info") // 设置需要生成的表名 .addInclude("z_honor") // 设置需要生成的表名 .addInclude("z_idea") // 设置需要生成的表名 .addInclude("z_info_user") // 设置需要生成的表名 .addInclude("z_login_user") // 设置需要生成的表名 .addInclude("z_marry") // 设置需要生成的表名 .addInclude("z_property") // 设置需要生成的表名 .addInclude("z_secret") // 设置需要生成的表名 .addInclude("z_self_note") // 设置需要生成的表名 .addInclude("z_stay_out") // 设置需要生成的表名 .addInclude("z_travel_base") // 设置需要生成的表名 .addInclude("z_travel_price") // 设置需要生成的表名 .addInclude("z_year_health") // 设置需要生成的表名 .addInclude("z_year_info"); // 设置需要生成的表名 builder.serviceBuilder() ruoyi-common/pom.xml
@@ -139,4 +139,13 @@ </dependencies> <build> <plugins> <plugin> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven-plugin</artifactId> </plugin> </plugins> </build> </project> ruoyi-common/src/main/java/com/ruoyi/common/constant/Constants.java
@@ -67,7 +67,7 @@ /** * 验证码有效期(分钟) */ public static final Integer CAPTCHA_EXPIRATION = 2; public static final Integer CAPTCHA_EXPIRATION = 10; /** * 令牌 ruoyi-framework/pom.xml
@@ -67,4 +67,13 @@ </dependencies> <build> <plugins> <plugin> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven-plugin</artifactId> </plugin> </plugins> </build> </project> ruoyi-generator/pom.xml
@@ -37,4 +37,13 @@ </dependencies> <build> <plugins> <plugin> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven-plugin</artifactId> </plugin> </plugins> </build> </project> ruoyi-quartz/pom.xml
@@ -37,4 +37,13 @@ </dependencies> <build> <plugins> <plugin> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven-plugin</artifactId> </plugin> </plugins> </build> </project> ruoyi-system/pom.xml
@@ -25,4 +25,13 @@ </dependencies> <build> <plugins> <plugin> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven-plugin</artifactId> </plugin> </plugins> </build> </project> zhang-content/pom.xml
@@ -45,5 +45,15 @@ </dependency> </dependencies> <build> <plugins> <plugin> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven-plugin</artifactId> </plugin> </plugins> </build> </project> zhang-content/src/main/java/com/ruoyi/domain/PageParams.java
New file @@ -0,0 +1,33 @@ package com.ruoyi.domain; import lombok.Data; import lombok.ToString; /** * @Version 1.0 * @Author Jin_quan Ou * @Date 2023-03-15 14:55 */ @Data @ToString public class PageParams { //当前页码默认值 public static final long DEFAULT_PAGE_CURRENT = 1L; //每页记录数默认值 public static final long DEFAULT_PAGE_SIZE = 10L; //当前页码 private Long pageNum = DEFAULT_PAGE_CURRENT; //每页记录数默认值 private Long pageSize = DEFAULT_PAGE_SIZE; public PageParams(){ } public PageParams(long pageNum,long pageSize){ this.pageNum = pageNum; this.pageSize = pageSize; } } zhang-content/src/main/java/com/ruoyi/domain/ZInfoUser.java
@@ -1,9 +1,127 @@ package com.ruoyi.domain; import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; import lombok.Data; import lombok.ToString; import java.io.Serializable; import java.time.LocalDate; /** * @Version 1.0 * @Author Jin_quan Ou * @Date 2023-03-12 17:09 */ public class ZInfoUser { @TableName("z_info_user") @Data @ToString public class ZInfoUser implements Serializable { private static final long serialVersionUID = 1L; @TableId(value = "user_id", type = IdType.AUTO) private Integer userId; /** * 姓名 */ private String nickName; /** * 曾用名 */ private String oldName; /** * 性别 */ private Integer sex; /** * 国籍 */ private String nationality; /** * 民族 */ private String nation; /** * 婚姻状况--0:未婚,1:已婚,2:离婚 */ private Integer maritalStatus; /** * 政治面貌 */ private String politicalOutlook; /** * 电话号码 */ private String phoneNumber; /** * 身份证号 */ private String idNum; /** * 户籍地址 */ private String locationAddress; /** * 常住地址 */ private String alwaysAddress; /** * 户籍地公安机关 */ private String locationPolice; /** * 常住地公安机关 */ private String alwaysPolice; /** * 所在单位/学校 */ private String unit; /** * 职务/身份 */ private String position; /** * 图片地址 */ private String img; /** * 父亲的id */ private Integer fatherId; /** * 母亲的id */ private Integer momId; /** * 出生年月日 */ private LocalDate birth; /** * 个人背景图片、视频 */ private String url; } zhang-content/src/main/java/com/ruoyi/mapper/ZInfoUserMapper.java
New file @@ -0,0 +1,19 @@ package com.ruoyi.mapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.ruoyi.domain.ZInfoUser; import org.apache.ibatis.annotations.Mapper; /** * <p> * Mapper 接口 * </p> * * @author ojq * @since 2023-03-14 */ @Mapper public interface ZInfoUserMapper extends BaseMapper<ZInfoUser> { } zhang-content/src/main/java/com/ruoyi/service/ZInfoUserService.java
New file @@ -0,0 +1,15 @@ package com.ruoyi.service; import com.baomidou.mybatisplus.extension.service.IService; import com.ruoyi.domain.ZInfoUser; /** * <p> * 服务类 * </p> * * @author ojq * @since 2023-03-14 */ public interface ZInfoUserService extends IService<ZInfoUser> { } zhang-content/src/main/java/com/ruoyi/service/impl/ZInfoUserServiceImpl.java
New file @@ -0,0 +1,22 @@ package com.ruoyi.service.impl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.ruoyi.domain.ZInfoUser; import com.ruoyi.mapper.ZInfoUserMapper; import com.ruoyi.service.ZInfoUserService; import org.springframework.stereotype.Service; /** * <p> * 服务实现类 * </p> * * @author ojq * @since 2023-03-14 */ @Service public class ZInfoUserServiceImpl extends ServiceImpl<ZInfoUserMapper, ZInfoUser> implements ZInfoUserService { }