@Service public class UserPlatformServiceImpl implements UserPlatformService{ @Override public int selectmeteridandimeiNumber(String producemeteridorimei) { //去掉字符串首尾空格 producemeteridorimei = producemeteridorimei.trim(); int total = userPlatMapper.selectmeteridandimeiNumber(producemeteridorimei); return total; }
<select id="selectmeteridandimeiNumber" resultType="int"> select count(*) from t_productmsg where imei =#{producemeteridorimei} or meterid=#{producemeteridorimei} </select>
<select id="selectmeteridandimei" resultType="T_productmsg"> select * from t_productmsg where imei =#{producemeteridorimei} or meterid=#{producemeteridorimei} LIMIT #{page}, #{rows} </select>
// <select id="selectproduceListByNumber" resultType="int"> select count(*) from t_productmsg where 1=1 <if test="producetongxuntypeselect != '' and producetongxuntypeselect != '全部'"> and comunicateMode = #{producetongxuntypeselect} </if> <if test="producetypeselect != '' and producetypeselect != '全部'"> and productType like '%${producetypeselect}%' </if> <if test="produceordernumber != ''"> and code = #{produceordernumber} </if> <if test="produceusername != ''"> and customerName like '%${produceusername}%' </if> <if test="producemeter != '' and producemeter != '全部'"> and meterSize like '%${producemeter}%' </if> </select>
<select id="selectproduceListBy" resultType="T_productmsg"> select * from t_productmsg where 1=1 <if test="producetongxuntypeselect != '' and producetongxuntypeselect != '全部'"> and comunicateMode = #{producetongxuntypeselect} </if> <if test="producetypeselect != '' and producetypeselect != '全部'"> and productType like '%${producetypeselect}%' </if> <if test="produceordernumber != ''"> and code = #{produceordernumber} </if> <if test="produceusername != ''"> and customerName like '%${produceusername}%' </if> <if test="producemeter != '' and producemeter != '全部'"> and meterSize like '%${producemeter}%' </if> LIMIT #{page}, #{rows} </select>