Ver Fonte

会员列表

LuoDLeo há 3 meses atrás
pai
commit
f088e0ef86

+ 16 - 1
src/main/java/org/springblade/modules/api/controller/ApiMerchantUserController.java

@@ -23,6 +23,7 @@ import org.springblade.modules.api.response.MerchantPieRes;
 import org.springblade.modules.api.response.TurnoverRes;
 import org.springblade.modules.api.utils.TimeRangeReqUtils;
 import org.springblade.modules.api.vo.MerchantIncomeVO;
+import org.springblade.modules.api.vo.PageMemberVO;
 import org.springblade.modules.auth.enums.UserEnum;
 import org.springblade.modules.auth.utils.TokenUtil;
 import org.springblade.modules.system.entity.User;
@@ -35,7 +36,10 @@ import org.springframework.util.Assert;
 import org.springframework.web.bind.annotation.*;
 
 import javax.validation.Valid;
-import java.util.*;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
 
 /**
  * Author pangqijun
@@ -257,4 +261,15 @@ public class ApiMerchantUserController {
         return R.data(result);
     }
 
+    /**
+     * 商家端-会员列表
+     */
+    @GetMapping("/pageMember")
+    @ApiOperationSupport(order = 9)
+    @ApiOperation(value = "商家端-会员列表", notes = "商家端-会员列表")
+    public R<IPage<PageMemberVO>> pageMember(Query query) {
+        IPage<PageMemberVO> pages = iUserMerchantService.pageMember(Condition.getPage(query));
+        return R.data(pages);
+    }
+
 }

+ 88 - 0
src/main/java/org/springblade/modules/api/vo/PageMemberVO.java

@@ -0,0 +1,88 @@
+package org.springblade.modules.api.vo;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.math.BigDecimal;
+import java.time.LocalDateTime;
+
+@Data
+public class PageMemberVO implements Serializable {
+    /**
+     * 订单id
+     */
+    @ApiModelProperty(value = "订单id")
+    private Long orderId;
+    /**
+     * 商品id
+     */
+    @ApiModelProperty(value = "商品id")
+    private Long goodsId;
+    /**
+     * 商品数量
+     */
+    @ApiModelProperty(value = "商品数量")
+    private Integer goodsNum;
+    /**
+     * 商品名称
+     */
+    @ApiModelProperty(value = "商品名称")
+    private String goodsName;
+    /**
+     * 商品价格
+     */
+    @ApiModelProperty(value = "商品价格")
+    private BigDecimal goodsPrice;
+    /**
+     * 商品图片
+     */
+    @ApiModelProperty(value = "商品图片")
+    private String goodsImage;
+    /**
+     * 商品编号
+     */
+    @ApiModelProperty(value = "商品编号")
+    private String goodsNo;
+    /**
+     * 门店id
+     */
+    @ApiModelProperty(value = "门店id")
+    private Long shopId;
+    /**
+     * 门店名称
+     */
+    @ApiModelProperty(value = "门店名称")
+    private String storeName;
+    /**
+     * 设备id
+     */
+    @ApiModelProperty(value = "设备id")
+    private Long deviceId;
+    /**
+     * 设备名称
+     */
+    @ApiModelProperty(value = "设备名称")
+    private String deviceName;
+    /**
+     * 用户id
+     */
+    @ApiModelProperty(value = "用户id")
+    private Long userId;
+    /**
+     * 货道id
+     */
+    @ApiModelProperty(value = "货道id")
+    private Long cargoWayId;
+    /**
+     * 货道id
+     */
+    @ApiModelProperty(value = "货道编号")
+    private String cargoWayNo;
+    /**
+     * 出货时间
+     */
+    @ApiModelProperty(value = "出货时间")
+    private LocalDateTime shippingTime;
+
+}

+ 3 - 0
src/main/java/org/springblade/modules/system/mapper/UserMerchantMapper.java

@@ -18,6 +18,7 @@ package org.springblade.modules.system.mapper;
 
 import org.apache.ibatis.annotations.Param;
 import org.springblade.modules.api.vo.MerchantIncomeVO;
+import org.springblade.modules.api.vo.PageMemberVO;
 import org.springblade.modules.system.entity.UserMerchant;
 import org.springblade.modules.system.vo.UserMerchantVO;
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
@@ -43,4 +44,6 @@ public interface UserMerchantMapper extends BaseMapper<UserMerchant> {
 
 	List<MerchantIncomeVO> pageIncome(IPage<MerchantIncomeVO> page, @Param("merchantId") Long merchantId);
 
+	List<PageMemberVO> pageMember(IPage<PageMemberVO> page);
+
 }

+ 21 - 0
src/main/java/org/springblade/modules/system/mapper/UserMerchantMapper.xml

@@ -59,4 +59,25 @@
           and a.merchant_id = #{merchantId}
     </select>
 
+    <select id="pageMember" resultType="org.springblade.modules.api.vo.PageMemberVO">
+        select a.order_id,
+               a.goods_id,
+               a.goods_num,
+               a.goods_name,
+               a.goods_price,
+               a.goods_image,
+               a.goods_no,
+               a.shop_id,
+               a.store_name,
+               a.device_id,
+               b.facility_name as deviceName,
+               a.cargo_way_id,
+               c.cargo_no      as cargoWayNo
+        from t_order_goods a
+                 left join t_facility b on a.device_id = b.id
+                 left join t_facility_cargo_way c on a.cargo_way_id = c.id
+        where a.is_delete = 0
+          and a.merchant_id = #{merchantId}
+    </select>
+
 </mapper>

+ 8 - 0
src/main/java/org/springblade/modules/system/service/IUserMerchantService.java

@@ -17,6 +17,7 @@
 package org.springblade.modules.system.service;
 
 import org.springblade.modules.api.vo.MerchantIncomeVO;
+import org.springblade.modules.api.vo.PageMemberVO;
 import org.springblade.modules.system.entity.UserMerchant;
 import org.springblade.modules.system.vo.UserMerchantVO;
 import com.baomidou.mybatisplus.extension.service.IService;
@@ -70,4 +71,11 @@ public interface IUserMerchantService extends IService<UserMerchant> {
 	 */
 	Map<String, String> getCash();
 
+	/**
+	 * 会员列表分页
+	 * @param page
+	 * @return
+	 */
+    IPage<PageMemberVO> pageMember(IPage<PageMemberVO> page);
+
 }

+ 6 - 0
src/main/java/org/springblade/modules/system/service/impl/UserMerchantServiceImpl.java

@@ -20,6 +20,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.core.toolkit.Wrappers;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import org.springblade.modules.api.vo.MerchantIncomeVO;
+import org.springblade.modules.api.vo.PageMemberVO;
 import org.springblade.modules.system.entity.UserMerchant;
 import org.springblade.modules.system.mapper.UserMerchantMapper;
 import org.springblade.modules.system.service.IUserMerchantService;
@@ -79,4 +80,9 @@ public class UserMerchantServiceImpl extends ServiceImpl<UserMerchantMapper, Use
 		return result;
 	}
 
+	@Override
+	public IPage<PageMemberVO> pageMember(IPage<PageMemberVO> page) {
+		return page.setRecords(baseMapper.pageMember(page));
+	}
+
 }