Showing
1 changed file
with
3 additions
and
3 deletions
@@ -34,10 +34,10 @@ public class SknImageVectorsController { | @@ -34,10 +34,10 @@ public class SknImageVectorsController { | ||
34 | @ResponseBody | 34 | @ResponseBody |
35 | public SearchApiResult searchSknByPhoto(@RequestBody JSONObject jsonObject) { | 35 | public SearchApiResult searchSknByPhoto(@RequestBody JSONObject jsonObject) { |
36 | try { | 36 | try { |
37 | - String vectors_32 = jsonObject.get("vectors")==null?null:jsonObject.get("vectors").toString(); | 37 | + String vectors_32 = jsonObject.get(VECTORS_32_KEY)==null?null:jsonObject.get(VECTORS_32_KEY).toString(); |
38 | String vectors_128 = jsonObject.get(VECTORS_128_KEY)==null?null:jsonObject.get(VECTORS_128_KEY).toString(); | 38 | String vectors_128 = jsonObject.get(VECTORS_128_KEY)==null?null:jsonObject.get(VECTORS_128_KEY).toString(); |
39 | - if (StringUtils.isBlank(vectors_32)&&StringUtils.isBlank(vectors_128)) { | ||
40 | - return new SearchApiResult().setCode(400).setMessage("vectors_32与vectors_128不能都为空"); | 39 | + if (StringUtils.isBlank(vectors_32)||StringUtils.isBlank(vectors_128)) { |
40 | + return new SearchApiResult().setCode(400).setMessage("vectors_32或vectors_128不能为空"); | ||
41 | } | 41 | } |
42 | Map<String, String> paramMap = new HashMap<>(); | 42 | Map<String, String> paramMap = new HashMap<>(); |
43 | paramMap.put(VECTORS_32_KEY, vectors_32); | 43 | paramMap.put(VECTORS_32_KEY, vectors_32); |
-
Please register or login to post a comment