计算机毕业设计选题推荐-健康饮食系统-Java/Python项目实战

作者主页:IT研究室✨
个人简介:曾从事计算机专业培训教学,擅长Java、Python、微信小程序、Golang、安卓Android等项目实战。接项目定制开发、代码讲解、答辩教学、文档编写、降重等。
☑文末获取源码☑
精彩专栏推荐⬇⬇⬇
Java项目
Python项目
安卓项目
微信小程序项目

一、前言

当前,随着健康意识的增强,人们越来越关注饮食健康。健康饮食系统作为一种新兴的工具,能够帮助用户更好地了解食物营养、制定饮食计划、监测健康状态,从而促进健康生活方式的形成。然而,现有的健康饮食管理系统功能相对单一,用户体验和个性化服务有待提升。

现有的健康饮食管理系统普遍存在一些问题,如食物信息不够清晰、健康饮食搭配方案不够个性化、健康数据管理不够系统化、用户交互性不强等,这些问题制约了用户获得有效健康饮食指导的可能性。

本课题旨在设计并实现一个个性化的健康饮食系统,通过提供丰富的食物信息、科学的健康饮食搭配、系统化的健康数据管理、便捷的饮食记录功能、以及个性化的营养需求分析,帮助用户更好地管理自己的饮食健康。

在健康饮食系统中,管理人员负责系统关键数据和信息的维护与管理,包括用户账户的创建与维护、食物信息的录入与更新、公告信息的发布与管理、健康饮食搭配方案的制定与优化、健康数据的收集与分析、饮食记录的审核与监管、以及用户营养需求的调查与管理;用户则能够查看各类食物的详细信息、获取系统推荐的健康饮食搭配信息、记录自己的身体健康数据、管理个人的饮食记录、以及根据自身情况记录营养需求。系统通过这些功能模块的整合,旨在为用户提供个性化、科学的健康饮食指导和服务。

本课题的研究具有重要的理论意义和实际意义。从理论角度来看,它为健康管理领域提供了新的研究思路,即如何利用信息技术提升健康饮食管理的科学性和个性化水平。从实际角度来看,健康饮食系统的应用将促进健康生活方式的普及,提高人们的健康意识和生活质量,同时为健康管理服务提供商提供新的服务模式和增长点。此外,系统的推广应用还将有助于减少因不良饮食习惯导致的健康问题,降低医疗成本,具有重要的社会价值。

二、开发环境

  • 开发语言:Java/Python
  • 数据库:MySQL
  • 系统架构:B/S
  • 后端:SpringBoot/SSM/Django/Flask
  • 前端:Vue

三、系统界面展示

  • 健康饮食系统界面展示:
    管理员-食物信息管理:
    管理员-食物信息管理
    管理员-健康饮食搭配管理:
    管理员-健康饮食搭配管理
    管理员-健康数据管理:
    管理员-健康数据管理
    管理员-饮食记录管理:
    管理员-饮食记录管理
    管理员-营养需求管理:
    管理员-营养需求管理
    用户-记录身体健康数据:
    用户-记录身体健康数据
    用户-记录饮食记录:
    用户-记录饮食记录
    用户-记录营养需求:
    用户-记录营养需求

四、代码参考

  • 项目实战代码参考:
@RestController
@RequestMapping("/yinshishipu")
public class YinshishipuController {
    @Autowired
    private YinshishipuService yinshishipuService;

    @Autowired
    private StoreupService storeupService;



    


