|  |  | 
 |  |  | package com.xzx.gc.order.mapper; | 
 |  |  |  | 
 |  |  | import com.xzx.gc.entity.JhyInfo; | 
 |  |  | import com.xzx.gc.entity.JhyOrder; | 
 |  |  | import com.xzx.gc.order.dto.JhyOrderListDto; | 
 |  |  | import com.xzx.gc.order.vo.JhyOrderListVo; | 
 |  |  | 
 |  |  |     List<JhyOrderListVo> selectJhyOrderList(@Param("record") JhyOrderListDto jhyOrderListDto); | 
 |  |  |  | 
 |  |  |     List<JhyStatusCountVo> selectOrderStatusCount(@Param("type") Integer type, @Param("userId") String userId); | 
 |  |  |  | 
 |  |  |     List<JhyOrder> selectJhyOrderListByStatus(@Param("list") List<String> list, @Param("userId") String userId); | 
 |  |  | } | 
 
 |  |  | 
 |  |  |                 address.append(StrUtil.isNotBlank(addressInfo.getUnitName()) ? addressInfo.getUnitName() : ""); | 
 |  |  |             } | 
 |  |  |         } | 
 |  |  |  | 
 |  |  |         List<JhyOrder> addressExist = jhyOrderMapper.selectJhyOrderListByStatus(StrUtil.split("1,2", ','), jhyOrder.getUserId()); | 
 |  |  |         if (CollUtil.isNotEmpty(addressExist)) { | 
 |  |  |             for (JhyOrder order : addressExist) { | 
 |  |  |                 String orderAddr = order.getArea() + order.getAddress(); | 
 |  |  |  | 
 |  |  |                 if (orderAddr.equals(address.toString())) { | 
 |  |  |                     throw new RestException(-3, "同一地址仅能有一单在进行中"); | 
 |  |  |                 } | 
 |  |  |             } | 
 |  |  |         } | 
 |  |  |  | 
 |  |  |         jhyOrder.setAddress(address.toString()); | 
 |  |  |  | 
 |  |  |         jhyOrder.setUsername(addressInfo.getRelaName()); | 
 
 |  |  | 
 |  |  |         </where> | 
 |  |  |         group by status | 
 |  |  |     </select> | 
 |  |  |  | 
 |  |  |     <select id="selectJhyOrderListByStatus" resultType="com.xzx.gc.entity.JhyOrder"> | 
 |  |  |         select * from xzx_jhy_order | 
 |  |  |         where user_id=#{userId} and status in | 
 |  |  |         <foreach collection="list" index="index" item="id" open="(" separator="," close=")"> | 
 |  |  |             #{id} | 
 |  |  |         </foreach> | 
 |  |  |     </select> | 
 |  |  | </mapper> |