|
@@ -13,6 +13,7 @@
|
|
|
<result column="operator_" property="operator"/>
|
|
|
<result column="memo_" property="memo"/>
|
|
|
<result column="create_time_" property="createTime"/>
|
|
|
+ <result column="tenant_id_" property="tenantId" />
|
|
|
<result column="real_name_" property="realName"/>
|
|
|
</resultMap>
|
|
|
|
|
@@ -23,14 +24,14 @@
|
|
|
|
|
|
<!-- 全查询 -->
|
|
|
<select id="findAll" resultMap="MusicGroupBuildLog">
|
|
|
- SELECT * FROM music_group_build_log ORDER BY id_
|
|
|
+ SELECT * FROM music_group_build_log where tenant_id_ = #{tenantId} ORDER BY id_
|
|
|
</select>
|
|
|
|
|
|
<!-- 向数据库增加一条记录 -->
|
|
|
<insert id="insert" parameterType="com.ym.mec.biz.dal.entity.MusicGroupBuildLog" useGeneratedKeys="true"
|
|
|
keyColumn="id" keyProperty="id">
|
|
|
- INSERT INTO music_group_build_log (music_group_id_,event_,operator_,memo_,create_time_)
|
|
|
- VALUES(#{musicGroupId},#{event},#{operator},#{memo},now())
|
|
|
+ INSERT INTO music_group_build_log (music_group_id_,event_,operator_,memo_,create_time_,tenant_id_)
|
|
|
+ VALUES(#{musicGroupId},#{event},#{operator},#{memo},now(),#{tenantId})
|
|
|
</insert>
|
|
|
|
|
|
<!-- 根据主键查询一条记录 -->
|
|
@@ -50,7 +51,7 @@
|
|
|
music_group_id_ = #{musicGroupId},
|
|
|
</if>
|
|
|
</set>
|
|
|
- WHERE id_ = #{id}
|
|
|
+ WHERE id_ = #{id} and tenant_id_ = #{tenantId}
|
|
|
</update>
|
|
|
|
|
|
<!-- 根据主键删除一条记录 -->
|
|
@@ -60,13 +61,13 @@
|
|
|
|
|
|
<!-- 分页查询 -->
|
|
|
<select id="queryPage" resultMap="MusicGroupBuildLog" parameterType="map">
|
|
|
- SELECT * FROM music_group_build_log ORDER BY id_
|
|
|
+ SELECT * FROM music_group_build_log where tenant_id_ = #{tenantId} ORDER BY id_
|
|
|
<include refid="global.limit"/>
|
|
|
</select>
|
|
|
|
|
|
<!-- 查询当前表的总记录数 -->
|
|
|
<select id="queryCount" resultType="int">
|
|
|
- SELECT COUNT(*) FROM music_group_build_log
|
|
|
+ SELECT COUNT(*) FROM music_group_build_log where tenant_id_ = #{tenantId}
|
|
|
</select>
|
|
|
<select id="findById" resultMap="MusicGroupBuildLog">
|
|
|
SELECT mgbl.*,su.real_name_ FROM music_group_build_log mgbl LEFT JOIN sys_user su ON mgbl.operator_ = su.id_
|