华南城抽奖人员信息分页查询错误

1 个父辈 74a78005
......@@ -27,12 +27,18 @@
</select>
<select id="getLotteryLogCount" resultType="java.lang.Integer">
select count(*) from lotterylog
select count(*) from lotterylog a
left join fans b on a.fansid=b.id
<where>
<if test="status != null">
and status=#{status}
</if>
<if test="keyword !=null and keyword!='' ">
and (b.nickname like CONCAT(CONCAT('%',#{keyword}),'%') or a.prize_name
like CONCAT(CONCAT('%',#{keyword}),'%') )
</if>
<if test="turn != null and turn>0">
and turn=#{turn}
</if>
......
......@@ -15,7 +15,7 @@ public interface LotteryLogDao extends MyMapper<Lotterylog> {
List<Lotterylog_Vo> getLotteryLogList(Integer page,Integer pagesize,@Param("turn") Integer turn,
@Param("keyword")String keyword,@Param("status")Integer status,@Param("type")Integer type);
int getLotteryLogCount(@Param("turn") Integer turn,@Param("status")Integer status,@Param("type")Integer type);
int getLotteryLogCount(@Param("turn") Integer turn, @Param("keyword")String keyword,@Param("status")Integer status,@Param("type")Integer type);
BigDecimal getSumMny(@Param("turn") Integer turn,@Param("status")Integer status);
}
......@@ -91,7 +91,7 @@ public class ActivityService {
PageResults<Lotterylog_Vo> pageResults = new PageResults<>();
List<Lotterylog_Vo> list = logDao.getLotteryLogList((page - 1) * pagesize, pagesize, turn, keyword, status,type);
int total = logDao.getLotteryLogCount(turn, status,type);
int total = logDao.getLotteryLogCount(turn,keyword, status,type);
BigDecimal bMny = logDao.getSumMny(turn, status);
double mny = bMny == null ? 0 : bMny.doubleValue();
if (status!=null && status == 2) {
......
Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
请先完成此消息的编辑!