|
|
@@ -5,7 +5,7 @@
|
|
|
<!--
|
|
|
WARNING - @mbg.generated
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Wed Jun 20 11:08:54 CST 2018.
|
|
|
+ This element was generated on Fri Jul 06 18:31:16 CST 2018.
|
|
|
-->
|
|
|
<id column="id" jdbcType="VARCHAR" property="id" />
|
|
|
<result column="name" jdbcType="VARCHAR" property="name" />
|
|
|
@@ -24,12 +24,17 @@
|
|
|
<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" />
|
|
|
</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 Jun 20 11:08:54 CST 2018.
|
|
|
+ This element was generated on Fri Jul 06 18:31:16 CST 2018.
|
|
|
-->
|
|
|
<where>
|
|
|
<foreach collection="oredCriteria" item="criteria" separator="or">
|
|
|
@@ -63,7 +68,7 @@
|
|
|
<!--
|
|
|
WARNING - @mbg.generated
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Wed Jun 20 11:08:54 CST 2018.
|
|
|
+ This element was generated on Fri Jul 06 18:31:16 CST 2018.
|
|
|
-->
|
|
|
<where>
|
|
|
<foreach collection="example.oredCriteria" item="criteria" separator="or">
|
|
|
@@ -97,32 +102,17 @@
|
|
|
<!--
|
|
|
WARNING - @mbg.generated
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Wed Jun 20 11:08:54 CST 2018.
|
|
|
+ This element was generated on Fri Jul 06 18:31:16 CST 2018.
|
|
|
-->
|
|
|
- id, name, category_id as categoryId, number, price, activity_price as activityPrice, member_price as memberPrice, offset, activity_flag as activityFlag,
|
|
|
- introduce, province, city, create_time as createTime, min_img_url as minImgUrl, max_img_url as maxImgUrl, value, apply_conditions as applyConditions,owner_id as ownerId
|
|
|
- </sql>
|
|
|
-
|
|
|
- <sql id="My_Base_Column_List">
|
|
|
- <!--
|
|
|
- WARNING - @mbg.generated
|
|
|
- This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Wed Jun 20 11:08:54 CST 2018.
|
|
|
- -->
|
|
|
- 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
|
|
|
+ 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
|
|
|
</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 Jun 20 11:08:54 CST 2018.
|
|
|
+ This element was generated on Fri Jul 06 18:31:16 CST 2018.
|
|
|
-->
|
|
|
select
|
|
|
<if test="distinct">
|
|
|
@@ -141,7 +131,7 @@
|
|
|
<!--
|
|
|
WARNING - @mbg.generated
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Wed Jun 20 11:08:54 CST 2018.
|
|
|
+ This element was generated on Fri Jul 06 18:31:16 CST 2018.
|
|
|
-->
|
|
|
select
|
|
|
<include refid="Base_Column_List" />
|
|
|
@@ -152,7 +142,7 @@
|
|
|
<!--
|
|
|
WARNING - @mbg.generated
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Wed Jun 20 11:08:54 CST 2018.
|
|
|
+ This element was generated on Fri Jul 06 18:31:16 CST 2018.
|
|
|
-->
|
|
|
delete from jt_business_project
|
|
|
where id = #{id,jdbcType=VARCHAR}
|
|
|
@@ -161,7 +151,7 @@
|
|
|
<!--
|
|
|
WARNING - @mbg.generated
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Wed Jun 20 11:08:54 CST 2018.
|
|
|
+ This element was generated on Fri Jul 06 18:31:16 CST 2018.
|
|
|
-->
|
|
|
delete from jt_business_project
|
|
|
<if test="_parameter != null">
|
|
|
@@ -172,26 +162,30 @@
|
|
|
<!--
|
|
|
WARNING - @mbg.generated
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Wed Jun 20 11:08:54 CST 2018.
|
|
|
+ This element was generated on Fri Jul 06 18:31:16 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)
|
|
|
+ value, apply_conditions, owner_id,
|
|
|
+ is_hot, audit_status, audit_info,
|
|
|
+ release_date)
|
|
|
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})
|
|
|
+ #{value,jdbcType=VARCHAR}, #{applyConditions,jdbcType=VARCHAR}, #{ownerId,jdbcType=VARCHAR},
|
|
|
+ #{isHot,jdbcType=INTEGER}, #{auditStatus,jdbcType=INTEGER}, #{auditInfo,jdbcType=VARCHAR},
|
|
|
+ #{releaseDate,jdbcType=TIMESTAMP})
|
|
|
</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 Jun 20 11:08:54 CST 2018.
|
|
|
+ This element was generated on Fri Jul 06 18:31:16 CST 2018.
|
|
|
-->
|
|
|
insert into jt_business_project
|
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
@@ -246,8 +240,20 @@
|
|
|
<if test="applyConditions != null">
|
|
|
apply_conditions,
|
|
|
</if>
|
|
|
- <if test="ownerId!=null">
|
|
|
- owner_id,
|
|
|
+ <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>
|
|
|
</trim>
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
@@ -302,8 +308,20 @@
|
|
|
<if test="applyConditions != null">
|
|
|
#{applyConditions,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
- <if test="ownerId!=null">
|
|
|
- #{ownerId,jdbcType=VARCHAR}
|
|
|
+ <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>
|
|
|
</trim>
|
|
|
</insert>
|
|
|
@@ -311,7 +329,7 @@
|
|
|
<!--
|
|
|
WARNING - @mbg.generated
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Wed Jun 20 11:08:54 CST 2018.
|
|
|
+ This element was generated on Fri Jul 06 18:31:16 CST 2018.
|
|
|
-->
|
|
|
select count(*) from jt_business_project
|
|
|
<if test="_parameter != null">
|
|
|
@@ -322,7 +340,7 @@
|
|
|
<!--
|
|
|
WARNING - @mbg.generated
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Wed Jun 20 11:08:54 CST 2018.
|
|
|
+ This element was generated on Fri Jul 06 18:31:16 CST 2018.
|
|
|
-->
|
|
|
update jt_business_project
|
|
|
<set>
|
|
|
@@ -377,6 +395,21 @@
|
|
|
<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>
|
|
|
</set>
|
|
|
<if test="_parameter != null">
|
|
|
<include refid="Update_By_Example_Where_Clause" />
|
|
|
@@ -386,7 +419,7 @@
|
|
|
<!--
|
|
|
WARNING - @mbg.generated
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Wed Jun 20 11:08:54 CST 2018.
|
|
|
+ This element was generated on Fri Jul 06 18:31:16 CST 2018.
|
|
|
-->
|
|
|
update jt_business_project
|
|
|
set id = #{record.id,jdbcType=VARCHAR},
|
|
|
@@ -405,7 +438,12 @@
|
|
|
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}
|
|
|
+ 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}
|
|
|
<if test="_parameter != null">
|
|
|
<include refid="Update_By_Example_Where_Clause" />
|
|
|
</if>
|
|
|
@@ -414,7 +452,7 @@
|
|
|
<!--
|
|
|
WARNING - @mbg.generated
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Wed Jun 20 11:08:54 CST 2018.
|
|
|
+ This element was generated on Fri Jul 06 18:31:16 CST 2018.
|
|
|
-->
|
|
|
update jt_business_project
|
|
|
<set>
|
|
|
@@ -466,6 +504,21 @@
|
|
|
<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>
|
|
|
</set>
|
|
|
where id = #{id,jdbcType=VARCHAR}
|
|
|
</update>
|
|
|
@@ -473,7 +526,7 @@
|
|
|
<!--
|
|
|
WARNING - @mbg.generated
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Wed Jun 20 11:08:54 CST 2018.
|
|
|
+ This element was generated on Fri Jul 06 18:31:16 CST 2018.
|
|
|
-->
|
|
|
update jt_business_project
|
|
|
set name = #{name,jdbcType=VARCHAR},
|
|
|
@@ -491,26 +544,52 @@
|
|
|
min_img_url = #{minImgUrl,jdbcType=VARCHAR},
|
|
|
max_img_url = #{maxImgUrl,jdbcType=VARCHAR},
|
|
|
value = #{value,jdbcType=VARCHAR},
|
|
|
- apply_conditions = #{applyConditions,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}
|
|
|
where id = #{id,jdbcType=VARCHAR}
|
|
|
</update>
|
|
|
|
|
|
<select id="getBusinessProjectByCategoryId" resultType="com.goafanti.common.model.JtBusinessProject">
|
|
|
- select
|
|
|
- id,
|
|
|
- name,
|
|
|
- introduce,
|
|
|
- min_img_url as minImgUrl
|
|
|
- from jt_business_project
|
|
|
- where
|
|
|
- category_id=#{0}
|
|
|
- order by create_time
|
|
|
- limit #{1}
|
|
|
+ select
|
|
|
+ id,
|
|
|
+ name,
|
|
|
+ introduce
|
|
|
+ from
|
|
|
+ jt_business_project,
|
|
|
+ min_img_url as minImgUrl
|
|
|
+ where category_id= #{id,jdbcType=VARCHAR} and audit_status=2
|
|
|
+ <if test="isHot != null">
|
|
|
+ and is_hot = #{isHot,jdbcType=INTEGER}
|
|
|
+ </if>
|
|
|
+ order by release_date
|
|
|
+ limit #{size,jdbcType=INTEGER}
|
|
|
</select>
|
|
|
|
|
|
<select id="findJtBusinessProjectByPage" resultType="com.goafanti.common.model.JtBusinessProject">
|
|
|
select
|
|
|
- <include refid="My_Base_Column_List" />
|
|
|
+ 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
|
|
|
from jt_business_project jtbp
|
|
|
<if test="topId!=null">
|
|
|
left join jt_business_category jtbc on jtbc.super_id =#{topId,jdbcType=VARCHAR}
|
|
|
@@ -528,35 +607,44 @@
|
|
|
<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="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>
|
|
|
- where 1=1
|
|
|
- <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}
|
|
|
+ <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>
|
|
|
+ where 1=1
|
|
|
+ <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 order by create_time desc
|
|
|
+ from jt_business_project
|
|
|
+ where audit_status=2
|
|
|
+ order by create_time desc
|
|
|
</select>
|
|
|
+
|
|
|
</mapper>
|