优化员工自动报餐sql,增加计算最新价格

This commit is contained in:
czx 2020-12-10 17:57:56 +08:00
parent cb8614201d
commit 89d06362a7

View File

@ -12,6 +12,6 @@ import org.apache.ibatis.annotations.Insert;
*/
public interface FtOrderDaoMapper extends BaseMapper<FtOrderDao> {
@Insert("insert into ft_order (order_type, staff_id, order_src, create_at, order_date) select type as order_type, b.staff_id, 1 as order_src, now() as create_at, date_add(now(), interval 1 day) as order_date from ft_staff_demand b where b.demand_mode = 1")
@Insert("insert into ft_order (order_type, staff_id, order_src, create_at, order_date, order_list, total_price) select type as order_type, staff_id, 1 as order_src, now() as create_at, date_add(now(), interval 1 day) as order_date, foods, (select sum(price) from ft_food f where FIND_IN_SET(f.food_id,d.foods)) as price from ft_staff_demand d where d.demand_mode = 1")
void GenerateStaffTomorrowOrder();
}