|
|
|
@ -6,6 +6,7 @@ import cn.hutool.core.date.DateUtil;
|
|
|
|
|
import cn.hutool.core.util.StrUtil;
|
|
|
|
|
import com.hchbox.constant.DefaultNumberConstants;
|
|
|
|
|
import com.hchbox.enums.AppSettingTypeEnum;
|
|
|
|
|
import com.hchbox.enums.TradeEnum;
|
|
|
|
|
import com.hchbox.module.entity.AppSetting;
|
|
|
|
|
import com.hchbox.module.entity.TopTrade;
|
|
|
|
|
import org.hibernate.query.internal.NativeQueryImpl;
|
|
|
|
@ -87,7 +88,8 @@ public class TradeJpa {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (null != day) {
|
|
|
|
|
sql.append("and t.consign_time < :offDay ");
|
|
|
|
|
sql = getParameter(sql, appSetting.getType());
|
|
|
|
|
// sql.append("and t.consign_time < :offDay ");
|
|
|
|
|
}
|
|
|
|
|
String sellerNick = appSetting.getSellerNick();
|
|
|
|
|
if (StrUtil.isNotEmpty(sellerNick)) {
|
|
|
|
@ -154,4 +156,19 @@ public class TradeJpa {
|
|
|
|
|
" t.tid ,t.step_paid_fee as stepPaidFee, t.seller_nick as sellerNick from top_trade as t left join top_order as o on t.tid=o.tid where 1=1 ");
|
|
|
|
|
return sql;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private StringBuilder getParameter(StringBuilder sql, Integer type) {
|
|
|
|
|
switch (type) {
|
|
|
|
|
case 15:
|
|
|
|
|
return sql.append("and t.consign_time < :offDay ");
|
|
|
|
|
case 11:
|
|
|
|
|
return sql.append("and t.end_time < :offDay ");
|
|
|
|
|
case 7:
|
|
|
|
|
return sql.append("and t.created < :offDay ");
|
|
|
|
|
case 12:
|
|
|
|
|
return sql.append("and t.modified < :offDay ");
|
|
|
|
|
default:
|
|
|
|
|
return sql;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|