|
@@ -13,7 +13,7 @@ import com.alibaba.fastjson.JSON;
|
|
|
import com.fs.common.core.domain.R;
|
|
import com.fs.common.core.domain.R;
|
|
|
import com.fs.common.utils.DateUtils;
|
|
import com.fs.common.utils.DateUtils;
|
|
|
import com.fs.common.utils.StringUtils;
|
|
import com.fs.common.utils.StringUtils;
|
|
|
-import com.fs.company.cache.ICompanyDeptCacheService;
|
|
|
|
|
|
|
+
|
|
|
import com.fs.company.domain.Company;
|
|
import com.fs.company.domain.Company;
|
|
|
import com.fs.company.domain.CompanyMoneyLogs;
|
|
import com.fs.company.domain.CompanyMoneyLogs;
|
|
|
import com.fs.company.domain.CompanyRedPacketBalanceLogs;
|
|
import com.fs.company.domain.CompanyRedPacketBalanceLogs;
|
|
@@ -34,6 +34,7 @@ import com.fs.his.domain.FsUser;
|
|
|
import com.fs.his.mapper.FsUserMapper;
|
|
import com.fs.his.mapper.FsUserMapper;
|
|
|
import com.fs.his.param.WxSendRedPacketParam;
|
|
import com.fs.his.param.WxSendRedPacketParam;
|
|
|
import com.fs.his.service.IFsStorePaymentService;
|
|
import com.fs.his.service.IFsStorePaymentService;
|
|
|
|
|
+import com.fs.his.utils.PhoneUtil;
|
|
|
import com.fs.system.service.ISysConfigService;
|
|
import com.fs.system.service.ISysConfigService;
|
|
|
import com.github.binarywang.wxpay.bean.transfer.QueryTransferBatchesRequest;
|
|
import com.github.binarywang.wxpay.bean.transfer.QueryTransferBatchesRequest;
|
|
|
import com.github.binarywang.wxpay.bean.transfer.QueryTransferBatchesResult;
|
|
import com.github.binarywang.wxpay.bean.transfer.QueryTransferBatchesResult;
|
|
@@ -45,6 +46,7 @@ import com.github.binarywang.wxpay.service.TransferService;
|
|
|
import com.github.binarywang.wxpay.service.WxPayService;
|
|
import com.github.binarywang.wxpay.service.WxPayService;
|
|
|
import com.github.binarywang.wxpay.service.impl.WxPayServiceImpl;
|
|
import com.github.binarywang.wxpay.service.impl.WxPayServiceImpl;
|
|
|
import com.github.pagehelper.PageHelper;
|
|
import com.github.pagehelper.PageHelper;
|
|
|
|
|
+import com.github.pagehelper.PageInfo;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
import org.slf4j.Logger;
|
|
import org.slf4j.Logger;
|
|
|
import org.slf4j.LoggerFactory;
|
|
import org.slf4j.LoggerFactory;
|
|
@@ -75,8 +77,6 @@ public class FsCourseRedPacketLogServiceImpl implements IFsCourseRedPacketLogSer
|
|
|
@Autowired
|
|
@Autowired
|
|
|
private ISysConfigService configService;
|
|
private ISysConfigService configService;
|
|
|
@Autowired
|
|
@Autowired
|
|
|
- private ICompanyDeptCacheService companyDeptCacheService;
|
|
|
|
|
- @Autowired
|
|
|
|
|
private CompanyRedPacketBalanceLogsMapper companyRedPacketBalanceLogsMapper;
|
|
private CompanyRedPacketBalanceLogsMapper companyRedPacketBalanceLogsMapper;
|
|
|
/**
|
|
/**
|
|
|
* 查询短链课程看课记录
|
|
* 查询短链课程看课记录
|
|
@@ -186,20 +186,30 @@ public class FsCourseRedPacketLogServiceImpl implements IFsCourseRedPacketLogSer
|
|
|
@Override
|
|
@Override
|
|
|
public List<FsCourseRedPacketLogListPVO> selectFsCourseRedPacketLogListVO(FsCourseRedPacketLogParam fsCourseRedPacketLog) {
|
|
public List<FsCourseRedPacketLogListPVO> selectFsCourseRedPacketLogListVO(FsCourseRedPacketLogParam fsCourseRedPacketLog) {
|
|
|
List<FsCourseRedPacketLogListPVO> list = fsCourseRedPacketLogMapper.selectFsCourseRedPacketLogListVO(fsCourseRedPacketLog);
|
|
List<FsCourseRedPacketLogListPVO> list = fsCourseRedPacketLogMapper.selectFsCourseRedPacketLogListVO(fsCourseRedPacketLog);
|
|
|
- // 应用到每个对象
|
|
|
|
|
- if(CollectionUtil.isNotEmpty(list)){
|
|
|
|
|
- list.forEach(item -> {
|
|
|
|
|
- if(item.getDeptId() != null) {
|
|
|
|
|
- String deptNameById = companyDeptCacheService.getDeptNameById(item.getDeptId());
|
|
|
|
|
- if(StringUtils.isNotBlank(deptNameById)) {
|
|
|
|
|
- item.setDeptName(deptNameById);
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- });
|
|
|
|
|
|
|
+ if (CollectionUtil.isNotEmpty(list)) {
|
|
|
|
|
+ list.forEach(item -> item.setPhone(PhoneUtil.decryptAutoPhoneMk(item.getPhone())));
|
|
|
}
|
|
}
|
|
|
return list;
|
|
return list;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ @Override
|
|
|
|
|
+ public PageInfo<FsCourseRedPacketLogListPVO> selectFsCourseRedPacketLogListVOPage(FsCourseRedPacketLogParam param) {
|
|
|
|
|
+ // 快速COUNT:只查主表,走索引
|
|
|
|
|
+ long total = fsCourseRedPacketLogMapper.selectFsCourseRedPacketLogListVOCount(param);
|
|
|
|
|
+ // 延迟JOIN数据查询:内层子查询只取10条ID,外层只JOIN 10条
|
|
|
|
|
+ List<FsCourseRedPacketLogListPVO> list = fsCourseRedPacketLogMapper.selectFsCourseRedPacketLogListVOPage(param);
|
|
|
|
|
+ if (CollectionUtil.isNotEmpty(list)) {
|
|
|
|
|
+ list.forEach(item -> item.setPhone(PhoneUtil.decryptAutoPhoneMk(item.getPhone())));
|
|
|
|
|
+ }
|
|
|
|
|
+ // 手动构建PageInfo(兼容前端字段)
|
|
|
|
|
+ PageInfo<FsCourseRedPacketLogListPVO> pageInfo = new PageInfo<>(list);
|
|
|
|
|
+ pageInfo.setTotal(total);
|
|
|
|
|
+ pageInfo.setPageNum(param.getPageNum() != null ? param.getPageNum() : 1);
|
|
|
|
|
+ pageInfo.setPageSize(param.getPageSize() != null ? param.getPageSize() : 10);
|
|
|
|
|
+ pageInfo.setPages((int) Math.ceil((double) total / pageInfo.getPageSize()));
|
|
|
|
|
+ return pageInfo;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
@Override
|
|
@Override
|
|
|
public List<FsCourseRedPacketLogListPVO> selectFsCourseRedPacketLogListVONew(FsCourseRedPacketLogParam fsCourseRedPacketLog) {
|
|
public List<FsCourseRedPacketLogListPVO> selectFsCourseRedPacketLogListVONew(FsCourseRedPacketLogParam fsCourseRedPacketLog) {
|
|
|
return fsCourseRedPacketLogMapper.selectFsCourseRedPacketLogListVONew(fsCourseRedPacketLog);
|
|
return fsCourseRedPacketLogMapper.selectFsCourseRedPacketLogListVONew(fsCourseRedPacketLog);
|