yonge 3 年之前
父节点
当前提交
43620e0392

+ 10 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/entity/SysMusicScore.java

@@ -65,6 +65,8 @@ public class SysMusicScore {
 
 	private String rankIds;
 	
+	private String renderFrom;
+	
 	/**  */
 	private java.util.Date updateTime;
 	
@@ -150,6 +152,14 @@ public class SysMusicScore {
 		this.rankIds = rankIds;
 	}
 
+	public String getRenderFrom() {
+		return renderFrom;
+	}
+
+	public void setRenderFrom(String renderFrom) {
+		this.renderFrom = renderFrom;
+	}
+
 	public ClientTypeEnum getClientType() {
 		return clientType;
 	}

+ 10 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/entity/SysMusicScoreCategories.java

@@ -41,6 +41,8 @@ public class SysMusicScoreCategories {
 	private Integer order;
 
 	private Integer musicScoreNum;
+	
+	private String soundResource;
 
 	public Integer getMusicScoreNum() {
 		return musicScoreNum;
@@ -156,6 +158,14 @@ public class SysMusicScoreCategories {
 		return this.updateTime;
 	}
 			
+	public String getSoundResource() {
+		return soundResource;
+	}
+
+	public void setSoundResource(String soundResource) {
+		this.soundResource = soundResource;
+	}
+
 	@Override
 	public String toString() {
 		return ToStringBuilder.reflectionToString(this);

+ 11 - 4
mec-biz/src/main/resources/config/mybatis/SysMusicScoreCategoriesMapper.xml

@@ -17,6 +17,7 @@
 		<result column="order_" property="order" />
 		<result column="organ_name_" property="organNames" />
 		<result column="music_score_num_" property="musicScoreNum" />
+		<result column="sound_resource_" property="soundResource" />
 		<result column="create_time_" property="createTime" />
 		<result column="update_time_" property="updateTime" />
 	</resultMap>
@@ -33,14 +34,14 @@
 	
 	<!-- 向数据库增加一条记录 -->
 	<insert id="insert" parameterType="com.ym.mec.biz.dal.entity.SysMusicScoreCategories" useGeneratedKeys="true" keyColumn="id" keyProperty="id">
-		INSERT INTO sys_music_score_categories (parent_id_,name_,cover_img_,operator_id_,create_time_,update_time_,organ_id_,order_)
-		VALUES(#{parentId},#{name},#{coverImg},#{operatorId},NOW(),NOW(),#{organId},#{order})
+		INSERT INTO sys_music_score_categories (parent_id_,name_,cover_img_,operator_id_,create_time_,update_time_,organ_id_,order_,sound_resource_)
+		VALUES(#{parentId},#{name},#{coverImg},#{operatorId},NOW(),NOW(),#{organId},#{order},#{soundResource})
 	</insert>
 	<insert id="batchInsert">
-		INSERT INTO sys_music_score_categories (parent_id_,name_,cover_img_,operator_id_,create_time_,update_time_,organ_id_,enable_,order_)
+		INSERT INTO sys_music_score_categories (parent_id_,name_,cover_img_,operator_id_,create_time_,update_time_,organ_id_,enable_,order_,sound_resource_)
 		VALUES
 		<foreach collection="categoriesList" item="bean" separator=",">
-			(#{bean.parentId},#{bean.name},#{bean.coverImg},#{bean.operatorId},NOW(),NOW(),#{organId},#{enable},#{bean.order})
+			(#{bean.parentId},#{bean.name},#{bean.coverImg},#{bean.operatorId},NOW(),NOW(),#{organId},#{enable},#{bean.order},#{bean.soundResource})
 		</foreach>
 	</insert>
 
@@ -71,6 +72,9 @@
 			<if test="name != null">
 				name_ = #{name},
 			</if>
+			<if test="soundResource != null">
+				sound_resource_ = #{soundResource},
+			</if>
 				update_time_ = NOW()
 	</set> WHERE id_ = #{id}
 	</update>
@@ -95,6 +99,9 @@
 			<if test="bean.name != null">
 				name_ = #{bean.name},
 			</if>
+			<if test="bean.soundResource != null">
+				sound_resource_ = #{bean.soundResource},
+			</if>
 			update_time_ = NOW()
 		</set> WHERE id_ = #{bean.id}
 		</foreach>

+ 6 - 2
mec-biz/src/main/resources/config/mybatis/SysMusicScoreMapper.xml

@@ -26,6 +26,7 @@
 		<result column="show_flag_" property="showFlag" />
 		<result column="order_" property="order" />
 		<result column="rank_ids_" property="rankIds" />
+		<result column="render_from_" property="renderFrom" />
 		<result column="subject_id_" property="subjectId" />
 		<result column="client_type_" property="clientType" typeHandler="com.ym.mec.common.dal.CustomEnumTypeHandler"/>
 		<result column="update_time_" property="updateTime" />
@@ -45,10 +46,10 @@
 	<!-- 向数据库增加一条记录 -->
 	<insert id="insert" parameterType="com.ym.mec.biz.dal.entity.SysMusicScore" useGeneratedKeys="true" keyColumn="id" keyProperty="id">
 		INSERT INTO sys_music_score (music_score_categories_id_,name_,type_,speed_,url_,metronome_url_,create_user_id_,order_,
-		                             update_time_,create_time_,client_type_,rank_ids_,show_flag_)
+		                             update_time_,create_time_,client_type_,rank_ids_,render_from_,show_flag_)
 		VALUES(#{musicScoreCategoriesId},#{name},#{type,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},
 		       #{speed},#{url},#{metronomeUrl},#{createUserId},#{order},NOW(),NOW(),#{clientType,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},
-		       #{rankIds},#{showFlag})
+		       #{rankIds},#{renderFrom},#{showFlag})
 	</insert>
 
 	<!-- 根据主键查询一条记录 -->
@@ -61,6 +62,9 @@
 			client_type_ = #{clientType,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},
 		</if>
 			rank_ids_ = #{rankIds},
+		<if test="renderFrom != null">
+			render_from_ = #{renderFrom},
+		</if>
 		<if test="order != null">
 			order_ = #{order},
 		</if>