From dba9b181d8699e1e6022eb250ccf3ab4f95084fe Mon Sep 17 00:00:00 2001 From: hansha Date: Sun, 7 Apr 2024 08:36:14 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=B5=84=E8=AE=AF=E5=AD=97?= =?UTF-8?q?=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/application-hs.yml | 4 + .../src/main/resources/application-test.yml | 1 + .../java/com/ruoyi/szxc/domain/SzxcNews.java | 78 +++++++++---------- .../resources/mapper/szxc/SzxcNewsMapper.xml | 30 +++---- ruoyi-ui/vue.config.js | 1 + 5 files changed, 60 insertions(+), 54 deletions(-) diff --git a/ruoyi-admin/src/main/resources/application-hs.yml b/ruoyi-admin/src/main/resources/application-hs.yml index 7eb5253..9817f60 100644 --- a/ruoyi-admin/src/main/resources/application-hs.yml +++ b/ruoyi-admin/src/main/resources/application-hs.yml @@ -6,6 +6,10 @@ spring: druid: # 主库数据源 master: + #内网数据库 + #url: jdbc:mysql://172.16.9.9:3306/szxc?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 + #username: root + #password: ruanfa url: jdbc:mysql://localhost:3307/szxc?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 username: root password: hs123456 diff --git a/ruoyi-admin/src/main/resources/application-test.yml b/ruoyi-admin/src/main/resources/application-test.yml index 26d9a70..86ee8f4 100644 --- a/ruoyi-admin/src/main/resources/application-test.yml +++ b/ruoyi-admin/src/main/resources/application-test.yml @@ -6,6 +6,7 @@ spring: druid: # 主库数据源 master: + #内网jenkins启动连接内网数据库szxc url: jdbc:mysql://localhost:3306/szxc?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 username: ceshi password: ruanfa diff --git a/ruoyi-szxc/src/main/java/com/ruoyi/szxc/domain/SzxcNews.java b/ruoyi-szxc/src/main/java/com/ruoyi/szxc/domain/SzxcNews.java index c6a2188..95c1a9d 100644 --- a/ruoyi-szxc/src/main/java/com/ruoyi/szxc/domain/SzxcNews.java +++ b/ruoyi-szxc/src/main/java/com/ruoyi/szxc/domain/SzxcNews.java @@ -7,9 +7,9 @@ import com.ruoyi.common.core.domain.BaseEntity; /** * 公告资讯对象 szxc_news - * + * * @author hs - * @date 2024-03-16 + * @date 2024-04-03 */ public class SzxcNews extends BaseEntity { @@ -22,8 +22,8 @@ public class SzxcNews extends BaseEntity @Excel(name = "标题") private String title; - /** 类型(公告/咨询) */ - @Excel(name = "类型(公告/咨询)") + /** 类型(字典) */ + @Excel(name = "类型(字典)") private String type; /** 图片 */ @@ -36,7 +36,7 @@ public class SzxcNews extends BaseEntity /** 级别(县/乡/村) */ @Excel(name = "级别(县/乡/村)") - private String leave; + private String sort; /** 部门id */ @Excel(name = "部门id") @@ -50,84 +50,84 @@ public class SzxcNews extends BaseEntity @Excel(name = "创建者ID") private Long userId; - public void setId(Long id) + public void setId(Long id) { this.id = id; } - public Long getId() + public Long getId() { return id; } - public void setTitle(String title) + public void setTitle(String title) { this.title = title; } - public String getTitle() + public String getTitle() { return title; } - public void setType(String type) + public void setType(String type) { this.type = type; } - public String getType() + public String getType() { return type; } - public void setPicture(String picture) + public void setPicture(String picture) { this.picture = picture; } - public String getPicture() + public String getPicture() { return picture; } - public void setContent(String content) + public void setContent(String content) { this.content = content; } - public String getContent() + public String getContent() { return content; } - public void setLeave(String leave) + public void setSort(String sort) { - this.leave = leave; + this.sort = sort; } - public String getLeave() + public String getSort() { - return leave; + return sort; } - public void setDeptId(Long deptId) + public void setDeptId(Long deptId) { this.deptId = deptId; } - public Long getDeptId() + public Long getDeptId() { return deptId; } - public void setDeptName(String deptName) + public void setDeptName(String deptName) { this.deptName = deptName; } - public String getDeptName() + public String getDeptName() { return deptName; } - public void setUserId(Long userId) + public void setUserId(Long userId) { this.userId = userId; } - public Long getUserId() + public Long getUserId() { return userId; } @@ -135,19 +135,19 @@ public class SzxcNews extends BaseEntity @Override public String toString() { return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) - .append("id", getId()) - .append("title", getTitle()) - .append("type", getType()) - .append("picture", getPicture()) - .append("content", getContent()) - .append("leave", getLeave()) - .append("createBy", getCreateBy()) - .append("createTime", getCreateTime()) - .append("updateBy", getUpdateBy()) - .append("updateTime", getUpdateTime()) - .append("deptId", getDeptId()) - .append("deptName", getDeptName()) - .append("userId", getUserId()) - .toString(); + .append("id", getId()) + .append("title", getTitle()) + .append("type", getType()) + .append("picture", getPicture()) + .append("content", getContent()) + .append("sort", getSort()) + .append("createBy", getCreateBy()) + .append("createTime", getCreateTime()) + .append("updateBy", getUpdateBy()) + .append("updateTime", getUpdateTime()) + .append("deptId", getDeptId()) + .append("deptName", getDeptName()) + .append("userId", getUserId()) + .toString(); } } diff --git a/ruoyi-szxc/src/main/resources/mapper/szxc/SzxcNewsMapper.xml b/ruoyi-szxc/src/main/resources/mapper/szxc/SzxcNewsMapper.xml index d660db1..5e303c4 100644 --- a/ruoyi-szxc/src/main/resources/mapper/szxc/SzxcNewsMapper.xml +++ b/ruoyi-szxc/src/main/resources/mapper/szxc/SzxcNewsMapper.xml @@ -1,16 +1,16 @@ + PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" + "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> - + - + @@ -21,28 +21,28 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - select id, title, type, picture, content, leave, create_by, create_time, update_by, update_time, dept_id, dept_name, user_id from szxc_news + select id, title, type, picture, content, sort, create_by, create_time, update_by, update_time, dept_id, dept_name, user_id from szxc_news - + - + insert into szxc_news @@ -50,7 +50,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" type, picture, content, - leave, + sort, create_by, create_time, update_by, @@ -58,13 +58,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" dept_id, dept_name, user_id, - + #{title}, #{type}, #{picture}, #{content}, - #{leave}, + #{sort}, #{createBy}, #{createTime}, #{updateBy}, @@ -72,7 +72,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" #{deptId}, #{deptName}, #{userId}, - + @@ -82,7 +82,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" type = #{type}, picture = #{picture}, content = #{content}, - leave = #{leave}, + sort = #{sort}, create_by = #{createBy}, create_time = #{createTime}, update_by = #{updateBy}, @@ -99,7 +99,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - delete from szxc_news where id in + delete from szxc_news where id in #{id} diff --git a/ruoyi-ui/vue.config.js b/ruoyi-ui/vue.config.js index 61bb18c..0ad383d 100644 --- a/ruoyi-ui/vue.config.js +++ b/ruoyi-ui/vue.config.js @@ -36,6 +36,7 @@ module.exports = { // detail: https://cli.vuejs.org/config/#devserver-proxy [process.env.VUE_APP_BASE_API]: { target: `http://localhost:8090`, + //target: `http://172.16.9.9:8090`, changeOrigin: true, pathRewrite: { ['^' + process.env.VUE_APP_BASE_API]: ''