Authored by TANLING

状态过滤

... ... @@ -80,11 +80,13 @@ public interface SellerOrderGoodsMapper {
int selectCntByUid(@Param("uid")int uid);
int selectCntByUidAndAttr(@Param("uid")int uid, @Param("attributes") int attributes,@Param("storageId") Integer storageId);
int selectCntByUidAndAttr(@Param("uid")int uid, @Param("attributes") int attributes,@Param("storageId") Integer storageId,
@Param("status") Integer status);
List<SellerOrderGoods> selectByUidAndAttr(@Param("uid")int uid,
@Param("attributes") int attributes,
@Param("storageId") Integer storageId,
@Param("status") Integer status,
@Param("offset")Integer offset,
@Param("limit")Integer limit);
... ...
... ... @@ -212,6 +212,9 @@
<if test="storageId != null">
and storage_id = #{storageId,jdbcType=INTEGER}
</if>
<if test="status != null">
and status = #{status,jdbcType=INTEGER}
</if>
</select>
... ... @@ -222,6 +225,9 @@
<if test="storageId != null">
and storage_id = #{storageId,jdbcType=INTEGER}
</if>
<if test="status != null">
and status = #{status,jdbcType=INTEGER}
</if>
order by id desc
limit #{offset, jdbcType=INTEGER}, #{limit, jdbcType=INTEGER}
</select>
... ...
... ... @@ -161,14 +161,15 @@ public class ErpFastDeliveryServiceImpl implements IErpFastDeliveryService {
request.setLimit(request.getLimit()<=0?10:request.getLimit());
int attr = OrderAttributes.FAST_DELIVERY.getCode();
int total = sellerOrderGoodsMapper.selectCntByUidAndAttr(request.getUid(), attr, storageId);
int total = sellerOrderGoodsMapper.selectCntByUidAndAttr(request.getUid(), attr, storageId, request.getStatus());
if (total == 0){
return null;
}
int offset = (request.getPage() - 1) * request.getLimit();
List<SellerOrderGoods> sellerOrderGoods = sellerOrderGoodsMapper.selectByUidAndAttr(request.getUid(), attr, storageId, offset, request.getLimit());
List<SellerOrderGoods> sellerOrderGoods = sellerOrderGoodsMapper.selectByUidAndAttr(request.getUid(), attr,
storageId,request.getStatus(), offset, request.getLimit());
List<OrderGoodsInfo> goodsInfoList = sellerOrderGoods.stream().map(this::covertTo).collect(Collectors.toList());
... ... @@ -524,7 +525,6 @@ public class ErpFastDeliveryServiceImpl implements IErpFastDeliveryService {
// 上架
List<ProductImportTranItemBo> responseList = Lists.newArrayList();
FastDeliverySellerAccessInfo sellerAccessInfo = fastDeliveryProxyService.getConfigBySellerUid(req.getUid());
if (sellerAccessInfo == null || sellerAccessInfo.getSendBackAddressId() == null){
throw new UfoServiceException(400,"请检查寄回地址配置!");
... ...