|
@@ -1,39 +1,82 @@
|
|
|
<?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">
|
|
|
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
+ "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
|
<mapper namespace="com.yonge.cooleshow.biz.dal.dao.MusicSheetDao">
|
|
|
+ <resultMap id="BaseResultMap" type="com.yonge.cooleshow.biz.dal.entity.MusicSheet">
|
|
|
+ <id column="id_" jdbcType="BIGINT" property="id"/>
|
|
|
+ <result column="music_sheet_name_" jdbcType="VARCHAR" property="musicSheetName"/>
|
|
|
+ <result column="user_id_" jdbcType="BIGINT" property="userId"/>
|
|
|
+ <result column="composer_" jdbcType="VARCHAR" property="composer"/>
|
|
|
+ <result column="music_subject_" jdbcType="VARCHAR" property="musicSubject"/>
|
|
|
+ <result column="audio_type_" jdbcType="VARCHAR" property="audioType"/>
|
|
|
+ <result column="music_tag_" jdbcType="VARCHAR" property="musicTag"/>
|
|
|
+ <result column="play_speed_" jdbcType="INTEGER" property="playSpeed"/>
|
|
|
+ <result column="can_evaluate_" jdbcType="TINYINT" property="canEvaluate"/>
|
|
|
+ <result column="show_fingering_" jdbcType="TINYINT" property="showFingering"/>
|
|
|
+ <result column="charge_type_" jdbcType="TINYINT" property="chargeType"/>
|
|
|
+ <result column="audit_status_" jdbcType="TINYINT" property="auditStatus"/>
|
|
|
+ <result column="sort_number_" jdbcType="INTEGER" property="sortNumber"/>
|
|
|
+ <result column="top_flag_" jdbcType="TINYINT" property="topFlag"/>
|
|
|
+ <result column="hot_flag_" jdbcType="TINYINT" property="hotFlag"/>
|
|
|
+ <result column="music_price_" jdbcType="DECIMAL" property="musicPrice"/>
|
|
|
+ <result column="audio_file_url_" jdbcType="VARCHAR" property="audioFileUrl"/>
|
|
|
+ <result column="xml_file_url_" jdbcType="VARCHAR" property="xmlFileUrl"/>
|
|
|
+ <result column="has_beat_" jdbcType="TINYINT" property="hasBeat"/>
|
|
|
+ <result column="create_time_" jdbcType="TIMESTAMP" property="createTime"/>
|
|
|
+ <result column="create_by_" jdbcType="BIGINT" property="createBy"/>
|
|
|
+ <result column="update_time_" jdbcType="TIMESTAMP" property="updateTime"/>
|
|
|
+ <result column="update_by_" jdbcType="BIGINT" property="updateBy"/>
|
|
|
+ <result column="remark_" jdbcType="VARCHAR" property="remark"/>
|
|
|
+ </resultMap>
|
|
|
|
|
|
- <resultMap id="BaseResultMap" type="com.yonge.cooleshow.biz.dal.entity.MusicSheet">
|
|
|
- <id column="id_" jdbcType="BIGINT" property="id" />
|
|
|
- <result column="music_sheet_name_" jdbcType="VARCHAR" property="musicSheetName" />
|
|
|
- <result column="user_id_" jdbcType="BIGINT" property="userId" />
|
|
|
- <result column="composer_" jdbcType="VARCHAR" property="composer" />
|
|
|
- <result column="music_subject_" jdbcType="VARCHAR" property="musicSubject" />
|
|
|
- <result column="audio_type_" jdbcType="VARCHAR" property="audioType" />
|
|
|
- <result column="music_tag_" jdbcType="VARCHAR" property="musicTag" />
|
|
|
- <result column="play_speed_" jdbcType="INTEGER" property="playSpeed" />
|
|
|
- <result column="can_evaluate_" jdbcType="TINYINT" property="canEvaluate" />
|
|
|
- <result column="show_fingering_" jdbcType="TINYINT" property="showFingering" />
|
|
|
- <result column="charge_type_" jdbcType="TINYINT" property="chargeType" />
|
|
|
- <result column="audit_status_" jdbcType="TINYINT" property="auditStatus" />
|
|
|
- <result column="sort_number_" jdbcType="INTEGER" property="sortNumber" />
|
|
|
- <result column="top_flag_" jdbcType="TINYINT" property="topFlag" />
|
|
|
- <result column="hot_flag_" jdbcType="TINYINT" property="hotFlag" />
|
|
|
- <result column="music_price_" jdbcType="DECIMAL" property="musicPrice" />
|
|
|
- <result column="audio_file_url_" jdbcType="VARCHAR" property="audioFileUrl" />
|
|
|
- <result column="xml_file_url_" jdbcType="VARCHAR" property="xmlFileUrl" />
|
|
|
- <result column="has_beat_" jdbcType="TINYINT" property="hasBeat" />
|
|
|
- <result column="create_time_" jdbcType="TIMESTAMP" property="createTime" />
|
|
|
- <result column="create_by_" jdbcType="BIGINT" property="createBy" />
|
|
|
- <result column="update_time_" jdbcType="TIMESTAMP" property="updateTime" />
|
|
|
- <result column="update_by_" jdbcType="BIGINT" property="updateBy" />
|
|
|
- <result column="remark_" jdbcType="VARCHAR" property="remark" />
|
|
|
- </resultMap>
|
|
|
-
|
|
|
- <sql id="Base_Column_List">
|
|
|
- id_, music_sheet_name_, user_id_, composer_, music_subject_, audio_type_, music_tag_, play_speed_, can_evaluate_, show_fingering_, charge_type_, audit_status_, sort_number_, top_flag_, hot_flag_, music_price_, audio_file_url_, xml_file_url_, has_beat_, create_time_, create_by_, update_time_, update_by_, remark_
|
|
|
- </sql>
|
|
|
-
|
|
|
-
|
|
|
+ <sql id="Base_Column_List">
|
|
|
+ t.id_ as id ,
|
|
|
+ t.music_sheet_name_ as musicSheetName,
|
|
|
+ t.user_id_ as userId,
|
|
|
+ t.composer_ as composer,
|
|
|
+ t.music_subject_ as musicSubject,
|
|
|
+ t.audio_type_ as audioType,
|
|
|
+ t.music_tag_ as musicTag,
|
|
|
+ t.play_speed_ as playSpeed,
|
|
|
+ t.can_evaluate_ as canEvaluate,
|
|
|
+ t.show_fingering_ as showFingering,
|
|
|
+ t.charge_type_ as chargeType,
|
|
|
+ t.state_ as state,
|
|
|
+ t.audit_status_ as auditStatus,
|
|
|
+ t.sort_number_ as sortNumber,
|
|
|
+ t.top_flag_ as topFlag,
|
|
|
+ t.hot_flag_ as hotFlag,
|
|
|
+ t.music_price_ as musicPrice,
|
|
|
+ t.audio_file_url_ as audioFileUrl,
|
|
|
+ t.xml_file_url_ as xmlFileUrl,
|
|
|
+ t.has_beat_ as hasBeat,
|
|
|
+ t.create_time_ as createTime,
|
|
|
+ t.create_by_ as createBy,
|
|
|
+ t.update_time_ as updateTime,
|
|
|
+ t.update_by_ as updateBy,
|
|
|
+ t.remark_ as remark
|
|
|
+ </sql>
|
|
|
|
|
|
+ <select id="selectPage" resultType="com.yonge.cooleshow.biz.dal.vo.MusicSheetVo">
|
|
|
+ select <include refid="Base_Column_List"/>
|
|
|
+ ,su.username_ as addName
|
|
|
+ ,(select group_concat(mt.name_,',') from music_tag mt where mt.id_ in ( t.music_tag_) and mt.del_flag_ = 0) as musicTagNames
|
|
|
+ ,(select group_concat(s.name_,',') from subject s where s.id_ in ( t.music_subject_ )) as subjectNames
|
|
|
+ from music_sheet t
|
|
|
+ left join sys_user su on t.create_by_ = su.id_
|
|
|
+ <where>
|
|
|
+ <if test="param.idAndName != null and param.idAndName != ''">
|
|
|
+ and t.id_ like concat('%',#{param.idAndName},'%')
|
|
|
+ </if>
|
|
|
+ <if test="param.musicTagIds != null and param.musicTagIds != ''">
|
|
|
+ and t.music_tag_ like concat('%',#{param.musicTagIds},'%')
|
|
|
+ </if>
|
|
|
+ <if test="param.subjectIds != null and param.subjectIds != ''">
|
|
|
+ and t.music_subject_ like concat('%',#{param.subjectIds},'%')
|
|
|
+ </if>
|
|
|
+ <if test="param.state != null">
|
|
|
+ and t.state_ = #{param.state}
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
+ </select>
|
|
|
</mapper>
|