| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431 |
- <?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.goafanti.common.dao.ProjectSizeMapper">
- <resultMap id="BaseResultMap" type="com.goafanti.common.model.ProjectSize">
- <!--
- WARNING - @mbg.generated
- This element is automatically generated by MyBatis Generator, do not modify.
- This element was generated on Mon Dec 04 15:29:25 CST 2017.
- -->
- <id column="id" jdbcType="VARCHAR" property="id" />
- <result column="create_id" jdbcType="VARCHAR" property="createId" />
- <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
- <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
- <result column="pid" jdbcType="VARCHAR" property="pid" />
- <result column="pname" jdbcType="VARCHAR" property="pname" />
- <result column="price" jdbcType="DECIMAL" property="price" />
- <result column="offset" jdbcType="DECIMAL" property="offset" />
- <result column="activity_price" jdbcType="DECIMAL" property="activityPrice" />
- <result column="activity_flag" jdbcType="VARCHAR" property="activityFlag" />
- <result column="member_price" jdbcType="DECIMAL" property="memberPrice" />
- <result column="status" jdbcType="INTEGER" property="status" />
- </resultMap>
- <sql id="Example_Where_Clause">
- <!--
- WARNING - @mbg.generated
- This element is automatically generated by MyBatis Generator, do not modify.
- This element was generated on Mon Dec 04 15:29:25 CST 2017.
- -->
- <where>
- <foreach collection="oredCriteria" item="criteria" separator="or">
- <if test="criteria.valid">
- <trim prefix="(" prefixOverrides="and" suffix=")">
- <foreach collection="criteria.criteria" item="criterion">
- <choose>
- <when test="criterion.noValue">
- and ${criterion.condition}
- </when>
- <when test="criterion.singleValue">
- and ${criterion.condition} #{criterion.value}
- </when>
- <when test="criterion.betweenValue">
- and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
- </when>
- <when test="criterion.listValue">
- and ${criterion.condition}
- <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
- #{listItem}
- </foreach>
- </when>
- </choose>
- </foreach>
- </trim>
- </if>
- </foreach>
- </where>
- </sql>
- <sql id="Update_By_Example_Where_Clause">
- <!--
- WARNING - @mbg.generated
- This element is automatically generated by MyBatis Generator, do not modify.
- This element was generated on Mon Dec 04 15:29:25 CST 2017.
- -->
- <where>
- <foreach collection="example.oredCriteria" item="criteria" separator="or">
- <if test="criteria.valid">
- <trim prefix="(" prefixOverrides="and" suffix=")">
- <foreach collection="criteria.criteria" item="criterion">
- <choose>
- <when test="criterion.noValue">
- and ${criterion.condition}
- </when>
- <when test="criterion.singleValue">
- and ${criterion.condition} #{criterion.value}
- </when>
- <when test="criterion.betweenValue">
- and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
- </when>
- <when test="criterion.listValue">
- and ${criterion.condition}
- <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
- #{listItem}
- </foreach>
- </when>
- </choose>
- </foreach>
- </trim>
- </if>
- </foreach>
- </where>
- </sql>
- <sql id="Base_Column_List">
- <!--
- WARNING - @mbg.generated
- This element is automatically generated by MyBatis Generator, do not modify.
- This element was generated on Mon Dec 04 15:29:25 CST 2017.
- -->
- id, create_id, create_time, update_time, pid, pname, price, offset, activity_price,
- activity_flag, member_price, status
- </sql>
- <select id="selectByExample" parameterType="com.goafanti.common.model.ProjectSizeExample" resultMap="BaseResultMap">
- <!--
- WARNING - @mbg.generated
- This element is automatically generated by MyBatis Generator, do not modify.
- This element was generated on Mon Dec 04 15:29:25 CST 2017.
- -->
- select
- <if test="distinct">
- distinct
- </if>
- <include refid="Base_Column_List" />
- from project_size
- <if test="_parameter != null">
- <include refid="Example_Where_Clause" />
- </if>
- <if test="orderByClause != null">
- order by ${orderByClause}
- </if>
- </select>
- <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
- <!--
- WARNING - @mbg.generated
- This element is automatically generated by MyBatis Generator, do not modify.
- This element was generated on Mon Dec 04 15:29:25 CST 2017.
- -->
- select
- <include refid="Base_Column_List" />
- from project_size
- where id = #{id,jdbcType=VARCHAR}
- </select>
- <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
- <!--
- WARNING - @mbg.generated
- This element is automatically generated by MyBatis Generator, do not modify.
- This element was generated on Mon Dec 04 15:29:25 CST 2017.
- -->
- delete from project_size
- where id = #{id,jdbcType=VARCHAR}
- </delete>
- <delete id="deleteByExample" parameterType="com.goafanti.common.model.ProjectSizeExample">
- <!--
- WARNING - @mbg.generated
- This element is automatically generated by MyBatis Generator, do not modify.
- This element was generated on Mon Dec 04 15:29:25 CST 2017.
- -->
- delete from project_size
- <if test="_parameter != null">
- <include refid="Example_Where_Clause" />
- </if>
- </delete>
- <insert id="insert" parameterType="com.goafanti.common.model.ProjectSize">
- <!--
- WARNING - @mbg.generated
- This element is automatically generated by MyBatis Generator, do not modify.
- This element was generated on Mon Dec 04 15:29:25 CST 2017.
- -->
- insert into project_size (id, create_id, create_time,
- update_time, pid, pname,
- price, offset, activity_price,
- activity_flag, member_price, status
- )
- values (#{id,jdbcType=VARCHAR}, #{createId,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP},
- #{updateTime,jdbcType=TIMESTAMP}, #{pid,jdbcType=VARCHAR}, #{pname,jdbcType=VARCHAR},
- #{price,jdbcType=DECIMAL}, #{offset,jdbcType=DECIMAL}, #{activityPrice,jdbcType=DECIMAL},
- #{activityFlag,jdbcType=VARCHAR}, #{memberPrice,jdbcType=DECIMAL}, #{status,jdbcType=INTEGER}
- )
- </insert>
- <insert id="insertSelective" parameterType="com.goafanti.common.model.ProjectSize">
- <!--
- WARNING - @mbg.generated
- This element is automatically generated by MyBatis Generator, do not modify.
- This element was generated on Mon Dec 04 15:29:25 CST 2017.
- -->
- insert into project_size
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <if test="id != null">
- id,
- </if>
- <if test="createId != null">
- create_id,
- </if>
- <if test="createTime != null">
- create_time,
- </if>
- <if test="updateTime != null">
- update_time,
- </if>
- <if test="pid != null">
- pid,
- </if>
- <if test="pname != null">
- pname,
- </if>
- <if test="price != null">
- price,
- </if>
- <if test="offset != null">
- offset,
- </if>
- <if test="activityPrice != null">
- activity_price,
- </if>
- <if test="activityFlag != null">
- activity_flag,
- </if>
- <if test="memberPrice != null">
- member_price,
- </if>
- <if test="status != null">
- status,
- </if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides=",">
- <if test="id != null">
- #{id,jdbcType=VARCHAR},
- </if>
- <if test="createId != null">
- #{createId,jdbcType=VARCHAR},
- </if>
- <if test="createTime != null">
- #{createTime,jdbcType=TIMESTAMP},
- </if>
- <if test="updateTime != null">
- #{updateTime,jdbcType=TIMESTAMP},
- </if>
- <if test="pid != null">
- #{pid,jdbcType=VARCHAR},
- </if>
- <if test="pname != null">
- #{pname,jdbcType=VARCHAR},
- </if>
- <if test="price != null">
- #{price,jdbcType=DECIMAL},
- </if>
- <if test="offset != null">
- #{offset,jdbcType=DECIMAL},
- </if>
- <if test="activityPrice != null">
- #{activityPrice,jdbcType=DECIMAL},
- </if>
- <if test="activityFlag != null">
- #{activityFlag,jdbcType=VARCHAR},
- </if>
- <if test="memberPrice != null">
- #{memberPrice,jdbcType=DECIMAL},
- </if>
- <if test="status != null">
- #{status,jdbcType=INTEGER},
- </if>
- </trim>
- </insert>
- <select id="countByExample" parameterType="com.goafanti.common.model.ProjectSizeExample" resultType="java.lang.Long">
- <!--
- WARNING - @mbg.generated
- This element is automatically generated by MyBatis Generator, do not modify.
- This element was generated on Mon Dec 04 15:29:25 CST 2017.
- -->
- select count(*) from project_size
- <if test="_parameter != null">
- <include refid="Example_Where_Clause" />
- </if>
- </select>
- <update id="updateByExampleSelective" parameterType="map">
- <!--
- WARNING - @mbg.generated
- This element is automatically generated by MyBatis Generator, do not modify.
- This element was generated on Mon Dec 04 15:29:25 CST 2017.
- -->
- update project_size
- <set>
- <if test="record.id != null">
- id = #{record.id,jdbcType=VARCHAR},
- </if>
- <if test="record.createId != null">
- create_id = #{record.createId,jdbcType=VARCHAR},
- </if>
- <if test="record.createTime != null">
- create_time = #{record.createTime,jdbcType=TIMESTAMP},
- </if>
- <if test="record.updateTime != null">
- update_time = #{record.updateTime,jdbcType=TIMESTAMP},
- </if>
- <if test="record.pid != null">
- pid = #{record.pid,jdbcType=VARCHAR},
- </if>
- <if test="record.pname != null">
- pname = #{record.pname,jdbcType=VARCHAR},
- </if>
- <if test="record.price != null">
- price = #{record.price,jdbcType=DECIMAL},
- </if>
- <if test="record.offset != null">
- offset = #{record.offset,jdbcType=DECIMAL},
- </if>
- <if test="record.activityPrice != null">
- activity_price = #{record.activityPrice,jdbcType=DECIMAL},
- </if>
- <if test="record.activityFlag != null">
- activity_flag = #{record.activityFlag,jdbcType=VARCHAR},
- </if>
- <if test="record.memberPrice != null">
- member_price = #{record.memberPrice,jdbcType=DECIMAL},
- </if>
- <if test="record.status != null">
- status = #{record.status,jdbcType=INTEGER},
- </if>
- </set>
- <if test="_parameter != null">
- <include refid="Update_By_Example_Where_Clause" />
- </if>
- </update>
- <update id="updateByExample" parameterType="map">
- <!--
- WARNING - @mbg.generated
- This element is automatically generated by MyBatis Generator, do not modify.
- This element was generated on Mon Dec 04 15:29:25 CST 2017.
- -->
- update project_size
- set id = #{record.id,jdbcType=VARCHAR},
- create_id = #{record.createId,jdbcType=VARCHAR},
- create_time = #{record.createTime,jdbcType=TIMESTAMP},
- update_time = #{record.updateTime,jdbcType=TIMESTAMP},
- pid = #{record.pid,jdbcType=VARCHAR},
- pname = #{record.pname,jdbcType=VARCHAR},
- price = #{record.price,jdbcType=DECIMAL},
- offset = #{record.offset,jdbcType=DECIMAL},
- activity_price = #{record.activityPrice,jdbcType=DECIMAL},
- activity_flag = #{record.activityFlag,jdbcType=VARCHAR},
- member_price = #{record.memberPrice,jdbcType=DECIMAL},
- status = #{record.status,jdbcType=INTEGER}
- <if test="_parameter != null">
- <include refid="Update_By_Example_Where_Clause" />
- </if>
- </update>
- <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.business.bo.ProjectSizeBo">
- <!--
- WARNING - @mbg.generated
- This element is automatically generated by MyBatis Generator, do not modify.
- This element was generated on Mon Dec 04 15:29:25 CST 2017.
- -->
- update project_size
- <set>
- <if test="createId != null">
- create_id = #{createId,jdbcType=VARCHAR},
- </if>
- <if test="createTime != null">
- create_time = #{createTime,jdbcType=TIMESTAMP},
- </if>
- <if test="updateTime != null">
- update_time = #{updateTime,jdbcType=TIMESTAMP},
- </if>
- <if test="pid != null">
- pid = #{pid,jdbcType=VARCHAR},
- </if>
- <if test="pname != null">
- pname = #{pname,jdbcType=VARCHAR},
- </if>
- <if test="price != null">
- price = #{price,jdbcType=DECIMAL},
- </if>
- <if test="offset != null">
- offset = #{offset,jdbcType=DECIMAL},
- </if>
- <if test="activityPrice != null">
- activity_price = #{activityPrice,jdbcType=DECIMAL},
- </if>
- <if test="activityFlag != null">
- activity_flag = #{activityFlag,jdbcType=VARCHAR},
- </if>
- <if test="memberPrice != null">
- member_price = #{memberPrice,jdbcType=DECIMAL},
- </if>
- <if test="status != null">
- status = #{status,jdbcType=INTEGER},
- </if>
- </set>
- where id = #{id,jdbcType=VARCHAR}
- </update>
- <update id="updateByPrimaryKey" parameterType="com.goafanti.common.model.ProjectSize">
- <!--
- WARNING - @mbg.generated
- This element is automatically generated by MyBatis Generator, do not modify.
- This element was generated on Mon Dec 04 15:29:25 CST 2017.
- -->
- update project_size
- set create_id = #{createId,jdbcType=VARCHAR},
- create_time = #{createTime,jdbcType=TIMESTAMP},
- update_time = #{updateTime,jdbcType=TIMESTAMP},
- pid = #{pid,jdbcType=VARCHAR},
- pname = #{pname,jdbcType=VARCHAR},
- price = #{price,jdbcType=DECIMAL},
- offset = #{offset,jdbcType=DECIMAL},
- activity_price = #{activityPrice,jdbcType=DECIMAL},
- activity_flag = #{activityFlag,jdbcType=VARCHAR},
- member_price = #{memberPrice,jdbcType=DECIMAL},
- status = #{status,jdbcType=INTEGER}
- where id = #{id,jdbcType=VARCHAR}
- </update>
-
- <select id="selectByPrimaryBusinessId" resultType="com.goafanti.business.bo.ProjectSizeBo">
-
- select
- p.id, p.create_id as createId, p.create_time as createTime, p.update_time as updateTime, p.pid, p.pname, p.price, p.offset, p.activity_price as activityPrice,
- p.activity_flag as activityFlag, p.member_price as memberPrice, p.status,b.bname
- from project_size p
- left join business_project b on p.pid =b.id
- where p.pid = #{pid,jdbcType=VARCHAR}
- </select>
-
- <select id="selectByBusinessId" parameterType="java.lang.String" resultType="com.goafanti.business.bo.ProjectSizeBo">
- select
- p.id, p.create_id as createId, p.create_time as createTime, p.update_time as updateTime, p.pid, p.pname, p.price, p.offset, p.activity_price as activityPrice,
- p.activity_flag as activityFlag, p.member_price as memberPrice, p.status,b.bname
- from project_size p
- left join business_project b on p.pid =b.id
- where p.id = #{id,jdbcType=VARCHAR}
- </select>
-
- <select id="getgetPnamecount" resultType="com.goafanti.business.bo.ProjectSizeBo">
- select
- p.id, p.create_id as createId, p.create_time as createTime, p.update_time as updateTime, p.pid, p.pname, p.price, p.offset, p.activity_price as activityPrice,
- p.activity_flag as activityFlag, p.member_price as memberPrice, p.status
- from project_size p
- where p.pname=#{pname,jdbcType=VARCHAR}
- </select>
- <select id="selectPidList" resultType="string">
- select p.pname
- from project_size p
- where status=0
- and pid=#{pid,jdbcType=VARCHAR}
- </select>
- </mapper>
|