@Query("SELECT t.currDate, t.type, t.amount, a.mobile FROM TradeHist as t inner join Account as a on t.accountId = a.id WHERE a.mobile = :mobile") public Object[] findTradeHistByMobile(@Param("mobile") String mobile);
@Query("SELECT new cn.com.hohistar.spbt.todoapi.dto.TradeHistDto(t.currDate, t.type, t.amount, a.mobile) FROM TradeHist as t inner join Account as a on t.accountId = a.id WHERE a.mobile = :mobile") public List<TradeHistDto> findTradeHistByMobileWithType(@Param("mobile") String mobile);