    /**
     * 后端列表
     */
    @RequestMapping("/page")
    public R page(@RequestParam Map<String, Object> params,YinshishipuEntity yinshishipu,
		HttpServletRequest request){
        EntityWrapper<YinshishipuEntity> ew = new EntityWrapper<YinshishipuEntity>();

		PageUtils page = yinshishipuService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, yinshishipu), params), params));

        return R.ok().put("data", page);
    }
    
    /**
     * 前端列表
     */
	@IgnoreAuth
    @RequestMapping("/list")
    public R list(@RequestParam Map<String, Object> params,YinshishipuEntity yinshishipu, 
		HttpServletRequest request){
        EntityWrapper<YinshishipuEntity> ew = new EntityWrapper<YinshishipuEntity>();

		PageUtils page = yinshishipuService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, yinshishipu), params), params));
        return R.ok().put("data", page);
    }

	/**
     * 列表
     */
    @RequestMapping("/lists")
    public R list( YinshishipuEntity yinshishipu){
       	EntityWrapper<YinshishipuEntity> ew = new EntityWrapper<YinshishipuEntity>();
      	ew.allEq(MPUtil.allEQMapPre( yinshishipu, "yinshishipu")); 
        return R.ok().put("data", yinshishipuService.selectListView(ew));
    }

	 /**
     * 查询
     */
    @RequestMapping("/query")
    public R query(YinshishipuEntity yinshishipu){
        EntityWrapper< YinshishipuEntity> ew = new EntityWrapper< YinshishipuEntity>();
 		ew.allEq(MPUtil.allEQMapPre( yinshishipu, "yinshishipu")); 
		YinshishipuView yinshishipuView =  yinshishipuService.selectView(ew);
		return R.ok("查询饮食食谱成功").put("data", yinshishipuView);
    }
	
    /**
     * 后端详情
     */
    @RequestMapping("/info/{id}")
    public R info(@PathVariable("id") Long id){
        YinshishipuEntity yinshishipu = yinshishipuService.selectById(id);
		yinshishipu.setClicknum(yinshishipu.getClicknum()+1);
		yinshishipu.setClicktime(new Date());
		yinshishipuService.updateById(yinshishipu);
        return R.ok().put("data", yinshishipu);
    }

    /**
     * 前端详情
     */
	@IgnoreAuth
    @RequestMapping("/detail/{id}")
    public R detail(@PathVariable("id") Long id){
        YinshishipuEntity yinshishipu = yinshishipuService.selectById(id);
		yinshishipu.setClicknum(yinshishipu.getClicknum()+1);
		yinshishipu.setClicktime(new Date());
		yinshishipuService.updateById(yinshishipu);
        return R.ok().put("data", yinshishipu);
    }
    


    /**
     * 赞或踩
     */
    @RequestMapping("/thumbsup/{id}")
    public R vote(@PathVariable("id") String id,String type){
        YinshishipuEntity yinshishipu = yinshishipuService.selectById(id);
        if(type.equals("1")) {
        	yinshishipu.setThumbsupnum(yinshishipu.getThumbsupnum()+1);
        } else {
        	yinshishipu.setCrazilynum(yinshishipu.getCrazilynum()+1);
        }
        yinshishipuService.updateById(yinshishipu);
        return R.ok("投票成功");
    }

    /**
     * 后端保存
     */
    @RequestMapping("/save")
    public R save(@RequestBody YinshishipuEntity yinshishipu, HttpServletRequest request){
    	//ValidatorUtils.validateEntity(yinshishipu);
        yinshishipuService.insert(yinshishipu);
        return R.ok();
    }
    
    /**
     * 前端保存
     */
    @RequestMapping("/add")
    public R add(@RequestBody YinshishipuEntity yinshishipu, HttpServletRequest request){
    	//ValidatorUtils.validateEntity(yinshishipu);
        yinshishipuService.insert(yinshishipu);
        return R.ok();
    }



    /**
     * 修改
     */
    @RequestMapping("/update")
    @Transactional
    public R update(@RequestBody YinshishipuEntity yinshishipu, HttpServletRequest request){
        //ValidatorUtils.validateEntity(yinshishipu);
        yinshishipuService.updateById(yinshishipu);//全部更新
        return R.ok();
    }



    

    /**
     * 删除
     */
    @RequestMapping("/delete")
    public R delete(@RequestBody Long[] ids){
        yinshishipuService.deleteBatchIds(Arrays.asList(ids));
        return R.ok();
    }
    
	
	/**
     * 前端智能排序
     */
	@IgnoreAuth
    @RequestMapping("/autoSort")
    public R autoSort(@RequestParam Map<String, Object> params,YinshishipuEntity yinshishipu, HttpServletRequest request,String pre){
        EntityWrapper<YinshishipuEntity> ew = new EntityWrapper<YinshishipuEntity>();
        Map<String, Object> newMap = new HashMap<String, Object>();
        Map<String, Object> param = new HashMap<String, Object>();
		Iterator<Map.Entry<String, Object>> it = param.entrySet().iterator();
		while (it.hasNext()) {
			Map.Entry<String, Object> entry = it.next();
			String key = entry.getKey();
			String newKey = entry.getKey();
			if (pre.endsWith(".")) {
				newMap.put(pre + newKey, entry.getValue());
			} else if (StringUtils.isEmpty(pre)) {
				newMap.put(newKey, entry.getValue());
			} else {
				newMap.put(pre + "." + newKey, entry.getValue());
			}
		}
		params.put("sort", "clicknum");
        params.put("order", "desc");
		PageUtils page = yinshishipuService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, yinshishipu), params), params));
        return R.ok().put("data", page);
    }


    /**
     * 协同算法(按收藏推荐)
     */
    @RequestMapping("/autoSort2")
    public R autoSort2(@RequestParam Map<String, Object> params,YinshishipuEntity yinshishipu, HttpServletRequest request){
        String userId = request.getSession().getAttribute("userId").toString();
        String inteltypeColumn = "shipufenlei";
        List<StoreupEntity> storeups = storeupService.selectList(new EntityWrapper<StoreupEntity>().eq("type", 1).eq("userid", userId).eq("tablename", "yinshishipu").orderBy("addtime", false));
        List<String> inteltypes = new ArrayList<String>();
        Integer limit = params.get("limit")==null?10:Integer.parseInt(params.get("limit").toString());
        List<YinshishipuEntity> yinshishipuList = new ArrayList<YinshishipuEntity>();
        //去重
        if(storeups!=null && storeups.size()>0) {
            for(StoreupEntity s : storeups) {
                yinshishipuList.addAll(yinshishipuService.selectList(new EntityWrapper<YinshishipuEntity>().eq(inteltypeColumn, s.getInteltype())));
            }
        }
        EntityWrapper<YinshishipuEntity> ew = new EntityWrapper<YinshishipuEntity>();
        params.put("sort", "id");
        params.put("order", "desc");
        PageUtils page = yinshishipuService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, yinshishipu), params), params));
        List<YinshishipuEntity> pageList = (List<YinshishipuEntity>)page.getList();
        if(yinshishipuList.size()<limit) {
            int toAddNum = (limit-yinshishipuList.size())<=pageList.size()?(limit-yinshishipuList.size()):pageList.size();
            for(YinshishipuEntity o1 : pageList) {
                boolean addFlag = true;
                for(YinshishipuEntity o2 : yinshishipuList) {
                    if(o1.getId().intValue()==o2.getId().intValue()) {
                        addFlag = false;
                        break;
                    }
                }
                if(addFlag) {
                    yinshishipuList.add(o1);
                    if(--toAddNum==0) break;
                }
            }
        } else if(yinshishipuList.size()>limit) {
            yinshishipuList = yinshishipuList.subList(0, limit);
        }
        page.setList(yinshishipuList);
        return R.ok().put("data", page);
    }








}
@RestController
@RequestMapping("/shicaiyaoxiaoku")
public class ShicaiyaoxiaokuController {
    @Autowired
    private ShicaiyaoxiaokuService shicaiyaoxiaokuService;

