Commit 136d8569 by 墨竹

fix:收费列表

parent ede0f27d
package com.gic.haoban.manage.service.service.fee;
import com.gic.api.base.commons.Page;
import com.gic.haoban.manage.api.dto.qdto.QywxFeeListQDTO;
import com.gic.haoban.manage.service.entity.fee.TabHaobanQywxFee;
import com.gic.haoban.manage.service.pojo.bo.fee.HaobanQywxFeeBO;
......@@ -55,7 +56,7 @@ public interface HaobanQywxFeeService {
* @author mozhu
* @date 2022-08-05 15:26:45
*/
List<HaobanQywxFeeBO> listPage(QywxFeeListQDTO qywxFeeListQDTO);
Page<HaobanQywxFeeBO> listPage(QywxFeeListQDTO qywxFeeListQDTO);
}
package com.gic.haoban.manage.service.service.fee.impl;
import com.gic.api.base.commons.Page;
import com.gic.commons.util.EntityUtil;
import com.gic.haoban.common.utils.PageUtil;
import com.gic.haoban.manage.api.dto.qdto.QywxFeeListQDTO;
import com.gic.haoban.manage.service.dao.mapper.fee.TabHaobanQywxFeeMapper;
import com.gic.haoban.manage.service.entity.fee.TabHaobanQywxFee;
import com.gic.haoban.manage.service.pojo.bo.fee.HaobanQywxFeeBO;
import com.gic.haoban.manage.service.service.fee.HaobanQywxFeeService;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
......@@ -68,7 +72,9 @@ public class HaobanQywxFeeServiceImpl implements HaobanQywxFeeService {
}
@Override
public List<HaobanQywxFeeBO> listPage(QywxFeeListQDTO qywxFeeListQDTO) {
return EntityUtil.changeEntityListNew(HaobanQywxFeeBO.class,tabHaobanQywxFeeMapper.listPage(qywxFeeListQDTO));
public Page<HaobanQywxFeeBO> listPage(QywxFeeListQDTO qywxFeeListQDTO) {
PageHelper.startPage(qywxFeeListQDTO.getPageNum(),qywxFeeListQDTO.getPageSize());
List<TabHaobanQywxFee> tabHaobanQywxFees = tabHaobanQywxFeeMapper.listPage(qywxFeeListQDTO);
return PageUtil.changePageHelperToCurrentPage(new PageInfo<>(tabHaobanQywxFees), HaobanQywxFeeBO.class);
}
}
......@@ -7,7 +7,6 @@ import com.gic.commons.util.EntityUtil;
import com.gic.commons.util.UniqueIdUtils;
import com.gic.haoban.common.utils.PageUtil;
import com.gic.haoban.manage.api.constants.Manage3Constants;
import com.gic.haoban.manage.api.dto.WxEnterpriseDTO;
import com.gic.haoban.manage.api.dto.fee.HaobanQywxFeeAccountInterceptLogDTO;
import com.gic.haoban.manage.api.dto.fee.HaobanQywxFeeDTO;
import com.gic.haoban.manage.api.dto.fee.HaobanQywxFeeDetailDTO;
......@@ -24,8 +23,6 @@ import com.gic.haoban.manage.service.service.fee.*;
import com.gic.wechat.api.dto.qywx.fee.*;
import com.gic.wechat.api.dto.qywx.fee.qdto.FeeOrderListQDTO;
import com.gic.wechat.api.service.qywx.QywxUserApiService;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.apache.commons.collections.CollectionUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
......@@ -63,11 +60,11 @@ public class HaobanQywxFeeApiServiceImpl implements HaobanQywxFeeApiService {
@Override
public void insert(String param) {
List<WxEnterpriseDTO> wxEnterpriseDTOS = wxEnterpriseService.listAllEnterprise();
List<TabHaobanWxEnterprise> tabHaobanWxEnterprises = wxEnterpriseService.listAll();
String serviceCorpid = config.getCorpid();
for (WxEnterpriseDTO wxEnterpriseDTO : wxEnterpriseDTOS) {
String corpid = wxEnterpriseDTO.getCorpid();
String wxEnterpriseId = wxEnterpriseDTO.getWxEnterpriseId();
for (TabHaobanWxEnterprise wxEnterprise : tabHaobanWxEnterprises) {
String corpid = wxEnterprise.getCorpid();
String wxEnterpriseId = wxEnterprise.getWxEnterpriseId();
String autoActiveStatus = qywxUserApiService.getAutoActiveStatus(corpid, serviceCorpid);
if (!"1".equals(autoActiveStatus)) {
logger.info("未开启自动激活:{}", corpid);
......@@ -225,7 +222,7 @@ public class HaobanQywxFeeApiServiceImpl implements HaobanQywxFeeApiService {
if (haobanQywxFeeDetailDTO != null) {
TabHaobanQywxFee tabHaobanQywxFee = new TabHaobanQywxFee();
tabHaobanQywxFee.setQwFeeId(UniqueIdUtils.uniqueLong());
tabHaobanQywxFee.setCorpName(wxEnterpriseDTO.getCorpName());
tabHaobanQywxFee.setCorpName(wxEnterprise.getCorpName());
tabHaobanQywxFee.setCorpId(corpid);
tabHaobanQywxFee.setWxEnterpriseId(wxEnterpriseId);
tabHaobanQywxFee.setInterceptTime(haobanQywxFeeDetailDTO.getInterceptTime());
......@@ -240,7 +237,7 @@ public class HaobanQywxFeeApiServiceImpl implements HaobanQywxFeeApiService {
if (CollectionUtils.isNotEmpty(tabHaobanQywxFeeAccountInterceptLogs)) {
TabHaobanQywxFee tabHaobanQywxFee = new TabHaobanQywxFee();
tabHaobanQywxFee.setQwFeeId(UniqueIdUtils.uniqueLong());
tabHaobanQywxFee.setCorpName(wxEnterpriseDTO.getCorpName());
tabHaobanQywxFee.setCorpName(wxEnterprise.getCorpName());
tabHaobanQywxFee.setCorpId(corpid);
tabHaobanQywxFee.setWxEnterpriseId(wxEnterpriseId);
tabHaobanQywxFee.setInterceptTime(DateUtil.offsetDay(new Date(),-1));
......@@ -256,9 +253,8 @@ public class HaobanQywxFeeApiServiceImpl implements HaobanQywxFeeApiService {
@Override
public Page<HaobanQywxFeeDTO> listPage(QywxFeeListQDTO qywxFeeListQDTO) {
PageHelper.startPage(qywxFeeListQDTO.getPageNum(),qywxFeeListQDTO.getPageSize());
List<HaobanQywxFeeBO> haobanQywxFeeBOS = haobanQywxFeeService.listPage(qywxFeeListQDTO);
return PageUtil.changePageHelperToCurrentPage(new PageInfo<>(haobanQywxFeeBOS), HaobanQywxFeeDTO.class);
Page<HaobanQywxFeeBO> haobanQywxFeeBOS = haobanQywxFeeService.listPage(qywxFeeListQDTO);
return PageUtil.changeToCurrentPage(haobanQywxFeeBOS, HaobanQywxFeeDTO.class);
}
@Override
......
......@@ -436,9 +436,11 @@
<select id="listAll" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from tab_haoban_wx_enterprise
where status_flag = 1
a.*
from tab_haoban_wx_enterprise a
left join tab_haoban_wx_enterprise_related b on a.wx_enterprise_id = b.wx_enterprise_id
where a.status_flag = 1 and b.status_flag = 1
group by a.wx_enterprise_id
</select>
<select id="listByIds" resultMap="BaseResultMap">
......
......@@ -42,10 +42,10 @@
<if test="interceptFlag != null">
and intercept_flag = #{interceptFlag}
</if>
<if test="startDate != null">
<if test="startDate != null and startDate != ''">
and intercept_time <![CDATA[ >= ]]> #{startDate}
</if>
<if test="endDate != null">
<if test="endDate != null and endDate != ''">
and intercept_time <![CDATA[ >= ]]> #{endDate}
</if>
</where>
......
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