Commit a835cfdc by jinxin

staff表字段添加

parent dc4b5524
...@@ -164,6 +164,19 @@ public interface StaffMapper { ...@@ -164,6 +164,19 @@ public interface StaffMapper {
List<TabHaobanStaff> listAllByPage(@Param("wxEnterpriseId") String wxEnterpriseId, @Param("startItem") int startItem , @Param("pageSize") int pageSize); List<TabHaobanStaff> listAllByPage(@Param("wxEnterpriseId") String wxEnterpriseId, @Param("startItem") int startItem , @Param("pageSize") int pageSize);
void updateOpenConcatFlag(@Param("wxUserIdList")List<String> wxUserIdList , @Param("mixFlag")int mixFlag); void updateOpenConcatFlag(@Param("wxUserIdList")List<String> wxUserIdList , @Param("mixFlag")int mixFlag);
/**
* 查询其他占用许可总数
*/
Integer getOccupyNum();
StaffDTO getStaffInfoByWxOpenUserId(@Param("wxOpenUseId") String wxOpenUseId);
/**
* 通过wxOpenUserId更新企业成员许可信息
*/
void updateStaffInfoByWxOpenUserId(@Param("wxOpenUseId") String wxOpenUseId,
@Param("activeTime")Date activeTime,
@Param("expireTime")Date expireTime,
@Param("activeCode")String activeCode);
} }
\ No newline at end of file
...@@ -54,7 +54,35 @@ public class TabHaobanStaff implements Serializable { ...@@ -54,7 +54,35 @@ public class TabHaobanStaff implements Serializable {
@Transient @Transient
private String departmentIds; private String departmentIds;
private int openConcatFlag ; private int openConcatFlag ;
private Date activeTime;
private Date expireTime;
private String activeCode;
public Date getActiveTime() {
return activeTime;
}
public void setActiveTime(Date activeTime) {
this.activeTime = activeTime;
}
public Date getExpireTime() {
return expireTime;
}
public void setExpireTime(Date expireTime) {
this.expireTime = expireTime;
}
public String getActiveCode() {
return activeCode;
}
public void setActiveCode(String activeCode) {
this.activeCode = activeCode;
}
public int getOpenConcatFlag() { public int getOpenConcatFlag() {
return openConcatFlag; return openConcatFlag;
} }
......
...@@ -26,13 +26,16 @@ ...@@ -26,13 +26,16 @@
<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="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="expire_time" property="expireTime" jdbcType="TIMESTAMP"/>
<result column="active_code" property="activeCode" jdbcType="VARCHAR"/>
</resultMap> </resultMap>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
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 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
</sql> </sql>
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String"> <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String">
select select
...@@ -546,7 +549,7 @@ ...@@ -546,7 +549,7 @@
select <include refid="Base_Column_List" /> from tab_haoban_staff where wx_enterprise_id = #{wxEnterpriseId} and status_flag = 1 order by staff_id select <include refid="Base_Column_List" /> from tab_haoban_staff where wx_enterprise_id = #{wxEnterpriseId} and status_flag = 1 order by staff_id
limit ${startItem},${pageSize} limit ${startItem},${pageSize}
</select> </select>
<update id="updateOpenConcatFlag"> <update id="updateOpenConcatFlag">
update tab_haoban_staff set open_concat_flag = 1 where update tab_haoban_staff set open_concat_flag = 1 where
<if test="mixFlag==0"> <if test="mixFlag==0">
...@@ -560,4 +563,20 @@ ...@@ -560,4 +563,20 @@
</foreach> </foreach>
</update> </update>
<select id="getOccupyNum" resultType="java.lang.Integer">
SELECT count(*) FROM tab_haoban_staff WHERE status_flag=0 and expire_time is not null
</select>
<select id="getStaffInfoByWxOpenUserId" resultType="com.gic.haoban.manage.api.dto.StaffDTO">
SELECT * FROM tab_haoban_staff WHERE wx_open_user_id = #{wxOpenUseId}
</select>
<update id="updateStaffInfoByWxOpenUserId">
update tab_haoban_staff set
active_time = #{activeTime},
expire_time = #{expireTime},
active_code = #{activeCode}
where wx_open_user_id = #{wxOpenUseId}
</update>
</mapper> </mapper>
\ No newline at end of file
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