基于SSM+Vue家庭美食食谱管理系统Java健康食谱安排系统(源码调试+讲解+文档)

💕💕作者:计算机源码社
💕💕个人简介:本人七年开发经验,擅长Java、微信小程序、Python、Android等,大家有这一块的问题可以一起交流!
💕💕学习资料、程序开发、技术解答、代码讲解、文档报告

1、绪论

1.1 项目背景

  随着网络不断的普及发展,家庭食谱管理系统依靠网络技术的支持得到了快速的发展,首先要从用户的实际需求出发,通过了解用户的需求开发出具有针对性的首页、个人中心、用户管理、食谱分类管理、食谱信息管理、一周食谱健康安排管理、材料信息管理、美食论坛、系统管理功能,利用目前网络给用户带来的方便快捷这一特点对系统进行调整,设计的系统让用户的使用起来更加方便,本系统的主要目的就是给用户带来快捷与高效、安全,用户只要在家中就可以进行操作。同时随着电子商务的发展家庭食谱管理系统已经受到广大用户的关注。

1.2 项目现状

  随着国内经济形势的不断发展,中国互联网进入了一个难得的高峰发展时期,这使得中外资本家纷纷转向互联网市场。 然而,许多管理领域的不合理结构,人员不足以及管理需求的增加使得更多的人具备了互联网管理的意识。
  在当今高度发达的信息中,信息管理改革已成为一种更加广泛和全面的趋势。美食食谱管理系统是基于Mysql数据库,在SSM程序设计的基础上实现的。为确保中国经济的持续发展,信息时代日益更新,更是蓬勃发展。同时,随着信息社会的快速发展,即动运动网站设计面临着越来越多的信息,因此很难获得他们对高效信息的需求,如何使用方便快捷的方式使查询者在广阔的海洋信息中查询,存储,管理和共享信息方面有效,对我们的工作和生活具有重要的现实意义。因此,国内外学术界对此进行了深入而广泛的研究,一个新的研究领域——家庭美食食谱管理系统设计诞生了。

2、核心功能模块

2.1 系统用例分析

  基于SSM+Vue的家庭美食食谱管理系统采用Java语言,B/S的结构,同时也使用JavaWeb技术在动态页面上进行了设计,后台上采用Mysql数据库。家庭食谱管理系统的主要使用者分为管理员和用户这两大部分。通过本美食食谱管理系统可以提高管理食谱安排的效率,减少出错率,对于数据存储及查找有了更方便的操作。美食食谱管理系统的主要实现功能包括:

  ①管理员模块:系统中的核心用户是管理员,管理员登录后,通过管理员功能来管理后台系统。主要功能有:首页、个人中心、用户管理、食谱分类管理、食谱信息管理、一周食谱健康安排管理、材料信息管理、美食论坛、系统管理等功能。


image.png

  ②用户:首页、个人中心、我的收藏管理、美食论坛,前台首页;首页、食谱信息、一周食谱健康安排、材料信息、美食论坛、公告信息、个人中心、后台管理。


image.png

2.2 系统功能结构图

image.png

2.3 文档报告目录

image.png
image.png

3、项目页面展示

QQ截图20220928132823.png
QQ截图20220928132835.png
QQ截图20220928132848.png
QQ截图20220928132859.png
QQ截图20220928132906.png
QQ截图20220928132915.png
QQ截图20220928132924.png
QQ截图20220928132946.png
QQ截图20220928133000.png

4、 核心代码

/**
 * 食谱信息
 * 后端接口
 */
@RestController
@RequestMapping("/shipuxinxi")
public class ShipuxinxiController {
    @Autowired
    private ShipuxinxiService shipuxinxiService;
    


