...
|
...
|
@@ -73,7 +73,7 @@ public class DepositServiceImpl implements DepositService { |
|
|
}
|
|
|
result.add(bo);
|
|
|
}
|
|
|
return null;
|
|
|
return result;
|
|
|
}
|
|
|
|
|
|
@Override
|
...
|
...
|
@@ -141,6 +141,25 @@ public class DepositServiceImpl implements DepositService { |
|
|
return result;
|
|
|
}
|
|
|
|
|
|
public DepositProductBo queryUserDepositProductCountInfo(Integer uid, Integer productId) {
|
|
|
List<StorageDepositCount> countInfoList = storageDepositMapper.queryUserDepositProduct(uid, Arrays.asList(productId));
|
|
|
if (countInfoList.isEmpty()) {
|
|
|
return null;
|
|
|
}
|
|
|
StorageDepositCount countInfo = countInfoList.get(0);
|
|
|
DepositProductBo bo = new DepositProductBo();
|
|
|
SellerOrderGoods goods = sellerOrderGoodsMapper.selectByPrimaryKey(countInfo.getSkup());
|
|
|
bo.setProductId(productId);
|
|
|
if (goods != null) {
|
|
|
bo.setProductName(goods.getProductName());
|
|
|
bo.setColorName(goods.getColorName());
|
|
|
bo.setPic(goods.getImageUrl());
|
|
|
}
|
|
|
bo.setSizeCount(countInfo.getStorageIdCount());
|
|
|
bo.setStorageCount(countInfo.getStorageCount());
|
|
|
return bo;
|
|
|
}
|
|
|
|
|
|
|
|
|
// 上架
|
|
|
@Override
|
...
|
...
|
@@ -224,14 +243,7 @@ public class DepositServiceImpl implements DepositService { |
|
|
|
|
|
private int getRemainDay(Integer endTime) {
|
|
|
int second = endTime - (int) (System.currentTimeMillis() / 1000);
|
|
|
int day = second / (24 * 3600);
|
|
|
if (second % day != 0) {
|
|
|
if (day > 0) {
|
|
|
day += 1;
|
|
|
} else {
|
|
|
day -= 1;
|
|
|
}
|
|
|
}
|
|
|
int day = (int) Math.ceil(second * 1.0 / (24 * 3600));
|
|
|
return day;
|
|
|
}
|
|
|
} |
...
|
...
|
|