正在显示
1 个修改的文件
包含
8 行增加
和
7 行删除
| @@ -6,6 +6,7 @@ import ( | @@ -6,6 +6,7 @@ import ( | ||
| 6 | "fmt" | 6 | "fmt" |
| 7 | "strconv" | 7 | "strconv" |
| 8 | "time" | 8 | "time" |
| 9 | + "unsafe" | ||
| 9 | 10 | ||
| 10 | "github.com/linmadan/egglib-go/core/application" | 11 | "github.com/linmadan/egglib-go/core/application" |
| 11 | "github.com/linmadan/egglib-go/utils/tool_funs" | 12 | "github.com/linmadan/egglib-go/utils/tool_funs" |
| @@ -1269,12 +1270,12 @@ func (cooperationContractService *CooperationContractService) UpdateCooperationC | @@ -1269,12 +1270,12 @@ func (cooperationContractService *CooperationContractService) UpdateCooperationC | ||
| 1269 | } else if cooperationContractFound.IncentivesType == cooperationContract.IncentivesType { // 2.激励规则内容变更 | 1270 | } else if cooperationContractFound.IncentivesType == cooperationContract.IncentivesType { // 2.激励规则内容变更 |
| 1270 | if cooperationContractFound.IncentivesType == domain.TYPE_DIVIDNEDS_INCENTIVES { // 业绩分红规则内容变更 | 1271 | if cooperationContractFound.IncentivesType == domain.TYPE_DIVIDNEDS_INCENTIVES { // 业绩分红规则内容变更 |
| 1271 | // 计算原合约哈希值 | 1272 | // 计算原合约哈希值 |
| 1272 | - cooperationContractFoundByte := utils.AnyToHex(cooperationContractFound.MoneyIncentivesRules) | 1273 | + cooperationContractFoundByte := *(*[]byte)(unsafe.Pointer(&cooperationContractFound.DividendsIncentivesRules)) |
| 1273 | cooperationContractFoundHashValue := md5.Sum(cooperationContractFoundByte) | 1274 | cooperationContractFoundHashValue := md5.Sum(cooperationContractFoundByte) |
| 1274 | cooperationContractFoundHashString := hex.EncodeToString(cooperationContractFoundHashValue[:]) | 1275 | cooperationContractFoundHashString := hex.EncodeToString(cooperationContractFoundHashValue[:]) |
| 1275 | 1276 | ||
| 1276 | // 计算更新后的合约哈希值 | 1277 | // 计算更新后的合约哈希值 |
| 1277 | - cooperationContractByte := utils.AnyToHex(cooperationContract.MoneyIncentivesRules) | 1278 | + cooperationContractByte := *(*[]byte)(unsafe.Pointer(&cooperationContract.DividendsIncentivesRules)) |
| 1278 | cooperationContractHashValue := md5.Sum(cooperationContractByte) | 1279 | cooperationContractHashValue := md5.Sum(cooperationContractByte) |
| 1279 | cooperationContractHashString := hex.EncodeToString(cooperationContractHashValue[:]) | 1280 | cooperationContractHashString := hex.EncodeToString(cooperationContractHashValue[:]) |
| 1280 | //if !cooperationContract.DividendsIncentivesRuleSliceEqualBCE(cooperationContractFound.DividendsIncentivesRules, cooperationContract.DividendsIncentivesRules) { | 1281 | //if !cooperationContract.DividendsIncentivesRuleSliceEqualBCE(cooperationContractFound.DividendsIncentivesRules, cooperationContract.DividendsIncentivesRules) { |
| @@ -1310,12 +1311,12 @@ func (cooperationContractService *CooperationContractService) UpdateCooperationC | @@ -1310,12 +1311,12 @@ func (cooperationContractService *CooperationContractService) UpdateCooperationC | ||
| 1310 | } | 1311 | } |
| 1311 | } else if cooperationContractFound.IncentivesType == domain.MONEY_INCENTIVES { // 金额激励规则内容变更 | 1312 | } else if cooperationContractFound.IncentivesType == domain.MONEY_INCENTIVES { // 金额激励规则内容变更 |
| 1312 | // 计算原合约哈希值 | 1313 | // 计算原合约哈希值 |
| 1313 | - cooperationContractFoundByte := utils.AnyToHex(cooperationContractFound.MoneyIncentivesRules) | 1314 | + cooperationContractFoundByte := *(*[]byte)(unsafe.Pointer(&cooperationContractFound.MoneyIncentivesRules)) |
| 1314 | cooperationContractFoundHashValue := md5.Sum(cooperationContractFoundByte) | 1315 | cooperationContractFoundHashValue := md5.Sum(cooperationContractFoundByte) |
| 1315 | cooperationContractFoundHashString := hex.EncodeToString(cooperationContractFoundHashValue[:]) | 1316 | cooperationContractFoundHashString := hex.EncodeToString(cooperationContractFoundHashValue[:]) |
| 1316 | 1317 | ||
| 1317 | // 计算更新后的合约哈希值 | 1318 | // 计算更新后的合约哈希值 |
| 1318 | - cooperationContractByte := utils.AnyToHex(cooperationContract.MoneyIncentivesRules) | 1319 | + cooperationContractByte := *(*[]byte)(unsafe.Pointer(&cooperationContract.MoneyIncentivesRules)) |
| 1319 | cooperationContractHashValue := md5.Sum(cooperationContractByte) | 1320 | cooperationContractHashValue := md5.Sum(cooperationContractByte) |
| 1320 | cooperationContractHashString := hex.EncodeToString(cooperationContractHashValue[:]) | 1321 | cooperationContractHashString := hex.EncodeToString(cooperationContractHashValue[:]) |
| 1321 | 1322 | ||
| @@ -1349,14 +1350,14 @@ func (cooperationContractService *CooperationContractService) UpdateCooperationC | @@ -1349,14 +1350,14 @@ func (cooperationContractService *CooperationContractService) UpdateCooperationC | ||
| 1349 | } | 1350 | } |
| 1350 | } | 1351 | } |
| 1351 | 1352 | ||
| 1352 | - // 承接人变更 | 1353 | + /*********************************************** 承接人变更 *****************************************************/ |
| 1353 | // 计算原合约哈希值 | 1354 | // 计算原合约哈希值 |
| 1354 | - cooperationContractFoundByte := utils.AnyToHex(cooperationContractFound.Undertakers) | 1355 | + cooperationContractFoundByte := *(*[]byte)(unsafe.Pointer(&cooperationContractFound.Undertakers)) |
| 1355 | cooperationContractFoundHashValue := md5.Sum(cooperationContractFoundByte) | 1356 | cooperationContractFoundHashValue := md5.Sum(cooperationContractFoundByte) |
| 1356 | cooperationContractFoundHashString := hex.EncodeToString(cooperationContractFoundHashValue[:]) | 1357 | cooperationContractFoundHashString := hex.EncodeToString(cooperationContractFoundHashValue[:]) |
| 1357 | 1358 | ||
| 1358 | // 计算更新后的合约哈希值 | 1359 | // 计算更新后的合约哈希值 |
| 1359 | - cooperationContractByte := utils.AnyToHex(cooperationContract.Undertakers) | 1360 | + cooperationContractByte := *(*[]byte)(unsafe.Pointer(&cooperationContract.Undertakers)) |
| 1360 | cooperationContractHashValue := md5.Sum(cooperationContractByte) | 1361 | cooperationContractHashValue := md5.Sum(cooperationContractByte) |
| 1361 | cooperationContractHashString := hex.EncodeToString(cooperationContractHashValue[:]) | 1362 | cooperationContractHashString := hex.EncodeToString(cooperationContractHashValue[:]) |
| 1362 | 1363 |
-
请 注册 或 登录 后发表评论