bug--修复后台近七天统计数
This commit is contained in:
@ -60,7 +60,6 @@ import java.util.List;
|
||||
public class AuthService {
|
||||
|
||||
private final YxUserService userService;
|
||||
private final RedisUtils redisUtil;
|
||||
private final RedisUtils redisUtils;
|
||||
private static Integer expiredTimeIn;
|
||||
|
||||
@ -86,8 +85,8 @@ public class AuthService {
|
||||
String spread = loginParam.getSpread();
|
||||
try {
|
||||
//读取redis配置
|
||||
String appId = redisUtil.getY(ShopKeyUtils.getWxAppAppId());
|
||||
String secret = redisUtil.getY(ShopKeyUtils.getWxAppSecret());
|
||||
String appId = redisUtils.getY(ShopKeyUtils.getWxAppAppId());
|
||||
String secret = redisUtils.getY(ShopKeyUtils.getWxAppSecret());
|
||||
if (StrUtil.isBlank(appId) || StrUtil.isBlank(secret)) {
|
||||
throw new YshopException("请先配置小程序");
|
||||
}
|
||||
|
@ -1162,6 +1162,7 @@ public class YxStoreOrderServiceImpl extends BaseServiceImpl<StoreOrderMapper, Y
|
||||
Date today = DateUtil.beginOfDay(new Date());
|
||||
Date yesterday = DateUtil.beginOfDay(DateUtil.yesterday());
|
||||
Date nowMonth = DateUtil.beginOfMonth(new Date());
|
||||
Date lastWeek = DateUtil.beginOfDay(DateUtil.lastWeek());
|
||||
|
||||
ShoperOrderTimeDataVo orderTimeDataVo = new ShoperOrderTimeDataVo();
|
||||
|
||||
@ -1196,6 +1197,17 @@ public class YxStoreOrderServiceImpl extends BaseServiceImpl<StoreOrderMapper, Y
|
||||
//本月订单数
|
||||
orderTimeDataVo.setMonthCount(yxStoreOrderMapper.selectCount(wrapperThree));
|
||||
|
||||
//上周成交额
|
||||
QueryWrapper<YxStoreOrder> wrapperLastWeek = new QueryWrapper<>();
|
||||
wrapperLastWeek.lambda()
|
||||
.lt(YxStoreOrder::getPayTime,today)
|
||||
.ge(YxStoreOrder::getPayTime,lastWeek)
|
||||
.eq(YxStoreOrder::getPaid,OrderInfoEnum.PAY_STATUS_1.getValue())
|
||||
.eq(YxStoreOrder::getRefundStatus,OrderInfoEnum.REFUND_STATUS_0.getValue());
|
||||
orderTimeDataVo.setLastWeekPrice(yxStoreOrderMapper.todayPrice(wrapperLastWeek));
|
||||
//上周订单数
|
||||
orderTimeDataVo.setLastWeekCount(yxStoreOrderMapper.selectCount(wrapperLastWeek));
|
||||
|
||||
|
||||
return orderTimeDataVo;
|
||||
}
|
||||
|
@ -11,10 +11,28 @@ import java.io.Serializable;
|
||||
**/
|
||||
@Data
|
||||
public class ShoperOrderTimeDataVo implements Serializable {
|
||||
private Double todayPrice; //今日成交额
|
||||
private Integer todayCount; //今日订单数
|
||||
private Double proPrice; //昨日成交额
|
||||
private Integer proCount;//昨日订单数
|
||||
private Double monthPrice;//本月成交额
|
||||
private Integer monthCount;//本月订单数
|
||||
|
||||
/**今日成交额*/
|
||||
private Double todayPrice;
|
||||
|
||||
/**今日订单数*/
|
||||
private Integer todayCount;
|
||||
|
||||
/**昨日成交额*/
|
||||
private Double proPrice;
|
||||
|
||||
/**昨日订单数*/
|
||||
private Integer proCount;
|
||||
|
||||
/**本月成交额*/
|
||||
private Double monthPrice;
|
||||
|
||||
/**本月订单数*/
|
||||
private Integer monthCount;
|
||||
|
||||
/**上周订单数*/
|
||||
private Integer lastWeekCount;
|
||||
|
||||
/**上周成交额*/
|
||||
private Double lastWeekPrice;
|
||||
}
|
||||
|
@ -16,6 +16,7 @@ import co.yixiang.tools.service.dto.LocalStorageDto;
|
||||
import co.yixiang.tools.service.dto.LocalStorageQueryCriteria;
|
||||
import co.yixiang.tools.service.mapper.LocalStorageMapper;
|
||||
import co.yixiang.utils.FileUtil;
|
||||
import co.yixiang.utils.SecurityUtils;
|
||||
import co.yixiang.utils.StringUtils;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
@ -101,7 +102,7 @@ public class LocalStorageServiceImpl extends BaseServiceImpl<LocalStorageMapper,
|
||||
file.getPath(),
|
||||
type,
|
||||
FileUtil.getSize(multipartFile.getSize()),
|
||||
"yshop"
|
||||
SecurityUtils.getUsername()
|
||||
);
|
||||
this.save(localStorage);
|
||||
return generator.convert(localStorage,LocalStorageDto.class);
|
||||
|
Reference in New Issue
Block a user