|
|
@@ -303,7 +303,7 @@ public class GoodsDonController {
|
|
|
* h5 银河首页平台展示
|
|
|
*/
|
|
|
@GetMapping("/get/homePage")
|
|
|
- public Result<? extends Object> getGoodsHomePage(String customId, Boolean isFilter) {
|
|
|
+ public Result<? extends Object> getGoodsHomePage(String customId, Boolean isFilter, String dsCode) {
|
|
|
if (StrUtil.isNotBlank(customId)) {
|
|
|
Result<List<YhShopGoodsFrontView>> shopGoods = getShopGoods(yhShopFrontService.getYhsIdByCustomId(customId));
|
|
|
return shopGoods;
|
|
|
@@ -328,7 +328,11 @@ public class GoodsDonController {
|
|
|
if (list == null) {
|
|
|
list = Jsons.parseList(o, GoodsFrontListView.class);
|
|
|
}
|
|
|
-
|
|
|
+ AtomicLong dsUserId = new AtomicLong();
|
|
|
+ if (StrUtil.isNotBlank(dsCode)) {
|
|
|
+ UserSharedDto userSharedDto = userService.getUserShredDtoByDsCode(dsCode);
|
|
|
+ dsUserId.set(userSharedDto.getSharedId());
|
|
|
+ }
|
|
|
DateTime now = DateTime.now();
|
|
|
list.forEach(data -> {
|
|
|
data.setSold(getGoodsSold(data.getId(), data.getSold()));
|
|
|
@@ -336,6 +340,12 @@ public class GoodsDonController {
|
|
|
|
|
|
//设置特定价格
|
|
|
setSpecificPrice(data, fUid, null);
|
|
|
+ GoodsDonSku minPriceUserOwnsSku = goodsDonSkuMapper.checkAndReturnMinPriceUserOwnsSku(data.getId(), dsUserId.get());
|
|
|
+ if (minPriceUserOwnsSku != null) {
|
|
|
+ data.setPrice(minPriceUserOwnsSku.getPrice());
|
|
|
+ data.setMonths(minPriceUserOwnsSku.getMonths());
|
|
|
+ data.setDays(minPriceUserOwnsSku.getDays());
|
|
|
+ }
|
|
|
});
|
|
|
return GatewayResponse.SUCCESS.newBuilder().toResult(Optional.of(list));
|
|
|
}
|