Commit 627291cb by 墨竹

feat:企微收费列表接口

parent 043a987f
package com.gic.haoban.manage.api.dto.fee;
import java.io.Serializable;
import java.util.Date;
/**
* 企业微信收费(TabHaobanQywxFee)实体类
*
* @author mozhu
* @since 2022-08-03 16:12:30
*/
public class HaobanQywxFeeDetailDTO implements Serializable {
private static final long serialVersionUID = -65108900619188163L;
/**
* 拦截时间
*/
private Date interceptTime;
/**
* 拦截用户总数
*/
private Integer interceptUserNum;
public Date getInterceptTime() {
return interceptTime;
}
public void setInterceptTime(Date interceptTime) {
this.interceptTime = interceptTime;
}
public Integer getInterceptUserNum() {
return interceptUserNum;
}
public void setInterceptUserNum(Integer interceptUserNum) {
this.interceptUserNum = interceptUserNum;
}
}
package com.gic.haoban.manage.api.dto.qdto;
import com.gic.haoban.base.api.common.BasePageInfo;
import java.io.Serializable;
/**
* qywx qdto费用列表
*
* @author mozhu
* @date 2022-08-05 15:15:15
*/
public class QywxFeeListQDTO extends BasePageInfo implements Serializable {
private static final long serialVersionUID = 6652319673885815810L;
/**
* 场景
*/
private String corpName;
private String wxEnterpriseId;
private String corpid;
private String startDate;
private String endDate;
private Integer interceptFlag;
public String getCorpName() {
return corpName;
}
public void setCorpName(String corpName) {
this.corpName = corpName;
}
public String getWxEnterpriseId() {
return wxEnterpriseId;
}
public void setWxEnterpriseId(String wxEnterpriseId) {
this.wxEnterpriseId = wxEnterpriseId;
}
public String getCorpid() {
return corpid;
}
public void setCorpid(String corpid) {
this.corpid = corpid;
}
public String getStartDate() {
return startDate;
}
public void setStartDate(String startDate) {
this.startDate = startDate;
}
public String getEndDate() {
return endDate;
}
public void setEndDate(String endDate) {
this.endDate = endDate;
}
public Integer getInterceptFlag() {
return interceptFlag;
}
public void setInterceptFlag(Integer interceptFlag) {
this.interceptFlag = interceptFlag;
}
}
package com.gic.haoban.manage.api.service.fee; package com.gic.haoban.manage.api.service.fee;
import com.gic.api.base.commons.Page;
import com.gic.haoban.manage.api.dto.fee.HaobanQywxFeeDTO;
import com.gic.haoban.manage.api.dto.fee.HaobanQywxFeeDetailDTO;
import com.gic.haoban.manage.api.dto.qdto.QywxFeeListQDTO;
import java.util.List;
/** /**
* 企业微信收费(TabHaobanQywxFee)表服务接口 * 企业微信收费(TabHaobanQywxFee)表服务接口
* *
...@@ -18,4 +25,26 @@ public interface HaobanQywxFeeApiService { ...@@ -18,4 +25,26 @@ public interface HaobanQywxFeeApiService {
*/ */
void insert(String param); void insert(String param);
/**
* 列表页面
*
* @param qywxFeeListQDTO qywx qdto费用列表
* @return {@link Page }
* @author mozhu
* @date 2022-08-05 15:17:18
*/
Page<HaobanQywxFeeDTO> listPage(QywxFeeListQDTO qywxFeeListQDTO);
/**
* 30天拦截详情
*
* @param wxEnterpriseId wx企业标识
* @return {@link List }
* @author mozhu
* @date 2022-08-05 15:17:20
*/
List<HaobanQywxFeeDetailDTO> feeDetail(String wxEnterpriseId);
} }
...@@ -3,32 +3,67 @@ package com.gic.haoban.manage.web.controller; ...@@ -3,32 +3,67 @@ package com.gic.haoban.manage.web.controller;
import com.gic.api.base.commons.Page; import com.gic.api.base.commons.Page;
import com.gic.commons.webapi.reponse.RestResponse; import com.gic.commons.webapi.reponse.RestResponse;
import com.gic.haoban.manage.api.dto.QywxErrorLogDTO; import com.gic.haoban.manage.api.dto.QywxErrorLogDTO;
import com.gic.haoban.manage.api.dto.fee.HaobanQywxFeeDTO;
import com.gic.haoban.manage.api.dto.fee.HaobanQywxFeeDetailDTO;
import com.gic.haoban.manage.api.dto.qdto.QywxErrorLogListQDTO; import com.gic.haoban.manage.api.dto.qdto.QywxErrorLogListQDTO;
import com.gic.haoban.manage.api.dto.qdto.QywxFeeListQDTO;
import com.gic.haoban.manage.api.service.QywxErrorLogApiService; import com.gic.haoban.manage.api.service.QywxErrorLogApiService;
import com.gic.haoban.manage.api.service.fee.HaobanQywxFeeApiService;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import java.util.List;
/** /**
* @author mozhu * @author mozhu
* @date 2022/4/19 14:27 * @date 2022/4/19 14:27
*/ */
@RestController @RestController
@RequestMapping("/qywx-error") @RequestMapping("/qywx")
public class QywxErrorLogController extends WebBaseController { public class QywxManageController extends WebBaseController {
@Autowired @Autowired
private QywxErrorLogApiService qywxErrorLogApiService; private QywxErrorLogApiService qywxErrorLogApiService;
@Autowired
private HaobanQywxFeeApiService haobanQywxFeeApiService;
/** /**
* 企微报错列表 * 企微报错列表
*
* @param qywxErrorLogListQDTO * @param qywxErrorLogListQDTO
* @return * @return
*/ */
@RequestMapping(value = "qywx-error-list", method = RequestMethod.POST) @RequestMapping(value = "qywx-error-list", method = RequestMethod.POST)
public RestResponse wxEnterpriseListNew(QywxErrorLogListQDTO qywxErrorLogListQDTO) { public RestResponse qywxErrorList(QywxErrorLogListQDTO qywxErrorLogListQDTO) {
Page<QywxErrorLogDTO> qywxErrorLogDTOPage = qywxErrorLogApiService.queryListByPage(qywxErrorLogListQDTO); Page<QywxErrorLogDTO> qywxErrorLogDTOPage = qywxErrorLogApiService.queryListByPage(qywxErrorLogListQDTO);
return RestResponse.successResult(qywxErrorLogDTOPage); return RestResponse.successResult(qywxErrorLogDTOPage);
} }
/**
* 接口许可拦截管理列表
*
* @param qywxFeeListQDTO
* @return
*/
@RequestMapping(value = "qywx-fee-list", method = RequestMethod.POST)
public RestResponse qywxFeeList(@RequestBody QywxFeeListQDTO qywxFeeListQDTO) {
Page<HaobanQywxFeeDTO> listPage = haobanQywxFeeApiService.listPage(qywxFeeListQDTO);
return RestResponse.successResult(listPage);
}
/**
* 拦截查看详情
* @param wxEnterpriseId
* @return
*/
@RequestMapping(value = "qywx-fee-detail", method = RequestMethod.GET)
public RestResponse qywxFeeList(String wxEnterpriseId) {
List<HaobanQywxFeeDetailDTO> haobanQywxFeeDetailDTOS = haobanQywxFeeApiService.feeDetail(wxEnterpriseId);
return RestResponse.successResult(haobanQywxFeeDetailDTOS);
}
} }
...@@ -70,4 +70,6 @@ ...@@ -70,4 +70,6 @@
id="groupSendOperateApiService" async="true"/> id="groupSendOperateApiService" async="true"/>
<dubbo:reference interface="com.gic.haoban.manage.api.service.QywxErrorLogApiService" id="qywxErrorLogApiService"/> <dubbo:reference interface="com.gic.haoban.manage.api.service.QywxErrorLogApiService" id="qywxErrorLogApiService"/>
<dubbo:reference interface="com.gic.haoban.manage.api.service.fee.HaobanQywxFeeApiService" id="haobanQywxFeeApiService"/>
</beans> </beans>
package com.gic.haoban.manage.service.dao.mapper.fee; package com.gic.haoban.manage.service.dao.mapper.fee;
import com.gic.haoban.manage.api.dto.fee.HaobanQywxFeeDetailDTO;
import com.gic.haoban.manage.service.entity.fee.TabHaobanQywxFeeAccountStaff; import com.gic.haoban.manage.service.entity.fee.TabHaobanQywxFeeAccountStaff;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import org.springframework.data.domain.Pageable; import org.springframework.data.domain.Pageable;
...@@ -63,5 +64,14 @@ public interface TabHaobanQywxFeeAccountStaffMapper { ...@@ -63,5 +64,14 @@ public interface TabHaobanQywxFeeAccountStaffMapper {
*/ */
int deleteById(Long feeAccountId); int deleteById(Long feeAccountId);
/**
* 详情
*
* @param wxEnterpriseId wx企业标识
* @return {@link List }<{@link HaobanQywxFeeDetailDTO }>
* @author mozhu
* @date 2022-08-05 15:40:09
*/
List<HaobanQywxFeeDetailDTO> feeDetail(@Param("wxEnterpriseId") String wxEnterpriseId);
} }
package com.gic.haoban.manage.service.dao.mapper.fee; package com.gic.haoban.manage.service.dao.mapper.fee;
import com.gic.haoban.manage.api.dto.qdto.QywxFeeListQDTO;
import com.gic.haoban.manage.service.entity.fee.TabHaobanQywxFee; import com.gic.haoban.manage.service.entity.fee.TabHaobanQywxFee;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import org.springframework.data.domain.Pageable;
import java.util.List; import java.util.List;
...@@ -25,11 +25,12 @@ public interface TabHaobanQywxFeeMapper { ...@@ -25,11 +25,12 @@ public interface TabHaobanQywxFeeMapper {
/** /**
* 查询指定行数据 * 查询指定行数据
* *
* @param tabHaobanQywxFee 查询条件 * @param qywxFeeListQDTO qywx qdto费用列表
* @param pageable 分页对象 * @return {@link List }<{@link TabHaobanQywxFee }>
* @return 对象列表 * @author mozhu
* @date 2022-08-05 15:31:07
*/ */
List<TabHaobanQywxFee> queryAllByLimit(TabHaobanQywxFee tabHaobanQywxFee, @Param("pageable") Pageable pageable); List<TabHaobanQywxFee> listPage(QywxFeeListQDTO qywxFeeListQDTO);
/** /**
* 新增数据 * 新增数据
...@@ -62,6 +63,5 @@ public interface TabHaobanQywxFeeMapper { ...@@ -62,6 +63,5 @@ public interface TabHaobanQywxFeeMapper {
* @return 影响行数 * @return 影响行数
*/ */
int deleteById(Long qwFeeId); int deleteById(Long qwFeeId);
} }
package com.gic.haoban.manage.service.pojo.bo.fee;
import java.io.Serializable;
import java.util.Date;
/**
* 企业微信收费(TabHaobanQywxFee)实体类
*
* @author mozhu
* @since 2022-08-03 16:12:30
*/
public class HaobanQywxFeeBO implements Serializable {
private static final long serialVersionUID = -65108900619188163L;
private Long qwFeeId;
private String searchName;
private String wxEnterpriseId;
/**
* 拦截时间
*/
private Date interceptTime;
/**
* 拦截用户总数
*/
private Integer interceptUserNum;
/**
* 剩余可用许可
*/
private Integer permissionUserNum;
/**
* 购买许可总数
*/
private Integer buyPermissionUserNum;
/**
* 拦截:1:已拦截;0:将被拦截
*/
private Integer interceptFlag;
public Long getQwFeeId() {
return qwFeeId;
}
public void setQwFeeId(Long qwFeeId) {
this.qwFeeId = qwFeeId;
}
public String getSearchName() {
return searchName;
}
public void setSearchName(String searchName) {
this.searchName = searchName;
}
public String getWxEnterpriseId() {
return wxEnterpriseId;
}
public void setWxEnterpriseId(String wxEnterpriseId) {
this.wxEnterpriseId = wxEnterpriseId;
}
public Date getInterceptTime() {
return interceptTime;
}
public void setInterceptTime(Date interceptTime) {
this.interceptTime = interceptTime;
}
public Integer getInterceptUserNum() {
return interceptUserNum;
}
public void setInterceptUserNum(Integer interceptUserNum) {
this.interceptUserNum = interceptUserNum;
}
public Integer getPermissionUserNum() {
return permissionUserNum;
}
public void setPermissionUserNum(Integer permissionUserNum) {
this.permissionUserNum = permissionUserNum;
}
public Integer getBuyPermissionUserNum() {
return buyPermissionUserNum;
}
public void setBuyPermissionUserNum(Integer buyPermissionUserNum) {
this.buyPermissionUserNum = buyPermissionUserNum;
}
public Integer getInterceptFlag() {
return interceptFlag;
}
public void setInterceptFlag(Integer interceptFlag) {
this.interceptFlag = interceptFlag;
}
}
package com.gic.haoban.manage.service.service.fee; package com.gic.haoban.manage.service.service.fee;
import com.gic.haoban.manage.api.dto.fee.HaobanQywxFeeDetailDTO;
import com.gic.haoban.manage.service.entity.fee.TabHaobanQywxFeeAccountStaff; import com.gic.haoban.manage.service.entity.fee.TabHaobanQywxFeeAccountStaff;
import java.util.List;
/** /**
* 企业微信收费订单成员激活详情(TabHaobanQywxFeeAccountStaff)表服务接口 * 企业微信收费订单成员激活详情(TabHaobanQywxFeeAccountStaff)表服务接口
* *
...@@ -42,4 +45,15 @@ public interface HaobanQywxFeeAccountStaffService { ...@@ -42,4 +45,15 @@ public interface HaobanQywxFeeAccountStaffService {
*/ */
boolean deleteById(Long feeAccountId); boolean deleteById(Long feeAccountId);
/**
* 详情
*
* @param wxEnterpriseId wx企业标识
* @return {@link List }<{@link HaobanQywxFeeDetailDTO }>
* @author mozhu
* @date 2022-08-05 15:39:37
*/
List<HaobanQywxFeeDetailDTO> feeDetail(String wxEnterpriseId);
} }
package com.gic.haoban.manage.service.service.fee; package com.gic.haoban.manage.service.service.fee;
import com.gic.haoban.manage.api.dto.qdto.QywxFeeListQDTO;
import com.gic.haoban.manage.service.entity.fee.TabHaobanQywxFee; import com.gic.haoban.manage.service.entity.fee.TabHaobanQywxFee;
import com.gic.haoban.manage.service.pojo.bo.fee.HaobanQywxFeeBO;
import java.util.List;
/** /**
* 企业微信收费(TabHaobanQywxFee)表服务接口 * 企业微信收费(TabHaobanQywxFee)表服务接口
...@@ -16,7 +20,7 @@ public interface HaobanQywxFeeService { ...@@ -16,7 +20,7 @@ public interface HaobanQywxFeeService {
* @param qwFeeId 主键 * @param qwFeeId 主键
* @return 实例对象 * @return 实例对象
*/ */
TabHaobanQywxFee queryById(Long qwFeeId); HaobanQywxFeeBO queryById(Long qwFeeId);
/** /**
* 新增数据 * 新增数据
...@@ -24,7 +28,7 @@ public interface HaobanQywxFeeService { ...@@ -24,7 +28,7 @@ public interface HaobanQywxFeeService {
* @param tabHaobanQywxFee 实例对象 * @param tabHaobanQywxFee 实例对象
* @return 实例对象 * @return 实例对象
*/ */
TabHaobanQywxFee insert(TabHaobanQywxFee tabHaobanQywxFee); int insert(TabHaobanQywxFee tabHaobanQywxFee);
/** /**
* 修改数据 * 修改数据
...@@ -32,7 +36,7 @@ public interface HaobanQywxFeeService { ...@@ -32,7 +36,7 @@ public interface HaobanQywxFeeService {
* @param tabHaobanQywxFee 实例对象 * @param tabHaobanQywxFee 实例对象
* @return 实例对象 * @return 实例对象
*/ */
TabHaobanQywxFee update(TabHaobanQywxFee tabHaobanQywxFee); int update(TabHaobanQywxFee tabHaobanQywxFee);
/** /**
* 通过主键删除数据 * 通过主键删除数据
...@@ -42,4 +46,16 @@ public interface HaobanQywxFeeService { ...@@ -42,4 +46,16 @@ public interface HaobanQywxFeeService {
*/ */
boolean deleteById(Long qwFeeId); boolean deleteById(Long qwFeeId);
/**
* 列表页面
*
* @param qywxFeeListQDTO qywx qdto费用列表
* @return {@link List }<{@link HaobanQywxFeeBO }>
* @author mozhu
* @date 2022-08-05 15:26:45
*/
List<HaobanQywxFeeBO> listPage(QywxFeeListQDTO qywxFeeListQDTO);
} }
package com.gic.haoban.manage.service.service.fee.impl; package com.gic.haoban.manage.service.service.fee.impl;
import com.gic.haoban.manage.api.dto.fee.HaobanQywxFeeDetailDTO;
import com.gic.haoban.manage.service.dao.mapper.fee.TabHaobanQywxFeeAccountStaffMapper; import com.gic.haoban.manage.service.dao.mapper.fee.TabHaobanQywxFeeAccountStaffMapper;
import com.gic.haoban.manage.service.entity.fee.TabHaobanQywxFeeAccountStaff; import com.gic.haoban.manage.service.entity.fee.TabHaobanQywxFeeAccountStaff;
import com.gic.haoban.manage.service.service.fee.HaobanQywxFeeAccountStaffService; import com.gic.haoban.manage.service.service.fee.HaobanQywxFeeAccountStaffService;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.util.List;
/** /**
* 企业微信收费订单成员激活详情(TabHaobanQywxFeeAccountStaff)表服务实现类 * 企业微信收费订单成员激活详情(TabHaobanQywxFeeAccountStaff)表服务实现类
* *
...@@ -63,4 +66,9 @@ public class HaobanQywxFeeAccountStaffServiceImpl implements HaobanQywxFeeAccoun ...@@ -63,4 +66,9 @@ public class HaobanQywxFeeAccountStaffServiceImpl implements HaobanQywxFeeAccoun
public boolean deleteById(Long feeAccountId) { public boolean deleteById(Long feeAccountId) {
return this.tabHaobanQywxFeeAccountStaffMapper.deleteById(feeAccountId) > 0; return this.tabHaobanQywxFeeAccountStaffMapper.deleteById(feeAccountId) > 0;
} }
@Override
public List<HaobanQywxFeeDetailDTO> feeDetail(String wxEnterpriseId) {
return tabHaobanQywxFeeAccountStaffMapper.feeDetail(wxEnterpriseId);
}
} }
package com.gic.haoban.manage.service.service.fee.impl; package com.gic.haoban.manage.service.service.fee.impl;
import com.gic.commons.util.EntityUtil;
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.dao.mapper.fee.TabHaobanQywxFeeMapper;
import com.gic.haoban.manage.service.entity.fee.TabHaobanQywxFee; 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.gic.haoban.manage.service.service.fee.HaobanQywxFeeService;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.util.List;
/** /**
* 企业微信收费(TabHaobanQywxFee)表服务实现类 * 企业微信收费(TabHaobanQywxFee)表服务实现类
* *
...@@ -24,8 +29,8 @@ public class HaobanQywxFeeServiceImpl implements HaobanQywxFeeService { ...@@ -24,8 +29,8 @@ public class HaobanQywxFeeServiceImpl implements HaobanQywxFeeService {
* @return 实例对象 * @return 实例对象
*/ */
@Override @Override
public TabHaobanQywxFee queryById(Long qwFeeId) { public HaobanQywxFeeBO queryById(Long qwFeeId) {
return this.tabHaobanQywxFeeMapper.queryById(qwFeeId); return EntityUtil.changeEntityNew(HaobanQywxFeeBO.class,this.tabHaobanQywxFeeMapper.queryById(qwFeeId));
} }
...@@ -36,9 +41,8 @@ public class HaobanQywxFeeServiceImpl implements HaobanQywxFeeService { ...@@ -36,9 +41,8 @@ public class HaobanQywxFeeServiceImpl implements HaobanQywxFeeService {
* @return 实例对象 * @return 实例对象
*/ */
@Override @Override
public TabHaobanQywxFee insert(TabHaobanQywxFee tabHaobanQywxFee) { public int insert(TabHaobanQywxFee tabHaobanQywxFee) {
this.tabHaobanQywxFeeMapper.insert(tabHaobanQywxFee); return this.tabHaobanQywxFeeMapper.insert(tabHaobanQywxFee);
return tabHaobanQywxFee;
} }
/** /**
...@@ -48,9 +52,8 @@ public class HaobanQywxFeeServiceImpl implements HaobanQywxFeeService { ...@@ -48,9 +52,8 @@ public class HaobanQywxFeeServiceImpl implements HaobanQywxFeeService {
* @return 实例对象 * @return 实例对象
*/ */
@Override @Override
public TabHaobanQywxFee update(TabHaobanQywxFee tabHaobanQywxFee) { public int update(TabHaobanQywxFee tabHaobanQywxFee) {
this.tabHaobanQywxFeeMapper.update(tabHaobanQywxFee); return this.tabHaobanQywxFeeMapper.update(tabHaobanQywxFee);
return this.queryById(tabHaobanQywxFee.getQwFeeId());
} }
/** /**
...@@ -63,4 +66,9 @@ public class HaobanQywxFeeServiceImpl implements HaobanQywxFeeService { ...@@ -63,4 +66,9 @@ public class HaobanQywxFeeServiceImpl implements HaobanQywxFeeService {
public boolean deleteById(Long qwFeeId) { public boolean deleteById(Long qwFeeId) {
return this.tabHaobanQywxFeeMapper.deleteById(qwFeeId) > 0; return this.tabHaobanQywxFeeMapper.deleteById(qwFeeId) > 0;
} }
@Override
public List<HaobanQywxFeeBO> listPage(QywxFeeListQDTO qywxFeeListQDTO) {
return EntityUtil.changeEntityListNew(HaobanQywxFeeBO.class,tabHaobanQywxFeeMapper.listPage(qywxFeeListQDTO));
}
} }
package com.gic.haoban.manage.service.service.out.impl.fee; package com.gic.haoban.manage.service.service.out.impl.fee;
import cn.hutool.core.date.DateUtil; import cn.hutool.core.date.DateUtil;
import com.gic.api.base.commons.Page;
import com.gic.commons.util.UniqueIdUtils; 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.constants.Manage3Constants;
import com.gic.haoban.manage.api.dto.fee.HaobanQywxFeeDTO;
import com.gic.haoban.manage.api.dto.fee.HaobanQywxFeeDetailDTO;
import com.gic.haoban.manage.api.dto.qdto.QywxFeeListQDTO;
import com.gic.haoban.manage.api.service.fee.HaobanQywxFeeApiService; import com.gic.haoban.manage.api.service.fee.HaobanQywxFeeApiService;
import com.gic.haoban.manage.service.config.Config; import com.gic.haoban.manage.service.config.Config;
import com.gic.haoban.manage.service.entity.TabHaobanStaff; import com.gic.haoban.manage.service.entity.TabHaobanStaff;
...@@ -11,6 +16,7 @@ import com.gic.haoban.manage.service.entity.fee.TabHaobanQywxFee; ...@@ -11,6 +16,7 @@ import com.gic.haoban.manage.service.entity.fee.TabHaobanQywxFee;
import com.gic.haoban.manage.service.entity.fee.TabHaobanQywxFeeAccountStaff; import com.gic.haoban.manage.service.entity.fee.TabHaobanQywxFeeAccountStaff;
import com.gic.haoban.manage.service.entity.fee.TabHaobanQywxFeeOrder; import com.gic.haoban.manage.service.entity.fee.TabHaobanQywxFeeOrder;
import com.gic.haoban.manage.service.entity.fee.TabHaobanQywxFeeOrderAccount; import com.gic.haoban.manage.service.entity.fee.TabHaobanQywxFeeOrderAccount;
import com.gic.haoban.manage.service.pojo.bo.fee.HaobanQywxFeeBO;
import com.gic.haoban.manage.service.service.StaffService; import com.gic.haoban.manage.service.service.StaffService;
import com.gic.haoban.manage.service.service.WxEnterpriseService; import com.gic.haoban.manage.service.service.WxEnterpriseService;
import com.gic.haoban.manage.service.service.fee.HaobanQywxFeeAccountStaffService; import com.gic.haoban.manage.service.service.fee.HaobanQywxFeeAccountStaffService;
...@@ -20,6 +26,8 @@ import com.gic.haoban.manage.service.service.fee.HaobanQywxFeeService; ...@@ -20,6 +26,8 @@ import com.gic.haoban.manage.service.service.fee.HaobanQywxFeeService;
import com.gic.wechat.api.dto.qywx.fee.*; import com.gic.wechat.api.dto.qywx.fee.*;
import com.gic.wechat.api.dto.qywx.fee.qdto.FeeOrderListQDTO; import com.gic.wechat.api.dto.qywx.fee.qdto.FeeOrderListQDTO;
import com.gic.wechat.api.service.qywx.QywxUserApiService; import com.gic.wechat.api.service.qywx.QywxUserApiService;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
...@@ -210,6 +218,7 @@ public class HaobanQywxFeeApiServiceImpl implements HaobanQywxFeeApiService { ...@@ -210,6 +218,7 @@ public class HaobanQywxFeeApiServiceImpl implements HaobanQywxFeeApiService {
//更新企微状态 //更新企微状态
wxEnterpriseService.updateAutoActiveFlagById(1, wxEnterpriseId); wxEnterpriseService.updateAutoActiveFlagById(1, wxEnterpriseId);
// TODO: 2022/8/5 收费接口算法还未明确
//更新收费 //更新收费
TabHaobanQywxFee tabHaobanQywxFee = new TabHaobanQywxFee(); TabHaobanQywxFee tabHaobanQywxFee = new TabHaobanQywxFee();
tabHaobanQywxFee.setQwFeeId(UniqueIdUtils.uniqueLong()); tabHaobanQywxFee.setQwFeeId(UniqueIdUtils.uniqueLong());
...@@ -230,4 +239,16 @@ public class HaobanQywxFeeApiServiceImpl implements HaobanQywxFeeApiService { ...@@ -230,4 +239,16 @@ 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);
}
@Override
public List<HaobanQywxFeeDetailDTO> feeDetail(String wxEnterpriseId) {
return haobanQywxFeeAccountStaffService.feeDetail(wxEnterpriseId);
}
} }
...@@ -130,5 +130,15 @@ ...@@ -130,5 +130,15 @@
where fee_account_id = #{feeAccountId} where fee_account_id = #{feeAccountId}
</delete> </delete>
<select id="feeDetail" resultType="com.gic.haoban.manage.api.dto.fee.HaobanQywxFeeDetailDTO">
select
sum(staff_id) interceptUserNum,
expire_time interceptTime
from tab_haoban_qywx_fee_account_staff
where wx_enterprise_id = #{wxEnterpriseId}
and DATE_SUB(CURDATE(), INTERVAL 30 DAY) <![CDATA[ <= ]]> date(expire_time)
</select>
</mapper> </mapper>
...@@ -28,40 +28,27 @@ ...@@ -28,40 +28,27 @@
</select> </select>
<!--查询指定行数据--> <!--查询指定行数据-->
<select id="queryAllByLimit" resultMap="TabHaobanQywxFeeMap"> <select id="listPage" resultMap="TabHaobanQywxFeeMap">
select select
<include refid="Base_Column_List"/> <include refid="Base_Column_List"/>
from tab_haoban_qywx_fee from tab_haoban_qywx_fee
<where> <where>
<if test="qwFeeId != null"> <if test="searchName != null and searchName != ''">
and qw_fee_id = #{qwFeeId} and (corp_name like CONCAT('%',#{searchName},'%') or corp_id like CONCAT('%',#{searchName},'%')
</if>
<if test="corpName != null and corpName != ''">
and corp_name = #{corpName}
</if>
<if test="corpId != null and corpId != ''">
and corp_id = #{corpId}
</if> </if>
<if test="wxEnterpriseId != null and wxEnterpriseId != ''"> <if test="wxEnterpriseId != null and wxEnterpriseId != ''">
and wx_enterprise_id = #{wxEnterpriseId} and wx_enterprise_id = #{wxEnterpriseId}
</if> </if>
<if test="interceptTime != null">
and intercept_time = #{interceptTime}
</if>
<if test="interceptUserNum != null">
and intercept_user_num = #{interceptUserNum}
</if>
<if test="permissionUserNum != null">
and permission_user_num = #{permissionUserNum}
</if>
<if test="buyPermissionUserNum != null">
and buy_permission_user_num = #{buyPermissionUserNum}
</if>
<if test="interceptFlag != null"> <if test="interceptFlag != null">
and intercept_flag = #{interceptFlag} and intercept_flag = #{interceptFlag}
</if> </if>
<if test="startDate != null">
and intercept_time <![CDATA[ >= ]]> #{startDate}
</if>
<if test="endDate != null">
and intercept_time <![CDATA[ >= ]]> #{endDate}
</if>
</where> </where>
limit #{pageable.offset}, #{pageable.pageSize}
</select> </select>
......
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