优化
This commit is contained in:
@ -1,5 +1,6 @@
|
|||||||
package cn.iocoder.yudao.module.member.job;
|
package cn.iocoder.yudao.module.member.job;
|
||||||
|
|
||||||
|
import cn.hutool.core.util.StrUtil;
|
||||||
import cn.iocoder.yudao.framework.quartz.core.handler.JobHandler;
|
import cn.iocoder.yudao.framework.quartz.core.handler.JobHandler;
|
||||||
import cn.iocoder.yudao.framework.tenant.core.aop.TenantIgnore;
|
import cn.iocoder.yudao.framework.tenant.core.aop.TenantIgnore;
|
||||||
import cn.iocoder.yudao.module.member.controller.admin.storeorder.vo.StoreOrderCountVO;
|
import cn.iocoder.yudao.module.member.controller.admin.storeorder.vo.StoreOrderCountVO;
|
||||||
@ -46,13 +47,20 @@ public class StoreOrderCountJob implements JobHandler {
|
|||||||
public String execute(String param) throws Exception {
|
public String execute(String param) throws Exception {
|
||||||
try {
|
try {
|
||||||
List<Long> allStoreId = businessMapper.getAllStoreId();
|
List<Long> allStoreId = businessMapper.getAllStoreId();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// 获取当前日期
|
// 获取当前日期
|
||||||
LocalDate currentDate = LocalDate.now();
|
LocalDate currentDate = LocalDate.now();
|
||||||
|
// 定义日期格式化器
|
||||||
|
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyyMMdd");
|
||||||
|
if(StrUtil.isNotBlank(param)){
|
||||||
|
currentDate = LocalDate.parse(param, formatter);
|
||||||
|
}
|
||||||
|
|
||||||
// 获取前一天的日期
|
// 获取前一天的日期
|
||||||
LocalDate previousDate = currentDate.minusDays(1);
|
LocalDate previousDate = currentDate.minusDays(1);
|
||||||
|
|
||||||
// 定义日期格式化器
|
|
||||||
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyyMMdd");
|
|
||||||
// 将前一天的日期格式化为字符串
|
// 将前一天的日期格式化为字符串
|
||||||
String formattedDate = previousDate.format(formatter);
|
String formattedDate = previousDate.format(formatter);
|
||||||
|
|
||||||
|
@ -301,7 +301,7 @@ public class DiningPlatesServiceImpl implements DiningPlatesService {
|
|||||||
dishOrderDO.setFaceData(faceUrl);
|
dishOrderDO.setFaceData(faceUrl);
|
||||||
dishOrderMapper.updateById(dishOrderDO);
|
dishOrderMapper.updateById(dishOrderDO);
|
||||||
}
|
}
|
||||||
asyncService.saveFace(faceData,faceUrl);
|
// asyncService.saveFace(faceData,faceUrl);
|
||||||
|
|
||||||
diningPlatesMapper.updateById(diningPlatesDO);
|
diningPlatesMapper.updateById(diningPlatesDO);
|
||||||
AppUserInfoCardVO data = new AppUserInfoCardVO();
|
AppUserInfoCardVO data = new AppUserInfoCardVO();
|
||||||
|
@ -111,7 +111,12 @@ public class StoreSaleGoodsServiceImpl implements StoreSaleGoodsService {
|
|||||||
Boolean b = true;
|
Boolean b = true;
|
||||||
if (CollectionUtil.isNotEmpty(dto.getEquipmentGoodsCustoms())) {
|
if (CollectionUtil.isNotEmpty(dto.getEquipmentGoodsCustoms())) {
|
||||||
ArrayList<StoreSaleGoodsDO> list = new ArrayList<>();
|
ArrayList<StoreSaleGoodsDO> list = new ArrayList<>();
|
||||||
|
List<Integer> goodsIds = new ArrayList<>();
|
||||||
for (StoreGoodsDto storeGoodsDto : dto.getEquipmentGoodsCustoms()) {
|
for (StoreGoodsDto storeGoodsDto : dto.getEquipmentGoodsCustoms()) {
|
||||||
|
if(goodsIds.contains(storeGoodsDto.getGoodsId())){
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
goodsIds.add(storeGoodsDto.getGoodsId());
|
||||||
StoreSaleGoodsDO storeSaleGoodsDO = new StoreSaleGoodsDO();
|
StoreSaleGoodsDO storeSaleGoodsDO = new StoreSaleGoodsDO();
|
||||||
BeanUtil.copyProperties(storeGoodsDto, storeSaleGoodsDO);
|
BeanUtil.copyProperties(storeGoodsDto, storeSaleGoodsDO);
|
||||||
storeSaleGoodsDO.setEquipmentCode(dto.getEquipmentCode());
|
storeSaleGoodsDO.setEquipmentCode(dto.getEquipmentCode());
|
||||||
|
Reference in New Issue
Block a user