|
@@ -69,10 +69,12 @@ func (this *DataExportPack) PackGoodsList() {
|
|
|
"normal_discount": vv.Normal_discount,
|
|
|
"senior_discount": vv.Senior_discount,
|
|
|
}
|
|
|
- for _, v := range qutil.ObjArrToMapArr(resMap["Data"].([]interface{})) {
|
|
|
- product := strconv.Itoa(qutil.IntAll(v["ProductCode"]))
|
|
|
- if strings.Contains(proDuctM[product], strconv.Itoa(vv.PackNum)) {
|
|
|
- m[fmt.Sprintf("%v_num", strings.Split(proDuctM[product], "_")[0])] = v["Time"]
|
|
|
+ if resMap["Data"] != nil {
|
|
|
+ for _, v := range qutil.ObjArrToMapArr(resMap["Data"].([]interface{})) {
|
|
|
+ product := strconv.Itoa(qutil.IntAll(v["ProductCode"]))
|
|
|
+ if strings.Contains(proDuctM[product], strconv.Itoa(vv.PackNum)) {
|
|
|
+ m[fmt.Sprintf("%v_num", strings.Split(proDuctM[product], "_")[0])] = v["Time"]
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
marr = append(marr, m)
|