Authored by TANLING

状态过滤

@@ -80,11 +80,13 @@ public interface SellerOrderGoodsMapper { @@ -80,11 +80,13 @@ public interface SellerOrderGoodsMapper {
80 int selectCntByUid(@Param("uid")int uid); 80 int selectCntByUid(@Param("uid")int uid);
81 81
82 82
83 - int selectCntByUidAndAttr(@Param("uid")int uid, @Param("attributes") int attributes,@Param("storageId") Integer storageId); 83 + int selectCntByUidAndAttr(@Param("uid")int uid, @Param("attributes") int attributes,@Param("storageId") Integer storageId,
  84 + @Param("status") Integer status);
84 85
85 List<SellerOrderGoods> selectByUidAndAttr(@Param("uid")int uid, 86 List<SellerOrderGoods> selectByUidAndAttr(@Param("uid")int uid,
86 @Param("attributes") int attributes, 87 @Param("attributes") int attributes,
87 @Param("storageId") Integer storageId, 88 @Param("storageId") Integer storageId,
  89 + @Param("status") Integer status,
88 @Param("offset")Integer offset, 90 @Param("offset")Integer offset,
89 @Param("limit")Integer limit); 91 @Param("limit")Integer limit);
90 92
@@ -212,6 +212,9 @@ @@ -212,6 +212,9 @@
212 <if test="storageId != null"> 212 <if test="storageId != null">
213 and storage_id = #{storageId,jdbcType=INTEGER} 213 and storage_id = #{storageId,jdbcType=INTEGER}
214 </if> 214 </if>
  215 + <if test="status != null">
  216 + and status = #{status,jdbcType=INTEGER}
  217 + </if>
215 218
216 </select> 219 </select>
217 220
@@ -222,6 +225,9 @@ @@ -222,6 +225,9 @@
222 <if test="storageId != null"> 225 <if test="storageId != null">
223 and storage_id = #{storageId,jdbcType=INTEGER} 226 and storage_id = #{storageId,jdbcType=INTEGER}
224 </if> 227 </if>
  228 + <if test="status != null">
  229 + and status = #{status,jdbcType=INTEGER}
  230 + </if>
225 order by id desc 231 order by id desc
226 limit #{offset, jdbcType=INTEGER}, #{limit, jdbcType=INTEGER} 232 limit #{offset, jdbcType=INTEGER}, #{limit, jdbcType=INTEGER}
227 </select> 233 </select>
@@ -161,14 +161,15 @@ public class ErpFastDeliveryServiceImpl implements IErpFastDeliveryService { @@ -161,14 +161,15 @@ public class ErpFastDeliveryServiceImpl implements IErpFastDeliveryService {
161 request.setLimit(request.getLimit()<=0?10:request.getLimit()); 161 request.setLimit(request.getLimit()<=0?10:request.getLimit());
162 162
163 int attr = OrderAttributes.FAST_DELIVERY.getCode(); 163 int attr = OrderAttributes.FAST_DELIVERY.getCode();
164 - int total = sellerOrderGoodsMapper.selectCntByUidAndAttr(request.getUid(), attr, storageId); 164 + int total = sellerOrderGoodsMapper.selectCntByUidAndAttr(request.getUid(), attr, storageId, request.getStatus());
165 165
166 if (total == 0){ 166 if (total == 0){
167 return null; 167 return null;
168 } 168 }
169 169
170 int offset = (request.getPage() - 1) * request.getLimit(); 170 int offset = (request.getPage() - 1) * request.getLimit();
171 - List<SellerOrderGoods> sellerOrderGoods = sellerOrderGoodsMapper.selectByUidAndAttr(request.getUid(), attr, storageId, offset, request.getLimit()); 171 + List<SellerOrderGoods> sellerOrderGoods = sellerOrderGoodsMapper.selectByUidAndAttr(request.getUid(), attr,
  172 + storageId,request.getStatus(), offset, request.getLimit());
172 173
173 List<OrderGoodsInfo> goodsInfoList = sellerOrderGoods.stream().map(this::covertTo).collect(Collectors.toList()); 174 List<OrderGoodsInfo> goodsInfoList = sellerOrderGoods.stream().map(this::covertTo).collect(Collectors.toList());
174 175
@@ -524,7 +525,6 @@ public class ErpFastDeliveryServiceImpl implements IErpFastDeliveryService { @@ -524,7 +525,6 @@ public class ErpFastDeliveryServiceImpl implements IErpFastDeliveryService {
524 525
525 // 上架 526 // 上架
526 List<ProductImportTranItemBo> responseList = Lists.newArrayList(); 527 List<ProductImportTranItemBo> responseList = Lists.newArrayList();
527 -  
528 FastDeliverySellerAccessInfo sellerAccessInfo = fastDeliveryProxyService.getConfigBySellerUid(req.getUid()); 528 FastDeliverySellerAccessInfo sellerAccessInfo = fastDeliveryProxyService.getConfigBySellerUid(req.getUid());
529 if (sellerAccessInfo == null || sellerAccessInfo.getSendBackAddressId() == null){ 529 if (sellerAccessInfo == null || sellerAccessInfo.getSendBackAddressId() == null){
530 throw new UfoServiceException(400,"请检查寄回地址配置!"); 530 throw new UfoServiceException(400,"请检查寄回地址配置!");