作者 陈志颖

fix:订单合约时间匹配

@@ -169,8 +169,8 @@ func (dividendsOrderService *DividendsOrderService) CreateDividendsOrder(createD @@ -169,8 +169,8 @@ func (dividendsOrderService *DividendsOrderService) CreateDividendsOrder(createD
169 // 校验产品关联合约的激励规则是否匹配订单时间 169 // 校验产品关联合约的激励规则是否匹配订单时间
170 if cooperationContractsMap[orderGood.CooperationContractNumber] != nil { 170 if cooperationContractsMap[orderGood.CooperationContractNumber] != nil {
171 for _, incentivesRule := range cooperationContractsMap[orderGood.CooperationContractNumber].DividendsIncentivesRules { 171 for _, incentivesRule := range cooperationContractsMap[orderGood.CooperationContractNumber].DividendsIncentivesRules {
172 - if !((orderTime.After(incentivesRule.DividendsIncentivesStageStart) || orderTime.Equal(incentivesRule.DividendsIncentivesStageStart)) &&  
173 - (orderTime.Before(incentivesRule.DividendsIncentivesStageEnd) || orderTime.Equal(incentivesRule.DividendsIncentivesStageEnd))) { 172 + if (orderTime.After(incentivesRule.DividendsIncentivesStageStart) || orderTime.Equal(incentivesRule.DividendsIncentivesStageStart)) &&
  173 + (orderTime.Before(incentivesRule.DividendsIncentivesStageEnd) || orderTime.Equal(incentivesRule.DividendsIncentivesStageEnd)) {
174 ruleMatchedFlag = true 174 ruleMatchedFlag = true
175 break 175 break
176 } 176 }
@@ -755,8 +755,8 @@ func (dividendsOrderService *DividendsOrderService) ImportDividendsOrder(importD @@ -755,8 +755,8 @@ func (dividendsOrderService *DividendsOrderService) ImportDividendsOrder(importD
755 // 校验产品关联合约的激励规则是否匹配订单时间 755 // 校验产品关联合约的激励规则是否匹配订单时间
756 if cooperationContractsMap[orderGood.CooperationContractNumber] != nil { 756 if cooperationContractsMap[orderGood.CooperationContractNumber] != nil {
757 for _, incentivesRule := range cooperationContractsMap[orderGood.CooperationContractNumber].DividendsIncentivesRules { 757 for _, incentivesRule := range cooperationContractsMap[orderGood.CooperationContractNumber].DividendsIncentivesRules {
758 - if !((orderTime.After(incentivesRule.DividendsIncentivesStageStart) || orderTime.Equal(incentivesRule.DividendsIncentivesStageStart)) &&  
759 - (orderTime.Before(incentivesRule.DividendsIncentivesStageEnd) || orderTime.Equal(incentivesRule.DividendsIncentivesStageEnd))) { 758 + if (orderTime.After(incentivesRule.DividendsIncentivesStageStart) || orderTime.Equal(incentivesRule.DividendsIncentivesStageStart)) &&
  759 + (orderTime.Before(incentivesRule.DividendsIncentivesStageEnd) || orderTime.Equal(incentivesRule.DividendsIncentivesStageEnd)) {
760 ruleMatchedFlag = true 760 ruleMatchedFlag = true
761 break 761 break
762 } 762 }
@@ -1207,8 +1207,8 @@ func (dividendsOrderService *DividendsOrderService) UpdateDividendsOrder(updateD @@ -1207,8 +1207,8 @@ func (dividendsOrderService *DividendsOrderService) UpdateDividendsOrder(updateD
1207 // 校验产品关联合约的激励规则是否匹配订单时间 1207 // 校验产品关联合约的激励规则是否匹配订单时间
1208 if cooperationContractsMap[orderGood.CooperationContractNumber] != nil { 1208 if cooperationContractsMap[orderGood.CooperationContractNumber] != nil {
1209 for _, incentivesRule := range cooperationContractsMap[orderGood.CooperationContractNumber].DividendsIncentivesRules { 1209 for _, incentivesRule := range cooperationContractsMap[orderGood.CooperationContractNumber].DividendsIncentivesRules {
1210 - if !((orderTime.After(incentivesRule.DividendsIncentivesStageStart) || orderTime.Equal(incentivesRule.DividendsIncentivesStageStart)) &&  
1211 - (orderTime.Before(incentivesRule.DividendsIncentivesStageEnd) || orderTime.Equal(incentivesRule.DividendsIncentivesStageEnd))) { 1210 + if (orderTime.After(incentivesRule.DividendsIncentivesStageStart) || orderTime.Equal(incentivesRule.DividendsIncentivesStageStart)) &&
  1211 + (orderTime.Before(incentivesRule.DividendsIncentivesStageEnd) || orderTime.Equal(incentivesRule.DividendsIncentivesStageEnd)) {
1212 ruleMatchedFlag = true 1212 ruleMatchedFlag = true
1213 break 1213 break
1214 } 1214 }
@@ -176,7 +176,7 @@ func (dividendsReturnedOrderService *DividendsReturnedOrderService) CreateDivide @@ -176,7 +176,7 @@ func (dividendsReturnedOrderService *DividendsReturnedOrderService) CreateDivide
176 // 校验产品关联合约的激励规则是否匹配订单时间 176 // 校验产品关联合约的激励规则是否匹配订单时间
177 if cooperationContractsMap[orderGood.CooperationContractNumber] != nil { 177 if cooperationContractsMap[orderGood.CooperationContractNumber] != nil {
178 for _, incentivesRule := range cooperationContractsMap[orderGood.CooperationContractNumber].DividendsIncentivesRules { 178 for _, incentivesRule := range cooperationContractsMap[orderGood.CooperationContractNumber].DividendsIncentivesRules {
179 - if !(orderTime.After(incentivesRule.DividendsIncentivesStageStart) || orderTime.Equal(incentivesRule.DividendsIncentivesStageStart)) && 179 + if (orderTime.After(incentivesRule.DividendsIncentivesStageStart) || orderTime.Equal(incentivesRule.DividendsIncentivesStageStart)) &&
180 (orderTime.Before(incentivesRule.DividendsIncentivesStageEnd) || orderTime.Equal(incentivesRule.DividendsIncentivesStageEnd)) { 180 (orderTime.Before(incentivesRule.DividendsIncentivesStageEnd) || orderTime.Equal(incentivesRule.DividendsIncentivesStageEnd)) {
181 ruleMatchedFlag = true 181 ruleMatchedFlag = true
182 break 182 break
@@ -1179,8 +1179,8 @@ func (dividendsReturnedOrderService *DividendsReturnedOrderService) UpdateDivide @@ -1179,8 +1179,8 @@ func (dividendsReturnedOrderService *DividendsReturnedOrderService) UpdateDivide
1179 // 校验产品关联合约的激励规则是否匹配订单时间 1179 // 校验产品关联合约的激励规则是否匹配订单时间
1180 if cooperationContractsMap[orderGood.CooperationContractNumber] != nil { 1180 if cooperationContractsMap[orderGood.CooperationContractNumber] != nil {
1181 for _, incentivesRule := range cooperationContractsMap[orderGood.CooperationContractNumber].DividendsIncentivesRules { 1181 for _, incentivesRule := range cooperationContractsMap[orderGood.CooperationContractNumber].DividendsIncentivesRules {
1182 - if !((orderTime.After(incentivesRule.DividendsIncentivesStageStart) || orderTime.Equal(incentivesRule.DividendsIncentivesStageStart)) &&  
1183 - (orderTime.Before(incentivesRule.DividendsIncentivesStageEnd) || orderTime.Equal(incentivesRule.DividendsIncentivesStageEnd))) { 1182 + if (orderTime.After(incentivesRule.DividendsIncentivesStageStart) || orderTime.Equal(incentivesRule.DividendsIncentivesStageStart)) &&
  1183 + (orderTime.Before(incentivesRule.DividendsIncentivesStageEnd) || orderTime.Equal(incentivesRule.DividendsIncentivesStageEnd)) {
1184 ruleMatchedFlag = true 1184 ruleMatchedFlag = true
1185 break 1185 break
1186 } 1186 }