# yiyi-shop **Repository Path**: bear_shi_wu/yiyi-shop ## Basic Information - **Project Name**: yiyi-shop - **Description**: ssssssssssssss - **Primary Language**: Unknown - **License**: LGPL-3.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2022-03-25 - **Last Updated**: 2023-12-05 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # 商城 > 介绍: 商城 YIYI-SHOP,基于 微信小程序 + springboot + vue 技术构建 ,支持单店铺,多店铺入驻的商城平台。项目包含 微信小程序,管理后台。基于java后台语言,已功能闭环。 # 商城文档 ## 1 后台管理接口 ### 1.1 首页 1. http://localhost:8083/demo/admin/auth/info 1. 获取当前用户的登录信息,在根据roleId去查询``dts_role``表判断当前用户是什么角色,在根据该角色查询出权限 2. http://localhost:8083/demo/admin/dashboard/chart 1. 默认统计用户``dts_user``、订单表``dts_order``一个月的饼状图信息,返回两个List 2. 获取两个List的天数,进行排序,然后获取总天数的总订单量和销售类别 ![image-20220325153650344](C:\Users\Sunday\AppData\Roaming\Typora\typora-user-images\image-20220325153650344.png) 3. http://localhost:8083/demo/admin/dashboard 1. 查询用户表``dts_user``、货物表``dts_goods``、商品``product``、订单表``dts_order``获取他们的总数,对应为 ![image-20220325153314711](C:\Users\Sunday\AppData\Roaming\Typora\typora-user-images\image-20220325153314711.png) ### 1.2 用户管理 GET请求 #### 会员管理 http://localhost:8083/demo/admin/user/list 根据创建订单时间降序排列 #### 佣金管理 http://localhost:8083/demo/admin/brokerage/list 先查出所以的用户信息,根据所以用户的id去佣金表查询带有佣金的用户 #### 收货地址 http://localhost:8083/demo/admin/address/list 查询所有的用户,根据所以省、市、镇id的名字查询行政区域表``dts_region``,city表 #### 会员收藏 http://localhost:8083/demo/admin/collect/list 如果没输入用户ID或者商品ID,默认以添加时间降序全部查询 #### 会员足迹 http://localhost:8083/demo/admin/footprint/list 与会员收藏同理 #### 搜索历史 http://localhost:8083/demo/admin/history/list 与以上同理 #### 意见反馈 http://localhost:8083/demo/admin/feedback/list 与以上同理 ### 1.3 商场管理 #### 行政区域 http://localhost:8083/demo/admin/region/list 根据行政区域名与行政区域编码查询,不输入数据,默认以创建时间降序展示 #### 品牌制造商 查询:http://localhost:8083/demo/admin/brand/list 默认查询所有,在根据默认类别id,查询品牌商 http://localhost:8083/demo/admin/brand/catAndAdmin 查处一级类别(L1),获取以及类别的id和名字,根据id查出二级类别Id和名字,获取目录与管理用户 ##### 添加品牌商(商品管理、品牌管理) http://localhost:8083/demo/admin/brand/create 1. 默认类别id查询默认商品 2. 根据品牌id、图片url、品牌名、默认类目(商品),生成该商品的URL,最后添加到商品表中 #### 商品类目 http://localhost:8083/demo/admin/category/list 默认降序查询所以商品类目 http://localhost:8083/demo/admin/category/l1 默认查询所以以及类目 编辑:http://localhost:8083/demo/admin/category/update 根据ID编辑商品类目信息 #### 订单管理 http://localhost:8083/demo/admin/order/list:搜索同理 http://localhost:8083/demo/admin/order/listShipChannel:快递列表 http://localhost:8083/demo/admin/order/detail:id查询订单信息详情,共查询订单表、订单商品表、用户表 http://localhost:8083/demo/admin/order/ship:发货 发货: 1. 根据前端传的订单ID、快递名、快递单号查询订单,如果订单不是以付款的情况下则不能发货 2. 如果订单为以付款,则更新订单状态 3. 更新订单状态后,异步的发送短信通知用户“您的快递已发货”,后期考虑使用MQ进行异步通知 http://localhost:8083/demo/admin/order/reply:订单商品管理 ### 1.4 商品管理 #### 商品列表 1. 列表/查询:http://localhost:8083/demo/admin/goods/list?page=1&limit=20&sort=add_time&order=desc - 添加商品: 1. 查看品牌:http://localhost:8083/demo/admin/goods/catAndBrand 2. 查询dts_category表下L1的所有类别 3. 通过L1类别下的id查询下级了别商品,查出来后Set进子节点 4. 牌商获取需要控制数据权限,如果是店铺管理员下拉的品牌商只能选择当前用户可管理的品牌商 - 添加:http://localhost:8083/demo/admin/goods/create 注意:添加商品的时候图片可随意上不上传,但是不上传图片会导致数据库添加图片到数据库的时候报错,但是不影响商品入库 - 商品规格表Dts_goods_specification - 商品参数表Dts_goods_attribute - 商品货品表Dts_product #### 商品上架 商品上架参考商品列表添加功能,**商品上架**只是把**商品列表**中的添加给分离出来了 #### 商品评论 http://localhost:8083/demo/admin/comment/list?page=1&limit=20&sort=add_time&order=desc:评论列表 流程步骤: 1. 查询当前登录用户是否为品牌商管理员,如果是该管理员,判断该用户是否管理任务店铺,如果未管理任何店铺则return null; 2. 如果是超级管理员: 1. 查询评论表获取评论信息返回 查询与评论列表同理 删除功能:获取评论id数据库删除 ### 1.5 推广管理 #### 公告列表 http://localhost:8083/demo/admin/article/list 公告列表 http://localhost:8083/demo/admin/article/create:添加公告/通知 添加公告/通知: - url:http://localhost:8083/demo/admin/article/create - 判断传入的title是否存在,存在则return - 如果不存在,并且没有填写任何类型则默认为信息公告 删除公告: - 通过传入的Id进行删除 #### 发布公告 将公告列表中的添加公告单独分离出来为一个页面 #### 广告管理 数据库表:dts_ad 列表/搜索: - url: http://localhost:8083/demo/admin/ad/list?page=1&limit=20&sort=add_time&order=desc - 搜索:广告标题与广告内容模糊搜索 编辑: - url:http://localhost:8083/demo/admin/ad/update - 根据传入的广告id进行搜索 **删除:** - url:http://localhost:8083/demo/admin/ad/delete - 根据传入的广告id进行删除 #### 优惠券管理 数据库表:dts_coupon 列表/搜索: - url:http://localhost:8083/demo/admin/coupon/list?page=1&limit=20&sort=add_time&order=desc - 根据优惠券名、类型、状态进行查询 详细: - url1:http://localhost:8083/demo/admin/coupon/read?id=11 - 根据用户点击的那个商品的ID查询该优惠券的详细信息 - url2:http://localhost:8083/demo/admin/coupon/listuser?page=1&limit=20&couponId=11&sort=add_time&order=desc - 根据用户id、优惠券使用状态查询 编辑/删除: - url:http://localhost:8083/demo/admin/coupon/update - 根据优惠券id进行编辑/删除 ### 1.6 联系管理 #### 管理员 数据库表:**dts_role** 列表: - url:http://localhost:8083/demo/admin/role/options - 默认查询所有 添加: - url:http://localhost:8083/demo/admin/admin/create - 1. 通过username(用户名)查询数据库是不是存在这个用户,如果存在直接返回错误信息 2. 不存在该用户的时候,使用BCrypt将密码加密入库 编辑: - http://localhost:8083/demo/admin/admin/update - 根据ID查询获取用户密码,再将新密码BCrypt加密入库 删除: - http://localhost:8083/demo/admin/admin/delete - 根据用户id删除 #### 角色管理 数据库表:**dts_permission** 列表/搜索: - url:http://localhost:8083/demo/admin/role/list?page=1&limit=20&sort=add_time&order=desc - 角色名模糊查询 **授权**:重点 - url:http://localhost:8083/demo/admin/role/permissions 【get与post两个相同】 - get查询是重点 - 如果传入的管理员id不是超级管理员并且想要修改为超级管理员,则返回空,(只要超级管理员才可以随意修改权限) - 如果是普通管理员想要更改权限,则先删除旧的权限然后添加新的权限