Commit 1dde46c9 by jinxin

active_status字段删除

parent 77f7c838
...@@ -24,7 +24,6 @@ ...@@ -24,7 +24,6 @@
<result column="wx_open_id" property="wxOpenId" jdbcType="VARCHAR"/> <result column="wx_open_id" property="wxOpenId" jdbcType="VARCHAR"/>
<result column="qr_code" property="qrCode" jdbcType="VARCHAR"/> <result column="qr_code" property="qrCode" jdbcType="VARCHAR"/>
<result column="add_num" property="addNum" jdbcType="INTEGER"/> <result column="add_num" property="addNum" jdbcType="INTEGER"/>
<result column="active_status" property="activeStatus" jdbcType="INTEGER"/>
<result column="open_concat_flag" property="openConcatFlag"/> <result column="open_concat_flag" property="openConcatFlag"/>
<result column="active_time" property="activeTime" jdbcType="TIMESTAMP"/> <result column="active_time" property="activeTime" jdbcType="TIMESTAMP"/>
<result column="expire_time" property="expireTime" jdbcType="TIMESTAMP"/> <result column="expire_time" property="expireTime" jdbcType="TIMESTAMP"/>
...@@ -35,7 +34,7 @@ ...@@ -35,7 +34,7 @@
staff_id staff_id
, wx_user_id, phone_number, staff_name, nation_code, nick_name, sex, postion, , wx_user_id, phone_number, staff_name, nation_code, nick_name, sex, postion,
active_flag, extend_postion, status_flag, create_time, update_time,wx_enterprise_id,head_img, active_flag, extend_postion, status_flag, create_time, update_time,wx_enterprise_id,head_img,
sort,sync_postion_flag,super_manager_flag,wx_open_user_id,wx_open_id,qr_code,add_num,active_status,open_concat_flag,active_time,expire_time,active_code sort,sync_postion_flag,super_manager_flag,wx_open_user_id,wx_open_id,qr_code,add_num,open_concat_flag,active_time,expire_time,active_code
</sql> </sql>
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String"> <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String">
select select
...@@ -318,11 +317,11 @@ ...@@ -318,11 +317,11 @@
<!-- 其他占用 --> <!-- 其他占用 -->
<if test="occupy != null and 1==occupy"> <if test="occupy != null and 1==occupy">
and a.status_flag = 0 and a.del_time >= DATE_FORMAT(NOW(),'%Y-%m-%d') and a.active_status = 1 and a.expire_time >= DATE_FORMAT(NOW(),'%Y-%m-%d') and a.status_flag = 0 and a.del_time >= DATE_FORMAT(NOW(),'%Y-%m-%d') and a.expire_time >= DATE_FORMAT(NOW(),'%Y-%m-%d')
</if> </if>
<!-- --> <!-- -->
<if test="occupy != null and 2==occupy"> <if test="occupy != null and 2==occupy">
and ( a.active_status = 0 or a.expire_time <![CDATA[<]]> now() ) and ( a.expire_time is null or a.expire_time <![CDATA[<]]> now() )
</if> </if>
<!-- 许可状态 0 未激活,1 正常有效,2 即将过期,3 已过期,可多传,按‘,’隔开 --> <!-- 许可状态 0 未激活,1 正常有效,2 即将过期,3 已过期,可多传,按‘,’隔开 -->
<if test="null != permitState and '' != permitState"> <if test="null != permitState and '' != permitState">
...@@ -330,15 +329,15 @@ ...@@ -330,15 +329,15 @@
and a.expire_time is null and a.expire_time is null
</if> </if>
<if test="permitState==1"> <if test="permitState==1">
and a.active_status = 1 and a.expire_time > now() and a.expire_time > DATE_ADD(DATE_FORMAT(NOW(),'%Y-%m-%d'),INTERVAL 30 DAY) and a.expire_time > now() and a.expire_time > DATE_ADD(DATE_FORMAT(NOW(),'%Y-%m-%d'),INTERVAL 30 DAY)
</if> </if>
<if test="permitState==2"> <if test="permitState==2">
and a.active_status = 1 and a.expire_time > now() and a.expire_time <![CDATA[<=]]> DATE_ADD(DATE_FORMAT(NOW(),'%Y-%m-%d'),INTERVAL 30 DAY) and a.expire_time > now() and a.expire_time <![CDATA[<=]]> DATE_ADD(DATE_FORMAT(NOW(),'%Y-%m-%d'),INTERVAL 30 DAY)
</if> </if>
<if test="permitState==3"> <if test="permitState==3">
and a.active_status = 1 and a.expire_time <![CDATA[<]]> now() and a.expire_time <![CDATA[<]]> now()
</if> </if>
</if> </if>
...@@ -549,7 +548,7 @@ ...@@ -549,7 +548,7 @@
<update id="updateActiveStatusById"> <update id="updateActiveStatusById">
update tab_haoban_staff update tab_haoban_staff
set active_status = #{activeStatus}, set
`active_time` = #{activeTime}, `active_time` = #{activeTime},
`expire_time` = #{expireTime}, `expire_time` = #{expireTime},
`active_code` = #{activeCode}, `active_code` = #{activeCode},
...@@ -559,7 +558,7 @@ ...@@ -559,7 +558,7 @@
<update id="deleteActivieInfo"> <update id="deleteActivieInfo">
update tab_haoban_staff update tab_haoban_staff
set active_status = 0, set
`active_time` = null, `active_time` = null,
`expire_time` = null , `expire_time` = null ,
active_code = null , active_code = null ,
...@@ -622,7 +621,7 @@ ...@@ -622,7 +621,7 @@
</update> </update>
<select id="getOccupyNum" resultType="java.lang.Integer"> <select id="getOccupyNum" resultType="java.lang.Integer">
SELECT count(*) FROM tab_haoban_staff WHERE status_flag = 0 and del_time >= DATE_FORMAT(NOW(),'%Y-%m-%d') and active_status = 1 and wx_enterprise_id = #{wxEnterpriseId} SELECT count(*) FROM tab_haoban_staff WHERE status_flag = 0 and del_time >= DATE_FORMAT(NOW(),'%Y-%m-%d') and expire_time >= DATE_FORMAT(NOW(),'%Y-%m-%d') and wx_enterprise_id = #{wxEnterpriseId}
</select> </select>
...@@ -630,8 +629,7 @@ ...@@ -630,8 +629,7 @@
update tab_haoban_staff set update tab_haoban_staff set
active_time = #{activeTime}, active_time = #{activeTime},
expire_time = #{expireTime}, expire_time = #{expireTime},
active_code = #{activeCode}, active_code = #{activeCode}
active_status = #{activeStatus}
where staff_id= #{staffId} where staff_id= #{staffId}
</update> </update>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment