forked from zsy0216/guli-mall
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
42 changed files
with
1,577 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
mall-common/src/main/java/com/zsy/common/to/SkuHasStockVo.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
package com.zsy.common.to; | ||
|
||
import lombok.Data; | ||
|
||
/** | ||
* @author: zhangshuaiyin | ||
* @date: 2021/3/13 10:21 | ||
*/ | ||
@Data | ||
public class SkuHasStockVo { | ||
|
||
private Long skuId; | ||
|
||
private Boolean hasStock; | ||
|
||
} |
60 changes: 60 additions & 0 deletions
60
mall-common/src/main/java/com/zsy/common/to/es/SkuEsModel.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
package com.zsy.common.to.es; | ||
|
||
import lombok.Data; | ||
|
||
import java.math.BigDecimal; | ||
import java.util.List; | ||
|
||
/** | ||
* 传输对象,存储到es的数据 | ||
* | ||
* @author: zhangshuaiyin | ||
* @date: 2021/3/12 15:37 | ||
*/ | ||
@Data | ||
public class SkuEsModel { | ||
|
||
private Long skuId; | ||
|
||
private Long spuId; | ||
|
||
private String skuTitle; | ||
|
||
private BigDecimal skuPrice; | ||
|
||
private String skuImg; | ||
|
||
private Long saleCount; | ||
|
||
/** | ||
* 是否有库存 | ||
*/ | ||
private Boolean hasStock; | ||
|
||
/** | ||
* 热度 | ||
*/ | ||
private Long hotScore; | ||
|
||
private Long brandId; | ||
|
||
private Long catalogId; | ||
|
||
private String brandName; | ||
|
||
private String brandImg; | ||
|
||
private String catalogName; | ||
|
||
private List<Attrs> attrs; | ||
|
||
@Data | ||
public static class Attrs { | ||
|
||
private Long attrId; | ||
|
||
private String attrName; | ||
|
||
private String attrValue; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
mall-product/src/main/java/com/zsy/product/feign/SearchFeignService.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package com.zsy.product.feign; | ||
|
||
|
||
import com.zsy.common.to.es.SkuEsModel; | ||
import com.zsy.common.utils.R; | ||
import org.springframework.cloud.openfeign.FeignClient; | ||
import org.springframework.web.bind.annotation.PostMapping; | ||
import org.springframework.web.bind.annotation.RequestBody; | ||
|
||
import java.util.List; | ||
|
||
/** | ||
* @author: zhangshuaiyin | ||
* @date: 2021/3/13 10:11 | ||
*/ | ||
@FeignClient("mall-search") | ||
public interface SearchFeignService { | ||
|
||
@PostMapping(value = "/search/save/product") | ||
R productStatusUp(@RequestBody List<SkuEsModel> skuEsModels); | ||
|
||
} |
20 changes: 20 additions & 0 deletions
20
mall-product/src/main/java/com/zsy/product/feign/WareFeignService.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package com.zsy.product.feign; | ||
|
||
import com.zsy.common.utils.R; | ||
import org.springframework.cloud.openfeign.FeignClient; | ||
import org.springframework.web.bind.annotation.PostMapping; | ||
import org.springframework.web.bind.annotation.RequestBody; | ||
|
||
import java.util.List; | ||
|
||
/** | ||
* @author: zhangshuaiyin | ||
* @date: 2021/3/13 10:11 | ||
*/ | ||
@FeignClient("mall-ware") | ||
public interface WareFeignService { | ||
|
||
@PostMapping(value = "/ware/waresku/hasStock") | ||
R getSkuHasStock(@RequestBody List<Long> skuIds); | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.