浏览代码

调整修改

傅行帆 4 年前
父节点
当前提交
433f24e329

+ 2815
- 0
logs/spring-boot-plus-2020-09-10.0.log
文件差异内容过多而无法显示
查看文件


+ 4
- 0
logs/spring-boot-plus-error-2020-09-10.0.log 查看文件

@@ -0,0 +1,4 @@
1
+2020-09-10 22:10:19.762 ERROR [http-nio-8888-exec-17] [] i.g.s.handler.GlobalExceptionHandler     244 : 异常来源:ip: 192.168.31.172, path: /api/sysUser/update
2
+2020-09-10 22:10:19.764 ERROR [http-nio-8888-exec-17] [] i.g.s.handler.GlobalExceptionHandler     76 : errorCode: 5001, errorMessage: 请求参数校验异常:["ID不能为空","手机号码不能为空","角色id不能为空","部门id不能为空"]
3
+2020-09-10 22:16:49.209 ERROR [http-nio-8888-exec-30] [] i.g.s.handler.GlobalExceptionHandler     244 : 异常来源:ip: 192.168.31.172, path: /api/taShop/update
4
+2020-09-10 22:16:49.210 ERROR [http-nio-8888-exec-30] [] i.g.s.handler.GlobalExceptionHandler     76 : errorCode: 5001, errorMessage: 请求参数校验异常:["shopId不能为空","店主不能为空","店铺名称不能为空"]

+ 1497
- 4
logs/spring-boot-plus-error.log
文件差异内容过多而无法显示
查看文件


+ 2206
- 2576
logs/spring-boot-plus.log
文件差异内容过多而无法显示
查看文件


+ 5
- 0
lottery/src/main/java/com/lottery/customer/param/TaCustomerBillPageParam.java 查看文件

@@ -20,4 +20,9 @@ import io.geekidea.springbootplus.framework.core.pagination.BasePageOrderParam;
20 20
 @ApiModel(value = "客户账单流水分页参数")
21 21
 public class TaCustomerBillPageParam extends BasePageOrderParam {
22 22
     private static final long serialVersionUID = 1L;
23
+
24
+    /**
25
+     * 客户id
26
+     */
27
+    private String customerId;
23 28
 }

+ 3
- 2
lottery/src/main/java/com/lottery/shop/controller/TaShopController.java 查看文件

@@ -2,6 +2,7 @@ package com.lottery.shop.controller;
2 2
 
3 3
 import com.lottery.shop.entity.TaShop;
4 4
 import com.lottery.shop.service.TaShopService;
5
+import com.lottery.shop.vo.TaShopVo;
5 6
 import lombok.extern.slf4j.Slf4j;
6 7
 import com.lottery.shop.param.TaShopPageParam;
7 8
 import io.geekidea.springbootplus.framework.common.controller.BaseController;
