| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921 |
- <?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.JtBusinessProjectMapper">
- <resultMap id="BaseResultMap" type="com.goafanti.common.model.JtBusinessProject">
- <!--
- WARNING - @mbg.generated
- This element is automatically generated by MyBatis Generator, do not modify.
- This element was generated on Wed Aug 01 10:34:40 CST 2018.
- -->
- <id column="id" jdbcType="VARCHAR" property="id" />
- <result column="name" jdbcType="VARCHAR" property="name" />
- <result column="category_id" jdbcType="VARCHAR" property="categoryId" />
- <result column="number" jdbcType="VARCHAR" property="number" />
- <result column="price" jdbcType="DECIMAL" property="price" />
- <result column="activity_price" jdbcType="DECIMAL" property="activityPrice" />
- <result column="member_price" jdbcType="DECIMAL" property="memberPrice" />
- <result column="offset" jdbcType="REAL" property="offset" />
- <result column="activity_flag" jdbcType="INTEGER" property="activityFlag" />
- <result column="introduce" jdbcType="VARCHAR" property="introduce" />
- <result column="province" jdbcType="INTEGER" property="province" />
- <result column="city" jdbcType="INTEGER" property="city" />
- <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
- <result column="min_img_url" jdbcType="VARCHAR" property="minImgUrl" />
- <result column="max_img_url" jdbcType="VARCHAR" property="maxImgUrl" />
- <result column="value" jdbcType="VARCHAR" property="value" />
- <result column="apply_conditions" jdbcType="VARCHAR" property="applyConditions" />
- <result column="owner_id" jdbcType="VARCHAR" property="ownerId" />
- <result column="is_hot" jdbcType="INTEGER" property="isHot" />
- <result column="audit_status" jdbcType="INTEGER" property="auditStatus" />
- <result column="audit_info" jdbcType="VARCHAR" property="auditInfo" />
- <result column="release_date" jdbcType="TIMESTAMP" property="releaseDate" />
- <result column="advertisement" jdbcType="VARCHAR" property="advertisement" />
- <result column="keyword" jdbcType="VARCHAR" property="keyword" />
- <result column="summary" jdbcType="VARCHAR" property="summary" />
- </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 Wed Aug 01 10:34:40 CST 2018.
- -->
- <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 Wed Aug 01 10:34:40 CST 2018.
- -->
- <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 Wed Aug 01 10:34:40 CST 2018.
- -->
- id, name, category_id, number, price, activity_price, member_price, offset, activity_flag,
- introduce, province, city, create_time, min_img_url, max_img_url, value, apply_conditions,
- owner_id, is_hot, audit_status, audit_info, release_date, advertisement,keyword,summary
- </sql>
- <select id="selectByExample" parameterType="com.goafanti.common.model.JtBusinessProjectExample" resultMap="BaseResultMap">
- <!--
- WARNING - @mbg.generated
- This element is automatically generated by MyBatis Generator, do not modify.
- This element was generated on Wed Aug 01 10:34:40 CST 2018.
- -->
- select
- <if test="distinct">
- distinct
- </if>
- <include refid="Base_Column_List" />
- from jt_business_project
- <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 Wed Aug 01 10:34:40 CST 2018.
- -->
- select
- <include refid="Base_Column_List" />
- from jt_business_project
- 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 Wed Aug 01 10:34:40 CST 2018.
- -->
- delete from jt_business_project
- where id = #{id,jdbcType=VARCHAR}
- </delete>
- <delete id="deleteByExample" parameterType="com.goafanti.common.model.JtBusinessProjectExample">
- <!--
- WARNING - @mbg.generated
- This element is automatically generated by MyBatis Generator, do not modify.
- This element was generated on Wed Aug 01 10:34:40 CST 2018.
- -->
- delete from jt_business_project
- <if test="_parameter != null">
- <include refid="Example_Where_Clause" />
- </if>
- </delete>
- <insert id="insert" parameterType="com.goafanti.common.model.JtBusinessProject">
- <!--
- WARNING - @mbg.generated
- This element is automatically generated by MyBatis Generator, do not modify.
- This element was generated on Wed Aug 01 10:34:40 CST 2018.
- -->
- insert into jt_business_project (id, name, category_id,
- number, price, activity_price,
- member_price, offset, activity_flag,
- introduce, province, city,
- create_time, min_img_url, max_img_url,
- value, apply_conditions, owner_id,
- is_hot, audit_status, audit_info,
- release_date, advertisement,keyword,summary)
- values (#{id,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{categoryId,jdbcType=VARCHAR},
- #{number,jdbcType=VARCHAR}, #{price,jdbcType=DECIMAL}, #{activityPrice,jdbcType=DECIMAL},
- #{memberPrice,jdbcType=DECIMAL}, #{offset,jdbcType=REAL}, #{activityFlag,jdbcType=INTEGER},
- #{introduce,jdbcType=VARCHAR}, #{province,jdbcType=INTEGER}, #{city,jdbcType=INTEGER},
- #{createTime,jdbcType=TIMESTAMP}, #{minImgUrl,jdbcType=VARCHAR}, #{maxImgUrl,jdbcType=VARCHAR},
- #{value,jdbcType=VARCHAR}, #{applyConditions,jdbcType=VARCHAR}, #{ownerId,jdbcType=VARCHAR},
- #{isHot,jdbcType=INTEGER}, #{auditStatus,jdbcType=INTEGER}, #{auditInfo,jdbcType=VARCHAR},
- #{releaseDate,jdbcType=TIMESTAMP}, #{advertisement,jdbcType=VARCHAR},#{keyword,jdbcType=VARCHAR},#{summary,jdbcType=VARCHAR})
- </insert>
- <insert id="insertSelective" parameterType="com.goafanti.common.model.JtBusinessProject">
- <!--
- WARNING - @mbg.generated
- This element is automatically generated by MyBatis Generator, do not modify.
- This element was generated on Wed Aug 01 10:34:40 CST 2018.
- -->
- insert into jt_business_project
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <if test="id != null">
- id,
- </if>
- <if test="name != null">
- name,
- </if>
- <if test="categoryId != null">
- category_id,
- </if>
- <if test="number != null">
- number,
- </if>
- <if test="price != null">
- price,
- </if>
- <if test="activityPrice != null">
- activity_price,
- </if>
- <if test="memberPrice != null">
- member_price,
- </if>
- <if test="offset != null">
- offset,
- </if>
- <if test="activityFlag != null">
- activity_flag,
- </if>
- <if test="introduce != null">
- introduce,
- </if>
- <if test="province != null">
- province,
- </if>
- <if test="city != null">
- city,
- </if>
- <if test="createTime != null">
- create_time,
- </if>
- <if test="minImgUrl != null">
- min_img_url,
- </if>
- <if test="maxImgUrl != null">
- max_img_url,
- </if>
- <if test="value != null">
- value,
- </if>
- <if test="applyConditions != null">
- apply_conditions,
- </if>
- <if test="ownerId != null">
- owner_id,
- </if>
- <if test="isHot != null">
- is_hot,
- </if>
- <if test="auditStatus != null">
- audit_status,
- </if>
- <if test="auditInfo != null">
- audit_info,
- </if>
- <if test="releaseDate != null">
- release_date,
- </if>
- <if test="advertisement != null">
- advertisement,
- </if>
- <if test="keyword != null">
- keyword,
- </if>
- <if test="summary != null">
- summary,
- </if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides=",">
- <if test="id != null">
- #{id,jdbcType=VARCHAR},
- </if>
- <if test="name != null">
- #{name,jdbcType=VARCHAR},
- </if>
- <if test="categoryId != null">
- #{categoryId,jdbcType=VARCHAR},
- </if>
- <if test="number != null">
- #{number,jdbcType=VARCHAR},
- </if>
- <if test="price != null">
- #{price,jdbcType=DECIMAL},
- </if>
- <if test="activityPrice != null">
- #{activityPrice,jdbcType=DECIMAL},
- </if>
- <if test="memberPrice != null">
- #{memberPrice,jdbcType=DECIMAL},
- </if>
- <if test="offset != null">
- #{offset,jdbcType=REAL},
- </if>
- <if test="activityFlag != null">
- #{activityFlag,jdbcType=INTEGER},
- </if>
- <if test="introduce != null">
- #{introduce,jdbcType=VARCHAR},
- </if>
- <if test="province != null">
- #{province,jdbcType=INTEGER},
- </if>
- <if test="city != null">
- #{city,jdbcType=INTEGER},
- </if>
- <if test="createTime != null">
- #{createTime,jdbcType=TIMESTAMP},
- </if>
- <if test="minImgUrl != null">
- #{minImgUrl,jdbcType=VARCHAR},
- </if>
- <if test="maxImgUrl != null">
- #{maxImgUrl,jdbcType=VARCHAR},
- </if>
- <if test="value != null">
- #{value,jdbcType=VARCHAR},
- </if>
- <if test="applyConditions != null">
- #{applyConditions,jdbcType=VARCHAR},
- </if>
- <if test="ownerId != null">
- #{ownerId,jdbcType=VARCHAR},
- </if>
- <if test="isHot != null">
- #{isHot,jdbcType=INTEGER},
- </if>
- <if test="auditStatus != null">
- #{auditStatus,jdbcType=INTEGER},
- </if>
- <if test="auditInfo != null">
- #{auditInfo,jdbcType=VARCHAR},
- </if>
- <if test="releaseDate != null">
- #{releaseDate,jdbcType=TIMESTAMP},
- </if>
- <if test="advertisement != null">
- #{advertisement,jdbcType=VARCHAR},
- </if>
- <if test="keyword != null">
- #{keyword,jdbcType=VARCHAR},
- </if>
- <if test="summary != null">
- #{summary,jdbcType=VARCHAR}
- </if>
- </trim>
- </insert>
- <select id="countByExample" parameterType="com.goafanti.common.model.JtBusinessProjectExample" resultType="java.lang.Long">
- <!--
- WARNING - @mbg.generated
- This element is automatically generated by MyBatis Generator, do not modify.
- This element was generated on Wed Aug 01 10:34:40 CST 2018.
- -->
- select count(*) from jt_business_project
- <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 Wed Aug 01 10:34:40 CST 2018.
- -->
- update jt_business_project
- <set>
- <if test="record.id != null">
- id = #{record.id,jdbcType=VARCHAR},
- </if>
- <if test="record.name != null">
- name = #{record.name,jdbcType=VARCHAR},
- </if>
- <if test="record.categoryId != null">
- category_id = #{record.categoryId,jdbcType=VARCHAR},
- </if>
- <if test="record.number != null">
- number = #{record.number,jdbcType=VARCHAR},
- </if>
- <if test="record.price != null">
- price = #{record.price,jdbcType=DECIMAL},
- </if>
- <if test="record.activityPrice != null">
- activity_price = #{record.activityPrice,jdbcType=DECIMAL},
- </if>
- <if test="record.memberPrice != null">
- member_price = #{record.memberPrice,jdbcType=DECIMAL},
- </if>
- <if test="record.offset != null">
- offset = #{record.offset,jdbcType=REAL},
- </if>
- <if test="record.activityFlag != null">
- activity_flag = #{record.activityFlag,jdbcType=INTEGER},
- </if>
- <if test="record.introduce != null">
- introduce = #{record.introduce,jdbcType=VARCHAR},
- </if>
- <if test="record.province != null">
- province = #{record.province,jdbcType=INTEGER},
- </if>
- <if test="record.city != null">
- city = #{record.city,jdbcType=INTEGER},
- </if>
- <if test="record.createTime != null">
- create_time = #{record.createTime,jdbcType=TIMESTAMP},
- </if>
- <if test="record.minImgUrl != null">
- min_img_url = #{record.minImgUrl,jdbcType=VARCHAR},
- </if>
- <if test="record.maxImgUrl != null">
- max_img_url = #{record.maxImgUrl,jdbcType=VARCHAR},
- </if>
- <if test="record.value != null">
- value = #{record.value,jdbcType=VARCHAR},
- </if>
- <if test="record.applyConditions != null">
- apply_conditions = #{record.applyConditions,jdbcType=VARCHAR},
- </if>
- <if test="record.ownerId != null">
- owner_id = #{record.ownerId,jdbcType=VARCHAR},
- </if>
- <if test="record.isHot != null">
- is_hot = #{record.isHot,jdbcType=INTEGER},
- </if>
- <if test="record.auditStatus != null">
- audit_status = #{record.auditStatus,jdbcType=INTEGER},
- </if>
- <if test="record.auditInfo != null">
- audit_info = #{record.auditInfo,jdbcType=VARCHAR},
- </if>
- <if test="record.releaseDate != null">
- release_date = #{record.releaseDate,jdbcType=TIMESTAMP},
- </if>
- <if test="record.advertisement != null">
- advertisement = #{record.advertisement,jdbcType=VARCHAR},
- </if>
- <if test="keyword !=null">
- keyword =#{keyword,jdbcType=VARCHAR},
- </if>
- <if test="summary != null">
- summary =#{summary,jdbcType=VARCHAR},
- </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 Wed Aug 01 10:34:40 CST 2018.
- -->
- update jt_business_project
- set id = #{record.id,jdbcType=VARCHAR},
- name = #{record.name,jdbcType=VARCHAR},
- category_id = #{record.categoryId,jdbcType=VARCHAR},
- number = #{record.number,jdbcType=VARCHAR},
- price = #{record.price,jdbcType=DECIMAL},
- activity_price = #{record.activityPrice,jdbcType=DECIMAL},
- member_price = #{record.memberPrice,jdbcType=DECIMAL},
- offset = #{record.offset,jdbcType=REAL},
- activity_flag = #{record.activityFlag,jdbcType=INTEGER},
- introduce = #{record.introduce,jdbcType=VARCHAR},
- province = #{record.province,jdbcType=INTEGER},
- city = #{record.city,jdbcType=INTEGER},
- create_time = #{record.createTime,jdbcType=TIMESTAMP},
- min_img_url = #{record.minImgUrl,jdbcType=VARCHAR},
- max_img_url = #{record.maxImgUrl,jdbcType=VARCHAR},
- value = #{record.value,jdbcType=VARCHAR},
- apply_conditions = #{record.applyConditions,jdbcType=VARCHAR},
- owner_id = #{record.ownerId,jdbcType=VARCHAR},
- is_hot = #{record.isHot,jdbcType=INTEGER},
- audit_status = #{record.auditStatus,jdbcType=INTEGER},
- audit_info = #{record.auditInfo,jdbcType=VARCHAR},
- release_date = #{record.releaseDate,jdbcType=TIMESTAMP},
- advertisement = #{record.advertisement,jdbcType=VARCHAR},
- keyword = #{keyword,jdbcType=VARCHAR},#{summary,jdbcType=VARCHAR}
- <if test="_parameter != null">
- <include refid="Update_By_Example_Where_Clause" />
- </if>
- </update>
- <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.JtBusinessProject">
- <!--
- WARNING - @mbg.generated
- This element is automatically generated by MyBatis Generator, do not modify.
- This element was generated on Wed Aug 01 10:34:40 CST 2018.
- -->
- update jt_business_project
- <set>
- <if test="name != null">
- name = #{name,jdbcType=VARCHAR},
- </if>
- <if test="categoryId != null">
- category_id = #{categoryId,jdbcType=VARCHAR},
- </if>
- <if test="number != null">
- number = #{number,jdbcType=VARCHAR},
- </if>
- <if test="price != null">
- price = #{price,jdbcType=DECIMAL},
- </if>
- <if test="activityPrice != null">
- activity_price = #{activityPrice,jdbcType=DECIMAL},
- </if>
- <if test="memberPrice != null">
- member_price = #{memberPrice,jdbcType=DECIMAL},
- </if>
- <if test="offset != null">
- offset = #{offset,jdbcType=REAL},
- </if>
- <if test="activityFlag != null">
- activity_flag = #{activityFlag,jdbcType=INTEGER},
- </if>
- <if test="introduce != null">
- introduce = #{introduce,jdbcType=VARCHAR},
- </if>
- <if test="province != null">
- province = #{province,jdbcType=INTEGER},
- </if>
- <if test="city != null">
- city = #{city,jdbcType=INTEGER},
- </if>
- <if test="createTime != null">
- create_time = #{createTime,jdbcType=TIMESTAMP},
- </if>
- <if test="minImgUrl != null">
- min_img_url = #{minImgUrl,jdbcType=VARCHAR},
- </if>
- <if test="maxImgUrl != null">
- max_img_url = #{maxImgUrl,jdbcType=VARCHAR},
- </if>
- <if test="value != null">
- value = #{value,jdbcType=VARCHAR},
- </if>
- <if test="applyConditions != null">
- apply_conditions = #{applyConditions,jdbcType=VARCHAR},
- </if>
- <if test="ownerId != null">
- owner_id = #{ownerId,jdbcType=VARCHAR},
- </if>
- <if test="isHot != null">
- is_hot = #{isHot,jdbcType=INTEGER},
- </if>
- <if test="auditStatus != null">
- audit_status = #{auditStatus,jdbcType=INTEGER},
- </if>
- <if test="auditInfo != null">
- audit_info = #{auditInfo,jdbcType=VARCHAR},
- </if>
- <if test="releaseDate != null">
- release_date = #{releaseDate,jdbcType=TIMESTAMP},
- </if>
- <if test="advertisement != null">
- advertisement = #{advertisement,jdbcType=VARCHAR},
- </if>
- <if test="keyword != null">
- keyword = #{keyword,jdbcType=VARCHAR},
- </if>
- <if test="summary != null">
- summary = #{summary,jdbcType=VARCHAR},
- </if>
- </set>
- where id = #{id,jdbcType=VARCHAR}
- </update>
- <update id="updateByPrimaryKey" parameterType="com.goafanti.common.model.JtBusinessProject">
- <!--
- WARNING - @mbg.generated
- This element is automatically generated by MyBatis Generator, do not modify.
- This element was generated on Wed Aug 01 10:34:40 CST 2018.
- -->
- update jt_business_project
- set name = #{name,jdbcType=VARCHAR},
- category_id = #{categoryId,jdbcType=VARCHAR},
- number = #{number,jdbcType=VARCHAR},
- price = #{price,jdbcType=DECIMAL},
- activity_price = #{activityPrice,jdbcType=DECIMAL},
- member_price = #{memberPrice,jdbcType=DECIMAL},
- offset = #{offset,jdbcType=REAL},
- activity_flag = #{activityFlag,jdbcType=INTEGER},
- introduce = #{introduce,jdbcType=VARCHAR},
- province = #{province,jdbcType=INTEGER},
- city = #{city,jdbcType=INTEGER},
- create_time = #{createTime,jdbcType=TIMESTAMP},
- min_img_url = #{minImgUrl,jdbcType=VARCHAR},
- max_img_url = #{maxImgUrl,jdbcType=VARCHAR},
- value = #{value,jdbcType=VARCHAR},
- apply_conditions = #{applyConditions,jdbcType=VARCHAR},
- owner_id = #{ownerId,jdbcType=VARCHAR},
- is_hot = #{isHot,jdbcType=INTEGER},
- audit_status = #{auditStatus,jdbcType=INTEGER},
- audit_info = #{auditInfo,jdbcType=VARCHAR},
- release_date = #{releaseDate,jdbcType=TIMESTAMP},
- advertisement = #{advertisement,jdbcType=VARCHAR},
- keyword = #{keyword,jdbcType=VARCHAR},
- summary =#{summary,jdbcType=VARCHAR}
- where id = #{id,jdbcType=VARCHAR}
- </update>
- <select id="selectByPrimaryKeyWithModule" resultType="com.goafanti.business.bo.JtBusinessProjectResult">
- select
- jtbp.id, jtbp.name, jtbp.category_id as categoryId, jtbp.number, jtbp.price, jtbp.activity_price as activityPrice, jtbp.member_price as memberPrice, jtbp.offset,
- jtbp.activity_flag as activityFlag,ifnull(p.count,0) as interestCount,if(isnull(x.project_id),0,1) as interested,jtbp.keyword,jtbp.summary,
- jtbp.introduce, jtbp.province, jtbp.city, jtbp.create_time as createTime, jtbp.min_img_url as minImgUrl, jtbp.max_img_url as maxImgUrl, jtbp.value, jtbp.apply_conditions as applyConditions,
- jtbp.owner_id as ownerId, jtbp.is_hot as isHot, jtbp.audit_status as auditStatus, jtbp.audit_info as auditInfo, jtbp.release_date as releaseDate,jtbc.module as module,jtbp.advertisement
- ,u.`type` as type,u.mobile as ownerMobile, u.nickname as ownerName
- from jt_business_project jtbp left join `user` u on jtbp.owner_id=u.id
- left join jt_business_category jtbc on jtbc.id = jtbp.category_id
- left join (select project_id,count(*) as count from project_interest group by project_id) p on jtbp.id=p.project_id
- left join (select project_id from project_interest <if test="uid != null"> where uid= #{uid,jdbcType=VARCHAR} </if>group by project_id) x on jtbp.id=x.project_id
- where jtbp.id = #{id,jdbcType=VARCHAR}
- </select>
-
- <select id="getBusinessProjectByCategoryId" resultType="com.goafanti.common.model.JtBusinessProject">
- select
- id,
- name,
- introduce,
- min_img_url as minImgUrl
- from
- jt_business_project
- where audit_status=2
- <if test="id!=null">
- and category_id= #{id,jdbcType=VARCHAR}
- </if>
- <if test="isHot != null">
- and is_hot = #{isHot,jdbcType=INTEGER}
- </if>
- order by release_date desc
- limit #{size,jdbcType=INTEGER}
- </select>
-
- <select id="findJtBusinessProjectByPage" resultType="com.goafanti.business.bo.JtBusinessProjectResult">
- select
- jtbp.id,
- jtbp.name,
- jtbp.category_id as categoryId,
- jtbp.number,
- jtbp.price,
- jtbp.activity_price as activityPrice,
- jtbp.member_price as memberPrice,
- jtbp.offset,
- jtbp.activity_flag as activityFlag,
- jtbp.introduce,
- jtbp.province, jtbp.city,
- jtbp.create_time as createTime,
- jtbp.min_img_url as minImgUrl,
- jtbp.max_img_url as maxImgUrl,
- jtbp.value,
- jtbp.apply_conditions as applyConditions,
- jtbp.is_hot as isHot,
- jtbp.audit_status as auditStatus,
- jtbp.release_Date as releaseDate,
- jtbp.advertisement,
- jtbp.summary,
- ifnull(dct.dealCount,0) as dealCount,
- ifnull(x.count,0) as interestCount,
- u.nickname as companyName,u.id as companyId,
- jtbc1.module,
- u.`type` as type
- from jt_business_project jtbp
- left join user u on u.id=jtbp.owner_id
- left join (select project_id as id,count(*) as count from project_interest group by project_id)x on jtbp.id=x.id
- left join (select sum(commodity_quantity) as dealCount ,commodity_id from jt_order_detail group by commodity_id) dct on jtbp.id=dct.commodity_id
- left join jt_business_category jtbc1 on jtbc1.id = jtbp.category_id
- <if test="topId!=null">
- left join jt_business_category jtbc on jtbc.super_id =#{topId,jdbcType=VARCHAR}
- </if>
- <if test="tag != null">
- left join jt_business_project_tag x on x.project_id=jtbp.id
- left join jt_tag y on x.tag_id=y.id
- </if>
- where 1=1
- <if test="tag != null">
- and y.id= #{tag,jdbcType=VARCHAR}
- </if>
- <if test="module == 0">
- and jtbc1.module > 1
- </if>
- <if test="isHot != null">
- and jtbp.is_hot = #{isHot,jdbcType=INTEGER}
- </if>
- <!-- <if test="module == 1">
- and jtbc1.module =1
- </if> -->
- <if test="module !=null and module !=0">
- and jtbc1.module=#{module,jdbcType=INTEGER}
- </if>
- <if test="secondId!=null">
- and jtbp.category_id=#{secondId,jdbcType=VARCHAR}
- </if>
- <if test="name!=null">
- and jtbp.name like concat("%",#{name,jdbcType=VARCHAR},"%")
- </if>
- <if test="topId!=null">
- and jtbc.id=jtbp.category_id
- </if>
- <if test="ownerId!=null">
- and jtbp.owner_id=#{ownerId,jdbcType=VARCHAR}
- </if>
- <if test="auditStatus!=null">
- and jtbp.audit_status=#{auditStatus,jdbcType=INTEGER}
- </if>
- <if test="orderType!=null and orderType==0">
- order by release_date
- </if>
- <if test="orderType!=null and orderType==1">
- order by jtbp.price
- </if>
- <if test="orderType!=null and orderType==2">
- order by dct.dealCount
- </if>
- <if test="orderSort!=null and orderSort==0">
- desc
- </if>
- <if test="page_sql!=null">
- ${page_sql}
- </if>
- </select>
- <select id="findJtBusinessCountByPage" resultType="java.lang.Integer">
- select
- count(0)
- from jt_business_project jtbp
- <if test="topId!=null">
- left join jt_business_category jtbc on jtbc.super_id =#{topId,jdbcType=VARCHAR}
- </if>
- <if test="module!=null">
- left join jt_business_category jtbc1 on jtbc1.id = jtbp.category_id
- </if>
- <if test="tag != null">
- left join jt_business_project_tag x on x.project_id=jtbp.id
- left join jt_tag y on x.tag_id=y.id
- </if>
- where 1=1
- <if test="tag != null">
- and y.id= #{tag,jdbcType=VARCHAR}
- </if>
- <if test="module == 0">
- and jtbc1.module > 1
- </if>
- <if test="isHot != null">
- and jtbp.is_hot = #{isHot,jdbcType=INTEGER}
- </if>
- <!-- <if test="module == 1">
- and jtbc1.module =1
- </if> -->
- <if test="module !=null and module !=0">
- and jtbc1.module=#{module,jdbcType=INTEGER}
- </if>
- <if test="secondId!=null">
- and jtbp.category_id=#{secondId,jdbcType=VARCHAR}
- </if>
- <if test="name!=null">
- and jtbp.name like concat("%",#{name,jdbcType=VARCHAR},"%")
- </if>
- <if test="topId!=null">
- and jtbc.id=jtbp.category_id
- </if>
- <if test="ownerId!=null">
- and jtbp.owner_id=#{ownerId,jdbcType=VARCHAR}
- </if>
- <if test="auditStatus!=null">
- and jtbp.audit_status=#{auditStatus,jdbcType=INTEGER}
- </if>
- </select>
-
- <select id="findProjectOrderByNumber" resultType="com.goafanti.common.model.JtBusinessProject">
- select
- <include refid="Base_Column_List" />
- from jt_business_project jtbp
- where audit_status=2
- order by create_time desc
- </select>
- <select id="findInterestedProjcet" resultType="com.goafanti.common.model.JtBusinessProject">
- select
- jtbp.id,
- jtbp.name,
- jtbp.category_id as categoryId,
- jtbp.number,
- jtbp.price,
- jtbp.activity_price as activityPrice,
- jtbp.member_price as memberPrice,
- jtbp.offset,
- jtbp.activity_flag as activityFlag,
- jtbp.introduce,
- jtbp.province, jtbp.city,
- jtbp.create_time as createTime,
- jtbp.min_img_url as minImgUrl,
- jtbp.max_img_url as maxImgUrl,
- jtbp.value,
- jtbp.apply_conditions as applyConditions,
- jtbp.is_hot as isHot,
- jtbp.audit_status as auditStatus,
- jtbp.release_Date as releaseDate,
- jtbp.advertisement
- from
- jt_business_project jtbp
- left join project_interest pi on jtbp.id=pi.project_id
- where pi.uid=#{uid,jdbcType=VARCHAR}
- <if test="page_sql!=null">
- ${page_sql}
- </if>
- </select>
- <select id="findInterestedProjcetCount" resultType="java.lang.Integer">
- select
- count(0)
- from
- jt_business_project jtbp
- left join project_interest pi on jtbp.id=pi.project_id
- where pi.uid=#{uid,jdbcType=VARCHAR}
- </select>
- <select id="myCollectionProjectList" resultType="com.goafanti.common.bo.MyCollection">
- select
- jtbp.id,
- jtbp.name,
- jtbp.advertisement as introduction,
- jtbp.price as textA,
- u.nickname as ownerName,
- jtbp.min_img_url as ImgUrl,
- ifnull(p.count,'0') as interestCount
- from
- jt_business_project jtbp
- left join project_interest pi on jtbp.id=pi.project_id
- left join `user` u on jtbp.owner_id =u.id
- left join (select project_id,count(*) as count from project_interest group by project_id) p
- on p.project_id=jtbp.id
- where pi.uid=#{uid,jdbcType=VARCHAR}
- order by pi.create_time desc
- <if test="page_sql!=null">
- ${page_sql}
- </if>
- </select>
- <select id="myCollectionProjectCount" resultType="java.lang.Integer">
- select
- count(0)
- from
- jt_business_project jtbp
- left join project_interest pi on jtbp.id=pi.project_id
- where pi.uid=#{uid,jdbcType=VARCHAR}
- </select>
-
- <select id="recommendedApplicationList" resultType="com.goafanti.common.bo.MyCollection">
- select a.id,a.name,a.advertisement as introduction,a.price as textA,
- c.nickname as ownerName,ifnull(d.count,0) as interestCount,a.min_img_url as ImgUrl
- from jt_business_project a
- left join jt_business_category b on a.category_id=b.id
- left join user c on a.owner_id=c.id
- left join (select project_id as id,count(*) as count from project_interest group by project_id) d
- on a.id=d.id
- where a.is_hot=1 and a.audit_status=2
- <if test="type==1">
- and b.module != 1
- </if>
- <if test="type==2">
- and b.module = 5
- </if>
- order by a.release_date desc
- <if test="page_sql!=null">
- ${page_sql}
- </if>
- </select>
- <select id="recommendedApplicationCount" resultType="java.lang.Integer">
- select count(*)
- from jt_business_project a
- left join jt_business_category b on a.category_id=b.id
- where a.is_hot=1 and a.audit_status=2
- <if test="type==1">
- and b.module != 1
- </if>
- <if test="type==2">
- and b.module = 5
- </if>
- </select>
- <!-- 查看科技服务项目 -->
- <select id="getKJListByIds" resultType="com.goafanti.common.model.JtBusinessProject">
- select
- p.id,
- p.name,
- p.introduce,
- p.min_img_url as minImgUrl,
- p.price,
- p.advertisement
- from jt_business_project p
- left join jt_business_category c on p.category_id = c.id
- where c.module = #{module}
- and p.audit_status = 2
- <if test="isHot">
- and is_hot = #{isHot}
- </if>
- order by release_date desc
- limit #{size}
- </select>
-
- <!-- 根据二级分类名称查 -->
- <select id="getModuleByName" resultType="com.goafanti.common.model.JtBusinessProject">
- select b.id,
- b.name,
- b.introduce,
- b.min_img_url as minImgUrl
- from (select x.id from jt_business_category x inner join jt_business_category y on x.super_id = y.id where y.name=#{name})a
- left join jt_business_project b on a.id = b.category_id
- where
- b.audit_status = 2
- <if test="isHot">
- and is_hot = #{isHot}
- </if>
- order by b.release_date desc
- limit #{size}
- </select>
-
- <!-- 根据项目标签名称查出拥有该标签的项目 -->
- <select id="getProjectByTag" resultMap="BaseResultMap">
- select p.* from jt_tag t
- inner join jt_business_project_tag pt on t.id = pt.tag_id
- inner join jt_business_project p on pt.project_id = p.id
- where p.audit_status = 2 and t.name = #{name}
- order by p.release_date desc
- limit #{size}
- </select>
-
- </mapper>
|