    /**
     * 后端美食食谱列表
     */
    @RequestMapping("/page")
    public R page(@RequestParam Map<String, Object> params,ShipuxinxiEntity shipuxinxi, HttpServletRequest request){

        EntityWrapper<ShipuxinxiEntity> ew = new EntityWrapper<ShipuxinxiEntity>();
        PageUtils page = shipuxinxiService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, shipuxinxi), params), params));
        return R.ok().put("data", page);
    }
    
    /**
     * 前端美食食谱列表
     */
    @IgnoreAuth
    @RequestMapping("/list")
    public R list(@RequestParam Map<String, Object> params,ShipuxinxiEntity shipuxinxi, HttpServletRequest request){
        EntityWrapper<ShipuxinxiEntity> ew = new EntityWrapper<ShipuxinxiEntity>();
        PageUtils page = shipuxinxiService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, shipuxinxi), params), params));
        return R.ok().put("data", page);
    }

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

     /**
     * 查询美食食谱
     */
    @RequestMapping("/query")
    public R query(ShipuxinxiEntity shipuxinxi){
        EntityWrapper< ShipuxinxiEntity> ew = new EntityWrapper< ShipuxinxiEntity>();
        ew.allEq(MPUtil.allEQMapPre( shipuxinxi, "shipuxinxi")); 
        ShipuxinxiView shipuxinxiView =  shipuxinxiService.selectView(ew);
        return R.ok("查询食谱信息成功").put("data", shipuxinxiView);
    }
    
    /**
     * 后端美食食谱详情
     */
    @RequestMapping("/info/{id}")
    public R info(@PathVariable("id") Long id){
        ShipuxinxiEntity shipuxinxi = shipuxinxiService.selectById(id);
        shipuxinxi.setClicknum(shipuxinxi.getClicknum()+1);
        shipuxinxi.setClicktime(new Date());
        shipuxinxiService.updateById(shipuxinxi);
        return R.ok().put("data", shipuxinxi);
    }

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


    /**
     * 赞或踩
     */
    @RequestMapping("/thumbsup/{id}")
    public R thumbsup(@PathVariable("id") String id,String type){
        ShipuxinxiEntity shipuxinxi = shipuxinxiService.selectById(id);
        if(type.equals("1")) {
            shipuxinxi.setThumbsupnum(shipuxinxi.getThumbsupnum()+1);
        } else {
            shipuxinxi.setCrazilynum(shipuxinxi.getCrazilynum()+1);
        }
        shipuxinxiService.updateById(shipuxinxi);
        return R.ok();
    }

    /**
     * 后端保存美食食谱
     */
    @RequestMapping("/save")
    public R save(@RequestBody ShipuxinxiEntity shipuxinxi, HttpServletRequest request){
        shipuxinxi.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
        //ValidatorUtils.validateEntity(shipuxinxi);

        shipuxinxiService.insert(shipuxinxi);
        return R.ok();
    }
    
    /**
     * 前端保存美食食谱
     */
    @RequestMapping("/add")
    public R add(@RequestBody ShipuxinxiEntity shipuxinxi, HttpServletRequest request){
        shipuxinxi.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
        //ValidatorUtils.validateEntity(shipuxinxi);

        shipuxinxiService.insert(shipuxinxi);
        return R.ok();
    }

    /**
     * 修改美食食谱
     */
    @RequestMapping("/update")
    public R update(@RequestBody ShipuxinxiEntity shipuxinxi, HttpServletRequest request){
        //ValidatorUtils.validateEntity(shipuxinxi);
        shipuxinxiService.updateById(shipuxinxi);//全部更新
        return R.ok();
    }
    

    /**
     * 删除美食食谱
     */
    @RequestMapping("/delete")
    public R delete(@RequestBody Long[] ids){
        shipuxinxiService.deleteBatchIds(Arrays.asList(ids));
        return R.ok();
    }
    
    /**
     * 美食食谱提醒接口
     */
    @RequestMapping("/remind/{columnName}/{type}")
    public R remindCount(@PathVariable("columnName") String columnName, HttpServletRequest request, 
                         @PathVariable("type") String type,@RequestParam Map<String, Object> map) {
        map.put("column", columnName);
        map.put("type", type);
        
        if(type.equals("2")) {
            SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
            Calendar c = Calendar.getInstance();
            Date remindStartDate = null;
            Date remindEndDate = null;
            if(map.get("remindstart")!=null) {
                Integer remindStart = Integer.parseInt(map.get("remindstart").toString());
                c.setTime(new Date()); 
                c.add(Calendar.DAY_OF_MONTH,remindStart);
                remindStartDate = c.getTime();
                map.put("remindstart", sdf.format(remindStartDate));
            }
            if(map.get("remindend")!=null) {
                Integer remindEnd = Integer.parseInt(map.get("remindend").toString());
                c.setTime(new Date());
                c.add(Calendar.DAY_OF_MONTH,remindEnd);
                remindEndDate = c.getTime();
                map.put("remindend", sdf.format(remindEndDate));
            }
        }
        
        Wrapper<ShipuxinxiEntity> wrapper = new EntityWrapper<ShipuxinxiEntity>();
        if(map.get("remindstart")!=null) {
            wrapper.ge(columnName, map.get("remindstart"));
        }
        if(map.get("remindend")!=null) {
            wrapper.le(columnName, map.get("remindend"));
        }


        int count = shipuxinxiService.selectCount(wrapper);
        return R.ok().put("count", count);
    }
    
    /**
     * 前端智能排序
     */
    @IgnoreAuth
    @RequestMapping("/autoSort")
    public R autoSort(@RequestParam Map<String, Object> params,ShipuxinxiEntity shipuxinxi, HttpServletRequest request,String pre){
        EntityWrapper<ShipuxinxiEntity> ew = new EntityWrapper<ShipuxinxiEntity>();
        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 = shipuxinxiService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, shipuxinxi), params), params));
        return R.ok().put("data", page);
    }


