当前位置:   article > 正文

基于微信小程序的电子商城购物平台+ssm后端源码和论文_微信小程序商城论文

微信小程序商城论文

摘  要

随着我国经济迅速发展,人们对手机的需求越来越大,各种手机软件也都在被广泛应用,但是对于手机进行数据信息管理,对于手机的各种软件也是备受用户的喜爱,电子商城购物平台小程序用户普遍使用,为方便用户能够可以随时进行电子商城购物平台小程序的数据信息管理,特开发了基于电子商城购物平台小程序的管理系统。

电子商城购物平台小程序的设计主要是对系统所要实现的功能进行详细考虑,确定所要实现的功能后进行界面的设计,在这中间还要考虑如何可以更好的将功能及页面进行很好的结合,方便用户可以很容易明了的找到自己所需要的信息,还有系统平台后期的可操作性,通过对信息内容的详细了解进行技术的开发。

电子商城购物平台小程序的开发利用现有的成熟技术参考,以源代码为模板,分析功能调整与电子商城购物平台小程序管理的实际需求相结合,讨论了基于电子商城购物平台小程序管理的使用。 

基于微信小程序的电子商城购物平台+ssm后端源码和论文032

关键词:电子商城购物平台小程序;JAVA

演示视频:

基于微信小程序的电子商城购物平台+ssm后端源码和论文

Abstract

With the rapid development of China's economy, people's demand for mobile phones is growing, all kinds of mobile phone software are also widely used, but for mobile phone data information management, all kinds of mobile phone software is also loved by users, e-mall shopping platform applet is widely used by users, in order to facilitate users to carry out e-mall shopping platform applet at any time The data information management system based on e-mall shopping platform is developed.

The design of e-mall shopping platform small program is mainly to consider the functions of the system in detail, and to design the interface after determining the functions to be realized. In the middle, we also need to consider how to better combine the functions and pages, so that users can easily find the information they need, and the later operation of the system platform Through a detailed understanding of the content of the information technology development.

The development of e-mall shopping platform small program uses the existing mature technology reference, takes the source code as the template, analyzes the function adjustment and the actual demand of e-mall shopping platform small program management, discusses the use of e-mall shopping platform small program management.  

