This commit is contained in:
parent
a982953513
commit
7f87d06ca8
|
|
@ -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) {
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -37,6 +37,7 @@ public class PetGoods implements Serializable {
|
|||
private Integer weight;
|
||||
// 宠物毛发
|
||||
private Integer hair;
|
||||
@Transient
|
||||
private Integer size;
|
||||
// 商品ID
|
||||
private Long goodsId;
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -62,7 +62,7 @@
|
|||
laydate.render({
|
||||
elem: '#serviceTime',
|
||||
type: 'datetime',
|
||||
format: 'yyyy-MM-dd HH'
|
||||
format: 'yyyy-MM-dd HH:mm'
|
||||
});
|
||||
})
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -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">
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
Loading…
Reference in New Issue