浏览代码

收益提现

liaoyongfei 4 年之前
父节点
当前提交
6401c52595

+ 2 - 0
ymall/src/main/java/com/liangjian11/ymall/controller/CashOutController.java

@@ -97,6 +97,8 @@ public class CashOutController {
     if (req.getUnionid() == null)
       return ResultData.getParamValidResult("unionid不能为空");
     Map<String, Object> resMap = new HashMap<>();
+    if(req.getPageIndex()==null || req.getPageIndex()<=0)
+      req.setPageIndex(1);
     List<CashOutRecord> list = cashOutRecordService.getListByUser(req.getUnionid(), (req.getPageIndex() - 1) * req.getPageSize(), req.getPageSize());
     int count = 0;
     if (list != null && list.size() > 0)

+ 2 - 2
ymall/src/main/resources/mapper/CashOutRecordMapper.xml

@@ -25,13 +25,13 @@
 
   <select id="getListByUser" resultMap="baseMap">
     select *
-    from user_account_bank where unionid =#{unionId}
+    from cash_out_record where unionid =#{unionId}
     order by  create_time desc limit #{pageSize}  offset #{start}
   </select>
 
   <select id="getCountByUser" resultType="Integer">
     select count(1)
-    from user_account_bank where unionid =#{unionId}
+    from cash_out_record where unionid =#{unionId}
   </select>
 
   <insert id="addItem" parameterType="com.liangjian11.ymall.model.CashOutRecord" useGeneratedKeys="true" keyProperty="id">