    @Autowired
    private StoreupService storeupService;



    


    /**
     * 后端列表
     */
    @RequestMapping("/page")
    public R page(@RequestParam Map<String, Object> params,ShicaiyaoxiaokuEntity shicaiyaoxiaoku,
		HttpServletRequest request){
        EntityWrapper<ShicaiyaoxiaokuEntity> ew = new EntityWrapper<ShicaiyaoxiaokuEntity>();

		PageUtils page = shicaiyaoxiaokuService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, shicaiyaoxiaoku), params), params));

        return R.ok().put("data", page);
    }
    
    /**
     * 前端列表
     */
	@IgnoreAuth
    @RequestMapping("/list")
    public R list(@RequestParam Map<String, Object> params,ShicaiyaoxiaokuEntity shicaiyaoxiaoku, 
		HttpServletRequest request){
        EntityWrapper<ShicaiyaoxiaokuEntity> ew = new EntityWrapper<ShicaiyaoxiaokuEntity>();

		PageUtils page = shicaiyaoxiaokuService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, shicaiyaoxiaoku), params), params));
        return R.ok().put("data", page);
    }

	/**
     * 列表
     */
    @RequestMapping("/lists")
    public R list( ShicaiyaoxiaokuEntity shicaiyaoxiaoku){
       	EntityWrapper<ShicaiyaoxiaokuEntity> ew = new EntityWrapper<ShicaiyaoxiaokuEntity>();
      	ew.allEq(MPUtil.allEQMapPre( shicaiyaoxiaoku, "shicaiyaoxiaoku")); 
        return R.ok().put("data", shicaiyaoxiaokuService.selectListView(ew));
    }

	 /**
     * 查询
     */
    @RequestMapping("/query")
    public R query(ShicaiyaoxiaokuEntity shicaiyaoxiaoku){
        EntityWrapper< ShicaiyaoxiaokuEntity> ew = new EntityWrapper< ShicaiyaoxiaokuEntity>();
 		ew.allEq(MPUtil.allEQMapPre( shicaiyaoxiaoku, "shicaiyaoxiaoku")); 
		ShicaiyaoxiaokuView shicaiyaoxiaokuView =  shicaiyaoxiaokuService.selectView(ew);
		return R.ok("查询食材药效库成功").put("data", shicaiyaoxiaokuView);
    }
	
    /**
     * 后端详情
     */
    @RequestMapping("/info/{id}")
    public R info(@PathVariable("id") Long id){
        ShicaiyaoxiaokuEntity shicaiyaoxiaoku = shicaiyaoxiaokuService.selectById(id);
		shicaiyaoxiaoku.setClicknum(shicaiyaoxiaoku.getClicknum()+1);
		shicaiyaoxiaoku.setClicktime(new Date());
		shicaiyaoxiaokuService.updateById(shicaiyaoxiaoku);
        return R.ok().put("data", shicaiyaoxiaoku);
    }

    /**
     * 前端详情
     */
	@IgnoreAuth
    @RequestMapping("/detail/{id}")
    public R detail(@PathVariable("id") Long id){
        ShicaiyaoxiaokuEntity shicaiyaoxiaoku = shicaiyaoxiaokuService.selectById(id);
		shicaiyaoxiaoku.setClicknum(shicaiyaoxiaoku.getClicknum()+1);
		shicaiyaoxiaoku.setClicktime(new Date());
		shicaiyaoxiaokuService.updateById(shicaiyaoxiaoku);
        return R.ok().put("data", shicaiyaoxiaoku);
    }
    


    /**
     * 赞或踩
     */
    @RequestMapping("/thumbsup/{id}")
    public R vote(@PathVariable("id") String id,String type){
        ShicaiyaoxiaokuEntity shicaiyaoxiaoku = shicaiyaoxiaokuService.selectById(id);
        if(type.equals("1")) {
        	shicaiyaoxiaoku.setThumbsupnum(shicaiyaoxiaoku.getThumbsupnum()+1);
        } else {
        	shicaiyaoxiaoku.setCrazilynum(shicaiyaoxiaoku.getCrazilynum()+1);
        }
        shicaiyaoxiaokuService.updateById(shicaiyaoxiaoku);
        return R.ok("投票成功");
    }

    /**
     * 后端保存
     */
    @RequestMapping("/save")
    public R save(@RequestBody ShicaiyaoxiaokuEntity shicaiyaoxiaoku, HttpServletRequest request){
    	//ValidatorUtils.validateEntity(shicaiyaoxiaoku);
        shicaiyaoxiaokuService.insert(shicaiyaoxiaoku);
        return R.ok();
    }
    
    /**
     * 前端保存
     */
    @RequestMapping("/add")
    public R add(@RequestBody ShicaiyaoxiaokuEntity shicaiyaoxiaoku, HttpServletRequest request){
    	//ValidatorUtils.validateEntity(shicaiyaoxiaoku);
        shicaiyaoxiaokuService.insert(shicaiyaoxiaoku);
        return R.ok();
    }



    /**
     * 修改
     */
    @RequestMapping("/update")
    @Transactional
    public R update(@RequestBody ShicaiyaoxiaokuEntity shicaiyaoxiaoku, HttpServletRequest request){
        //ValidatorUtils.validateEntity(shicaiyaoxiaoku);
        shicaiyaoxiaokuService.updateById(shicaiyaoxiaoku);//全部更新
        return R.ok();
    }



    

    /**
     * 删除
     */
    @RequestMapping("/delete")
    public R delete(@RequestBody Long[] ids){
        shicaiyaoxiaokuService.deleteBatchIds(Arrays.asList(ids));
        return R.ok();
    }
    
	
	/**
     * 前端智能排序
     */
	@IgnoreAuth
    @RequestMapping("/autoSort")
    public R autoSort(@RequestParam Map<String, Object> params,ShicaiyaoxiaokuEntity shicaiyaoxiaoku, HttpServletRequest request,String pre){
        EntityWrapper<ShicaiyaoxiaokuEntity> ew = new EntityWrapper<ShicaiyaoxiaokuEntity>();
        Map<String, Object> newMap = new HashMap<String, Object>();
        Map<String, Object> param = new HashMap<String, Object>();
		Iterator<Map.Entry<String, Object>> it = param.entrySet().iterator();
		while (it.hasNext()) {
			Map.Entry<String, Object> entry = it.next();
			String key = entry.getKey();
			String newKey = entry.getKey();
			if (pre.endsWith(".")) {
				newMap.put(pre + newKey, entry.getValue());
			} else if (StringUtils.isEmpty(pre)) {
				newMap.put(newKey, entry.getValue());
			} else {
				newMap.put(pre + "." + newKey, entry.getValue());
			}
		}
		params.put("sort", "clicknum");
        params.put("order", "desc");
		PageUtils page = shicaiyaoxiaokuService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, shicaiyaoxiaoku), params), params));
        return R.ok().put("data", page);
    }






    /**
     * (按值统计)
     */
    @RequestMapping("/value/{xColumnName}/{yColumnName}")
    public R value(@PathVariable("yColumnName") String yColumnName, @PathVariable("xColumnName") String xColumnName,HttpServletRequest request) {
        Map<String, Object> params = new HashMap<String, Object>();
        params.put("xColumn", xColumnName);
        params.put("yColumn", yColumnName);
        EntityWrapper<ShicaiyaoxiaokuEntity> ew = new EntityWrapper<ShicaiyaoxiaokuEntity>();
        List<Map<String, Object>> result = shicaiyaoxiaokuService.selectValue(params, ew);
        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
        for(Map<String, Object> m : result) {
            for(String k : m.keySet()) {
                if(m.get(k) instanceof Date) {
                    m.put(k, sdf.format((Date)m.get(k)));
                }
            }
        }
        return R.ok().put("data", result);
    }

    /**
     * (按值统计(多))
     */
    @RequestMapping("/valueMul/{xColumnName}")
    public R valueMul(@PathVariable("xColumnName") String xColumnName,@RequestParam String yColumnNameMul, HttpServletRequest request) {
        String[] yColumnNames = yColumnNameMul.split(",");
        Map<String, Object> params = new HashMap<String, Object>();
        params.put("xColumn", xColumnName);
        List<List<Map<String, Object>>> result2 = new ArrayList<List<Map<String,Object>>>();
        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
        EntityWrapper<ShicaiyaoxiaokuEntity> ew = new EntityWrapper<ShicaiyaoxiaokuEntity>();
        for(int i=0;i<yColumnNames.length;i++) {
            params.put("yColumn", yColumnNames[i]);
            List<Map<String, Object>> result = shicaiyaoxiaokuService.selectValue(params, ew);
            for(Map<String, Object> m : result) {
                for(String k : m.keySet()) {
                    if(m.get(k) instanceof Date) {
                        m.put(k, sdf.format((Date)m.get(k)));
                    }
                }
            }
            result2.add(result);
        }
        return R.ok().put("data", result2);
    }

    /**
     * (按值统计)时间统计类型
     */
    @RequestMapping("/value/{xColumnName}/{yColumnName}/{timeStatType}")
    public R valueDay(@PathVariable("yColumnName") String yColumnName, @PathVariable("xColumnName") String xColumnName, @PathVariable("timeStatType") String timeStatType,HttpServletRequest request) {
        Map<String, Object> params = new HashMap<String, Object>();
        params.put("xColumn", xColumnName);
        params.put("yColumn", yColumnName);
        params.put("timeStatType", timeStatType);
        EntityWrapper<ShicaiyaoxiaokuEntity> ew = new EntityWrapper<ShicaiyaoxiaokuEntity>();
        List<Map<String, Object>> result = shicaiyaoxiaokuService.selectTimeStatValue(params, ew);
        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
        for(Map<String, Object> m : result) {
            for(String k : m.keySet()) {
                if(m.get(k) instanceof Date) {
                    m.put(k, sdf.format((Date)m.get(k)));
                }
            }
        }
        return R.ok().put("data", result);
    }

    /**
     * (按值统计)时间统计类型(多)
     */
    @RequestMapping("/valueMul/{xColumnName}/{timeStatType}")
    public R valueMulDay(@PathVariable("xColumnName") String xColumnName, @PathVariable("timeStatType") String timeStatType,@RequestParam String yColumnNameMul,HttpServletRequest request) {
        String[] yColumnNames = yColumnNameMul.split(",");
        Map<String, Object> params = new HashMap<String, Object>();
        params.put("xColumn", xColumnName);
        params.put("timeStatType", timeStatType);
        List<List<Map<String, Object>>> result2 = new ArrayList<List<Map<String,Object>>>();
        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
        EntityWrapper<ShicaiyaoxiaokuEntity> ew = new EntityWrapper<ShicaiyaoxiaokuEntity>();
        for(int i=0;i<yColumnNames.length;i++) {
            params.put("yColumn", yColumnNames[i]);
            List<Map<String, Object>> result = shicaiyaoxiaokuService.selectTimeStatValue(params, ew);
            for(Map<String, Object> m : result) {
                for(String k : m.keySet()) {
                    if(m.get(k) instanceof Date) {
                        m.put(k, sdf.format((Date)m.get(k)));
                    }
                }
            }
            result2.add(result);
        }
        return R.ok().put("data", result2);
    }

    /**
     * 分组统计
     */
    @RequestMapping("/group/{columnName}")
    public R group(@PathVariable("columnName") String columnName,HttpServletRequest request) {
        Map<String, Object> params = new HashMap<String, Object>();
        params.put("column", columnName);
        EntityWrapper<ShicaiyaoxiaokuEntity> ew = new EntityWrapper<ShicaiyaoxiaokuEntity>();
        List<Map<String, Object>> result = shicaiyaoxiaokuService.selectGroup(params, ew);
        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
        for(Map<String, Object> m : result) {
            for(String k : m.keySet()) {
                if(m.get(k) instanceof Date) {
                    m.put(k, sdf.format((Date)m.get(k)));
                }
            }
        }
        return R.ok().put("data", result);
    }







}
@RestController
@RequestMapping("/discussyingyangzhishi")
public class DiscussyingyangzhishiController {
    @Autowired
    private DiscussyingyangzhishiService discussyingyangzhishiService;




    


