This commit is contained in:
yan.y 2025-03-14 14:56:58 +08:00
parent a982953513
commit 7f87d06ca8
8 changed files with 13 additions and 5 deletions

View File

@ -122,7 +122,7 @@ public class InitLoadDataService extends ApplicationAvailabilityBean {
/**
* 优惠券过期逻辑
*/
@Scheduled(cron = "0 0/1 * * * ?")
@Scheduled(cron = "0 0/5 * * * ?")
public void couponsExpire() {
List<UserCoupons> userCouponsList = usersCouponsRepository.findUserCouponsByLastExpireTimeLessThan(new Date());
for (UserCoupons userCoupons : userCouponsList) {

View File

@ -230,7 +230,7 @@ public class OrderMainController {
}
beOrderMain.setServiceTime(orderMain.getServiceTime());
orderMainService.save(beOrderMain);
orderMainService.updateCarOrder(orderMain.getOrderId(), orderMain.getCarId());
orderMainService.updateCarOrder(beOrderMain.getOrderId(), orderMain.getCarId());
return ResultVoUtil.SAVE_SUCCESS;
}

View File

@ -37,6 +37,7 @@ public class PetGoods implements Serializable {
private Integer weight;
// 宠物毛发
private Integer hair;
@Transient
private Integer size;
// 商品ID
private Long goodsId;

View File

@ -228,6 +228,10 @@ public class OrderMainServiceImpl implements OrderMainService {
@Override
public void updateCarOrder(String orderId, Long carId) {
CarOrder carOrder = carOrderRepository.findFirstByOrderId(orderId);
if (carOrder == null) {
carOrder = new CarOrder();
carOrder.setOrderId(orderId);
}
carOrder.setCarId(carId);
carOrderRepository.save(carOrder);
}

View File

@ -48,6 +48,9 @@ public class PetGoodsServiceImpl implements PetGoodsService {
List<PetGoods> content = petGoodsPage.getContent();
for (PetGoods petGoods : content) {
petGoods.setAssortmentDesc(petGoods.getAssortment() == 0 ? "" : InitLoadDataService.PET_BASE_INFO_MAP.get(Long.parseLong(petGoods.getAssortment().toString())).getAssortment());
if (!InitLoadDataService.GOODS_MAP.containsKey(petGoods.getGoodsId())) {
System.out.println(petGoods.getId());
}
petGoods.setGoods(InitLoadDataService.GOODS_MAP.get(petGoods.getGoodsId()));
}
return petGoodsPage;

View File

@ -62,7 +62,7 @@
laydate.render({
elem: '#serviceTime',
type: 'datetime',
format: 'yyyy-MM-dd HH'
format: 'yyyy-MM-dd HH:mm'
});
})
</script>

View File

@ -21,7 +21,7 @@
<div class="layui-form-item">
<label class="layui-form-label">宠物大小</label>
<div class="layui-input-inline">
<input class="layui-input" type="text" name="size" placeholder="请输入宠物大小" th:value="${petGoods?.size}">
<input class="layui-input" type="text" name="petSize" placeholder="请输入宠物大小" th:value="${petGoods?.petSize}">
</div>
</div>
<div class="layui-form-item">

View File

@ -21,7 +21,7 @@
<th>宠物类型</th>
<td th:text="${petGoods.petType}"></td>
<th>宠物大小</th>
<td th:text="${petGoods.size}"></td>
<td th:text="${petGoods.petSize}"></td>
</tr>
<tr>
<th>宠物体重</th>