|
@@ -57,15 +57,8 @@ func (this *FuBaoController) Add() {
|
|
|
}
|
|
|
if len(dataItem.ReturnValue.Data) > 0 {
|
|
|
priceStr := dataItem.ReturnValue.Data[0].PriceStr
|
|
|
-
|
|
|
- priceArr := strings.Split(priceStr, "-")
|
|
|
- var isAdd bool
|
|
|
- for _, v := range priceArr {
|
|
|
- if v == "" {
|
|
|
- isAdd = true
|
|
|
- }
|
|
|
- }
|
|
|
- if isAdd == false {
|
|
|
+ strIndex := strings.Index(priceStr, "-")
|
|
|
+ if strIndex > 0 {
|
|
|
br.Msg = "此指标的数据格式暂不支持!"
|
|
|
br.ErrMsg = "此指标的数据格式暂不支持,Val:" + priceStr + ";pid:" + req.EdbCode
|
|
|
return
|