fix(force-recharge): 补充强充配置缺失的接口和数据库字段
All checks were successful
构建并部署到测试环境(无 SSH) / build-and-deploy (push) Successful in 6m19s
All checks were successful
构建并部署到测试环境(无 SSH) / build-and-deploy (push) Successful in 6m19s
- 订单管理:增加 payment_method 字段支持,合并代购订单逻辑 - 套餐系列分配:增加强充配置字段(enable_force_recharge、force_recharge_amount、force_recharge_trigger_type) - 数据库迁移:添加 force_recharge_trigger_type 字段 - 测试:更新订单服务测试用例 - OpenSpec:归档 fix-force-recharge-missing-interfaces 变更
This commit is contained in:
@@ -10,6 +10,7 @@ import (
|
||||
"github.com/google/uuid"
|
||||
|
||||
"github.com/break/junhong_cmp_fiber/pkg/config"
|
||||
"github.com/break/junhong_cmp_fiber/pkg/errors"
|
||||
)
|
||||
|
||||
type Service struct {
|
||||
@@ -27,7 +28,7 @@ func NewService(provider Provider, cfg *config.StorageConfig) *Service {
|
||||
func (s *Service) GenerateFileKey(purpose, fileName string) (string, error) {
|
||||
mapping, ok := PurposeMappings[purpose]
|
||||
if !ok {
|
||||
return "", fmt.Errorf("不支持的文件用途: %s", purpose)
|
||||
return "", errors.New(errors.CodeInvalidParam, "不支持的文件用途: %s", purpose)
|
||||
}
|
||||
|
||||
ext := filepath.Ext(fileName)
|
||||
|
||||
@@ -12,7 +12,7 @@ type PurposeMapping struct {
|
||||
}
|
||||
|
||||
var PurposeMappings = map[string]PurposeMapping{
|
||||
"iot_import": {Prefix: "imports", ContentType: "text/csv"},
|
||||
"iot_import": {Prefix: "imports", ContentType: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"},
|
||||
"export": {Prefix: "exports", ContentType: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"},
|
||||
"attachment": {Prefix: "attachments", ContentType: ""},
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user