jelly 3 年 前
コミット
cce4094872
25 ファイル変更672 行追加189 行削除
  1. 7 0
      cooleshow-common/src/main/java/com/yonge/cooleshow/common/dal/BaseDAO.java
  2. 7 0
      cooleshow-common/src/main/java/com/yonge/cooleshow/common/service/BaseService.java
  3. 9 0
      cooleshow-common/src/main/java/com/yonge/cooleshow/common/service/impl/BaseServiceImpl.java
  4. 54 0
      cooleshow-user/user-admin/src/main/resources/application-dev.yml
  5. 54 0
      cooleshow-user/user-admin/src/main/resources/application-prod.yml
  6. 3 0
      cooleshow-user/user-admin/src/main/resources/application.yml
  7. 0 14
      cooleshow-user/user-admin/src/main/resources/bootstrap-dev.properties
  8. 12 0
      cooleshow-user/user-admin/src/main/resources/bootstrap-dev.yml
  9. 12 0
      cooleshow-user/user-admin/src/main/resources/bootstrap-prod.yml
  10. 77 39
      cooleshow-user/user-biz/src/main/resources/config/mybatis/AlbumMusicRelateMapper.xml
  11. 106 67
      cooleshow-user/user-biz/src/main/resources/config/mybatis/MusicAlbumMapper.xml
  12. 58 39
      cooleshow-user/user-biz/src/main/resources/config/mybatis/MusicSheetAccompanimentMapper.xml
  13. 54 0
      cooleshow-user/user-student/src/main/resources/application-dev.yml
  14. 54 0
      cooleshow-user/user-student/src/main/resources/application-prod.yml
  15. 3 0
      cooleshow-user/user-student/src/main/resources/application.yml
  16. 0 14
      cooleshow-user/user-student/src/main/resources/bootstrap-dev.properties
  17. 12 0
      cooleshow-user/user-student/src/main/resources/bootstrap-dev.yml
  18. 12 0
      cooleshow-user/user-student/src/main/resources/bootstrap-prod.yml
  19. 54 0
      cooleshow-user/user-teacher/src/main/resources/application-dev.yml
  20. 54 0
      cooleshow-user/user-teacher/src/main/resources/application-prod.yml
  21. 3 0
      cooleshow-user/user-teacher/src/main/resources/application.yml
  22. 0 14
      cooleshow-user/user-teacher/src/main/resources/bootstrap-dev.properties
  23. 12 0
      cooleshow-user/user-teacher/src/main/resources/bootstrap-dev.yml
  24. 12 0
      cooleshow-user/user-teacher/src/main/resources/bootstrap-prod.yml
  25. 3 2
      toolset/codegen/src/main/java/com/yonge/toolset/crud/core/generator/ModuleGenerateIntrospector.java

+ 7 - 0
cooleshow-common/src/main/java/com/yonge/cooleshow/common/dal/BaseDAO.java

