|
@@ -18,6 +18,7 @@ import org.springframework.stereotype.Service;
|
|
import java.net.URLDecoder;
|
|
import java.net.URLDecoder;
|
|
import java.util.ArrayList;
|
|
import java.util.ArrayList;
|
|
import java.util.List;
|
|
import java.util.List;
|
|
|
|
+import java.util.Map;
|
|
|
|
|
|
@Service
|
|
@Service
|
|
public class LargePublicCarServiceImpl extends ServiceImpl<LargePublicCarMapper, LargeCar> implements ILargePublicCarService {
|
|
public class LargePublicCarServiceImpl extends ServiceImpl<LargePublicCarMapper, LargeCar> implements ILargePublicCarService {
|
|
@@ -223,10 +224,9 @@ public class LargePublicCarServiceImpl extends ServiceImpl<LargePublicCarMapper,
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
- public int upload(String type, String json){
|
|
|
|
|
|
+ public int upload(String type, Map<String, Object> json){
|
|
try {
|
|
try {
|
|
- String str = URLDecoder.decode(json, "UTF-8");
|
|
|
|
- List<LargeCar> list = JSON.parseArray(JSONObject.parseObject(str).getString("data"), LargeCar.class);
|
|
|
|
|
|
+ List<LargeCar> list = JSON.parseArray(JSON.toJSONString(json.get("data")), LargeCar.class);
|
|
for (LargeCar largeCar : list){
|
|
for (LargeCar largeCar : list){
|
|
LargeCar car = this.getOne(new QueryWrapper<LargeCar>().eq("app_encode", largeCar.getAppEncode()));
|
|
LargeCar car = this.getOne(new QueryWrapper<LargeCar>().eq("app_encode", largeCar.getAppEncode()));
|
|
if (car != null) {
|
|
if (car != null) {
|