Browse Source

Merge branch 'master' of https://gitee.com/zouxuan/mec

zouxuan 6 years ago
parent
commit
8a58e0662f

+ 0 - 9
mec-web/src/main/java/com/ym/mec/web/dal/dao/SubjectPlanGoodsMapperDao.java

@@ -1,9 +0,0 @@
-package com.ym.mec.web.dal.dao;
-
-import com.ym.mec.common.dal.BaseDAO;
-import com.ym.mec.web.dal.entity.SubjectPlanGoodsMapper;
-
-public interface SubjectPlanGoodsMapperDao extends BaseDAO<Long, SubjectPlanGoodsMapper> {
-
-	
-}

+ 15 - 4
mec-web/src/main/java/com/ym/mec/web/dal/entity/SubjectGoodsMapper.java

@@ -3,7 +3,7 @@ package com.ym.mec.web.dal.entity;
 import org.apache.commons.lang3.builder.ToStringBuilder;
 import org.apache.commons.lang3.builder.ToStringBuilder;
 
 
 /**
 /**
- * 对应数据库表(subject_goods_mapper):
+ * 对应数据库表(subject_plan_goods_mapper):
  */
  */
 public class SubjectGoodsMapper {
 public class SubjectGoodsMapper {
 
 
@@ -11,7 +11,10 @@ public class SubjectGoodsMapper {
 	private Long id;
 	private Long id;
 	
 	
 	/**  */
 	/**  */
-	private Integer subjectId;
+	private Integer musicGroupId;
+	
+	/**  */
+	private String subjectId;
 	
 	
 	/**  */
 	/**  */
 	private Integer goodsId;
 	private Integer goodsId;
@@ -30,11 +33,19 @@ public class SubjectGoodsMapper {
 		return this.id;
 		return this.id;
 	}
 	}
 			
 			
-	public void setSubjectId(Integer subjectId){
+	public void setMusicGroupId(Integer musicGroupId){
+		this.musicGroupId = musicGroupId;
+	}
+	
+	public Integer getMusicGroupId(){
+		return this.musicGroupId;
+	}
+			
+	public void setSubjectId(String subjectId){
 		this.subjectId = subjectId;
 		this.subjectId = subjectId;
 	}
 	}
 	
 	
-	public Integer getSubjectId(){
+	public String getSubjectId(){
 		return this.subjectId;
 		return this.subjectId;
 	}
 	}
 			
 			

+ 0 - 81
mec-web/src/main/java/com/ym/mec/web/dal/entity/SubjectPlanGoodsMapper.java

@@ -1,81 +0,0 @@
-package com.ym.mec.web.dal.entity;
-
-import org.apache.commons.lang3.builder.ToStringBuilder;
-
-/**
- * 对应数据库表(subject_plan_goods_mapper):
- */
-public class SubjectPlanGoodsMapper {
-
-	/**  */
-	private Long id;
-	
-	/**  */
-	private Integer musicGroupId;
-	
-	/**  */
-	private String subjectId;
-	
-	/**  */
-	private Integer goodsId;
-	
-	/**  */
-	private java.util.Date createTime;
-	
-	/**  */
-	private java.util.Date updateTime;
-	
-	public void setId(Long id){
-		this.id = id;
-	}
-	
-	public Long getId(){
-		return this.id;
-	}
-			
-	public void setMusicGroupId(Integer musicGroupId){
-		this.musicGroupId = musicGroupId;
-	}
-	
-	public Integer getMusicGroupId(){
-		return this.musicGroupId;
-	}
-			
-	public void setSubjectId(String subjectId){
-		this.subjectId = subjectId;
-	}
-	
-	public String getSubjectId(){
-		return this.subjectId;
-	}
-			
-	public void setGoodsId(Integer goodsId){
-		this.goodsId = goodsId;
-	}
-	
-	public Integer getGoodsId(){
-		return this.goodsId;
-	}
-			
-	public void setCreateTime(java.util.Date createTime){
-		this.createTime = createTime;
-	}
-	
-	public java.util.Date getCreateTime(){
-		return this.createTime;
-	}
-			
-	public void setUpdateTime(java.util.Date updateTime){
-		this.updateTime = updateTime;
-	}
-	
-	public java.util.Date getUpdateTime(){
-		return this.updateTime;
-	}
-			
-	@Override
-	public String toString() {
-		return ToStringBuilder.reflectionToString(this);
-	}
-
-}

+ 0 - 8
mec-web/src/main/java/com/ym/mec/web/service/SubjectPlanGoodsMapperService.java

@@ -1,8 +0,0 @@
-package com.ym.mec.web.service;
-
-import com.ym.mec.common.service.BaseService;
-import com.ym.mec.web.dal.entity.SubjectPlanGoodsMapper;
-
-public interface SubjectPlanGoodsMapperService extends BaseService<Long, SubjectPlanGoodsMapper> {
-
-}

+ 2 - 2
mec-web/src/main/java/com/ym/mec/web/service/impl/SubjectGoodsMapperServiceImpl.java

@@ -13,11 +13,11 @@ import com.ym.mec.web.service.SubjectGoodsMapperService;
 public class SubjectGoodsMapperServiceImpl extends BaseServiceImpl<Long, SubjectGoodsMapper>  implements SubjectGoodsMapperService {
 public class SubjectGoodsMapperServiceImpl extends BaseServiceImpl<Long, SubjectGoodsMapper>  implements SubjectGoodsMapperService {
 	
 	
 	@Autowired
 	@Autowired
-	private SubjectGoodsMapperDao subjectGoodsMapperDao;
+	private SubjectGoodsMapperDao subjectPlanGoodsMapperDao;
 
 
 	@Override
 	@Override
 	public BaseDAO<Long, SubjectGoodsMapper> getDAO() {
 	public BaseDAO<Long, SubjectGoodsMapper> getDAO() {
-		return subjectGoodsMapperDao;
+		return subjectPlanGoodsMapperDao;
 	}
 	}
 	
 	
 }
 }

+ 0 - 23
mec-web/src/main/java/com/ym/mec/web/service/impl/SubjectPlanGoodsMapperServiceImpl.java

@@ -1,23 +0,0 @@
-package com.ym.mec.web.service.impl;
-
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-
-import com.ym.mec.common.dal.BaseDAO;
-import com.ym.mec.common.service.impl.BaseServiceImpl;
-import com.ym.mec.web.dal.dao.SubjectPlanGoodsMapperDao;
-import com.ym.mec.web.dal.entity.SubjectPlanGoodsMapper;
-import com.ym.mec.web.service.SubjectPlanGoodsMapperService;
-
-@Service
-public class SubjectPlanGoodsMapperServiceImpl extends BaseServiceImpl<Long, SubjectPlanGoodsMapper>  implements SubjectPlanGoodsMapperService {
-	
-	@Autowired
-	private SubjectPlanGoodsMapperDao subjectPlanGoodsMapperDao;
-
-	@Override
-	public BaseDAO<Long, SubjectPlanGoodsMapper> getDAO() {
-		return subjectPlanGoodsMapperDao;
-	}
-	
-}

+ 12 - 8
mec-web/src/main/resources/config.mybatis/SubjectGoodsMapperMapper.xml

@@ -8,6 +8,7 @@
 
 
     <resultMap type="com.ym.mec.web.dal.entity.SubjectGoodsMapper" id="SubjectGoodsMapper">
     <resultMap type="com.ym.mec.web.dal.entity.SubjectGoodsMapper" id="SubjectGoodsMapper">
         <result column="id_" property="id"/>
         <result column="id_" property="id"/>
+        <result column="music_group_id_" property="musicGroupId"/>
         <result column="subject_id_" property="subjectId"/>
         <result column="subject_id_" property="subjectId"/>
         <result column="goods_id_" property="goodsId"/>
         <result column="goods_id_" property="goodsId"/>
         <result column="create_time_" property="createTime"/>
         <result column="create_time_" property="createTime"/>
@@ -16,12 +17,12 @@
 
 
     <!-- 根据主键查询一条记录 -->
     <!-- 根据主键查询一条记录 -->
     <select id="get" resultMap="SubjectGoodsMapper">
     <select id="get" resultMap="SubjectGoodsMapper">
-		SELECT * FROM subject_goods_mapper WHERE id_ = #{id} 
+		SELECT * FROM subject_plan_goods_mapper WHERE id_ = #{id} 
 	</select>
 	</select>
 
 
     <!-- 全查询 -->
     <!-- 全查询 -->
     <select id="findAll" resultMap="SubjectGoodsMapper">
     <select id="findAll" resultMap="SubjectGoodsMapper">
-		SELECT * FROM subject_goods_mapper ORDER BY id_
+		SELECT * FROM subject_plan_goods_mapper ORDER BY id_
 	</select>
 	</select>
 
 
     <!-- 向数据库增加一条记录 -->
     <!-- 向数据库增加一条记录 -->
@@ -32,13 +33,13 @@
         SELECT SEQ_WSDEFINITION_ID.nextval AS ID FROM DUAL
         SELECT SEQ_WSDEFINITION_ID.nextval AS ID FROM DUAL
         </selectKey>
         </selectKey>
         -->
         -->
-        INSERT INTO subject_goods_mapper (id_,subject_id_,goods_id_,create_time_,update_time_)
-        VALUES(#{id},#{subjectId},#{goodsId},#{createTime},#{updateTime})
+        INSERT INTO subject_plan_goods_mapper (id_,music_group_id_,subject_id_,goods_id_,create_time_,update_time_)
+        VALUES(#{id},#{musicGroupId},#{subjectId},#{goodsId},#{createTime},#{updateTime})
     </insert>
     </insert>
 
 
     <!-- 根据主键查询一条记录 -->
     <!-- 根据主键查询一条记录 -->
     <update id="update" parameterType="com.ym.mec.web.dal.entity.SubjectGoodsMapper">
     <update id="update" parameterType="com.ym.mec.web.dal.entity.SubjectGoodsMapper">
-        UPDATE subject_goods_mapper
+        UPDATE subject_plan_goods_mapper
         <set>
         <set>
             <if test="subjectId != null">
             <if test="subjectId != null">
                 subject_id_ = #{subjectId},
                 subject_id_ = #{subjectId},
@@ -46,6 +47,9 @@
             <if test="updateTime != null">
             <if test="updateTime != null">
                 update_time_ = #{updateTime},
                 update_time_ = #{updateTime},
             </if>
             </if>
+            <if test="musicGroupId != null">
+                music_group_id_ = #{musicGroupId},
+            </if>
             <if test="goodsId != null">
             <if test="goodsId != null">
                 goods_id_ = #{goodsId},
                 goods_id_ = #{goodsId},
             </if>
             </if>
@@ -55,17 +59,17 @@
 
 
     <!-- 根据主键删除一条记录 -->
     <!-- 根据主键删除一条记录 -->
     <delete id="delete">
     <delete id="delete">
-		DELETE FROM subject_goods_mapper WHERE id_ = #{id} 
+		DELETE FROM subject_plan_goods_mapper WHERE id_ = #{id} 
 	</delete>
 	</delete>
 
 
     <!-- 分页查询 -->
     <!-- 分页查询 -->
     <select id="queryPage" resultMap="SubjectGoodsMapper" parameterType="map">
     <select id="queryPage" resultMap="SubjectGoodsMapper" parameterType="map">
-        SELECT * FROM subject_goods_mapper ORDER BY id_
+        SELECT * FROM subject_plan_goods_mapper ORDER BY id_
         <include refid="global.limit"/>
         <include refid="global.limit"/>
     </select>
     </select>
 
 
     <!-- 查询当前表的总记录数 -->
     <!-- 查询当前表的总记录数 -->
     <select id="queryCount" resultType="int">
     <select id="queryCount" resultType="int">
-		SELECT COUNT(*) FROM subject_goods_mapper
+		SELECT COUNT(*) FROM subject_plan_goods_mapper
 	</select>
 	</select>
 </mapper>
 </mapper>

+ 0 - 75
mec-web/src/main/resources/config.mybatis/SubjectPlanGoodsMapperMapper.xml

@@ -1,75 +0,0 @@
-<?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">
-<!--
-这个文件是自动生成的。
-不要修改此文件。所有改动将在下次重新自动生成时丢失。
--->
-<mapper namespace="com.ym.mec.web.dal.dao.SubjectPlanGoodsMapperDao">
-
-    <resultMap type="com.ym.mec.web.dal.entity.SubjectPlanGoodsMapper" id="SubjectPlanGoodsMapper">
-        <result column="id_" property="id"/>
-        <result column="music_group_id_" property="musicGroupId"/>
-        <result column="subject_id_" property="subjectId"/>
-        <result column="goods_id_" property="goodsId"/>
-        <result column="create_time_" property="createTime"/>
-        <result column="update_time_" property="updateTime"/>
-    </resultMap>
-
-    <!-- 根据主键查询一条记录 -->
-    <select id="get" resultMap="SubjectPlanGoodsMapper">
-		SELECT * FROM subject_plan_goods_mapper WHERE id_ = #{id} 
-	</select>
-
-    <!-- 全查询 -->
-    <select id="findAll" resultMap="SubjectPlanGoodsMapper">
-		SELECT * FROM subject_plan_goods_mapper ORDER BY id_
-	</select>
-
-    <!-- 向数据库增加一条记录 -->
-    <insert id="insert" parameterType="com.ym.mec.web.dal.entity.SubjectPlanGoodsMapper" useGeneratedKeys="true"
-            keyColumn="id" keyProperty="id">
-        <!--
-        <selectKey resultClass="int" keyProperty="id" >
-        SELECT SEQ_WSDEFINITION_ID.nextval AS ID FROM DUAL
-        </selectKey>
-        -->
-        INSERT INTO subject_plan_goods_mapper (id_,music_group_id_,subject_id_,goods_id_,create_time_,update_time_)
-        VALUES(#{id},#{musicGroupId},#{subjectId},#{goodsId},#{createTime},#{updateTime})
-    </insert>
-
-    <!-- 根据主键查询一条记录 -->
-    <update id="update" parameterType="com.ym.mec.web.dal.entity.SubjectPlanGoodsMapper">
-        UPDATE subject_plan_goods_mapper
-        <set>
-            <if test="subjectId != null">
-                subject_id_ = #{subjectId},
-            </if>
-            <if test="updateTime != null">
-                update_time_ = #{updateTime},
-            </if>
-            <if test="musicGroupId != null">
-                music_group_id_ = #{musicGroupId},
-            </if>
-            <if test="goodsId != null">
-                goods_id_ = #{goodsId},
-            </if>
-        </set>
-        WHERE id_ = #{id}
-    </update>
-
-    <!-- 根据主键删除一条记录 -->
-    <delete id="delete">
-		DELETE FROM subject_plan_goods_mapper WHERE id_ = #{id} 
-	</delete>
-
-    <!-- 分页查询 -->
-    <select id="queryPage" resultMap="SubjectPlanGoodsMapper" parameterType="map">
-        SELECT * FROM subject_plan_goods_mapper ORDER BY id_
-        <include refid="global.limit"/>
-    </select>
-
-    <!-- 查询当前表的总记录数 -->
-    <select id="queryCount" resultType="int">
-		SELECT COUNT(*) FROM subject_plan_goods_mapper
-	</select>
-</mapper>