Commit 043a987f by 墨竹

feat:收费

parent 9ab8f17b
......@@ -63,5 +63,15 @@ public interface TabHaobanQywxFeeOrderAccountMapper {
*/
int deleteById(Long feeAccountId);
/**
* 未激活用户数
*
* @param status
* @param wxEnterpriseId
* @return int
* @author mozhu
* @date 2022-08-05 11:24:02
*/
int countOrderAccountStatus(@Param("status") Integer status,@Param("wxEnterpriseId") String wxEnterpriseId);
}
......@@ -63,5 +63,14 @@ public interface TabHaobanQywxFeeOrderMapper {
*/
int deleteById(Long feeOrderId);
/**
* 购买许可总数
*
* @param wxEnterpriseId wx企业标识
* @return int
* @author mozhu
* @date 2022-08-05 11:18:22
*/
int countExternalContactCount(@Param("wxEnterpriseId") String wxEnterpriseId);
}
......@@ -42,4 +42,15 @@ public interface HaobanQywxFeeOrderAccountService {
*/
boolean deleteById(Long feeAccountId);
/**
* 未激活用户数
*
* @param status 状态
* @param wxEnterpriseId wx企业标识
* @return int
* @author mozhu
* @date 2022-08-05 11:23:01
*/
int countOrderAccountStatus(Integer status,String wxEnterpriseId);
}
......@@ -42,4 +42,15 @@ public interface HaobanQywxFeeOrderService {
*/
boolean deleteById(Long feeOrderId);
/**
* 购买许可总数
*
* @param wxEnterpriseId wx企业标识
* @return int
* @author mozhu
* @date 2022-08-05 11:17:43
*/
int countExternalContactCount(String wxEnterpriseId);
}
......@@ -63,4 +63,9 @@ public class HaobanQywxFeeOrderAccountServiceImpl implements HaobanQywxFeeOrderA
public boolean deleteById(Long feeAccountId) {
return this.tabHaobanQywxFeeOrderAccountMapper.deleteById(feeAccountId) > 0;
}
@Override
public int countOrderAccountStatus(Integer status, String wxEnterpriseId) {
return tabHaobanQywxFeeOrderAccountMapper.countOrderAccountStatus(status,wxEnterpriseId);
}
}
......@@ -63,4 +63,9 @@ public class HaobanQywxFeeOrderServiceImpl implements HaobanQywxFeeOrderService
public boolean deleteById(Long feeOrderId) {
return this.tabHaobanQywxFeeOrderMapper.deleteById(feeOrderId) > 0;
}
@Override
public int countExternalContactCount(String wxEnterpriseId) {
return tabHaobanQywxFeeOrderMapper.countExternalContactCount(wxEnterpriseId);
}
}
......@@ -216,14 +216,16 @@ public class HaobanQywxFeeApiServiceImpl implements HaobanQywxFeeApiService {
tabHaobanQywxFee.setCorpName(tabHaobanWxEnterpris.getCorpName());
tabHaobanQywxFee.setCorpId(corpid);
tabHaobanQywxFee.setWxEnterpriseId(wxEnterpriseId);
//tabHaobanQywxFee.setInterceptTime();
//
//tabHaobanQywxFee.setInterceptUserNum();
//tabHaobanQywxFee.setPermissionUserNum();
//tabHaobanQywxFee.setBuyPermissionUserNum();
tabHaobanQywxFee.setPermissionUserNum(haobanQywxFeeOrderAccountService.countOrderAccountStatus(1,wxEnterpriseId));
tabHaobanQywxFee.setBuyPermissionUserNum(haobanQywxFeeOrderService.countExternalContactCount(wxEnterpriseId));
tabHaobanQywxFee.setInterceptFlag(0);
haobanQywxFeeService.insert(tabHaobanQywxFee);
}
}
......
......@@ -130,5 +130,13 @@
where fee_account_id = #{feeAccountId}
</delete>
<select id="countOrderAccountStatus" resultMap="TabHaobanQywxFeeOrderAccountMap">
select
count(*)
from tab_haoban_qywx_fee_order_account
where wx_enterprise_id = #{wxEnterpriseId} and status = #{status}
</select>
</mapper>
......@@ -146,5 +146,11 @@
where fee_order_id = #{feeOrderId}
</delete>
<select id="countExternalContactCount" resultType="java.lang.Integer">
select
sum(external_contact_count)
from tab_haoban_qywx_fee_order
where wx_enterprise_id = #{wxEnterpriseId}
</select>
</mapper>
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