Commit e5f85524 by jinxin

Merge remote-tracking branch 'origin/developer-2023-02-15' into test_branch

parents d015c0c8 1a89265a
......@@ -101,7 +101,6 @@ public class StaffDTO implements Serializable {
private String clerkName;
private String defaultGicEid;
private Integer addNum;
private Integer activeStatus;
private String enterpriseId;
private String storeId;
private int openConcatFlag = 0;
......@@ -483,14 +482,6 @@ public class StaffDTO implements Serializable {
this.addNum = addNum;
}
public Integer getActiveStatus() {
return activeStatus;
}
public void setActiveStatus(Integer activeStatus) {
this.activeStatus = activeStatus;
}
public String getEnterpriseId() {
return enterpriseId;
}
......
......@@ -148,7 +148,7 @@ public interface StaffMapper {
*/
int updateActiveStatusById(@Param("staffId")String staffId, @Param("activeTime")Date activeTime,
@Param("expireTime")Date expireTime,
@Param("activeCode")String activeCode, @Param("activeStatus")Integer activeStatus);
@Param("activeCode")String activeCode);
// 初始化激活码信息,先删除
void deleteActivieInfo(@Param("wxEnterpriseId") String wxEnterpriseId) ;
......@@ -183,7 +183,6 @@ public interface StaffMapper {
void updateStaffInfoByStaffId(@Param("staffId") String staffId,
@Param("activeTime")Date activeTime,
@Param("expireTime")Date expireTime,
@Param("activeCode")String activeCode,
@Param("activeStatus")Integer activeStatus);
@Param("activeCode")String activeCode);
}
\ No newline at end of file
......@@ -49,7 +49,6 @@ public class TabHaobanStaff implements Serializable {
private String wxOpenId;
private String qrCode;
private Integer addNum;
private Integer activeStatus;
@Transient
private String departmentIds;
......@@ -275,11 +274,4 @@ public class TabHaobanStaff implements Serializable {
this.addNum = addNum;
}
public Integer getActiveStatus() {
return activeStatus;
}
public void setActiveStatus(Integer activeStatus) {
this.activeStatus = activeStatus;
}
}
\ No newline at end of file
......@@ -140,7 +140,7 @@ public interface StaffService {
* @return
* @throws
*/
int updateActiveStatusById(String staffId, Date activeTime, Date expireTime ,String activeCode ,Integer activeStatus);
int updateActiveStatusById(String staffId, Date activeTime, Date expireTime ,String activeCode);
void updateOpenConcatFlag(List<String> wxUserIdList,int mixFlag);
......
......@@ -172,8 +172,8 @@ public class StaffServiceImpl implements StaffService {
@Override
public int updateActiveStatusById(String staffId, Date activeTime, Date expireTime,
String activeCode, Integer activeStatus) {
return mapper.updateActiveStatusById(staffId, activeTime, expireTime, activeCode , activeStatus) ;
String activeCode) {
return mapper.updateActiveStatusById(staffId, activeTime, expireTime, activeCode) ;
}
@Override
......@@ -244,7 +244,7 @@ public class StaffServiceImpl implements StaffService {
staff = this.mapper.getDeleteUser(userId, wxEnterpriseId) ;
}
if(null != staff) {
this.updateActiveStatusById(staff.getStaffId(), start, end, activeCode, 1) ;
this.updateActiveStatusById(staff.getStaffId(), start, end, activeCode) ;
}else {
log.info("查询激活账号,用户不存在,userid={}",userId);
}
......
......@@ -3,7 +3,6 @@ package com.gic.haoban.manage.service.service.out.impl;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.collection.CollectionUtil;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.gic.api.base.commons.Constant;
import com.gic.api.base.commons.Page;
......@@ -982,9 +981,9 @@ public class StaffApiServiceImpl implements StaffApiService {
TabHaobanStaff handoverStaff = collect.get(map.get(dto.getHandover_userid()));
TabHaobanStaff takeOverStaff = collect.get(map.get(dto.getTakeover_userid()));
//置空转移成员的许可信息
staffMapper.updateStaffInfoByStaffId(handoverStaff.getStaffId(),null,null,null,0);
staffMapper.updateStaffInfoByStaffId(handoverStaff.getStaffId(),null,null,null);
//更新接收成员的许可信息
staffMapper.updateStaffInfoByStaffId(takeOverStaff.getStaffId(),handoverStaff.getActiveTime(),handoverStaff.getExpireTime(), handoverStaff.getActiveCode(),1);
staffMapper.updateStaffInfoByStaffId(takeOverStaff.getStaffId(),handoverStaff.getActiveTime(),handoverStaff.getExpireTime(), handoverStaff.getActiveCode());
}else{
//企微转移失败,记录失败明细
......
......@@ -24,7 +24,6 @@
<result column="wx_open_id" property="wxOpenId" jdbcType="VARCHAR"/>
<result column="qr_code" property="qrCode" jdbcType="VARCHAR"/>
<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="active_time" property="activeTime" jdbcType="TIMESTAMP"/>
<result column="expire_time" property="expireTime" jdbcType="TIMESTAMP"/>
......@@ -35,7 +34,7 @@
staff_id
, 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,
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>
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String">
select
......@@ -318,11 +317,11 @@
<!-- 其他占用 -->
<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 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>
<!-- 许可状态 0 未激活,1 正常有效,2 即将过期,3 已过期,可多传,按‘,’隔开 -->
<if test="null != permitState and '' != permitState">
......@@ -330,15 +329,15 @@
and a.expire_time is null
</if>
<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 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 test="permitState==3">
and a.active_status = 1 and a.expire_time <![CDATA[<]]> now()
and a.expire_time <![CDATA[<]]> now()
</if>
</if>
......@@ -549,7 +548,7 @@
<update id="updateActiveStatusById">
update tab_haoban_staff
set active_status = #{activeStatus},
set
`active_time` = #{activeTime},
`expire_time` = #{expireTime},
`active_code` = #{activeCode},
......@@ -559,7 +558,7 @@
<update id="deleteActivieInfo">
update tab_haoban_staff
set active_status = 0,
set
`active_time` = null,
`expire_time` = null ,
active_code = null ,
......@@ -622,7 +621,7 @@
</update>
<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>
......@@ -630,8 +629,7 @@
update tab_haoban_staff set
active_time = #{activeTime},
expire_time = #{expireTime},
active_code = #{activeCode},
active_status = #{activeStatus}
active_code = #{activeCode}
where staff_id= #{staffId}
</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