|
|
@@ -30,19 +30,19 @@ import com.fs.course.config.RedPacketConfig;
|
|
|
import com.fs.course.domain.FsCourseRedPacketLog;
|
|
|
import com.fs.course.mapper.FsCourseRedPacketLogMapper;
|
|
|
import com.fs.course.service.IFsCourseRedPacketLogService;
|
|
|
-import com.fs.his.config.FsSysConfig;
|
|
|
import com.fs.his.domain.FsUser;
|
|
|
import com.fs.his.domain.FsUserWx;
|
|
|
import com.fs.his.service.IFsUserService;
|
|
|
import com.fs.his.service.IFsUserWxService;
|
|
|
import com.fs.his.utils.ConfigUtil;
|
|
|
-import com.fs.his.utils.HttpUtil;
|
|
|
+import com.fs.hisStore.enums.StatTypeEnum;
|
|
|
import com.fs.hisStore.enums.SysConfigEnum;
|
|
|
import com.fs.hisStore.param.*;
|
|
|
+import com.fs.hisStore.vo.FsStoreScanPaymentStatVo;
|
|
|
import com.fs.huifuPay.domain.HuiFuCreateOrder;
|
|
|
import com.fs.huifuPay.domain.HuifuCreateOrderResult;
|
|
|
+import com.fs.huifuPay.sdk.opps.core.utils.ObjectUtils;
|
|
|
import com.fs.huifuPay.service.HuiFuService;
|
|
|
-import com.fs.pay.pay.config.PayConfig;
|
|
|
import com.fs.pay.pay.dto.WxJspayDTO;
|
|
|
import com.fs.hisStore.vo.FsStorePaymentStatisticsVO;
|
|
|
import com.fs.system.oss.CloudStorageService;
|
|
|
@@ -64,8 +64,6 @@ import com.github.binarywang.wxpay.exception.WxPayException;
|
|
|
import com.github.binarywang.wxpay.service.TransferService;
|
|
|
import com.github.binarywang.wxpay.service.WxPayService;
|
|
|
import com.github.binarywang.wxpay.service.impl.WxPayServiceImpl;
|
|
|
-import com.google.common.reflect.TypeToken;
|
|
|
-import com.google.gson.Gson;
|
|
|
import me.chanjar.weixin.common.error.WxErrorException;
|
|
|
import org.slf4j.Logger;
|
|
|
import org.slf4j.LoggerFactory;
|
|
|
@@ -896,4 +894,36 @@ public class FsStorePaymentScrmServiceImpl implements IFsStorePaymentScrmService
|
|
|
return R.error(result.getResp_desc());
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public R getScanPaymentStat(FsStoreScanPaymentStatParam param) {
|
|
|
+ //验证类型是否错误
|
|
|
+ if (!StatTypeEnum.isValid(param.getStatType())) {
|
|
|
+ return R.error("操作失败,无效的统计类型!有效类型为:" + StatTypeEnum.getAllValidTypes());
|
|
|
+ }
|
|
|
+
|
|
|
+ StatTypeEnum statTypeEnum = param.toStatTypeEnum();
|
|
|
+ FsStoreScanPaymentStatVo paymentStatVo = null;
|
|
|
+ switch (statTypeEnum) {
|
|
|
+ case DAY://日
|
|
|
+ paymentStatVo = fsStorePaymentMapper.getScanPaymentDayStat(param);
|
|
|
+ break;
|
|
|
+ case MONTH://月
|
|
|
+ paymentStatVo = fsStorePaymentMapper.getScanPaymentMonthStat(param);
|
|
|
+ break;
|
|
|
+ case YEAR://年
|
|
|
+ paymentStatVo = fsStorePaymentMapper.getScanPaymentYearStat(param);
|
|
|
+ break;
|
|
|
+ case DATE://日期
|
|
|
+ if(StringUtils.isEmpty(param.getStartDate())){
|
|
|
+ return R.error("操作失败,开始日期不能为空!");
|
|
|
+ }else if(StringUtils.isEmpty(param.getEndDate())){
|
|
|
+ return R.error("操作失败,结日期不能为空!");
|
|
|
+ }
|
|
|
+ paymentStatVo = fsStorePaymentMapper.getScanPaymentDateStat(param);
|
|
|
+ break;
|
|
|
+ }
|
|
|
+
|
|
|
+ return R.ok("操作成功!").put("data", paymentStatVo);
|
|
|
+ }
|
|
|
}
|