Commit f9155964 沈姿.前端(已离职)
2 个父辈 16de2d8e e4708b0f
...@@ -27,12 +27,18 @@ ...@@ -27,12 +27,18 @@
</select> </select>
<select id="getLotteryLogCount" resultType="java.lang.Integer"> <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> <where>
<if test="status != null"> <if test="status != null">
and status=#{status} and status=#{status}
</if> </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"> <if test="turn != null and turn>0">
and turn=#{turn} and turn=#{turn}
</if> </if>
......
...@@ -15,7 +15,7 @@ public interface LotteryLogDao extends MyMapper<Lotterylog> { ...@@ -15,7 +15,7 @@ public interface LotteryLogDao extends MyMapper<Lotterylog> {
List<Lotterylog_Vo> getLotteryLogList(Integer page,Integer pagesize,@Param("turn") Integer turn, List<Lotterylog_Vo> getLotteryLogList(Integer page,Integer pagesize,@Param("turn") Integer turn,
@Param("keyword")String keyword,@Param("status")Integer status,@Param("type")Integer type); @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); BigDecimal getSumMny(@Param("turn") Integer turn,@Param("status")Integer status);
} }
...@@ -91,7 +91,7 @@ public class ActivityService { ...@@ -91,7 +91,7 @@ public class ActivityService {
PageResults<Lotterylog_Vo> pageResults = new PageResults<>(); PageResults<Lotterylog_Vo> pageResults = new PageResults<>();
List<Lotterylog_Vo> list = logDao.getLotteryLogList((page - 1) * pagesize, pagesize, turn, keyword, status,type); 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); BigDecimal bMny = logDao.getSumMny(turn, status);
double mny = bMny == null ? 0 : bMny.doubleValue(); double mny = bMny == null ? 0 : bMny.doubleValue();
if (status!=null && status == 2) { if (status!=null && status == 2) {
......
Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
请先完成此消息的编辑!