Commit 3f5c0614 by jinxin

统计即将过期的许可总数

parent e8df7f6f
......@@ -50,6 +50,18 @@ public class StaffActiveDataDTO implements Serializable {
* 已合并许可总数
*/
private Integer merged;
/**
* 即将过期的许可总数
*/
private Integer expiring;
public Integer getExpiring() {
return expiring;
}
public void setExpiring(Integer expiring) {
this.expiring = expiring;
}
public Integer getMerged() {
return merged;
......
......@@ -167,6 +167,13 @@ public interface StaffMapper {
Integer getOccupyNum(@Param("wxEnterpriseId") String wxEnterpriseId);
/**
* 查询即将过期的许可总数
* @param wxEnterpriseId
* @return
*/
Integer getExpiringNum(@Param("wxEnterpriseId") String wxEnterpriseId);
/**
* 通过wxOpenUserId更新企业成员许可信息
*/
void updateStaffInfoByStaffId(@Param("staffId") String staffId,
......
......@@ -134,6 +134,11 @@ public interface StaffService {
*/
Integer getOccupyNum(String wxEnterpriseId);
/**
* 查询即将过期的许可总数
*/
Integer getExpiringNum(String wxEnterpriseId);
/**
* 查询成员列表
......
......@@ -200,6 +200,11 @@ public class StaffServiceImpl implements StaffService {
return mapper.getOccupyNum(wxEnterpriseId);
}
@Override
public Integer getExpiringNum(String wxEnterpriseId) {
return mapper.getExpiringNum(wxEnterpriseId);
}
private void listAccount(TabHaobanWxEnterprise wxEnterprise , int limit , String cursor) {
String wxEnterpriseId = wxEnterprise.getWxEnterpriseId() ;
String openCorpid = wxEnterprise.getOpenCorpid() ;
......
......@@ -118,6 +118,10 @@ public class WxEnterpriseActiveDataServiceImpl implements WxEnterpriseActiveData
Integer occupy=0;
occupy=staffService.getOccupyNum(wxEnterpriseId);
staffActiveDataDTO.setOccupy(occupy);
//查询即将过期的许可总数
Integer expiringNum = 0;
expiringNum = staffService.getExpiringNum(wxEnterpriseId);
staffActiveDataDTO.setExpiring(expiringNum);
return staffActiveDataDTO;
}
}
......@@ -616,6 +616,10 @@
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 id="getExpiringNum" resultType="java.lang.Integer">
SELECT count(*) FROM tab_haoban_staff WHERE status_flag = 1 and expire_time > now() and expire_time <![CDATA[<=]]> DATE_ADD(DATE_FORMAT(NOW(),'%Y-%m-%d'),INTERVAL 30 DAY) and wx_enterprise_id = #{wxEnterpriseId}
</select>
<update id="updateStaffInfoByStaffId">
update tab_haoban_staff set
......
......@@ -50,6 +50,18 @@ public class StaffActiveDataVO implements Serializable {
* 已合并许可总数
*/
private Integer merged;
/**
* 即将过期的许可总数
*/
private Integer expiring;
public Integer getExpiring() {
return expiring;
}
public void setExpiring(Integer expiring) {
this.expiring = expiring;
}
public Integer getMerged() {
return merged;
......
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