wangzhibo
5 天以前 50e5cdbaceee71f000341a434620d10a87b582f5
src/modules/market/service/coupon/user.ts
@@ -23,7 +23,7 @@
   * @param idcouponId
   * @param userId
   */
  async save(couponId: number, userId: number) {
  async save(couponId: number, userId: string) {
    const couponUser = new MarketCouponUserEntity();
    couponUser.userId = userId;
    couponUser.couponId = couponId;
@@ -35,7 +35,7 @@
   * @param couponId
   * @param userId
   */
  async check(couponId: number, userId: number) {
  async check(couponId: number, userId: string) {
    const info = await this.marketCouponUserEntity.findOneBy({
      couponId: Equal(couponId),
      userId: Equal(userId),
@@ -52,7 +52,7 @@
   * @param couponId
   * @param userId
   */
  async checkExist(couponId: number, userId: number) {
  async checkExist(couponId: number, userId: string) {
    const info = await this.marketCouponUserEntity.findOneBy({
      couponId: Equal(couponId),
      userId: Equal(userId),
@@ -65,7 +65,7 @@
   * @param couponId
   * @param userId
   */
  async use(couponId: number, userId: number) {
  async use(couponId: number, userId: string) {
    await this.marketCouponUserEntity.update(
      { couponId: Equal(couponId), userId: Equal(userId) },
      { status: 1, useTime: new Date() }