Merge branch 'dev' of http://gitlab.fjmaimaimai.com/allied-creation/allied-creat…
…ion-cooperation into dev
正在显示
12 个修改的文件
包含
91 行增加
和
97 行删除
@@ -19,13 +19,13 @@ type CreateContractUndertakerFeedbackCommand struct { | @@ -19,13 +19,13 @@ type CreateContractUndertakerFeedbackCommand struct { | ||
19 | // 承接人uid | 19 | // 承接人uid |
20 | UnderTakerUid string `cname:"承接人uid" json:"underTakerUid,omitempty"` | 20 | UnderTakerUid string `cname:"承接人uid" json:"underTakerUid,omitempty"` |
21 | // 公司ID,通过集成REST上下文获取 | 21 | // 公司ID,通过集成REST上下文获取 |
22 | - CompanyId int64 `cname:"公司ID,通过集成REST上下文获取" json:"companyId,string" valid:"Required"` | 22 | + CompanyId int64 `cname:"公司ID" json:"companyId,string" valid:"Required"` |
23 | // 组织机构ID | 23 | // 组织机构ID |
24 | OrgId int64 `cname:"组织机构ID" json:"orgId,string" valid:"Required"` | 24 | OrgId int64 `cname:"组织机构ID" json:"orgId,string" valid:"Required"` |
25 | // 用户ID,通过集成REST上下文获取,可翻译成发起人、承接人、推荐人、业务员 | 25 | // 用户ID,通过集成REST上下文获取,可翻译成发起人、承接人、推荐人、业务员 |
26 | - UserId int64 `cname:"用户ID,通过集成REST上下文获取,可翻译成发起人、承接人、推荐人、业务员" json:"userId,string" valid:"Required"` | 26 | + UserId int64 `cname:"用户ID" json:"userId,string" valid:"Required"` |
27 | // 用户基础数据id | 27 | // 用户基础数据id |
28 | - UserBaseId int64 `cname:"用户基础数据is" json:"userBaseId,string" valid:"Required"` | 28 | + UserBaseId int64 `cname:"用户基础数据ID" json:"userBaseId,string" valid:"Required"` |
29 | } | 29 | } |
30 | 30 | ||
31 | func (createContractUndertakerFeedbackCommand *CreateContractUndertakerFeedbackCommand) Valid(validation *validation.Validation) { | 31 | func (createContractUndertakerFeedbackCommand *CreateContractUndertakerFeedbackCommand) Valid(validation *validation.Validation) { |
@@ -12,15 +12,15 @@ type RemoveContractUndertakerFeedbackCommand struct { | @@ -12,15 +12,15 @@ type RemoveContractUndertakerFeedbackCommand struct { | ||
12 | // 合约承接方反馈记录ID | 12 | // 合约承接方反馈记录ID |
13 | FeedbackId string `cname:"合约承接方反馈记录ID" json:"feedbackId" valid:"Required"` | 13 | FeedbackId string `cname:"合约承接方反馈记录ID" json:"feedbackId" valid:"Required"` |
14 | // 承接人uid | 14 | // 承接人uid |
15 | - UnderTakerUid string `cname:"承接人uid" json:"underTakerUid,omitempty"` | 15 | + UnderTakerUid string `cname:"承接人UID" json:"underTakerUid,omitempty"` |
16 | // 公司ID,通过集成REST上下文获取 | 16 | // 公司ID,通过集成REST上下文获取 |
17 | - CompanyId int64 `cname:"公司ID,通过集成REST上下文获取" json:"companyId,string" valid:"Required"` | 17 | + CompanyId int64 `cname:"公司ID" json:"companyId,string" valid:"Required"` |
18 | // 组织机构ID | 18 | // 组织机构ID |
19 | OrgId int64 `cname:"组织机构ID" json:"orgId,string" valid:"Required"` | 19 | OrgId int64 `cname:"组织机构ID" json:"orgId,string" valid:"Required"` |
20 | // 用户ID,通过集成REST上下文获取,可翻译成发起人、承接人、推荐人、业务员 | 20 | // 用户ID,通过集成REST上下文获取,可翻译成发起人、承接人、推荐人、业务员 |
21 | - UserId int64 `cname:"用户ID,通过集成REST上下文获取,可翻译成发起人、承接人、推荐人、业务员" json:"userId,string" valid:"Required"` | 21 | + UserId int64 `cname:"用户ID" json:"userId,string" valid:"Required"` |
22 | // 用户基础数据id | 22 | // 用户基础数据id |
23 | - UserBaseId int64 `cname:"用户基础数据is" json:"userBaseId,string" valid:"Required"` | 23 | + UserBaseId int64 `cname:"用户基础数据" json:"userBaseId,string" valid:"Required"` |
24 | } | 24 | } |
25 | 25 | ||
26 | func (removeContractUndertakerFeedbackCommand *RemoveContractUndertakerFeedbackCommand) Valid(validation *validation.Validation) { | 26 | func (removeContractUndertakerFeedbackCommand *RemoveContractUndertakerFeedbackCommand) Valid(validation *validation.Validation) { |
@@ -11,7 +11,7 @@ import ( | @@ -11,7 +11,7 @@ import ( | ||
11 | 11 | ||
12 | type UpdateContractUndertakerFeedbackCommand struct { | 12 | type UpdateContractUndertakerFeedbackCommand struct { |
13 | // 合约承接方信息反馈id | 13 | // 合约承接方信息反馈id |
14 | - FeedbackId string `cname:"合约承接方反馈信息id" json:"feedbackId" valid:"Required"` | 14 | + FeedbackId string `cname:"合约承接方反馈信息ID" json:"feedbackId" valid:"Required"` |
15 | // 合约承接方反馈内容附件 | 15 | // 合约承接方反馈内容附件 |
16 | FeedbackAttachment []*domain.Attachment `cname:"合约承接方反馈内容附件" json:"feedbackAttachment" valid:"Required"` | 16 | FeedbackAttachment []*domain.Attachment `cname:"合约承接方反馈内容附件" json:"feedbackAttachment" valid:"Required"` |
17 | // 合约承接方反馈内容 | 17 | // 合约承接方反馈内容 |
@@ -19,15 +19,15 @@ type UpdateContractUndertakerFeedbackCommand struct { | @@ -19,15 +19,15 @@ type UpdateContractUndertakerFeedbackCommand struct { | ||
19 | // 共创合约编号 | 19 | // 共创合约编号 |
20 | CooperationContractNumber string `cname:"共创合约编号" json:"cooperationContractNumber" valid:"Required"` | 20 | CooperationContractNumber string `cname:"共创合约编号" json:"cooperationContractNumber" valid:"Required"` |
21 | // 承接人用户uid | 21 | // 承接人用户uid |
22 | - UnderTakerUid string `cname:"承接人用户uid" json:"underTakerUid,omitempty"` | 22 | + UnderTakerUid string `cname:"承接人用户UID" json:"underTakerUid,omitempty"` |
23 | // 公司ID,通过集成REST上下文获取 | 23 | // 公司ID,通过集成REST上下文获取 |
24 | - CompanyId int64 `cname:"公司ID,通过集成REST上下文获取" json:"companyId,string" valid:"Required"` | 24 | + CompanyId int64 `cname:"公司ID" json:"companyId,string" valid:"Required"` |
25 | // 组织机构ID | 25 | // 组织机构ID |
26 | OrgId int64 `cname:"组织机构ID" json:"orgId,string" valid:"Required"` | 26 | OrgId int64 `cname:"组织机构ID" json:"orgId,string" valid:"Required"` |
27 | // 用户ID,通过集成REST上下文获取,可翻译成发起人、承接人、推荐人、业务员 | 27 | // 用户ID,通过集成REST上下文获取,可翻译成发起人、承接人、推荐人、业务员 |
28 | - UserId int64 `cname:"用户ID,通过集成REST上下文获取,可翻译成发起人、承接人、推荐人、业务员" json:"userId,string" valid:"Required"` | 28 | + UserId int64 `cname:"用户ID" json:"userId,string" valid:"Required"` |
29 | // 用户基础数据id | 29 | // 用户基础数据id |
30 | - UserBaseId int64 `cname:"用户基础数据is" json:"userBaseId,string" valid:"Required"` | 30 | + UserBaseId int64 `cname:"用户基础数据ID" json:"userBaseId,string" valid:"Required"` |
31 | } | 31 | } |
32 | 32 | ||
33 | func (updateContractUndertakerFeedbackCommand *UpdateContractUndertakerFeedbackCommand) Valid(validation *validation.Validation) { | 33 | func (updateContractUndertakerFeedbackCommand *UpdateContractUndertakerFeedbackCommand) Valid(validation *validation.Validation) { |
@@ -12,15 +12,15 @@ type GetContractUndertakerFeedbackQuery struct { | @@ -12,15 +12,15 @@ type GetContractUndertakerFeedbackQuery struct { | ||
12 | // 合约承接方反馈记录ID | 12 | // 合约承接方反馈记录ID |
13 | FeedbackId string `cname:"合约承接方反馈记录ID" json:"feedbackId" valid:"Required"` | 13 | FeedbackId string `cname:"合约承接方反馈记录ID" json:"feedbackId" valid:"Required"` |
14 | // 承接人uid | 14 | // 承接人uid |
15 | - UnderTakerUid string `cname:"承接人uid" json:"underTakerUid,omitempty"` | 15 | + UnderTakerUid string `cname:"承接人UID" json:"underTakerUid,omitempty"` |
16 | // 公司ID,通过集成REST上下文获取 | 16 | // 公司ID,通过集成REST上下文获取 |
17 | - CompanyId int64 `cname:"公司ID,通过集成REST上下文获取" json:"companyId,string" valid:"Required"` | 17 | + CompanyId int64 `cname:"公司ID" json:"companyId,string" valid:"Required"` |
18 | // 组织机构ID | 18 | // 组织机构ID |
19 | OrgId int64 `cname:"组织机构ID" json:"orgId,string" valid:"Required"` | 19 | OrgId int64 `cname:"组织机构ID" json:"orgId,string" valid:"Required"` |
20 | // 用户ID,通过集成REST上下文获取,可翻译成发起人、承接人、推荐人、业务员 | 20 | // 用户ID,通过集成REST上下文获取,可翻译成发起人、承接人、推荐人、业务员 |
21 | - UserId int64 `cname:"用户ID,通过集成REST上下文获取,可翻译成发起人、承接人、推荐人、业务员" json:"userId,string" valid:"Required"` | 21 | + UserId int64 `cname:"用户ID" json:"userId,string" valid:"Required"` |
22 | // 用户基础数据id | 22 | // 用户基础数据id |
23 | - UserBaseId int64 `cname:"用户基础数据is" json:"userBaseId,string" valid:"Required"` | 23 | + UserBaseId int64 `cname:"用户基础数据ID" json:"userBaseId,string" valid:"Required"` |
24 | } | 24 | } |
25 | 25 | ||
26 | func (getContractUndertakerFeedbackQuery *GetContractUndertakerFeedbackQuery) Valid(validation *validation.Validation) { | 26 | func (getContractUndertakerFeedbackQuery *GetContractUndertakerFeedbackQuery) Valid(validation *validation.Validation) { |
@@ -10,19 +10,19 @@ import ( | @@ -10,19 +10,19 @@ import ( | ||
10 | 10 | ||
11 | type ListContractUndertakerFeedbackQuery struct { | 11 | type ListContractUndertakerFeedbackQuery struct { |
12 | // 页面大小 | 12 | // 页面大小 |
13 | - PageNumber int64 `cname:"页面大小" json:"pageNumber,omitempty"` | 13 | + PageNumber int64 `cname:"页码" json:"pageNumber,omitempty"` |
14 | // 页面大小 | 14 | // 页面大小 |
15 | PageSize int64 `cname:"页面大小" json:"pageSize,omitempty"` | 15 | PageSize int64 `cname:"页面大小" json:"pageSize,omitempty"` |
16 | // 承接人uid | 16 | // 承接人uid |
17 | - UnderTakerUid string `cname:"承接人uid" json:"underTakerUid" valid:"Required"` | 17 | + UnderTakerUid string `cname:"承接人UID" json:"underTakerUid,omitempty"` |
18 | // 公司ID,通过集成REST上下文获取 | 18 | // 公司ID,通过集成REST上下文获取 |
19 | - CompanyId int64 `cname:"公司ID,通过集成REST上下文获取" json:"companyId,string" valid:"Required"` | 19 | + CompanyId int64 `cname:"公司ID" json:"companyId,string" valid:"Required"` |
20 | // 组织机构ID | 20 | // 组织机构ID |
21 | OrgId int64 `cname:"组织机构ID" json:"orgId,string" valid:"Required"` | 21 | OrgId int64 `cname:"组织机构ID" json:"orgId,string" valid:"Required"` |
22 | // 用户ID,通过集成REST上下文获取,可翻译成发起人、承接人、推荐人、业务员 | 22 | // 用户ID,通过集成REST上下文获取,可翻译成发起人、承接人、推荐人、业务员 |
23 | - UserId int64 `cname:"用户ID,通过集成REST上下文获取,可翻译成发起人、承接人、推荐人、业务员" json:"userId,string" valid:"Required"` | 23 | + UserId int64 `cname:"用户ID" json:"userId,string" valid:"Required"` |
24 | // 用户基础数据id | 24 | // 用户基础数据id |
25 | - UserBaseId int64 `cname:"用户基础数据is" json:"userBaseId,string" valid:"Required"` | 25 | + UserBaseId int64 `cname:"用户基础数据ID" json:"userBaseId,string" valid:"Required"` |
26 | } | 26 | } |
27 | 27 | ||
28 | func (listContractUndertakerFeedbackQuery *ListContractUndertakerFeedbackQuery) Valid(validation *validation.Validation) { | 28 | func (listContractUndertakerFeedbackQuery *ListContractUndertakerFeedbackQuery) Valid(validation *validation.Validation) { |
@@ -10,21 +10,21 @@ import ( | @@ -10,21 +10,21 @@ import ( | ||
10 | 10 | ||
11 | type SearchContractUndertakerFeedbackQuery struct { | 11 | type SearchContractUndertakerFeedbackQuery struct { |
12 | // 公司ID,通过集成REST上下文获取 | 12 | // 公司ID,通过集成REST上下文获取 |
13 | - CompanyId int64 `cname:"公司ID,通过集成REST上下文获取" json:"companyId,string" valid:"Required"` | 13 | + CompanyId int64 `cname:"公司ID" json:"companyId,string" valid:"Required"` |
14 | // 组织机构ID | 14 | // 组织机构ID |
15 | OrgId int64 `cname:"组织机构ID" json:"orgId,string" valid:"Required"` | 15 | OrgId int64 `cname:"组织机构ID" json:"orgId,string" valid:"Required"` |
16 | // 用户ID,通过集成REST上下文获取,可翻译成发起人、承接人、推荐人、业务员 | 16 | // 用户ID,通过集成REST上下文获取,可翻译成发起人、承接人、推荐人、业务员 |
17 | - UserId int64 `cname:"用户ID,通过集成REST上下文获取,可翻译成发起人、承接人、推荐人、业务员" json:"userId,string" valid:"Required"` | 17 | + UserId int64 `cname:"用户ID" json:"userId,string" valid:"Required"` |
18 | // 用户基础数据id | 18 | // 用户基础数据id |
19 | - UserBaseId int64 `cname:"用户基础数据is" json:"userBaseId,string" valid:"Required"` | 19 | + UserBaseId int64 `cname:"用户基础数据ID" json:"userBaseId,string" valid:"Required"` |
20 | // 共创合约名称 | 20 | // 共创合约名称 |
21 | - CooperationContractName string `cname:"共创合约名称" json:"cooperationContractName" valid:"Required"` | 21 | + CooperationContractName string `cname:"共创合约名称" json:"cooperationContractName,omitempty"` |
22 | // 承接人姓名 | 22 | // 承接人姓名 |
23 | UndertakerName string `cname:"承接人姓名" json:"undertakerName,omitempty"` | 23 | UndertakerName string `cname:"承接人姓名" json:"undertakerName,omitempty"` |
24 | // 查询关键词 | 24 | // 查询关键词 |
25 | MatchWord string `cname:"查询关键词" json:"matchWord,omitempty"` | 25 | MatchWord string `cname:"查询关键词" json:"matchWord,omitempty"` |
26 | // 页面大小 | 26 | // 页面大小 |
27 | - PageNumber int64 `cname:"页面大小" json:"pageNumber,omitempty"` | 27 | + PageNumber int64 `cname:"页码" json:"pageNumber,omitempty"` |
28 | // 页面大小 | 28 | // 页面大小 |
29 | PageSize int64 `cname:"页面大小" json:"pageSize,omitempty"` | 29 | PageSize int64 `cname:"页面大小" json:"pageSize,omitempty"` |
30 | } | 30 | } |
@@ -240,10 +240,27 @@ func (contractUndertakerFeedbackService *ContractUndertakerFeedbackService) Sear | @@ -240,10 +240,27 @@ func (contractUndertakerFeedbackService *ContractUndertakerFeedbackService) Sear | ||
240 | defer func() { | 240 | defer func() { |
241 | _ = transactionContext.RollbackTransaction() | 241 | _ = transactionContext.RollbackTransaction() |
242 | }() | 242 | }() |
243 | + var contractUndertakerFeedbackRepository domain.ContractUndertakerFeedbackRepository | ||
244 | + if value, err := factory.CreateContractUndertakerFeedbackRepository(map[string]interface{}{ | ||
245 | + "transactionContext": transactionContext, | ||
246 | + }); err != nil { | ||
247 | + return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error()) | ||
248 | + } else { | ||
249 | + contractUndertakerFeedbackRepository = value | ||
250 | + } | ||
251 | + if count, contractUndertakerFeedbacks, err := contractUndertakerFeedbackRepository.Find(tool_funs.SimpleStructToMap(searchContractUndertakerFeedbackQuery)); err != nil { | ||
252 | + return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error()) | ||
253 | + } else { | ||
243 | if err := transactionContext.CommitTransaction(); err != nil { | 254 | if err := transactionContext.CommitTransaction(); err != nil { |
244 | return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error()) | 255 | return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error()) |
245 | } | 256 | } |
246 | - return nil, nil | 257 | + return map[string]interface{}{ |
258 | + "grid": map[string]interface{}{ | ||
259 | + "total": count, | ||
260 | + "list": contractUndertakerFeedbacks, | ||
261 | + }, | ||
262 | + }, nil | ||
263 | + } | ||
247 | } | 264 | } |
248 | 265 | ||
249 | // UpdateContractUndertakerFeedback 更新共创合约反馈服务 | 266 | // UpdateContractUndertakerFeedback 更新共创合约反馈服务 |
@@ -14,8 +14,6 @@ type ContractUndertakerFeedback struct { | @@ -14,8 +14,6 @@ type ContractUndertakerFeedback struct { | ||
14 | CooperationContractNumber string `json:"cooperationContractNumber"` | 14 | CooperationContractNumber string `json:"cooperationContractNumber"` |
15 | // 共创合约承接人 | 15 | // 共创合约承接人 |
16 | ContractUndertaker *Undertaker `json:"contractUndertaker"` | 16 | ContractUndertaker *Undertaker `json:"contractUndertaker"` |
17 | - // 共创模式 | ||
18 | - CooperationMode *CooperationMode `json:"cooperationMode"` | ||
19 | // 数据所属组织机构 | 17 | // 数据所属组织机构 |
20 | Org *Org `json:"org"` | 18 | Org *Org `json:"org"` |
21 | // 公司 | 19 | // 公司 |
@@ -52,11 +50,5 @@ func (contractUndertakerFeedback *ContractUndertakerFeedback) Update(data map[st | @@ -52,11 +50,5 @@ func (contractUndertakerFeedback *ContractUndertakerFeedback) Update(data map[st | ||
52 | if cooperationContractNumber, ok := data["cooperationContractNumber"]; ok { | 50 | if cooperationContractNumber, ok := data["cooperationContractNumber"]; ok { |
53 | contractUndertakerFeedback.CooperationContractNumber = cooperationContractNumber.(string) | 51 | contractUndertakerFeedback.CooperationContractNumber = cooperationContractNumber.(string) |
54 | } | 52 | } |
55 | - if status, ok := data["status"]; ok { | ||
56 | - contractUndertakerFeedback.CooperationMode.Status = status.(int32) | ||
57 | - } | ||
58 | - if remarks, ok := data["remarks"]; ok { | ||
59 | - contractUndertakerFeedback.CooperationMode.Remarks = remarks.(string) | ||
60 | - } | ||
61 | return nil | 53 | return nil |
62 | } | 54 | } |
@@ -17,8 +17,6 @@ type ContractUndertakerFeedback struct { | @@ -17,8 +17,6 @@ type ContractUndertakerFeedback struct { | ||
17 | CooperationContractNumber string `comment:"共创合约编号"` | 17 | CooperationContractNumber string `comment:"共创合约编号"` |
18 | // 共创合约承接人 | 18 | // 共创合约承接人 |
19 | ContractUndertaker *domain.Undertaker `comment:"共创合约承接人"` | 19 | ContractUndertaker *domain.Undertaker `comment:"共创合约承接人"` |
20 | - // 共创模式编号 | ||
21 | - CooperationModeNumber string `comment:"共创模式编号"` | ||
22 | // 数据所属组织机构 | 20 | // 数据所属组织机构 |
23 | Org *domain.Org `comment:"数据所属组织机构"` | 21 | Org *domain.Org `comment:"数据所属组织机构"` |
24 | // 公司 | 22 | // 公司 |
@@ -6,28 +6,27 @@ import ( | @@ -6,28 +6,27 @@ import ( | ||
6 | ) | 6 | ) |
7 | 7 | ||
8 | func TransformToContractUndertakerFeedbackDomainModelFromPgModels( | 8 | func TransformToContractUndertakerFeedbackDomainModelFromPgModels( |
9 | - contractUndertakerFeedbackModel *models.ContractUndertakerFeedback, | ||
10 | - cooperationMode *models.CooperationMode) (*domain.ContractUndertakerFeedback, error) { | 9 | + contractUndertakerFeedbackModel *models.ContractUndertakerFeedback) (*domain.ContractUndertakerFeedback, error) { |
11 | return &domain.ContractUndertakerFeedback{ | 10 | return &domain.ContractUndertakerFeedback{ |
12 | FeedbackId: contractUndertakerFeedbackModel.FeedbackId, | 11 | FeedbackId: contractUndertakerFeedbackModel.FeedbackId, |
13 | FeedbackAttachment: contractUndertakerFeedbackModel.FeedbackAttachment, | 12 | FeedbackAttachment: contractUndertakerFeedbackModel.FeedbackAttachment, |
14 | FeedbackContent: contractUndertakerFeedbackModel.FeedbackContent, | 13 | FeedbackContent: contractUndertakerFeedbackModel.FeedbackContent, |
15 | CooperationContractNumber: contractUndertakerFeedbackModel.CooperationContractNumber, | 14 | CooperationContractNumber: contractUndertakerFeedbackModel.CooperationContractNumber, |
16 | ContractUndertaker: contractUndertakerFeedbackModel.ContractUndertaker, | 15 | ContractUndertaker: contractUndertakerFeedbackModel.ContractUndertaker, |
17 | - CooperationMode: &domain.CooperationMode{ | ||
18 | - CooperationModeId: cooperationMode.CooperationModeId, | ||
19 | - CooperationModeNumber: cooperationMode.CooperationModeNumber, | ||
20 | - CooperationModeName: cooperationMode.CooperationModeName, | ||
21 | - Status: cooperationMode.Status, | ||
22 | - Org: cooperationMode.Org, | ||
23 | - Company: cooperationMode.Company, | ||
24 | - Remarks: cooperationMode.Remarks, | ||
25 | - Operator: cooperationMode.Operator, | ||
26 | - OperateTime: cooperationMode.OperateTime, | ||
27 | - UpdatedAt: cooperationMode.UpdatedAt, | ||
28 | - DeletedAt: cooperationMode.DeletedAt, | ||
29 | - CreatedAt: cooperationMode.CreatedAt, | ||
30 | - }, | 16 | + //CooperationMode: &domain.CooperationMode{ |
17 | + // CooperationModeId: cooperationMode.CooperationModeId, | ||
18 | + // CooperationModeNumber: cooperationMode.CooperationModeNumber, | ||
19 | + // CooperationModeName: cooperationMode.CooperationModeName, | ||
20 | + // Status: cooperationMode.Status, | ||
21 | + // Org: cooperationMode.Org, | ||
22 | + // Company: cooperationMode.Company, | ||
23 | + // Remarks: cooperationMode.Remarks, | ||
24 | + // Operator: cooperationMode.Operator, | ||
25 | + // OperateTime: cooperationMode.OperateTime, | ||
26 | + // UpdatedAt: cooperationMode.UpdatedAt, | ||
27 | + // DeletedAt: cooperationMode.DeletedAt, | ||
28 | + // CreatedAt: cooperationMode.CreatedAt, | ||
29 | + //}, | ||
31 | Org: contractUndertakerFeedbackModel.Org, | 30 | Org: contractUndertakerFeedbackModel.Org, |
32 | Company: contractUndertakerFeedbackModel.Company, | 31 | Company: contractUndertakerFeedbackModel.Company, |
33 | UpdatedAt: contractUndertakerFeedbackModel.UpdatedAt, | 32 | UpdatedAt: contractUndertakerFeedbackModel.UpdatedAt, |
@@ -24,6 +24,7 @@ func (repository *ContractUndertakerFeedbackRepository) nextIdentify() (int64, e | @@ -24,6 +24,7 @@ func (repository *ContractUndertakerFeedbackRepository) nextIdentify() (int64, e | ||
24 | id, err := IdWorker.NextId() | 24 | id, err := IdWorker.NextId() |
25 | return id, err | 25 | return id, err |
26 | } | 26 | } |
27 | + | ||
27 | func (repository *ContractUndertakerFeedbackRepository) Save(contractUndertakerFeedback *domain.ContractUndertakerFeedback) (*domain.ContractUndertakerFeedback, error) { | 28 | func (repository *ContractUndertakerFeedbackRepository) Save(contractUndertakerFeedback *domain.ContractUndertakerFeedback) (*domain.ContractUndertakerFeedback, error) { |
28 | sqlBuildFields := []string{ | 29 | sqlBuildFields := []string{ |
29 | "feedback_id", | 30 | "feedback_id", |
@@ -31,7 +32,6 @@ func (repository *ContractUndertakerFeedbackRepository) Save(contractUndertakerF | @@ -31,7 +32,6 @@ func (repository *ContractUndertakerFeedbackRepository) Save(contractUndertakerF | ||
31 | "feedback_content", | 32 | "feedback_content", |
32 | "cooperation_contract_number", | 33 | "cooperation_contract_number", |
33 | "contract_undertaker", | 34 | "contract_undertaker", |
34 | - "cooperation_mode", | ||
35 | "org", | 35 | "org", |
36 | "company", | 36 | "company", |
37 | "updated_at", | 37 | "updated_at", |
@@ -58,7 +58,6 @@ func (repository *ContractUndertakerFeedbackRepository) Save(contractUndertakerF | @@ -58,7 +58,6 @@ func (repository *ContractUndertakerFeedbackRepository) Save(contractUndertakerF | ||
58 | &contractUndertakerFeedback.FeedbackContent, | 58 | &contractUndertakerFeedback.FeedbackContent, |
59 | &contractUndertakerFeedback.CooperationContractNumber, | 59 | &contractUndertakerFeedback.CooperationContractNumber, |
60 | &contractUndertakerFeedback.ContractUndertaker, | 60 | &contractUndertakerFeedback.ContractUndertaker, |
61 | - &contractUndertakerFeedback.CooperationMode, | ||
62 | &contractUndertakerFeedback.Org, | 61 | &contractUndertakerFeedback.Org, |
63 | &contractUndertakerFeedback.Company, | 62 | &contractUndertakerFeedback.Company, |
64 | &contractUndertakerFeedback.UpdatedAt, | 63 | &contractUndertakerFeedback.UpdatedAt, |
@@ -71,11 +70,10 @@ func (repository *ContractUndertakerFeedbackRepository) Save(contractUndertakerF | @@ -71,11 +70,10 @@ func (repository *ContractUndertakerFeedbackRepository) Save(contractUndertakerF | ||
71 | contractUndertakerFeedback.FeedbackContent, | 70 | contractUndertakerFeedback.FeedbackContent, |
72 | contractUndertakerFeedback.CooperationContractNumber, | 71 | contractUndertakerFeedback.CooperationContractNumber, |
73 | contractUndertakerFeedback.ContractUndertaker, | 72 | contractUndertakerFeedback.ContractUndertaker, |
74 | - contractUndertakerFeedback.CooperationMode, | ||
75 | contractUndertakerFeedback.Org, | 73 | contractUndertakerFeedback.Org, |
76 | contractUndertakerFeedback.Company, | 74 | contractUndertakerFeedback.Company, |
77 | contractUndertakerFeedback.UpdatedAt, | 75 | contractUndertakerFeedback.UpdatedAt, |
78 | - contractUndertakerFeedback.DeletedAt, | 76 | + nil, |
79 | contractUndertakerFeedback.CreatedAt, | 77 | contractUndertakerFeedback.CreatedAt, |
80 | ); err != nil { | 78 | ); err != nil { |
81 | return contractUndertakerFeedback, err | 79 | return contractUndertakerFeedback, err |
@@ -88,7 +86,6 @@ func (repository *ContractUndertakerFeedbackRepository) Save(contractUndertakerF | @@ -88,7 +86,6 @@ func (repository *ContractUndertakerFeedbackRepository) Save(contractUndertakerF | ||
88 | &contractUndertakerFeedback.FeedbackContent, | 86 | &contractUndertakerFeedback.FeedbackContent, |
89 | &contractUndertakerFeedback.CooperationContractNumber, | 87 | &contractUndertakerFeedback.CooperationContractNumber, |
90 | &contractUndertakerFeedback.ContractUndertaker, | 88 | &contractUndertakerFeedback.ContractUndertaker, |
91 | - &contractUndertakerFeedback.CooperationMode, | ||
92 | &contractUndertakerFeedback.Org, | 89 | &contractUndertakerFeedback.Org, |
93 | &contractUndertakerFeedback.Company, | 90 | &contractUndertakerFeedback.Company, |
94 | &contractUndertakerFeedback.UpdatedAt, | 91 | &contractUndertakerFeedback.UpdatedAt, |
@@ -101,11 +98,10 @@ func (repository *ContractUndertakerFeedbackRepository) Save(contractUndertakerF | @@ -101,11 +98,10 @@ func (repository *ContractUndertakerFeedbackRepository) Save(contractUndertakerF | ||
101 | contractUndertakerFeedback.FeedbackContent, | 98 | contractUndertakerFeedback.FeedbackContent, |
102 | contractUndertakerFeedback.CooperationContractNumber, | 99 | contractUndertakerFeedback.CooperationContractNumber, |
103 | contractUndertakerFeedback.ContractUndertaker, | 100 | contractUndertakerFeedback.ContractUndertaker, |
104 | - contractUndertakerFeedback.CooperationMode, | ||
105 | contractUndertakerFeedback.Org, | 101 | contractUndertakerFeedback.Org, |
106 | contractUndertakerFeedback.Company, | 102 | contractUndertakerFeedback.Company, |
107 | contractUndertakerFeedback.UpdatedAt, | 103 | contractUndertakerFeedback.UpdatedAt, |
108 | - contractUndertakerFeedback.DeletedAt, | 104 | + nil, |
109 | contractUndertakerFeedback.CreatedAt, | 105 | contractUndertakerFeedback.CreatedAt, |
110 | contractUndertakerFeedback.Identify(), | 106 | contractUndertakerFeedback.Identify(), |
111 | ); err != nil { | 107 | ); err != nil { |
@@ -114,6 +110,7 @@ func (repository *ContractUndertakerFeedbackRepository) Save(contractUndertakerF | @@ -114,6 +110,7 @@ func (repository *ContractUndertakerFeedbackRepository) Save(contractUndertakerF | ||
114 | } | 110 | } |
115 | return contractUndertakerFeedback, nil | 111 | return contractUndertakerFeedback, nil |
116 | } | 112 | } |
113 | + | ||
117 | func (repository *ContractUndertakerFeedbackRepository) Remove(contractUndertakerFeedback *domain.ContractUndertakerFeedback) (*domain.ContractUndertakerFeedback, error) { | 114 | func (repository *ContractUndertakerFeedbackRepository) Remove(contractUndertakerFeedback *domain.ContractUndertakerFeedback) (*domain.ContractUndertakerFeedback, error) { |
118 | tx := repository.transactionContext.PgTx | 115 | tx := repository.transactionContext.PgTx |
119 | contractUndertakerFeedbackModel := new(models.ContractUndertakerFeedback) | 116 | contractUndertakerFeedbackModel := new(models.ContractUndertakerFeedback) |
@@ -123,11 +120,12 @@ func (repository *ContractUndertakerFeedbackRepository) Remove(contractUndertake | @@ -123,11 +120,12 @@ func (repository *ContractUndertakerFeedbackRepository) Remove(contractUndertake | ||
123 | } | 120 | } |
124 | return contractUndertakerFeedback, nil | 121 | return contractUndertakerFeedback, nil |
125 | } | 122 | } |
123 | + | ||
126 | func (repository *ContractUndertakerFeedbackRepository) FindOne(queryOptions map[string]interface{}) (*domain.ContractUndertakerFeedback, error) { | 124 | func (repository *ContractUndertakerFeedbackRepository) FindOne(queryOptions map[string]interface{}) (*domain.ContractUndertakerFeedback, error) { |
127 | tx := repository.transactionContext.PgTx | 125 | tx := repository.transactionContext.PgTx |
128 | contractUndertakerFeedbackModel := new(models.ContractUndertakerFeedback) | 126 | contractUndertakerFeedbackModel := new(models.ContractUndertakerFeedback) |
129 | query := sqlbuilder.BuildQuery(tx.Model(contractUndertakerFeedbackModel), queryOptions) | 127 | query := sqlbuilder.BuildQuery(tx.Model(contractUndertakerFeedbackModel), queryOptions) |
130 | - query.SetWhereByQueryOption("contract_undertaker_feedback.contract_undertaker_feedback_id = ?", "contractUndertakerFeedbackId") | 128 | + query.SetWhereByQueryOption("contract_undertaker_feedback.feedback_id = ?", "contractUndertakerFeedbackId") |
131 | if err := query.First(); err != nil { | 129 | if err := query.First(); err != nil { |
132 | if err.Error() == "pg: no rows in result set" { | 130 | if err.Error() == "pg: no rows in result set" { |
133 | return nil, fmt.Errorf("没有此资源") | 131 | return nil, fmt.Errorf("没有此资源") |
@@ -138,41 +136,43 @@ func (repository *ContractUndertakerFeedbackRepository) FindOne(queryOptions map | @@ -138,41 +136,43 @@ func (repository *ContractUndertakerFeedbackRepository) FindOne(queryOptions map | ||
138 | if contractUndertakerFeedbackModel.FeedbackId == 0 { | 136 | if contractUndertakerFeedbackModel.FeedbackId == 0 { |
139 | return nil, nil | 137 | return nil, nil |
140 | } else { | 138 | } else { |
141 | - // 获取共创模式 | ||
142 | - cooperationModeModel := new(models.CooperationMode) | ||
143 | - cooperationModeQuery := tx.Model(cooperationModeModel) | ||
144 | - if err := cooperationModeQuery.Where("cooperation_mode_number = ?", contractUndertakerFeedbackModel.CooperationModeNumber).First(); err != nil { | ||
145 | - return nil, err | ||
146 | - } | ||
147 | - return transform.TransformToContractUndertakerFeedbackDomainModelFromPgModels(contractUndertakerFeedbackModel, cooperationModeModel) | 139 | + //// 获取共创模式 |
140 | + //cooperationModeModel := new(models.CooperationMode) | ||
141 | + //cooperationModeQuery := tx.Model(cooperationModeModel) | ||
142 | + //if err := cooperationModeQuery.Where("cooperation_mode_number = ?", contractUndertakerFeedbackModel.CooperationModeNumber).First(); err != nil { | ||
143 | + // return nil, err | ||
144 | + //} | ||
145 | + return transform.TransformToContractUndertakerFeedbackDomainModelFromPgModels(contractUndertakerFeedbackModel) | ||
148 | } | 146 | } |
149 | } | 147 | } |
148 | + | ||
150 | func (repository *ContractUndertakerFeedbackRepository) Find(queryOptions map[string]interface{}) (int64, []*domain.ContractUndertakerFeedback, error) { | 149 | func (repository *ContractUndertakerFeedbackRepository) Find(queryOptions map[string]interface{}) (int64, []*domain.ContractUndertakerFeedback, error) { |
151 | tx := repository.transactionContext.PgTx | 150 | tx := repository.transactionContext.PgTx |
152 | var contractUndertakerFeedbackModels []*models.ContractUndertakerFeedback | 151 | var contractUndertakerFeedbackModels []*models.ContractUndertakerFeedback |
153 | contractUndertakerFeedbacks := make([]*domain.ContractUndertakerFeedback, 0) | 152 | contractUndertakerFeedbacks := make([]*domain.ContractUndertakerFeedback, 0) |
154 | query := sqlbuilder.BuildQuery(tx.Model(&contractUndertakerFeedbackModels), queryOptions) | 153 | query := sqlbuilder.BuildQuery(tx.Model(&contractUndertakerFeedbackModels), queryOptions) |
155 | query.SetOffsetAndLimit(20) | 154 | query.SetOffsetAndLimit(20) |
156 | - query.SetOrderDirect("contract_undertaker_feedback_id", "DESC") | 155 | + query.SetOrderDirect("feedback_id", "DESC") |
157 | if count, err := query.SelectAndCount(); err != nil { | 156 | if count, err := query.SelectAndCount(); err != nil { |
158 | return 0, contractUndertakerFeedbacks, err | 157 | return 0, contractUndertakerFeedbacks, err |
159 | } else { | 158 | } else { |
160 | - for _, contractUndertakerFeedbackModel := range contractUndertakerFeedbackModels { | ||
161 | - // 获取共创模式 | ||
162 | - cooperationModeModel := new(models.CooperationMode) | ||
163 | - cooperationModeQuery := tx.Model(cooperationModeModel) | ||
164 | - if err := cooperationModeQuery.Where("cooperation_mode_number = ?", contractUndertakerFeedbackModel.CooperationModeNumber).First(); err != nil { | ||
165 | - return 0, nil, err | ||
166 | - } | ||
167 | - if contractUndertakerFeedback, err := transform.TransformToContractUndertakerFeedbackDomainModelFromPgModels(contractUndertakerFeedbackModel, cooperationModeModel); err != nil { | ||
168 | - return 0, contractUndertakerFeedbacks, err | ||
169 | - } else { | ||
170 | - contractUndertakerFeedbacks = append(contractUndertakerFeedbacks, contractUndertakerFeedback) | ||
171 | - } | ||
172 | - } | 159 | + //for _, contractUndertakerFeedbackModel := range contractUndertakerFeedbackModels { |
160 | + // // 获取共创模式 | ||
161 | + // cooperationModeModel := new(models.CooperationMode) | ||
162 | + // cooperationModeQuery := tx.Model(cooperationModeModel) | ||
163 | + // if err := cooperationModeQuery.Where("cooperation_mode_number = ?", contractUndertakerFeedbackModel.CooperationModeNumber).First(); err != nil { | ||
164 | + // return 0, nil, err | ||
165 | + // } | ||
166 | + // if contractUndertakerFeedback, err := transform.TransformToContractUndertakerFeedbackDomainModelFromPgModels(contractUndertakerFeedbackModel, cooperationModeModel); err != nil { | ||
167 | + // return 0, contractUndertakerFeedbacks, err | ||
168 | + // } else { | ||
169 | + // contractUndertakerFeedbacks = append(contractUndertakerFeedbacks, contractUndertakerFeedback) | ||
170 | + // } | ||
171 | + //} | ||
173 | return int64(count), contractUndertakerFeedbacks, nil | 172 | return int64(count), contractUndertakerFeedbacks, nil |
174 | } | 173 | } |
175 | } | 174 | } |
175 | + | ||
176 | func NewContractUndertakerFeedbackRepository(transactionContext *pgTransaction.TransactionContext) (*ContractUndertakerFeedbackRepository, error) { | 176 | func NewContractUndertakerFeedbackRepository(transactionContext *pgTransaction.TransactionContext) (*ContractUndertakerFeedbackRepository, error) { |
177 | if transactionContext == nil { | 177 | if transactionContext == nil { |
178 | return nil, fmt.Errorf("transactionContext参数不能为nil") | 178 | return nil, fmt.Errorf("transactionContext参数不能为nil") |
@@ -14,7 +14,6 @@ func (controller *ContractUndertakerFeedbackController) CreateContractUndertaker | @@ -14,7 +14,6 @@ func (controller *ContractUndertakerFeedbackController) CreateContractUndertaker | ||
14 | contractUndertakerFeedbackService := service.NewContractUndertakerFeedbackService(nil) | 14 | contractUndertakerFeedbackService := service.NewContractUndertakerFeedbackService(nil) |
15 | createContractUndertakerFeedbackCommand := &command.CreateContractUndertakerFeedbackCommand{} | 15 | createContractUndertakerFeedbackCommand := &command.CreateContractUndertakerFeedbackCommand{} |
16 | _ = controller.Unmarshal(createContractUndertakerFeedbackCommand) | 16 | _ = controller.Unmarshal(createContractUndertakerFeedbackCommand) |
17 | - // 解析头部信息 | ||
18 | header := controller.GetRequestHeader(controller.Ctx) | 17 | header := controller.GetRequestHeader(controller.Ctx) |
19 | createContractUndertakerFeedbackCommand.CompanyId = header.CompanyId | 18 | createContractUndertakerFeedbackCommand.CompanyId = header.CompanyId |
20 | createContractUndertakerFeedbackCommand.OrgId = header.OrgId | 19 | createContractUndertakerFeedbackCommand.OrgId = header.OrgId |
@@ -28,13 +27,11 @@ func (controller *ContractUndertakerFeedbackController) UpdateContractUndertaker | @@ -28,13 +27,11 @@ func (controller *ContractUndertakerFeedbackController) UpdateContractUndertaker | ||
28 | contractUndertakerFeedbackService := service.NewContractUndertakerFeedbackService(nil) | 27 | contractUndertakerFeedbackService := service.NewContractUndertakerFeedbackService(nil) |
29 | updateContractUndertakerFeedbackCommand := &command.UpdateContractUndertakerFeedbackCommand{} | 28 | updateContractUndertakerFeedbackCommand := &command.UpdateContractUndertakerFeedbackCommand{} |
30 | _ = controller.Unmarshal(updateContractUndertakerFeedbackCommand) | 29 | _ = controller.Unmarshal(updateContractUndertakerFeedbackCommand) |
31 | - // 解析头部信息 | ||
32 | header := controller.GetRequestHeader(controller.Ctx) | 30 | header := controller.GetRequestHeader(controller.Ctx) |
33 | updateContractUndertakerFeedbackCommand.CompanyId = header.CompanyId | 31 | updateContractUndertakerFeedbackCommand.CompanyId = header.CompanyId |
34 | updateContractUndertakerFeedbackCommand.OrgId = header.OrgId | 32 | updateContractUndertakerFeedbackCommand.OrgId = header.OrgId |
35 | updateContractUndertakerFeedbackCommand.UserId = header.UserId | 33 | updateContractUndertakerFeedbackCommand.UserId = header.UserId |
36 | updateContractUndertakerFeedbackCommand.UserBaseId = header.UserBaseId | 34 | updateContractUndertakerFeedbackCommand.UserBaseId = header.UserBaseId |
37 | - // 解析路径参数 | ||
38 | contractUndertakerFeedbackId := controller.GetString(":contractUndertakerFeedbackId") | 35 | contractUndertakerFeedbackId := controller.GetString(":contractUndertakerFeedbackId") |
39 | updateContractUndertakerFeedbackCommand.FeedbackId = contractUndertakerFeedbackId | 36 | updateContractUndertakerFeedbackCommand.FeedbackId = contractUndertakerFeedbackId |
40 | data, err := contractUndertakerFeedbackService.UpdateContractUndertakerFeedback(updateContractUndertakerFeedbackCommand) | 37 | data, err := contractUndertakerFeedbackService.UpdateContractUndertakerFeedback(updateContractUndertakerFeedbackCommand) |
@@ -44,13 +41,11 @@ func (controller *ContractUndertakerFeedbackController) UpdateContractUndertaker | @@ -44,13 +41,11 @@ func (controller *ContractUndertakerFeedbackController) UpdateContractUndertaker | ||
44 | func (controller *ContractUndertakerFeedbackController) GetContractUndertakerFeedback() { | 41 | func (controller *ContractUndertakerFeedbackController) GetContractUndertakerFeedback() { |
45 | contractUndertakerFeedbackService := service.NewContractUndertakerFeedbackService(nil) | 42 | contractUndertakerFeedbackService := service.NewContractUndertakerFeedbackService(nil) |
46 | getContractUndertakerFeedbackQuery := &query.GetContractUndertakerFeedbackQuery{} | 43 | getContractUndertakerFeedbackQuery := &query.GetContractUndertakerFeedbackQuery{} |
47 | - // 解析头部信息 | ||
48 | header := controller.GetRequestHeader(controller.Ctx) | 44 | header := controller.GetRequestHeader(controller.Ctx) |
49 | getContractUndertakerFeedbackQuery.CompanyId = header.CompanyId | 45 | getContractUndertakerFeedbackQuery.CompanyId = header.CompanyId |
50 | getContractUndertakerFeedbackQuery.OrgId = header.OrgId | 46 | getContractUndertakerFeedbackQuery.OrgId = header.OrgId |
51 | getContractUndertakerFeedbackQuery.UserId = header.UserId | 47 | getContractUndertakerFeedbackQuery.UserId = header.UserId |
52 | getContractUndertakerFeedbackQuery.UserBaseId = header.UserBaseId | 48 | getContractUndertakerFeedbackQuery.UserBaseId = header.UserBaseId |
53 | - // 解析路径参数 | ||
54 | contractUndertakerFeedbackId := controller.GetString(":contractUndertakerFeedbackId") | 49 | contractUndertakerFeedbackId := controller.GetString(":contractUndertakerFeedbackId") |
55 | getContractUndertakerFeedbackQuery.FeedbackId = contractUndertakerFeedbackId | 50 | getContractUndertakerFeedbackQuery.FeedbackId = contractUndertakerFeedbackId |
56 | data, err := contractUndertakerFeedbackService.GetContractUndertakerFeedback(getContractUndertakerFeedbackQuery) | 51 | data, err := contractUndertakerFeedbackService.GetContractUndertakerFeedback(getContractUndertakerFeedbackQuery) |
@@ -61,13 +56,11 @@ func (controller *ContractUndertakerFeedbackController) RemoveContractUndertaker | @@ -61,13 +56,11 @@ func (controller *ContractUndertakerFeedbackController) RemoveContractUndertaker | ||
61 | contractUndertakerFeedbackService := service.NewContractUndertakerFeedbackService(nil) | 56 | contractUndertakerFeedbackService := service.NewContractUndertakerFeedbackService(nil) |
62 | removeContractUndertakerFeedbackCommand := &command.RemoveContractUndertakerFeedbackCommand{} | 57 | removeContractUndertakerFeedbackCommand := &command.RemoveContractUndertakerFeedbackCommand{} |
63 | _ = controller.Unmarshal(removeContractUndertakerFeedbackCommand) | 58 | _ = controller.Unmarshal(removeContractUndertakerFeedbackCommand) |
64 | - // 解析头部信息 | ||
65 | header := controller.GetRequestHeader(controller.Ctx) | 59 | header := controller.GetRequestHeader(controller.Ctx) |
66 | removeContractUndertakerFeedbackCommand.CompanyId = header.CompanyId | 60 | removeContractUndertakerFeedbackCommand.CompanyId = header.CompanyId |
67 | removeContractUndertakerFeedbackCommand.OrgId = header.OrgId | 61 | removeContractUndertakerFeedbackCommand.OrgId = header.OrgId |
68 | removeContractUndertakerFeedbackCommand.UserId = header.UserId | 62 | removeContractUndertakerFeedbackCommand.UserId = header.UserId |
69 | removeContractUndertakerFeedbackCommand.UserBaseId = header.UserBaseId | 63 | removeContractUndertakerFeedbackCommand.UserBaseId = header.UserBaseId |
70 | - // 解析路径参数 | ||
71 | contractUndertakerFeedbackId := controller.GetString(":contractUndertakerFeedbackId") | 64 | contractUndertakerFeedbackId := controller.GetString(":contractUndertakerFeedbackId") |
72 | removeContractUndertakerFeedbackCommand.FeedbackId = contractUndertakerFeedbackId | 65 | removeContractUndertakerFeedbackCommand.FeedbackId = contractUndertakerFeedbackId |
73 | data, err := contractUndertakerFeedbackService.RemoveContractUndertakerFeedback(removeContractUndertakerFeedbackCommand) | 66 | data, err := contractUndertakerFeedbackService.RemoveContractUndertakerFeedback(removeContractUndertakerFeedbackCommand) |
@@ -77,17 +70,12 @@ func (controller *ContractUndertakerFeedbackController) RemoveContractUndertaker | @@ -77,17 +70,12 @@ func (controller *ContractUndertakerFeedbackController) RemoveContractUndertaker | ||
77 | func (controller *ContractUndertakerFeedbackController) SearchContractUndertakerFeedback() { | 70 | func (controller *ContractUndertakerFeedbackController) SearchContractUndertakerFeedback() { |
78 | contractUndertakerFeedbackService := service.NewContractUndertakerFeedbackService(nil) | 71 | contractUndertakerFeedbackService := service.NewContractUndertakerFeedbackService(nil) |
79 | searchContractUndertakerFeedbackQuery := &query.SearchContractUndertakerFeedbackQuery{} | 72 | searchContractUndertakerFeedbackQuery := &query.SearchContractUndertakerFeedbackQuery{} |
80 | - // 解析头部信息 | 73 | + _ = controller.Unmarshal(searchContractUndertakerFeedbackQuery) |
81 | header := controller.GetRequestHeader(controller.Ctx) | 74 | header := controller.GetRequestHeader(controller.Ctx) |
82 | searchContractUndertakerFeedbackQuery.CompanyId = header.CompanyId | 75 | searchContractUndertakerFeedbackQuery.CompanyId = header.CompanyId |
83 | searchContractUndertakerFeedbackQuery.OrgId = header.OrgId | 76 | searchContractUndertakerFeedbackQuery.OrgId = header.OrgId |
84 | searchContractUndertakerFeedbackQuery.UserId = header.UserId | 77 | searchContractUndertakerFeedbackQuery.UserId = header.UserId |
85 | searchContractUndertakerFeedbackQuery.UserBaseId = header.UserBaseId | 78 | searchContractUndertakerFeedbackQuery.UserBaseId = header.UserBaseId |
86 | - // 获取路径参数 | ||
87 | - pageSize, _ := controller.GetInt64("pageSize") | ||
88 | - searchContractUndertakerFeedbackQuery.PageSize = pageSize | ||
89 | - pageNumber, _ := controller.GetInt64("pageNumber") | ||
90 | - searchContractUndertakerFeedbackQuery.PageNumber = pageNumber | ||
91 | data, err := contractUndertakerFeedbackService.SearchContractUndertakerFeedback(searchContractUndertakerFeedbackQuery) | 79 | data, err := contractUndertakerFeedbackService.SearchContractUndertakerFeedback(searchContractUndertakerFeedbackQuery) |
92 | controller.Response(data, err) | 80 | controller.Response(data, err) |
93 | } | 81 | } |
@@ -95,17 +83,17 @@ func (controller *ContractUndertakerFeedbackController) SearchContractUndertaker | @@ -95,17 +83,17 @@ func (controller *ContractUndertakerFeedbackController) SearchContractUndertaker | ||
95 | func (controller *ContractUndertakerFeedbackController) ListContractUndertakerFeedback() { | 83 | func (controller *ContractUndertakerFeedbackController) ListContractUndertakerFeedback() { |
96 | contractUndertakerFeedbackService := service.NewContractUndertakerFeedbackService(nil) | 84 | contractUndertakerFeedbackService := service.NewContractUndertakerFeedbackService(nil) |
97 | listContractUndertakerFeedbackQuery := &query.ListContractUndertakerFeedbackQuery{} | 85 | listContractUndertakerFeedbackQuery := &query.ListContractUndertakerFeedbackQuery{} |
98 | - // 解析头部信息 | ||
99 | header := controller.GetRequestHeader(controller.Ctx) | 86 | header := controller.GetRequestHeader(controller.Ctx) |
100 | listContractUndertakerFeedbackQuery.CompanyId = header.CompanyId | 87 | listContractUndertakerFeedbackQuery.CompanyId = header.CompanyId |
101 | listContractUndertakerFeedbackQuery.OrgId = header.OrgId | 88 | listContractUndertakerFeedbackQuery.OrgId = header.OrgId |
102 | listContractUndertakerFeedbackQuery.UserId = header.UserId | 89 | listContractUndertakerFeedbackQuery.UserId = header.UserId |
103 | listContractUndertakerFeedbackQuery.UserBaseId = header.UserBaseId | 90 | listContractUndertakerFeedbackQuery.UserBaseId = header.UserBaseId |
104 | - // 获取路径参数 | ||
105 | pageSize, _ := controller.GetInt64("pageSize") | 91 | pageSize, _ := controller.GetInt64("pageSize") |
106 | listContractUndertakerFeedbackQuery.PageSize = pageSize | 92 | listContractUndertakerFeedbackQuery.PageSize = pageSize |
107 | pageNumber, _ := controller.GetInt64("pageNumber") | 93 | pageNumber, _ := controller.GetInt64("pageNumber") |
108 | listContractUndertakerFeedbackQuery.PageNumber = pageNumber | 94 | listContractUndertakerFeedbackQuery.PageNumber = pageNumber |
95 | + underTakerUid := controller.GetString(":underTakerUid") | ||
96 | + listContractUndertakerFeedbackQuery.UnderTakerUid = underTakerUid | ||
109 | data, err := contractUndertakerFeedbackService.ListContractUndertakerFeedback(listContractUndertakerFeedbackQuery) | 97 | data, err := contractUndertakerFeedbackService.ListContractUndertakerFeedback(listContractUndertakerFeedbackQuery) |
110 | controller.Response(data, err) | 98 | controller.Response(data, err) |
111 | } | 99 | } |
-
请 注册 或 登录 后发表评论