()
| 308 | } |
| 309 | |
| 310 | func ModelPrice2JSONString() string { |
| 311 | modelPriceMapMutex.RLock() |
| 312 | defer modelPriceMapMutex.RUnlock() |
| 313 | |
| 314 | jsonBytes, err := json.Marshal(modelPriceMap) |
| 315 | if err != nil { |
| 316 | common.SysError("error marshalling model price: " + err.Error()) |
| 317 | } |
| 318 | return string(jsonBytes) |
| 319 | } |
| 320 | |
| 321 | func UpdateModelPriceByJSONString(jsonStr string) error { |
| 322 | modelPriceMapMutex.Lock() |
no test coverage detected