员工报餐:用餐流水(订单)查看,获取截止订餐参数,获取菜品清单,获取订餐优惠比例
This commit is contained in:
parent
0de0210910
commit
9c5fc1ba2c
@ -4,6 +4,7 @@ import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.system.fantang.domain.FtConfigDao;
|
||||
import com.ruoyi.system.fantang.domain.FtFoodDao;
|
||||
import com.ruoyi.system.fantang.domain.FtOrderDao;
|
||||
import com.ruoyi.system.fantang.domain.FtStaffSubsidyDao;
|
||||
@ -48,6 +49,9 @@ public class ClientController extends BaseController {
|
||||
@Autowired
|
||||
private IFtFoodDaoService foodDaoService;
|
||||
|
||||
@Autowired
|
||||
private IFtOrderDaoService iFtOrderDaoService;
|
||||
|
||||
/**
|
||||
* 获取用餐时间信息
|
||||
* 日期:2020年12月11日
|
||||
@ -346,4 +350,49 @@ public class ClientController extends BaseController {
|
||||
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 用餐流水(订单)查看
|
||||
*/
|
||||
@GetMapping("/getStaffOrder/{staffId}")
|
||||
public AjaxResult getStaffOrder(@PathVariable Long staffId) {
|
||||
QueryWrapper<FtOrderDao> wrapper = new QueryWrapper<>();
|
||||
wrapper.eq("staff_id", staffId);
|
||||
|
||||
return AjaxResult.success(iFtOrderDaoService.list(wrapper));
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取截止订餐参数
|
||||
*/
|
||||
@GetMapping("/getStopDinnerTime")
|
||||
public AjaxResult getStopDinnerTime() {
|
||||
QueryWrapper<FtConfigDao> wrapper = new QueryWrapper<>();
|
||||
wrapper.eq("config_key", "stop_dinner");
|
||||
FtConfigDao ftConfigDao = iFtConfigDaoService.getOne(wrapper);
|
||||
|
||||
return AjaxResult.success(ftConfigDao.getConfigValue());
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取菜品清单
|
||||
*/
|
||||
@GetMapping("/getFoodList")
|
||||
public AjaxResult getFoodList() {
|
||||
QueryWrapper<FtFoodDao> wrapper = new QueryWrapper<>();
|
||||
wrapper.eq("type", 1);
|
||||
List<FtFoodDao> list = foodDaoService.list(wrapper);
|
||||
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取订餐优惠比例
|
||||
*/
|
||||
@GetMapping("/getOrderDiscount/{orderId}")
|
||||
public AjaxResult getOrderDiscount(@PathVariable Long orderId) {
|
||||
FtOrderDao ftOrderDao = orderDaoService.getById(orderId);
|
||||
|
||||
return AjaxResult.success(ftOrderDao.getDiscount());
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user