From abd19b59926737dad2ca58331bcf38a2f3d1d32b Mon Sep 17 00:00:00 2001
From: Pu Zhibing <393733352@qq.com>
Date: 星期一, 25 十一月 2024 11:14:34 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'
---
ruoyi-service/ruoyi-other/src/main/resources/mapper/other/ShoppingCartMapper.xml | 8 ++
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/ShareController.java | 10 +-
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/ShoppingCartService.java | 7 +
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/ShopService.java | 4 +
ruoyi-api/ruoyi-api-other/src/main/java/com/ruoyi/other/api/domain/ShoppingCart.java | 27 ++++++
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/vo/NearbyShopVO.java | 24 ++++++
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/ShopController.java | 16 +++
ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/controller/OrderController.java | 4
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/vo/GoodsVO.java | 10 ++
ruoyi-service/ruoyi-other/src/main/resources/mapper/other/ShopMapper.xml | 8 ++
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/SeckillActivityInfoController.java | 4
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/GoodsCategoryController.java | 2
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/impl/ShoppingCartServiceImpl.java | 11 ++
ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/controller/WithdrawalRequestsController.java | 4 +
ruoyi-api/ruoyi-api-other/src/main/java/com/ruoyi/other/api/domain/Shop.java | 8 ++
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/ShoppingCartController.java | 11 ++
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/TechnicianSubscribeController.java | 4
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/impl/ShopServiceImpl.java | 10 ++
ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/service/BalanceChangeRecordService.java | 1
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/mapper/ShopMapper.java | 4 +
ruoyi-api/ruoyi-api-account/src/main/java/com/ruoyi/account/api/model/BalanceChangeRecord.java | 2
ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/controller/WalletController.java | 7 -
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/GoodsController.java | 7 +
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/mapper/ShoppingCartMapper.java | 7 +
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/impl/GoodsServiceImpl.java | 2
25 files changed, 177 insertions(+), 25 deletions(-)
diff --git a/ruoyi-api/ruoyi-api-account/src/main/java/com/ruoyi/account/api/model/BalanceChangeRecord.java b/ruoyi-api/ruoyi-api-account/src/main/java/com/ruoyi/account/api/model/BalanceChangeRecord.java
index 4fc25b6..8de1bfd 100644
--- a/ruoyi-api/ruoyi-api-account/src/main/java/com/ruoyi/account/api/model/BalanceChangeRecord.java
+++ b/ruoyi-api/ruoyi-api-account/src/main/java/com/ruoyi/account/api/model/BalanceChangeRecord.java
@@ -21,7 +21,7 @@
private static final long serialVersionUID = 1L;
@ApiModelProperty("主键")
- @TableId(type = IdType.AUTO)
+ @TableId
private Long id;
@ApiModelProperty("用户id")
diff --git a/ruoyi-api/ruoyi-api-other/src/main/java/com/ruoyi/other/api/domain/Shop.java b/ruoyi-api/ruoyi-api-other/src/main/java/com/ruoyi/other/api/domain/Shop.java
index 62d0f17..b44742a 100644
--- a/ruoyi-api/ruoyi-api-other/src/main/java/com/ruoyi/other/api/domain/Shop.java
+++ b/ruoyi-api/ruoyi-api-other/src/main/java/com/ruoyi/other/api/domain/Shop.java
@@ -50,6 +50,14 @@
@TableField("end_time")
private String endTime;
+ @ApiModelProperty(value = "封面图片")
+ @TableField("home_picture")
+ private String homePicture;
+
+ @ApiModelProperty(value = "详情图,多个逗号分隔")
+ @TableField("details_picture")
+ private String detailsPicture;
+
@ApiModelProperty(value = "店长姓名")
@TableField("shop_manager")
private String shopManager;
diff --git a/ruoyi-api/ruoyi-api-other/src/main/java/com/ruoyi/other/api/domain/ShoppingCart.java b/ruoyi-api/ruoyi-api-other/src/main/java/com/ruoyi/other/api/domain/ShoppingCart.java
new file mode 100644
index 0000000..410c4df
--- /dev/null
+++ b/ruoyi-api/ruoyi-api-other/src/main/java/com/ruoyi/other/api/domain/ShoppingCart.java
@@ -0,0 +1,27 @@
+package com.ruoyi.other.api.domain;
+
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+import java.io.Serializable;
+
+@Data
+@EqualsAndHashCode(callSuper = false)
+@TableName("t_shopping_cart")
+@ApiModel(value = "购物车对象", description = "")
+public class ShoppingCart implements Serializable {
+ private static final long serialVersionUID = 1L;
+ @ApiModelProperty("主键")
+ @TableId
+ private Long id;
+ @ApiModelProperty("用户id")
+ private Long appUserId;
+ @ApiModelProperty("商品id")
+ private Long goodsId;
+ @ApiModelProperty("数量")
+ private Integer number;
+}
diff --git a/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/controller/WalletController.java b/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/controller/WalletController.java
index 4249bdd..e6c1e7f 100644
--- a/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/controller/WalletController.java
+++ b/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/controller/WalletController.java
@@ -9,14 +9,11 @@
import com.ruoyi.common.security.utils.SecurityUtils;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
-import io.swagger.annotations.ApiParam;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
-import java.math.BigDecimal;
@Api("钱包")
@RestController
@@ -29,7 +26,7 @@
* 钱包详情
*/
@GetMapping("detail")
- @ApiOperation(value = "钱包详情", notes = "钱包详情")
+ @ApiOperation(value = "钱包详情", notes = "钱包详情", tags = {"小程序-个人中心-我的钱包-钱包详情"})
public AjaxResult detail() {
Long userId = SecurityUtils.getUserId();
// TODO 查询钱包详情
@@ -40,7 +37,7 @@
/**
* 变更明细
*/
- @ApiOperation(value = "变更明细", notes = "变更明细")
+ @ApiOperation(value = "变更明细", notes = "变更明细", tags = {"小程序-个人中心-我的钱包-变更记录"})
@GetMapping("change")
public AjaxResult change() {
Long userId = SecurityUtils.getUserId();
diff --git a/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/controller/WithdrawalRequestsController.java b/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/controller/WithdrawalRequestsController.java
index cd736a2..10b48d1 100644
--- a/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/controller/WithdrawalRequestsController.java
+++ b/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/controller/WithdrawalRequestsController.java
@@ -4,6 +4,8 @@
import com.ruoyi.account.dto.WithdrawalRequestsDTO;
import com.ruoyi.account.service.WithdrawalRequestsService;
import com.ruoyi.common.core.web.domain.AjaxResult;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
@@ -21,6 +23,7 @@
*/
@RestController
@RequestMapping("/withdrawal-requests")
+@Api(tags = "提现申请")
public class WithdrawalRequestsController {
@Resource
@@ -30,6 +33,7 @@
* 提现申请
*/
@PostMapping("/withdrawalApply")
+ @ApiOperation(value = "提现申请", tags = {"提现申请-小程序"})
public AjaxResult withdrawalApply(@RequestBody WithdrawalRequestsDTO params){
withdrawalRequestsService.withdrawalApply(params);
return AjaxResult.success();
diff --git a/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/service/BalanceChangeRecordService.java b/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/service/BalanceChangeRecordService.java
index 8f104f6..d5e6f2a 100644
--- a/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/service/BalanceChangeRecordService.java
+++ b/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/service/BalanceChangeRecordService.java
@@ -2,7 +2,6 @@
import com.baomidou.mybatisplus.extension.service.IService;
import com.ruoyi.account.api.model.BalanceChangeRecord;
-import com.ruoyi.account.api.model.UserAddress;
public interface BalanceChangeRecordService extends IService<BalanceChangeRecord> {
}
diff --git a/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/controller/OrderController.java b/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/controller/OrderController.java
index 1d3b5e8..a15a2b2 100644
--- a/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/controller/OrderController.java
+++ b/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/controller/OrderController.java
@@ -33,13 +33,13 @@
/**
* 扫码校验
*/
- @ApiOperation(value = "扫码校验", tags = {"订单核销"})
+ @ApiOperation(value = "扫码校验", tags = {"小程序-个人中心-门店管理-扫码核销校验"})
@ApiImplicitParams({
@ApiImplicitParam(value = "分享id", name = "shareId", required = true, dataType = "int"),
})
@GetMapping("/check/{orderId}/{shopId}")
public AjaxResult check(@PathVariable("orderId") Integer orderId, @PathVariable("shopId") Integer shopId){
- return AjaxResult.success(orderService.check(orderId, shopId));
+ return AjaxResult.ok(orderService.check(orderId, shopId));
}
/**
diff --git a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/GoodsCategoryController.java b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/GoodsCategoryController.java
index 543d206..831a2f0 100644
--- a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/GoodsCategoryController.java
+++ b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/GoodsCategoryController.java
@@ -27,7 +27,7 @@
private GoodsCategoryService goodsCategoryService;
@GetMapping("/list")
- @ApiOperation(value = "商品分类列表")
+ @ApiOperation(value = "商品分类列表", tags = {"小程序-商城-商城-首页-筛选"})
public AjaxResult list(){
return AjaxResult.success(goodsCategoryService.list());
}
diff --git a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/GoodsController.java b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/GoodsController.java
index b1e5697..1a5b4f5 100644
--- a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/GoodsController.java
+++ b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/GoodsController.java
@@ -34,7 +34,7 @@
* 商品列表
*/
@GetMapping("/goodsList")
- @ApiOperation(value = "商品列表")
+ @ApiOperation(value = "商品列表", tags = {"小程序-商城-首页-热门商品列表"})
public TableDataInfo goodsList(Goods goods){
startPage();
return getDataTable(goodsService.goodsList(goods));
@@ -44,8 +44,9 @@
* 商品详情
*/
@GetMapping("/goodsDetail/{goodsId}")
- public AjaxResult goodsDetail(@PathVariable("goodsId") Integer goodsId){
- return success(goodsService.getById(goodsId));
+ @ApiOperation(value = "商品详情", tags = {"小程序-商城-首页-商品详情"})
+ public AjaxResult goodsDetail(@PathVariable("goodsId") Long goodsId){
+ return success(goodsService.goodsDetail(goodsId));
}
diff --git a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/SeckillActivityInfoController.java b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/SeckillActivityInfoController.java
index d279e1c..95242a8 100644
--- a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/SeckillActivityInfoController.java
+++ b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/SeckillActivityInfoController.java
@@ -33,7 +33,7 @@
* 秒杀活动列表
*/
@GetMapping("/list")
- @ApiOperation(value = "秒杀活动列表")
+ @ApiOperation(value = "秒杀活动列表",tags = {"小程序-商城-首页-秒杀活动列表"})
public AjaxResult list(Goods goods)
{
startPage();
@@ -44,7 +44,7 @@
* 秒杀活动详情
*/
@GetMapping("/detail/{id}")
- @ApiOperation(value = "秒杀活动详情")
+ @ApiOperation(value = "秒杀活动详情", tags = {"小程序-商城-首页-秒杀活动列表-秒杀活动详情"})
public AjaxResult detail(@PathVariable("id") Integer id)
{
return AjaxResult.success(seckillActivityInfoService.detail(id));
diff --git a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/ShareController.java b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/ShareController.java
index 5087e0c..d0df98b 100644
--- a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/ShareController.java
+++ b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/ShareController.java
@@ -34,7 +34,7 @@
/**
* 分享列表
*/
- @ApiOperation(value = "分享列表", tags = {"分享"})
+ @ApiOperation(value = "分享列表", tags = {"小程序-个人中心-门店管理-分享列表"})
@ApiImplicitParams({
@ApiImplicitParam(value = "对象id(addType=1:平台添加,addType=2:推广人添加,addType=3:门店添加)", name = "objectId", required = true, dataType = "int"),
})
@@ -48,7 +48,7 @@
/**
* 分享添加
*/
- @ApiOperation(value = "分享添加", tags = {"分享"})
+ @ApiOperation(value = "小程序-个人中心-门店管理-分享添加", tags = {"分享添加-小程序"})
@PostMapping
public AjaxResult add(@RequestBody Share share){
share.setAddType(ShareAddType.STORE.getCode());
@@ -61,7 +61,7 @@
/**
* 分享删除
*/
- @ApiOperation(value = "分享删除", tags = {"分享"})
+ @ApiOperation(value = "分享删除", tags = {"小程序-个人中心-门店管理-分享删除-小程序"})
@DeleteMapping
public AjaxResult delete(@RequestBody Share share){
return toAjax(shareService.removeById(share));
@@ -70,7 +70,7 @@
/**
* 分享编辑
*/
- @ApiOperation(value = "分享编辑", tags = {"分享"})
+ @ApiOperation(value = "分享编辑", tags = {"小程序-个人中心-门店管理-分享编辑-小程序"})
@PutMapping
public AjaxResult edit(@RequestBody Share share){
share.setAuditStatus(ShareAuditStatus.WAIT.getCode());
@@ -80,7 +80,7 @@
/**
* 分享详情
*/
- @ApiOperation(value = "分享详情", tags = {"分享"})
+ @ApiOperation(value = "分享详情", tags = {"小程序-个人中心-门店管理-分享详情-小程序"})
@GetMapping("/detail/{id}")
public AjaxResult detail(@PathVariable("id") Integer id){
return AjaxResult.success(shareService.getById(id));
diff --git a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/ShopController.java b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/ShopController.java
index 997c576..fd5ea9f 100644
--- a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/ShopController.java
+++ b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/ShopController.java
@@ -42,12 +42,22 @@
@Resource
private AppUserClient appUserClient;
+ /**
+ * 附近门店列表
+ */
+ @GetMapping("/nearbyShopList")
+ @ApiOperation(value = "附近门店列表", tags = {"小程序-首页-附近门店列表"})
+ public AjaxResult nearbyShopList(@ApiParam("经度") @RequestParam String longitude,
+ @ApiParam("纬度") @RequestParam String latitude){
+ return success(shopService.nearbyShopList(longitude,latitude));
+ }
+
/**
* 指定门店技师列表
*/
@GetMapping("/technicianList")
- @ApiOperation(value = "技师列表", tags = {"技师"})
+ @ApiOperation(value = "技师列表", tags = {"技师列表-小程序"})
public AjaxResult technicianList(@ApiParam("门店id") @RequestParam String shopId){
return success(technicianService.list(new LambdaQueryWrapper<Technician>()
.eq(Technician::getShopId,shopId)
@@ -59,7 +69,7 @@
* 查询当前店长所属门店
*/
@GetMapping("/shopByUser")
- @ApiOperation(value = "查询当前店长所属门店", tags = {"门店"})
+ @ApiOperation(value = "查询当前店长所属门店", tags = {"小程序-个人中心-首页-关联门店列表"})
public AjaxResult shopByUser(){
List<Shop> list = shopService.list(new LambdaQueryWrapper<Shop>()
.eq(Shop::getAppUserId, SecurityUtils.getUserId())
@@ -71,7 +81,7 @@
* 绑定门店
*/
@GetMapping("/bindShop")
- @ApiOperation(value = "绑定门店", tags = {"门店"})
+ @ApiOperation(value = "绑定门店", tags = {"小程序-个人中心-绑定门店"})
public AjaxResult bindShop(@ApiParam("门店id") @RequestParam Long shopId){
AppUser appUser = appUserClient.getAppUserById(SecurityUtils.getUserId());
appUser.setShopId(shopId);
diff --git a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/ShoppingCartController.java b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/ShoppingCartController.java
new file mode 100644
index 0000000..2a4fb7f
--- /dev/null
+++ b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/ShoppingCartController.java
@@ -0,0 +1,11 @@
+package com.ruoyi.other.controller;
+
+import io.swagger.annotations.Api;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+@RestController
+@RequestMapping("/shopping-cart")
+@Api(tags = "购物车")
+public class ShoppingCartController {
+}
diff --git a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/TechnicianSubscribeController.java b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/TechnicianSubscribeController.java
index fa6bdcb..36b76f0 100644
--- a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/TechnicianSubscribeController.java
+++ b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/TechnicianSubscribeController.java
@@ -39,7 +39,7 @@
* 预约列表
*/
@GetMapping("/list")
- @ApiOperation(value = "预约列表", notes = "预约列表")
+ @ApiOperation(value = "预约列表", notes = "预约列表", tags = {"小程序-个人中心-门店管理-预约列表"})
public TableDataInfo list(@ApiParam(value = "状态") @RequestParam Integer status,
@ApiParam(value = "门店id") @RequestParam Long shopId){
startPage();
@@ -52,7 +52,7 @@
* 取消服务
*/
@GetMapping("/cancel")
- @ApiOperation(value = "取消服务", notes = "取消服务")
+ @ApiOperation(value = "取消服务", notes = "取消服务", tags = {"小程序-个人中心-门店管理-预约列表-取消服务"})
public AjaxResult cancel(@ApiParam(value = "预约id") @RequestParam Long id){
TechnicianSubscribe subscribe = technicianSubscribeService.getOne(new LambdaQueryWrapper<TechnicianSubscribe>()
diff --git a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/mapper/ShopMapper.java b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/mapper/ShopMapper.java
index ce002fe..6f6779b 100644
--- a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/mapper/ShopMapper.java
+++ b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/mapper/ShopMapper.java
@@ -2,6 +2,9 @@
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ruoyi.other.api.domain.Shop;
+import com.ruoyi.other.vo.NearbyShopVO;
+
+import java.util.List;
/**
* <p>
@@ -13,4 +16,5 @@
*/
public interface ShopMapper extends BaseMapper<Shop> {
+ List<NearbyShopVO> selectNearbyShopList(String longitude, String latitude);
}
diff --git a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/mapper/ShoppingCartMapper.java b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/mapper/ShoppingCartMapper.java
new file mode 100644
index 0000000..8c645e2
--- /dev/null
+++ b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/mapper/ShoppingCartMapper.java
@@ -0,0 +1,7 @@
+package com.ruoyi.other.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.ruoyi.other.api.domain.ShoppingCart;
+
+public interface ShoppingCartMapper extends BaseMapper<ShoppingCart> {
+}
diff --git a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/ShopService.java b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/ShopService.java
index 18e887f..d563bbe 100644
--- a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/ShopService.java
+++ b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/ShopService.java
@@ -2,6 +2,9 @@
import com.baomidou.mybatisplus.extension.service.IService;
import com.ruoyi.other.api.domain.Shop;
+import com.ruoyi.other.vo.NearbyShopVO;
+
+import java.util.List;
/**
* <p>
@@ -13,4 +16,5 @@
*/
public interface ShopService extends IService<Shop> {
+ List<NearbyShopVO> nearbyShopList(String longitude, String latitude);
}
diff --git a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/ShoppingCartService.java b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/ShoppingCartService.java
new file mode 100644
index 0000000..fdaa67b
--- /dev/null
+++ b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/ShoppingCartService.java
@@ -0,0 +1,7 @@
+package com.ruoyi.other.service;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.ruoyi.other.api.domain.ShoppingCart;
+
+public interface ShoppingCartService extends IService<ShoppingCart> {
+}
diff --git a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/impl/GoodsServiceImpl.java b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/impl/GoodsServiceImpl.java
index 5a4f87e..aff730b 100644
--- a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/impl/GoodsServiceImpl.java
+++ b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/impl/GoodsServiceImpl.java
@@ -50,10 +50,12 @@
@Override
public GoodsVO goodsDetail(Long goodsId) {
+ // TODO 根据会员等级展示价格
Goods goods = this.getById(goodsId);
if (Objects.nonNull(goods)){
GoodsVO goodsVO = new GoodsVO();
BeanUtils.copyBeanProp(goodsVO, goods);
+ return goodsVO;
}
return new GoodsVO();
}
diff --git a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/impl/ShopServiceImpl.java b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/impl/ShopServiceImpl.java
index 1313a27..c5f851b 100644
--- a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/impl/ShopServiceImpl.java
+++ b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/impl/ShopServiceImpl.java
@@ -4,7 +4,11 @@
import com.ruoyi.other.mapper.ShopMapper;
import com.ruoyi.other.api.domain.Shop;
import com.ruoyi.other.service.ShopService;
+import com.ruoyi.other.vo.NearbyShopVO;
import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+import java.util.List;
/**
* <p>
@@ -16,5 +20,11 @@
*/
@Service
public class ShopServiceImpl extends ServiceImpl<ShopMapper, Shop> implements ShopService {
+ @Resource
+ private ShopMapper shopMapper;
+ @Override
+ public List<NearbyShopVO> nearbyShopList(String longitude, String latitude) {
+ return shopMapper.selectNearbyShopList(longitude,latitude);
+ }
}
diff --git a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/impl/ShoppingCartServiceImpl.java b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/impl/ShoppingCartServiceImpl.java
new file mode 100644
index 0000000..887ae3f
--- /dev/null
+++ b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/impl/ShoppingCartServiceImpl.java
@@ -0,0 +1,11 @@
+package com.ruoyi.other.service.impl;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.ruoyi.other.api.domain.ShoppingCart;
+import com.ruoyi.other.mapper.ShoppingCartMapper;
+import com.ruoyi.other.service.ShoppingCartService;
+import org.springframework.stereotype.Service;
+
+@Service
+public class ShoppingCartServiceImpl extends ServiceImpl<ShoppingCartMapper, ShoppingCart> implements ShoppingCartService {
+}
diff --git a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/vo/GoodsVO.java b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/vo/GoodsVO.java
index 228f113..03308d7 100644
--- a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/vo/GoodsVO.java
+++ b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/vo/GoodsVO.java
@@ -17,6 +17,9 @@
@ApiModelProperty(value = "商品名称")
private String goodsName;
+ @ApiModelProperty(value = "限购数量(-1不限购)")
+ private Integer purchaseLimit;
+
@ApiModelProperty(value = "类型(1=服务商品,2=单品商品)")
private Integer type;
@@ -32,6 +35,13 @@
@ApiModelProperty(value = "详情图,多个逗号分隔")
private String detailPicture;
+ @ApiModelProperty(value = "积分支付(0=否,1=是)")
+ private Integer pointPayment;
+
+ @ApiModelProperty(value = "基础积分")
+ @TableField("integral")
+ private Integer integral;
+
@ApiModelProperty(value = "划线价")
private BigDecimal originalPrice;
diff --git a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/vo/NearbyShopVO.java b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/vo/NearbyShopVO.java
new file mode 100644
index 0000000..8c2dfb1
--- /dev/null
+++ b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/vo/NearbyShopVO.java
@@ -0,0 +1,24 @@
+package com.ruoyi.other.vo;
+
+import com.baomidou.mybatisplus.annotation.TableField;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+@Data
+public class NearbyShopVO {
+
+ @ApiModelProperty(value = "门店id")
+ private Integer id;
+
+ @ApiModelProperty(value = "封面图片")
+ private String homePicture;
+
+ @ApiModelProperty(value = "门店名称")
+ private String name;
+
+ @ApiModelProperty(value = "详细地址")
+ private String address;
+
+ @ApiModelProperty(value = "距离")
+ private String distance;
+}
diff --git a/ruoyi-service/ruoyi-other/src/main/resources/mapper/other/ShopMapper.xml b/ruoyi-service/ruoyi-other/src/main/resources/mapper/other/ShopMapper.xml
new file mode 100644
index 0000000..6026678
--- /dev/null
+++ b/ruoyi-service/ruoyi-other/src/main/resources/mapper/other/ShopMapper.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.ruoyi.other.mapper.ShopMapper">
+
+ <select id="selectNearbyShopList" resultType="com.ruoyi.other.vo.NearbyShopVO">
+
+ </select>
+</mapper>
\ No newline at end of file
diff --git a/ruoyi-service/ruoyi-other/src/main/resources/mapper/other/ShoppingCartMapper.xml b/ruoyi-service/ruoyi-other/src/main/resources/mapper/other/ShoppingCartMapper.xml
new file mode 100644
index 0000000..2182ba7
--- /dev/null
+++ b/ruoyi-service/ruoyi-other/src/main/resources/mapper/other/ShoppingCartMapper.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.ruoyi.other.mapper.ShoppingCartMapper">
+
+ <select id="selectNearbyShopList" resultType="com.ruoyi.other.vo.NearbyShopVO">
+
+ </select>
+</mapper>
\ No newline at end of file
--
Gitblit v1.7.1