|
@@ -21,10 +21,12 @@
|
|
<result column="del_flag_" property="delFlag" />
|
|
<result column="del_flag_" property="delFlag" />
|
|
<result column="create_time_" property="createTime" />
|
|
<result column="create_time_" property="createTime" />
|
|
<result column="update_time_" property="updateTime" />
|
|
<result column="update_time_" property="updateTime" />
|
|
|
|
+ <result column="tenant_id_" property="tenantId" />
|
|
</resultMap>
|
|
</resultMap>
|
|
|
|
|
|
<sql id="queryCondition">
|
|
<sql id="queryCondition">
|
|
<where>
|
|
<where>
|
|
|
|
+ tenant_id_ = #{tenantId}
|
|
<if test="startDate != null">
|
|
<if test="startDate != null">
|
|
and (start_date_ <= #{startDate} and end_date_ >= #{startDate})
|
|
and (start_date_ <= #{startDate} and end_date_ >= #{startDate})
|
|
</if>
|
|
</if>
|
|
@@ -45,7 +47,7 @@
|
|
<!-- 全查询 -->
|
|
<!-- 全查询 -->
|
|
<select id="findAll" resultMap="TenantEntryActivities">
|
|
<select id="findAll" resultMap="TenantEntryActivities">
|
|
SELECT * FROM
|
|
SELECT * FROM
|
|
- tenant_entry_activities ORDER BY id_
|
|
|
|
|
|
+ tenant_entry_activities where tenant_id_ = #{tenantId} ORDER BY id_
|
|
</select>
|
|
</select>
|
|
|
|
|
|
<!-- 向数据库增加一条记录 -->
|
|
<!-- 向数据库增加一条记录 -->
|
|
@@ -54,8 +56,8 @@
|
|
<!-- <selectKey resultClass="int" keyProperty="id" > SELECT SEQ_WSDEFINITION_ID.nextval
|
|
<!-- <selectKey resultClass="int" keyProperty="id" > SELECT SEQ_WSDEFINITION_ID.nextval
|
|
AS ID FROM DUAL </selectKey> -->
|
|
AS ID FROM DUAL </selectKey> -->
|
|
INSERT INTO tenant_entry_activities
|
|
INSERT INTO tenant_entry_activities
|
|
- (id_,name_,cover_img_,detail_,suitable_user_,tag_,total_price_,discount_price_,purchase_minutes_,give_minutes_,start_date_,end_date_,condition_,del_flag_,create_time_,update_time_)
|
|
|
|
- VALUES(#{id},#{name},#{coverImg},#{detail},#{suitableUser, typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},#{tag},#{totalPrice},#{discountPrice},#{purchaseMinutes},#{giveMinutes},#{startDate},#{endDate},#{condition},#{delFlag},#{createTime},#{updateTime})
|
|
|
|
|
|
+ (id_,name_,cover_img_,detail_,suitable_user_,tag_,total_price_,discount_price_,purchase_minutes_,give_minutes_,start_date_,end_date_,condition_,del_flag_,create_time_,update_time_,tenant_id_)
|
|
|
|
+ VALUES(#{id},#{name},#{coverImg},#{detail},#{suitableUser, typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},#{tag},#{totalPrice},#{discountPrice},#{purchaseMinutes},#{giveMinutes},#{startDate},#{endDate},#{condition},#{delFlag},#{createTime},#{updateTime},#{tenantId})
|
|
</insert>
|
|
</insert>
|
|
|
|
|
|
<!-- 根据主键查询一条记录 -->
|
|
<!-- 根据主键查询一条记录 -->
|
|
@@ -111,7 +113,7 @@
|
|
discount_price_ = #{discountPrice},
|
|
discount_price_ = #{discountPrice},
|
|
</if>
|
|
</if>
|
|
</set>
|
|
</set>
|
|
- WHERE id_ = #{id}
|
|
|
|
|
|
+ WHERE id_ = #{id} and tenant_id_ = #{tenantId}
|
|
</update>
|
|
</update>
|
|
|
|
|
|
<!-- 根据主键删除一条记录 -->
|
|
<!-- 根据主键删除一条记录 -->
|