Commit 7b088c3a by 徐高华

激活码

parent 248f6772
......@@ -136,7 +136,7 @@ public interface StaffMapper {
/**
* 更新是否激活
*/
int updateActiveStatusById(@Param("wxOpenUserId")String wxOpenUserId, @Param("activeTime")Date activeTime,
int updateActiveStatusById(@Param("staffId")String staffId, @Param("activeTime")Date activeTime,
@Param("expireTime")Date expireTime,
@Param("activeCode")String activeCode, @Param("activeStatus")Integer activeStatus);
......
......@@ -174,9 +174,9 @@ public class StaffServiceImpl implements StaffService {
}
@Override
public int updateActiveStatusById(String wxOpenUserId, Date activeTime, Date expireTime,
public int updateActiveStatusById(String staffId, Date activeTime, Date expireTime,
String activeCode, Integer activeStatus) {
return mapper.updateActiveStatusById(wxOpenUserId, activeTime, expireTime, activeCode , activeStatus) ;
return mapper.updateActiveStatusById(staffId, activeTime, expireTime, activeCode , activeStatus) ;
}
@Override
......@@ -249,7 +249,15 @@ public class StaffServiceImpl implements StaffService {
Date start = new Date(item.getActiveTime()*1000L) ;
Date end = new Date(item.getExpireTime()*1000L) ;
log.info("更新staff表,userId={}",userId);
this.updateActiveStatusById(userId , start, end, activeCode, 1) ;
TabHaobanStaff staff = this.mapper.selectByUserIdAndEnterpriseId(userId, wxEnterpriseId) ;
if(null == staff && end.getTime()>System.currentTimeMillis()) {
staff = this.mapper.getDeleteUser(userId, wxEnterpriseId) ;
}
if(null != staff) {
this.updateActiveStatusById(staff.getStaffId(), start, end, activeCode, 1) ;
}else {
log.info("查询激活账号,用户不存在,userid={}",userId);
}
TabHaobanQywxFeeAccountStaff accountStaff = new TabHaobanQywxFeeAccountStaff();
accountStaff.setFeeAccountStaffId(UniqueIdUtils.uniqueLong());
accountStaff.setWxEnterpriseId(wxEnterpriseId);
......
......@@ -504,7 +504,7 @@
`expire_time` = #{expireTime},
`active_code` = #{activeCode},
update_time = now()
where wx_open_user_id = #{wxOpenUserId}
where staff_id = #{staffId}
</update>
<update id="deleteActivieInfo">
......
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