|
@@ -16,7 +16,7 @@ class CouponService extends CrudService {
|
|
async userView(filter, { skip = 0, limit, sort, desc, projection } = {}) {
|
|
async userView(filter, { skip = 0, limit, sort, desc, projection } = {}) {
|
|
const customer = _.get(this.ctx, 'user._id');
|
|
const customer = _.get(this.ctx, 'user._id');
|
|
if (!customer) throw new BusinessError(ErrorCode.NOT_LOGIN, '未找到用户登陆信息');
|
|
if (!customer) throw new BusinessError(ErrorCode.NOT_LOGIN, '未找到用户登陆信息');
|
|
- let list = await this.query(filter, { skip, limit, sort, desc, projection });
|
|
|
|
|
|
+ let list = await this.query({ ...filter, status: '0' }, { skip, limit, sort, desc, projection });
|
|
list = await this.makeShowData(list);
|
|
list = await this.makeShowData(list);
|
|
// 还需要判断用户是否领取过了
|
|
// 还需要判断用户是否领取过了
|
|
for (const coupon of list) {
|
|
for (const coupon of list) {
|