| <?xml version="1.0" encoding="UTF-8"?>  | 
| <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">  | 
| <mapper namespace="com.xzx.gc.user.mapper.OrderStorageInfoMapper">  | 
|   | 
|     <select id="orderListByStorageUserId" resultType="java.lang.String">  | 
|         select order_id from xzx_order_storage_info where storage_user_id=#{storageUserId}  | 
|     </select>  | 
|   | 
|     <select id="totalWeightAndMoney" resultType="java.util.Map">  | 
|         select IFNULL(sum(a.storage_weight),0) as storageWeight ,  | 
|         IFNULL(sum(a.storage_money),0) as storageMoney,  | 
|         IFNULL(sum(a.recycle_weight),0) as recycleWeight,  | 
|         IFNULL(sum(a.recycle_money),0) as recycleMoney  | 
|         from xzx_order_storage_info a  | 
|         left join xzx_user_other_info b on a.receiver=b.user_id  | 
|         where b.user_type=2  | 
|         <if test="userId != null and userId != ''">  | 
|             AND a.receiver=#{userId}  | 
|         </if>  | 
|         <if test=" partnerIds != null and partnerIds.size() != 0">  | 
|             AND b.partner_id in  | 
|             <foreach collection="partnerIds" index="index" item="id" open="(" separator="," close=")">  | 
|                 #{id}  | 
|             </foreach>  | 
|         </if>  | 
|     </select>  | 
|   | 
| </mapper> |