From 0779d38053cb64734516dc4a815e399f10e31ade Mon Sep 17 00:00:00 2001
From: zengh <123456>
Date: Fri, 05 Nov 2021 14:29:30 +0800
Subject: [PATCH] 穿透修改
---
src/main/java/org/springblade/modules/system/mapper/UserMapper.xml | 2
src/main/java/org/springblade/modules/zc/controller/ZcController.java | 30 ++++++++------
src/main/java/org/springblade/modules/zc/mapper/ZcMapper.xml | 10 ++++-
src/main/java/org/springblade/modules/system/controller/UserController.java | 35 +++++++++--------
4 files changed, 44 insertions(+), 33 deletions(-)
diff --git a/src/main/java/org/springblade/modules/system/controller/UserController.java b/src/main/java/org/springblade/modules/system/controller/UserController.java
index bd86792..e3f78b2 100644
--- a/src/main/java/org/springblade/modules/system/controller/UserController.java
+++ b/src/main/java/org/springblade/modules/system/controller/UserController.java
@@ -501,23 +501,24 @@
boolean status = userService.save(user);
//头像
- if (null!=user.getAvatar() && !user.getAvatar().equals("")) {
- user.setAvatar(FtpConfig.ip + user.getAvatar().substring(26));
- }
-
- String s = "insert into blade_user(id,tenant_id,account,password,name,real_name,avatar,email,phone,sex,role_id,dept_id,cardid," +
- "jurisdiction,examination_type,status,is_deleted) " +
- "values(" + "'" + user.getId() + "'" + "," + "'" + user.getTenantId() + "'" + "," + "'" + user.getAccount() + "'" + "," +
- "'" + user.getPassword() + "'" + "," + "'" + user.getName() + "'" + "," + "'" + user.getRealName() + "'" + "," + "'" + user.getAvatar() + "'" + "," +
- "'" + user.getEmail() + "'" + "," + "'" + user.getPhone() + "'" + "," + "'" + user.getSex() + "'" + "," + "'" + user.getRoleId() + "'" +
- "," + "'" + user.getDeptId() + "'" +
- "," + "'" + user.getCardid() + "'" +
- "," + "'" + user.getJurisdiction() + "'" +
- "," + "'" + user.getExamination_type() + "'" +
- "," + "'" + user.getStatus() + "'" +
- "," + "'" + user.getIsDeleted() + "'" + ")";
+// if (null!=user.getAvatar() && !user.getAvatar().equals("")) {
+// user.setAvatar(FtpConfig.ip + user.getAvatar().substring(26));
+// }
+//
+// String s = "insert into blade_user(id,tenant_id,account,password,name,real_name,avatar,email,phone,sex,role_id,dept_id,cardid," +
+// "jurisdiction,examination_type,status,is_deleted) " +
+// "values(" + "'" + user.getId() + "'" + "," + "'" + user.getTenantId() + "'" + "," + "'" + user.getAccount() + "'" + "," +
+// "'" + user.getPassword() + "'" + "," + "'" + user.getName() + "'" + "," + "'" + user.getRealName() + "'" + "," + "'" + user.getAvatar() + "'" + "," +
+// "'" + user.getEmail() + "'" + "," + "'" + user.getPhone() + "'" + "," + "'" + user.getSex() + "'" + "," + "'" + user.getRoleId() + "'" +
+// "," + "'" + user.getDeptId() + "'" +
+// "," + "'" + user.getCardid() + "'" +
+// "," + "'" + user.getJurisdiction() + "'" +
+// "," + "'" + user.getExamination_type() + "'" +
+// "," + "'" + user.getStatus() + "'" +
+// "," + "'" + user.getIsDeleted() + "'" + ")";
// System.out.println(s);
- FtpUtil.sqlFileUpload(s);
+// FtpUtil.sqlFileUpload(s);
return R.status(status);
}
-}
+};
+
diff --git a/src/main/java/org/springblade/modules/system/mapper/UserMapper.xml b/src/main/java/org/springblade/modules/system/mapper/UserMapper.xml
index 26e0132..d23c716 100644
--- a/src/main/java/org/springblade/modules/system/mapper/UserMapper.xml
+++ b/src/main/java/org/springblade/modules/system/mapper/UserMapper.xml
@@ -143,7 +143,7 @@
</foreach>
)
</if>
- ORDER BY id
+ ORDER BY id desc
</select>
<select id="selectUserPagetxl" resultMap="userResultMaps">
diff --git a/src/main/java/org/springblade/modules/zc/controller/ZcController.java b/src/main/java/org/springblade/modules/zc/controller/ZcController.java
index d54bc7a..161b350 100644
--- a/src/main/java/org/springblade/modules/zc/controller/ZcController.java
+++ b/src/main/java/org/springblade/modules/zc/controller/ZcController.java
@@ -180,20 +180,7 @@
user.setCardid(zc.getCardid());
iUserService.saveOrUpdate(user);
- String s = "insert into blade_user(id,tenant_id,account,password,name,real_name,avatar,email,phone,sex,role_id,dept_id,cardid," +
- "jurisdiction,examination_type,status,is_deleted) " +
- "values(" + "'" + user.getId() + "'" + "," + "'" + "000000" + "'" + "," + "'" + user.getAccount() + "'" + "," +
- "'" + user.getPassword() + "'" + "," + "'" + user.getName() + "'" + "," + "'" + user.getRealName() + "'" + "," + "'" + user.getAvatar() + "'" + "," +
- "'" + user.getEmail() + "'" + "," + "'" + user.getPhone() + "'" + "," + "'" + user.getSex() + "'" + "," + "'" + user.getRoleId() + "'" +
- "," + "'" + user.getDeptId() + "'" +
- "," + "'" + user.getCardid() + "'" +
- "," + "'" + user.getJurisdiction() + "'" +
- "," + "'" + user.getExamination_type() + "'" +
- "," + "'" + user.getStatus() + "'" +
- "," + "'" + user.getIsDeleted() + "'" + ")";
- System.out.println(s);
- FtpUtil.sqlFileUpload(s);
}
return R.status(zcService.saveOrUpdate(zc));
}
@@ -220,6 +207,23 @@
String times = df.format(new Date());
zc.setZctime(times);
zcService.inster(zc);
+
+ String s = "insert into act_zc(id,username,password,sname,sex,phone,zctime,deptid,parent_id,jurisdiction,cardid)" +
+ "values(" + zc.getId() + "'" +
+ "," + "'" + zc.getUsername() + "'" +
+ "," + "'" + zc.getPassword() + "'" +
+ "," + "'" + zc.getSname() + "'" +
+ "," + "'" + zc.getSex() + "'" +
+ "," + "'" + zc.getPhone() + "'" +
+ "," + "'" + zc.getZctime() + "'" +
+ "," + "'" + zc.getDeptid() + "'" +
+ "," + "'" + zc.getParentId() + "'" +
+ "," + "'" + zc.getJurisdiction() + "'" +
+ "," + "'" + zc.getCardid() + "'" + ")";
+
+ System.out.println(s);
+ FtpUtil.sqlFileUpload(s);
+
return R.success("新增成功");
}
diff --git a/src/main/java/org/springblade/modules/zc/mapper/ZcMapper.xml b/src/main/java/org/springblade/modules/zc/mapper/ZcMapper.xml
index 0adb96c..a39bc03 100644
--- a/src/main/java/org/springblade/modules/zc/mapper/ZcMapper.xml
+++ b/src/main/java/org/springblade/modules/zc/mapper/ZcMapper.xml
@@ -16,6 +16,9 @@
<result column="parent_id" property="parentId"/>
<result column="jurisdiction" property="jurisdiction"/>
<result column="cardid" property="cardid"/>
+ <result column="examination_type" property="examination_type"/>
+ <result column="examination_mx" property="examination_mx"/>
+ <result column="audit_time" property="auditTime"/>
</resultMap>
@@ -37,12 +40,15 @@
<if test="zc.cardid != null and zc.cardid != '' ">
and cardid like CONCAT('%',#{zc.cardid},'%')
</if>
- and type != 1
+ <if test="zc.examination_type != null and zc.examination_type != '' ">
+ and examination_type = #{zc.examination_type}
+ </if>
+ and type != 1 ORDER BY zctime DESC
</select>
<!--注册新增-->
- <insert id="inster">
+ <insert id="inster" useGeneratedKeys="true" keyProperty="id" keyColumn="id">
insert into act_zc(username,password,sname,sex,phone,zctime,deptid,parent_id,jurisdiction,cardid) values(#{username},#{password},#{sname},#{sex},#{phone},#{zctime},#{deptid},#{parentId},#{jurisdiction},#{cardid})
</insert>
--
Gitblit v1.9.3