    /**
     * 后端列表
     */
    @RequestMapping("/page")
    public R page(@RequestParam Map<String, Object> params,DiscussyingyangzhishiEntity discussyingyangzhishi,
		HttpServletRequest request){
        EntityWrapper<DiscussyingyangzhishiEntity> ew = new EntityWrapper<DiscussyingyangzhishiEntity>();

		PageUtils page = discussyingyangzhishiService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, discussyingyangzhishi), params), params));

        return R.ok().put("data", page);
    }
    
    /**
     * 前端列表
     */
	@IgnoreAuth
    @RequestMapping("/list")
    public R list(@RequestParam Map<String, Object> params,DiscussyingyangzhishiEntity discussyingyangzhishi, 
		HttpServletRequest request){
        EntityWrapper<DiscussyingyangzhishiEntity> ew = new EntityWrapper<DiscussyingyangzhishiEntity>();

		PageUtils page = discussyingyangzhishiService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, discussyingyangzhishi), params), params));
        return R.ok().put("data", page);
    }

	/**
     * 列表
     */
    @RequestMapping("/lists")
    public R list( DiscussyingyangzhishiEntity discussyingyangzhishi){
       	EntityWrapper<DiscussyingyangzhishiEntity> ew = new EntityWrapper<DiscussyingyangzhishiEntity>();
      	ew.allEq(MPUtil.allEQMapPre( discussyingyangzhishi, "discussyingyangzhishi")); 
        return R.ok().put("data", discussyingyangzhishiService.selectListView(ew));
    }

	 /**
     * 查询
     */
    @RequestMapping("/query")
    public R query(DiscussyingyangzhishiEntity discussyingyangzhishi){
        EntityWrapper< DiscussyingyangzhishiEntity> ew = new EntityWrapper< DiscussyingyangzhishiEntity>();
 		ew.allEq(MPUtil.allEQMapPre( discussyingyangzhishi, "discussyingyangzhishi")); 
		DiscussyingyangzhishiView discussyingyangzhishiView =  discussyingyangzhishiService.selectView(ew);
		return R.ok("查询营养知识评论表成功").put("data", discussyingyangzhishiView);
    }
	
    /**
     * 后端详情
     */
    @RequestMapping("/info/{id}")
    public R info(@PathVariable("id") Long id){
        DiscussyingyangzhishiEntity discussyingyangzhishi = discussyingyangzhishiService.selectById(id);
        return R.ok().put("data", discussyingyangzhishi);
    }

    /**
     * 前端详情
     */
	@IgnoreAuth
    @RequestMapping("/detail/{id}")
    public R detail(@PathVariable("id") Long id){
        DiscussyingyangzhishiEntity discussyingyangzhishi = discussyingyangzhishiService.selectById(id);
        return R.ok().put("data", discussyingyangzhishi);
    }
    



    /**
     * 后端保存
     */
    @RequestMapping("/save")
    public R save(@RequestBody DiscussyingyangzhishiEntity discussyingyangzhishi, HttpServletRequest request){
    	//ValidatorUtils.validateEntity(discussyingyangzhishi);
        discussyingyangzhishiService.insert(discussyingyangzhishi);
        return R.ok();
    }
    
    /**
     * 前端保存
     */
    @RequestMapping("/add")
    public R add(@RequestBody DiscussyingyangzhishiEntity discussyingyangzhishi, HttpServletRequest request){
    	//ValidatorUtils.validateEntity(discussyingyangzhishi);
        discussyingyangzhishiService.insert(discussyingyangzhishi);
        return R.ok();
    }



    /**
     * 修改
     */
    @RequestMapping("/update")
    @Transactional
    public R update(@RequestBody DiscussyingyangzhishiEntity discussyingyangzhishi, HttpServletRequest request){
        //ValidatorUtils.validateEntity(discussyingyangzhishi);
        discussyingyangzhishiService.updateById(discussyingyangzhishi);//全部更新
        return R.ok();
    }



    

    /**
     * 删除
     */
    @RequestMapping("/delete")
    public R delete(@RequestBody Long[] ids){
        discussyingyangzhishiService.deleteBatchIds(Arrays.asList(ids));
        return R.ok();
    }
    
	
	/**
     * 前端智能排序
     */
	@IgnoreAuth
    @RequestMapping("/autoSort")
    public R autoSort(@RequestParam Map<String, Object> params,DiscussyingyangzhishiEntity discussyingyangzhishi, HttpServletRequest request,String pre){
        EntityWrapper<DiscussyingyangzhishiEntity> ew = new EntityWrapper<DiscussyingyangzhishiEntity>();
        Map<String, Object> newMap = new HashMap<String, Object>();
        Map<String, Object> param = new HashMap<String, Object>();
		Iterator<Map.Entry<String, Object>> it = param.entrySet().iterator();
		while (it.hasNext()) {
			Map.Entry<String, Object> entry = it.next();
			String key = entry.getKey();
			String newKey = entry.getKey();
			if (pre.endsWith(".")) {
				newMap.put(pre + newKey, entry.getValue());
			} else if (StringUtils.isEmpty(pre)) {
				newMap.put(newKey, entry.getValue());
			} else {
				newMap.put(pre + "." + newKey, entry.getValue());
			}
		}
		params.put("sort", "clicktime");
        params.put("order", "desc");
		PageUtils page = discussyingyangzhishiService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, discussyingyangzhishi), params), params));
        return R.ok().put("data", page);
    }










}

五、论文参考

  • 计算机毕业设计选题推荐-健康饮食系统论文参考:
    计算机毕业设计选题推荐-健康饮食系统论文参考

六、系统视频

健康饮食系统项目视频:

计算机毕业设计选题推荐-健康饮食系统-Java/Python

结语

计算机毕业设计选题推荐-健康饮食系统-Java/Python项目实战
大家可以帮忙点赞、收藏、关注、评论啦~
源码获取:⬇⬇⬇

精彩专栏推荐⬇⬇⬇
Java项目
Python项目
安卓项目
微信小程序项目

  • 5
    点赞
  • 6
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

IT研究室

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值