Authored by LUOXC

Revert "fixbug"

This reverts commit 0a0ccd29.
... ... @@ -34,13 +34,13 @@ public interface TradeBillsMapper {
List<TradeBills> selectByUidTradeStatusAndDealTime(@Param("uid") Integer uid, @Param("tradeStatus") Integer tradeStatus, @Param("dealTime") Integer dealTime);
int selectCountForAssetsDetailsView(@Param("request") AssetsDetailsViewRequest request);
int selectCountForAssetsDetailsView(AssetsDetailsViewRequest request);
//根据用户uid ,获取流水(分页)
List<TradeBills> selectForAssetsDetailsView(@Param("request") AssetsDetailsViewRequest request);
List<TradeBills> selectForAssetsDetailsView(AssetsDetailsViewRequest request);
//根据用户uid,获取用户总收入
List<AssetsDetailsViewIncomeAmount> selectIncomeAmountForAssetsDetailsView(@Param("request") AssetsDetailsViewRequest request);
List<AssetsDetailsViewIncomeAmount> selectIncomeAmountForAssetsDetailsView(AssetsDetailsViewRequest request);
}
... ...
... ... @@ -159,12 +159,12 @@
<sql id="Assets_Details_View_Query_Condition_Sql" >
uid = #{request.uid,jdbcType=INTEGER} and income_outcome = 1 and deal_status != 1
uid = #{uid,jdbcType=INTEGER} and income_outcome = 1 and deal_status != 1
and ( (user_type =1 and trade_type = 3) or (user_type =2 and trade_type = 2) or (user_type =2 and trade_type = 3) )
<if test="request.queryType = 1" >
<if test="queryType = 1" >
and trade_status = 10
</if>
<if test="request.queryType = 2" >
<if test="queryType = 2" >
and trade_status != 10
</if>
</sql>
... ... @@ -182,12 +182,12 @@
from trade_bills
where <include refid="Assets_Details_View_Query_Condition_Sql" />
order by id desc
limit #{request.start,jdbcType=INTEGER},#{request.limit,jdbcType=INTEGER}
limit #{start,jdbcType=INTEGER},#{limit,jdbcType=INTEGER}
</select>
<select id="selectIncomeAmountForAssetsDetailsView" parameterType="com.yohoufo.dal.order.model.AssetsDetailsViewRequest" resultType="com.yohoufo.dal.order.model.AssetsDetailsViewIncomeAmount">
select trade_status as tradeStatus, trade_type as tradeType ,sum(amount) as amount from trade_bills
select trade_status, trade_type ,sum(amount) from trade_bills
where <include refid="Assets_Details_View_Query_Condition_Sql" />
group by trade_status, trade_type
</select>
... ...