ssm607家政公司服务平台的设计与实现+vue【已测试】

前言:👩‍💻 计算机行业的同仁们,大家好!作为专注于Java领域多年的开发者,我非常理解实践案例的重要性。以下是一些我认为有助于提升你们技能的资源:

👩‍💻 SpringBoot的精选案例推介!🔥
👩‍💻 想要把握小程序开发的精髓?这里有你需要的优选案例!🚀

点开文末链接,即可获取这些精品案例的源码。分享知识,共同进步!👇👇
📚 掌握这些案例,让你的编程之路更加顺畅。立即查看详情和获取源码!

希望这些资料能帮助你们在技术旅程中更进一步!🌟


项目名

 ssm607家政公司服务平台的设计与实现+vue【已测试】
技术栈

 
SpringBoot+Vue+小程序+MySQL+Maven


一、ssm607家政公司服务平台的设计与实现+vue【已测试】-环境介绍

1.1 运行环境

 
开发语言:Java
数据库:MySQL
系统架构:B/S
后端:SSM(MyBatis)
前端:Vue
工具:IDEA,JDK1.8,Maven

二、ssm607家政公司服务平台的设计与实现+vue【已测试】-系统介绍

 
2.1 项目介绍

计算机网络发展到现在已经好几十年了,在理论上面已经有了很丰富的基础,并且在现实生活中也到处都在使用,可以说,经过几十年的发展,互联网技术已经把地域信息的隔阂给消除了,让整个世界都可以即时通话和联系,极大的方便了人们的生活。所以说,家政公司服务平台用计算机技术来进行设计,不仅在管理方面更加的系统化,操作性强,最重要的是关于数据的保存和使用都能节约大量的时间,该系统非常的好用。

家政公司服务平台管理数据的工具是MySQL,编码的语言是Java,运用的框架是SSM框架。该系统可以实现家政服务管理,家政服务订单管理,家政服务留言管理,员工管理,用户管理,公告管理等功能。

家政公司服务平台不仅能让操作人员使用更加地方便,并且设计的也很合理,能有效的避免误操作,让数据在录入的环节就符合设计需要,极大的规避了源头性的输入误差,顺利的让数据变得更加可控并且可靠,让出错的几率降到最低。

关键词:家政公司服务平台;家政服务;订单;留言

2.2 功能模块

 
 


三、ssm607家政公司服务平台的设计与实现+vue【已测试】-系统展示

 
3.1部分功能图文展示


四、ssm607家政公司服务平台的设计与实现+vue【已测试】-部分代码设计

 
4.1.部分代码以及数据库如下:

表4.1 家政服务表

字段

注释

类型

id (主键)

主键

int(11)

jiazhengfuwu_name

服务名称

varchar(200)

jiazhengfuwu_photo

服务照片

varchar(200)

jiazhengfuwu_types

家政服务类型

int(11)

jiazhengfuwu_old_money

服务原价/小时

decimal(10,2)

jiazhengfuwu_new_money

现价/小时

decimal(10,2)

jiazhengfuwu_clicknum

点击次数

int(11)

jiazhengfuwu_content

服务介绍

text

shangxia_types

是否上架

int(11)

jiazhengfuwu_delete

逻辑删除

int(11)

create_time

创建时间

timestamp

表4.2 家政服务收藏表

字段

注释

类型

id (主键)

主键

int(11)

jiazhengfuwu_id

家政服务

int(11)

yonghu_id

用户

int(11)

jiazhengfuwu_collection_types

类型

int(11)

insert_time

收藏时间

timestamp

create_time

创建时间

timestamp

表4.3 家政服务评价表

字段

注释

类型

id (主键)

主键

int(11)

jiazhengfuwu_id

家政服务

int(11)

yonghu_id

用户

int(11)

jiazhengfuwu_commentback_text

评价内容

text

insert_time

评价时间

timestamp

reply_text

回复内容

text

update_time

回复时间

timestamp

create_time

创建时间

timestamp

表4.4 家政服务留言表

字段

注释

类型

id (主键)

主键

int(11)

jiazhengfuwu_id

家政服务

int(11)

yonghu_id

用户

int(11)

jiazhengfuwu_liuyan_text

留言内容

text

insert_time

留言时间

timestamp

reply_text

回复内容

text

update_time

回复时间

timestamp

create_time

创建时间

timestamp

表4.5 家政服务订单表

字段

注释

类型

id (主键)

主键

int(11)

jiazhengfuwu_order_uuid_number

