Authored by mali

库存管理

... ... @@ -34,6 +34,11 @@
<version>${ufo.model.version}</version>
</dependency>
<dependency>
<groupId>com.yoho.ufo.model</groupId>
<artifactId>user-ufo-model</artifactId>
<version>${ufo.model.version}</version>
</dependency>
<dependency>
<groupId>com.yoho.ufo</groupId>
<artifactId>ufo-platform-dal</artifactId>
<version>${project.version}</version>
... ...
... ... @@ -26,6 +26,10 @@
<artifactId>product-ufo-model</artifactId>
</dependency>
<dependency>
<groupId>com.yoho.ufo.model</groupId>
<artifactId>user-ufo-model</artifactId>
</dependency>
<dependency>
<groupId>com.yoho.ufo</groupId>
<artifactId>ufo-platform-dal</artifactId>
</dependency>
... ...
... ... @@ -91,6 +91,7 @@ public class ProductAssistService {
respBo.setBrandId(item.getBrandId());
respBo.setMaxSortId(item.getMaxSortId());
respBo.setMaxSortId(item.getMidSortId());
respBo.setProductName(item.getProductName());
}
});
return this;
... ...
... ... @@ -10,6 +10,7 @@ import java.util.Map;
import com.yoho.core.dal.datasource.annotation.Database;
import com.yoho.ufo.event.model.StorageNumEvent;
import com.yohobuy.ufo.model.enums.InboxBusinessTypeEnum;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
... ... @@ -506,8 +507,15 @@ public static void main(String[] args) {
}
// TODO 发推送给商家端
LOGGER.info("send info to seller, product_name is {}", bo.getProductName());
InboxBusinessTypeEnum.SALE_NOTIFIED_UNSHELF.getType();
InboxBusinessTypeEnum.SALE_NOTIFIED_UNSHELF.getBusinessType();
bo.getProductName();
// TODO 调用银联接口退保证金
LOGGER.info("send refund info to payment, seller_uid is {}, skup is {}", sp.getSellerUid(), sp.getSkup());
return new ApiResponse<>(200, "操作成功");
}
... ...
... ... @@ -26,9 +26,10 @@ public class StoragePriceService {
@Autowired
private ProductConvertService productConvertService;
// 如果不需要查询skup表则,返回null。如果需要查询,但查询是空的话则返回空列表
public List<Integer> selectProductIdBySkupInfo(Product product) {
if (null == product || (null == product.getStorageId() && null == product.getSkup() && null == product.getSellerUid())) {
return Lists.newArrayList();
return null;
}
StoragePrice storagePrice = productConvertService.convertProduct2Skup(product);
... ...
... ... @@ -51,7 +51,13 @@ public class StorageService {
Product product = OrikaUtils.map(bo, Product.class);
// 如果查询条件含storage_price,先根据条件查询出productId列表 ,再到product表中联合查询
product.setProductIdList(storagePriceService.selectProductIdBySkupInfo(product));
List<Integer> integerList = storagePriceService.selectProductIdBySkupInfo(product);
if (null != integerList && integerList.isEmpty()) {
LOGGER.warn("storagePriceService.selectProductIdBySkupInfo count is 0.param = {}", bo);
return new PageResponseBO<>();
}
product.setProductIdList(integerList);
int count = productMapper.selectProductStorageCount(product);
if (count == 0) {
... ...
... ... @@ -164,7 +164,7 @@
align: "center",
formatter: function (value, rowData) {
if (rowData.status == 1) {
return "<a role='edit' dataId='" + rowData.skup + "' style='margin-left:10px'>取消售卖</a>";
return "<a role='edit' dataId='" + rowData.skup + "' product_name='" + rowData.productName + "' style='margin-left:10px'>取消售卖</a>";
} else {
return '';
}
... ... @@ -182,7 +182,7 @@
iconCls: "icon-edit",
onClick: function () {
var id = $(this).attr("dataId");
editRow(id);
editRow(id, $(this).attr("product_name"));
}
});
}
... ... @@ -243,7 +243,7 @@
}
function editRow(id) {
function editRow(id, productName) {
var skup = id;
var div = $("<div>").appendTo($(document.body));
var message = "确定要取消售卖此件商品吗?商品取消售卖后,卖家的该件商品强制下架,退还卖家保证金";
... ... @@ -255,7 +255,7 @@
interval: 500,
text: ""
});
$.post(contextPath + "/product/cancelSaleSkup",{"skup":skup}, function (data) {
$.post(contextPath + "/product/cancelSaleSkup",{"skup":skup, "productName" : productName}, function (data) {
window.top.$.messager.progress("close");
if (data.code == 200) {
$("#skupTable").myDatagrid("reload");
... ...