©著作权归作者所有,转载或内容合作请联系作者
  • 序言:七十年代末,一起剥皮案震惊了整个滨河市,随后出现的几起案子,更是在滨河造成了极大的恐慌,老刑警刘岩,带你破解...
    沈念sama阅读 221,888评论 6 515
  • 序言:滨河连续发生了三起死亡事件,死亡现场离奇诡异,居然都是意外死亡,警方通过查阅死者的电脑和手机,发现死者居然都...
    沈念sama阅读 94,677评论 3 399
  • 文/潘晓璐 我一进店门,熙熙楼的掌柜王于贵愁眉苦脸地迎上来,“玉大人,你说我怎么就摊上这事。” “怎么了?”我有些...
    开封第一讲书人阅读 168,386评论 0 360
  • 文/不坏的土叔 我叫张陵,是天一观的道长。 经常有香客问我,道长,这世上最难降的妖魔是什么? 我笑而不...
    开封第一讲书人阅读 59,726评论 1 297
  • 正文 为了忘掉前任,我火速办了婚礼,结果婚礼上,老公的妹妹穿的比我还像新娘。我一直安慰自己,他们只是感情好,可当我...
    茶点故事阅读 68,729评论 6 397
  • 文/花漫 我一把揭开白布。 她就那样静静地躺着,像睡着了一般。 火红的嫁衣衬着肌肤如雪。 梳的纹丝不乱的头发上,一...
    开封第一讲书人阅读 52,337评论 1 310
  • 那天,我揣着相机与录音,去河边找鬼。 笑死,一个胖子当着我的面吹牛,可吹牛的内容都是我干的。 我是一名探鬼主播,决...
    沈念sama阅读 40,902评论 3 421
  • 文/苍兰香墨 我猛地睁开眼,长吁一口气:“原来是场噩梦啊……” “哼!你这毒妇竟也来了?” 一声冷哼从身侧响起,我...
    开封第一讲书人阅读 39,807评论 0 276
  • 序言:老挝万荣一对情侣失踪,失踪者是张志新(化名)和其女友刘颖,没想到半个月后,有当地人在树林里发现了一具尸体,经...
    沈念sama阅读 46,349评论 1 318
  • 正文 独居荒郊野岭守林人离奇死亡,尸身上长有42处带血的脓包…… 初始之章·张勋 以下内容为张勋视角 年9月15日...
    茶点故事阅读 38,439评论 3 340
  • 正文 我和宋清朗相恋三年,在试婚纱的时候发现自己被绿了。 大学时的朋友给我发了我未婚夫和他白月光在一起吃饭的照片。...
    茶点故事阅读 40,567评论 1 352
  • 序言:一个原本活蹦乱跳的男人离奇死亡,死状恐怖,灵堂内的尸体忽然破棺而出,到底是诈尸还是另有隐情,我是刑警宁泽,带...
    沈念sama阅读 36,242评论 5 350
  • 正文 年R本政府宣布,位于F岛的核电站,受9级特大地震影响,放射性物质发生泄漏。R本人自食恶果不足惜,却给世界环境...
    茶点故事阅读 41,933评论 3 334
  • 文/蒙蒙 一、第九天 我趴在偏房一处隐蔽的房顶上张望。 院中可真热闹,春花似锦、人声如沸。这庄子的主人今日做“春日...
    开封第一讲书人阅读 32,420评论 0 24
  • 文/苍兰香墨 我抬头看了看天上的太阳。三九已至,却和暖如春,着一层夹袄步出监牢的瞬间,已是汗流浃背。 一阵脚步声响...
    开封第一讲书人阅读 33,531评论 1 272
  • 我被黑心中介骗来泰国打工, 没想到刚下飞机就差点儿被人妖公主榨干…… 1. 我叫王不留,地道东北人。 一个月前我还...
    沈念sama阅读 48,995评论 3 377
  • 正文 我出身青楼,却偏偏与公主长得像,于是被迫代替她去往敌国和亲。 传闻我的和亲对象是个残疾皇子,可洞房花烛夜当晚...
    茶点故事阅读 45,585评论 2 359

推荐阅读更多精彩内容