切换导航条
此项目
正在载入...
登录
mmm-go
/
partnermg
·
提交
转到一个项目
GitLab
转到群组
项目
活动
文件
提交
管道
0
构建
0
图表
里程碑
问题
0
合并请求
0
成员
标记
维基
派生
网络
创建新的问题
下载为
邮件补丁
差异文件
浏览文件
作者
唐旭辉
4 years ago
提交
94e49f116f8f012c08c791b6bb476fb736c9379c
1 个父辈
ba89a7b0
清理代码
隐藏空白字符变更
内嵌
并排对比
正在显示
5 个修改的文件
包含
23 行增加
和
65 行删除
pkg/application/businessBonus/command/update_business_bonus.go
pkg/application/businessBonus/query/get_business_bonus.go
pkg/application/businessBonus/query/list_business_bonus.go
pkg/application/event/subscriber/order_log_subscriber.go
pkg/application/factory/domain_service.go
pkg/application/businessBonus/command/update_business_bonus.go
查看文件 @
94e49f1
package
command
type
UpdateBusinessBonusCommand
struct
{
Id
int64
`json:"id"`
Bonus
float64
`json:"bonus"`
BonusStatus
int8
`json:"bonusStatus"`
CompanyId
int64
`json:"companyId"`
}
// type UpdateBusinessBonusCommand struct {
// Id int64 `json:"id"`
// Bonus float64 `json:"bonus"`
// BonusStatus int8 `json:"bonusStatus"`
// CompanyId int64 `json:"companyId"`
// }
func
(
cmd
UpdateBusinessBonusCommand
)
ValidateCommand
()
error
{
return
nil
}
// func (cmd UpdateBusinessBonusCommand) ValidateCommand() error {
// return nil
// }
...
...
pkg/application/businessBonus/query/get_business_bonus.go
查看文件 @
94e49f1
package
query
type
GetBusinessBonusQuery
struct
{
Id
int64
`json:"id"`
CompanyId
int64
`json:"companyId"`
}
// type GetBusinessBonusQuery struct {
// Id int64 `json:"id"`
// CompanyId int64 `json:"companyId"`
// }
...
...
pkg/application/businessBonus/query/list_business_bonus.go
查看文件 @
94e49f1
package
query
type
ListBusinessBonusQuery
struct
{
//
type ListBusinessBonusQuery struct {
//用户名称匹配
PartnerNameMatch
string
`json:"userNameMatch" `
// 查询偏离量
Offset
int
`json:"offset" `
// 查询限制
Limit
int
`json:"limit"`
PartnerId
int64
`json:"partnerId"`
CompanyId
int64
`json:"companyId"`
}
// //用户名称匹配
// PartnerNameMatch string `json:"userNameMatch" `
// // 查询偏离量
// Offset int `json:"offset" `
// // 查询限制
// Limit int `json:"limit"`
// PartnerId int64 `json:"partnerId"`
// CompanyId int64 `json:"companyId"`
// }
...
...
pkg/application/event/subscriber/order_log_subscriber.go
查看文件 @
94e49f1
...
...
@@ -120,34 +120,6 @@ func (subscriber *OrderLogSubscriber) HandleEvent(domainEvent coreDomain.DomainE
}
err
=
orderLogRepository
.
Add
(
&
orderLog
)
break
// 支付订单中货品的分红
// case event.PAY_ORDER_GOOD_BONUS_EVENT:
// currentEvent := domainEvent.(event.PayOrderGoodBonus)
// adminUser, err = userRepository.FindOne(domain.UsersFindOneQuery{Id: currentEvent.AdminId})
// if err != nil {
// return lib.ThrowError(lib.INTERNAL_SERVER_ERROR, err.Error())
// }
// orderLog := domain.OrderLog{
// OperatorType: domain.ORDER_LOG_OPERATOR_ADMIN,
// OperatorId: currentEvent.AdminId,
// Operator: adminUser.Name,
// AlterTime: time.Now(),
// DataFrom: domain.ORDER_LOG_FROM,
// LogAction: "支付",
// OrderId: currentEvent.OrderId,
// GoodId: currentEvent.GoodId,
// Descript: []domain.OrderLogDescript{
// domain.OrderLogDescript{
// Title: "支付分红",
// Item: currentEvent.GoodName,
// Action: []string{
// fmt.Sprintf(`支付分红"¥%.2f"`, currentEvent.PartnerBonus),
// },
// },
// },
// }
// err = orderLogRepository.Add(&orderLog)
// break
case
event
.
BATCH_PAY_ORDER_GOOD_BONUS_EVENT
:
currentEvent
:=
domainEvent
.
(
event
.
BatchPayOrderGoodBonus
)
orderLog
:=
domain
.
OrderLog
{
...
...
pkg/application/factory/domain_service.go
查看文件 @
94e49f1
...
...
@@ -6,20 +6,6 @@ import (
"gitlab.fjmaimaimai.com/mmm-go/partnermg/pkg/infrastructure/pg/transaction"
)
// func CreateBusinessBonusService(options map[string]interface{}) (service.BusinessBonusService, error) {
// var transactionContext *transaction.TransactionContext
// if value, ok := options["transactionContext"]; ok {
// transactionContext = value.(*transaction.TransactionContext)
// }
// return domainService.NewBusinessBonusService(transactionContext), nil
// }
// var transactionContext *transaction.TransactionContext
// if value, ok := options["transactionContext"]; ok {
// transactionContext = value.(*transaction.TransactionContext)
// }
// return domainService.NewBusinessBonusService(transactionContext), nil
// }
func
CreateOrderBonusService
(
options
map
[
string
]
interface
{})
(
service
.
OrderBonusService
,
error
)
{
var
transactionContext
*
transaction
.
TransactionContext
if
value
,
ok
:=
options
[
"transactionContext"
];
ok
{
...
...
请
注册
或
登录
后发表评论