作者 唐旭辉

Merge branch 'dev' of http://gitlab.fjmaimaimai.com/mmm-go/oppmg into dev

... ... @@ -558,10 +558,12 @@ func TemplateOperateCategory(uid, companyId int64, request *protocol.TemplateOpe
log.Error("template_id:%v companyId:%v want:%v not equal.", request.Id, companyId, chanceType.CompanyId)
return
}
if _, err = models.GetChanceTypeByName(companyId, chanceType.Name); err == nil {
if chanceType.Name != request.Name {
if _, err = models.GetChanceTypeByName(companyId, request.Name); err == nil {
err = protocol.NewErrWithMessage("10271")
return
}
}
if err = utils.UpdateTableByMap(chanceType, map[string]interface{}{"Name": request.Name, "Icon": request.Icon, "SortNum": chanceType.SortNum, "UpdateAt": time.Now()}); err != nil {
log.Error(err.Error())
return
... ...