订单号

varchar(200)

jiazhengfuwu_lianxiren_name

联系人

varchar(200)

jiazhengfuwu_lianxiren_phone

联系人电话

varchar(200)

jiazhengfuwu_lianxiren_address

服务地址

varchar(200)

jiazhengfuwu_id

家政服务

int(11)

yonghu_id

用户

int(11)

yuangong_id

员工

int(11)

buy_number

小时

int(11)

jiazhengfuwu_order_true_price

实付价格

decimal(10,2)

jiazhengfuwu_order_types

订单类型

int(11)

jiazhengfuwu_order_payment_types

支付类型

int(11)

yuyue_time

预约时间

timestamp

insert_time

订单创建时间

timestamp

create_time

创建时间

timestamp

表4.6 管理员表

字段

注释

类型

id (主键)

主键

bigint(20)

username

用户名

varchar(100)

password

密码

varchar(100)

role

角色

varchar(100)

addtime

新增时间

timestamp

表4.7 用户表

字段

注释

类型

id (主键)

主键

int(11)

username

账户

varchar(200)

password

密码

varchar(200)

yonghu_name

用户姓名

varchar(200)

yonghu_phone

用户手机号

varchar(200)

yonghu_id_number

用户身份证号

varchar(200)

yonghu_photo

用户头像

varchar(200)

sex_types

性别

int(11)

yonghu_email

电子邮箱

varchar(200)

new_money

余额

decimal(10,2)

create_time

创建时间

timestamp

表4.8 员工表

字段

注释

类型

id (主键)

主键

int(11)

username

账户

varchar(200)

password

密码

varchar(200)

yuangong_uuid_number

员工编号

varchar(200)

yuangong_name

员工姓名

varchar(200)

yuangong_phone

员工手机号

varchar(200)

yuangong_photo

员工头像

varchar(200)

yuangong_shanchang

擅长

varchar(200)

sex_types

性别

int(11)

yuangong_email

电子邮箱

varchar(200)

yuangong_content

员工介绍

text

create_time

创建时间

timestamp


package com.controller;

import java.io.File;
import java.math.BigDecimal;
import java.net.URL;
import java.text.SimpleDateFormat;
import com.alibaba.fastjson.JSONObject;
import java.util.*;
import org.springframework.beans.BeanUtils;
import javax.servlet.http.HttpServletRequest;
import org.springframework.web.context.ContextLoader;
import javax.servlet.ServletContext;
import com.service.TokenService;
import com.utils.*;
import java.lang.reflect.InvocationTargetException;

import com.service.DictionaryService;
import org.apache.commons.lang3.StringUtils;
import com.annotation.IgnoreAuth;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.entity.*;
import com.entity.view.*;
import com.service.*;
import com.utils.PageUtils;
import com.utils.R;
import com.alibaba.fastjson.*;

/**
 * 家政服务评价
 * 后端接口
 * @author
 * @email
*/
@RestController
@Controller
@RequestMapping("/jiazhengfuwuCommentback")
public class JiazhengfuwuCommentbackController {
    private static final Logger logger = LoggerFactory.getLogger(JiazhengfuwuCommentbackController.class);

    @Autowired
    private JiazhengfuwuCommentbackService jiazhengfuwuCommentbackService;


    @Autowired
    private TokenService tokenService;
    @Autowired
    private DictionaryService dictionaryService;

    //级联表service
    @Autowired
    private JiazhengfuwuService jiazhengfuwuService;
    @Autowired
    private YonghuService yonghuService;

    @Autowired
    private YuangongService yuangongService;


    /**
    * 后端列表
    */
    @RequestMapping("/page")
    public R page(@RequestParam Map<String, Object> params, HttpServletRequest request){
        logger.debug("page方法:,,Controller:{},,params:{}",this.getClass().getName(),JSONObject.toJSONString(params));
        String role = String.valueOf(request.getSession().getAttribute("role"));
        if(false)
            return R.error(511,"永不会进入");
        else if("用户".equals(role))
            params.put("yonghuId",request.getSession().getAttribute("userId"));
        else if("员工".equals(role))
            params.put("yuangongId",request.getSession().getAttribute("userId"));
        if(params.get("orderBy")==null || params.get("orderBy")==""){
            params.put("orderBy","id");
        }
        PageUtils page = jiazhengfuwuCommentbackService.queryPage(params);

        //字典表数据转换
        List<JiazhengfuwuCommentbackView> list =(List<JiazhengfuwuCommentbackView>)page.getList();
        for(JiazhengfuwuCommentbackView c:list){
            //修改对应字典表字段
            dictionaryService.dictionaryConvert(c, request);
        }
        return R.ok().put("data", page);
    }

