1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161
| <foreach collection="ids" item="item" open="(" separator="," close=")"> #{item} </foreach>
<if test="enterpriseName != null and enterpriseName != ''"> enterprise_name like concat('%',#{enterpriseName},'%') and </if> <if test="rectInfo != null"> where longitude <![CDATA[ <= ]]> #{rectInfo.maxLon} and longitude > #{rectInfo.minLon} and latitude <![CDATA[ <= ]]> #{rectInfo.maxLat} and latitude > #{rectInfo.minLat} </if>
<resultMap id="queryByEnterpriseIdMap" type="xx.xx.xx.domain.entity.enterpriseFill.EnterpriseFillInfo"> <id column="id" javaType="java.lang.Long" property="id"></id> <result column="enterprise_id" javaType="java.lang.Long" property="enterpriseId"></result> <result column="open_id" javaType="java.lang.String" property="openId"></result> <result column="lampblack_handle" javaType="java.lang.String" property="lampblackHandle"></result> <result column="create_date" javaType="java.util.Date" property="createDate"></result> <result column="update_date" javaType="java.util.Date" property="updateDate"></result> <association column="{fillId=id}" property="washInfoCount" select="queryWashInfoCountByFillId"></association> <association column="{fillId=id}" property="monitorInfoCount" select="queryMonitorInfoCountByFillId"></association> </resultMap>
<resultMap id="queryWashInfoMap" type="xx.xx.xx.domain.vo.EnterpriseFill.EnterpriseEquipmentWashInfoWrapper"> <id column="id" property="enterpriseEquipmentWashInfo.id"></id> <result column="fill_id" property="enterpriseEquipmentWashInfo.fillId"></result> <result column="year_num" property="enterpriseEquipmentWashInfo.yearNum"></result> <result column="month_num" property="enterpriseEquipmentWashInfo.monthNum"></result> <result column="create_date" javaType="java.util.Date" property="enterpriseEquipmentWashInfo.createDate"></result> <result column="update_date" javaType="java.util.Date" property="enterpriseEquipmentWashInfo.updateDate"></result> <collection property="fileInfos" column="{sourceId=id,sourceType=source_type}" javaType="ArrayList" ofType="xx.xx.xx.domain.entity.file.FileInfo" select="xx.xx.xx.mapper.UploadFileMapper.queryBySourceId"> </collection> </resultMap>
<resultMap id="systemInfoMap" type="xx.xx.filesystem.domain.entity.system.SystemInfo"> <id column="id" javaType="java.lang.Long" property="id"></id> <result column="name" property="name"></result> <collection property="serverInfos" column="{systemId=id}" javaType="ArrayList" ofType="xx.xx.filesystem.domain.entity.system.ServerInfo" select="queryServerInfosBySystemId"> </collection> </resultMap>
<resultMap id="serverInfoMap" type="xx.xx.filesystem.domain.entity.system.ServerInfo"> <id column="id" javaType="java.lang.Long" property="id"></id> <result column="system_id" property="systemId"></result> <result column="server_name" property="serverName"></result> <result column="server_ip" property="serverIp"></result> <collection property="userInfos" column="{serverId=id}" javaType="ArrayList" ofType="xx.xx.filesystem.domain.entity.system.UserInfo" select="queryUserInfosByServerId"> </collection> </resultMap> <select id="queryAllSystemInfos" resultMap="systemInfoMap"> select * from file_system_name </select>
<select id="queryServerInfosBySystemId" resultMap="serverInfoMap"> select id,system_id,server_name,server_ip from file_system_server where system_id = #{systemId} </select>
<select id="queryUserInfosByServerId" resultType="xx.xx.filesystem.domain.entity.system.UserInfo"> select id,server_id,user_account,user_password,user_name from file_system_user where server_id = #{serverId} </select>
<select>
case colume when condition then result when condition then result when condition then result else result end
case when condition then result when condition then result when condition then result else result end
case when condition then result when condition then result when condition then result else result end new_column_name </seelct>
<select>
select GROUP_CONCAT(id) from ( SELECT id FROM wc_enterprise_info LIMIT 10 ) as t select GROUP_CONCAT(id ORDER BY id desc) from ( SELECT id FROM wc_enterprise_info LIMIT 10 ) as t
select GROUP_CONCAT(id SEPARATOR '-') from ( SELECT id FROM wc_enterprise_info LIMIT 10 ) as t
enterprise_name like concat('%',#{enterpriseName},'%') and
select concat_ws('#','courseName=','NX',null) AS nx_courseName;
<select>
<select> SELECT id FROM t3 WHERE (n1, n2) IN ( SELECT n1, n2 FROM t3 WHERE id <= 2 )
SELECT id FROM t3 WHERE (n1, n2) IN ((1, 'a'),(2, 'b')) </select>
|