切换导航条
此项目
正在载入...
登录
allied-creation
/
allied-creation-gateway
·
提交
转到一个项目
GitLab
转到群组
项目
活动
文件
提交
管道
0
构建
0
图表
里程碑
问题
0
合并请求
0
成员
标记
维基
派生
网络
创建新的问题
下载为
差异文件
浏览文件
作者
yangfu
3 years ago
提交
5bda01858e6ddff700b8258877b6a5af89bbffa1
2 个父辈
839a2e85
b0f8f7e8
Merge branch 'dev' of
http://gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway
into dev
隐藏空白字符变更
内嵌
并排对比
正在显示
9 个修改的文件
包含
63 行增加
和
13 行删除
pkg/application/mobile/cooperation/command/ca_create_cooperation_application.go
pkg/application/mobile/cooperation/service/cooperation_applications.go
pkg/application/web/dividendsEstimate/dto/dto.go
pkg/infrastructure/service_gateway/allied_creation_cooperation/module_cooperation_application.go
pkg/infrastructure/service_gateway/allied_creation_cooperation/param_cooperation_application.go
pkg/infrastructure/service_gateway/allied_creation_cooperation/param_cooperation_contract.go
pkg/infrastructure/service_gateway/allied_creation_cooperation/param_cooperation_project.go
pkg/infrastructure/service_gateway/allied_creation_cooperation/param_dividends_estimate.go
pkg/infrastructure/service_gateway/allied_creation_cooperation/param_dividends_returned_order.go
pkg/application/mobile/cooperation/command/ca_create_cooperation_application.go
查看文件 @
5bda018
...
...
@@ -15,7 +15,8 @@ type CreateCooperationApplicationCommand struct {
// 申请人的id
//ApplicantUid int `json:"userId"`
//
CooperationProjectNumber
string
`json:"cooperationProjectNumber"`
CooperationProjectId
int
`json:"cooperationProjectId"`
// CooperationProjectNumber string `json:"cooperationProjectNumber"`
// 附件列表
Attachment
[]
domain
.
Attachment
`json:"attachment"`
}
...
...
pkg/application/mobile/cooperation/service/cooperation_applications.go
查看文件 @
5bda018
...
...
@@ -95,11 +95,10 @@ func (srv CooperationApplicationsService) SearchCooperationApplications(applicat
func
(
srv
CooperationApplicationsService
)
CreateCooperationApplications
(
createApplicationsCommand
*
command
.
CreateCooperationApplicationCommand
)
(
interface
{},
error
)
{
creationCooperationGateway
:=
allied_creation_cooperation
.
NewHttplibAlliedCreationCooperation
(
createApplicationsCommand
.
Operator
)
result
,
err
:=
creationCooperationGateway
.
CooperationApplicationAdd
(
allied_creation_cooperation
.
ReqCooperationApplicationAdd
{
ApplicantUid
:
strconv
.
Itoa
(
int
(
createApplicationsCommand
.
Operator
.
UserId
)),
result
,
err
:=
creationCooperationGateway
.
ApplyForCooperation
(
allied_creation_cooperation
.
ReqApplyForCooperation
{
CooperationApplicationDescription
:
createApplicationsCommand
.
CooperationApplicationDescription
,
CooperationProjectId
:
createApplicationsCommand
.
CooperationProjectId
,
CooperationApplicationAttachment
:
createApplicationsCommand
.
Attachment
,
CooperationProjectNumber
:
createApplicationsCommand
.
CooperationProjectNumber
,
})
if
err
!=
nil
{
return
nil
,
application
.
ThrowError
(
application
.
BUSINESS_ERROR
,
err
.
Error
())
...
...
pkg/application/web/dividendsEstimate/dto/dto.go
查看文件 @
5bda018
...
...
@@ -51,7 +51,7 @@ type DividendsEstimateMoneyItem struct {
DepartmentName
string
`json:"departmentName"`
}
`json:"department"`
//发起部门
CooperationContractSponsorName
string
`json:"cooperationContractSponsorName"`
StageAndUndertaker
struct
{
StageAndUndertaker
[]
struct
{
Stage
int
`json:"stage"`
// 分红阶段
Undertakers
[]
struct
{
UndertakerId
int
`json:"undertakerId,string"`
// 承接人id
...
...
@@ -60,7 +60,7 @@ type DividendsEstimateMoneyItem struct {
UserPhone
string
`json:"userPhone"`
// 用户手机号
}
`json:"userInfo"`
}
`json:"undertakers"`
// 共创承接人
}
}
`json:"stageAndUndertaker"`
}
func
ToDividendsEstimateMoneyItem
(
param
*
allied_creation_cooperation
.
DataDividendsEstimateSearchMoney
)
[]
DividendsEstimateMoneyItem
{
...
...
pkg/infrastructure/service_gateway/allied_creation_cooperation/module_cooperation_application.go
查看文件 @
5bda018
...
...
@@ -412,3 +412,34 @@ func (gateway HttplibAlliedCreationCooperation) CooperationApplicationsOneclickA
err
=
gateway
.
GetResponseData
(
result
,
&
data
)
return
&
data
,
err
}
// ApplyForCooperation 申请共创项目
func
(
gateway
HttplibAlliedCreationCooperation
)
ApplyForCooperation
(
param
ReqApplyForCooperation
)
(
*
DataApplyForCooperation
,
error
)
{
url
:=
gateway
.
baseUrL
+
"/cooperation-applications/"
+
strconv
.
Itoa
(
param
.
CooperationProjectId
)
+
"/apply-for-cooperation"
method
:=
"POST"
req
:=
gateway
.
CreateRequest
(
url
,
method
)
log
.
Logger
.
Debug
(
"向业务模块请求数据:创建共创申请。"
,
map
[
string
]
interface
{}{
"api"
:
method
+
":"
+
url
,
"param"
:
param
,
})
req
,
err
:=
req
.
JSONBody
(
param
)
if
err
!=
nil
{
return
nil
,
fmt
.
Errorf
(
"请求创建共创申请失败:%w"
,
err
)
}
byteResult
,
err
:=
req
.
Bytes
()
if
err
!=
nil
{
return
nil
,
fmt
.
Errorf
(
"获取创建共创申请失败:%w"
,
err
)
}
log
.
Logger
.
Debug
(
"获取业务模块请求数据:创建共创申请。"
,
map
[
string
]
interface
{}{
"result"
:
string
(
byteResult
),
})
var
result
service_gateway
.
GatewayResponse
err
=
json
.
Unmarshal
(
byteResult
,
&
result
)
if
err
!=
nil
{
return
nil
,
fmt
.
Errorf
(
"解析创建共创申请:%w"
,
err
)
}
var
data
DataApplyForCooperation
err
=
gateway
.
GetResponseData
(
result
,
&
data
)
return
&
data
,
err
}
...
...
pkg/infrastructure/service_gateway/allied_creation_cooperation/param_cooperation_application.go
查看文件 @
5bda018
...
...
@@ -233,3 +233,20 @@ type (
DataCooperationApplicationOneclickApproval
struct
{
}
)
//申请共创项目
type
(
ReqApplyForCooperation
struct
{
// 共创申请人uid
// ApplicantUid string `json:"-" `
// 共创申请描述
CooperationApplicationDescription
string
` json:"cooperationApplicationDescription"`
// 共创申请描述附件
CooperationApplicationAttachment
[]
domain
.
Attachment
`json:"cooperationApplicationAttachment"`
// 关联的共创项目id
CooperationProjectId
int
`json:"cooperationProjectId"`
}
DataApplyForCooperation
struct
{
CooperationApplicationId
int
`json:"cooperationApplicationId,string"`
}
)
...
...
pkg/infrastructure/service_gateway/allied_creation_cooperation/param_cooperation_contract.go
查看文件 @
5bda018
...
...
@@ -17,7 +17,7 @@ type CooperationContract struct {
DepartmentId
int
`json:"departmentId,string"`
DepartmentName
string
`json:"departmentName"`
DepartmentNumber
string
`json:"departmentNumber"`
}
`jsopn:"department"
json:"department"
`
//发起部门
}
`jsopn:"department"`
//发起部门
CooperationContractSponsor
struct
{
UserId
int
`json:"userId,string"`
//id
UserInfo
struct
{
...
...
pkg/infrastructure/service_gateway/allied_creation_cooperation/param_cooperation_project.go
查看文件 @
5bda018
...
...
@@ -232,7 +232,8 @@ type (
}
`json:"userInfo"`
}
`json:"operator"`
//OperateTime time.Time `json:"operateTime"`
Status
int
`json:"status"`
Status
int
`json:"status"`
ApplicantCount
int
`json:"applicantCount"`
// 共创申请人计数
}
DataCooperationProjectSearch
struct
{
List
[]
DataCooperationProjectSearchItem
`json:"list"`
...
...
pkg/infrastructure/service_gateway/allied_creation_cooperation/param_dividends_estimate.go
查看文件 @
5bda018
...
...
@@ -18,7 +18,7 @@ type (
OrderGoodId
int
`json:"orderGoodId,string"`
// 共创合约编号
CooperationContractNumber
string
`json:"cooperationContractNumber"`
// 分红订单号或退货单号
、
// 分红订单号或退货单号
OrderNumber
string
`json:"orderNumber"`
// 来源单号
OriginalOrderNum
string
`json:"originalOrderNum"`
...
...
@@ -26,12 +26,13 @@ type (
CustomerName
string
`json:"customerName"`
// 订单区域
RegionName
string
`json:"region"`
//货品名称
//
货品名称
OrderGoodName
string
`json:"orderGoodName"`
// 订单金额
OrderAmount
float64
`json:"orderAmount"`
// 订单/退货单日期
OrderDate
time
.
Time
`json:"orderDate"`
OrgId
int
`json:"orgId"`
}
`json:"list"`
}
)
...
...
@@ -121,7 +122,7 @@ type (
}
`json:"department"`
//发起部门
// 共创合约发起人
CooperationContractSponsorName
string
`json:"cooperationContractSponsor"`
StageAndUndertaker
struct
{
StageAndUndertaker
[]
struct
{
Stage
int
`json:"stage"`
// 分红阶段
Undertakers
[]
struct
{
UndertakerId
int
`json:"undertakerId,string"`
// 承接人id
...
...
pkg/infrastructure/service_gateway/allied_creation_cooperation/param_dividends_returned_order.go
查看文件 @
5bda018
...
...
@@ -2,10 +2,9 @@ package allied_creation_cooperation
import
"time"
//创建分红退货单
type
(
DividendsReturnedOrderGoods
struct
{
OrderGoodId
int64
`json:"orderGoodId,string"`
//
订单产品id
OrderGoodId
int64
`json:"orderGoodId,string"`
//订单产品id
CooperationContractNumber
string
`json:"cooperationContractNumber"`
//关联的共创合约编号
OrderGoodAmount
float64
`json:"orderGoodAmount"`
//订单产品金额
OrderGoodName
string
`json:"orderGoodName"`
//订单产品名称
...
...
@@ -57,6 +56,7 @@ type (
OrderGoodPrice
float64
`json:"orderGoodPrice"`
//订单产品单价
OrderGoodQuantity
float64
`json:"orderGoodQuantity"`
//订单产品数量
}
//创建分红退货单
ReqDividendsReturnedOrderAdd
struct
{
DividendsReturnedCustomerName
string
`json:"dividendsReturnedCustomerName"`
DividendsOrderNumber
string
`json:"dividendsOrderNumber"`
//分红单号
...
...
请
注册
或
登录
后发表评论