|
@@ -14,9 +14,9 @@ import org.nutz.dao.Dao;
|
|
|
import org.nutz.dao.Sqls;
|
|
|
import org.nutz.dao.entity.Entity;
|
|
|
import org.nutz.dao.pager.Pager;
|
|
|
+import org.nutz.dao.sql.Criteria;
|
|
|
import org.nutz.dao.sql.Sql;
|
|
|
import org.nutz.dao.util.Daos;
|
|
|
-import org.nutz.dao.util.cri.SimpleCriteria;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
@@ -51,24 +51,24 @@ public class AdsAgentRechargeRankingServiceImpl implements IAdsAgentRechargeRank
|
|
|
if (sum(total_cost) > 0, max(total_recharge_amount) / sum(total_cost), 'xx') as roi
|
|
|
from ads_agent_recharge_ranking
|
|
|
""";
|
|
|
- SimpleCriteria cri = Cnd.cri();
|
|
|
+ Criteria cri = Cnd.cri();
|
|
|
if (null != dto.getBeginDay() && null != dto.getEndDay()) {
|
|
|
- cri.where().and(AdsAgentRechargeRanking::getDt, ">=", dto.getBeginDay()).and(AdsAgentRechargeRanking::getDt, "<=", dto.getEndDay());
|
|
|
+ cri.where().and("dt", ">=", dto.getBeginDay()).and("dt", "<=", dto.getEndDay());
|
|
|
}
|
|
|
if (StringUtils.isNotBlank(dto.getAgentId())) {
|
|
|
- cri.where().and(AdsAgentRechargeRanking::getAgentId, "=", dto.getAgentId());
|
|
|
+ cri.where().and("agent_id", "=", dto.getAgentId());
|
|
|
}
|
|
|
if (StringUtils.isNotBlank(dto.getPitcherId())) {
|
|
|
- cri.where().and(AdsAgentRechargeRanking::getPitcherId, "=", dto.getPitcherId());
|
|
|
+ cri.where().and("pitcher_id", "=", dto.getPitcherId());
|
|
|
}
|
|
|
if (StringUtils.isNotBlank(dto.getType())) {
|
|
|
- cri.where().and(AdsAgentRechargeRanking::getType, "=", dto.getType());
|
|
|
+ cri.where().and("type", "=", dto.getType());
|
|
|
}
|
|
|
if (StringUtils.isNotBlank(dto.getSourceSystem())) {
|
|
|
- cri.where().and(AdsAgentRechargeRanking::getSourceSystem, "=", dto.getSourceSystem());
|
|
|
+ cri.where().and("source_system", "=", dto.getSourceSystem());
|
|
|
}
|
|
|
- cri.groupBy("agent_id", "pitcher_id", "type");
|
|
|
- cri.orderBy(CaseFormat.LOWER_CAMEL.to(CaseFormat.LOWER_UNDERSCORE, dto.getSortFiled()), dto.getSortType());
|
|
|
+ cri.getGroupBy().groupBy("agent_id", "pitcher_id", "type");
|
|
|
+ cri.getOrderBy().orderBy(CaseFormat.LOWER_CAMEL.to(CaseFormat.LOWER_UNDERSCORE, dto.getSortFiled()), dto.getSortType());
|
|
|
Sql sql = Sqls.queryEntity(sqlStr + "$condition");
|
|
|
|
|
|
Entity<AdsAgentRechargeRankingVO> entity = dao.getEntity(AdsAgentRechargeRankingVO.class);
|