...
|
...
|
@@ -83,7 +83,7 @@ func (this *TemplateController) TemplateList() { |
|
|
defer func() {
|
|
|
this.ResposeJson(msg)
|
|
|
}()
|
|
|
var request *protocol.TemplateUpdateRequest
|
|
|
var request *protocol.TemplateListRequest
|
|
|
|
|
|
if err := json.Unmarshal(this.Ctx.Input.RequestBody, &request); err != nil {
|
|
|
log.Error("json 解析失败", err)
|
...
|
...
|
@@ -101,11 +101,40 @@ func (this *TemplateController) TemplateList() { |
|
|
msg = m
|
|
|
return
|
|
|
}
|
|
|
rsp, err := audit.TemplateUpdate(uid, companyId, request)
|
|
|
rsp, err := audit.TemplateList(uid, companyId, request)
|
|
|
msg = protocol.NewReturnResponse(rsp, err)
|
|
|
return
|
|
|
}
|
|
|
|
|
|
//TemplateGet
|
|
|
//@router /templateGet [post]
|
|
|
func (this *TemplateController) TemplateGet() {
|
|
|
var msg *protocol.ResponseMessage
|
|
|
defer func() {
|
|
|
this.ResposeJson(msg)
|
|
|
}()
|
|
|
var request *protocol.TemplateGetRequest
|
|
|
|
|
|
if err := json.Unmarshal(this.Ctx.Input.RequestBody, &request); err != nil {
|
|
|
log.Error("json 解析失败", err)
|
|
|
msg = protocol.BadRequestParam("1")
|
|
|
return
|
|
|
}
|
|
|
uid := this.GetUserId()
|
|
|
companyId := this.GetCompanyId()
|
|
|
if companyId <= 0 {
|
|
|
log.Debug("companyId:%d err", companyId)
|
|
|
msg = protocol.BadRequestParam("1")
|
|
|
return
|
|
|
}
|
|
|
if b, m := this.Valid(request); !b {
|
|
|
msg = m
|
|
|
return
|
|
|
}
|
|
|
rsp, err := audit.TemplateGet(uid, companyId, request)
|
|
|
msg = protocol.NewReturnResponse(rsp, err)
|
|
|
}
|
|
|
|
|
|
//TemplateEditVisible
|
|
|
//@router /templateEditVisible [post]
|
|
|
func (this *TemplateController) TemplateEditVisible() {
|
...
|
...
|
|