From 14498c57ff64b5aebf5cf9b46041a88327d8236b Mon Sep 17 00:00:00 2001
From: wuxw <928255095@qq.com>
Date: 星期六, 08 十二月 2018 22:43:11 +0800
Subject: [PATCH] 修改用户完善,停用用户,恢复用户功能实现
---
java110-config/src/main/resources/mapper/user/UserServiceDaoImplMapper.xml | 37 ++++++++++++++++++++++++++++++++++---
1 files changed, 34 insertions(+), 3 deletions(-)
diff --git a/java110-config/src/main/resources/mapper/user/UserServiceDaoImplMapper.xml b/java110-config/src/main/resources/mapper/user/UserServiceDaoImplMapper.xml
index 5381ae4..a65b05e 100644
--- a/java110-config/src/main/resources/mapper/user/UserServiceDaoImplMapper.xml
+++ b/java110-config/src/main/resources/mapper/user/UserServiceDaoImplMapper.xml
@@ -2,7 +2,7 @@
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="userServiceDAOImpl">
+<mapper namespace="userServiceDaoImpl">
<resultMap type="com.java110.entity.user.Cust" id="custMap">
<id column="custId" jdbcType="VARCHAR" property="custId"/>
@@ -171,7 +171,35 @@
</insert>
<update id="updateUserInfoInstance" parameterType="map">
- update u_user u set u.status_cd = #{statusCd} where 1 = 1
+ update u_user u set u.status_cd = #{statusCd}
+ <if test="newBId != null and newBId != ''">
+ ,s.b_id = #{newBId}
+ </if>
+ <if test="name !=null and name != ''">
+ ,s.name= #{name}
+ </if>
+ <if test="email !=null and email != ''">
+ ,s.email= #{email}
+ </if>
+ <if test="address !=null and address != ''">
+ ,s.address= #{address}
+ </if>
+ <if test="password !=null and password != ''">
+ ,s.password= #{password}
+ </if>
+ <if test="locationCd !=null and locationCd != ''">
+ ,s.location_cd= #{locationCd}
+ </if>
+ <if test="age !=null and age != ''">
+ ,s.age= #{age}
+ </if>
+ <if test="sex !=null and sex != ''">
+ ,s.sex= #{sex}
+ </if>
+ <if test="tel !=null and tel != ''">
+ ,s.tel= #{tel}
+ </if>
+ where 1 = 1
<if test="bId != null and bId != ''">
and u.b_id = #{bId}
</if>
@@ -233,13 +261,16 @@
<select id="queryUserInfo" parameterType="map" resultType="map">
select u.user_id,u.name,u.email,u.address,u.password,u.location_cd,
u.age,u.sex,u.tel,u.level_cd,u.b_id
- from u_user u where u.status_cd = '0'
+ from u_user u where 1= 1
<if test="bId != null and bId !=''">
and u.b_id = #{bId}
</if>
<if test="userId != null and userId != ''">
and u.user_id = #{userId}
</if>
+ <if test="statusCd !=null statusCd != ''">
+ and u.status_cd = #{statusCd}
+ </if>
</select>
--
Gitblit v1.8.0