本文主要是介绍基于ssm vue技术的品牌银饰售卖平台源码和论文737,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
摘 要
本论文主要是针对品牌银饰售卖而开发进行概述,主要包括对研究的背景和研究现状,以及研究目的等的阐述,也对该系统的各种功能要求,对系统结构,数据库的设计等进行讨论。随着科技与技术的发展,利用计算机以及网络来提高工作效率已是大势所趋,希望该系统能有所帮助。本论文讨论的是品牌银饰售卖平台,此系统运用了B/S结构(浏览器/服务器),同时加上动态网页开发技术Java语言以及mysql数据库一起开发完成的。该系统能完成的主要功能分为管理员和用户两个用户角色。主要功能包括首页、个人中心、用户管理、促销活动管理、饰品管理、我的收藏管理、系统管理、订单管理等。而用户登入系统也可以对自己的信息以及修改个人资料进行查看等功能。该系统在完成设计以及测试之后,运行稳定且操作方便快捷,能满足设计开发之初的要求。
关键词:品牌银饰售卖;java;mysql数据库
基于ssm vue技术的品牌银饰售卖平台源码和论文737
演示视频:
基于ssm vue技术的品牌银饰售卖平台源码和论文
Abstract
This paper mainly summarizes the development of brand silver jewelry sales, including the background and status quo of the research, as well as the purpose of the research, and also discusses the various functional requirements of the system, system structure, database design and so on. With the development of science and technology, the use of computer and network to improve work efficiency has been a general trend, hope that the system can help. This paper discusses the brand silver jewelry sales platform, this system uses B/S structure (browser/server), coupled with dynamic web development technology Java language and mysql database developed together. The main functions of the system can be divided into two user roles: administrator and user. The main functions include home page, personal center, user management, promotion management, jewelry management, my collection management, system management, order management and so on. And the user login system can also view their own information and modify personal information and other functions. After the completion of the design and test, the system runs stably and operates easily and quickly, which can meet the requirements of the initial design and development.
Key words: brand silver jewelry sales; Java; The mysql database
package com.controller;import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Calendar;
import java.util.Map;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Date;
import java.util.List;
import javax.servlet.http.HttpServletRequest;
import java.io.IOException;import com.utils.ValidatorUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.format.annotation.DateTimeFormat;
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.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.annotation.IgnoreAuth;import com.entity.OrdersEntity;
import com.entity.view.OrdersView;import com.service.OrdersService;
import com.service.TokenService;
import com.utils.PageUtils;
import com.utils.R;
import com.utils.MD5Util;
import com.utils.MPUtil;
import com.utils.CommonUtil;/*** 订单* 后端接口* @author * @email * @date 2022-04-09 16:49:05*/
@RestController
@RequestMapping("/orders")
public class OrdersController {@Autowiredprivate OrdersService ordersService;/*** 后端列表*/@RequestMapping("/page")public R page(@RequestParam Map<String, Object> params,OrdersEntity orders, HttpServletRequest request){if(!request.getSession().getAttribute("role").toString().equals("管理员")) {orders.setUserid((Long)request.getSession().getAttribute("userId"));}EntityWrapper<OrdersEntity> ew = new EntityWrapper<OrdersEntity>();PageUtils page = ordersService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, orders), params), params));return R.ok().put("data", page);}/*** 前端列表*/@IgnoreAuth@RequestMapping("/list")public R list(@RequestParam Map<String, Object> params,OrdersEntity orders, HttpServletRequest request){EntityWrapper<OrdersEntity> ew = new EntityWrapper<OrdersEntity>();PageUtils page = ordersService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, orders), params), params));return R.ok().put("data", page);}/*** 列表*/@RequestMapping("/lists")public R list( OrdersEntity orders){EntityWrapper<OrdersEntity> ew = new EntityWrapper<OrdersEntity>();ew.allEq(MPUtil.allEQMapPre( orders, "orders")); return R.ok().put("data", ordersService.selectListView(ew));}/*** 查询*/@RequestMapping("/query")public R query(OrdersEntity orders){EntityWrapper< OrdersEntity> ew = new EntityWrapper< OrdersEntity>();ew.allEq(MPUtil.allEQMapPre( orders, "orders")); OrdersView ordersView = ordersService.selectView(ew);return R.ok("查询订单成功").put("data", ordersView);}/*** 后端详情*/@RequestMapping("/info/{id}")public R info(@PathVariable("id") Long id){OrdersEntity orders = ordersService.selectById(id);return R.ok().put("data", orders);}/*** 前端详情*/@IgnoreAuth@RequestMapping("/detail/{id}")public R detail(@PathVariable("id") Long id){OrdersEntity orders = ordersService.selectById(id);return R.ok().put("data", orders);}/*** 后端保存*/@RequestMapping("/save")public R save(@RequestBody OrdersEntity orders, HttpServletRequest request){orders.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());//ValidatorUtils.validateEntity(orders);orders.setUserid((Long)request.getSession().getAttribute("userId"));ordersService.insert(orders);return R.ok();}/*** 前端保存*/@RequestMapping("/add")public R add(@RequestBody OrdersEntity orders, HttpServletRequest request){orders.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());//ValidatorUtils.validateEntity(orders);ordersService.insert(orders);return R.ok();}/*** 修改*/@RequestMapping("/update")public R update(@RequestBody OrdersEntity orders, HttpServletRequest request){//ValidatorUtils.validateEntity(orders);ordersService.updateById(orders);//全部更新return R.ok();}/*** 删除*/@RequestMapping("/delete")public R delete(@RequestBody Long[] ids){ordersService.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<OrdersEntity> wrapper = new EntityWrapper<OrdersEntity>();if(map.get("remindstart")!=null) {wrapper.ge(columnName, map.get("remindstart"));}if(map.get("remindend")!=null) {wrapper.le(columnName, map.get("remindend"));}if(!request.getSession().getAttribute("role").toString().equals("管理员")) {wrapper.eq("userid", (Long)request.getSession().getAttribute("userId"));}int count = ordersService.selectCount(wrapper);return R.ok().put("count", count);}/*** (按值统计)*/@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<OrdersEntity> ew = new EntityWrapper<OrdersEntity>();ew.in("status", new String[]{"已支付","已发货","已完成"});List<Map<String, Object>> result = ordersService.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("/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<OrdersEntity> ew = new EntityWrapper<OrdersEntity>();ew.in("status", new String[]{"已支付","已发货","已完成"});List<Map<String, Object>> result = ordersService.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("/group/{columnName}")public R group(@PathVariable("columnName") String columnName,HttpServletRequest request) {Map<String, Object> params = new HashMap<String, Object>();params.put("column", columnName);EntityWrapper<OrdersEntity> ew = new EntityWrapper<OrdersEntity>();ew.in("status", new String[]{"已支付","已发货","已完成"});List<Map<String, Object>> result = ordersService.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);}
}
package com.controller;import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Calendar;
import java.util.Map;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Date;
import java.util.List;
import javax.servlet.http.HttpServletRequest;
import java.io.IOException;import com.utils.ValidatorUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.format.annotation.DateTimeFormat;
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.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.annotation.IgnoreAuth;import com.entity.CuxiaohuodongEntity;
import com.entity.view.CuxiaohuodongView;import com.service.CuxiaohuodongService;
import com.service.TokenService;
import com.utils.PageUtils;
import com.utils.R;
import com.utils.MD5Util;
import com.utils.MPUtil;
import com.utils.CommonUtil;
import com.service.StoreupService;
import com.entity.StoreupEntity;/*** 促销活动* 后端接口* @author * @email * @date 2022-04-09 16:49:04*/
@RestController
@RequestMapping("/cuxiaohuodong")
public class CuxiaohuodongController {@Autowiredprivate CuxiaohuodongService cuxiaohuodongService;@Autowiredprivate StoreupService storeupService;/*** 后端列表*/@RequestMapping("/page")public R page(@RequestParam Map<String, Object> params,CuxiaohuodongEntity cuxiaohuodong, HttpServletRequest request){EntityWrapper<CuxiaohuodongEntity> ew = new EntityWrapper<CuxiaohuodongEntity>();PageUtils page = cuxiaohuodongService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, cuxiaohuodong), params), params));return R.ok().put("data", page);}/*** 前端列表*/@IgnoreAuth@RequestMapping("/list")public R list(@RequestParam Map<String, Object> params,CuxiaohuodongEntity cuxiaohuodong, HttpServletRequest request){EntityWrapper<CuxiaohuodongEntity> ew = new EntityWrapper<CuxiaohuodongEntity>();PageUtils page = cuxiaohuodongService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, cuxiaohuodong), params), params));return R.ok().put("data", page);}/*** 列表*/@RequestMapping("/lists")public R list( CuxiaohuodongEntity cuxiaohuodong){EntityWrapper<CuxiaohuodongEntity> ew = new EntityWrapper<CuxiaohuodongEntity>();ew.allEq(MPUtil.allEQMapPre( cuxiaohuodong, "cuxiaohuodong")); return R.ok().put("data", cuxiaohuodongService.selectListView(ew));}/*** 查询*/@RequestMapping("/query")public R query(CuxiaohuodongEntity cuxiaohuodong){EntityWrapper< CuxiaohuodongEntity> ew = new EntityWrapper< CuxiaohuodongEntity>();ew.allEq(MPUtil.allEQMapPre( cuxiaohuodong, "cuxiaohuodong")); CuxiaohuodongView cuxiaohuodongView = cuxiaohuodongService.selectView(ew);return R.ok("查询促销活动成功").put("data", cuxiaohuodongView);}/*** 后端详情*/@RequestMapping("/info/{id}")public R info(@PathVariable("id") Long id){CuxiaohuodongEntity cuxiaohuodong = cuxiaohuodongService.selectById(id);return R.ok().put("data", cuxiaohuodong);}/*** 前端详情*/@IgnoreAuth@RequestMapping("/detail/{id}")public R detail(@PathVariable("id") Long id){CuxiaohuodongEntity cuxiaohuodong = cuxiaohuodongService.selectById(id);return R.ok().put("data", cuxiaohuodong);}/*** 赞或踩*/@RequestMapping("/thumbsup/{id}")public R thumbsup(@PathVariable("id") String id,String type){CuxiaohuodongEntity cuxiaohuodong = cuxiaohuodongService.selectById(id);if(type.equals("1")) {cuxiaohuodong.setThumbsupnum(cuxiaohuodong.getThumbsupnum()+1);} else {cuxiaohuodong.setCrazilynum(cuxiaohuodong.getCrazilynum()+1);}cuxiaohuodongService.updateById(cuxiaohuodong);return R.ok();}/*** 后端保存*/@RequestMapping("/save")public R save(@RequestBody CuxiaohuodongEntity cuxiaohuodong, HttpServletRequest request){cuxiaohuodong.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());//ValidatorUtils.validateEntity(cuxiaohuodong);cuxiaohuodongService.insert(cuxiaohuodong);return R.ok();}/*** 前端保存*/@IgnoreAuth@RequestMapping("/add")public R add(@RequestBody CuxiaohuodongEntity cuxiaohuodong, HttpServletRequest request){cuxiaohuodong.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());//ValidatorUtils.validateEntity(cuxiaohuodong);cuxiaohuodongService.insert(cuxiaohuodong);return R.ok();}/*** 修改*/@RequestMapping("/update")public R update(@RequestBody CuxiaohuodongEntity cuxiaohuodong, HttpServletRequest request){//ValidatorUtils.validateEntity(cuxiaohuodong);cuxiaohuodongService.updateById(cuxiaohuodong);//全部更新return R.ok();}/*** 删除*/@RequestMapping("/delete")public R delete(@RequestBody Long[] ids){cuxiaohuodongService.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<CuxiaohuodongEntity> wrapper = new EntityWrapper<CuxiaohuodongEntity>();if(map.get("remindstart")!=null) {wrapper.ge(columnName, map.get("remindstart"));}if(map.get("remindend")!=null) {wrapper.le(columnName, map.get("remindend"));}int count = cuxiaohuodongService.selectCount(wrapper);return R.ok().put("count", count);}}
这篇关于基于ssm vue技术的品牌银饰售卖平台源码和论文737的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!