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() {
|
public void couponsExpire() {
|
||||||
List<UserCoupons> userCouponsList = usersCouponsRepository.findUserCouponsByLastExpireTimeLessThan(new Date());
|
List<UserCoupons> userCouponsList = usersCouponsRepository.findUserCouponsByLastExpireTimeLessThan(new Date());
|
||||||
for (UserCoupons userCoupons : userCouponsList) {
|
for (UserCoupons userCoupons : userCouponsList) {
|
||||||
|
|
|
||||||
|
|
@ -230,7 +230,7 @@ public class OrderMainController {
|
||||||
}
|
}
|
||||||
beOrderMain.setServiceTime(orderMain.getServiceTime());
|
beOrderMain.setServiceTime(orderMain.getServiceTime());
|
||||||
orderMainService.save(beOrderMain);
|
orderMainService.save(beOrderMain);
|
||||||
orderMainService.updateCarOrder(orderMain.getOrderId(), orderMain.getCarId());
|
orderMainService.updateCarOrder(beOrderMain.getOrderId(), orderMain.getCarId());
|
||||||
return ResultVoUtil.SAVE_SUCCESS;
|
return ResultVoUtil.SAVE_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -37,6 +37,7 @@ public class PetGoods implements Serializable {
|
||||||
private Integer weight;
|
private Integer weight;
|
||||||
// 宠物毛发
|
// 宠物毛发
|
||||||
private Integer hair;
|
private Integer hair;
|
||||||
|
@Transient
|
||||||
private Integer size;
|
private Integer size;
|
||||||
// 商品ID
|
// 商品ID
|
||||||
private Long goodsId;
|
private Long goodsId;
|
||||||
|
|
|
||||||
|
|
@ -228,6 +228,10 @@ public class OrderMainServiceImpl implements OrderMainService {
|
||||||
@Override
|
@Override
|
||||||
public void updateCarOrder(String orderId, Long carId) {
|
public void updateCarOrder(String orderId, Long carId) {
|
||||||
CarOrder carOrder = carOrderRepository.findFirstByOrderId(orderId);
|
CarOrder carOrder = carOrderRepository.findFirstByOrderId(orderId);
|
||||||
|
if (carOrder == null) {
|
||||||
|
carOrder = new CarOrder();
|
||||||
|
carOrder.setOrderId(orderId);
|
||||||
|
}
|
||||||
carOrder.setCarId(carId);
|
carOrder.setCarId(carId);
|
||||||
carOrderRepository.save(carOrder);
|
carOrderRepository.save(carOrder);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -48,6 +48,9 @@ public class PetGoodsServiceImpl implements PetGoodsService {
|
||||||
List<PetGoods> content = petGoodsPage.getContent();
|
List<PetGoods> content = petGoodsPage.getContent();
|
||||||
for (PetGoods petGoods : content) {
|
for (PetGoods petGoods : content) {
|
||||||
petGoods.setAssortmentDesc(petGoods.getAssortment() == 0 ? "无" : InitLoadDataService.PET_BASE_INFO_MAP.get(Long.parseLong(petGoods.getAssortment().toString())).getAssortment());
|
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()));
|
petGoods.setGoods(InitLoadDataService.GOODS_MAP.get(petGoods.getGoodsId()));
|
||||||
}
|
}
|
||||||
return petGoodsPage;
|
return petGoodsPage;
|
||||||
|
|
|
||||||
|
|
@ -62,7 +62,7 @@
|
||||||
laydate.render({
|
laydate.render({
|
||||||
elem: '#serviceTime',
|
elem: '#serviceTime',
|
||||||
type: 'datetime',
|
type: 'datetime',
|
||||||
format: 'yyyy-MM-dd HH'
|
format: 'yyyy-MM-dd HH:mm'
|
||||||
});
|
});
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,7 @@
|
||||||
<div class="layui-form-item">
|
<div class="layui-form-item">
|
||||||
<label class="layui-form-label">宠物大小</label>
|
<label class="layui-form-label">宠物大小</label>
|
||||||
<div class="layui-input-inline">
|
<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>
|
</div>
|
||||||
<div class="layui-form-item">
|
<div class="layui-form-item">
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,7 @@
|
||||||
<th>宠物类型</th>
|
<th>宠物类型</th>
|
||||||
<td th:text="${petGoods.petType}"></td>
|
<td th:text="${petGoods.petType}"></td>
|
||||||
<th>宠物大小</th>
|
<th>宠物大小</th>
|
||||||
<td th:text="${petGoods.size}"></td>
|
<td th:text="${petGoods.petSize}"></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th>宠物体重</th>
|
<th>宠物体重</th>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue