|
@@ -1,22 +1,19 @@
|
|
|
package com.platform.controller;
|
|
|
|
|
|
-import com.alibaba.fastjson.JSONArray;
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
+import com.platform.entity.BrandEntity;
|
|
|
import com.platform.entity.Result;
|
|
|
import com.platform.entity.SysUserBrand;
|
|
|
+import com.platform.service.BrandService;
|
|
|
import com.platform.service.custom.MySysUserBrandService;
|
|
|
import com.platform.service.impl.ZhiHouseService;
|
|
|
-import com.platform.vos.TbUser;
|
|
|
-import org.apache.shiro.authz.annotation.RequiresPermissions;
|
|
|
-import org.bytedeco.javacpp.presets.opencv_core;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.util.ObjectUtils;
|
|
|
+import org.springframework.util.StringUtils;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
-import java.util.Arrays;
|
|
|
import java.util.HashMap;
|
|
|
import java.util.List;
|
|
|
-import java.util.stream.Collectors;
|
|
|
|
|
|
@RestController
|
|
|
@RequestMapping("/zfb")
|
|
@@ -26,6 +23,9 @@ public class ZfbController {
|
|
|
private MySysUserBrandService mySysUserBrandService;
|
|
|
|
|
|
@Autowired
|
|
|
+ private BrandService brandService;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
private ZhiHouseService zhiHouseService;
|
|
|
|
|
|
@PostMapping("/deleteStaff")
|
|
@@ -54,6 +54,22 @@ public class ZfbController {
|
|
|
}
|
|
|
return Result.success(resultMap);
|
|
|
}
|
|
|
+ @PostMapping("/queryBrandBySceneNums")
|
|
|
+ public Result queryBrandBySceneNums(@RequestBody JSONObject param) {
|
|
|
+ Object nums = param.get("nums");
|
|
|
+ List<String> jsonArray = (List<String>) nums;
|
|
|
+
|
|
|
+ HashMap<String,Integer> resultMap = new HashMap<>();
|
|
|
+ for (String sceneNum : jsonArray) {
|
|
|
+ BrandEntity brand = brandService.queryByScene(sceneNum);
|
|
|
+ Integer lived = 0;
|
|
|
+ if(brand != null){
|
|
|
+ lived = 1;
|
|
|
+ }
|
|
|
+ resultMap.put(sceneNum,lived);
|
|
|
+ }
|
|
|
+ return Result.success(resultMap);
|
|
|
+ }
|
|
|
|
|
|
|
|
|
|