    /**
    * 后端详情
    */
    @RequestMapping("/info/{id}")
    public R info(@PathVariable("id") Long id, HttpServletRequest request){
        logger.debug("info方法:,,Controller:{},,id:{}",this.getClass().getName(),id);
        JiazhengfuwuCommentbackEntity jiazhengfuwuCommentback = jiazhengfuwuCommentbackService.selectById(id);
        if(jiazhengfuwuCommentback !=null){
            //entity转view
            JiazhengfuwuCommentbackView view = new JiazhengfuwuCommentbackView();
            BeanUtils.copyProperties( jiazhengfuwuCommentback , view );//把实体数据重构到view中

                //级联表
                JiazhengfuwuEntity jiazhengfuwu = jiazhengfuwuService.selectById(jiazhengfuwuCommentback.getJiazhengfuwuId());
                if(jiazhengfuwu != null){
                    BeanUtils.copyProperties( jiazhengfuwu , view ,new String[]{ "id", "createTime", "insertTime", "updateTime"});//把级联的数据添加到view中,并排除id和创建时间字段
                    view.setJiazhengfuwuId(jiazhengfuwu.getId());
                }
                //级联表
                YonghuEntity yonghu = yonghuService.selectById(jiazhengfuwuCommentback.getYonghuId());
                if(yonghu != null){
                    BeanUtils.copyProperties( yonghu , view ,new String[]{ "id", "createTime", "insertTime", "updateTime"});//把级联的数据添加到view中,并排除id和创建时间字段
                    view.setYonghuId(yonghu.getId());
                }
            //修改对应字典表字段
            dictionaryService.dictionaryConvert(view, request);
            return R.ok().put("data", view);
        }else {
            return R.error(511,"查不到数据");
        }

    }

    /**
    * 后端保存
    */
    @RequestMapping("/save")
    public R save(@RequestBody JiazhengfuwuCommentbackEntity jiazhengfuwuCommentback, HttpServletRequest request){
        logger.debug("save方法:,,Controller:{},,jiazhengfuwuCommentback:{}",this.getClass().getName(),jiazhengfuwuCommentback.toString());

        String role = String.valueOf(request.getSession().getAttribute("role"));
        if(false)
            return R.error(511,"永远不会进入");
        else if("用户".equals(role))
            jiazhengfuwuCommentback.setYonghuId(Integer.valueOf(String.valueOf(request.getSession().getAttribute("userId"))));

        jiazhengfuwuCommentback.setInsertTime(new Date());
        jiazhengfuwuCommentback.setCreateTime(new Date());
        jiazhengfuwuCommentbackService.insert(jiazhengfuwuCommentback);
        return R.ok();
    }

    /**
    * 后端修改
    */
    @RequestMapping("/update")
    public R update(@RequestBody JiazhengfuwuCommentbackEntity jiazhengfuwuCommentback, HttpServletRequest request){
        logger.debug("update方法:,,Controller:{},,jiazhengfuwuCommentback:{}",this.getClass().getName(),jiazhengfuwuCommentback.toString());

        String role = String.valueOf(request.getSession().getAttribute("role"));
//        if(false)
//            return R.error(511,"永远不会进入");
//        else if("用户".equals(role))
//            jiazhengfuwuCommentback.setYonghuId(Integer.valueOf(String.valueOf(request.getSession().getAttribute("userId"))));
        //根据字段查询是否有相同数据
        Wrapper<JiazhengfuwuCommentbackEntity> queryWrapper = new EntityWrapper<JiazhengfuwuCommentbackEntity>()
            .eq("id",0)
            ;

        logger.info("sql语句:"+queryWrapper.getSqlSegment());
        JiazhengfuwuCommentbackEntity jiazhengfuwuCommentbackEntity = jiazhengfuwuCommentbackService.selectOne(queryWrapper);
        jiazhengfuwuCommentback.setUpdateTime(new Date());
        if(jiazhengfuwuCommentbackEntity==null){
            jiazhengfuwuCommentbackService.updateById(jiazhengfuwuCommentback);//根据id更新
            return R.ok();
        }else {
            return R.error(511,"表中有相同数据");
        }
    }

