更改分配配置
This commit is contained in:
parent
6f41cc9cbe
commit
1ed91f6f9a
@ -132,9 +132,10 @@ func (s *SplitAccountConfigService) UpdateSplitAccountConfig(req systemReq.Updat
|
|||||||
if err := json.Unmarshal([]byte(req.RuleValue), &temp); err != nil {
|
if err := json.Unmarshal([]byte(req.RuleValue), &temp); err != nil {
|
||||||
return utils.NewError("分账规则配置格式错误,不是合法的JSON")
|
return utils.NewError("分账规则配置格式错误,不是合法的JSON")
|
||||||
}
|
}
|
||||||
ruleValue, _ := json.Marshal(temp)
|
ruleBytes, _ := json.Marshal(temp)
|
||||||
updateData["rule_value"] = ruleValue
|
updateData["rule_value"] = datatypes.JSON(ruleBytes)
|
||||||
}
|
}
|
||||||
|
|
||||||
if req.Status >= 0 {
|
if req.Status >= 0 {
|
||||||
updateData["status"] = req.Status
|
updateData["status"] = req.Status
|
||||||
}
|
}
|
||||||
|
|||||||
@ -142,7 +142,7 @@ func (s *SplitAccountDeductionLogService) UpdateSplitAccountDeductionLog(req sys
|
|||||||
return utils.NewError("扣款规则格式错误,不是合法的JSON")
|
return utils.NewError("扣款规则格式错误,不是合法的JSON")
|
||||||
}
|
}
|
||||||
deductionDetails, _ := json.Marshal(temp)
|
deductionDetails, _ := json.Marshal(temp)
|
||||||
updateData["deduction_details"] = deductionDetails
|
updateData["deduction_details"] = datatypes.JSON(deductionDetails)
|
||||||
}
|
}
|
||||||
if req.TotalAmount > 0 {
|
if req.TotalAmount > 0 {
|
||||||
updateData["total_amount"] = req.TotalAmount
|
updateData["total_amount"] = req.TotalAmount
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user