From 74b4f898106c8d61e10518c6e6277223fe9a98e4 Mon Sep 17 00:00:00 2001
From: tangzy <tangzy123456>
Date: Thu, 02 Sep 2021 11:50:22 +0800
Subject: [PATCH] 1.注册

---
 src/main/java/org/springblade/modules/zc/mapper/ZcMapper.xml |   26 ++++++++++++++++++++------
 1 files changed, 20 insertions(+), 6 deletions(-)

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 ee58312..22bdc0e 100644
--- a/src/main/java/org/springblade/modules/zc/mapper/ZcMapper.xml
+++ b/src/main/java/org/springblade/modules/zc/mapper/ZcMapper.xml
@@ -13,22 +13,36 @@
         <result column="zctime" property="zctime"/>
         <result column="type" property="type"/>
         <result column="deptid" property="deptid"/>
-        <result column="parentId" property="parentId"/>
     </resultMap>
 
 
     <select id="selectZcPage" resultMap="zcResultMap">
-        select * from act_zc where is_deleted = 0
+        SELECT
+        z.id,
+        z.username,
+        z.sname,
+        z.cardid,
+        z.type,
+        d.dept_name AS deptid
+        FROM
+        act_zc z
+        LEFT JOIN blade_dept d ON d.id = z.deptid where 1=1
+        <if test="zc.type!=null and zc.type!=''">
+            and z.type=#{zc.type}
+        </if>
     </select>
 
 
     <!--注册新增-->
-   <insert id="inster">
-       insert  into act_zc(username,password,sname,sex,phone,zctime,deptid) values(#{username},#{password},#{sname},#{sex},#{phone},#{zctime},#{deptid})
-   </insert>
+    <insert id="inster">
+        insert into act_zc(username, password, sname, cardid, zctime, deptid)
+        values (#{username}, #{password}, #{sname}, #{cardid}, #{zctime}, #{deptid})
+    </insert>
 
     <select id="selectType" resultType="String">
-        select type from act_zc where username=#{param1}
+        select type
+        from act_zc
+        where username = #{param1}
     </select>
 
 </mapper>

--
Gitblit v1.9.3