作者 yangfu
... ... @@ -9,5 +9,5 @@ require (
github.com/go-pg/pg/v10 v10.10.1
github.com/go-redis/redis v6.14.2+incompatible
github.com/google/uuid v1.1.1
github.com/linmadan/egglib-go v0.0.0-20210527091316-06b0732fb5f6
github.com/linmadan/egglib-go v0.0.0-20210827085852-177fa745932d
)
... ...
... ... @@ -134,8 +134,8 @@ github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE=
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
github.com/ledisdb/ledisdb v0.0.0-20200510135210-d35789ec47e6/go.mod h1:n931TsDuKuq+uX4v1fulaMbA/7ZLLhjc85h7chZGBCQ=
github.com/lib/pq v1.0.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo=
github.com/linmadan/egglib-go v0.0.0-20210527091316-06b0732fb5f6 h1:nyhVnOIXsESuhZ95Ak6VRSF+0fHeKlYWq0EvHByt5RU=
github.com/linmadan/egglib-go v0.0.0-20210527091316-06b0732fb5f6/go.mod h1:ZZuSWicGxpgN0OulARhuKwFJuJ9we0otaPVAJtz10yk=
github.com/linmadan/egglib-go v0.0.0-20210827085852-177fa745932d h1:3C1xctwbWOdIFqUL1U2DGymTYLJrGOZxPaFu4SLsbkk=
github.com/linmadan/egglib-go v0.0.0-20210827085852-177fa745932d/go.mod h1:sK2YggplSGTnGLm3kHobFa41MXuBwpqADilWwb8WHK0=
github.com/magefile/mage v1.10.0 h1:3HiXzCUY12kh9bIuyXShaVe529fJfyqoVM42o/uom2g=
github.com/magefile/mage v1.10.0/go.mod h1:z5UZb/iS3GoOSn0JgWuiw7dxlurVYTu+/jHXqQg881A=
github.com/mattn/go-sqlite3 v2.0.3+incompatible/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc=
... ... @@ -147,6 +147,7 @@ github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJ
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826/go.mod h1:TaXosZuwdSHYgviHp1DAtfrULt5eUgsSMsZf+YrPgl8=
github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U=
github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs=
github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno=
... ... @@ -193,6 +194,8 @@ github.com/prometheus/procfs v0.1.3 h1:F0+tqvhOksq22sc6iCHF5WGlWjdwj92p0udFh1VFB
github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU=
github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a h1:9ZKAASQSHhDYGoxY8uLVpewe1GDZ2vu2Tr/vTdVAkFQ=
github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4=
github.com/richardlehane/mscfb v1.0.3/go.mod h1:YzVpcZg9czvAuhk9T+a3avCpcFPMUWm7gK3DypaEsUk=
github.com/richardlehane/msoleps v1.0.1/go.mod h1:BWev5JBpU9Ko2WAgmZEuiz4/u3ZYTKbjLycmwiWUfWg=
github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4=
github.com/shiena/ansicolor v0.0.0-20151119151921-a422bbe96644 h1:X+yvsM2yrEktyI+b2qND5gpH8YhURn0k8OCaeRnkINo=
github.com/shiena/ansicolor v0.0.0-20151119151921-a422bbe96644/go.mod h1:nkxAfR/5quYxwPZhyDxgasBMnRtBZd0FCEpawpjMUFg=
... ... @@ -230,6 +233,8 @@ github.com/vmihailenco/tagparser/v2 v2.0.0/go.mod h1:Wri+At7QHww0WTrCBeu4J6bNtoV
github.com/wendal/errors v0.0.0-20130201093226-f66c77a7882b/go.mod h1:Q12BUT7DqIlHRmgv3RskH+UCM/4eqVMgI0EMmlSpAXc=
github.com/xdg/scram v0.0.0-20180814205039-7eeb5667e42c/go.mod h1:lB8K/P019DLNhemzwFU4jHLhdvlE6uDZjXFejJXr49I=
github.com/xdg/stringprep v1.0.0/go.mod h1:Jhud4/sHMO4oL310DaZAKk9ZaJ08SJfe+sJh0HrGL1Y=
github.com/xuri/efp v0.0.0-20210322160811-ab561f5b45e3/go.mod h1:ybY/Jr0T0GTCnYjKqmdwxyxn2BQf2RcQIIvex5QldPI=
github.com/xuri/excelize/v2 v2.4.1/go.mod h1:rSu0C3papjzxQA3sdK8cU544TebhrPUoTOaGPIh0Q1A=
github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/gopher-lua v0.0.0-20171031051903-609c9cd26973/go.mod h1:aEV29XrmTYFr3CiRxZeGHpkvbwq+prZduBqMaascyCU=
go.etcd.io/etcd v3.3.25+incompatible/go.mod h1:yaeTdrJi5lOmYerz05bd8+V7KubZs8YSFZfzsF9A6aI=
... ... @@ -249,9 +254,11 @@ golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8U
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
golang.org/x/crypto v0.0.0-20210218145215-b8e89b74b9df/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I=
golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b h1:7mWr3k41Qtv8XlltBkDkl8LoP3mpSgBW8BUoxtEdbXg=
golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4=
golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97 h1:/UOmuWzQfxxo9UtlXMwuQU8CMgg1eZXqTRwkSQJWKOI=
golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
golang.org/x/image v0.0.0-20210220032944-ac19c3e999fb/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0=
golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU=
golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
... ... @@ -275,8 +282,9 @@ golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/
golang.org/x/net v0.0.0-20201006153459-a7d1128ccaa0/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
golang.org/x/net v0.0.0-20210226172049-e18ecbb05110 h1:qWPm9rbaAMKs8Bq/9LRpbMqxWRVUAQwMI9fVrssnTfw=
golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
golang.org/x/net v0.0.0-20210726213435-c6fcb2dbf985 h1:4CSI6oo7cOjJKajidEljs9h+uP0rRZBPPPhcCbj5mw8=
golang.org/x/net v0.0.0-20210726213435-c6fcb2dbf985/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
... ... @@ -304,14 +312,17 @@ golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7w
golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210218155724-8ebf48af031b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7 h1:iGu644GcxtEcrInvDsQRCwJjtCIOlT2V7IRt6ah2Whw=
golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1 h1:SrN+KX8Art/Sf4HNj6Zcz06G7VEz+7w9tdXTPOZ7+l4=
golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
golang.org/x/text v0.3.3 h1:cokOdA+Jmi5PJGXLlLllQSgYigAEfHXJAERHVMaCc2k=
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.6 h1:aRYxNxv6iGQlyVaZmk6ZgYEDa+Jg18DxebPSrd6bg1M=
golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
... ...
... ... @@ -14,15 +14,12 @@ type CooperationApplicationService struct {
// 审核共创申请
func (cooperationApplicationService *CooperationApplicationService) AuditCooperationApplication(
auditCooperationApplicationCommand *command.AuditCooperationApplicationCommand) (interface{}, error) {
if err := auditCooperationApplicationCommand.ValidateCommand(); err != nil {
return nil, application.ThrowError(application.ARG_ERROR, err.Error())
}
creationCooperationGateway := allied_creation_cooperation.NewHttplibAlliedCreationCooperation(
auditCooperationApplicationCommand.Operator)
_, err := creationCooperationGateway.CooperationApplicationsBatchApproval(allied_creation_cooperation.ReqCooperationApplicationBatchApproval{
CooperationApplicationIds: auditCooperationApplicationCommand.CooperationApplicationId,
CooperationApplicationDescription: auditCooperationApplicationCommand.CooperationApplicationVerifyDescription,
CooperationApplicationVerifyDescription: auditCooperationApplicationCommand.CooperationApplicationVerifyDescription,
Action: auditCooperationApplicationCommand.CooperationApplicationStatus,
Code: "BatchApproval",
})
... ... @@ -35,9 +32,7 @@ func (cooperationApplicationService *CooperationApplicationService) AuditCoopera
// 返回共创申请管理
func (cooperationApplicationService *CooperationApplicationService) GetCooperationApplication(getCooperationApplicationQuery *query.GetCooperationApplicationQuery) (interface{}, error) {
if err := getCooperationApplicationQuery.ValidateQuery(); err != nil {
return nil, application.ThrowError(application.ARG_ERROR, err.Error())
}
creationCooperationGateway := allied_creation_cooperation.NewHttplibAlliedCreationCooperation(getCooperationApplicationQuery.Operator)
applicationResult, err := creationCooperationGateway.CooperationApplicationGet(allied_creation_cooperation.ReqCooperationApplicationGet{
CooperationApplicationId: getCooperationApplicationQuery.CooperationApplicationId,
... ...
... ... @@ -16,9 +16,7 @@ type CooperationContractService struct {
// 创建共创合约管理
func (cooperationContractService *CooperationContractService) CreateCooperationContract(createCooperationContractCommand *command.CreateCooperationContractCommand) (interface{}, error) {
if err := createCooperationContractCommand.ValidateCommand(); err != nil {
return nil, application.ThrowError(application.ARG_ERROR, err.Error())
}
creationCooperationGateway := allied_creation_cooperation.NewHttplibAlliedCreationCooperation(createCooperationContractCommand.Operator)
rules1 := []allied_creation_cooperation.DividendsIncentivesRule{}
for _, v := range createCooperationContractCommand.DividendsIncentivesRules {
... ... @@ -84,9 +82,7 @@ func (cooperationContractService *CooperationContractService) CreateCooperationC
// 暂停恢复共创合约
func (cooperationContractService *CooperationContractService) EnableCooperationContract(enableCooperationContractCommand *command.EnableCooperationContractCommand) (interface{}, error) {
if err := enableCooperationContractCommand.ValidateCommand(); err != nil {
return nil, application.ThrowError(application.ARG_ERROR, err.Error())
}
creationCooperationGateway := allied_creation_cooperation.NewHttplibAlliedCreationCooperation(enableCooperationContractCommand.Operator)
_, err := creationCooperationGateway.CooperationContractsBatchOperate(allied_creation_cooperation.ReqCooperationContractsBatchOperate{
CooperationContractIds: enableCooperationContractCommand.CooperationContractId,
... ... @@ -100,9 +96,7 @@ func (cooperationContractService *CooperationContractService) EnableCooperationC
// 返回共创合约详情
func (cooperationContractService *CooperationContractService) GetCooperationContract(getCooperationContractQuery *query.GetCooperationContractQuery) (interface{}, error) {
if err := getCooperationContractQuery.ValidateQuery(); err != nil {
return nil, application.ThrowError(application.ARG_ERROR, err.Error())
}
creationCooperationGateway := allied_creation_cooperation.NewHttplibAlliedCreationCooperation(getCooperationContractQuery.Operator)
result, err := creationCooperationGateway.CooperationContractGet(allied_creation_cooperation.ReqCooperationContractGet{
CooperationContractId: getCooperationContractQuery.CooperationContractId,
... ... @@ -117,9 +111,7 @@ func (cooperationContractService *CooperationContractService) GetCooperationCont
// 返回共创合约管理列表
func (cooperationContractService *CooperationContractService) ListCooperationContract(
listCooperationContractQuery *query.ListCooperationContractQuery) (int, interface{}, error) {
if err := listCooperationContractQuery.ValidateQuery(); err != nil {
return 0, nil, application.ThrowError(application.ARG_ERROR, err.Error())
}
creationCooperationGateway := allied_creation_cooperation.NewHttplibAlliedCreationCooperation(listCooperationContractQuery.Operator)
result, err := creationCooperationGateway.CooperationContractSearch(allied_creation_cooperation.ReqCooperationContractSearch{
PageNumber: listCooperationContractQuery.PageNumber,
... ... @@ -141,9 +133,7 @@ func (cooperationContractService *CooperationContractService) ListCooperationCon
// 更新共创合约管理
func (cooperationContractService *CooperationContractService) UpdateCooperationContract(updateCooperationContractCommand *command.UpdateCooperationContractCommand) (interface{}, error) {
if err := updateCooperationContractCommand.ValidateCommand(); err != nil {
return nil, application.ThrowError(application.ARG_ERROR, err.Error())
}
creationCooperationGateway := allied_creation_cooperation.NewHttplibAlliedCreationCooperation(updateCooperationContractCommand.Operator)
rules1 := []allied_creation_cooperation.DividendsIncentivesRule{}
for _, v := range updateCooperationContractCommand.DividendsIncentivesRules {
... ...
... ... @@ -14,9 +14,7 @@ type CooperationModeService struct {
//CreateCooperationMode 创建共创模式服务
func (cooperationModeService *CooperationModeService) CreateCooperationMode(createCooperationModeCommand *command.CreateCooperationModeCommand) (interface{}, error) {
if err := createCooperationModeCommand.ValidateCommand(); err != nil {
return nil, application.ThrowError(application.ARG_ERROR, err.Error())
}
creationCooperationGateway := allied_creation_cooperation.NewHttplibAlliedCreationCooperation(createCooperationModeCommand.Operator)
result, err := creationCooperationGateway.CooperationModeAdd(allied_creation_cooperation.ReqCooperationModeAdd{
CooperationModeName: createCooperationModeCommand.CooperationModeName,
... ... @@ -38,9 +36,6 @@ func (cooperationModeService *CooperationModeService) CreateCooperationMode(crea
//GetCooperationMode 返回共创模式服务
func (cooperationModeService *CooperationModeService) GetCooperationMode(getCooperationModeQuery *query.GetCooperationModeQuery) (interface{}, error) {
if err := getCooperationModeQuery.ValidateQuery(); err != nil {
return nil, application.ThrowError(application.ARG_ERROR, err.Error())
}
creationCooperationGateway := allied_creation_cooperation.NewHttplibAlliedCreationCooperation(getCooperationModeQuery.Operator)
result, err := creationCooperationGateway.CooperationModeGet(allied_creation_cooperation.ReqCooperationModeGet{
... ... @@ -62,9 +57,7 @@ func (cooperationModeService *CooperationModeService) GetCooperationMode(getCoop
//ListCooperationMode 返回共创模式服务列表
func (cooperationModeService *CooperationModeService) ListCooperationMode(listCooperationModeQuery *query.ListCooperationModeQuery) (int64, interface{}, error) {
if err := listCooperationModeQuery.ValidateQuery(); err != nil {
return 0, nil, application.ThrowError(application.ARG_ERROR, err.Error())
}
creationCooperationGateway := allied_creation_cooperation.NewHttplibAlliedCreationCooperation(listCooperationModeQuery.Operator)
result, err := creationCooperationGateway.CooperationModesSearch(allied_creation_cooperation.ReqCooperationModesSearch{
PageNumber: listCooperationModeQuery.PageNumber,
... ... @@ -99,9 +92,7 @@ func (cooperationModeService *CooperationModeService) ListCooperationMode(listCo
//RemoveCooperationMode 移除共创模式服务
func (cooperationModeService *CooperationModeService) RemoveCooperationMode(removeCooperationModeCommand *command.RemoveCooperationModeCommand) (interface{}, error) {
if err := removeCooperationModeCommand.ValidateCommand(); err != nil {
return nil, application.ThrowError(application.ARG_ERROR, err.Error())
}
creationCooperationGateway := allied_creation_cooperation.NewHttplibAlliedCreationCooperation(removeCooperationModeCommand.Operator)
_, err := creationCooperationGateway.CooperationModeBatchRemove(allied_creation_cooperation.ReqCooperationModeBatchRemove{
CooperationModeIds: removeCooperationModeCommand.CooperationModeId,
... ... @@ -114,9 +105,7 @@ func (cooperationModeService *CooperationModeService) RemoveCooperationMode(remo
//UpdateCooperationMode 更新共创模式
func (cooperationModeService *CooperationModeService) UpdateCooperationMode(updateCooperationModeCommand *command.UpdateCooperationModeCommand) (interface{}, error) {
if err := updateCooperationModeCommand.ValidateCommand(); err != nil {
return nil, application.ThrowError(application.ARG_ERROR, err.Error())
}
creationCooperationGateway := allied_creation_cooperation.NewHttplibAlliedCreationCooperation(updateCooperationModeCommand.Operator)
_, err := creationCooperationGateway.CooperationModeUpdate(allied_creation_cooperation.ReqCooperationModeUpdate{
CooperationModeId: updateCooperationModeCommand.CooperationModeId,
... ... @@ -132,9 +121,7 @@ func (cooperationModeService *CooperationModeService) UpdateCooperationMode(upda
// EnableCooperationMode 禁用启用共创模式
func (cooperationModeService *CooperationModeService) EnableCooperationMode(updateCooperationModeCommand *command.OperateCooperationModeCommand) (interface{}, error) {
if err := updateCooperationModeCommand.ValidateCommand(); err != nil {
return nil, application.ThrowError(application.ARG_ERROR, err.Error())
}
creationCooperationGateway := allied_creation_cooperation.NewHttplibAlliedCreationCooperation(updateCooperationModeCommand.Operator)
_, err := creationCooperationGateway.CooperationModeOperate(allied_creation_cooperation.ReqOperateCooperationMode{
CooperationModeId: updateCooperationModeCommand.CooperationModeId,
... ...
... ... @@ -16,9 +16,7 @@ type CooperationProjectService struct {
// 创建共创项目管理
func (cooperationProjectService *CooperationProjectService) CreateCooperationProject(createCooperationProjectCommand *command.CreateCooperationProjectCommand) (interface{}, error) {
if err := createCooperationProjectCommand.ValidateCommand(); err != nil {
return nil, application.ThrowError(application.ARG_ERROR, err.Error())
}
creationCooperationGateway := allied_creation_cooperation.NewHttplibAlliedCreationCooperation(createCooperationProjectCommand.Operator)
result, err := creationCooperationGateway.CooperationProjectAdd(allied_creation_cooperation.ReqCooperationProjectAdd{
... ... @@ -47,9 +45,7 @@ func (cooperationProjectService *CooperationProjectService) CreateCooperationPro
// 结束共创项目管理
func (cooperationProjectService *CooperationProjectService) EndCooperationProject(endCooperationProjectCommand *command.EndCooperationProjectCommand) (interface{}, error) {
if err := endCooperationProjectCommand.ValidateCommand(); err != nil {
return nil, application.ThrowError(application.ARG_ERROR, err.Error())
}
creationCooperationGateway := allied_creation_cooperation.NewHttplibAlliedCreationCooperation(endCooperationProjectCommand.Operator)
_, err := creationCooperationGateway.CooperationProjectBatchEnd(allied_creation_cooperation.ReqCooperationProjectBatchEnd{
CooperationProjectIds: endCooperationProjectCommand.CooperationProjectId,
... ... @@ -62,9 +58,7 @@ func (cooperationProjectService *CooperationProjectService) EndCooperationProjec
// 返回共创项目管理
func (cooperationProjectService *CooperationProjectService) GetCooperationProject(getCooperationProjectQuery *query.GetCooperationProjectQuery) (interface{}, error) {
if err := getCooperationProjectQuery.ValidateQuery(); err != nil {
return nil, application.ThrowError(application.ARG_ERROR, err.Error())
}
creationCooperationGateway := allied_creation_cooperation.NewHttplibAlliedCreationCooperation(getCooperationProjectQuery.Operator)
resultProject, err := creationCooperationGateway.CooperationProjectGet(allied_creation_cooperation.ReqCooperationProjectGet{
CooperationProjectId: getCooperationProjectQuery.CooperationProjectId,
... ... @@ -98,9 +92,7 @@ func (cooperationProjectService *CooperationProjectService) GetCooperationProjec
// 返回共创项目管理列表
func (cooperationProjectService *CooperationProjectService) ListCooperationProject(listCooperationProjectQuery *query.ListCooperationProjectQuery) (int64, interface{}, error) {
if err := listCooperationProjectQuery.ValidateQuery(); err != nil {
return 0, nil, application.ThrowError(application.ARG_ERROR, err.Error())
}
creationCooperationGateway := allied_creation_cooperation.NewHttplibAlliedCreationCooperation(listCooperationProjectQuery.Operator)
result, err := creationCooperationGateway.CooperationProjectsSearch(allied_creation_cooperation.ReqCooperationProjectSearch{
PageNumber: listCooperationProjectQuery.PageNumber,
... ... @@ -130,9 +122,7 @@ func (cooperationProjectService *CooperationProjectService) ListCooperationProje
// 更新共创项目管理
func (cooperationProjectService *CooperationProjectService) UpdateCooperationProject(updateCooperationProjectCommand *command.UpdateCooperationProjectCommand) (interface{}, error) {
if err := updateCooperationProjectCommand.ValidateCommand(); err != nil {
return nil, application.ThrowError(application.ARG_ERROR, err.Error())
}
creationCooperationGateway := allied_creation_cooperation.NewHttplibAlliedCreationCooperation(updateCooperationProjectCommand.Operator)
_, err := creationCooperationGateway.CooperationProjectUpdate(allied_creation_cooperation.ReqCooperationProjectUpdate{
CooperationProjectId: updateCooperationProjectCommand.CooperationProjectId,
... ...
... ... @@ -16,9 +16,7 @@ type DividendsOrderService struct {
// 创建分红订单实体对象
func (dividendsOrderService *DividendsOrderService) CreateDividendsOrder(createDividendsOrderCommand *command.CreateDividendsOrderCommand) (interface{}, error) {
// if err := createDividendsOrderCommand.ValidateCommand(); err != nil {
// return nil, application.ThrowError(application.ARG_ERROR, err.Error())
// }
orderGoods := []allied_creation_cooperation.DividendsOrderGoodAdd{}
for _, v := range createDividendsOrderCommand.OrderGoods {
good := allied_creation_cooperation.DividendsOrderGoodAdd{
... ... @@ -68,9 +66,6 @@ func (dividendsOrderService *DividendsOrderService) GetDividendsOrder(getDividen
// 移除分红订单实体对象
func (dividendsOrderService *DividendsOrderService) RemoveDividendsOrder(removeDividendsOrderCommand *command.RemoveDividendsOrderCommand) (interface{}, error) {
// if err := removeDividendsOrderCommand.ValidateCommand(); err != nil {
// return nil, application.ThrowError(application.ARG_ERROR, err.Error())
// }
creationCooperationGateway := allied_creation_cooperation.NewHttplibAlliedCreationCooperation(removeDividendsOrderCommand.Operator)
_, err := creationCooperationGateway.DividendsOrderBatchRemove(allied_creation_cooperation.ReqDividendsOrderBatchRemove{
... ... @@ -105,9 +100,7 @@ func (dividendsOrderService *DividendsOrderService) SearchDividendsOrder(searchD
// 更新分红订单实体对象
func (dividendsOrderService *DividendsOrderService) UpdateDividendsOrder(updateDividendsOrderCommand *command.UpdateDividendsOrderCommand) (interface{}, error) {
// if err := updateDividendsOrderCommand.ValidateCommand(); err != nil {
// return nil, application.ThrowError(application.ARG_ERROR, err.Error())
// }
orderGoods := []allied_creation_cooperation.DividendsOrderGoodAdd{}
for _, v := range updateDividendsOrderCommand.OrderGoods {
good := allied_creation_cooperation.DividendsOrderGoodAdd{
... ...
... ... @@ -21,7 +21,6 @@ type UpdateDividendsReturnedOrderCommand struct {
} `json:"orderGoods"` //货品
DividendsReturnedDate int64 `json:"dividendsReturnedDate"` //退货日期
OrderTime int64 `json:"orderTime"` //订单日期
Remarks string `json:"remarks"` //
RegionName string `json:"regionName"`
}
... ...
... ... @@ -17,9 +17,7 @@ type NoticeSettingService struct {
//NoticeSettingList 推送消息配置列表
func (noticeSettingService *NoticeSettingService) NoticeSettingList(noticeSettingListQuery *query.NoticeSettingListQuery) (int64, interface{}, error) {
if err := noticeSettingListQuery.ValidateQuery(); err != nil {
return 0, nil, application.ThrowError(application.ARG_ERROR, err.Error())
}
creationBasicGateway := allied_creation_basic.NewHttplibAlliedCreationBasic(
noticeSettingListQuery.Operator,
)
... ... @@ -73,9 +71,7 @@ func (noticeSettingService *NoticeSettingService) NoticeSettingList(noticeSettin
//NoticeSettingProfile 推送消息配置需求的参数候选项
func (noticeSettingService *NoticeSettingService) NoticeSettingProfile(noticeSettingProfileQuery *query.NoticeSettingProfileQuery) (interface{}, error) {
if err := noticeSettingProfileQuery.ValidateQuery(); err != nil {
return nil, application.ThrowError(application.ARG_ERROR, err.Error())
}
creationBasicGateway := allied_creation_basic.NewHttplibAlliedCreationBasic(
noticeSettingProfileQuery.Operator,
)
... ... @@ -110,9 +106,7 @@ func (noticeSettingService *NoticeSettingService) NoticeSettingUpdate(noticeSett
// NoticeSettingUpdate 添加配置
func (noticeSettingService *NoticeSettingService) NoticeSettingAdd(noticeSettingAddCommand *command.NoticeSettingAddCommand) (interface{}, error) {
if err := noticeSettingAddCommand.ValidateCommand(); err != nil {
return nil, application.ThrowError(application.ARG_ERROR, err.Error())
}
creationBasicGateway := allied_creation_basic.NewHttplibAlliedCreationBasic(
noticeSettingAddCommand.Operator,
)
... ... @@ -139,9 +133,7 @@ func (noticeSettingService *NoticeSettingService) NoticeSettingAdd(noticeSetting
// NoticeSettingGet 获取配置
func (noticeSettingService *NoticeSettingService) NoticeSettingGet(noticeSettingGetQuery *query.NoticeSettingGetQuery) (interface{}, error) {
if err := noticeSettingGetQuery.ValidateQuery(); err != nil {
return nil, application.ThrowError(application.ARG_ERROR, err.Error())
}
creationBasicGateway := allied_creation_basic.NewHttplibAlliedCreationBasic(
noticeSettingGetQuery.Operator,
)
... ...
... ... @@ -84,7 +84,7 @@ type (
type (
ReqCooperationApplicationBatchApproval struct {
CooperationApplicationIds []string `json:"cooperationApplicationIds"`
CooperationApplicationDescription string `json:"cooperationApplicationDescription"` //描述
CooperationApplicationVerifyDescription string `json:"cooperationApplicationVerifyDescription"` //描述
Action int `json:"action"` //审核动作,1同意,2拒绝
Code string `json:"code" ` //cname:"菜单编码"
}
... ...