外食计算优化,添加详情功能

This commit is contained in:
xiezhijun
2021-02-23 15:35:50 +08:00
parent 473ccef008
commit c1a937adf4
12 changed files with 382 additions and 82 deletions

View File

@ -6,14 +6,7 @@ import com.stdiet.custom.domain.SysCustomerHeatStatistics;
import com.stdiet.custom.service.ISysCustomerHeatStatisticsService;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;
import com.stdiet.common.annotation.Log;
import com.stdiet.common.core.controller.BaseController;
import com.stdiet.common.core.domain.AjaxResult;
@ -111,4 +104,14 @@ public class SysFoodHeatStatisticsController extends BaseController
{
return toAjax(sysCustomerHeatStatisticsService.calculateCustomerHeat(sysCustomerHeatStatistics));
}
/**
* 查看外食热量统计详细信息
*/
@PreAuthorize("@ss.hasPermi('custom:foodHeatStatistics:query')")
@GetMapping(value = "/getNutritionalCalories")
public AjaxResult getNutritionalCalories(@RequestParam("id") Long id)
{
return AjaxResult.success(sysCustomerHeatStatisticsService.getNutritionalCaloriesByCustomerHeatId(id));
}
}