From 8492dcafa899e17bf12bcff074c56a000b031716 Mon Sep 17 00:00:00 2001 From: hubin <393696201@qq.com> Date: Tue, 17 Nov 2020 13:14:21 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E4=BA=86=E4=B8=9A?= =?UTF-8?q?=E5=8A=A1=E9=83=A8=E5=88=86=E5=86=85=E5=AE=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/cetc32/dh/entity/DemandSubmit.java | 125 +++++++ .../com/cetc32/dh/entity/EstimateTask.java | 105 ++++++ .../com/cetc32/dh/entity/Organization.java | 33 ++ .../com/cetc32/dh/entity/Productdemand.java | 85 +++++ .../cetc32/dh/mybatis/DemandSubmitMapper.java | 26 ++ .../cetc32/dh/mybatis/EstimateTaskMapper.java | 25 ++ .../cetc32/dh/mybatis/OrganizationMapper.java | 26 ++ .../dh/mybatis/ProductdemandMapper.java | 25 ++ .../resources/mapper/DemandSubmitMapper.xml | 323 ++++++++++++++++++ .../resources/mapper/EstimateTaskMapper.xml | 291 ++++++++++++++++ .../resources/mapper/OrganizationMapper.xml | 181 ++++++++++ .../resources/mapper/ProductdemandMapper.xml | 258 ++++++++++++++ 12 files changed, 1503 insertions(+) create mode 100644 src/main/java/com/cetc32/dh/entity/DemandSubmit.java create mode 100644 src/main/java/com/cetc32/dh/entity/EstimateTask.java create mode 100644 src/main/java/com/cetc32/dh/entity/Organization.java create mode 100644 src/main/java/com/cetc32/dh/entity/Productdemand.java create mode 100644 src/main/java/com/cetc32/dh/mybatis/DemandSubmitMapper.java create mode 100644 src/main/java/com/cetc32/dh/mybatis/EstimateTaskMapper.java create mode 100644 src/main/java/com/cetc32/dh/mybatis/OrganizationMapper.java create mode 100644 src/main/java/com/cetc32/dh/mybatis/ProductdemandMapper.java create mode 100644 src/main/resources/mapper/DemandSubmitMapper.xml create mode 100644 src/main/resources/mapper/EstimateTaskMapper.xml create mode 100644 src/main/resources/mapper/OrganizationMapper.xml create mode 100644 src/main/resources/mapper/ProductdemandMapper.xml diff --git a/src/main/java/com/cetc32/dh/entity/DemandSubmit.java b/src/main/java/com/cetc32/dh/entity/DemandSubmit.java new file mode 100644 index 0000000..a8cf6c5 --- /dev/null +++ b/src/main/java/com/cetc32/dh/entity/DemandSubmit.java @@ -0,0 +1,125 @@ +package com.cetc32.dh.entity; + +import java.util.Date; + +public class DemandSubmit { + private Integer id; + + private String projectName; + + private String demandName; + + private String demandDes; + + private String status; + + private String reporter; + + private Integer departmentid; + + private String approver; + + private Date approceTime; + + private Date endtime; + + private String demandClassify; + + private String demandAttachment; + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public String getProjectName() { + return projectName; + } + + public void setProjectName(String projectName) { + this.projectName = projectName; + } + + public String getDemandName() { + return demandName; + } + + public void setDemandName(String demandName) { + this.demandName = demandName; + } + + public String getDemandDes() { + return demandDes; + } + + public void setDemandDes(String demandDes) { + this.demandDes = demandDes; + } + + public String getStatus() { + return status; + } + + public void setStatus(String status) { + this.status = status; + } + + public String getReporter() { + return reporter; + } + + public void setReporter(String reporter) { + this.reporter = reporter; + } + + public Integer getDepartmentid() { + return departmentid; + } + + public void setDepartmentid(Integer departmentid) { + this.departmentid = departmentid; + } + + public String getApprover() { + return approver; + } + + public void setApprover(String approver) { + this.approver = approver; + } + + public Date getApproceTime() { + return approceTime; + } + + public void setApproceTime(Date approceTime) { + this.approceTime = approceTime; + } + + public Date getEndtime() { + return endtime; + } + + public void setEndtime(Date endtime) { + this.endtime = endtime; + } + + public String getDemandClassify() { + return demandClassify; + } + + public void setDemandClassify(String demandClassify) { + this.demandClassify = demandClassify; + } + + public String getDemandAttachment() { + return demandAttachment; + } + + public void setDemandAttachment(String demandAttachment) { + this.demandAttachment = demandAttachment; + } +} \ No newline at end of file diff --git a/src/main/java/com/cetc32/dh/entity/EstimateTask.java b/src/main/java/com/cetc32/dh/entity/EstimateTask.java new file mode 100644 index 0000000..2a73a53 --- /dev/null +++ b/src/main/java/com/cetc32/dh/entity/EstimateTask.java @@ -0,0 +1,105 @@ +package com.cetc32.dh.entity; + +import java.util.Date; + +public class EstimateTask { + private Integer id; + + private String name; + + private String taskClassify; + + private String taskType; + + private String taskPath; + + private Date starttime; + + private Date endtime; + + private String creator; + + private Date creattime; + + private String status; + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getTaskClassify() { + return taskClassify; + } + + public void setTaskClassify(String taskClassify) { + this.taskClassify = taskClassify; + } + + public String getTaskType() { + return taskType; + } + + public void setTaskType(String taskType) { + this.taskType = taskType; + } + + public String getTaskPath() { + return taskPath; + } + + public void setTaskPath(String taskPath) { + this.taskPath = taskPath; + } + + public Date getStarttime() { + return starttime; + } + + public void setStarttime(Date starttime) { + this.starttime = starttime; + } + + public Date getEndtime() { + return endtime; + } + + public void setEndtime(Date endtime) { + this.endtime = endtime; + } + + public String getCreator() { + return creator; + } + + public void setCreator(String creator) { + this.creator = creator; + } + + public Date getCreattime() { + return creattime; + } + + public void setCreattime(Date creattime) { + this.creattime = creattime; + } + + public String getStatus() { + return status; + } + + public void setStatus(String status) { + this.status = status; + } +} \ No newline at end of file diff --git a/src/main/java/com/cetc32/dh/entity/Organization.java b/src/main/java/com/cetc32/dh/entity/Organization.java new file mode 100644 index 0000000..055de82 --- /dev/null +++ b/src/main/java/com/cetc32/dh/entity/Organization.java @@ -0,0 +1,33 @@ +package com.cetc32.dh.entity; + +public class Organization { + private Integer id; + + private String name; + + private String description; + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } +} \ No newline at end of file diff --git a/src/main/java/com/cetc32/dh/entity/Productdemand.java b/src/main/java/com/cetc32/dh/entity/Productdemand.java new file mode 100644 index 0000000..ca9300b --- /dev/null +++ b/src/main/java/com/cetc32/dh/entity/Productdemand.java @@ -0,0 +1,85 @@ +package com.cetc32.dh.entity; + +import java.util.Date; + +public class Productdemand { + private Integer id; + + private String name; + + private String demandClassify; + + private Date demandyear; + + private String taskdocument; + + private Date starttime; + + private Date endtime; + + private String status; + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getDemandClassify() { + return demandClassify; + } + + public void setDemandClassify(String demandClassify) { + this.demandClassify = demandClassify; + } + + public Date getDemandyear() { + return demandyear; + } + + public void setDemandyear(Date demandyear) { + this.demandyear = demandyear; + } + + public String getTaskdocument() { + return taskdocument; + } + + public void setTaskdocument(String taskdocument) { + this.taskdocument = taskdocument; + } + + public Date getStarttime() { + return starttime; + } + + public void setStarttime(Date starttime) { + this.starttime = starttime; + } + + public Date getEndtime() { + return endtime; + } + + public void setEndtime(Date endtime) { + this.endtime = endtime; + } + + public String getStatus() { + return status; + } + + public void setStatus(String status) { + this.status = status; + } +} \ No newline at end of file diff --git a/src/main/java/com/cetc32/dh/mybatis/DemandSubmitMapper.java b/src/main/java/com/cetc32/dh/mybatis/DemandSubmitMapper.java new file mode 100644 index 0000000..108dc1c --- /dev/null +++ b/src/main/java/com/cetc32/dh/mybatis/DemandSubmitMapper.java @@ -0,0 +1,26 @@ +package com.cetc32.dh.mybatis; + +import com.cetc32.dh.entity.DemandSubmit; + +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +public interface DemandSubmitMapper { + + + int deleteByPrimaryKey(Integer id); + + int insert(DemandSubmit record); + + int insertSelective(DemandSubmit record); + + + + DemandSubmit selectByPrimaryKey(Integer id); + + + int updateByPrimaryKeySelective(DemandSubmit record); + + int updateByPrimaryKey(DemandSubmit record); +} \ No newline at end of file diff --git a/src/main/java/com/cetc32/dh/mybatis/EstimateTaskMapper.java b/src/main/java/com/cetc32/dh/mybatis/EstimateTaskMapper.java new file mode 100644 index 0000000..d79f70d --- /dev/null +++ b/src/main/java/com/cetc32/dh/mybatis/EstimateTaskMapper.java @@ -0,0 +1,25 @@ +package com.cetc32.dh.mybatis; + +import com.cetc32.dh.entity.EstimateTask; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +public interface EstimateTaskMapper { + + + int deleteByPrimaryKey(Integer id); + + int insert(EstimateTask record); + + int insertSelective(EstimateTask record); + + + + EstimateTask selectByPrimaryKey(Integer id); + + + int updateByPrimaryKeySelective(EstimateTask record); + + int updateByPrimaryKey(EstimateTask record); +} \ No newline at end of file diff --git a/src/main/java/com/cetc32/dh/mybatis/OrganizationMapper.java b/src/main/java/com/cetc32/dh/mybatis/OrganizationMapper.java new file mode 100644 index 0000000..e1a8b7e --- /dev/null +++ b/src/main/java/com/cetc32/dh/mybatis/OrganizationMapper.java @@ -0,0 +1,26 @@ +package com.cetc32.dh.mybatis; + +import com.cetc32.dh.entity.Organization; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +public interface OrganizationMapper { + + + int deleteByPrimaryKey(Integer id); + + int insert(Organization record); + + int insertSelective(Organization record); + + + + Organization selectByPrimaryKey(Integer id); + + + + int updateByPrimaryKeySelective(Organization record); + + int updateByPrimaryKey(Organization record); +} \ No newline at end of file diff --git a/src/main/java/com/cetc32/dh/mybatis/ProductdemandMapper.java b/src/main/java/com/cetc32/dh/mybatis/ProductdemandMapper.java new file mode 100644 index 0000000..2f2064f --- /dev/null +++ b/src/main/java/com/cetc32/dh/mybatis/ProductdemandMapper.java @@ -0,0 +1,25 @@ +package com.cetc32.dh.mybatis; + +import com.cetc32.dh.entity.Productdemand; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +public interface ProductdemandMapper { + + + int deleteByPrimaryKey(Integer id); + + int insert(Productdemand record); + + int insertSelective(Productdemand record); + + + + Productdemand selectByPrimaryKey(Integer id); + + + int updateByPrimaryKeySelective(Productdemand record); + + int updateByPrimaryKey(Productdemand record); +} \ No newline at end of file diff --git a/src/main/resources/mapper/DemandSubmitMapper.xml b/src/main/resources/mapper/DemandSubmitMapper.xml new file mode 100644 index 0000000..b979093 --- /dev/null +++ b/src/main/resources/mapper/DemandSubmitMapper.xml @@ -0,0 +1,323 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + id, project_name, demand_name, demand_des, status, reporter, departmentId, approver, + approce_time, endtime, demand_classify, demand_attachment + + + + + delete from demand_submit + where id = #{id,jdbcType=INTEGER} + + + delete from demand_submit + + + + + + insert into demand_submit (id, project_name, demand_name, + demand_des, status, reporter, + departmentId, approver, approce_time, + endtime, demand_classify, demand_attachment + ) + values (#{id,jdbcType=INTEGER}, #{projectName,jdbcType=VARCHAR}, #{demandName,jdbcType=VARCHAR}, + #{demandDes,jdbcType=VARCHAR}, #{status,jdbcType=VARCHAR}, #{reporter,jdbcType=VARCHAR}, + #{departmentid,jdbcType=INTEGER}, #{approver,jdbcType=VARCHAR}, #{approceTime,jdbcType=TIMESTAMP}, + #{endtime,jdbcType=TIMESTAMP}, #{demandClassify,jdbcType=VARCHAR}, #{demandAttachment,jdbcType=VARCHAR} + ) + + + insert into demand_submit + + + id, + + + project_name, + + + demand_name, + + + demand_des, + + + status, + + + reporter, + + + departmentId, + + + approver, + + + approce_time, + + + endtime, + + + demand_classify, + + + demand_attachment, + + + + + #{id,jdbcType=INTEGER}, + + + #{projectName,jdbcType=VARCHAR}, + + + #{demandName,jdbcType=VARCHAR}, + + + #{demandDes,jdbcType=VARCHAR}, + + + #{status,jdbcType=VARCHAR}, + + + #{reporter,jdbcType=VARCHAR}, + + + #{departmentid,jdbcType=INTEGER}, + + + #{approver,jdbcType=VARCHAR}, + + + #{approceTime,jdbcType=TIMESTAMP}, + + + #{endtime,jdbcType=TIMESTAMP}, + + + #{demandClassify,jdbcType=VARCHAR}, + + + #{demandAttachment,jdbcType=VARCHAR}, + + + + + + update demand_submit + + + id = #{record.id,jdbcType=INTEGER}, + + + project_name = #{record.projectName,jdbcType=VARCHAR}, + + + demand_name = #{record.demandName,jdbcType=VARCHAR}, + + + demand_des = #{record.demandDes,jdbcType=VARCHAR}, + + + status = #{record.status,jdbcType=VARCHAR}, + + + reporter = #{record.reporter,jdbcType=VARCHAR}, + + + departmentId = #{record.departmentid,jdbcType=INTEGER}, + + + approver = #{record.approver,jdbcType=VARCHAR}, + + + approce_time = #{record.approceTime,jdbcType=TIMESTAMP}, + + + endtime = #{record.endtime,jdbcType=TIMESTAMP}, + + + demand_classify = #{record.demandClassify,jdbcType=VARCHAR}, + + + demand_attachment = #{record.demandAttachment,jdbcType=VARCHAR}, + + + + + + + + update demand_submit + set id = #{record.id,jdbcType=INTEGER}, + project_name = #{record.projectName,jdbcType=VARCHAR}, + demand_name = #{record.demandName,jdbcType=VARCHAR}, + demand_des = #{record.demandDes,jdbcType=VARCHAR}, + status = #{record.status,jdbcType=VARCHAR}, + reporter = #{record.reporter,jdbcType=VARCHAR}, + departmentId = #{record.departmentid,jdbcType=INTEGER}, + approver = #{record.approver,jdbcType=VARCHAR}, + approce_time = #{record.approceTime,jdbcType=TIMESTAMP}, + endtime = #{record.endtime,jdbcType=TIMESTAMP}, + demand_classify = #{record.demandClassify,jdbcType=VARCHAR}, + demand_attachment = #{record.demandAttachment,jdbcType=VARCHAR} + + + + + + update demand_submit + + + project_name = #{projectName,jdbcType=VARCHAR}, + + + demand_name = #{demandName,jdbcType=VARCHAR}, + + + demand_des = #{demandDes,jdbcType=VARCHAR}, + + + status = #{status,jdbcType=VARCHAR}, + + + reporter = #{reporter,jdbcType=VARCHAR}, + + + departmentId = #{departmentid,jdbcType=INTEGER}, + + + approver = #{approver,jdbcType=VARCHAR}, + + + approce_time = #{approceTime,jdbcType=TIMESTAMP}, + + + endtime = #{endtime,jdbcType=TIMESTAMP}, + + + demand_classify = #{demandClassify,jdbcType=VARCHAR}, + + + demand_attachment = #{demandAttachment,jdbcType=VARCHAR}, + + + where id = #{id,jdbcType=INTEGER} + + + update demand_submit + set project_name = #{projectName,jdbcType=VARCHAR}, + demand_name = #{demandName,jdbcType=VARCHAR}, + demand_des = #{demandDes,jdbcType=VARCHAR}, + status = #{status,jdbcType=VARCHAR}, + reporter = #{reporter,jdbcType=VARCHAR}, + departmentId = #{departmentid,jdbcType=INTEGER}, + approver = #{approver,jdbcType=VARCHAR}, + approce_time = #{approceTime,jdbcType=TIMESTAMP}, + endtime = #{endtime,jdbcType=TIMESTAMP}, + demand_classify = #{demandClassify,jdbcType=VARCHAR}, + demand_attachment = #{demandAttachment,jdbcType=VARCHAR} + where id = #{id,jdbcType=INTEGER} + + \ No newline at end of file diff --git a/src/main/resources/mapper/EstimateTaskMapper.xml b/src/main/resources/mapper/EstimateTaskMapper.xml new file mode 100644 index 0000000..7bf8721 --- /dev/null +++ b/src/main/resources/mapper/EstimateTaskMapper.xml @@ -0,0 +1,291 @@ + + + + + + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + id, name, task_classify, task_type, task_path, starttime, endtime, creator, creattime, + status + + + + + delete from estimate_task + where id = #{id,jdbcType=INTEGER} + + + delete from estimate_task + + + + + + insert into estimate_task (id, name, task_classify, + task_type, task_path, starttime, + endtime, creator, creattime, + status) + values (#{id,jdbcType=INTEGER}, #{name,jdbcType=VARCHAR}, #{taskClassify,jdbcType=VARCHAR}, + #{taskType,jdbcType=VARCHAR}, #{taskPath,jdbcType=VARCHAR}, #{starttime,jdbcType=TIMESTAMP}, + #{endtime,jdbcType=TIMESTAMP}, #{creator,jdbcType=VARCHAR}, #{creattime,jdbcType=TIMESTAMP}, + #{status,jdbcType=VARCHAR}) + + + insert into estimate_task + + + id, + + + name, + + + task_classify, + + + task_type, + + + task_path, + + + starttime, + + + endtime, + + + creator, + + + creattime, + + + status, + + + + + #{id,jdbcType=INTEGER}, + + + #{name,jdbcType=VARCHAR}, + + + #{taskClassify,jdbcType=VARCHAR}, + + + #{taskType,jdbcType=VARCHAR}, + + + #{taskPath,jdbcType=VARCHAR}, + + + #{starttime,jdbcType=TIMESTAMP}, + + + #{endtime,jdbcType=TIMESTAMP}, + + + #{creator,jdbcType=VARCHAR}, + + + #{creattime,jdbcType=TIMESTAMP}, + + + #{status,jdbcType=VARCHAR}, + + + + + + update estimate_task + + + id = #{record.id,jdbcType=INTEGER}, + + + name = #{record.name,jdbcType=VARCHAR}, + + + task_classify = #{record.taskClassify,jdbcType=VARCHAR}, + + + task_type = #{record.taskType,jdbcType=VARCHAR}, + + + task_path = #{record.taskPath,jdbcType=VARCHAR}, + + + starttime = #{record.starttime,jdbcType=TIMESTAMP}, + + + endtime = #{record.endtime,jdbcType=TIMESTAMP}, + + + creator = #{record.creator,jdbcType=VARCHAR}, + + + creattime = #{record.creattime,jdbcType=TIMESTAMP}, + + + status = #{record.status,jdbcType=VARCHAR}, + + + + + + + + update estimate_task + set id = #{record.id,jdbcType=INTEGER}, + name = #{record.name,jdbcType=VARCHAR}, + task_classify = #{record.taskClassify,jdbcType=VARCHAR}, + task_type = #{record.taskType,jdbcType=VARCHAR}, + task_path = #{record.taskPath,jdbcType=VARCHAR}, + starttime = #{record.starttime,jdbcType=TIMESTAMP}, + endtime = #{record.endtime,jdbcType=TIMESTAMP}, + creator = #{record.creator,jdbcType=VARCHAR}, + creattime = #{record.creattime,jdbcType=TIMESTAMP}, + status = #{record.status,jdbcType=VARCHAR} + + + + + + update estimate_task + + + name = #{name,jdbcType=VARCHAR}, + + + task_classify = #{taskClassify,jdbcType=VARCHAR}, + + + task_type = #{taskType,jdbcType=VARCHAR}, + + + task_path = #{taskPath,jdbcType=VARCHAR}, + + + starttime = #{starttime,jdbcType=TIMESTAMP}, + + + endtime = #{endtime,jdbcType=TIMESTAMP}, + + + creator = #{creator,jdbcType=VARCHAR}, + + + creattime = #{creattime,jdbcType=TIMESTAMP}, + + + status = #{status,jdbcType=VARCHAR}, + + + where id = #{id,jdbcType=INTEGER} + + + update estimate_task + set name = #{name,jdbcType=VARCHAR}, + task_classify = #{taskClassify,jdbcType=VARCHAR}, + task_type = #{taskType,jdbcType=VARCHAR}, + task_path = #{taskPath,jdbcType=VARCHAR}, + starttime = #{starttime,jdbcType=TIMESTAMP}, + endtime = #{endtime,jdbcType=TIMESTAMP}, + creator = #{creator,jdbcType=VARCHAR}, + creattime = #{creattime,jdbcType=TIMESTAMP}, + status = #{status,jdbcType=VARCHAR} + where id = #{id,jdbcType=INTEGER} + + \ No newline at end of file diff --git a/src/main/resources/mapper/OrganizationMapper.xml b/src/main/resources/mapper/OrganizationMapper.xml new file mode 100644 index 0000000..bf7eb8a --- /dev/null +++ b/src/main/resources/mapper/OrganizationMapper.xml @@ -0,0 +1,181 @@ + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + id, name, description + + + + + delete from organization + where id = #{id,jdbcType=INTEGER} + + + delete from organization + + + + + + insert into organization (id, name, description + ) + values (#{id,jdbcType=INTEGER}, #{name,jdbcType=VARCHAR}, #{description,jdbcType=VARCHAR} + ) + + + insert into organization + + + id, + + + name, + + + description, + + + + + #{id,jdbcType=INTEGER}, + + + #{name,jdbcType=VARCHAR}, + + + #{description,jdbcType=VARCHAR}, + + + + + + update organization + + + id = #{record.id,jdbcType=INTEGER}, + + + name = #{record.name,jdbcType=VARCHAR}, + + + description = #{record.description,jdbcType=VARCHAR}, + + + + + + + + update organization + set id = #{record.id,jdbcType=INTEGER}, + name = #{record.name,jdbcType=VARCHAR}, + description = #{record.description,jdbcType=VARCHAR} + + + + + + update organization + + + name = #{name,jdbcType=VARCHAR}, + + + description = #{description,jdbcType=VARCHAR}, + + + where id = #{id,jdbcType=INTEGER} + + + update organization + set name = #{name,jdbcType=VARCHAR}, + description = #{description,jdbcType=VARCHAR} + where id = #{id,jdbcType=INTEGER} + + \ No newline at end of file diff --git a/src/main/resources/mapper/ProductdemandMapper.xml b/src/main/resources/mapper/ProductdemandMapper.xml new file mode 100644 index 0000000..b8d37f3 --- /dev/null +++ b/src/main/resources/mapper/ProductdemandMapper.xml @@ -0,0 +1,258 @@ + + + + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + id, name, demand_classify, demandyear, taskdocument, starttime, endtime, status + + + + + delete from productdemand + where id = #{id,jdbcType=INTEGER} + + + delete from productdemand + + + + + + insert into productdemand (id, name, demand_classify, + demandyear, taskdocument, starttime, + endtime, status) + values (#{id,jdbcType=INTEGER}, #{name,jdbcType=VARCHAR}, #{demandClassify,jdbcType=VARCHAR}, + #{demandyear,jdbcType=TIMESTAMP}, #{taskdocument,jdbcType=VARCHAR}, #{starttime,jdbcType=TIMESTAMP}, + #{endtime,jdbcType=TIMESTAMP}, #{status,jdbcType=VARCHAR}) + + + insert into productdemand + + + id, + + + name, + + + demand_classify, + + + demandyear, + + + taskdocument, + + + starttime, + + + endtime, + + + status, + + + + + #{id,jdbcType=INTEGER}, + + + #{name,jdbcType=VARCHAR}, + + + #{demandClassify,jdbcType=VARCHAR}, + + + #{demandyear,jdbcType=TIMESTAMP}, + + + #{taskdocument,jdbcType=VARCHAR}, + + + #{starttime,jdbcType=TIMESTAMP}, + + + #{endtime,jdbcType=TIMESTAMP}, + + + #{status,jdbcType=VARCHAR}, + + + + + + update productdemand + + + id = #{record.id,jdbcType=INTEGER}, + + + name = #{record.name,jdbcType=VARCHAR}, + + + demand_classify = #{record.demandClassify,jdbcType=VARCHAR}, + + + demandyear = #{record.demandyear,jdbcType=TIMESTAMP}, + + + taskdocument = #{record.taskdocument,jdbcType=VARCHAR}, + + + starttime = #{record.starttime,jdbcType=TIMESTAMP}, + + + endtime = #{record.endtime,jdbcType=TIMESTAMP}, + + + status = #{record.status,jdbcType=VARCHAR}, + + + + + + + + update productdemand + set id = #{record.id,jdbcType=INTEGER}, + name = #{record.name,jdbcType=VARCHAR}, + demand_classify = #{record.demandClassify,jdbcType=VARCHAR}, + demandyear = #{record.demandyear,jdbcType=TIMESTAMP}, + taskdocument = #{record.taskdocument,jdbcType=VARCHAR}, + starttime = #{record.starttime,jdbcType=TIMESTAMP}, + endtime = #{record.endtime,jdbcType=TIMESTAMP}, + status = #{record.status,jdbcType=VARCHAR} + + + + + + update productdemand + + + name = #{name,jdbcType=VARCHAR}, + + + demand_classify = #{demandClassify,jdbcType=VARCHAR}, + + + demandyear = #{demandyear,jdbcType=TIMESTAMP}, + + + taskdocument = #{taskdocument,jdbcType=VARCHAR}, + + + starttime = #{starttime,jdbcType=TIMESTAMP}, + + + endtime = #{endtime,jdbcType=TIMESTAMP}, + + + status = #{status,jdbcType=VARCHAR}, + + + where id = #{id,jdbcType=INTEGER} + + + update productdemand + set name = #{name,jdbcType=VARCHAR}, + demand_classify = #{demandClassify,jdbcType=VARCHAR}, + demandyear = #{demandyear,jdbcType=TIMESTAMP}, + taskdocument = #{taskdocument,jdbcType=VARCHAR}, + starttime = #{starttime,jdbcType=TIMESTAMP}, + endtime = #{endtime,jdbcType=TIMESTAMP}, + status = #{status,jdbcType=VARCHAR} + where id = #{id,jdbcType=INTEGER} + + \ No newline at end of file -- Gitee From e7b20e0d0fb82b0222090675aeae997304c39eab Mon Sep 17 00:00:00 2001 From: root Date: Thu, 19 Nov 2020 16:24:23 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E4=B8=9A=E5=8A=A1?= =?UTF-8?q?=E9=83=A8=E5=88=86=E4=BB=A3=E7=A0=81=E5=86=85=E5=AE=B9=EF=BC=8C?= =?UTF-8?q?=E5=A4=A7=E8=87=B4=E6=A1=86=E6=9E=B6=E5=B7=B2=E5=9F=BA=E6=9C=AC?= =?UTF-8?q?=E5=AE=8C=E6=88=90=EF=BC=88=E5=8F=AA=E6=B5=8B=E8=AF=95=E4=BA=86?= =?UTF-8?q?=E9=83=A8=E5=88=86=EF=BC=89=EF=BC=8C=E8=BF=98=E6=9C=89=E9=83=A8?= =?UTF-8?q?=E9=97=A8=E7=89=B9=E5=AE=9A=E7=9A=84=E5=8A=9F=E8=83=BD=E6=9A=82?= =?UTF-8?q?=E6=97=B6=E6=9C=AA=E6=B7=BB=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pom.xml | 11 +- .../common/shiro/CenterAuthShiroConfig.java | 133 +++++++++++-- .../cetc32/dh/common/shiro/CustomRealm.java | 3 +- .../controller/rest/FileSubmitController.java | 3 +- .../com/cetc32/dh/entity/DemandSubmit.java | 2 +- .../com/cetc32/dh/entity/EstimateTask.java | 2 +- .../com/cetc32/dh/entity/Organization.java | 2 +- .../com/cetc32/dh/entity/Productdemand.java | 2 +- .../cetc32/dh/mybatis/DemandSubmitMapper.java | 10 +- .../cetc32/dh/mybatis/EstimateTaskMapper.java | 10 +- .../cetc32/dh/mybatis/OrganizationMapper.java | 8 +- .../dh/mybatis/ProductdemandMapper.java | 10 +- src/main/resources/application-dev.yml | 25 ++- src/main/resources/application-xwy.yml | 2 +- src/main/resources/generator.xml | 8 +- src/main/resources/jdbc.properties | 2 +- .../resources/mapper/DemandSubmitMapper.xml | 174 +++--------------- .../resources/mapper/EstimateTaskMapper.xml | 163 +++------------- .../resources/mapper/OrganizationMapper.xml | 139 +++----------- .../resources/mapper/ProductdemandMapper.xml | 152 ++------------- 20 files changed, 290 insertions(+), 571 deletions(-) diff --git a/pom.xml b/pom.xml index 23ddb6d..9646d42 100644 --- a/pom.xml +++ b/pom.xml @@ -40,7 +40,7 @@ mysql mysql-connector-java - runtime + 5.1.34 org.springframework.boot @@ -189,6 +189,11 @@ swagger-bootstrap-ui 1.8.7 + + ognl + ognl + 3.1.12 + @@ -225,7 +230,7 @@ org.mybatis.generator mybatis-generator-maven-plugin - 1.3.7 + 1.3.2 src/main/resources/generator.xml @@ -241,7 +246,7 @@ org.mybatis.generator mybatis-generator-core - 1.3.7 + 1.3.2 diff --git a/src/main/java/com/cetc32/dh/common/shiro/CenterAuthShiroConfig.java b/src/main/java/com/cetc32/dh/common/shiro/CenterAuthShiroConfig.java index 89f5237..f12e294 100644 --- a/src/main/java/com/cetc32/dh/common/shiro/CenterAuthShiroConfig.java +++ b/src/main/java/com/cetc32/dh/common/shiro/CenterAuthShiroConfig.java @@ -18,10 +18,19 @@ import org.apache.shiro.spring.LifecycleBeanPostProcessor; import org.apache.shiro.spring.security.interceptor.AuthorizationAttributeSourceAdvisor; import org.apache.shiro.spring.web.ShiroFilterFactoryBean; import org.apache.shiro.web.mgt.DefaultWebSecurityManager; +import org.jasig.cas.client.session.SingleSignOutFilter; +import org.jasig.cas.client.session.SingleSignOutHttpSessionListener; import org.springframework.aop.framework.autoproxy.DefaultAdvisorAutoProxyCreator; import org.springframework.beans.factory.annotation.Qualifier; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.boot.web.servlet.FilterRegistrationBean; +import org.springframework.boot.web.servlet.ServletListenerRegistrationBean; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; +import org.springframework.context.annotation.DependsOn; +import org.springframework.core.Ordered; +import org.springframework.core.annotation.Order; +import org.springframework.web.filter.DelegatingFilterProxy; import javax.servlet.Filter; import java.util.HashMap; @@ -37,6 +46,40 @@ import java.util.Map; @Configuration public class CenterAuthShiroConfig { +// //cas server地址 +// public static final String casServerUrlPrefix="http://www.cetc.daohang.com:9100/cas"; +// +// //cas登录页面地址 +// public static final String casLoginUrl = casServerUrlPrefix + "/login"; +// +// //cas登出页面地址 +// public static final String casLogoutUrl = casServerUrlPrefix + "/logout"; +// +// //当前工程对外提供的服务地址 +// public static final String shiroServerUrlPrefix = "http://localhost:9100"; +// +// //casFilter UrlPattern +// public static final String casFilterUrlPattern = "/cas"; +// +// //登录地址 +// public static final String loginUrl = casLoginUrl + "?service=" + shiroServerUrlPrefix + casFilterUrlPattern; +// +// // 登出地址(casserver启用service跳转功能,需在webapps\cas\WEB-INF\cas.properties文件中启用cas.logout.followServiceRedirects=true) +// public static final String logoutUrl = casLogoutUrl + "?service=" + shiroServerUrlPrefix; +// +// //登录成功地址 +// public static final String loginSuccessUrl = "/user"; +// +// //限认证失败跳转地址 +// public static final String unauthorizedUrl = "/403.html"; +// +// @Value("${jedis.pool.host}") +// private String host; +// +// @Value("${jedis.pool.port}") +// private int port; + + /** * 指定缓存失效时间 * @param key 键 @@ -59,6 +102,69 @@ public class CenterAuthShiroConfig { return securityManager; } +// /** +// * 注册单点登出listener +// * +// * @return +// */ +// @Bean +// @Order(Ordered.HIGHEST_PRECEDENCE) +// public ServletListenerRegistrationBean singleSignOutHttpSessionListener() { +// ServletListenerRegistrationBean bean = new ServletListenerRegistrationBean(); +// bean.setListener(new SingleSignOutHttpSessionListener()); +// bean.setEnabled(true); +// return bean; +// } +// +// /** +// * 注册单点登出filter +// * +// * @return +// */ +// @Bean +// public FilterRegistrationBean singleSignOutFilter() { +// FilterRegistrationBean bean = new FilterRegistrationBean(); +// bean.setName("singleSignOutFilter"); +// bean.setFilter(new SingleSignOutFilter()); +// bean.addUrlPatterns("/*"); +// bean.setEnabled(true); +// return bean; +// } +// +// /** +// * 注册DelegatingFilterProxy(Shiro) +// * +// * @return +// */ +// @Bean +// public FilterRegistrationBean delegatingFilterProxy() { +// FilterRegistrationBean filterRegistration = new FilterRegistrationBean(); +// filterRegistration.setFilter(new DelegatingFilterProxy("shiroFilter")); +// // 该值缺省为false,表示生命周期由SpringApplicationContext管理,设置为true则表示由ServletContainer管理 +// filterRegistration.addInitParameter("targetFilterLifecycle", "true"); +// filterRegistration.setEnabled(true); +// filterRegistration.addUrlPatterns("/*"); +// return filterRegistration; +// } + +// /** +// * CAS过滤器 +// * +// * @return +// */ +// @Bean(name = "casFilter") +// public CasFilter getCasFilter() { +// CasFilter casFilter = new CasFilter(); +// casFilter.setName("casFilter"); +// casFilter.setEnabled(true); +// // 登录失败后跳转的URL,也就是 Shiro 执行 CasRealm 的 doGetAuthenticationInfo 方法向CasServer验证tiket +// casFilter.setFailureUrl(loginUrl);// 我们选择认证失败后再打开登录页面 +// casFilter.setSuccessUrl(loginSuccessUrl); +// return casFilter; +// } + + + /** * 先走 filter ,然后 filter 如果检测到请求头存在 token,则用 token 去 login,走 Realm 去验证 */ @@ -92,6 +198,21 @@ public class CenterAuthShiroConfig { return factoryBean; } + + /** + * 指定缓存失效时间 + * @param key 键 + * @param time 时间(秒) + * @return + * 修改信息: + */ + @Bean + public LifecycleBeanPostProcessor lifecycleBeanPostProcessor() { + return new LifecycleBeanPostProcessor(); + } + + + /** * 添加注解支持,如果不加的话很有可能注解失效 */ @@ -103,6 +224,7 @@ public class CenterAuthShiroConfig { * 修改信息: */ @Bean + // @DependsOn({"lifecycleBeanPostProcessor"}) public DefaultAdvisorAutoProxyCreator defaultAdvisorAutoProxyCreator(){ DefaultAdvisorAutoProxyCreator defaultAdvisorAutoProxyCreator=new DefaultAdvisorAutoProxyCreator(); @@ -125,17 +247,6 @@ public class CenterAuthShiroConfig { return advisor; } - /** - * 指定缓存失效时间 - * @param key 键 - * @param time 时间(秒) - * @return - * 修改信息: - */ - @Bean - public LifecycleBeanPostProcessor lifecycleBeanPostProcessor() { - return new LifecycleBeanPostProcessor(); - } } \ No newline at end of file diff --git a/src/main/java/com/cetc32/dh/common/shiro/CustomRealm.java b/src/main/java/com/cetc32/dh/common/shiro/CustomRealm.java index e181a62..808e6b3 100644 --- a/src/main/java/com/cetc32/dh/common/shiro/CustomRealm.java +++ b/src/main/java/com/cetc32/dh/common/shiro/CustomRealm.java @@ -23,6 +23,7 @@ import org.apache.commons.lang3.builder.ToStringStyle; import org.apache.shiro.authc.*; import org.apache.shiro.authz.AuthorizationInfo; import org.apache.shiro.authz.SimpleAuthorizationInfo; +import org.apache.shiro.cas.CasRealm; import org.apache.shiro.realm.AuthorizingRealm; import org.apache.shiro.subject.PrincipalCollection; import org.apache.shiro.util.ByteSource; @@ -38,7 +39,7 @@ import java.util.*; * @version: 1.0 * @date: 2020/9/11 10:55 */ -public class CustomRealm extends AuthorizingRealm { +public class CustomRealm extends CasRealm { private Logger log = LoggerFactory.getLogger(this.getClass()); diff --git a/src/main/java/com/cetc32/dh/controller/rest/FileSubmitController.java b/src/main/java/com/cetc32/dh/controller/rest/FileSubmitController.java index 4331a34..aa18b45 100644 --- a/src/main/java/com/cetc32/dh/controller/rest/FileSubmitController.java +++ b/src/main/java/com/cetc32/dh/controller/rest/FileSubmitController.java @@ -23,11 +23,10 @@ import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RestController; import org.springframework.web.multipart.MultipartFile; - -@Component import java.util.ArrayList; import java.util.List; +@Component @RestController @RequestMapping("/rest/import/") public class FileSubmitController { diff --git a/src/main/java/com/cetc32/dh/entity/DemandSubmit.java b/src/main/java/com/cetc32/dh/entity/DemandSubmit.java index a8cf6c5..8d7cf54 100644 --- a/src/main/java/com/cetc32/dh/entity/DemandSubmit.java +++ b/src/main/java/com/cetc32/dh/entity/DemandSubmit.java @@ -2,7 +2,7 @@ package com.cetc32.dh.entity; import java.util.Date; -public class DemandSubmit { +public class DemandSubmit extends NumberS{ private Integer id; private String projectName; diff --git a/src/main/java/com/cetc32/dh/entity/EstimateTask.java b/src/main/java/com/cetc32/dh/entity/EstimateTask.java index 2a73a53..6599eed 100644 --- a/src/main/java/com/cetc32/dh/entity/EstimateTask.java +++ b/src/main/java/com/cetc32/dh/entity/EstimateTask.java @@ -2,7 +2,7 @@ package com.cetc32.dh.entity; import java.util.Date; -public class EstimateTask { +public class EstimateTask extends NumberS{ private Integer id; private String name; diff --git a/src/main/java/com/cetc32/dh/entity/Organization.java b/src/main/java/com/cetc32/dh/entity/Organization.java index 055de82..0edf636 100644 --- a/src/main/java/com/cetc32/dh/entity/Organization.java +++ b/src/main/java/com/cetc32/dh/entity/Organization.java @@ -1,6 +1,6 @@ package com.cetc32.dh.entity; -public class Organization { +public class Organization extends NumberS{ private Integer id; private String name; diff --git a/src/main/java/com/cetc32/dh/entity/Productdemand.java b/src/main/java/com/cetc32/dh/entity/Productdemand.java index ca9300b..847af14 100644 --- a/src/main/java/com/cetc32/dh/entity/Productdemand.java +++ b/src/main/java/com/cetc32/dh/entity/Productdemand.java @@ -2,7 +2,7 @@ package com.cetc32.dh.entity; import java.util.Date; -public class Productdemand { +public class Productdemand extends NumberS{ private Integer id; private String name; diff --git a/src/main/java/com/cetc32/dh/mybatis/DemandSubmitMapper.java b/src/main/java/com/cetc32/dh/mybatis/DemandSubmitMapper.java index 108dc1c..8bee280 100644 --- a/src/main/java/com/cetc32/dh/mybatis/DemandSubmitMapper.java +++ b/src/main/java/com/cetc32/dh/mybatis/DemandSubmitMapper.java @@ -3,11 +3,14 @@ package com.cetc32.dh.mybatis; import com.cetc32.dh.entity.DemandSubmit; import org.apache.ibatis.annotations.Param; +import org.springframework.stereotype.Repository; import java.util.List; +@Repository public interface DemandSubmitMapper { + List findAll(); int deleteByPrimaryKey(Integer id); @@ -15,12 +18,15 @@ public interface DemandSubmitMapper { int insertSelective(DemandSubmit record); - - DemandSubmit selectByPrimaryKey(Integer id); + List selectByLimit(@Param("offset") Integer offset,@Param("limit") Integer limit); + + int countDemand(); int updateByPrimaryKeySelective(DemandSubmit record); int updateByPrimaryKey(DemandSubmit record); + + List findByKeyWord(String keyword); } \ No newline at end of file diff --git a/src/main/java/com/cetc32/dh/mybatis/EstimateTaskMapper.java b/src/main/java/com/cetc32/dh/mybatis/EstimateTaskMapper.java index d79f70d..28befea 100644 --- a/src/main/java/com/cetc32/dh/mybatis/EstimateTaskMapper.java +++ b/src/main/java/com/cetc32/dh/mybatis/EstimateTaskMapper.java @@ -2,12 +2,14 @@ package com.cetc32.dh.mybatis; import com.cetc32.dh.entity.EstimateTask; import org.apache.ibatis.annotations.Param; +import org.springframework.stereotype.Repository; import java.util.List; +@Repository public interface EstimateTaskMapper { - + List findAll(); int deleteByPrimaryKey(Integer id); int insert(EstimateTask record); @@ -18,8 +20,14 @@ public interface EstimateTaskMapper { EstimateTask selectByPrimaryKey(Integer id); + List selectByLimit(@Param("offset") Integer offset,@Param("limit") Integer limit); + + int countEstimate(); + int updateByPrimaryKeySelective(EstimateTask record); int updateByPrimaryKey(EstimateTask record); + + List findByKeyWord(String keyword); } \ No newline at end of file diff --git a/src/main/java/com/cetc32/dh/mybatis/OrganizationMapper.java b/src/main/java/com/cetc32/dh/mybatis/OrganizationMapper.java index e1a8b7e..21e249a 100644 --- a/src/main/java/com/cetc32/dh/mybatis/OrganizationMapper.java +++ b/src/main/java/com/cetc32/dh/mybatis/OrganizationMapper.java @@ -2,11 +2,14 @@ package com.cetc32.dh.mybatis; import com.cetc32.dh.entity.Organization; import org.apache.ibatis.annotations.Param; +import org.springframework.stereotype.Repository; import java.util.List; +@Repository public interface OrganizationMapper { + List findall(); int deleteByPrimaryKey(Integer id); @@ -14,13 +17,14 @@ public interface OrganizationMapper { int insertSelective(Organization record); - + List selectByLimit(@Param("offset") Integer offset,@Param("limit") Integer limit); Organization selectByPrimaryKey(Integer id); - + int countOrganization(); int updateByPrimaryKeySelective(Organization record); int updateByPrimaryKey(Organization record); + List findByKeyWord(String keyword); } \ No newline at end of file diff --git a/src/main/java/com/cetc32/dh/mybatis/ProductdemandMapper.java b/src/main/java/com/cetc32/dh/mybatis/ProductdemandMapper.java index 2f2064f..1dd26f3 100644 --- a/src/main/java/com/cetc32/dh/mybatis/ProductdemandMapper.java +++ b/src/main/java/com/cetc32/dh/mybatis/ProductdemandMapper.java @@ -2,11 +2,14 @@ package com.cetc32.dh.mybatis; import com.cetc32.dh.entity.Productdemand; import org.apache.ibatis.annotations.Param; +import org.springframework.stereotype.Repository; import java.util.List; +@Repository public interface ProductdemandMapper { + List findAll(); int deleteByPrimaryKey(Integer id); @@ -14,12 +17,15 @@ public interface ProductdemandMapper { int insertSelective(Productdemand record); - - Productdemand selectByPrimaryKey(Integer id); + List selectByLimit(@Param("offset") Integer offset,@Param("limit") Integer limit); + + int countProduct(); int updateByPrimaryKeySelective(Productdemand record); int updateByPrimaryKey(Productdemand record); + + List findByKeyWord(String keyword); } \ No newline at end of file diff --git a/src/main/resources/application-dev.yml b/src/main/resources/application-dev.yml index e8029e8..f483fe4 100644 --- a/src/main/resources/application-dev.yml +++ b/src/main/resources/application-dev.yml @@ -1,11 +1,29 @@ server: port: 8081 + +## redis setting +# jedis.pool.host=localhost +# jedis.pool.port=6379 +# jedis.pool.timeout=3000000 +# jedis.pool.config.maxTotal=100 +# jedis.pool.config.maxIdle=10 +# jedis.pool.config.maxWaitMillis=10000 +# +# +# #thymeleaf +# spring.thymeleaf.prefix=classpath:/templates/ +# spring.thymeleaf.suffix=.html +# spring.thymeleaf.mode=LEGACYHTML5 +# spring.thymeleaf.encoding=UTF-8 +# spring.thymeleaf.cache=false + + spring: application: name: dhManager datasource: - url: jdbc:mysql://192.168.1.211:3306/dhmanage?serverTimezone=GMT%2B8&useUnicode=true&characterEncoding=utf-8 + url: jdbc:mysql://localhost:3306/dhmanage?serverTimezone=GMT%2B8&useUnicode=true&characterEncoding=utf-8 username: root password: 123456 # initial-size: 1 @@ -36,4 +54,7 @@ generator: javaClient-targetPackage: com.cetc32.dh.mybatis logging: level: - com.cetc32.dh.mybatis: debug \ No newline at end of file + com.cetc32.dh.mybatis: debug + +storePath: /root/ +upLoadPath: ${storePath}upLoad \ No newline at end of file diff --git a/src/main/resources/application-xwy.yml b/src/main/resources/application-xwy.yml index f3a65e9..52c1821 100644 --- a/src/main/resources/application-xwy.yml +++ b/src/main/resources/application-xwy.yml @@ -5,7 +5,7 @@ spring: application: name: dhManager datasource: - url: jdbc:mysql://192.168.1.211:3306/dhmanage?serverTimezone=GMT%2B8&useUnicode=true&characterEncoding=utf-8 + url: jdbc:mysql://127.0.0.1:3306/dhmanage?serverTimezone=GMT%2B8&useUnicode=true&characterEncoding=utf-8 username: root password: 123456 # initial-size: 1 diff --git a/src/main/resources/generator.xml b/src/main/resources/generator.xml index 11876e3..6dd12cd 100644 --- a/src/main/resources/generator.xml +++ b/src/main/resources/generator.xml @@ -28,7 +28,7 @@ - @@ -54,7 +54,11 @@ type="XMLMAPPER"/> -
+ +
\ No newline at end of file diff --git a/src/main/resources/jdbc.properties b/src/main/resources/jdbc.properties index 63cfbc1..59539a0 100644 --- a/src/main/resources/jdbc.properties +++ b/src/main/resources/jdbc.properties @@ -1,4 +1,4 @@ -spring.datasource.url=jdbc:mysql://192.168.1.211:3306/dhmanage?useUnicode=true&characterEncoding=utf8&serverTimezone=GMT%2B8&useSSL=false +spring.datasource.url=jdbc:mysql://127.0.0.1:3306/dhmanage?useUnicode=true&characterEncoding=utf8&serverTimezone=GMT%2B8&useSSL=false #spring.datasource.driverClassName=com.mysql.jdbc.Driver spring.datasource.driverClassName=com.mysql.cj.jdbc.Driver spring.datasource.username=root diff --git a/src/main/resources/mapper/DemandSubmitMapper.xml b/src/main/resources/mapper/DemandSubmitMapper.xml index b979093..8f13f76 100644 --- a/src/main/resources/mapper/DemandSubmitMapper.xml +++ b/src/main/resources/mapper/DemandSubmitMapper.xml @@ -15,99 +15,41 @@ - - - - - - - - - and ${criterion.condition} - - - and ${criterion.condition} #{criterion.value} - - - and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} - - - and ${criterion.condition} - - #{listItem} - - - - - - - - - - - - - - - - - - and ${criterion.condition} - - - and ${criterion.condition} #{criterion.value} - - - and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} - - - and ${criterion.condition} - - #{listItem} - - - - - - - - - + + id, project_name, demand_name, demand_des, status, reporter, departmentId, approver, approce_time, endtime, demand_classify, demand_attachment - + + + + + delete from demand_submit where id = #{id,jdbcType=INTEGER} - - delete from demand_submit - - - - - + insert into demand_submit (id, project_name, demand_name, demand_des, status, reporter, departmentId, approver, approce_time, @@ -119,7 +61,7 @@ #{endtime,jdbcType=TIMESTAMP}, #{demandClassify,jdbcType=VARCHAR}, #{demandAttachment,jdbcType=VARCHAR} ) - + insert into demand_submit @@ -198,75 +140,7 @@ - - - update demand_submit - - - id = #{record.id,jdbcType=INTEGER}, - - - project_name = #{record.projectName,jdbcType=VARCHAR}, - - - demand_name = #{record.demandName,jdbcType=VARCHAR}, - - - demand_des = #{record.demandDes,jdbcType=VARCHAR}, - - - status = #{record.status,jdbcType=VARCHAR}, - - - reporter = #{record.reporter,jdbcType=VARCHAR}, - - - departmentId = #{record.departmentid,jdbcType=INTEGER}, - - - approver = #{record.approver,jdbcType=VARCHAR}, - - - approce_time = #{record.approceTime,jdbcType=TIMESTAMP}, - - - endtime = #{record.endtime,jdbcType=TIMESTAMP}, - - - demand_classify = #{record.demandClassify,jdbcType=VARCHAR}, - - - demand_attachment = #{record.demandAttachment,jdbcType=VARCHAR}, - - - - - - - - update demand_submit - set id = #{record.id,jdbcType=INTEGER}, - project_name = #{record.projectName,jdbcType=VARCHAR}, - demand_name = #{record.demandName,jdbcType=VARCHAR}, - demand_des = #{record.demandDes,jdbcType=VARCHAR}, - status = #{record.status,jdbcType=VARCHAR}, - reporter = #{record.reporter,jdbcType=VARCHAR}, - departmentId = #{record.departmentid,jdbcType=INTEGER}, - approver = #{record.approver,jdbcType=VARCHAR}, - approce_time = #{record.approceTime,jdbcType=TIMESTAMP}, - endtime = #{record.endtime,jdbcType=TIMESTAMP}, - demand_classify = #{record.demandClassify,jdbcType=VARCHAR}, - demand_attachment = #{record.demandAttachment,jdbcType=VARCHAR} - - - - - + update demand_submit @@ -305,7 +179,7 @@ where id = #{id,jdbcType=INTEGER} - + update demand_submit set project_name = #{projectName,jdbcType=VARCHAR}, demand_name = #{demandName,jdbcType=VARCHAR}, diff --git a/src/main/resources/mapper/EstimateTaskMapper.xml b/src/main/resources/mapper/EstimateTaskMapper.xml index 7bf8721..f864a8b 100644 --- a/src/main/resources/mapper/EstimateTaskMapper.xml +++ b/src/main/resources/mapper/EstimateTaskMapper.xml @@ -13,81 +13,13 @@ - - - - - - - - - and ${criterion.condition} - - - and ${criterion.condition} #{criterion.value} - - - and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} - - - and ${criterion.condition} - - #{listItem} - - - - - - - - - - - - - - - - - - and ${criterion.condition} - - - and ${criterion.condition} #{criterion.value} - - - and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} - - - and ${criterion.condition} - - #{listItem} - - - - - - - - - id, name, task_classify, task_type, task_path, starttime, endtime, creator, creattime, status - + select * from estimate_task + + + + delete from estimate_task where id = #{id,jdbcType=INTEGER} - - delete from estimate_task - - - - - + insert into estimate_task (id, name, task_classify, task_type, task_path, starttime, endtime, creator, creattime, @@ -115,7 +56,7 @@ #{endtime,jdbcType=TIMESTAMP}, #{creator,jdbcType=VARCHAR}, #{creattime,jdbcType=TIMESTAMP}, #{status,jdbcType=VARCHAR}) - + insert into estimate_task @@ -182,67 +123,7 @@ - - - update estimate_task - - - id = #{record.id,jdbcType=INTEGER}, - - - name = #{record.name,jdbcType=VARCHAR}, - - - task_classify = #{record.taskClassify,jdbcType=VARCHAR}, - - - task_type = #{record.taskType,jdbcType=VARCHAR}, - - - task_path = #{record.taskPath,jdbcType=VARCHAR}, - - - starttime = #{record.starttime,jdbcType=TIMESTAMP}, - - - endtime = #{record.endtime,jdbcType=TIMESTAMP}, - - - creator = #{record.creator,jdbcType=VARCHAR}, - - - creattime = #{record.creattime,jdbcType=TIMESTAMP}, - - - status = #{record.status,jdbcType=VARCHAR}, - - - - - - - - update estimate_task - set id = #{record.id,jdbcType=INTEGER}, - name = #{record.name,jdbcType=VARCHAR}, - task_classify = #{record.taskClassify,jdbcType=VARCHAR}, - task_type = #{record.taskType,jdbcType=VARCHAR}, - task_path = #{record.taskPath,jdbcType=VARCHAR}, - starttime = #{record.starttime,jdbcType=TIMESTAMP}, - endtime = #{record.endtime,jdbcType=TIMESTAMP}, - creator = #{record.creator,jdbcType=VARCHAR}, - creattime = #{record.creattime,jdbcType=TIMESTAMP}, - status = #{record.status,jdbcType=VARCHAR} - - - - - + update estimate_task @@ -275,7 +156,7 @@ where id = #{id,jdbcType=INTEGER} - + update estimate_task set name = #{name,jdbcType=VARCHAR}, task_classify = #{taskClassify,jdbcType=VARCHAR}, diff --git a/src/main/resources/mapper/OrganizationMapper.xml b/src/main/resources/mapper/OrganizationMapper.xml index bf7eb8a..f7be181 100644 --- a/src/main/resources/mapper/OrganizationMapper.xml +++ b/src/main/resources/mapper/OrganizationMapper.xml @@ -6,81 +6,32 @@ - - - - - - - - - and ${criterion.condition} - - - and ${criterion.condition} #{criterion.value} - - - and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} - - - and ${criterion.condition} - - #{listItem} - - - - - - - - - - - - - - - - - - and ${criterion.condition} - - - and ${criterion.condition} #{criterion.value} - - - and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} - - - and ${criterion.condition} - - #{listItem} - - - - - - - - - + - id, name, description + id, name,description - + select * from organization + + + + + + + + - select count(*) from organization - - - - - - update organization - - - id = #{record.id,jdbcType=INTEGER}, - - - name = #{record.name,jdbcType=VARCHAR}, - - - description = #{record.description,jdbcType=VARCHAR}, - - - - - - - - update organization - set id = #{record.id,jdbcType=INTEGER}, - name = #{record.name,jdbcType=VARCHAR}, - description = #{record.description,jdbcType=VARCHAR} - - - - - + update organization @@ -172,7 +85,7 @@ where id = #{id,jdbcType=INTEGER} - + update organization set name = #{name,jdbcType=VARCHAR}, description = #{description,jdbcType=VARCHAR} diff --git a/src/main/resources/mapper/ProductdemandMapper.xml b/src/main/resources/mapper/ProductdemandMapper.xml index b8d37f3..0f42041 100644 --- a/src/main/resources/mapper/ProductdemandMapper.xml +++ b/src/main/resources/mapper/ProductdemandMapper.xml @@ -11,80 +11,11 @@ - - - - - - - - - and ${criterion.condition} - - - and ${criterion.condition} #{criterion.value} - - - and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} - - - and ${criterion.condition} - - #{listItem} - - - - - - - - - - - - - - - - - - and ${criterion.condition} - - - and ${criterion.condition} #{criterion.value} - - - and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} - - - and ${criterion.condition} - - #{listItem} - - - - - - - - - id, name, demand_classify, demandyear, taskdocument, starttime, endtime, status - + select * from productdemand + + + delete from productdemand where id = #{id,jdbcType=INTEGER} - - delete from productdemand - - - - - + insert into productdemand (id, name, demand_classify, demandyear, taskdocument, starttime, endtime, status) @@ -110,7 +48,7 @@ #{demandyear,jdbcType=TIMESTAMP}, #{taskdocument,jdbcType=VARCHAR}, #{starttime,jdbcType=TIMESTAMP}, #{endtime,jdbcType=TIMESTAMP}, #{status,jdbcType=VARCHAR}) - + insert into productdemand @@ -165,59 +103,7 @@ - - - update productdemand - - - id = #{record.id,jdbcType=INTEGER}, - - - name = #{record.name,jdbcType=VARCHAR}, - - - demand_classify = #{record.demandClassify,jdbcType=VARCHAR}, - - - demandyear = #{record.demandyear,jdbcType=TIMESTAMP}, - - - taskdocument = #{record.taskdocument,jdbcType=VARCHAR}, - - - starttime = #{record.starttime,jdbcType=TIMESTAMP}, - - - endtime = #{record.endtime,jdbcType=TIMESTAMP}, - - - status = #{record.status,jdbcType=VARCHAR}, - - - - - - - - update productdemand - set id = #{record.id,jdbcType=INTEGER}, - name = #{record.name,jdbcType=VARCHAR}, - demand_classify = #{record.demandClassify,jdbcType=VARCHAR}, - demandyear = #{record.demandyear,jdbcType=TIMESTAMP}, - taskdocument = #{record.taskdocument,jdbcType=VARCHAR}, - starttime = #{record.starttime,jdbcType=TIMESTAMP}, - endtime = #{record.endtime,jdbcType=TIMESTAMP}, - status = #{record.status,jdbcType=VARCHAR} - - - - - + update productdemand @@ -244,7 +130,7 @@ where id = #{id,jdbcType=INTEGER} - + update productdemand set name = #{name,jdbcType=VARCHAR}, demand_classify = #{demandClassify,jdbcType=VARCHAR}, -- Gitee From 9f6564a23941fa2df3c2f68ed6d351aa2cd4456e Mon Sep 17 00:00:00 2001 From: root Date: Fri, 20 Nov 2020 10:01:34 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E5=85=A8=E9=83=A8=E6=B5=8B=E8=AF=95?= =?UTF-8?q?=E5=AE=8C=E6=88=90=EF=BC=8C=E4=BF=AE=E6=94=B9=E9=83=A8=E5=88=86?= =?UTF-8?q?bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/resources/mapper/DemandSubmitMapper.xml | 4 ++-- src/main/resources/mapper/EstimateTaskMapper.xml | 2 +- src/main/resources/mapper/ProductdemandMapper.xml | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/main/resources/mapper/DemandSubmitMapper.xml b/src/main/resources/mapper/DemandSubmitMapper.xml index 8f13f76..94ad99f 100644 --- a/src/main/resources/mapper/DemandSubmitMapper.xml +++ b/src/main/resources/mapper/DemandSubmitMapper.xml @@ -33,11 +33,11 @@ - SELECT count(*) FROM demand_submit diff --git a/src/main/resources/mapper/EstimateTaskMapper.xml b/src/main/resources/mapper/EstimateTaskMapper.xml index f864a8b..e301b22 100644 --- a/src/main/resources/mapper/EstimateTaskMapper.xml +++ b/src/main/resources/mapper/EstimateTaskMapper.xml @@ -34,7 +34,7 @@ diff --git a/src/main/resources/mapper/ProductdemandMapper.xml b/src/main/resources/mapper/ProductdemandMapper.xml index 0f42041..e1eade3 100644 --- a/src/main/resources/mapper/ProductdemandMapper.xml +++ b/src/main/resources/mapper/ProductdemandMapper.xml @@ -28,12 +28,12 @@ from productdemand limit #{offset},#{limit} - SELECT count(*) FROM productdemand - select * from productdemand WHERE name LIKE #{keyword} -- Gitee