优化获取有效停餐记录接口,只返回今天以后的记录

This commit is contained in:
28353131@qq.com 2020-12-23 23:39:34 +08:00
parent 4064be7c50
commit ff11bbb16f
2 changed files with 3 additions and 0 deletions

View File

@ -13,6 +13,8 @@ import org.apache.ibatis.annotations.Select;
*/
public interface FtWeekMenuDaoMapper extends BaseMapper<FtWeekMenuDao> {
// 非聚合方式转换参考
// SELECT a.weekday, a.dinner_type, CONCAT(b.name ) name FROM ft_week_menu a LEFT JOIN ft_food b ON FIND_IN_SET(b.food_id,a.foods) WHERE a.weekday = '周一'
@Select("SELECT a.weekday, a.dinner_type, GROUP_CONCAT(b.name ) name FROM ft_week_menu a LEFT JOIN ft_food b ON FIND_IN_SET(b.food_id,a.foods) WHERE a.weekday = #{weekDay} GROUP BY a.dinner_type")
AjaxResult getTodayMenu(String weekDay);
}

View File

@ -97,6 +97,7 @@ public class FtOrderDaoServiceImpl extends ServiceImpl<FtOrderDaoMapper, FtOrder
public AjaxResult getAvailableStopOrder(Long staffId) {
QueryWrapper<FtStaffStopMealsDao> wrapper = new QueryWrapper<>();
wrapper.eq("staff_id", staffId);
wrapper.ge("demand_date", new Date());
return AjaxResult.success(staffStopMealsDaoMapper.selectList(wrapper));
}