Commit 1eeb527d authored by 李硕's avatar 李硕

提交导出中奖名单筛选

parent e7a028b3
...@@ -56,7 +56,7 @@ class RankopenprizeService { ...@@ -56,7 +56,7 @@ class RankopenprizeService {
} }
//《条件搜索》查询中奖信息 //《条件搜索》查询中奖信息
async getUserPrizeByActivityId(activityId, pageNo, pageSize, prizeId, userNick, timeStart, timeEnd, shipStatus, type,prizeDataType) { async getUserPrizeByActivityId(activityId, pageNo, pageSize, prizeId, userNick, timeStart, timeEnd, shipStatus, type, prizeDataType) {
let p = prizeId ? { _id: prizeId } : ''; let p = prizeId ? { _id: prizeId } : '';
let u = userNick ? { userNick: { $regex: ".*" + userNick + ".*" } } : ''; let u = userNick ? { userNick: { $regex: ".*" + userNick + ".*" } } : '';
let c = (timeStart > 0 && timeEnd > 0) ? { createTime: { $gt: timeStart, $lt: timeEnd } } : ''; let c = (timeStart > 0 && timeEnd > 0) ? { createTime: { $gt: timeStart, $lt: timeEnd } } : '';
...@@ -88,7 +88,7 @@ class RankopenprizeService { ...@@ -88,7 +88,7 @@ class RankopenprizeService {
//《条件搜索》获取中奖名单长度 //《条件搜索》获取中奖名单长度
async getTotalObjectCount(activityId, prizeId, userNick, timeStart, timeEnd, shipStatus, type,prizeDataType) { async getTotalObjectCount(activityId, prizeId, userNick, timeStart, timeEnd, shipStatus, type, prizeDataType) {
let p = prizeId ? { _id: prizeId } : ''; let p = prizeId ? { _id: prizeId } : '';
let u = userNick ? { userNick: { $regex: ".*" + userNick + ".*" } } : ''; let u = userNick ? { userNick: { $regex: ".*" + userNick + ".*" } } : '';
let c = (timeStart > 0 && timeEnd > 0) ? { createTime: { $gt: timeStart, $lt: timeEnd } } : ''; let c = (timeStart > 0 && timeEnd > 0) ? { createTime: { $gt: timeStart, $lt: timeEnd } } : '';
...@@ -104,6 +104,7 @@ class RankopenprizeService { ...@@ -104,6 +104,7 @@ class RankopenprizeService {
let t = type ? { type: +type } : ''; let t = type ? { type: +type } : '';
let d = prizeDataType ? { prizeDataType: +prizeDataType } : ''; let d = prizeDataType ? { prizeDataType: +prizeDataType } : '';
let arr = [p, u, c, s, t, d]; let arr = [p, u, c, s, t, d];
arr = arr.filter((i) => { return i });
console.log('arr--111---', arr, "s>>>", s); console.log('arr--111---', arr, "s>>>", s);
return await this.rankopenprizeDao.count({ return await this.rankopenprizeDao.count({
activityId, activityId,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment