作者 Administrator

合并分支 'test' 到 'master'

Test



查看合并请求 !14
@@ -4,6 +4,7 @@ import ( @@ -4,6 +4,7 @@ import (
4 "time" 4 "time"
5 5
6 "gitlab.fjmaimaimai.com/allied-creation/performance/pkg/application/factory" 6 "gitlab.fjmaimaimai.com/allied-creation/performance/pkg/application/factory"
  7 + "gitlab.fjmaimaimai.com/allied-creation/performance/pkg/constant"
7 "gitlab.fjmaimaimai.com/allied-creation/performance/pkg/domain" 8 "gitlab.fjmaimaimai.com/allied-creation/performance/pkg/domain"
8 ) 9 )
9 10
@@ -48,9 +49,9 @@ func (notices notifyStaffAssess) makeNotify(param *domain.StaffAssess) *domain.L @@ -48,9 +49,9 @@ func (notices notifyStaffAssess) makeNotify(param *domain.StaffAssess) *domain.L
48 49
49 // ifSend 确认是否发送通知 50 // ifSend 确认是否发送通知
50 func (notices notifyStaffAssess) ifSend(index int) (bool, error) { 51 func (notices notifyStaffAssess) ifSend(index int) (bool, error) {
51 - // if constant.Env != "prd" {  
52 - // return false, nil  
53 - // } 52 + if constant.Env != "prd" {
  53 + return false, nil
  54 + }
54 55
55 transactionContext, err := factory.CreateTransactionContext(nil) 56 transactionContext, err := factory.CreateTransactionContext(nil)
56 if err != nil { 57 if err != nil {
@@ -123,9 +124,9 @@ func (notices notifyStaffAssess2) makeNotify(param *domain.StaffAssess) *domain. @@ -123,9 +124,9 @@ func (notices notifyStaffAssess2) makeNotify(param *domain.StaffAssess) *domain.
123 124
124 // ifSend 确认是否发送通知 125 // ifSend 确认是否发送通知
125 func (notices notifyStaffAssess2) ifSend(index int) (bool, error) { 126 func (notices notifyStaffAssess2) ifSend(index int) (bool, error) {
126 - // if constant.Env != "prd" {  
127 - // return false, nil  
128 - // } 127 + if constant.Env != "prd" {
  128 + return false, nil
  129 + }
129 transactionContext, err := factory.CreateTransactionContext(nil) 130 transactionContext, err := factory.CreateTransactionContext(nil)
130 if err != nil { 131 if err != nil {
131 return false, err 132 return false, err
@@ -16,6 +16,7 @@ import ( @@ -16,6 +16,7 @@ import (
16 "golang.org/x/text/transform" 16 "golang.org/x/text/transform"
17 "io" 17 "io"
18 "io/ioutil" 18 "io/ioutil"
  19 + "math"
19 "mime/multipart" 20 "mime/multipart"
20 "os" 21 "os"
21 "path" 22 "path"
@@ -168,7 +169,7 @@ func (controller *ImportController) parseTemplateNodeContent(data []*domain.Perf @@ -168,7 +169,7 @@ func (controller *ImportController) parseTemplateNodeContent(data []*domain.Perf
168 nodeContents = append(nodeContents, nc) 169 nodeContents = append(nodeContents, nc)
169 } 170 }
170 } 171 }
171 - 172 + weightTotal = math.Round(weightTotal*100) / 100
172 // 权重总数不等于100%,提示报错 173 // 权重总数不等于100%,提示报错
173 if weightTotal != 100 { 174 if weightTotal != 100 {
174 sprintf := fmt.Sprintf("当前导入的总权重值为:%s%%(必须等于100%%)", utils.FormatFloatDecimal(weightTotal, 2)) 175 sprintf := fmt.Sprintf("当前导入的总权重值为:%s%%(必须等于100%%)", utils.FormatFloatDecimal(weightTotal, 2))