Authored by qinchao

物流信息

... ... @@ -22,10 +22,9 @@ public interface ExpressRecordMapper {
* 根据uid、订单号、物流类型和快递状态查询快递信息
* @param uid
* @param orderCode
* @param states 0:未签收 1签收 2未发货
* @param expressType 物流类型; 1:卖家到鉴定中心,2:鉴定中心到买家,3:鉴定中心退回到卖家
* @return
*/
ExpressRecord selectByUidAndOrderCodeAndExpressType(@Param("uid") Integer uid, @Param("orderCode") Long orderCode, @Param("states") List<Integer> states, @Param("expressType") Integer expressType);
ExpressRecord selectByUidAndOrderCodeAndExpressType(@Param("uid") Integer uid, @Param("orderCode") Long orderCode, @Param("expressType") Integer expressType);
}
\ No newline at end of file
... ...
... ... @@ -38,7 +38,7 @@
SELECT <include refid="Base_Column_List" />
FROM express_record
where uid = #{uid} and order_code = #{orderCode} and express_type = #{expressType}
ORDER BY create_time DESC
limit 1
</select>
</mapper>
\ No newline at end of file
... ...
... ... @@ -279,6 +279,22 @@ public class ExpressInfoServiceImpl implements IExpressInfoService {
List<ExpressInfo> expressInfoList = expressInfoMapper.selectAllExpressInfo(uid, orderCode, expressType);
processExpressInfo(expressInfoList, expressInfoRespBo);
//没有物流详情,但是有物流单号信息
if(CollectionUtils.isEmpty(expressInfoList)){
ExpressRecord expressRecord = expressRecordMapper.selectByUidAndOrderCodeAndExpressType(uid,orderCode,expressType);
if(expressRecord!=null){
expressInfoRespBo.setExpressInfoDetailList(new ArrayList<>());
// 快递单号
expressInfoRespBo.setWayBillCode(expressRecord.getWaybillCode());
//物流类型
expressInfoRespBo.setExpressType(expressRecord.getExpressType());
//物流发货方
expressInfoRespBo.setExpressSender(EnumExpressSender.getSenderName(expressInfoRespBo.getExpressType().intValue()));
// 快递公司名称
expressInfoRespBo.setExpressCompanyName(expressCompanyService.getExpressName(expressRecord.getLogisticsType()));
}
}
//获取上一阶段的辅助物流信息
List<ExpressInfoDetail> supplementExpressInfoDetailList = Lists.newArrayList();
expressInfoRespBo.setSupplementExpressInfoDetailList(supplementExpressInfoDetailList);
... ...