Java项目:企业客户管理系统(java+SpringBoot+MyBatis-Plus+Vue+mysql)

源码获取:俺的博客首页 "资源" 里下载!

项目介绍

Springboot企业客户管理系统

本项目主要分为管理员与员工两种角色

管理员主要功能包括:
登录、个人中心、员工管理、客户信息管理、行业类型管理、项目信息管理、项目类型管理、项目收益管理;

员工主要功能包括:
登录、个人中心、客户信息管理、项目信息管理、项目收益管理;


环境需要

1.运行环境:最好是java jdk 1.8,我们在这个平台上运行的。其他版本理论上也可以。
2.IDE环境:IDEA,Eclipse,Myeclipse都可以。推荐IDEA;
3.硬件环境:windows 7/8/10 1G内存以上;或者 Mac OS; 
4.数据库:MySql 5.7/8.0版本均可;
5.是否Maven项目:是;


技术栈

后端:SpringBoot+MyBatis-Plus
前端:Vue

使用说明

项目运行:
1. 使用Navicat或者其它工具,在mysql中创建对应sql文件名称的数据库,并导入项目的sql文件;
2. 使用IDEA/Eclipse/MyEclipse导入项目,导入成功后请执行maven clean;maven install命令,然后运行;
3. 将项目中application.yml配置文件中的数据库配置改为自己的配置;
4. 运行项目,在浏览器中输入地址
http://localhost:8080/springboot03445/admin/dist/index.html#/login
管理员用户名密码:abo/abo
员工用户名密码:1/1

登录展示页:

管理员页面展示:

管理员个人信息展示页:

 

客户信息展示页面:

员工展示页面:

行业类型展示页面:

 

项目类型展示页面:

 

角色登录展示页:

 

员工展示页面:

 

客户信息管理展示:

 

客户前端控制器:

/**
 * 客户前端控制器
 */
@Controller
@RequestMapping("/customer")
public class CustomerController extends BaseController {
    private static final Logger LOGGER = LoggerFactory.getLogger(CustomerController.class);

    @Autowired
    private ICustomerService customerService;

    @Autowired
    private ICustomerTypeService customerTypeService;

    /**
     * 进入客户列表页面
     *
     * @return
     */
    @RequestMapping(value = "/list", method = RequestMethod.GET)
    public String list(HttpServletRequest request, Model model) {
        LOGGER.debug("into /customer/list >>>>>>>>>>>>>>>>>>>>>>>");
        model.addAttribute("sexEnum", SexEnum.values());
        model.addAttribute("typeList", customerTypeService.search());
        return "customer/list";
    }

    /**
     * 客户搜索
     *
     * @return
     */
    @RequestMapping(value = "/search", method = RequestMethod.GET)
    @ResponseBody
    public JSONResult search(CustomerSearchDto searchDto) {
        LOGGER.debug("into /customer/search >>>>>>>>>>>>>>>>>>>>>>>{}", JsonUtils.toJson(searchDto));
        PageVo pageVo = customerService.search(searchDto);
        return new JSONResult(pageVo);
    }

    /**
     * 添加或修改
     *
     * @return
     */
    @RequestMapping(value = "/addOrUpdate", method = RequestMethod.POST)
    @ResponseBody
    public JSONResult saveOrUpdate(Customer customer) {
        LOGGER.debug("into /customer/addOrUpdate >>>>>>>>>>>>>>>>>>>>>>>{}", JsonUtils.toJson(customer));
        customerService.addOrUpdate(customer);
        return new JSONResult();
    }

    /**
     * 充值
     *
     * @return
     */
    @RequestMapping(value = "/recharge", method = RequestMethod.POST)
    @ResponseBody
    public JSONResult recharge(RechargeRecord rechargeRecord) {
        LOGGER.debug("into /customer/recharge >>>>>>>>>>>>>>>>>>>>>>>{}",JsonUtils.toJson(rechargeRecord));
        customerService.recharge(rechargeRecord);
        return new JSONResult();
    }

