作者 陈志颖

feat:共创反馈信息功能开发

... ... @@ -19,13 +19,13 @@ type CreateContractUndertakerFeedbackCommand struct {
// 承接人uid
UnderTakerUid string `cname:"承接人uid" json:"underTakerUid,omitempty"`
// 公司ID,通过集成REST上下文获取
CompanyId int64 `cname:"公司ID,通过集成REST上下文获取" json:"companyId,string" valid:"Required"`
CompanyId int64 `cname:"公司ID" json:"companyId,string" valid:"Required"`
// 组织机构ID
OrgId int64 `cname:"组织机构ID" json:"orgId,string" valid:"Required"`
// 用户ID,通过集成REST上下文获取,可翻译成发起人、承接人、推荐人、业务员
UserId int64 `cname:"用户ID,通过集成REST上下文获取,可翻译成发起人、承接人、推荐人、业务员" json:"userId,string" valid:"Required"`
UserId int64 `cname:"用户ID" json:"userId,string" valid:"Required"`
// 用户基础数据id
UserBaseId int64 `cname:"用户基础数据is" json:"userBaseId,string" valid:"Required"`
UserBaseId int64 `cname:"用户基础数据ID" json:"userBaseId,string" valid:"Required"`
}
func (createContractUndertakerFeedbackCommand *CreateContractUndertakerFeedbackCommand) Valid(validation *validation.Validation) {
... ...
... ... @@ -12,15 +12,15 @@ type RemoveContractUndertakerFeedbackCommand struct {
// 合约承接方反馈记录ID
FeedbackId string `cname:"合约承接方反馈记录ID" json:"feedbackId" valid:"Required"`
// 承接人uid
UnderTakerUid string `cname:"承接人uid" json:"underTakerUid,omitempty"`
UnderTakerUid string `cname:"承接人UID" json:"underTakerUid,omitempty"`
// 公司ID,通过集成REST上下文获取
CompanyId int64 `cname:"公司ID,通过集成REST上下文获取" json:"companyId,string" valid:"Required"`
CompanyId int64 `cname:"公司ID" json:"companyId,string" valid:"Required"`
// 组织机构ID
OrgId int64 `cname:"组织机构ID" json:"orgId,string" valid:"Required"`
// 用户ID,通过集成REST上下文获取,可翻译成发起人、承接人、推荐人、业务员
UserId int64 `cname:"用户ID,通过集成REST上下文获取,可翻译成发起人、承接人、推荐人、业务员" json:"userId,string" valid:"Required"`
UserId int64 `cname:"用户ID" json:"userId,string" valid:"Required"`
// 用户基础数据id
UserBaseId int64 `cname:"用户基础数据is" json:"userBaseId,string" valid:"Required"`
UserBaseId int64 `cname:"用户基础数据" json:"userBaseId,string" valid:"Required"`
}
func (removeContractUndertakerFeedbackCommand *RemoveContractUndertakerFeedbackCommand) Valid(validation *validation.Validation) {
... ...
... ... @@ -11,7 +11,7 @@ import (
type UpdateContractUndertakerFeedbackCommand struct {
// 合约承接方信息反馈id
FeedbackId string `cname:"合约承接方反馈信息id" json:"feedbackId" valid:"Required"`
FeedbackId string `cname:"合约承接方反馈信息ID" json:"feedbackId" valid:"Required"`
// 合约承接方反馈内容附件
FeedbackAttachment []*domain.Attachment `cname:"合约承接方反馈内容附件" json:"feedbackAttachment" valid:"Required"`
// 合约承接方反馈内容
... ... @@ -19,15 +19,15 @@ type UpdateContractUndertakerFeedbackCommand struct {
// 共创合约编号
CooperationContractNumber string `cname:"共创合约编号" json:"cooperationContractNumber" valid:"Required"`
// 承接人用户uid
UnderTakerUid string `cname:"承接人用户uid" json:"underTakerUid,omitempty"`
UnderTakerUid string `cname:"承接人用户UID" json:"underTakerUid,omitempty"`
// 公司ID,通过集成REST上下文获取
CompanyId int64 `cname:"公司ID,通过集成REST上下文获取" json:"companyId,string" valid:"Required"`
CompanyId int64 `cname:"公司ID" json:"companyId,string" valid:"Required"`
// 组织机构ID
OrgId int64 `cname:"组织机构ID" json:"orgId,string" valid:"Required"`
// 用户ID,通过集成REST上下文获取,可翻译成发起人、承接人、推荐人、业务员
UserId int64 `cname:"用户ID,通过集成REST上下文获取,可翻译成发起人、承接人、推荐人、业务员" json:"userId,string" valid:"Required"`
UserId int64 `cname:"用户ID" json:"userId,string" valid:"Required"`
// 用户基础数据id
UserBaseId int64 `cname:"用户基础数据is" json:"userBaseId,string" valid:"Required"`
UserBaseId int64 `cname:"用户基础数据ID" json:"userBaseId,string" valid:"Required"`
}
func (updateContractUndertakerFeedbackCommand *UpdateContractUndertakerFeedbackCommand) Valid(validation *validation.Validation) {
... ...
... ... @@ -12,15 +12,15 @@ type GetContractUndertakerFeedbackQuery struct {
// 合约承接方反馈记录ID
FeedbackId string `cname:"合约承接方反馈记录ID" json:"feedbackId" valid:"Required"`
// 承接人uid
UnderTakerUid string `cname:"承接人uid" json:"underTakerUid,omitempty"`
UnderTakerUid string `cname:"承接人UID" json:"underTakerUid,omitempty"`
// 公司ID,通过集成REST上下文获取
CompanyId int64 `cname:"公司ID,通过集成REST上下文获取" json:"companyId,string" valid:"Required"`
CompanyId int64 `cname:"公司ID" json:"companyId,string" valid:"Required"`
// 组织机构ID
OrgId int64 `cname:"组织机构ID" json:"orgId,string" valid:"Required"`
// 用户ID,通过集成REST上下文获取,可翻译成发起人、承接人、推荐人、业务员
UserId int64 `cname:"用户ID,通过集成REST上下文获取,可翻译成发起人、承接人、推荐人、业务员" json:"userId,string" valid:"Required"`
UserId int64 `cname:"用户ID" json:"userId,string" valid:"Required"`
// 用户基础数据id
UserBaseId int64 `cname:"用户基础数据is" json:"userBaseId,string" valid:"Required"`
UserBaseId int64 `cname:"用户基础数据ID" json:"userBaseId,string" valid:"Required"`
}
func (getContractUndertakerFeedbackQuery *GetContractUndertakerFeedbackQuery) Valid(validation *validation.Validation) {
... ...
... ... @@ -10,13 +10,13 @@ import (
type ListContractUndertakerFeedbackQuery struct {
// 页面大小
PageNumber int64 `cname:"页面大小" json:"pageNumber,omitempty"`
PageNumber int64 `cname:"页" json:"pageNumber,omitempty"`
// 页面大小
PageSize int64 `cname:"页面大小" json:"pageSize,omitempty"`
// 承接人uid
UnderTakerUid string `cname:"承接人uid" json:"underTakerUid" valid:"Required"`
UnderTakerUid string `cname:"承接人UID" json:"underTakerUid" valid:"Required"`
// 公司ID,通过集成REST上下文获取
CompanyId int64 `cname:"公司ID,通过集成REST上下文获取" json:"companyId,string" valid:"Required"`
CompanyId int64 `cname:"公司ID" json:"companyId,string" valid:"Required"`
// 组织机构ID
OrgId int64 `cname:"组织机构ID" json:"orgId,string" valid:"Required"`
// 用户ID,通过集成REST上下文获取,可翻译成发起人、承接人、推荐人、业务员
... ...
... ... @@ -10,21 +10,21 @@ import (
type SearchContractUndertakerFeedbackQuery struct {
// 公司ID,通过集成REST上下文获取
CompanyId int64 `cname:"公司ID,通过集成REST上下文获取" json:"companyId,string" valid:"Required"`
CompanyId int64 `cname:"公司ID" json:"companyId,string" valid:"Required"`
// 组织机构ID
OrgId int64 `cname:"组织机构ID" json:"orgId,string" valid:"Required"`
// 用户ID,通过集成REST上下文获取,可翻译成发起人、承接人、推荐人、业务员
UserId int64 `cname:"用户ID,通过集成REST上下文获取,可翻译成发起人、承接人、推荐人、业务员" json:"userId,string" valid:"Required"`
UserId int64 `cname:"用户ID" json:"userId,string" valid:"Required"`
// 用户基础数据id
UserBaseId int64 `cname:"用户基础数据is" json:"userBaseId,string" valid:"Required"`
UserBaseId int64 `cname:"用户基础数据ID" json:"userBaseId,string" valid:"Required"`
// 共创合约名称
CooperationContractName string `cname:"共创合约名称" json:"cooperationContractName" valid:"Required"`
CooperationContractName string `cname:"共创合约名称" json:"cooperationContractName,omitempty"`
// 承接人姓名
UndertakerName string `cname:"承接人姓名" json:"undertakerName,omitempty"`
// 查询关键词
MatchWord string `cname:"查询关键词" json:"matchWord,omitempty"`
// 页面大小
PageNumber int64 `cname:"页面大小" json:"pageNumber,omitempty"`
PageNumber int64 `cname:"页" json:"pageNumber,omitempty"`
// 页面大小
PageSize int64 `cname:"页面大小" json:"pageSize,omitempty"`
}
... ...
... ... @@ -61,13 +61,11 @@ func (controller *ContractUndertakerFeedbackController) RemoveContractUndertaker
contractUndertakerFeedbackService := service.NewContractUndertakerFeedbackService(nil)
removeContractUndertakerFeedbackCommand := &command.RemoveContractUndertakerFeedbackCommand{}
_ = controller.Unmarshal(removeContractUndertakerFeedbackCommand)
// 解析头部信息
header := controller.GetRequestHeader(controller.Ctx)
removeContractUndertakerFeedbackCommand.CompanyId = header.CompanyId
removeContractUndertakerFeedbackCommand.OrgId = header.OrgId
removeContractUndertakerFeedbackCommand.UserId = header.UserId
removeContractUndertakerFeedbackCommand.UserBaseId = header.UserBaseId
// 解析路径参数
contractUndertakerFeedbackId := controller.GetString(":contractUndertakerFeedbackId")
removeContractUndertakerFeedbackCommand.FeedbackId = contractUndertakerFeedbackId
data, err := contractUndertakerFeedbackService.RemoveContractUndertakerFeedback(removeContractUndertakerFeedbackCommand)
... ... @@ -77,17 +75,12 @@ func (controller *ContractUndertakerFeedbackController) RemoveContractUndertaker
func (controller *ContractUndertakerFeedbackController) SearchContractUndertakerFeedback() {
contractUndertakerFeedbackService := service.NewContractUndertakerFeedbackService(nil)
searchContractUndertakerFeedbackQuery := &query.SearchContractUndertakerFeedbackQuery{}
// 解析头部信息
_ = controller.Unmarshal(searchContractUndertakerFeedbackQuery)
header := controller.GetRequestHeader(controller.Ctx)
searchContractUndertakerFeedbackQuery.CompanyId = header.CompanyId
searchContractUndertakerFeedbackQuery.OrgId = header.OrgId
searchContractUndertakerFeedbackQuery.UserId = header.UserId
searchContractUndertakerFeedbackQuery.UserBaseId = header.UserBaseId
// 获取路径参数
pageSize, _ := controller.GetInt64("pageSize")
searchContractUndertakerFeedbackQuery.PageSize = pageSize
pageNumber, _ := controller.GetInt64("pageNumber")
searchContractUndertakerFeedbackQuery.PageNumber = pageNumber
data, err := contractUndertakerFeedbackService.SearchContractUndertakerFeedback(searchContractUndertakerFeedbackQuery)
controller.Response(data, err)
}
... ...