feat: verify-asset 接口返回当前生效的公众号和小程序 AppID
All checks were successful
构建并部署到测试环境(无 SSH) / build-and-deploy (push) Successful in 7m51s
All checks were successful
构建并部署到测试环境(无 SSH) / build-and-deploy (push) Successful in 7m51s
This commit is contained in:
@@ -3170,6 +3170,9 @@ components:
|
|||||||
carrier_name:
|
carrier_name:
|
||||||
description: 运营商名称
|
description: 运营商名称
|
||||||
type: string
|
type: string
|
||||||
|
carrier_type:
|
||||||
|
description: 运营商类型(CMCC/CUCC/CTCC/CBN)
|
||||||
|
type: string
|
||||||
iccid:
|
iccid:
|
||||||
description: 物联网卡ICCID
|
description: 物联网卡ICCID
|
||||||
type: string
|
type: string
|
||||||
@@ -5083,7 +5086,7 @@ components:
|
|||||||
description: 上架状态 (1:上架, 2:下架)
|
description: 上架状态 (1:上架, 2:下架)
|
||||||
type: integer
|
type: integer
|
||||||
status:
|
status:
|
||||||
description: 状态 (1:启用, 2:禁用)
|
description: 状态 (0:禁用, 1:启用)
|
||||||
type: integer
|
type: integer
|
||||||
suggested_retail_price:
|
suggested_retail_price:
|
||||||
description: 建议售价(分)
|
description: 建议售价(分)
|
||||||
@@ -5142,7 +5145,7 @@ components:
|
|||||||
description: 系列名称
|
description: 系列名称
|
||||||
type: string
|
type: string
|
||||||
status:
|
status:
|
||||||
description: 状态 (1:启用, 2:禁用)
|
description: 状态 (0:禁用, 1:启用)
|
||||||
type: integer
|
type: integer
|
||||||
updated_at:
|
updated_at:
|
||||||
description: 更新时间
|
description: 更新时间
|
||||||
@@ -6432,7 +6435,7 @@ components:
|
|||||||
description: 被授权店铺名称
|
description: 被授权店铺名称
|
||||||
type: string
|
type: string
|
||||||
status:
|
status:
|
||||||
description: 状态 1-启用 2-禁用
|
description: 状态 0=禁用 1=启用
|
||||||
type: integer
|
type: integer
|
||||||
type: object
|
type: object
|
||||||
DtoShopSeriesGrantPackageItem:
|
DtoShopSeriesGrantPackageItem:
|
||||||
@@ -6454,7 +6457,7 @@ components:
|
|||||||
description: 上架状态 1-上架 2-下架
|
description: 上架状态 1-上架 2-下架
|
||||||
type: integer
|
type: integer
|
||||||
status:
|
status:
|
||||||
description: 分配状态 1-启用 2-禁用
|
description: 分配状态 0=禁用 1=启用
|
||||||
type: integer
|
type: integer
|
||||||
type: object
|
type: object
|
||||||
DtoShopSeriesGrantPageResult:
|
DtoShopSeriesGrantPageResult:
|
||||||
@@ -6536,7 +6539,7 @@ components:
|
|||||||
description: 被授权店铺名称
|
description: 被授权店铺名称
|
||||||
type: string
|
type: string
|
||||||
status:
|
status:
|
||||||
description: 状态 1-启用 2-禁用
|
description: 状态 0=禁用 1=启用
|
||||||
type: integer
|
type: integer
|
||||||
updated_at:
|
updated_at:
|
||||||
description: 更新时间
|
description: 更新时间
|
||||||
@@ -7111,7 +7114,7 @@ components:
|
|||||||
DtoUpdatePackageSeriesStatusParams:
|
DtoUpdatePackageSeriesStatusParams:
|
||||||
properties:
|
properties:
|
||||||
status:
|
status:
|
||||||
description: 状态 (1:启用, 2:禁用)
|
description: 状态 (0:禁用, 1:启用)
|
||||||
type: integer
|
type: integer
|
||||||
required:
|
required:
|
||||||
- status
|
- status
|
||||||
@@ -7127,7 +7130,7 @@ components:
|
|||||||
DtoUpdatePackageStatusParams:
|
DtoUpdatePackageStatusParams:
|
||||||
properties:
|
properties:
|
||||||
status:
|
status:
|
||||||
description: 状态 (1:启用, 2:禁用)
|
description: 状态 (0:禁用, 1:启用)
|
||||||
type: integer
|
type: integer
|
||||||
required:
|
required:
|
||||||
- status
|
- status
|
||||||
@@ -7546,6 +7549,12 @@ components:
|
|||||||
expires_in:
|
expires_in:
|
||||||
description: 过期时间(秒)
|
description: 过期时间(秒)
|
||||||
type: integer
|
type: integer
|
||||||
|
miniapp_app_id:
|
||||||
|
description: 当前生效的小程序 AppID
|
||||||
|
type: string
|
||||||
|
oa_app_id:
|
||||||
|
description: 当前生效的公众号 AppID
|
||||||
|
type: string
|
||||||
type: object
|
type: object
|
||||||
DtoWalletDetailResponse:
|
DtoWalletDetailResponse:
|
||||||
properties:
|
properties:
|
||||||
@@ -15220,11 +15229,11 @@ paths:
|
|||||||
maxLength: 255
|
maxLength: 255
|
||||||
nullable: true
|
nullable: true
|
||||||
type: string
|
type: string
|
||||||
- description: 状态 (1:启用, 2:禁用)
|
- description: 状态 (0:禁用, 1:启用)
|
||||||
in: query
|
in: query
|
||||||
name: status
|
name: status
|
||||||
schema:
|
schema:
|
||||||
description: 状态 (1:启用, 2:禁用)
|
description: 状态 (0:禁用, 1:启用)
|
||||||
nullable: true
|
nullable: true
|
||||||
type: integer
|
type: integer
|
||||||
- description: 是否启用一次性佣金
|
- description: 是否启用一次性佣金
|
||||||
@@ -15677,11 +15686,11 @@ paths:
|
|||||||
minimum: 0
|
minimum: 0
|
||||||
nullable: true
|
nullable: true
|
||||||
type: integer
|
type: integer
|
||||||
- description: 状态 (1:启用, 2:禁用)
|
- description: 状态 (0:禁用, 1:启用)
|
||||||
in: query
|
in: query
|
||||||
name: status
|
name: status
|
||||||
schema:
|
schema:
|
||||||
description: 状态 (1:启用, 2:禁用)
|
description: 状态 (0:禁用, 1:启用)
|
||||||
nullable: true
|
nullable: true
|
||||||
type: integer
|
type: integer
|
||||||
- description: 上架状态 (1:上架, 2:下架)
|
- description: 上架状态 (1:上架, 2:下架)
|
||||||
@@ -19308,11 +19317,11 @@ paths:
|
|||||||
minimum: 0
|
minimum: 0
|
||||||
nullable: true
|
nullable: true
|
||||||
type: integer
|
type: integer
|
||||||
- description: 过滤状态 1-启用 2-禁用
|
- description: 过滤状态 0=禁用 1=启用
|
||||||
in: query
|
in: query
|
||||||
name: status
|
name: status
|
||||||
schema:
|
schema:
|
||||||
description: 过滤状态 1-启用 2-禁用
|
description: 过滤状态 0=禁用 1=启用
|
||||||
nullable: true
|
nullable: true
|
||||||
type: integer
|
type: integer
|
||||||
responses:
|
responses:
|
||||||
|
|||||||
@@ -13,6 +13,8 @@ type VerifyAssetRequest struct {
|
|||||||
type VerifyAssetResponse struct {
|
type VerifyAssetResponse struct {
|
||||||
AssetToken string `json:"asset_token" description:"资产令牌(5分钟有效)"`
|
AssetToken string `json:"asset_token" description:"资产令牌(5分钟有效)"`
|
||||||
ExpiresIn int `json:"expires_in" description:"过期时间(秒)"`
|
ExpiresIn int `json:"expires_in" description:"过期时间(秒)"`
|
||||||
|
OaAppID string `json:"oa_app_id" description:"当前生效的公众号 AppID"`
|
||||||
|
MiniappAppID string `json:"miniapp_app_id" description:"当前生效的小程序 AppID"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// ========================================
|
// ========================================
|
||||||
|
|||||||
@@ -112,10 +112,17 @@ func (s *Service) VerifyAsset(ctx context.Context, req *dto.VerifyAssetRequest,
|
|||||||
return nil, errors.Wrap(errors.CodeInternalError, err, "签发资产令牌失败")
|
return nil, errors.Wrap(errors.CodeInternalError, err, "签发资产令牌失败")
|
||||||
}
|
}
|
||||||
|
|
||||||
return &dto.VerifyAssetResponse{
|
resp := &dto.VerifyAssetResponse{
|
||||||
AssetToken: assetToken,
|
AssetToken: assetToken,
|
||||||
ExpiresIn: assetTokenExpireSeconds,
|
ExpiresIn: assetTokenExpireSeconds,
|
||||||
}, nil
|
}
|
||||||
|
|
||||||
|
if wechatConfig, err := s.wechatConfigService.GetActiveConfig(ctx); err == nil && wechatConfig != nil {
|
||||||
|
resp.OaAppID = wechatConfig.OaAppID
|
||||||
|
resp.MiniappAppID = wechatConfig.MiniappAppID
|
||||||
|
}
|
||||||
|
|
||||||
|
return resp, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// WechatLogin A2 公众号登录
|
// WechatLogin A2 公众号登录
|
||||||
|
|||||||
Reference in New Issue
Block a user