Skip to content

Commit

Permalink
feat: xunhupay query
Browse files Browse the repository at this point in the history
  • Loading branch information
Groupguanfang committed Mar 13, 2024
1 parent 58e1514 commit cda5d6e
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions apps/shop/src/subscribe/controllers/package.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,24 @@ export class PackageController {
});
}

/**
* 根据ID获取单个订阅套餐
*
* @author Zero <gczgroup@qq.com>
* @date 2024/03/13
* @param {string} packageID
* @memberof PackageController
*/
@Get("single")
@UseInterceptors(ResInterceptor)
public async getSubscribePackage(@Query("packageID") packageID: string) {
const data = await this.prismaService.shopSubscribePackage.findUnique({
where: { packageID },
});
if (!data) throw new BadRequestException(1084);
return data;
}

/**
* 创建订阅套餐
*
Expand Down

0 comments on commit cda5d6e

Please sign in to comment.