Authored by qinchao

更新资产明细显示查询

@@ -16,7 +16,7 @@ public interface TradeBillsMapper { @@ -16,7 +16,7 @@ public interface TradeBillsMapper {
16 int insert(TradeBills record); 16 int insert(TradeBills record);
17 17
18 //根据用户uid ,获取流水(分页) 18 //根据用户uid ,获取流水(分页)
19 - List<TradeBills> selectTradeBillsWithPageByUid(@Param("uid") Integer uid,@Param("start") Integer start,@Param("limit") Integer limit); 19 + List<TradeBills> selectGoodsIncomeOrCompensateIncomeTradeBillsWithPageByUid(@Param("uid") Integer uid,@Param("start") Integer start,@Param("limit") Integer limit);
20 20
21 //根据用户uid,获取用户总收入 21 //根据用户uid,获取用户总收入
22 List<Map<String, Object>> selectIncomeAmountByUid(@Param("uid") Integer uid); 22 List<Map<String, Object>> selectIncomeAmountByUid(@Param("uid") Integer uid);
@@ -41,12 +41,11 @@ @@ -41,12 +41,11 @@
41 #{tradeStatus},#{createTime}) 41 #{tradeStatus},#{createTime})
42 </insert> 42 </insert>
43 43
44 - <select id="selectTradeBillsWithPageByUid" resultMap="BaseResultMap"> 44 + <select id="selectGoodsIncomeOrCompensateIncomeTradeBillsWithPageByUid" resultMap="BaseResultMap">
45 select 45 select
46 <include refid="Base_Column_List" /> 46 <include refid="Base_Column_List" />
47 from trade_bills 47 from trade_bills
48 - where uid = #{uid,jdbcType=INTEGER}  
49 - order by id desc 48 + where uid = #{uid,jdbcType=INTEGER} and ( trade_type = 2 or trade_type = 3 )
50 limit #{start,jdbcType=INTEGER},#{limit,jdbcType=INTEGER} 49 limit #{start,jdbcType=INTEGER},#{limit,jdbcType=INTEGER}
51 </select> 50 </select>
52 51
@@ -85,7 +85,7 @@ public class AssetsService { @@ -85,7 +85,7 @@ public class AssetsService {
85 85
86 private List<TradeBillsBo> loadTradeBillFromDb(int uid,int page, int pageSize){ 86 private List<TradeBillsBo> loadTradeBillFromDb(int uid,int page, int pageSize){
87 87
88 - List<TradeBills> detailList = tradeBillsMapper.selectTradeBillsWithPageByUid(uid,pageSize*(page-1),pageSize); 88 + List<TradeBills> detailList = tradeBillsMapper.selectGoodsIncomeOrCompensateIncomeTradeBillsWithPageByUid(uid,pageSize*(page-1),pageSize);
89 89
90 List<TradeBillsBo> rtnList=new ArrayList<>(); 90 List<TradeBillsBo> rtnList=new ArrayList<>();
91 for(TradeBills bills:detailList){ 91 for(TradeBills bills:detailList){