物流添加bugfix

This commit is contained in:
taozi
2023-04-09 00:15:22 +08:00
parent 874c3ccb47
commit 5bf58141ef
3 changed files with 16 additions and 8 deletions

View File

@ -79,13 +79,15 @@ public interface StoreAfterSalesService extends BaseService<StoreAfterSales> {
/**
* 添加快递信息
* @param code 物流公司编码
* @param name 物流公司名称
*
* @param code 物流公司编码
* @param name 物流公司名称
* @param postalCode
* @param orderCode
* @param id
* @return
*/
Boolean addLogisticsInformation(String code, String name, String postalCode ,String orderCode);
Boolean addLogisticsInformation(String code, String name, String postalCode ,String orderCode, Long id);
/**
* 删除售后订单

View File

@ -281,8 +281,11 @@ public class StoreAfterSalesServiceImpl extends BaseServiceImpl<StoreAfterSalesM
}
@Override
public Boolean addLogisticsInformation(String code, String name, String postalCode, String orderCode) {
StoreAfterSales storeAfterSales = baseMapper.selectOne(Wrappers.<StoreAfterSales>lambdaQuery().eq(StoreAfterSales::getOrderCode, orderCode));
public Boolean addLogisticsInformation(String code, String name, String postalCode, String orderCode, Long id) {
StoreAfterSales storeAfterSales = baseMapper.selectOne(Wrappers.<StoreAfterSales>lambdaQuery()
.eq(StoreAfterSales::getId, id)
.eq(StoreAfterSales::getOrderCode, orderCode)
);
if (!storeAfterSales.getState().equals(AfterSalesStatusEnum.STATUS_1.getValue())) {
throw new YshopException("当前状态不能添加物流信息!");
}