作者 yangfu

token验证修改

@@ -14,8 +14,10 @@ type SearchDividendsEstimatesCommand struct { @@ -14,8 +14,10 @@ type SearchDividendsEstimatesCommand struct {
14 PageNumber int `json:"pageIndex" valid:"Required"` 14 PageNumber int `json:"pageIndex" valid:"Required"`
15 // 查询限制 15 // 查询限制
16 PageSize int `json:"pageSize" valid:"Required"` 16 PageSize int `json:"pageSize" valid:"Required"`
17 - //审核状态 17 + //状态
18 Status int `json:"status"` 18 Status int `json:"status"`
  19 + // 组织Id
  20 + OrgId int64 `json:"orgId" valid:"Required"`
19 } 21 }
20 22
21 func (cmd *SearchDividendsEstimatesCommand) Valid(validation *validation.Validation) { 23 func (cmd *SearchDividendsEstimatesCommand) Valid(validation *validation.Validation) {
@@ -58,8 +58,8 @@ func (srv PersonDividendsService) SearchDividendsEstimates(cmd *command.SearchDi @@ -58,8 +58,8 @@ func (srv PersonDividendsService) SearchDividendsEstimates(cmd *command.SearchDi
58 gateway := allied_creation_cooperation.NewHttplibAlliedCreationCooperation( 58 gateway := allied_creation_cooperation.NewHttplibAlliedCreationCooperation(
59 cmd.Operator) 59 cmd.Operator)
60 result, err := gateway.CooperationStatistics(allied_creation_cooperation.SearchDividendsEstimates, map[string]interface{}{ 60 result, err := gateway.CooperationStatistics(allied_creation_cooperation.SearchDividendsEstimates, map[string]interface{}{
61 - "companyId": cmd.Operator.CompanyId,  
62 - //"orgId":cmd.Operator.OrgId, 61 + //"companyId": cmd.Operator.CompanyId,
  62 + "orgId": cmd.OrgId,
63 "userBaseId": cmd.Operator.UserBaseId, 63 "userBaseId": cmd.Operator.UserBaseId,
64 "dividendsAccountStatus": cmd.Status, 64 "dividendsAccountStatus": cmd.Status,
65 "offset": (cmd.PageNumber - 1) * cmd.PageSize, 65 "offset": (cmd.PageNumber - 1) * cmd.PageSize,
@@ -34,7 +34,9 @@ func init() { @@ -34,7 +34,9 @@ func init() {
34 filters.SecureKeyMap["token"] = "x-mmm-accesstoken" 34 filters.SecureKeyMap["token"] = "x-mmm-accesstoken"
35 web.InsertFilter("/*", web.BeforeRouter, filters.AllowCors()) 35 web.InsertFilter("/*", web.BeforeRouter, filters.AllowCors())
36 web.InsertFilter("/*", web.BeforeRouter, filters.CreateRequstLogFilter(log.Logger)) 36 web.InsertFilter("/*", web.BeforeRouter, filters.CreateRequstLogFilter(log.Logger))
37 - web.InsertFilter("/*", web.BeforeExec, middleware.CheckAccessToken2()) 37 + web.InsertFilter("/v1/web/*", web.BeforeExec, middleware.CheckAccessToken2())
  38 + web.InsertFilter("/v1/app/*", web.BeforeExec, middleware.CheckAccessToken2())
  39 + web.InsertFilter("/v1/user/*", web.BeforeExec, middleware.CheckAccessToken2())
38 web.InsertFilter("/*", web.AfterExec, filters.CreateResponseLogFilter(log.Logger), web.WithReturnOnOutput(false)) 40 web.InsertFilter("/*", web.AfterExec, filters.CreateResponseLogFilter(log.Logger), web.WithReturnOnOutput(false))
39 web.InsertFilter("/v1/app11/*", web.BeforeExec, filters.SecureHandler( 41 web.InsertFilter("/v1/app11/*", web.BeforeExec, filters.SecureHandler(
40 filters.WithEnableCheckTimestamp(false), 42 filters.WithEnableCheckTimestamp(false),