    /**
    * 删除
    */
    @RequestMapping("/delete")
    public R delete(@RequestBody Integer[] ids){
        logger.debug("delete:,,Controller:{},,ids:{}",this.getClass().getName(),ids.toString());
        jiazhengfuwuCommentbackService.deleteBatchIds(Arrays.asList(ids));
        return R.ok();
    }


    /**
     * 批量上传
     */
    @RequestMapping("/batchInsert")
    public R save( String fileName){
        logger.debug("batchInsert方法:,,Controller:{},,fileName:{}",this.getClass().getName(),fileName);
        try {
            List<JiazhengfuwuCommentbackEntity> jiazhengfuwuCommentbackList = new ArrayList<>();//上传的东西
            Map<String, List<String>> seachFields= new HashMap<>();//要查询的字段
            Date date = new Date();
            int lastIndexOf = fileName.lastIndexOf(".");
            if(lastIndexOf == -1){
                return R.error(511,"该文件没有后缀");
            }else{
                String suffix = fileName.substring(lastIndexOf);
                if(!".xls".equals(suffix)){
                    return R.error(511,"只支持后缀为xls的excel文件");
                }else{
                    URL resource = this.getClass().getClassLoader().getResource("static/upload/" + fileName);//获取文件路径
                    File file = new File(resource.getFile());
                    if(!file.exists()){
                        return R.error(511,"找不到上传文件,请联系管理员");
                    }else{
                        List<List<String>> dataList = PoiUtil.poiImport(file.getPath());//读取xls文件
                        dataList.remove(0);//删除第一行,因为第一行是提示
                        for(List<String> data:dataList){
                            //循环
                            JiazhengfuwuCommentbackEntity jiazhengfuwuCommentbackEntity = new JiazhengfuwuCommentbackEntity();
//                            jiazhengfuwuCommentbackEntity.setJiazhengfuwuId(Integer.valueOf(data.get(0)));   //家政服务 要改的
//                            jiazhengfuwuCommentbackEntity.setYonghuId(Integer.valueOf(data.get(0)));   //用户 要改的
//                            jiazhengfuwuCommentbackEntity.setJiazhengfuwuCommentbackText(data.get(0));                    //评价内容 要改的
//                            jiazhengfuwuCommentbackEntity.setInsertTime(date);//时间
//                            jiazhengfuwuCommentbackEntity.setReplyText(data.get(0));                    //回复内容 要改的
//                            jiazhengfuwuCommentbackEntity.setUpdateTime(new Date(data.get(0)));          //回复时间 要改的
//                            jiazhengfuwuCommentbackEntity.setCreateTime(date);//时间
                            jiazhengfuwuCommentbackList.add(jiazhengfuwuCommentbackEntity);


                            //把要查询是否重复的字段放入map中
                        }

                        //查询是否重复
                        jiazhengfuwuCommentbackService.insertBatch(jiazhengfuwuCommentbackList);
                        return R.ok();
                    }
                }
            }
        }catch (Exception e){
            return R.error(511,"批量插入数据异常,请联系管理员");
        }
    }





    /**
    * 前端列表
    */
    @IgnoreAuth
    @RequestMapping("/list")
    public R list(@RequestParam Map<String, Object> params, HttpServletRequest request){
        logger.debug("list方法:,,Controller:{},,params:{}",this.getClass().getName(),JSONObject.toJSONString(params));

        // 没有指定排序字段就默认id倒序
        if(StringUtil.isEmpty(String.valueOf(params.get("orderBy")))){
            params.put("orderBy","id");
        }
        PageUtils page = jiazhengfuwuCommentbackService.queryPage(params);

        //字典表数据转换
        List<JiazhengfuwuCommentbackView> list =(List<JiazhengfuwuCommentbackView>)page.getList();
        for(JiazhengfuwuCommentbackView c:list)
            dictionaryService.dictionaryConvert(c, request); //修改对应字典表字段
        return R.ok().put("data", page);
    }