Key words: e-mall, shopping platform, small program, Java 

  1. package com.controller;
  2. import java.text.SimpleDateFormat;
  3. import java.util.ArrayList;
  4. import java.util.Arrays;
  5. import java.util.Calendar;
  6. import java.util.Map;
  7. import java.util.HashMap;
  8. import java.util.Iterator;
  9. import java.util.Date;
  10. import java.util.List;
  11. import javax.servlet.http.HttpServletRequest;
  12. import com.utils.ValidatorUtils;
  13. import org.apache.commons.lang3.StringUtils;
  14. import org.springframework.beans.factory.annotation.Autowired;
  15. import org.springframework.web.bind.annotation.PathVariable;
  16. import org.springframework.web.bind.annotation.RequestBody;
  17. import org.springframework.web.bind.annotation.RequestMapping;
  18. import org.springframework.web.bind.annotation.RequestParam;
  19. import org.springframework.web.bind.annotation.RestController;
  20. import com.baomidou.mybatisplus.mapper.EntityWrapper;
  21. import com.baomidou.mybatisplus.mapper.Wrapper;
  22. import com.annotation.IgnoreAuth;
  23. import com.entity.ShangpinxinxiEntity;
  24. import com.entity.view.ShangpinxinxiView;
  25. import com.service.ShangpinxinxiService;
  26. import com.service.TokenService;
  27. import com.utils.PageUtils;
  28. import com.utils.R;
  29. import com.utils.MD5Util;
  30. import com.utils.MPUtil;
  31. import com.utils.CommonUtil;
  32. /**
  33. * 商品信息
  34. * 后端接口
  35. * @author
  36. * @email
  37. * @date 2021-03-09 08:56:02
  38. */
  39. @RestController
  40. @RequestMapping("/shangpinxinxi")
  41. public class ShangpinxinxiController {
  42. @Autowired
  43. private ShangpinxinxiService shangpinxinxiService;
  44. /**
  45. * 后端列表
  46. */
  47. @RequestMapping("/page")
  48. public R page(@RequestParam Map<String, Object> params,ShangpinxinxiEntity shangpinxinxi, HttpServletRequest request){
  49. EntityWrapper<ShangpinxinxiEntity> ew = new EntityWrapper<ShangpinxinxiEntity>();
  50. PageUtils page = shangpinxinxiService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, shangpinxinxi), params), params));
  51. return R.ok().put("data", page);
  52. }
  53. /**
  54. * 前端列表
  55. */
  56. @IgnoreAuth
  57. @RequestMapping("/list")
  58. public R list(@RequestParam Map<String, Object> params,ShangpinxinxiEntity shangpinxinxi, HttpServletRequest request){
  59. EntityWrapper<ShangpinxinxiEntity> ew = new EntityWrapper<ShangpinxinxiEntity>();
  60. PageUtils page = shangpinxinxiService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, shangpinxinxi), params), params));
  61. return R.ok().put("data", page);
  62. }
  63. /**
  64. * 列表
  65. */
  66. @RequestMapping("/lists")
  67. public R list( ShangpinxinxiEntity shangpinxinxi){
  68. EntityWrapper<ShangpinxinxiEntity> ew = new EntityWrapper<ShangpinxinxiEntity>();
  69. ew.allEq(MPUtil.allEQMapPre( shangpinxinxi, "shangpinxinxi"));
  70. return R.ok().put("data", shangpinxinxiService.selectListView(ew));
  71. }
  72. /**
  73. * 查询
  74. */
  75. @RequestMapping("/query")
  76. public R query(ShangpinxinxiEntity shangpinxinxi){
  77. EntityWrapper< ShangpinxinxiEntity> ew = new EntityWrapper< ShangpinxinxiEntity>();
  78. ew.allEq(MPUtil.allEQMapPre( shangpinxinxi, "shangpinxinxi"));
  79. ShangpinxinxiView shangpinxinxiView = shangpinxinxiService.selectView(ew);
  80. return R.ok("查询商品信息成功").put("data", shangpinxinxiView);
  81. }
  82. /**
  83. * 后端详情
  84. */
  85. @RequestMapping("/info/{id}")
  86. public R info(@PathVariable("id") Long id){
  87. ShangpinxinxiEntity shangpinxinxi = shangpinxinxiService.selectById(id);
  88. shangpinxinxi.setClicknum(shangpinxinxi.getClicknum()+1);
  89. shangpinxinxi.setClicktime(new Date());
  90. shangpinxinxiService.updateById(shangpinxinxi);
  91. return R.ok().put("data", shangpinxinxi);
  92. }
  93. /**
  94. * 前端详情
  95. */
  96. @IgnoreAuth
  97. @RequestMapping("/detail/{id}")
  98. public R detail(@PathVariable("id") Long id){
  99. ShangpinxinxiEntity shangpinxinxi = shangpinxinxiService.selectById(id);
  100. shangpinxinxi.setClicknum(shangpinxinxi.getClicknum()+1);
  101. shangpinxinxi.setClicktime(new Date());
  102. shangpinxinxiService.updateById(shangpinxinxi);
  103. return R.ok().put("data", shangpinxinxi);
  104. }
  105. /**
  106. * 后端保存
  107. */
  108. @RequestMapping("/save")
  109. public R save(@RequestBody ShangpinxinxiEntity shangpinxinxi, HttpServletRequest request){
  110. shangpinxinxi.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
  111. //ValidatorUtils.validateEntity(shangpinxinxi);
  112. shangpinxinxiService.insert(shangpinxinxi);
  113. return R.ok();
  114. }
  115. /**
  116. * 前端保存
  117. */
  118. @RequestMapping("/add")
  119. public R add(@RequestBody ShangpinxinxiEntity shangpinxinxi, HttpServletRequest request){
  120. shangpinxinxi.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
  121. //ValidatorUtils.validateEntity(shangpinxinxi);
  122. shangpinxinxiService.insert(shangpinxinxi);
  123. return R.ok();
  124. }
  125. /**
  126. * 修改
  127. */
  128. @RequestMapping("/update")
  129. public R update(@RequestBody ShangpinxinxiEntity shangpinxinxi, HttpServletRequest request){
  130. //ValidatorUtils.validateEntity(shangpinxinxi);
  131. shangpinxinxiService.updateById(shangpinxinxi);//全部更新
  132. return R.ok();
  133. }
  134. /**
  135. * 删除
  136. */
  137. @RequestMapping("/delete")
  138. public R delete(@RequestBody Long[] ids){
  139. shangpinxinxiService.deleteBatchIds(Arrays.asList(ids));
  140. return R.ok();
  141. }
  142. /**
  143. * 提醒接口
  144. */
  145. @RequestMapping("/remind/{columnName}/{type}")
  146. public R remindCount(@PathVariable("columnName") String columnName, HttpServletRequest request,
  147. @PathVariable("type") String type,@RequestParam Map<String, Object> map) {
  148. map.put("column", columnName);
  149. map.put("type", type);
  150. if(type.equals("2")) {
  151. SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
  152. Calendar c = Calendar.getInstance();
  153. Date remindStartDate = null;
  154. Date remindEndDate = null;
  155. if(map.get("remindstart")!=null) {
  156. Integer remindStart = Integer.parseInt(map.get("remindstart").toString());
  157. c.setTime(new Date());
  158. c.add(Calendar.DAY_OF_MONTH,remindStart);
  159. remindStartDate = c.getTime();
  160. map.put("remindstart", sdf.format(remindStartDate));
  161. }
  162. if(map.get("remindend")!=null) {
  163. Integer remindEnd = Integer.parseInt(map.get("remindend").toString());
  164. c.setTime(new Date());
  165. c.add(Calendar.DAY_OF_MONTH,remindEnd);
  166. remindEndDate = c.getTime();
  167. map.put("remindend", sdf.format(remindEndDate));
  168. }
  169. }
  170. Wrapper<ShangpinxinxiEntity> wrapper = new EntityWrapper<ShangpinxinxiEntity>();
  171. if(map.get("remindstart")!=null) {
  172. wrapper.ge(columnName, map.get("remindstart"));
  173. }
  174. if(map.get("remindend")!=null) {
  175. wrapper.le(columnName, map.get("remindend"));
  176. }
  177. int count = shangpinxinxiService.selectCount(wrapper);
  178. return R.ok().put("count", count);
  179. }
  180. /**
  181. * 前端智能排序
  182. */
  183. @IgnoreAuth
  184. @RequestMapping("/autoSort")
  185. public R autoSort(@RequestParam Map<String, Object> params,ShangpinxinxiEntity shangpinxinxi, HttpServletRequest request,String pre){
  186. EntityWrapper<ShangpinxinxiEntity> ew = new EntityWrapper<ShangpinxinxiEntity>();
  187. Map<String, Object> newMap = new HashMap<String, Object>();
  188. Map<String, Object> param = new HashMap<String, Object>();
  189. Iterator<Map.Entry<String, Object>> it = param.entrySet().iterator();
  190. while (it.hasNext()) {
  191. Map.Entry<String, Object> entry = it.next();
  192. String key = entry.getKey();
  193. String newKey = entry.getKey();
  194. if (pre.endsWith(".")) {
  195. newMap.put(pre + newKey, entry.getValue());
  196. } else if (StringUtils.isEmpty(pre)) {
  197. newMap.put(newKey, entry.getValue());
  198. } else {
  199. newMap.put(pre + "." + newKey, entry.getValue());
  200. }
  201. }
  202. params.put("sort", "clicknum");
  203. params.put("order", "desc");
  204. PageUtils page = shangpinxinxiService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, shangpinxinxi), params), params));
  205. return R.ok().put("data", page);
  206. }
  207. }

 

  1. package com.controller;
  2. import java.text.SimpleDateFormat;
  3. import java.util.ArrayList;
  4. import java.util.Arrays;
  5. import java.util.Calendar;
  6. import java.util.Map;
  7. import java.util.HashMap;
  8. import java.util.Iterator;
  9. import java.util.Date;
  10. import java.util.List;
  11. import javax.servlet.http.HttpServletRequest;
  12. import com.utils.ValidatorUtils;
  13. import org.apache.commons.lang3.StringUtils;
  14. import org.springframework.beans.factory.annotation.Autowired;
  15. import org.springframework.web.bind.annotation.PathVariable;
  16. import org.springframework.web.bind.annotation.RequestBody;
  17. import org.springframework.web.bind.annotation.RequestMapping;
  18. import org.springframework.web.bind.annotation.RequestParam;
  19. import org.springframework.web.bind.annotation.RestController;
  20. import com.baomidou.mybatisplus.mapper.EntityWrapper;
  21. import com.baomidou.mybatisplus.mapper.Wrapper;
  22. import com.annotation.IgnoreAuth;
  23. import com.entity.ShangpinfenleiEntity;
  24. import com.entity.view.ShangpinfenleiView;
  25. import com.service.ShangpinfenleiService;
  26. import com.service.TokenService;
  27. import com.utils.PageUtils;
  28. import com.utils.R;
  29. import com.utils.MD5Util;
  30. import com.utils.MPUtil;
  31. import com.utils.CommonUtil;
  32. /**
  33. * 商品分类
  34. * 后端接口
  35. * @author
  36. * @email
  37. * @date 2021-03-09 08:56:02
  38. */
  39. @RestController
  40. @RequestMapping("/shangpinfenlei")
  41. public class ShangpinfenleiController {
  42. @Autowired
  43. private ShangpinfenleiService shangpinfenleiService;
  44. /**
  45. * 后端列表
  46. */
  47. @RequestMapping("/page")
  48. public R page(@RequestParam Map<String, Object> params,ShangpinfenleiEntity shangpinfenlei, HttpServletRequest request){
  49. EntityWrapper<ShangpinfenleiEntity> ew = new EntityWrapper<ShangpinfenleiEntity>();
  50. PageUtils page = shangpinfenleiService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, shangpinfenlei), params), params));
  51. return R.ok().put("data", page);
  52. }
  53. /**
  54. * 前端列表
  55. */
  56. @RequestMapping("/list")
  57. public R list(@RequestParam Map<String, Object> params,ShangpinfenleiEntity shangpinfenlei, HttpServletRequest request){
  58. EntityWrapper<ShangpinfenleiEntity> ew = new EntityWrapper<ShangpinfenleiEntity>();
  59. PageUtils page = shangpinfenleiService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, shangpinfenlei), params), params));
  60. return R.ok().put("data", page);
  61. }
  62. /**
  63. * 列表
  64. */
  65. @RequestMapping("/lists")
  66. public R list( ShangpinfenleiEntity shangpinfenlei){
  67. EntityWrapper<ShangpinfenleiEntity> ew = new EntityWrapper<ShangpinfenleiEntity>();
  68. ew.allEq(MPUtil.allEQMapPre( shangpinfenlei, "shangpinfenlei"));
  69. return R.ok().put("data", shangpinfenleiService.selectListView(ew));
  70. }
  71. /**
  72. * 查询
  73. */
  74. @RequestMapping("/query")
  75. public R query(ShangpinfenleiEntity shangpinfenlei){
  76. EntityWrapper< ShangpinfenleiEntity> ew = new EntityWrapper< ShangpinfenleiEntity>();
  77. ew.allEq(MPUtil.allEQMapPre( shangpinfenlei, "shangpinfenlei"));
  78. ShangpinfenleiView shangpinfenleiView = shangpinfenleiService.selectView(ew);
  79. return R.ok("查询商品分类成功").put("data", shangpinfenleiView);
  80. }
  81. /**
  82. * 后端详情
  83. */
  84. @RequestMapping("/info/{id}")
  85. public R info(@PathVariable("id") Long id){
  86. ShangpinfenleiEntity shangpinfenlei = shangpinfenleiService.selectById(id);
  87. return R.ok().put("data", shangpinfenlei);
  88. }
  89. /**
  90. * 前端详情
  91. */
  92. @RequestMapping("/detail/{id}")
  93. public R detail(@PathVariable("id") Long id){
  94. ShangpinfenleiEntity shangpinfenlei = shangpinfenleiService.selectById(id);
  95. return R.ok().put("data", shangpinfenlei);
  96. }
  97. /**
  98. * 后端保存
  99. */
  100. @RequestMapping("/save")
  101. public R save(@RequestBody ShangpinfenleiEntity shangpinfenlei, HttpServletRequest request){
  102. shangpinfenlei.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
  103. //ValidatorUtils.validateEntity(shangpinfenlei);
  104. shangpinfenleiService.insert(shangpinfenlei);
  105. return R.ok();
  106. }
  107. /**
  108. * 前端保存
  109. */
  110. @RequestMapping("/add")
  111. public R add(@RequestBody ShangpinfenleiEntity shangpinfenlei, HttpServletRequest request){
  112. shangpinfenlei.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
  113. //ValidatorUtils.validateEntity(shangpinfenlei);
  114. shangpinfenleiService.insert(shangpinfenlei);
  115. return R.ok();
  116. }
  117. /**
  118. * 修改
  119. */
  120. @RequestMapping("/update")
  121. public R update(@RequestBody ShangpinfenleiEntity shangpinfenlei, HttpServletRequest request){
  122. //ValidatorUtils.validateEntity(shangpinfenlei);
  123. shangpinfenleiService.updateById(shangpinfenlei);//全部更新
  124. return R.ok();
  125. }
  126. /**
  127. * 删除
  128. */
  129. @RequestMapping("/delete")
  130. public R delete(@RequestBody Long[] ids){
  131. shangpinfenleiService.deleteBatchIds(Arrays.asList(ids));
  132. return R.ok();
  133. }
  134. /**
  135. * 提醒接口
  136. */
  137. @RequestMapping("/remind/{columnName}/{type}")
  138. public R remindCount(@PathVariable("columnName") String columnName, HttpServletRequest request,
  139. @PathVariable("type") String type,@RequestParam Map<String, Object> map) {
  140. map.put("column", columnName);
  141. map.put("type", type);
  142. if(type.equals("2")) {
  143. SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
  144. Calendar c = Calendar.getInstance();
  145. Date remindStartDate = null;
  146. Date remindEndDate = null;
  147. if(map.get("remindstart")!=null) {
  148. Integer remindStart = Integer.parseInt(map.get("remindstart").toString());
  149. c.setTime(new Date());
  150. c.add(Calendar.DAY_OF_MONTH,remindStart);
  151. remindStartDate = c.getTime();
  152. map.put("remindstart", sdf.format(remindStartDate));
  153. }
  154. if(map.get("remindend")!=null) {
  155. Integer remindEnd = Integer.parseInt(map.get("remindend").toString());
  156. c.setTime(new Date());
  157. c.add(Calendar.DAY_OF_MONTH,remindEnd);
  158. remindEndDate = c.getTime();
  159. map.put("remindend", sdf.format(remindEndDate));
  160. }
  161. }
  162. Wrapper<ShangpinfenleiEntity> wrapper = new EntityWrapper<ShangpinfenleiEntity>();
  163. if(map.get("remindstart")!=null) {
  164. wrapper.ge(columnName, map.get("remindstart"));
  165. }
  166. if(map.get("remindend")!=null) {
  167. wrapper.le(columnName, map.get("remindend"));
  168. }
  169. int count = shangpinfenleiService.selectCount(wrapper);
  170. return R.ok().put("count", count);
  171. }
  172. }

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/Monodyee/article/detail/593523
推荐阅读
相关标签
  

闽ICP备14008679号