正在显示
3 个修改的文件
包含
16 行增加
和
2 行删除
@@ -110,7 +110,7 @@ func NewDividendsEstimateService(options map[string]interface{}) *DividendsEstim | @@ -110,7 +110,7 @@ func NewDividendsEstimateService(options map[string]interface{}) *DividendsEstim | ||
110 | return newDividendsEstimateService | 110 | return newDividendsEstimateService |
111 | } | 111 | } |
112 | 112 | ||
113 | -func (dividendsEmmateService *DividendsEstimateService) MoneyIncentivesSelector(queryParam query.MoneyIncentiveSelectorQuery) (interface{}, error) { | 113 | +func (dividendsEmmateService *DividendsEstimateService) MoneyIncentivesSelector(queryParam *query.MoneyIncentiveSelectorQuery) (interface{}, error) { |
114 | creationCooperationGateway := allied_creation_cooperation.NewHttplibAlliedCreationCooperation( | 114 | creationCooperationGateway := allied_creation_cooperation.NewHttplibAlliedCreationCooperation( |
115 | queryParam.Operator) | 115 | queryParam.Operator) |
116 | resultContract, err := creationCooperationGateway.CooperationContractSearch(allied_creation_cooperation.ReqCooperationContractSearch{ | 116 | resultContract, err := creationCooperationGateway.CooperationContractSearch(allied_creation_cooperation.ReqCooperationContractSearch{ |
@@ -133,7 +133,7 @@ func (dividendsEmmateService *DividendsEstimateService) MoneyIncentivesSelector( | @@ -133,7 +133,7 @@ func (dividendsEmmateService *DividendsEstimateService) MoneyIncentivesSelector( | ||
133 | for _, v := range contractData.MoneyIncentivesRules { | 133 | for _, v := range contractData.MoneyIncentivesRules { |
134 | r := dto.MoneyIncentivesRule{ | 134 | r := dto.MoneyIncentivesRule{ |
135 | MoneyIncentivesStage: v.MoneyIncentivesStage, | 135 | MoneyIncentivesStage: v.MoneyIncentivesStage, |
136 | - MoneyIncentivesStageStart: int(v.MoneyIncentivesTime.Unix()), | 136 | + MoneyIncentivesStageStart: int(v.MoneyIncentivesTime.UnixNano() / 1e6), |
137 | } | 137 | } |
138 | rules = append(rules, r) | 138 | rules = append(rules, r) |
139 | } | 139 | } |
@@ -88,3 +88,16 @@ func (controller *DividendsEstimateController) EstimateDividendsIncentives() { | @@ -88,3 +88,16 @@ func (controller *DividendsEstimateController) EstimateDividendsIncentives() { | ||
88 | data, err := dividendsEstimateService.EstimateDividendsIncentives(estimateDividendsIncentivesCommand) | 88 | data, err := dividendsEstimateService.EstimateDividendsIncentives(estimateDividendsIncentivesCommand) |
89 | controller.Response(data, err) | 89 | controller.Response(data, err) |
90 | } | 90 | } |
91 | + | ||
92 | +//MoneyIncentivesSelector | ||
93 | +func (controller *DividendsEstimateController) MoneyIncentivesSelector() { | ||
94 | + dividendsEstimateService := service.NewDividendsEstimateService(nil) | ||
95 | + moneyIncentivesSelectorQuery := &query.MoneyIncentiveSelectorQuery{} | ||
96 | + err := controller.Unmarshal(moneyIncentivesSelectorQuery) | ||
97 | + if err != nil { | ||
98 | + log.Logger.Debug("json err:" + err.Error()) | ||
99 | + } | ||
100 | + moneyIncentivesSelectorQuery.Operator = controller.GetOperator() | ||
101 | + data, err := dividendsEstimateService.MoneyIncentivesSelector(moneyIncentivesSelectorQuery) | ||
102 | + controller.Response(data, err) | ||
103 | +} |
@@ -12,4 +12,5 @@ func init() { | @@ -12,4 +12,5 @@ func init() { | ||
12 | web.Router("/v1/web/dividends-estimate/money-incentives/search", &web_client.DividendsEstimateController{}, "Post:SearchMoneyIncentives") | 12 | web.Router("/v1/web/dividends-estimate/money-incentives/search", &web_client.DividendsEstimateController{}, "Post:SearchMoneyIncentives") |
13 | web.Router("/v1/web/dividends-estimate/money-incentives/estimate", &web_client.DividendsEstimateController{}, "Post:EstimateMoneyIncentives") | 13 | web.Router("/v1/web/dividends-estimate/money-incentives/estimate", &web_client.DividendsEstimateController{}, "Post:EstimateMoneyIncentives") |
14 | web.Router("/v1/web/dividends-estimate/dividends-incentives/estimate", &web_client.DividendsEstimateController{}, "Post:EstimateDividendsIncentives") | 14 | web.Router("/v1/web/dividends-estimate/dividends-incentives/estimate", &web_client.DividendsEstimateController{}, "Post:EstimateDividendsIncentives") |
15 | + web.Router("/v1/web/dividends-estimate/money-incentives/selector", &web_client.DividendsEstimateController{}, "Post:MoneyIncentivesSelector") | ||
15 | } | 16 | } |
-
请 注册 或 登录 后发表评论