正在显示
4 个修改的文件
包含
4 行增加
和
11 行删除
| @@ -153,6 +153,7 @@ type TemplateOperateCategoryRequest struct { | @@ -153,6 +153,7 @@ type TemplateOperateCategoryRequest struct { | ||
| 153 | Icon string `json:"icon"` | 153 | Icon string `json:"icon"` |
| 154 | } | 154 | } |
| 155 | type TemplateOperateCategoryResponse struct { | 155 | type TemplateOperateCategoryResponse struct { |
| 156 | + Id int `json:"id"` | ||
| 156 | } | 157 | } |
| 157 | 158 | ||
| 158 | /*TemplateGet */ | 159 | /*TemplateGet */ |
| @@ -117,16 +117,6 @@ func init() { | @@ -117,16 +117,6 @@ func init() { | ||
| 117 | beego.AddNamespace(nsV1) | 117 | beego.AddNamespace(nsV1) |
| 118 | beego.AddNamespace(nsAuth) | 118 | beego.AddNamespace(nsAuth) |
| 119 | beego.AddNamespace(nsUcenter) | 119 | beego.AddNamespace(nsUcenter) |
| 120 | - // nsTest := beego.NewNamespace("/test", | ||
| 121 | - // beego.NSCond(func(ctx *context.Context) bool { | ||
| 122 | - // if beego.BConfig.RunMode != "prod" { | ||
| 123 | - // return true | ||
| 124 | - // } | ||
| 125 | - // return false | ||
| 126 | - // }), | ||
| 127 | - // beego.NSRouter("/te", &controllers.RbacController{}, "get:GetRoleMenuAll"), | ||
| 128 | - // ) | ||
| 129 | - // beego.AddNamespace(nsTest) | ||
| 130 | beego.SetStaticPath("/log", beego.AppConfig.String("log_filename")) | 120 | beego.SetStaticPath("/log", beego.AppConfig.String("log_filename")) |
| 131 | beego.SetStaticPath("/file/opp", beego.AppConfig.String("file_save_path")) | 121 | beego.SetStaticPath("/file/opp", beego.AppConfig.String("file_save_path")) |
| 132 | beego.SetStaticPath("/static", "./static") | 122 | beego.SetStaticPath("/static", "./static") |
| @@ -442,6 +442,7 @@ func TemplateOperateCategory(uid, companyId int64, request *protocol.TemplateOpe | @@ -442,6 +442,7 @@ func TemplateOperateCategory(uid, companyId int64, request *protocol.TemplateOpe | ||
| 442 | log.Error(err.Error()) | 442 | log.Error(err.Error()) |
| 443 | return | 443 | return |
| 444 | } | 444 | } |
| 445 | + rsp.Id = chanceType.Id | ||
| 445 | return | 446 | return |
| 446 | } | 447 | } |
| 447 | if len([]rune(request.Code)) > 6 { | 448 | if len([]rune(request.Code)) > 6 { |
| @@ -463,6 +464,7 @@ func TemplateOperateCategory(uid, companyId int64, request *protocol.TemplateOpe | @@ -463,6 +464,7 @@ func TemplateOperateCategory(uid, companyId int64, request *protocol.TemplateOpe | ||
| 463 | if _, err = models.AddChanceType(chanceType); err != nil { | 464 | if _, err = models.AddChanceType(chanceType); err != nil { |
| 464 | log.Error(err.Error()) | 465 | log.Error(err.Error()) |
| 465 | } | 466 | } |
| 467 | + rsp.Id = chanceType.Id | ||
| 466 | return | 468 | return |
| 467 | } | 469 | } |
| 468 | 470 |
| @@ -165,7 +165,7 @@ func existCompanyUser(companyid int64, phone string) error { | @@ -165,7 +165,7 @@ func existCompanyUser(companyid int64, phone string) error { | ||
| 165 | 165 | ||
| 166 | ok := models.ExistUserCompany(userdata.Id, companyid) | 166 | ok := models.ExistUserCompany(userdata.Id, companyid) |
| 167 | if ok { | 167 | if ok { |
| 168 | - protocol.NewErrWithMessage("10039") | 168 | + return protocol.NewErrWithMessage("10039") |
| 169 | } | 169 | } |
| 170 | return nil | 170 | return nil |
| 171 | } | 171 | } |
-
请 注册 或 登录 后发表评论