소스 검색

♻️ refactor(wechat-coupons): 优化优惠券查询关联关系

- 移除与stock的直接关联,仅保留stock.config关联关系
- 减少不必要的数据查询,提升接口性能
yourname 6 달 전
부모
커밋
78883b69f7
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      src/server/api/wechat-coupons/index.ts

+ 1 - 1
src/server/api/wechat-coupons/index.ts

@@ -10,7 +10,7 @@ const wechatCouponRoutes = createCrudRoutes({
   getSchema: WechatCouponSchema,
   listSchema: WechatCouponSchema,
   searchFields: ['openid', 'stockId', 'couponId'],
-  relations: ['stock', 'stock.config'],
+  relations: ['stock.config'],
   middleware: [authMiddleware],
   userTracking: {
     createdByField: 'createdBy',