    /**
     * 消费
     *
     * @return
     */
    @RequestMapping(value = "/consume", method = RequestMethod.POST)
    @ResponseBody
    public JSONResult consume(ConsumeRecord consumeRecord) {
        LOGGER.debug("into /customer/consume >>>>>>>>>>>>>>>>>>>>>>>{}",JsonUtils.toJson(consumeRecord));
        customerService.consume(consumeRecord);
        return new JSONResult();
    }
    /**
     * 删除
     *
     * @return
     */
    @RequestMapping(value = "/del", method = RequestMethod.POST)
    @ResponseBody
    public JSONResult del(String id) {
        LOGGER.debug("into /customer/del >>>>>>>>>>>>>>>>>>>>>>>{}",id);
        customerService.del(id);
        return new JSONResult();
    }
}

客户类型前端控制器:

/**
 * 客户类型前端控制器
 */
@Controller
@RequestMapping("/customerType")
public class CustomerTypeController extends BaseController {
    private static final Logger LOGGER = LoggerFactory.getLogger(CustomerTypeController.class);

    @Autowired
    private ICustomerTypeService customerTypeService;

    /**
     * 进入客户类型列表页面
     *
     * @return
     */
    @RequestMapping(value = "/list", method = RequestMethod.GET)
    public String list() {
        LOGGER.debug("into /customerType/list >>>>>>>>>>>>>>>>>>>>>>>");
        return "customer/type_list";
    }

    /**
     * 客户类型
     *
     * @return
     */
    @RequestMapping(value = "/search", method = RequestMethod.GET)
    @ResponseBody
    public JSONResult search() {
        LOGGER.debug("into /customerType/search >>>>>>>>>>>>>>>>>>>>>>>");
        List<CustomerType> typeList = customerTypeService.search();
        return new JSONResult(typeList);
    }

    /**
     * 添加或修改客户类型
     *
     * @return
     */
    @RequestMapping(value = "/saveOrUpdate", method = RequestMethod.POST)
    @ResponseBody
    public JSONResult add(CustomerType customerType) {
        LOGGER.debug("into /customerType/saveOrUpdate >>>>>>>>>>>>>>>>>>>>>>>{}", JsonUtils.toJson(customerType));
        EntityUtils.init(customerType);
        customerTypeService.saveOrUpdate(customerType);
        return new JSONResult();
    }

    /**
     * 删除
     *
     * @return
     */
    @RequestMapping(value = "/del", method = RequestMethod.POST)
    @ResponseBody
    public JSONResult del(String id) {
        LOGGER.debug("into /customerType/del >>>>>>>>>>>>>>>>>>>>>>>{}", id);
        CustomerType customerType = customerTypeService.getById(id);
        if (customerType != null) {
            EntityUtils.init(customerType);
            customerType.setIsValid(YNEnum.N);
            customerTypeService.updateById(customerType);
        }
        return new JSONResult();
    }
}

用户管理控制层:

/**
 *  前端控制器
 */
@Controller
@RequestMapping("/user")
public class UserController extends BaseController {

    private static final Logger logger = LoggerFactory.getLogger(UserController.class);

    @Autowired
    private IUserService userService;

    /**
     * 进入修改密码页面
     *
     * @return
     */
    @RequestMapping(value = "/goUpdatePwd", method = RequestMethod.GET)
    public String goUpdatePwd() {
        logger.debug("into user/goUpdatePwd");
        return "user/updatePwd";
    }

    /**
     * 修改密码
     *
     * @return
     */
    @RequestMapping(value = "/updatePwd", method = RequestMethod.POST)
    @ResponseBody
    public Object updatePwd(UpdatePwdDto updatePwdDto, HttpServletRequest request) {
        logger.debug("into user/updatePwd updatePwdDto:{}", JsonUtils.toJson(updatePwdDto));
        LoginVo loginVo = (LoginVo) request.getSession().getAttribute(Constant.SESSION_USER);
        userService.updatePwd(loginVo.getUser().getId(), updatePwdDto);
        return new JSONResult();
    }
}

源码获取:俺的博客首页 "资源" 里下载!

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

打赏作者

beyondwild

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

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

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

打赏作者

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

抵扣说明:

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

余额充值