@@ -76,8 +77,8 @@ public class TaShopController extends BaseController {
76 77
     @GetMapping("/info/{id}")
77 78
     @OperationLog(name = "店铺 详情", type = OperationLogType.INFO)
78 79
     @ApiOperation(value = "店铺 详情", response = TaShop.class)
79
-    public ApiResult<TaShop> getTaShop(@PathVariable("id") Long id) throws Exception {
80
-        TaShop taShop = taShopService.getById(id);
80
+    public ApiResult<TaShopVo> getTaShop(@PathVariable("id") Long id) throws Exception {
81
+        TaShopVo taShop = taShopService.getShopDetail(id);
81 82
         return ApiResult.ok(taShop);
82 83
     }
83 84
 

+ 2
- 0
lottery/src/main/java/com/lottery/shop/mapper/TaShopMapper.java 查看文件

@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
4 4
 import com.lottery.shop.entity.TaShop;
5 5
 import com.lottery.shop.param.TaShopPageParam;
6 6
 
7
+import com.lottery.shop.vo.TaShopVo;
7 8
 import org.springframework.stereotype.Repository;
8 9
 
9 10
 import com.baomidou.mybatisplus.core.metadata.IPage;
@@ -21,4 +22,5 @@ import java.io.Serializable;
21 22
 public interface TaShopMapper extends BaseMapper<TaShop> {
22 23
 
23 24
 
25
+    TaShopVo getShopDetail(@Param("id") Long id);
24 26
 }

+ 8
- 0
lottery/src/main/java/com/lottery/shop/service/TaShopService.java 查看文件

@@ -2,6 +2,7 @@ package com.lottery.shop.service;
2 2
 
3 3
 import com.lottery.shop.entity.TaShop;
4 4
 import com.lottery.shop.param.TaShopPageParam;
5
+import com.lottery.shop.vo.TaShopVo;
5 6
 import io.geekidea.springbootplus.framework.common.service.BaseService;
6 7
 import io.geekidea.springbootplus.framework.core.pagination.Paging;
7 8
 
@@ -58,4 +59,11 @@ public interface TaShopService extends BaseService<TaShop> {
58 59
      * @return
59 60
      */
60 61
     Map<String, Object> getLotteryList(Long id);
62
+
63
+    /**
64
+     * 获取商店详情信息
65
+     * @param id
66
+     * @return
67
+     */
68
+    TaShopVo getShopDetail(Long id);
61 69
 }

+ 12
- 0
lottery/src/main/java/com/lottery/shop/service/impl/TaShopServiceImpl.java 查看文件

@@ -6,6 +6,7 @@ import com.lottery.shop.mapper.TaShopMapper;
6 6
 import com.lottery.shop.service.TaShopService;
7 7
 import com.lottery.shop.param.TaShopPageParam;
8 8
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
9
+import com.lottery.shop.vo.TaShopVo;
9 10
 import com.lottery.type.entity.TaShopLottery;
10 11
 import com.lottery.type.entity.TdLottery;
11 12
 import com.lottery.type.mapper.TaShopLotteryMapper;
@@ -94,4 +95,15 @@ public class TaShopServiceImpl extends BaseServiceImpl<TaShopMapper, TaShop> imp
94 95
         return map;
95 96
     }
96 97
 
98
+    /**
99
+     * 获取商店详情信息
100
+     *
101
+     * @param id
102
+     * @return
103
+     */
104
+    @Override
105
+    public TaShopVo getShopDetail(Long id) {
106
+        return taShopMapper.getShopDetail(id);
107
+    }
108
+
97 109
 }

+ 35
- 0
lottery/src/main/java/com/lottery/shop/vo/TaShopVo.java 查看文件

@@ -0,0 +1,35 @@
1
+package com.lottery.shop.vo;
2
+
3
+import com.baomidou.mybatisplus.annotation.IdType;
4
+import com.baomidou.mybatisplus.annotation.TableId;
5
+import io.swagger.annotations.ApiModelProperty;
6
+import lombok.Data;
7
+
8
+import javax.validation.constraints.NotBlank;
9
+import javax.validation.constraints.NotNull;
10
+import java.util.Date;
11
+
12
+@Data
13
+public class TaShopVo {
14
+
15
+    @ApiModelProperty("店铺名称")
16
+    private String name;
17
+
18
+    @ApiModelProperty("详细地址")
19
+    private String address;
20
+
21
+    @ApiModelProperty("店主")
22
+    private Integer keeperName;
23
+
24
+    @ApiModelProperty("创建时间")
25
+    private Date createDate;
26
+
27
+    @ApiModelProperty("状态")
28
+    private Integer status;
29
+
30
+    @ApiModelProperty("店主手机号")
31
+    private String phone;
32
+
33
+    @ApiModelProperty("账户余额")
34
+    private Integer amount;
35
+}

+ 5
- 0
lottery/src/main/resources/mapper/customer/TaCustomerBillMapper.xml 查看文件

@@ -9,6 +9,11 @@
9 9
         FROM
10 10
         ta_customer_bill b
11 11
         LEFT JOIN ta_customer c ON b.customer_id = c.customer_id
12
+        <where>
13
+            <if test="param.customerId != null and param.customerId != ''">
14
+                and b.customer_id = #{param.customerId}
15
+            </if>
16
+        </where>
12 17
     </select>
13 18
 
14 19
 </mapper>

+ 15
- 1
lottery/src/main/resources/mapper/shop/TaShopMapper.xml 查看文件

@@ -1,5 +1,19 @@
1 1
 <?xml version="1.0" encoding="UTF-8"?>
2 2
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
3 3
 <mapper namespace="com.lottery.shop.mapper.TaShopMapper">
4
-
4
+        <select id="getShopDetail" resultType="com.lottery.shop.vo.TaShopVo">
5
+                SELECT
6
+                        t.name,
7
+                        t.address,
8
+                        t.create_date,
9
+                        t.`status`,
10
+                        s.name as keeper_name,
11
+                        s.phone,
12
+                        a.amount
13
+                FROM
14
+                ta_shop t
15
+                LEFT JOIN ta_shopkeeper s ON t.keeper_id = s.keeper_id
16
+                LEFT JOIN ta_shop_account a ON t.shop_id = a.shop_id
17
+                WHERE t.shop_id = #{id}
18
+        </select>
5 19
 </mapper>