Authored by qinchao

更新资产明细显示查询

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