优化菜谱接口,获取某一天的菜谱

This commit is contained in:
28353131@qq.com 2020-12-23 23:29:53 +08:00
parent d903c4ebe5
commit 4064be7c50

View File

@ -240,10 +240,10 @@ public class ClientController extends BaseController {
* return
*/
@GetMapping("/getTodayMenu")
public AjaxResult getTodayMenu() {
public AjaxResult getTodayMenu(@RequestBody JSONObject params) {
String[] weekDays = { "周日", "周一", "周二", "周三", "周四", "周五", "周六" };
Calendar cal = Calendar.getInstance();
cal.setTime(new Date());
cal.setTime(params.getDate("date"));
int w = cal.get(Calendar.DAY_OF_WEEK) - 1;
if (w < 0)
w = 0;