liu 1 год назад
Родитель
Сommit
ec93196c96

+ 8 - 1
src/main/java/com/sqx/modules/app/entity/UserMoneyDetails.java

@@ -127,5 +127,12 @@ public class UserMoneyDetails implements Serializable {
     @TableField(exist = false)
     private BigDecimal orderNumber;
 
-
+    /**
+     * 订单id
+     */
+    /**
+     * 订单号
+     */
+    @TableField(exist = false)
+    private BigDecimal orderId;
 }

+ 3 - 0
src/main/java/com/sqx/modules/app/service/impl/UserMoneyDetailsServiceImpl.java

@@ -96,10 +96,13 @@ public class UserMoneyDetailsServiceImpl extends ServiceImpl<UserMoneyDetailsDao
 //        数据
         iPage.setRecords(userMoneyDetailsList);
 //        总页数
+
         iPage.setPages((int)Math.ceil((double)total/limit));
 //        总数
         iPage.setTotal(total);
         PageUtils pageUtils = new PageUtils(iPage);
+        List<?> list = pageUtils.getList();
+        System.out.println("list = " + list);
         return pageUtils;
     }
 }

+ 0 - 1
src/main/java/com/sqx/modules/shop/controller/app/ShopMoneyController.java

@@ -183,7 +183,6 @@ public class ShopMoneyController extends AbstractController {
     @GetMapping(value = "/accountEntryManagement")
     @ApiOperation("入账管理")
     public Result accountEntryManagement(Integer page, Integer limit,String shopName,String shopPhone,String userPhone,String couponName,String orderNumber,String startTime,String endTime){
-        System.out.println("入账管理");
         PageUtils pageUtils = userMoneyDetailsService.accountEntryManagementDetails(page, limit, shopName, shopPhone, userPhone, couponName, orderNumber, startTime, endTime);
         return Result.success().put("data", pageUtils);
     }

+ 5 - 5
src/main/resources/mapper/userMoney/UserMoneyDetailsMapper.xml

@@ -137,7 +137,7 @@
         LEFT JOIN activity_part_record apr on apr.order_id = tbo.order_id
         where 1 = 1
         <if test="shopName != null and shopName != ''">
-            and gs.shop_name like '%'#{shopName}'%'
+            and gs.shop_name like  concat("%", #{shopName}, "%")
         </if>
 
         <if test="shopPhone != null and shopPhone != ''">
@@ -149,7 +149,7 @@
         </if>
 
         <if test="couponName != null and couponName != ''">
-            and tcu.coupon_name like '%'#{couponName}'%'
+            and tcu.coupon_name like  concat("%", #{couponName}, "%")
         </if>
 
         <if test="orderNumber != null and orderNumber != ''">
@@ -159,7 +159,7 @@
         <if test="startTime != null and startTime != '' and endTime != null and endTime != ''">
             and umd2.create_time >= #{startTime} and #{endTime} >= umd2.create_time
         </if>
-        ORDER BY tbo.create_time desc
+        ORDER BY umd2.id desc
         LIMIT #{limit} OFFSET #{row}
     </select>
     <select id="accountEntryManagementDetailsCount" resultType="java.lang.Integer">
@@ -196,7 +196,7 @@
         LEFT JOIN activity_part_record apr on apr.order_id = tbo.order_id
         where 1 = 1
         <if test="shopName != null and shopName != ''">
-            and gs.shop_name like '%'#{shopName}'%'
+            and gs.shop_name like concat("%", #{shopName}, "%")
         </if>
 
         <if test="shopPhone != null and shopPhone != ''">
@@ -208,7 +208,7 @@
         </if>
 
         <if test="couponName != null and couponName != ''">
-            and tcu.coupon_name like '%'#{couponName}'%'
+            and tcu.coupon_name like concat("%", #{couponName}, "%")
         </if>
 
         <if test="orderNumber != null and orderNumber != ''">