@@ -39,6 +39,13 @@ public interface BaseDAO<PK extends Serializable, T>{
 	 * @return int
 	 */
 	public int delete(final PK id);
+
+    /**
+     * 删除对象
+     * @param bean
+     * @return
+     */
+    public int delete(T bean);
 	
 	/**
 	 * 写入实体对象

+ 7 - 0
cooleshow-common/src/main/java/com/yonge/cooleshow/common/service/BaseService.java

@@ -40,6 +40,13 @@ public interface BaseService<PK extends Serializable, T> {
 	 */
 	public int delete(final PK id);
 
+    /**
+     * 删除对象
+     * @param bean
+     * @return
+     */
+    public int delete(T bean);
+
 	/**
 	 * 写入实体对象
 	 * @author pengdc

+ 9 - 0
cooleshow-common/src/main/java/com/yonge/cooleshow/common/service/impl/BaseServiceImpl.java

@@ -70,6 +70,15 @@ public abstract class BaseServiceImpl<PK extends Serializable, T> implements Bas
 		return this.getDAO().delete(id);
 	}
 
+    /**
+     * 删除对象
+     * @param bean
+     * @return
+     */
+	public int delete(T bean){
+	    return this.getDAO().delete(bean);
+    }
+
 	/**
 	 * 写入实体对象
 	 * @param bean

+ 54 - 0
cooleshow-user/user-admin/src/main/resources/application-dev.yml

@@ -0,0 +1,54 @@
+server:
+  port: 8080
+  #address: 127.0.0.1
+  #sessionTimeout: 30
+  servlet:
+    context-path: /cooleshow
+  tomcat:
+      uri-encoding: UTF-8
+
+spring:
+  datasource:
+    url: jdbc:mysql://47.114.1.200:3306/mec_dev?useUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=Asia/Shanghai
+    username: mec_dev
+    password: dayaDataOnline@2019
+    driver-class-name: com.mysql.jdbc.Driver
+    debug: false
+    #Druid#
+    name: test
+    #type: com.alibaba.druid.pool.DruidDataSource
+    filters: stat
+    maxActive: 20
+    initialSize: 1
+    maxWait: 60000
+    minIdle: 1
+    timeBetweenEvictionRunsMillis: 60000
+    minEvictableIdleTimeMillis: 300000
+    validationQuery: select 'x'
+    testWhileIdle: true
+    testOnBorrow: false
+    testOnReturn: false
+    poolPreparedStatements: true
+    maxOpenPreparedStatements: 20
+
+
+mybatis:
+  typeAliasesPackage: com.yonge.cooleshow.biz.dal.entity
+  mapperLocations: classpath:config/mybatis/*.xml
+  #config-location: classpath:mybatis/mybatis-config.xml
+
+
+# e签宝电子签名
+eseal:
+  tsign:
+    projectid: 4438776254
+    projectSecret: a94cf63d6361084d232f345d71321691
+    apisUrl: http://smlitsm.tsign.cn:8080/tgmonitor/rest/app!getAPIInfo2
+
+# 金山云OSS存储
+storage:
+  sso:
+    accessKeyID: AKLTtTeIbadpRG-pil4S0Q4m-Q
+    accessKeySecret: OB1HmNOfDNW95wHoxMkP6IPFZXormk2ngA800TkvKAw7ozhiJGRqrMnnV8ZrAU3WRQ==
+    endpoint: ks3-cn-beijing.ksyun.com
+    bucketName: daya

+ 54 - 0
cooleshow-user/user-admin/src/main/resources/application-prod.yml

@@ -0,0 +1,54 @@
+server:
+  port: 9090
+  #address: 127.0.0.1
+  #sessionTimeout: 30
+  servlet:
+    context-path: /cooleshow
+  tomcat:
+    uri-encoding: UTF-8
+
+spring:
+  datasource:
+    url: jdbc:mysql://47.114.1.200:3306/mec_dev?useUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=Asia/Shanghai
+    username: mec_dev
+    password: dayaDataOnline@2019
+    driver-class-name: com.mysql.jdbc.Driver
+    debug: false
+    #Druid#
+    name: test
+    #type: com.alibaba.druid.pool.DruidDataSource
+    filters: stat
+    maxActive: 20
+    initialSize: 1
+    maxWait: 60000
+    minIdle: 1
+    timeBetweenEvictionRunsMillis: 60000
+    minEvictableIdleTimeMillis: 300000
+    validationQuery: select 'x'
+    testWhileIdle: true
+    testOnBorrow: false
+    testOnReturn: false
+    poolPreparedStatements: true
+    maxOpenPreparedStatements: 20
+
+
+mybatis:
+  typeAliasesPackage: com.yonge.cooleshow.biz.dal.entity
+  mapperLocations: classpath:config/mybatis/*.xml
+  #config-location: classpath:mybatis/mybatis-config.xml
+
+
+# e签宝电子签名
+eseal:
+  tsign:
+    projectid: 4438776254
+    projectSecret: a94cf63d6361084d232f345d71321691
+    apisUrl: http://smlitsm.tsign.cn:8080/tgmonitor/rest/app!getAPIInfo2
+
+# 金山云OSS存储
+storage:
+  sso:
+    accessKeyID: AKLTtTeIbadpRG-pil4S0Q4m-Q
+    accessKeySecret: OB1HmNOfDNW95wHoxMkP6IPFZXormk2ngA800TkvKAw7ozhiJGRqrMnnV8ZrAU3WRQ==
+    endpoint: ks3-cn-beijing.ksyun.com
+    bucketName: daya

+ 3 - 0
cooleshow-user/user-admin/src/main/resources/application.yml

@@ -0,0 +1,3 @@
+spring:
+  profiles:
+    active: dev

+ 0 - 14
cooleshow-user/user-admin/src/main/resources/bootstrap-dev.properties

@@ -1,14 +0,0 @@
-#\u670d\u52a1\u5668\u5730\u5740
-spring.cloud.nacos.config.server-addr=47.114.1.200:8848
-#\u9ed8\u8ba4\u4e3aPublic\u547d\u540d\u7a7a\u95f4,\u53ef\u4ee5\u7701\u7565\u4e0d\u5199
-spring.cloud.nacos.config.namespace=6f8374a9-598f-4889-bb17-476070ffb8de
-#\u6307\u5b9a\u914d\u7f6e\u7fa4\u7ec4 --\u5982\u679c\u662fPublic\u547d\u540d\u7a7a\u95f4 \u5219\u53ef\u4ee5\u7701\u7565\u7fa4\u7ec4\u914d\u7f6e
-spring.cloud.nacos.config.group=DEFAULT_GROUP
-#\u6587\u4ef6\u540d -- \u5982\u679c\u6ca1\u6709\u914d\u7f6e\u5219\u9ed8\u8ba4\u4e3a ${spring.appliction.name}
-spring.cloud.nacos.config.prefix=admin
-#\u6307\u5b9a\u6587\u4ef6\u540e\u7f00
-spring.cloud.nacos.config.file-extension=yaml
-#\u662f\u5426\u52a8\u6001\u5237\u65b0
-spring.cloud.nacos.config.refresh.enabled=true
-#\u662f\u5426\u542f\u7528nacos\u914d\u7f6e\u4e2d\u5fc3
-spring.cloud.nacos.config.enabled=true

+ 12 - 0
cooleshow-user/user-admin/src/main/resources/bootstrap-dev.yml

@@ -0,0 +1,12 @@
+spring:
+  cloud:
+    nacos:
+      config:
+        server-addr: 47.114.1.200:8848
+        namespace: 6f8374a9-598f-4889-bb17-476070ffb8de
+        group: DEFAULT_GROUP
+        prefix: student
+        file-extension: yaml
+        refresh:
+          enabled: true
+        enabled: true

+ 12 - 0
cooleshow-user/user-admin/src/main/resources/bootstrap-prod.yml

@@ -0,0 +1,12 @@
+spring:
+  cloud:
+    nacos:
+      config:
+        server-addr: 47.114.1.200:8848
+        namespace: 6f8374a9-598f-4889-bb17-476070ffb8de
+        group: DEFAULT_GROUP
+        prefix: student
+        file-extension: yaml
+        refresh:
+          enabled: true
+        enabled: true

+ 77 - 39
cooleshow-user/user-biz/src/main/resources/config/mybatis/AlbumMusicRelateMapper.xml

@@ -5,67 +5,84 @@
 不要修改此文件。所有改动将在下次重新自动生成时丢失。
 -->
 <mapper namespace="com.yonge.cooleshow.biz.dal.dao.AlbumMusicRelateDao">
-	
-	<resultMap type="com.yonge.cooleshow.biz.dal.entity.AlbumMusicRelate" id="AlbumMusicRelate">
-		<result column="id_" property="id" />
-		<result column="album_id_" property="albumId" />
-		<result column="music_sheet_id_" property="musicSheetId" />
-		<result column="order_num_" property="orderNum" />
-		<result column="create_time_" property="createTime" />
-		<result column="create_user_" property="createUser" />
-	</resultMap>
+
+    <resultMap id="BaseResultMap" type="com.yonge.cooleshow.biz.dal.entity.AlbumMusicRelate">
+        <id column="id" jdbcType="BIGINT" property="id" />
+        <result column="album_id_" jdbcType="BIGINT" property="albumId" />
+        <result column="music_sheet_id_" jdbcType="BIGINT" property="musicSheetId" />
+        <result column="order_num_" jdbcType="TINYINT" property="orderNum" />
+        <result column="create_time_" jdbcType="TIMESTAMP" property="createTime" />
+        <result column="create_user_" jdbcType="BIGINT" property="createUser" />
+    </resultMap>
 	
 	<!-- 根据主键查询一条记录 -->
-	<select id="get" resultMap="AlbumMusicRelate" >
+	<select id="get" resultMap="BaseResultMap" >
 		SELECT * FROM album_music_relate WHERE id_ = #{id} 
 	</select>
 	
 	<!-- 全查询 -->
-	<select id="findAll" resultMap="AlbumMusicRelate">
+	<select id="findAll" resultMap="BaseResultMap">
 		SELECT * FROM album_music_relate ORDER BY id_
 	</select>
 	
 	<!-- 向数据库增加一条记录 -->
 	<insert id="insert" parameterType="com.yonge.cooleshow.biz.dal.entity.AlbumMusicRelate" useGeneratedKeys="true" keyColumn="id" keyProperty="id">
-		<!--
-		<selectKey resultClass="int" keyProperty="id" > 
-		SELECT SEQ_WSDEFINITION_ID.nextval AS ID FROM DUAL 
-		</selectKey>
-		-->
-		INSERT INTO album_music_relate (id_,album_id_,music_sheet_id_,order_num_,create_time_,create_user_) VALUES(#{id},#{albumId},#{musicSheetId},#{orderNum},#{createTime},#{createUser})
-	</insert>
+        insert into album_music_relate
+        (album_id_,music_sheet_id_,order_num_,create_time_,create_user_)
+        values
+        (#{albumId},#{musicSheetId},#{orderNum},sysdate(),#{createUser})
+    </insert>
 	
 	<!-- 根据主键查询一条记录 -->
 	<update id="update" parameterType="com.yonge.cooleshow.biz.dal.entity.AlbumMusicRelate">
-		UPDATE album_music_relate <set>
-<if test="musicSheetId != null">
-music_sheet_id_ = #{musicSheetId},
-</if>
-<if test="createUser != null">
-create_user_ = #{createUser},
-</if>
-<if test="id != null">
-id_ = #{id},
-</if>
-<if test="albumId != null">
-album_id_ = #{albumId},
-</if>
-<if test="orderNum != null">
-order_num_ = #{orderNum},
-</if>
-<if test="createTime != null">
-create_time_ = #{createTime},
-</if>
-</set> WHERE id_ = #{id} 
+		UPDATE album_music_relate
+        <set>
+            <if test="albumId != null">
+                album_id_ = #{albumId},
+            </if>
+            <if test="musicSheetId != null">
+                music_sheet_id_ = #{musicSheetId},
+            </if>
+            <if test="orderNum != null">
+                order_num_ = #{orderNum},
+            </if>
+            <if test="createTime != null">
+                create_time_ = #{createTime},
+            </if>
+            <if test="createUser != null">
+                create_user_ = #{createUser},
+            </if>
+        </set>
+        where id_ = #{id}
 	</update>
 	
 	<!-- 根据主键删除一条记录 -->
 	<delete id="delete" >
 		DELETE FROM album_music_relate WHERE id_ = #{id} 
 	</delete>
+
+    <delete id="delete" parameterType="com.yonge.cooleshow.biz.dal.entity.AlbumMusicRelate">
+        delete from album_music_relate
+        where 1=1
+        <if test="albumId != null and albumId != ''">
+            and album_id_ = #{albumId}
+        </if>
+        <if test="musicSheetId != null and musicSheetId != ''">
+            and music_sheet_id_ = #{musicSheetId}
+        </if>
+        <if test="orderNum != null and orderNum != ''">
+            and order_num_ = #{orderNum}
+        </if>
+        <if test="createTime != null and createTime != ''">
+            and create_time_ = #{createTime}
+        </if>
+        <if test="createUser != null and createUser != ''">
+            and create_user_ = #{createUser}
+        </if>
+    </delete>
 	
 	<!-- 分页查询 -->
-	<select id="queryPage" resultMap="AlbumMusicRelate" parameterType="map">
+	<select id="queryPage" resultMap="BaseResultMap" parameterType="map">
 		SELECT * FROM album_music_relate ORDER BY id_ <include refid="global.limit"/>
 	</select>
 	
@@ -73,4 +90,25 @@ create_time_ = #{createTime},
 	<select id="queryCount" resultType="int">
 		SELECT COUNT(*) FROM album_music_relate
 	</select>
+
+    <select id="findList" parameterType="com.yonge.cooleshow.biz.dal.entity.AlbumMusicRelate" resultMap="BaseResultMap">
+        select *
+        from album_music_relate
+        where 1=1
+        <if test="albumId != null">
+            and album_id_ = #{albumId}
+        </if>
+        <if test="musicSheetId != null">
+            and music_sheet_id_ = #{musicSheetId}
+        </if>
+        <if test="orderNum != null">
+            and order_num_ = #{orderNum}
+        </if>
+        <if test="createTime != null">
+            and create_time_ = #{createTime}
+        </if>
+        <if test="createUser != null">
+            and create_user_ = #{createUser}
+        </if>
+    </select>
 </mapper>

+ 106 - 67
cooleshow-user/user-biz/src/main/resources/config/mybatis/MusicAlbumMapper.xml

@@ -5,86 +5,83 @@
 不要修改此文件。所有改动将在下次重新自动生成时丢失。
 -->
 <mapper namespace="com.yonge.cooleshow.biz.dal.dao.MusicAlbumDao">
-	
-	<resultMap type="com.yonge.cooleshow.biz.dal.entity.MusicAlbum" id="MusicAlbum">
-		<result column="id_" property="id" />
-		<result column="album_name_" property="albumName" />
-		<result column="album_desc_" property="albumDesc" />
-		<result column="album_tag_" property="albumTag" />
-		<result column="album_cover_url_" property="albumCoverUrl" />
-		<result column="album_status_" property="albumStatus" />
-		<result column="order_no_" property="orderNo" />
-		<result column="hot_flag_" property="hotFlag" />
-		<result column="top_flag_" property="topFlag" />
-		<result column="create_time_" property="createTime" />
-		<result column="create_user_" property="createUser" />
-		<result column="update_time_" property="updateTime" />
-		<result column="update_user_" property="updateUser" />
-	</resultMap>
+
+    <resultMap id="BaseResultMap" type="com.yonge.cooleshow.biz.dal.entity.MusicAlbum">
+        <id column="id" jdbcType="BIGINT" property="id" />
+        <result column="album_name_" jdbcType="VARCHAR" property="albumName" />
+        <result column="album_desc_" jdbcType="VARCHAR" property="albumDesc" />
+        <result column="album_tag_" jdbcType="VARCHAR" property="albumTag" />
+        <result column="album_cover_url_" jdbcType="VARCHAR" property="albumCoverUrl" />
+        <result column="album_status_" jdbcType="TINYINT" property="albumStatus" />
+        <result column="order_no_" jdbcType="INTEGER" property="orderNo" />
+        <result column="hot_flag_" jdbcType="TINYINT" property="hotFlag" />
+        <result column="top_flag_" jdbcType="TINYINT" property="topFlag" />
+        <result column="create_time_" jdbcType="TIMESTAMP" property="createTime" />
+        <result column="create_user_" jdbcType="INTEGER" property="createUser" />
+        <result column="update_time_" jdbcType="TIMESTAMP" property="updateTime" />
+        <result column="update_user_" jdbcType="INTEGER" property="updateUser" />
+    </resultMap>
 	
 	<!-- 根据主键查询一条记录 -->
-	<select id="get" resultMap="MusicAlbum" >
+	<select id="get" resultMap="BaseResultMap" >
 		SELECT * FROM music_album WHERE id_ = #{id} 
 	</select>
 	
 	<!-- 全查询 -->
-	<select id="findAll" resultMap="MusicAlbum">
+	<select id="findAll" resultMap="BaseResultMap">
 		SELECT * FROM music_album ORDER BY id_
 	</select>
 	
 	<!-- 向数据库增加一条记录 -->
 	<insert id="insert" parameterType="com.yonge.cooleshow.biz.dal.entity.MusicAlbum" useGeneratedKeys="true" keyColumn="id" keyProperty="id">
-		<!--
-		<selectKey resultClass="int" keyProperty="id" > 
-		SELECT SEQ_WSDEFINITION_ID.nextval AS ID FROM DUAL 
-		</selectKey>
-		-->
-		INSERT INTO music_album (id_,album_name_,album_desc_,album_tag_,album_cover_url_,album_status_,order_no_,hot_flag_,top_flag_,create_time_,create_user_,update_time_,update_user_) VALUES(#{id},#{albumName},#{albumDesc},#{albumTag},#{albumCoverUrl},#{albumStatus},#{orderNo},#{hotFlag},#{topFlag},#{createTime},#{createUser},#{updateTime},#{updateUser})
-	</insert>
+        insert into music_album
+        (album_name_,album_desc_,album_tag_,album_cover_url_,album_status_,order_no_,hot_flag_,top_flag_,create_time_,create_user_,update_time_,update_user_)
+        values
+        (#{albumName},#{albumDesc},#{albumTag},#{albumCoverUrl},#{albumStatus},#{orderNo},#{hotFlag},#{topFlag},sysdate(),#{createUser},#{updateTime},#{updateUser})
+    </insert>
 	
 	<!-- 根据主键查询一条记录 -->
 	<update id="update" parameterType="com.yonge.cooleshow.biz.dal.entity.MusicAlbum">
-		UPDATE music_album <set>
-<if test="orderNo != null">
-order_no_ = #{orderNo},
-</if>
-<if test="topFlag != null">
-top_flag_ = #{topFlag},
-</if>
-<if test="createUser != null">
-create_user_ = #{createUser},
-</if>
-<if test="updateUser != null">
-update_user_ = #{updateUser},
-</if>
-<if test="id != null">
-id_ = #{id},
-</if>
-<if test="albumTag != null">
-album_tag_ = #{albumTag},
-</if>
-<if test="albumCoverUrl != null">
-album_cover_url_ = #{albumCoverUrl},
-</if>
-<if test="albumDesc != null">
-album_desc_ = #{albumDesc},
-</if>
-<if test="albumStatus != null">
-album_status_ = #{albumStatus},
-</if>
-<if test="hotFlag != null">
-hot_flag_ = #{hotFlag},
-</if>
-<if test="createTime != null">
-create_time_ = #{createTime},
-</if>
-<if test="updateTime != null">
-update_time_ = #{updateTime},
-</if>
-<if test="albumName != null">
-album_name_ = #{albumName},
-</if>
-</set> WHERE id_ = #{id} 
+		UPDATE music_album
+        <set>
+        <if test="albumName != null and albumName != ''">
+            album_name_ = #{albumName},
+        </if>
+        <if test="albumDesc != null and albumDesc != ''">
+            album_desc_ = #{albumDesc},
+        </if>
+        <if test="albumTag != null and albumTag != ''">
+            album_tag_ = #{albumTag},
+        </if>
+        <if test="albumCoverUrl != null and albumCoverUrl != ''">
+            album_cover_url_ = #{albumCoverUrl},
+        </if>
+        <if test="albumStatus != null">
+            album_status_ = #{albumStatus},
+        </if>
+        <if test="orderNo != null">
+            order_no_ = #{orderNo},
+        </if>
+        <if test="hotFlag != null">
+            hot_flag_ = #{hotFlag},
+        </if>
+        <if test="topFlag != null">
+            top_flag_ = #{topFlag},
+        </if>
+        <if test="createTime != null">
+            create_time_ = #{createTime},
+        </if>
+        <if test="createUser != null">
+            create_user_ = #{createUser},
+        </if>
+        <if test="updateTime != null">
+            update_time_ = #{updateTime},
+        </if>
+        <if test="updateUser != null">
+            update_user_ = #{updateUser},
+        </if>
+        </set> 
+        WHERE id_ = #{id}
 	</update>
 	
 	<!-- 根据主键删除一条记录 -->
@@ -93,7 +90,7 @@ album_name_ = #{albumName},
 	</delete>
 	
 	<!-- 分页查询 -->
-	<select id="queryPage" resultMap="MusicAlbum" parameterType="map">
+	<select id="queryPage" resultMap="BaseResultMap" parameterType="map">
 		SELECT * FROM music_album ORDER BY id_ <include refid="global.limit"/>
 	</select>
 	
@@ -101,4 +98,46 @@ album_name_ = #{albumName},
 	<select id="queryCount" resultType="int">
 		SELECT COUNT(*) FROM music_album
 	</select>
+
+    <select id="findList" parameterType="MusicAlbum" resultMap="BaseResultMap">
+        select *
+        from music_album
+        where 1=1
+        <if test="albumName != null and albumName != ''">
+            and album_name_ = #{albumName}
+        </if>
+        <if test="albumDesc != null and albumDesc != ''">
+            and album_desc_ = #{albumDesc}
+        </if>
+        <if test="albumTag != null and albumTag != ''">
+            and album_tag_ = #{albumTag}
+        </if>
+        <if test="albumCoverUrl != null and albumCoverUrl != ''">
+            and album_cover_url_ = #{albumCoverUrl}
+        </if>
+        <if test="albumStatus != null">
+            and album_status_ = #{albumStatus}
+        </if>
+        <if test="orderNo != null">
+            and order_no_ = #{orderNo}
+        </if>
+        <if test="hotFlag != null">
+            and hot_flag_ = #{hotFlag}
+        </if>
+        <if test="topFlag != null">
+            and top_flag_ = #{topFlag}
+        </if>
+        <if test="createTime != null">
+            and create_time_ = #{createTime}
+        </if>
+        <if test="createUser != null">
+            and create_user_ = #{createUser}
+        </if>
+        <if test="updateTime != null">
+            and update_time_ = #{updateTime}
+        </if>
+        <if test="updateUser != null">
+            and update_user_ = #{updateUser}
+        </if>
+    </select>
 </mapper>

+ 58 - 39
cooleshow-user/user-biz/src/main/resources/config/mybatis/MusicSheetAccompanimentMapper.xml

@@ -5,58 +5,55 @@
 不要修改此文件。所有改动将在下次重新自动生成时丢失。
 -->
 <mapper namespace="com.yonge.cooleshow.biz.dal.dao.MusicSheetAccompanimentDao">
-	
-	<resultMap type="com.yonge.cooleshow.biz.dal.entity.MusicSheetAccompaniment" id="MusicSheetAccompaniment">
-		<result column="id_" property="id" />
-		<result column="music_id_" property="musicId" />
-		<result column="instrument_" property="instrument" />
-		<result column="accompaniment_url_" property="accompanimentUrl" />
-		<result column="create_time_" property="createTime" />
-		<result column="create_user_" property="createUser" />
-	</resultMap>
+
+    <resultMap id="BaseResultMap" type="com.yonge.cooleshow.biz.dal.entity.MusicSheetAccompaniment">
+        <id column="id" jdbcType="BIGINT" property="id" />
+        <result column="music_id_" jdbcType="BIGINT" property="musicId" />
+        <result column="instrument_" jdbcType="VARCHAR" property="instrument" />
+        <result column="accompaniment_url_" jdbcType="VARCHAR" property="accompanimentUrl" />
+        <result column="create_time_" jdbcType="TIMESTAMP" property="createTime" />
+        <result column="create_user_" jdbcType="BIGINT" property="createUser" />
+    </resultMap>
 	
 	<!-- 根据主键查询一条记录 -->
-	<select id="get" resultMap="MusicSheetAccompaniment" >
+	<select id="get" resultMap="BaseResultMap" >
 		SELECT * FROM music_sheet_accompaniment WHERE id_ = #{id} 
 	</select>
 	
 	<!-- 全查询 -->
-	<select id="findAll" resultMap="MusicSheetAccompaniment">
+	<select id="findAll" resultMap="BaseResultMap">
 		SELECT * FROM music_sheet_accompaniment ORDER BY id_
 	</select>
 	
 	<!-- 向数据库增加一条记录 -->
 	<insert id="insert" parameterType="com.yonge.cooleshow.biz.dal.entity.MusicSheetAccompaniment" useGeneratedKeys="true" keyColumn="id" keyProperty="id">
-		<!--
-		<selectKey resultClass="int" keyProperty="id" > 
-		SELECT SEQ_WSDEFINITION_ID.nextval AS ID FROM DUAL 
-		</selectKey>
-		-->
-		INSERT INTO music_sheet_accompaniment (id_,music_id_,instrument_,accompaniment_url_,create_time_,create_user_) VALUES(#{id},#{musicId},#{instrument},#{accompanimentUrl},#{createTime},#{createUser})
-	</insert>
+        insert into music_sheet_accompaniment
+        (music_id_,instrument_,accompaniment_url_,create_time_,create_user_)
+        values
+        (#{musicId},#{instrument},#{accompanimentUrl},sysdate(),#{createUser})
+    </insert>
 	
 	<!-- 根据主键查询一条记录 -->
 	<update id="update" parameterType="com.yonge.cooleshow.biz.dal.entity.MusicSheetAccompaniment">
-		UPDATE music_sheet_accompaniment <set>
-<if test="accompanimentUrl != null">
-accompaniment_url_ = #{accompanimentUrl},
-</if>
-<if test="createUser != null">
-create_user_ = #{createUser},
-</if>
-<if test="id != null">
-id_ = #{id},
-</if>
-<if test="instrument != null">
-instrument_ = #{instrument},
-</if>
-<if test="musicId != null">
-music_id_ = #{musicId},
-</if>
-<if test="createTime != null">
-create_time_ = #{createTime},
-</if>
-</set> WHERE id_ = #{id} 
+		UPDATE music_sheet_accompaniment
+        <set>
+            <if test="musicId != null">
+                music_id_ = #{musicId},
+            </if>
+            <if test="instrument != null and instrument != ''">
+                instrument_ = #{instrument},
+            </if>
+            <if test="accompanimentUrl != null and accompanimentUrl != ''">
+                accompaniment_url_ = #{accompanimentUrl},
+            </if>
+            <if test="createTime != null">
+                create_time_ = #{createTime},
+            </if>
+            <if test="createUser != null">
+                create_user_ = #{createUser},
+            </if>
+        </set>
+       WHERE id_ = #{id}
 	</update>
 	
 	<!-- 根据主键删除一条记录 -->
@@ -65,7 +62,7 @@ create_time_ = #{createTime},
 	</delete>
 	
 	<!-- 分页查询 -->
-	<select id="queryPage" resultMap="MusicSheetAccompaniment" parameterType="map">
+	<select id="queryPage" resultMap="BaseResultMap" parameterType="map">
 		SELECT * FROM music_sheet_accompaniment ORDER BY id_ <include refid="global.limit"/>
 	</select>
 	
@@ -73,4 +70,26 @@ create_time_ = #{createTime},
 	<select id="queryCount" resultType="int">
 		SELECT COUNT(*) FROM music_sheet_accompaniment
 	</select>
+
+    <select id="findList" parameterType="MusicSheetAccompaniment" resultMap="BaseResultMap">
+        select
+        <include refid="Base_Column_List" />
+        from music_sheet_accompaniment
+        where 1=1
+        <if test="musicId != null">
+            and music_id_ = #{musicId}
+        </if>
+        <if test="instrument != null and instrument != ''">
+            and instrument_ = #{instrument}
+        </if>
+        <if test="accompanimentUrl != null and accompanimentUrl != ''">
+            and accompaniment_url_ = #{accompanimentUrl}
+        </if>
+        <if test="createTime != null">
+            and create_time_ = #{createTime}
+        </if>
+        <if test="createUser != null">
+            and create_user_ = #{createUser}
+        </if>
+    </select>
 </mapper>

+ 54 - 0
cooleshow-user/user-student/src/main/resources/application-dev.yml

@@ -0,0 +1,54 @@
+server:
+  port: 8080
+  #address: 127.0.0.1
+  #sessionTimeout: 30
+  servlet:
+    context-path: /cooleshow
+  tomcat:
+      uri-encoding: UTF-8
+
+spring:
+  datasource:
+    url: jdbc:mysql://47.114.1.200:3306/mec_dev?useUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=Asia/Shanghai
+    username: mec_dev
+    password: dayaDataOnline@2019
+    driver-class-name: com.mysql.jdbc.Driver
+    debug: false
+    #Druid#
+    name: test
+    #type: com.alibaba.druid.pool.DruidDataSource
+    filters: stat
+    maxActive: 20
+    initialSize: 1
+    maxWait: 60000
+    minIdle: 1
+    timeBetweenEvictionRunsMillis: 60000
+    minEvictableIdleTimeMillis: 300000
+    validationQuery: select 'x'
+    testWhileIdle: true
+    testOnBorrow: false
+    testOnReturn: false
+    poolPreparedStatements: true
+    maxOpenPreparedStatements: 20
+
+
+mybatis:
+  typeAliasesPackage: com.yonge.cooleshow.biz.dal.entity
+  mapperLocations: classpath:config/mybatis/*.xml
+  #config-location: classpath:mybatis/mybatis-config.xml
+
+
+# e签宝电子签名
+eseal:
+  tsign:
+    projectid: 4438776254
+    projectSecret: a94cf63d6361084d232f345d71321691
+    apisUrl: http://smlitsm.tsign.cn:8080/tgmonitor/rest/app!getAPIInfo2
+
+# 金山云OSS存储
+storage:
+  sso:
+    accessKeyID: AKLTtTeIbadpRG-pil4S0Q4m-Q
+    accessKeySecret: OB1HmNOfDNW95wHoxMkP6IPFZXormk2ngA800TkvKAw7ozhiJGRqrMnnV8ZrAU3WRQ==
+    endpoint: ks3-cn-beijing.ksyun.com
+    bucketName: daya

+ 54 - 0
cooleshow-user/user-student/src/main/resources/application-prod.yml

@@ -0,0 +1,54 @@
+server:
+  port: 9090
+  #address: 127.0.0.1
+  #sessionTimeout: 30
+  servlet:
+    context-path: /cooleshow
+  tomcat:
+    uri-encoding: UTF-8
+
+spring:
+  datasource:
+    url: jdbc:mysql://47.114.1.200:3306/mec_dev?useUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=Asia/Shanghai
+    username: mec_dev
+    password: dayaDataOnline@2019
+    driver-class-name: com.mysql.jdbc.Driver
+    debug: false
+    #Druid#
+    name: test
+    #type: com.alibaba.druid.pool.DruidDataSource
+    filters: stat
+    maxActive: 20
+    initialSize: 1
+    maxWait: 60000
+    minIdle: 1
+    timeBetweenEvictionRunsMillis: 60000
+    minEvictableIdleTimeMillis: 300000
+    validationQuery: select 'x'
+    testWhileIdle: true
+    testOnBorrow: false
+    testOnReturn: false
+    poolPreparedStatements: true
+    maxOpenPreparedStatements: 20
+
+
+mybatis:
+  typeAliasesPackage: com.yonge.cooleshow.biz.dal.entity
+  mapperLocations: classpath:config/mybatis/*.xml
+  #config-location: classpath:mybatis/mybatis-config.xml
+
+
+# e签宝电子签名
+eseal:
+  tsign:
+    projectid: 4438776254
+    projectSecret: a94cf63d6361084d232f345d71321691
+    apisUrl: http://smlitsm.tsign.cn:8080/tgmonitor/rest/app!getAPIInfo2
+
+# 金山云OSS存储
+storage:
+  sso:
+    accessKeyID: AKLTtTeIbadpRG-pil4S0Q4m-Q
+    accessKeySecret: OB1HmNOfDNW95wHoxMkP6IPFZXormk2ngA800TkvKAw7ozhiJGRqrMnnV8ZrAU3WRQ==
+    endpoint: ks3-cn-beijing.ksyun.com
+    bucketName: daya

+ 3 - 0
cooleshow-user/user-student/src/main/resources/application.yml

@@ -0,0 +1,3 @@
+spring:
+  profiles:
+    active: dev

+ 0 - 14
cooleshow-user/user-student/src/main/resources/bootstrap-dev.properties

@@ -1,14 +0,0 @@
-#\u670d\u52a1\u5668\u5730\u5740
-spring.cloud.nacos.config.server-addr=47.114.1.200:8848
-#\u9ed8\u8ba4\u4e3aPublic\u547d\u540d\u7a7a\u95f4,\u53ef\u4ee5\u7701\u7565\u4e0d\u5199
-spring.cloud.nacos.config.namespace=6f8374a9-598f-4889-bb17-476070ffb8de
-#\u6307\u5b9a\u914d\u7f6e\u7fa4\u7ec4 --\u5982\u679c\u662fPublic\u547d\u540d\u7a7a\u95f4 \u5219\u53ef\u4ee5\u7701\u7565\u7fa4\u7ec4\u914d\u7f6e
-spring.cloud.nacos.config.group=DEFAULT_GROUP
-#\u6587\u4ef6\u540d -- \u5982\u679c\u6ca1\u6709\u914d\u7f6e\u5219\u9ed8\u8ba4\u4e3a ${spring.appliction.name}
-spring.cloud.nacos.config.prefix=student
-#\u6307\u5b9a\u6587\u4ef6\u540e\u7f00
-spring.cloud.nacos.config.file-extension=yaml
-#\u662f\u5426\u52a8\u6001\u5237\u65b0
-spring.cloud.nacos.config.refresh.enabled=true
-#\u662f\u5426\u542f\u7528nacos\u914d\u7f6e\u4e2d\u5fc3
-spring.cloud.nacos.config.enabled=true

+ 12 - 0
cooleshow-user/user-student/src/main/resources/bootstrap-dev.yml

@@ -0,0 +1,12 @@
+spring:
+  cloud:
+    nacos:
+      config:
+        server-addr: 47.114.1.200:8848
+        namespace: 6f8374a9-598f-4889-bb17-476070ffb8de
+        group: DEFAULT_GROUP
+        prefix: student
+        file-extension: yaml
+        refresh:
+          enabled: true
+        enabled: true

+ 12 - 0
cooleshow-user/user-student/src/main/resources/bootstrap-prod.yml

@@ -0,0 +1,12 @@
+spring:
+  cloud:
+    nacos:
+      config:
+        server-addr: 47.114.1.200:8848
+        namespace: 6f8374a9-598f-4889-bb17-476070ffb8de
+        group: DEFAULT_GROUP
+        prefix: student
+        file-extension: yaml
+        refresh:
+          enabled: true
+        enabled: true

+ 54 - 0
cooleshow-user/user-teacher/src/main/resources/application-dev.yml

@@ -0,0 +1,54 @@
+server:
+  port: 8080
+  #address: 127.0.0.1
+  #sessionTimeout: 30
+  servlet:
+    context-path: /cooleshow
+  tomcat:
+      uri-encoding: UTF-8
+
+spring:
+  datasource:
+    url: jdbc:mysql://47.114.1.200:3306/mec_dev?useUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=Asia/Shanghai
+    username: mec_dev
+    password: dayaDataOnline@2019
+    driver-class-name: com.mysql.jdbc.Driver
+    debug: false
+    #Druid#
+    name: test
+    #type: com.alibaba.druid.pool.DruidDataSource
+    filters: stat
+    maxActive: 20
+    initialSize: 1
+    maxWait: 60000
+    minIdle: 1
+    timeBetweenEvictionRunsMillis: 60000
+    minEvictableIdleTimeMillis: 300000
+    validationQuery: select 'x'
+    testWhileIdle: true
+    testOnBorrow: false
+    testOnReturn: false
+    poolPreparedStatements: true
+    maxOpenPreparedStatements: 20
+
+
+mybatis:
+  typeAliasesPackage: com.yonge.cooleshow.biz.dal.entity
+  mapperLocations: classpath:config/mybatis/*.xml
+  #config-location: classpath:mybatis/mybatis-config.xml
+
+
+# e签宝电子签名
+eseal:
+  tsign:
+    projectid: 4438776254
+    projectSecret: a94cf63d6361084d232f345d71321691
+    apisUrl: http://smlitsm.tsign.cn:8080/tgmonitor/rest/app!getAPIInfo2
+
+# 金山云OSS存储
+storage:
+  sso:
+    accessKeyID: AKLTtTeIbadpRG-pil4S0Q4m-Q
+    accessKeySecret: OB1HmNOfDNW95wHoxMkP6IPFZXormk2ngA800TkvKAw7ozhiJGRqrMnnV8ZrAU3WRQ==
+    endpoint: ks3-cn-beijing.ksyun.com
+    bucketName: daya

+ 54 - 0
cooleshow-user/user-teacher/src/main/resources/application-prod.yml

@@ -0,0 +1,54 @@
+server:
+  port: 9090
+  #address: 127.0.0.1
+  #sessionTimeout: 30
+  servlet:
+    context-path: /cooleshow
+  tomcat:
+    uri-encoding: UTF-8
+
+spring:
+  datasource:
+    url: jdbc:mysql://47.114.1.200:3306/mec_dev?useUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=Asia/Shanghai
+    username: mec_dev
+    password: dayaDataOnline@2019
+    driver-class-name: com.mysql.jdbc.Driver
+    debug: false
+    #Druid#
+    name: test
+    #type: com.alibaba.druid.pool.DruidDataSource
+    filters: stat
+    maxActive: 20
+    initialSize: 1
+    maxWait: 60000
+    minIdle: 1
+    timeBetweenEvictionRunsMillis: 60000
+    minEvictableIdleTimeMillis: 300000
+    validationQuery: select 'x'
+    testWhileIdle: true
+    testOnBorrow: false
+    testOnReturn: false
+    poolPreparedStatements: true
+    maxOpenPreparedStatements: 20
+
+
+mybatis:
+  typeAliasesPackage: com.yonge.cooleshow.biz.dal.entity
+  mapperLocations: classpath:config/mybatis/*.xml
+  #config-location: classpath:mybatis/mybatis-config.xml
+
+
+# e签宝电子签名
+eseal:
+  tsign:
+    projectid: 4438776254
+    projectSecret: a94cf63d6361084d232f345d71321691
+    apisUrl: http://smlitsm.tsign.cn:8080/tgmonitor/rest/app!getAPIInfo2
+
+# 金山云OSS存储
+storage:
+  sso:
+    accessKeyID: AKLTtTeIbadpRG-pil4S0Q4m-Q
+    accessKeySecret: OB1HmNOfDNW95wHoxMkP6IPFZXormk2ngA800TkvKAw7ozhiJGRqrMnnV8ZrAU3WRQ==
+    endpoint: ks3-cn-beijing.ksyun.com
+    bucketName: daya

+ 3 - 0
cooleshow-user/user-teacher/src/main/resources/application.yml

@@ -0,0 +1,3 @@
+spring:
+  profiles:
+    active: dev

+ 0 - 14
cooleshow-user/user-teacher/src/main/resources/bootstrap-dev.properties

@@ -1,14 +0,0 @@
-#\u670d\u52a1\u5668\u5730\u5740
-spring.cloud.nacos.config.server-addr=47.114.1.200:8848
-#\u9ed8\u8ba4\u4e3aPublic\u547d\u540d\u7a7a\u95f4,\u53ef\u4ee5\u7701\u7565\u4e0d\u5199
-spring.cloud.nacos.config.namespace=6f8374a9-598f-4889-bb17-476070ffb8de
-#\u6307\u5b9a\u914d\u7f6e\u7fa4\u7ec4 --\u5982\u679c\u662fPublic\u547d\u540d\u7a7a\u95f4 \u5219\u53ef\u4ee5\u7701\u7565\u7fa4\u7ec4\u914d\u7f6e
-spring.cloud.nacos.config.group=DEFAULT_GROUP
-#\u6587\u4ef6\u540d -- \u5982\u679c\u6ca1\u6709\u914d\u7f6e\u5219\u9ed8\u8ba4\u4e3a ${spring.appliction.name}
-spring.cloud.nacos.config.prefix=teacher
-#\u6307\u5b9a\u6587\u4ef6\u540e\u7f00
-spring.cloud.nacos.config.file-extension=yaml
-#\u662f\u5426\u52a8\u6001\u5237\u65b0
-spring.cloud.nacos.config.refresh.enabled=true
-#\u662f\u5426\u542f\u7528nacos\u914d\u7f6e\u4e2d\u5fc3
-spring.cloud.nacos.config.enabled=true

+ 12 - 0
cooleshow-user/user-teacher/src/main/resources/bootstrap-dev.yml

@@ -0,0 +1,12 @@
+spring:
+  cloud:
+    nacos:
+      config:
+        server-addr: 47.114.1.200:8848
+        namespace: 6f8374a9-598f-4889-bb17-476070ffb8de
+        group: DEFAULT_GROUP
+        prefix: student
+        file-extension: yaml
+        refresh:
+          enabled: true
+        enabled: true

+ 12 - 0
cooleshow-user/user-teacher/src/main/resources/bootstrap-prod.yml

@@ -0,0 +1,12 @@
+spring:
+  cloud:
+    nacos:
+      config:
+        server-addr: 47.114.1.200:8848
+        namespace: 6f8374a9-598f-4889-bb17-476070ffb8de
+        group: DEFAULT_GROUP
+        prefix: student
+        file-extension: yaml
+        refresh:
+          enabled: true
+        enabled: true

+ 3 - 2
toolset/codegen/src/main/java/com/yonge/toolset/crud/core/generator/ModuleGenerateIntrospector.java

@@ -121,13 +121,14 @@ public class ModuleGenerateIntrospector {
 		params.put("insertSQL", insertSQL);
 		if (StringUtils.isNotBlank(criteria)) {
 			// 修改
-			String updateSQL = "UPDATE " + tableName + " <set>\n<if test=\"";
+			String updateSQL = "UPDATE " + tableName + " \n<set>\n<if test=\"";
 			for (Entry<String, String> entry : fieldPropMapping.entrySet()) {
 				updateSQL += entry.getValue() + " != null\">\n" + (entry.getKey() + " = #{" + entry.getValue() + "},\n</if>\n<if test=\"");
 			}
 			// 删除最后一个“,”
 			updateSQL = updateSQL.substring(0, updateSQL.length() - 10);
-			updateSQL += ("</set> WHERE " + criteria);
+			updateSQL += ("</set>");
+            updateSQL += (" WHERE " + criteria);
 			params.put("updateSQL", updateSQL);
 			// 根据主键查询
 			String querySingleSQL = queryBaseSQL + " WHERE " + criteria;