|
@@ -83,7 +83,7 @@ func (this *TemplateController) TemplateList() { |
|
@@ -83,7 +83,7 @@ func (this *TemplateController) TemplateList() { |
83
|
defer func() {
|
83
|
defer func() {
|
84
|
this.ResposeJson(msg)
|
84
|
this.ResposeJson(msg)
|
85
|
}()
|
85
|
}()
|
86
|
- var request *protocol.TemplateUpdateRequest
|
86
|
+ var request *protocol.TemplateListRequest
|
87
|
|
87
|
|
88
|
if err := json.Unmarshal(this.Ctx.Input.RequestBody, &request); err != nil {
|
88
|
if err := json.Unmarshal(this.Ctx.Input.RequestBody, &request); err != nil {
|
89
|
log.Error("json 解析失败", err)
|
89
|
log.Error("json 解析失败", err)
|
|
@@ -101,11 +101,40 @@ func (this *TemplateController) TemplateList() { |
|
@@ -101,11 +101,40 @@ func (this *TemplateController) TemplateList() { |
101
|
msg = m
|
101
|
msg = m
|
102
|
return
|
102
|
return
|
103
|
}
|
103
|
}
|
104
|
- rsp, err := audit.TemplateUpdate(uid, companyId, request)
|
104
|
+ rsp, err := audit.TemplateList(uid, companyId, request)
|
105
|
msg = protocol.NewReturnResponse(rsp, err)
|
105
|
msg = protocol.NewReturnResponse(rsp, err)
|
106
|
return
|
106
|
return
|
107
|
}
|
107
|
}
|
108
|
|
108
|
|
|
|
109
|
+//TemplateGet
|
|
|
110
|
+//@router /templateGet [post]
|
|
|
111
|
+func (this *TemplateController) TemplateGet() {
|
|
|
112
|
+ var msg *protocol.ResponseMessage
|
|
|
113
|
+ defer func() {
|
|
|
114
|
+ this.ResposeJson(msg)
|
|
|
115
|
+ }()
|
|
|
116
|
+ var request *protocol.TemplateGetRequest
|
|
|
117
|
+
|
|
|
118
|
+ if err := json.Unmarshal(this.Ctx.Input.RequestBody, &request); err != nil {
|
|
|
119
|
+ log.Error("json 解析失败", err)
|
|
|
120
|
+ msg = protocol.BadRequestParam("1")
|
|
|
121
|
+ return
|
|
|
122
|
+ }
|
|
|
123
|
+ uid := this.GetUserId()
|
|
|
124
|
+ companyId := this.GetCompanyId()
|
|
|
125
|
+ if companyId <= 0 {
|
|
|
126
|
+ log.Debug("companyId:%d err", companyId)
|
|
|
127
|
+ msg = protocol.BadRequestParam("1")
|
|
|
128
|
+ return
|
|
|
129
|
+ }
|
|
|
130
|
+ if b, m := this.Valid(request); !b {
|
|
|
131
|
+ msg = m
|
|
|
132
|
+ return
|
|
|
133
|
+ }
|
|
|
134
|
+ rsp, err := audit.TemplateGet(uid, companyId, request)
|
|
|
135
|
+ msg = protocol.NewReturnResponse(rsp, err)
|
|
|
136
|
+}
|
|
|
137
|
+
|
109
|
//TemplateEditVisible
|
138
|
//TemplateEditVisible
|
110
|
//@router /templateEditVisible [post]
|
139
|
//@router /templateEditVisible [post]
|
111
|
func (this *TemplateController) TemplateEditVisible() {
|
140
|
func (this *TemplateController) TemplateEditVisible() {
|