正在显示
11 个修改的文件
包含
7 行增加
和
76 行删除
1 | appname = opportunity | 1 | appname = opportunity |
2 | httpport = 8080 | 2 | httpport = 8080 |
3 | -runmode = "${RUN_MODE||prod_test}" | 3 | +runmode = "${RUN_MODE||dev}" |
4 | 4 | ||
5 | #没设置的话 this.Ctx.Input.RequestBody 没有值 | 5 | #没设置的话 this.Ctx.Input.RequestBody 没有值 |
6 | copyrequestbody = true | 6 | copyrequestbody = true |
@@ -14,6 +14,5 @@ include "dev.conf" | @@ -14,6 +14,5 @@ include "dev.conf" | ||
14 | include "dev-online.conf" | 14 | include "dev-online.conf" |
15 | include "test.conf" | 15 | include "test.conf" |
16 | include "prod.conf" | 16 | include "prod.conf" |
17 | -include "prod_test.conf" | ||
18 | 17 | ||
19 | 18 |
@@ -47,6 +47,3 @@ cname ="https://media.fjmaimaimai.com/" | @@ -47,6 +47,3 @@ cname ="https://media.fjmaimaimai.com/" | ||
47 | 47 | ||
48 | #企业平台 | 48 | #企业平台 |
49 | BUSINESS_ADMIN_SERVICE_HOST ="${BUSINESS_ADMIN_SERVICE_HOST||http://suplus-business-admin-dev.fjmaimaimai.com}" | 49 | BUSINESS_ADMIN_SERVICE_HOST ="${BUSINESS_ADMIN_SERVICE_HOST||http://suplus-business-admin-dev.fjmaimaimai.com}" |
50 | - | ||
51 | -#服务地址 | ||
52 | -VOD_SVR_ADDRESS ="http://mmm-open-api-dev.fjmaimaimai.com" |
@@ -48,6 +48,3 @@ cname ="https://media.goexample.live/" | @@ -48,6 +48,3 @@ cname ="https://media.goexample.live/" | ||
48 | 48 | ||
49 | #企业平台 | 49 | #企业平台 |
50 | BUSINESS_ADMIN_SERVICE_HOST ="${BUSINESS_ADMIN_SERVICE_HOST||http://suplus-business-admin-dev.fjmaimaimai.com}" | 50 | BUSINESS_ADMIN_SERVICE_HOST ="${BUSINESS_ADMIN_SERVICE_HOST||http://suplus-business-admin-dev.fjmaimaimai.com}" |
51 | - | ||
52 | -#服务地址 | ||
53 | -VOD_SVR_ADDRESS ="http://mmm-open-api-dev.fjmaimaimai.com" |
@@ -47,6 +47,3 @@ BUSINESS_ADMIN_SERVICE_HOST ="${BUSINESS_ADMIN_SERVICE_HOST||http://suplus-busin | @@ -47,6 +47,3 @@ BUSINESS_ADMIN_SERVICE_HOST ="${BUSINESS_ADMIN_SERVICE_HOST||http://suplus-busin | ||
47 | 47 | ||
48 | #阿里云 | 48 | #阿里云 |
49 | cname ="https://media.fjmaimaimai.com/" | 49 | cname ="https://media.fjmaimaimai.com/" |
50 | - | ||
51 | -#服务地址 | ||
52 | -VOD_SVR_ADDRESS ="http://mmm-open-api-prd.fjmaimaimai.com" |
1 | -[prod_test] | 1 | +[prod] |
2 | #数据库相关 | 2 | #数据库相关 |
3 | mysql_user = "${MYSQL_USER||suplus_user}" | 3 | mysql_user = "${MYSQL_USER||suplus_user}" |
4 | mysql_password = "${MYSQL_PASSWORD||suplus2019!}" | 4 | mysql_password = "${MYSQL_PASSWORD||suplus2019!}" |
@@ -47,6 +47,3 @@ BUSINESS_ADMIN_SERVICE_HOST ="${BUSINESS_ADMIN_SERVICE_HOST||http://suplus-busin | @@ -47,6 +47,3 @@ BUSINESS_ADMIN_SERVICE_HOST ="${BUSINESS_ADMIN_SERVICE_HOST||http://suplus-busin | ||
47 | 47 | ||
48 | #阿里云 | 48 | #阿里云 |
49 | cname ="https://media.fjmaimaimai.com/" | 49 | cname ="https://media.fjmaimaimai.com/" |
50 | - | ||
51 | -#服务地址 | ||
52 | -VOD_SVR_ADDRESS ="http://mmm-open-api-prd.fjmaimaimai.com" |
@@ -34,24 +34,3 @@ func (this *ConfigController) GetConfigScore() { | @@ -34,24 +34,3 @@ func (this *ConfigController) GetConfigScore() { | ||
34 | header := controllers.GetRequestHeader(this.Ctx) | 34 | header := controllers.GetRequestHeader(this.Ctx) |
35 | msg = protocol.NewReturnResponse(config.GetConfigScore(header, request)) | 35 | msg = protocol.NewReturnResponse(config.GetConfigScore(header, request)) |
36 | } | 36 | } |
37 | - | ||
38 | -//ServiceConfig 服务配置 | ||
39 | -//@router /service [post] | ||
40 | -func (this *ConfigController) ServiceConfig() { | ||
41 | - var msg *protocol.ResponseMessage | ||
42 | - defer func() { | ||
43 | - this.Resp(msg) | ||
44 | - }() | ||
45 | - var request *protocol.ServiceConfigRequest | ||
46 | - if err := json.Unmarshal(this.ByteBody, &request); err != nil { | ||
47 | - log.Error(err) | ||
48 | - msg = protocol.BadRequestParam(1) | ||
49 | - return | ||
50 | - } | ||
51 | - if b, m := this.Valid(request); !b { | ||
52 | - msg = m | ||
53 | - return | ||
54 | - } | ||
55 | - header := controllers.GetRequestHeader(this.Ctx) | ||
56 | - msg = protocol.NewReturnResponse(config.ServiceConfig(header, request)) | ||
57 | -} |
@@ -4,12 +4,12 @@ const ( | @@ -4,12 +4,12 @@ const ( | ||
4 | RegionID = "cn-shanghai" | 4 | RegionID = "cn-shanghai" |
5 | 5 | ||
6 | //公司 | 6 | //公司 |
7 | - //AccessKeyID = "LTAI4Fz1LUBW2fXp6QWaJHRS" | ||
8 | - //AccessKeySecret = "aLZXwK8pgrs10Ws03qcN7NsrSXFVsg" | 7 | + AccessKeyID = "LTAI4Fz1LUBW2fXp6QWaJHRS" |
8 | + AccessKeySecret = "aLZXwK8pgrs10Ws03qcN7NsrSXFVsg" | ||
9 | 9 | ||
10 | //个人 | 10 | //个人 |
11 | - AccessKeyID = "LTAI4FhiZ3UktC6N1u3H5GFC" | ||
12 | - AccessKeySecret = "UyspWwdni55CYQ02hUCint4qY2jNYO" | 11 | + //AccessKeyID = "LTAI4FhiZ3UktC6N1u3H5GFC" |
12 | + //AccessKeySecret = "UyspWwdni55CYQ02hUCint4qY2jNYO" | ||
13 | ) | 13 | ) |
14 | 14 | ||
15 | const ( | 15 | const ( |
@@ -32,19 +32,3 @@ type ScoreRange struct { | @@ -32,19 +32,3 @@ type ScoreRange struct { | ||
32 | Max float64 `json:"max"` //最大分 | 32 | Max float64 `json:"max"` //最大分 |
33 | Step float64 `json:"step"` //步长 | 33 | Step float64 `json:"step"` //步长 |
34 | } | 34 | } |
35 | - | ||
36 | -/*ServiceConfig 服务配置*/ | ||
37 | -type ServiceConfigRequest struct { | ||
38 | -} | ||
39 | -type ServiceConfigResponse struct { | ||
40 | - ServeConfig *ServeConfig `json:"serveConfig"` //服务配置 | ||
41 | -} | ||
42 | - | ||
43 | -type ServeConfig struct { | ||
44 | - VodAddress string `json:"vodSvrAddress"` //视频服务地址 | ||
45 | -} | ||
46 | - | ||
47 | -func (s *ServeConfig) SetVodAddress(addr string) *ServeConfig { | ||
48 | - s.VodAddress = addr | ||
49 | - return s | ||
50 | -} |
@@ -415,14 +415,6 @@ func init() { | @@ -415,14 +415,6 @@ func init() { | ||
415 | MethodParams: param.Make(), | 415 | MethodParams: param.Make(), |
416 | Params: nil}) | 416 | Params: nil}) |
417 | 417 | ||
418 | - beego.GlobalControllerRouter["opp/controllers/v1:ConfigController"] = append(beego.GlobalControllerRouter["opp/controllers/v1:ConfigController"], | ||
419 | - beego.ControllerComments{ | ||
420 | - Method: "ServiceConfig", | ||
421 | - Router: `/service`, | ||
422 | - AllowHTTPMethods: []string{"post"}, | ||
423 | - MethodParams: param.Make(), | ||
424 | - Params: nil}) | ||
425 | - | ||
426 | beego.GlobalControllerRouter["opp/controllers/v1:DepartmentController"] = append(beego.GlobalControllerRouter["opp/controllers/v1:DepartmentController"], | 418 | beego.GlobalControllerRouter["opp/controllers/v1:DepartmentController"] = append(beego.GlobalControllerRouter["opp/controllers/v1:DepartmentController"], |
427 | beego.ControllerComments{ | 419 | beego.ControllerComments{ |
428 | Method: "Departments", | 420 | Method: "Departments", |
@@ -442,7 +442,7 @@ func CheckBusinessAuth(header *protocol.RequestHeader, muid int64) (err error) { | @@ -442,7 +442,7 @@ func CheckBusinessAuth(header *protocol.RequestHeader, muid int64) (err error) { | ||
442 | authMessage *protocol.Message | 442 | authMessage *protocol.Message |
443 | ) | 443 | ) |
444 | if authMessage, hasAuth = agg.GetUserModuleAuth(muid); !hasAuth { | 444 | if authMessage, hasAuth = agg.GetUserModuleAuth(muid); !hasAuth { |
445 | - err = protocol.NewCustomMessage(2002, authMessage.Errmsg) //账号不存在 | 445 | + err = protocol.NewCustomMessage(authMessage.Errno, authMessage.Errmsg) //账号不存在 |
446 | return | 446 | return |
447 | } | 447 | } |
448 | if authMessage.Errno != 0 { | 448 | if authMessage.Errno != 0 { |
@@ -2,7 +2,6 @@ package config | @@ -2,7 +2,6 @@ package config | ||
2 | 2 | ||
3 | import ( | 3 | import ( |
4 | "encoding/json" | 4 | "encoding/json" |
5 | - "github.com/astaxie/beego" | ||
6 | "gitlab.fjmaimaimai.com/mmm-go/gocomm/pkg/log" | 5 | "gitlab.fjmaimaimai.com/mmm-go/gocomm/pkg/log" |
7 | "opp/models" | 6 | "opp/models" |
8 | "opp/protocol" | 7 | "opp/protocol" |
@@ -23,13 +22,3 @@ func GetConfigScore(header *protocol.RequestHeader, request *protocol.GetConfigS | @@ -23,13 +22,3 @@ func GetConfigScore(header *protocol.RequestHeader, request *protocol.GetConfigS | ||
23 | } | 22 | } |
24 | return | 23 | return |
25 | } | 24 | } |
26 | - | ||
27 | -//ServiceConfig 服务配置 | ||
28 | -func ServiceConfig(header *protocol.RequestHeader, request *protocol.ServiceConfigRequest) (rsp *protocol.ServiceConfigResponse, err error) { | ||
29 | - var () | ||
30 | - rsp = &protocol.ServiceConfigResponse{ | ||
31 | - ServeConfig: new(protocol.ServeConfig), | ||
32 | - } | ||
33 | - rsp.ServeConfig.SetVodAddress(beego.AppConfig.String("VOD_SVR_ADDRESS")) | ||
34 | - return | ||
35 | -} |
-
请 注册 或 登录 后发表评论