对比新文件 |
| | |
| | | <?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.gk.firework.Mapper.StaticStockMapper" > |
| | | <resultMap id="BaseResultMap" type="com.gk.firework.Domain.StaticStock" > |
| | | <!-- --> |
| | | <id column="id" property="id" jdbcType="BIGINT" /> |
| | | <result column="owner" property="owner" jdbcType="BIGINT" /> |
| | | <result column="enterpriseName" property="enterpriseName" jdbcType="VARCHAR" /> |
| | | <result column="enterpriseNumber" property="enterpriseNumber" jdbcType="VARCHAR" /> |
| | | <result column="safetySuperVision" property="safetySuperVision" jdbcType="VARCHAR" /> |
| | | <result column="province" property="province" jdbcType="VARCHAR" /> |
| | | <result column="city" property="city" jdbcType="VARCHAR" /> |
| | | <result column="district" property="district" jdbcType="VARCHAR" /> |
| | | <result column="stockNum" property="stockNum" jdbcType="DECIMAL" /> |
| | | <result column="firecracker" property="firecracker" jdbcType="DECIMAL" /> |
| | | <result column="spray" property="spray" jdbcType="DECIMAL" /> |
| | | <result column="rotation" property="rotation" jdbcType="DECIMAL" /> |
| | | <result column="bead" property="bead" jdbcType="DECIMAL" /> |
| | | <result column="toy" property="toy" jdbcType="DECIMAL" /> |
| | | <result column="combined" property="combined" jdbcType="DECIMAL" /> |
| | | <result column="updatedby" property="updatedby" jdbcType="VARCHAR" /> |
| | | <result column="updateat" property="updateat" jdbcType="TIMESTAMP" /> |
| | | <result column="flag" property="flag" jdbcType="TINYINT" /> |
| | | </resultMap> |
| | | <sql id="Base_Column_List" > |
| | | <!-- --> |
| | | id, owner, enterpriseName, enterpriseNumber, safetySuperVision, province, city, district, |
| | | stockNum, firecracker, spray, rotation, bead, toy, combined, updatedby, updateat, |
| | | flag |
| | | </sql> |
| | | |
| | | <select id="selectEnterpriseStocks" resultType="com.gk.firework.Domain.StaticStock"> |
| | | select |
| | | <include refid="Base_Column_List"/> |
| | | from staticstock |
| | | <where> |
| | | 1=1 |
| | | <if test="condition.name != null and condition.name != ''"> |
| | | and enterprisename like CONCAT('%',#{condition.name},'%') |
| | | </if> |
| | | <if test="condition.operator != null and condition.operator != ''"> |
| | | and (enterprisenumber =#{condition.operator} |
| | | <if test="condition.subList != null and condition.subList.size() > 0"> |
| | | <foreach collection="condition.subList" item="item" index="index" > |
| | | or enterprisenumber = #{item} |
| | | </foreach> |
| | | </if> |
| | | ) |
| | | </if> |
| | | <if test="condition.type != null and condition.type != ''"> |
| | | and safetysupervision = #{condition.type} |
| | | </if> |
| | | <if test="condition.province != null and condition.province != ''"> |
| | | and province = #{condition.province} |
| | | </if> |
| | | <if test="condition.city != null and condition.city != ''"> |
| | | and city = #{condition.city} |
| | | </if> |
| | | <if test="condition.district != null and condition.district != ''"> |
| | | and district = #{condition.district} |
| | | </if> |
| | | </where> |
| | | </select> |
| | | |
| | | </mapper> |