소스 검색

Merge branch 'sit' into release_lutong_bug

lutong 1 개월 전
부모
커밋
77e3041443

+ 4 - 0
alien-entity/src/main/java/shop/alien/entity/store/StoreBanner.java

@@ -68,5 +68,9 @@ public class StoreBanner extends Model<StoreBanner> {
     @ApiModelProperty(value = "修改人ID")
     @TableField("updated_user_id")
     private Integer updatedUserId;
+
+    @ApiModelProperty(value = "店铺ID")
+    @TableField("store_id")
+    private Integer storeId;
 }
 

+ 3 - 0
alien-entity/src/main/java/shop/alien/entity/store/dto/StoreBannerDto.java

@@ -33,5 +33,8 @@ public class StoreBannerDto implements Serializable {
 
     @ApiModelProperty(value = "图片URL,多个可用逗号分隔或前端自定义格式")
     private String imgUrls;
+
+    @ApiModelProperty(value = "店铺ID")
+    private Integer storeId;
 }
 

+ 3 - 3
alien-store/src/main/java/shop/alien/store/controller/AiSearchController.java

@@ -145,10 +145,10 @@ public class AiSearchController {
         HttpEntity<Map<String, Object>> request = new HttpEntity<>(requestBody, null);
         try {
             DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss.SSS").withZone(ZoneId.systemDefault());
-            log.info("调用AI模糊搜索接口 请求参数------{} 时间: {}", requestBody, formatter.format(Instant.now()));
+            log.info("调用AI模糊搜索接口 请求参数------{} AI开始时间: {}", requestBody, formatter.format(Instant.now()));
             ResponseEntity<String> stringResponseEntity = restTemplate.postForEntity(aiSearchFuzzyUrl, request, String.class);
             String body = stringResponseEntity.getBody();
-            log.info("调用AI列表接口 处理前v 接口返回------{}  时间: {}", body, formatter.format(Instant.now()));
+            log.info("调用AI列表接口 处理前v 接口返回------{}  AI结束时间: {}", body, formatter.format(Instant.now()));
             JSONObject jsonObject = JSONObject.parseObject(body);
             JSONObject jsonObject1 = new JSONObject();
             // 模糊搜索:从related_results和matched_results字段获取数据
@@ -165,7 +165,7 @@ public class AiSearchController {
 
             jsonObject1.put("total", jsonObject.get("total"));
             jsonObject1.put("size", map.get("pageSize"));
-            log.info("调用AI模糊搜索接口 接口返回------{}", body);
+            log.info("调用AI模糊搜索接口 接口返回------{}  最终时间: {}", body, formatter.format(Instant.now()));
             return R.data(jsonObject1);
         } catch (Exception e) {
             log.error("调用AI模糊搜索接口 接口异常------", e);

+ 4 - 4
alien-store/src/main/java/shop/alien/store/service/impl/StoreBannerServiceImpl.java

@@ -50,10 +50,10 @@ public class StoreBannerServiceImpl extends ServiceImpl<StoreBannerMapper, Store
             queryWrapper.ne(StoreBanner::getId, storeBannerDto.getId());
         }
 
-        long count = this.count(queryWrapper);
-        if (count > 0) {
-            return R.fail("该模块名称已存在,不能重复添加或修改");
-        }
+//        long count = this.count(queryWrapper);
+//        if (count > 0) {
+//            return R.fail("该模块名称已存在,不能重复添加或修改");
+//        }
 
         StoreBanner storeBanner = new StoreBanner();
         BeanUtils.copyProperties(storeBannerDto, storeBanner);