Commit 1610556c authored by qinhaitao's avatar qinhaitao

fix: 🐛 bug

parent 5a54f279
......@@ -203,7 +203,7 @@ Component({
timeStart,
timeEnd,
shipStatus,
prizeType,
type: prizeType,
prizeDataType
});
if (success) {
......
......@@ -110,7 +110,7 @@ export default class BaseController {
async exportAwardsInfoBySearch(context: Context, { session }, [awardsService]: [AwardsService]) {
/******VV */
let { cloud } = context
let { activityId, title, prizeId, userId: userNick, timeStart, timeEnd, shipStatus, prizeDataType } = context.data
let { activityId, title, prizeId, userId: userNick, timeStart, timeEnd, shipStatus, prizeDataType, type } = context.data
if (!activityId) {
return resultsModel.error(CODE_TYPES.PARAMS_ERROR, `缺少activityId`)
}
......@@ -118,7 +118,7 @@ export default class BaseController {
return resultsModel.error(CODE_TYPES.PARAMS_ERROR, `缺少title`)
}
console.log('prizeId=====', prizeId)
if (!prizeId && !userNick && !timeStart && !timeEnd && !shipStatus && !prizeDataType) {
if (!prizeId && !userNick && !timeStart && !timeEnd && !shipStatus && !prizeDataType && !type) {
return resultsModel.error(CODE_TYPES.PARAMS_ERROR, `未填写筛选信息`)
}
console.log(
......@@ -142,6 +142,7 @@ export default class BaseController {
timeStart,
timeEnd,
shipStatus,
type,
prizeDataType
)
let awardslist = []
......@@ -161,6 +162,7 @@ export default class BaseController {
timeStart,
timeEnd,
shipStatus,
type,
prizeDataType
)
awardslist = awardslist.concat(awardMore)
......@@ -175,6 +177,7 @@ export default class BaseController {
timeStart,
timeEnd,
shipStatus,
type,
prizeDataType
)
}
......@@ -263,6 +266,7 @@ export default class BaseController {
timeStart,
timeEnd,
shipStatus,
type,
prizeDataType
} = context.data
console.log('data>>>>>', context.data)
......@@ -273,7 +277,7 @@ export default class BaseController {
return resultsModel.error(CODE_TYPES.PARAMS_ERROR, `缺少title`)
}
console.log('prizeId=====', prizeId)
if (!prizeId && !userNick && !timeStart && !timeEnd && !shipStatus && !prizeDataType) {
if (!prizeId && !userNick && !timeStart && !timeEnd && !shipStatus && !prizeDataType && !type) {
return resultsModel.error(CODE_TYPES.PARAMS_ERROR, `未填写筛选信息`)
}
console.log(
......@@ -297,6 +301,7 @@ export default class BaseController {
timeStart,
timeEnd,
shipStatus,
type,
prizeDataType
)
console.log('totle=========', total)
......@@ -312,6 +317,7 @@ export default class BaseController {
timeStart,
timeEnd,
shipStatus,
type,
prizeDataType
)
// console.list()
......@@ -326,6 +332,7 @@ export default class BaseController {
timeStart,
timeEnd,
shipStatus,
type,
prizeDataType
)
console.log('awardslist>>>>', awardslist)
......
......@@ -68,7 +68,8 @@ export default class AwardsService {
timeStart: number,
timeEnd: number,
shipStatus: number,
type: number
type: number,
prizeDataType: number
) {
let p = prizeId ? { _id: prizeId } : ''
let u = userNick ? { userNick: { $regex: '.*' + userNick + '.*' } } : ''
......@@ -81,7 +82,8 @@ export default class AwardsService {
: { shipStatus: SHIP_STATUS.HAS_SHIP }
: ''
let t = type ? { type: +type } : ''
let arr = [p, u, c, s, t]
let e = prizeDataType ? { prizeDataType: +prizeDataType}: ''
let arr = [p, u, c, s, t, e]
arr = arr.filter(i => {
return i
})
......@@ -106,7 +108,8 @@ export default class AwardsService {
timeStart: number,
timeEnd: number,
shipStatus: number,
type: number
type: number,
prizeDataType: number
) {
let p = prizeId ? { _id: prizeId } : ''
let u = userNick ? { userNick: { $regex: '.*' + userNick + '.*' } } : ''
......@@ -119,7 +122,8 @@ export default class AwardsService {
: { shipStatus: SHIP_STATUS.HAS_SHIP }
: ''
let t = type ? { type: +type } : ''
let arr = [p, u, c, s, t]
let e = prizeDataType ? { prizeDataType: +prizeDataType } : ''
let arr = [p, u, c, s, t, e]
arr = arr.filter(i => {
return i
})
......
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