项目下单时增加项目单价和项目数量字段,并打开部分定时功能

This commit is contained in:
曹磊 2024-06-27 10:58:00 +08:00
parent 39a759a984
commit d4256454a9
5 changed files with 16 additions and 2 deletions

View File

@ -334,6 +334,7 @@ public class ArtificerController {
}
// @Scheduled(cron = "0 */1 * * * ?")
@Scheduled(cron = "0 2/5 * * * ?")
public void endOrders(){
ordersService.endOrders();
}

View File

@ -358,6 +358,16 @@ public class Orders implements Serializable {
*/
private String jsTsbz;
/**
* 项目单价
*/
private BigDecimal massagePrice;
/**
* 项目数量
*/
private Integer massageNum;
/**
* 项目名称
*/

View File

@ -354,6 +354,8 @@ public class OrdersServiceImpl extends ServiceImpl<OrdersDao, Orders> implements
BigDecimal artificerPrice = new BigDecimal("0.00");
for (OrdersMassage ordersMassage : ordersMassageList) {
orders.setMassagePrice(massageType.getPrice());
orders.setMassageNum(ordersMassage.getNum());
price = massageType.getPrice().multiply(BigDecimal.valueOf(ordersMassage.getNum()));
BigDecimal massagePrice = price.multiply(orders.getTechnicianRate()).divide(new BigDecimal(100)).add(price);//技师等级加成金额
massagePrice = massagePrice.multiply(orders.getVipRate()).divide(new BigDecimal(100));//会员优惠后金额
@ -5507,6 +5509,7 @@ public class OrdersServiceImpl extends ServiceImpl<OrdersDao, Orders> implements
}
// @Scheduled(cron = "0 */1 * * * ?")
@Scheduled(cron = "0 1/5 * * * ?")
public void updateOrdersWarning() {
String value = commonInfoService.findOne(376).getValue();
baseMapper.updateOrdersWarning(value);

View File

@ -44,7 +44,7 @@ public class AppCouponUserController extends AbstractController {
}
//将所有超过失效时间的优惠券改为失效状态
// @Scheduled(cron = "0 */1 * * * ?", zone = "Asia/Shanghai")
@Scheduled(cron = "0 */1 * * * ?", zone = "Asia/Shanghai")
public void couponEnd(){
couponUserService.updateExpiration();
}

View File

@ -61,7 +61,7 @@ public class AllTaskServiceImpl implements AllTaskSercice {
* A0,A1,A2,A3,A4,A5等
*/
// @Scheduled(cron = "0 0 0 * * ?")
@Scheduled(cron = "0 * * * * ?")
// @Scheduled(cron = "0 * * * * ?")
public void upgradeJishi() {
System.out.println("------------计算技师升级规则-----------");
//1.获取全部参与积分规则的技师