    /**
    * 前端详情
    */
    @RequestMapping("/detail/{id}")
    public R detail(@PathVariable("id") Long id, HttpServletRequest request){
        logger.debug("detail方法:,,Controller:{},,id:{}",this.getClass().getName(),id);
        JiazhengfuwuCommentbackEntity jiazhengfuwuCommentback = jiazhengfuwuCommentbackService.selectById(id);
            if(jiazhengfuwuCommentback !=null){


                //entity转view
                JiazhengfuwuCommentbackView view = new JiazhengfuwuCommentbackView();
                BeanUtils.copyProperties( jiazhengfuwuCommentback , view );//把实体数据重构到view中

                //级联表
                    JiazhengfuwuEntity jiazhengfuwu = jiazhengfuwuService.selectById(jiazhengfuwuCommentback.getJiazhengfuwuId());
                if(jiazhengfuwu != null){
                    BeanUtils.copyProperties( jiazhengfuwu , view ,new String[]{ "id", "createDate"});//把级联的数据添加到view中,并排除id和创建时间字段
                    view.setJiazhengfuwuId(jiazhengfuwu.getId());
                }
                //级联表
                    YonghuEntity yonghu = yonghuService.selectById(jiazhengfuwuCommentback.getYonghuId());
                if(yonghu != null){
                    BeanUtils.copyProperties( yonghu , view ,new String[]{ "id", "createDate"});//把级联的数据添加到view中,并排除id和创建时间字段
                    view.setYonghuId(yonghu.getId());
                }
                //修改对应字典表字段
                dictionaryService.dictionaryConvert(view, request);
                return R.ok().put("data", view);
            }else {
                return R.error(511,"查不到数据");
            }
    }


    /**
    * 前端保存
    */
    @RequestMapping("/add")
    public R add(@RequestBody JiazhengfuwuCommentbackEntity jiazhengfuwuCommentback, HttpServletRequest request){
        logger.debug("add方法:,,Controller:{},,jiazhengfuwuCommentback:{}",this.getClass().getName(),jiazhengfuwuCommentback.toString());
        jiazhengfuwuCommentback.setInsertTime(new Date());
        jiazhengfuwuCommentback.setCreateTime(new Date());
        jiazhengfuwuCommentbackService.insert(jiazhengfuwuCommentback);
        return R.ok();
        }


}


五、ssm607家政公司服务平台的设计与实现+vue【已测试】-结束语

本课题主要是研究与实现家政公司服务平台,在经历了资料查找,技术选择,功能分析,模块设计,数据库设计,界面设计,功能编码,功能测试等阶段性工作之后,本人已如期完成了一个可供目标用户群使用的家政公司服务平台。

家政公司服务平台选用Java语言,搭配MySQL数据库进行设计与开发,相比于大部分相似系统而言,其具备的特点如下:

(1)家政公司服务平台的功能完全根据目标人群的使用需求进行分析设计与编码,也经过了开发流程中的最后测试环节,最终确定其功能基本得到实现,可以在生活中发挥其用于信息管理的作用。

(2)家政公司服务平台的界面设计很简单,具备简洁直观的特点,因为每个功能模块都有单独的界面展示,使用者点击不同的功能就会出现与之相应的界面,每个界面的颜色搭配比较统一,界面的布局也合理,界面上使用的各种图片都经过了Photoshop这样的图片处理工具进行了美化,所以使用者在浏览本系统的各个界面的时候,对本系统显示的各种信息能够一目了然。

(3)家政公司服务平台的使用与操作非常便利,因为本系统能够规避大部分用户的误操作现象,所以使用人群在使用期间能够在短时间内找到需要的功能并操作,这样可以节省操作时间,并且本系统在操作的流程上也进行了优化,去掉了一些比较繁琐的操作步骤,同时本系统在各个界面上也把一些常用的功能放在了比较显眼的区域,也大大方便了使用者对于家政公司服务平台功能的操作。

由于本人在系统开发经验上的不足,家政公司服务平台也存在一些缺陷,具体如下:

(1)对于数据的存储上面,设计的数据表存在不合理之处,对于同一数据在多张表中都有记录,造成了存储空间的浪费以及系统响应时间的延迟。

(2)对于系统编码上面,有很多代码并没有进行注释,这个对于开发人员来讲,在进行系统的后续升级与维护上会消耗很多时间,提升了对系统升级与维护的难度,还有就是,很多代码使用的函数都是相同的函数,这个函数在各个代码文件中都重新进行了编写,没有单独独立出来进行调用,让该系统变得臃肿,同时也消耗了很多存储空间。

所以在今后,也需要本人花费很多时间来对家政公司服务平台进行完善,对于上面提到的数据库中的数据冗余问题,打算学习数据库连接池方面的技术来改善数据冗余的现象,对于编码文件占用存储空间过多的问题,打算使用函数的调用功能,把相同函数写在一个编码文件上让其他需要使用该函数的编码文件进行函数调用,以此节省存储空间,让系统变得更加轻盈。


 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值