...
|
...
|
@@ -53,6 +53,7 @@ func TemplateAdd(uid, companyId int64, request *protocol.TemplateAddRequest) (rs |
|
|
VisibleType: int8(0),
|
|
|
EnableStatus: 1,
|
|
|
Example: request.Example,
|
|
|
Videos: jsonAssertMarsh(request.Videos),
|
|
|
CreateAt: time.Now(),
|
|
|
UpdateAt: time.Now(),
|
|
|
}
|
...
|
...
|
@@ -181,6 +182,7 @@ func TemplateUpdate(uid, companyId int64, request *protocol.TemplateUpdateReques |
|
|
template.Icon = request.Template.Icon
|
|
|
template.NoApprover = int8(request.AuditFlowConfig.NoApprover)
|
|
|
template.Example = request.Example
|
|
|
template.Videos = jsonAssertMarsh(request.Videos)
|
|
|
template.UpdateAt = time.Now()
|
|
|
if err = models.UpdateAuditTemplateById(template); err != nil {
|
|
|
log.Error(err.Error())
|
...
|
...
|
@@ -457,6 +459,10 @@ func TemplateGet(uid, companyId int64, request *protocol.TemplateGetRequest) (rs |
|
|
Code: template.Code,
|
|
|
}
|
|
|
rsp.Example = template.Example
|
|
|
rsp.Videos = make([]string, 0)
|
|
|
if len(template.Videos) > 0 {
|
|
|
_ = json.Unmarshal([]byte(template.Videos), &rsp.Videos)
|
|
|
}
|
|
|
|
|
|
if auditForm, err = models.GetAuditFormByTemplateId(int(template.Id)); err != nil {
|
|
|
log.Error("id:%v msg:%v", template.Id, err.Error())
|
...
|
...
|
|