zouxuan 5 年之前
父節點
當前提交
37b8ecc1a3

+ 88 - 3
mec-im/pom.xml

@@ -17,10 +17,95 @@
   </properties>
   <dependencies>
     <dependency>
-      <groupId>junit</groupId>
-      <artifactId>junit</artifactId>
-      <version>3.8.1</version>
+      <groupId>org.springframework.boot</groupId>
+      <artifactId>spring-boot-starter-web</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.springframework.boot</groupId>
+      <artifactId>spring-boot-starter-data-jpa</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.springframework.boot</groupId>
+      <artifactId>spring-boot-starter-data-redis</artifactId>
+    </dependency>
+
+    <dependency>
+      <groupId>mysql</groupId>
+      <artifactId>mysql-connector-java</artifactId>
+      <scope>runtime</scope>
+    </dependency>
+    <dependency>
+      <groupId>com.alibaba</groupId>
+      <artifactId>druid-spring-boot-starter</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.projectlombok</groupId>
+      <artifactId>lombok</artifactId>
+      <optional>true</optional>
+    </dependency>
+    <dependency>
+      <groupId>org.springframework.boot</groupId>
+      <artifactId>spring-boot-starter-test</artifactId>
       <scope>test</scope>
     </dependency>
+    <!-- https://mvnrepository.com/artifact/commons-lang/commons-lang -->
+    <dependency>
+      <groupId>commons-lang</groupId>
+      <artifactId>commons-lang</artifactId>
+      <version>2.6</version>
+    </dependency>
+    <dependency>
+      <groupId>org.springframework.boot</groupId>
+      <artifactId>spring-boot-starter-aop</artifactId>
+    </dependency>
+    <!-- https://mvnrepository.com/artifact/io.jsonwebtoken/jjwt -->
+    <!--<dependency>
+      <groupId>io.jsonwebtoken</groupId>
+      <artifactId>jjwt</artifactId>
+      <version>0.7.0</version>
+    </dependency>-->
+    <dependency>
+      <groupId>org.springframework.cloud</groupId>
+      <artifactId>spring-cloud-starter-oauth2</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>com.alibaba</groupId>
+      <artifactId>fastjson</artifactId>
+      <version>1.2.46</version>
+    </dependency>
+    <!-- https://mvnrepository.com/artifact/commons-codec/commons-codec -->
+    <dependency>
+      <groupId>commons-codec</groupId>
+      <artifactId>commons-codec</artifactId>
+      <version>1.9</version>
+    </dependency>
+    <!-- https://mvnrepository.com/artifact/joda-time/joda-time -->
+    <dependency>
+      <groupId>joda-time</groupId>
+      <artifactId>joda-time</artifactId>
+      <version>2.8.1</version>
+    </dependency>
+    <dependency>
+      <groupId>cn.rongcloud.im</groupId>
+      <artifactId>server-sdk-java</artifactId>
+      <version>3.0.6</version>
+    </dependency>
+    <dependency>
+      <groupId>org.springframework.cloud</groupId>
+      <artifactId>spring-cloud-starter-netflix-eureka-client</artifactId>
+    </dependency>
   </dependencies>
+
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.springframework.boot</groupId>
+        <artifactId>spring-boot-maven-plugin</artifactId>
+      </plugin>
+      <plugin>
+        <groupId>com.spotify</groupId>
+        <artifactId>docker-maven-plugin</artifactId>
+      </plugin>
+    </plugins>
+  </build>
 </project>

+ 19 - 0
mec-web/src/main/java/com/ym/mec/web/controller/MusicGroupController.java

@@ -3,6 +3,7 @@ package com.ym.mec.web.controller;
 import com.ym.mec.common.controller.BaseController;
 import com.ym.mec.web.dal.entity.MusicGroup;
 import com.ym.mec.web.dal.page.MusicGroupQueryInfo;
+import com.ym.mec.web.dal.utilEntity.SubSettingUtilEntity;
 import com.ym.mec.web.service.MusicGroupService;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
@@ -10,6 +11,7 @@ import io.swagger.annotations.ApiParam;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 import java.util.Date;
+import java.util.List;
 
 @RequestMapping("musicGroup")
 @Api(tags = "乐团服务")
@@ -56,4 +58,21 @@ public class MusicGroupController extends BaseController {
         return succeed(musicGroupService.queryPage(queryInfo));
     }
 
+    @ApiOperation(value = "建团申请,提交声部设置")
+    @PostMapping("/subSet")
+    public Object subSet(List<SubSettingUtilEntity> subSettingUtilEntitys){
+        musicGroupService.subSetting(subSettingUtilEntitys);
+        return succeed();
+    }
+
+    @ApiOperation(value = "建团申请,根据乐团编号获取已有声部设置")
+    @PostMapping("/subSet")
+    public Object getSubSetting(@RequestBody Integer musicGroupId){
+        return succeed(musicGroupService.getSubSetting(musicGroupId));
+    }
+
+    public Object financeFeeSet(){
+        return succeed();
+    }
+
 }

+ 1 - 1
mec-web/src/main/java/com/ym/mec/web/controller/OrganizationController.java

@@ -47,7 +47,7 @@ public class OrganizationController extends BaseController {
 
     @ApiOperation(value = "修改机构信息")
     @PutMapping("/update")
-    public Object update(Organization organization){
+    public Object update(@RequestBody Organization organization){
         Organization organizationByCode = organizationService.findByCode(organization.getCode());
         if(organizationByCode != null && !organizationByCode.getId().equals(organization.getId())){
             return failed("组织机构代码已存在,请更改");

+ 9 - 1
mec-web/src/main/java/com/ym/mec/web/dal/dao/MusicGroupSubjectGoodsGroupDao.java

@@ -2,8 +2,16 @@ package com.ym.mec.web.dal.dao;
 
 import com.ym.mec.common.dal.BaseDAO;
 import com.ym.mec.web.dal.entity.MusicGroupSubjectGoodsGroup;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
 
 public interface MusicGroupSubjectGoodsGroupDao extends BaseDAO<Long, MusicGroupSubjectGoodsGroup> {
 
-	
+    /**
+     * 批量保存
+     * @param musicGroupSubjectGoodsGroups
+     * @return
+     */
+    int batchInsert(@Param("mappers") List<MusicGroupSubjectGoodsGroup> musicGroupSubjectGoodsGroups);
 }

+ 0 - 9
mec-web/src/main/java/com/ym/mec/web/dal/dao/MusicGroupSubjectGoodsMapperDao.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.MusicGroupSubjectGoodsMapper;
-
-public interface MusicGroupSubjectGoodsMapperDao extends BaseDAO<Long, MusicGroupSubjectGoodsMapper> {
-
-	
-}

+ 17 - 9
mec-web/src/main/java/com/ym/mec/web/dal/entity/MusicGroupSubjectGoodsGroup.java

@@ -1,5 +1,7 @@
 package com.ym.mec.web.dal.entity;
 
+import com.ym.mec.web.dal.enums.GoodsType;
+import io.swagger.annotations.ApiModelProperty;
 import org.apache.commons.lang3.builder.ToStringBuilder;
 
 /**
@@ -11,18 +13,23 @@ public class MusicGroupSubjectGoodsGroup {
 	private Long id;
 	
 	/** 名称 */
+	@ApiModelProperty(value = "商品打包名称",required = false)
 	private String name;
 	
 	/** 类型(乐器、辅件、教材) */
-	private String type;
+	@ApiModelProperty(value = "商品类型",required = false)
+	private GoodsType type;
 	
 	/**  */
+	@ApiModelProperty(value = "乐团编号",required = false)
 	private Integer musicGroupId;
 	
 	/**  */
+	@ApiModelProperty(value = "科目编号",required = false)
 	private Integer subjectId;
 	
-	/** 商品列表(用户|分开) */
+	/** 商品列表(用逗号,分开) */
+	@ApiModelProperty(value = "商品列表(用逗号,分开)",required = false)
 	private String goodsIdList;
 	
 	/**  */
@@ -32,6 +39,7 @@ public class MusicGroupSubjectGoodsGroup {
 	private java.util.Date updateTime;
 	
 	/** 打包价格 */
+	@ApiModelProperty(value = "打包价格",required = false)
 	private long price;
 	
 	public void setId(Long id){
@@ -49,15 +57,15 @@ public class MusicGroupSubjectGoodsGroup {
 	public String getName(){
 		return this.name;
 	}
-			
-	public void setType(String type){
-		this.type = type;
+
+	public GoodsType getType() {
+		return type;
 	}
-	
-	public String getType(){
-		return this.type;
+
+	public void setType(GoodsType type) {
+		this.type = type;
 	}
-			
+
 	public void setMusicGroupId(Integer musicGroupId){
 		this.musicGroupId = musicGroupId;
 	}

+ 0 - 103
mec-web/src/main/java/com/ym/mec/web/dal/entity/MusicGroupSubjectGoodsMapper.java

@@ -1,103 +0,0 @@
-package com.ym.mec.web.dal.entity;
-
-import org.apache.commons.lang3.builder.ToStringBuilder;
-
-/**
- * 对应数据库表(music_group_subject_goods_mapper):
- */
-public class MusicGroupSubjectGoodsMapper {
-
-	/**  */
-	private Long id;
-	
-	/**  */
-	private Integer organId;
-	
-	/**  */
-	private Integer musicGroupId;
-	
-	/**  */
-	private String subjectId;
-	
-	/**  */
-	private Integer goodsId;
-	
-	/**  */
-	private java.util.Date createTime;
-	
-	/**  */
-	private java.util.Date updateTime;
-	
-	/** 类型(乐器、辅件、教材) */
-	private String type;
-	
-	public void setId(Long id){
-		this.id = id;
-	}
-	
-	public Long getId(){
-		return this.id;
-	}
-			
-	public void setOrganId(Integer organId){
-		this.organId = organId;
-	}
-	
-	public Integer getOrganId(){
-		return this.organId;
-	}
-			
-	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;
-	}
-			
-	public void setType(String type){
-		this.type = type;
-	}
-	
-	public String getType(){
-		return this.type;
-	}
-			
-	@Override
-	public String toString() {
-		return ToStringBuilder.reflectionToString(this);
-	}
-
-}

+ 7 - 7
mec-web/src/main/java/com/ym/mec/web/dal/entity/MusicGroupSubjectPlan.java

@@ -38,7 +38,7 @@ public class MusicGroupSubjectPlan {
 	
 	/** 乐器团购类型对应的费用 */
 	@ApiModelProperty(value = "乐器团购类型对应的费用",required = false)
-	private long kitFee;
+	private long depositFee;
 	
 	/**  */
 	private java.util.Date createTime;
@@ -102,14 +102,14 @@ public class MusicGroupSubjectPlan {
 		this.kitGroupPurchaseType = kitGroupPurchaseType;
 	}
 
-	public void setKitFee(long kitFee){
-		this.kitFee = kitFee;
+	public long getDepositFee() {
+		return depositFee;
 	}
-	
-	public long getKitFee(){
-		return this.kitFee;
+
+	public void setDepositFee(long depositFee) {
+		this.depositFee = depositFee;
 	}
-			
+
 	public void setCreateTime(java.util.Date createTime){
 		this.createTime = createTime;
 	}

+ 54 - 0
mec-web/src/main/java/com/ym/mec/web/dal/utilEntity/SubSettingUtilEntity.java

@@ -0,0 +1,54 @@
+package com.ym.mec.web.dal.utilEntity;
+
+import com.ym.mec.web.dal.entity.MusicGroupSubjectGoodsGroup;
+import io.swagger.annotations.ApiModelProperty;
+
+import java.util.List;
+
+//建团申请,声部设置实体类
+public class SubSettingUtilEntity {
+
+    @ApiModelProperty(value = "乐团编号",required = false)
+    private Integer musicGroupId;
+
+    @ApiModelProperty(value = "计划招生人数",required = false)
+    private Integer expectedStudentNum;
+
+    @ApiModelProperty(value = "科目编号",required = false)
+    private Integer subId;
+
+    @ApiModelProperty(value = "当前声部商品打包列表",required = false)
+    private List<MusicGroupSubjectGoodsGroup> musicGroupSubjectGoodsGroups;
+
+    public Integer getMusicGroupId() {
+        return musicGroupId;
+    }
+
+    public void setMusicGroupId(Integer musicGroupId) {
+        this.musicGroupId = musicGroupId;
+    }
+
+    public Integer getExpectedStudentNum() {
+        return expectedStudentNum;
+    }
+
+    public void setExpectedStudentNum(Integer expectedStudentNum) {
+        this.expectedStudentNum = expectedStudentNum;
+    }
+
+    public Integer getSubId() {
+        return subId;
+    }
+
+    public void setSubId(Integer subId) {
+        this.subId = subId;
+    }
+
+    public List<MusicGroupSubjectGoodsGroup> getMusicGroupSubjectGoodsGroups() {
+        return musicGroupSubjectGoodsGroups;
+    }
+
+    public void setMusicGroupSubjectGoodsGroups(List<MusicGroupSubjectGoodsGroup> musicGroupSubjectGoodsGroups) {
+        this.musicGroupSubjectGoodsGroups = musicGroupSubjectGoodsGroups;
+    }
+}

+ 15 - 0
mec-web/src/main/java/com/ym/mec/web/service/MusicGroupService.java

@@ -2,7 +2,22 @@ package com.ym.mec.web.service;
 
 import com.ym.mec.common.service.BaseService;
 import com.ym.mec.web.dal.entity.MusicGroup;
+import com.ym.mec.web.dal.utilEntity.SubSettingUtilEntity;
+
+import java.util.List;
 
 public interface MusicGroupService extends BaseService<String, MusicGroup> {
 
+    /**
+     * 建团申请,提交声部设置
+     * @param subSettingUtilEntitys
+     */
+    void subSetting(List<SubSettingUtilEntity> subSettingUtilEntitys);
+
+    /**
+     * 建团申请,根据乐团编号获取已有声部设置
+     * @param musicGroupId
+     * @return
+     */
+    String getSubSetting(Integer musicGroupId);
 }

+ 0 - 8
mec-web/src/main/java/com/ym/mec/web/service/MusicGroupSubjectGoodsMapperService.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.MusicGroupSubjectGoodsMapper;
-
-public interface MusicGroupSubjectGoodsMapperService extends BaseService<Long, MusicGroupSubjectGoodsMapper> {
-
-}

+ 46 - 1
mec-web/src/main/java/com/ym/mec/web/service/impl/MusicGroupServiceImpl.java

@@ -1,6 +1,14 @@
 package com.ym.mec.web.service.impl;
 
+import com.ym.mec.web.dal.dao.MusicGroupSubjectGoodsGroupDao;
+import com.ym.mec.web.dal.dao.MusicGroupSubjectPlanDao;
+import com.ym.mec.web.dal.dao.SubjectDao;
+import com.ym.mec.web.dal.entity.MusicGroupSubjectGoodsGroup;
+import com.ym.mec.web.dal.entity.MusicGroupSubjectPlan;
+import com.ym.mec.web.dal.entity.Subject;
+import com.ym.mec.web.dal.utilEntity.SubSettingUtilEntity;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.authentication.dao.DaoAuthenticationProvider;
 import org.springframework.stereotype.Service;
 
 import com.ym.mec.common.dal.BaseDAO;
@@ -8,16 +16,53 @@ import com.ym.mec.common.service.impl.BaseServiceImpl;
 import com.ym.mec.web.dal.dao.MusicGroupDao;
 import com.ym.mec.web.dal.entity.MusicGroup;
 import com.ym.mec.web.service.MusicGroupService;
+import org.springframework.transaction.annotation.Transactional;
+
+import java.util.Date;
+import java.util.List;
 
 @Service
 public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup>  implements MusicGroupService {
 	
 	@Autowired
 	private MusicGroupDao musicGroupDao;
+	@Autowired
+	private SubjectDao subjectDao;
+	@Autowired
+	private MusicGroupSubjectPlanDao musicGroupSubjectPlanDao;
+	@Autowired
+	private MusicGroupSubjectGoodsGroupDao musicGroupSubjectGoodsGroupDao;
 
 	@Override
 	public BaseDAO<String, MusicGroup> getDAO() {
 		return musicGroupDao;
 	}
-	
+
+	@Override
+	@Transactional(rollbackFor = Exception.class)
+	public void subSetting(List<SubSettingUtilEntity> subSettingUtilEntitys) {
+		Subject subject = null;
+		MusicGroupSubjectPlan musicGroupSubjectPlan;
+		Date date = new Date();
+		for (SubSettingUtilEntity e:subSettingUtilEntitys) {
+			subject = subjectDao.get(e.getSubId());
+			//保存乐团科目规划
+			if(subject != null){
+				musicGroupSubjectPlan = new MusicGroupSubjectPlan();
+				musicGroupSubjectPlan.setMusicGroupId(e.getMusicGroupId());
+				musicGroupSubjectPlan.setSubjectId(e.getSubId());
+				musicGroupSubjectPlan.setExpectedStudentNum(e.getExpectedStudentNum());
+				musicGroupSubjectPlan.setCreateTime(date);
+				musicGroupSubjectPlan.setUpdateTime(date);
+				musicGroupSubjectPlanDao.insert(musicGroupSubjectPlan);
+				//保存乐团科目乐器范围,以及打包商品
+				musicGroupSubjectGoodsGroupDao.batchInsert(e.getMusicGroupSubjectGoodsGroups());
+			}
+		}
+	}
+
+	@Override
+	public String getSubSetting(Integer musicGroupId) {
+		return null;
+	}
 }

+ 0 - 23
mec-web/src/main/java/com/ym/mec/web/service/impl/MusicGroupSubjectGoodsMapperServiceImpl.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.MusicGroupSubjectGoodsMapperDao;
-import com.ym.mec.web.dal.entity.MusicGroupSubjectGoodsMapper;
-import com.ym.mec.web.service.MusicGroupSubjectGoodsMapperService;
-
-@Service
-public class MusicGroupSubjectGoodsMapperServiceImpl extends BaseServiceImpl<Long, MusicGroupSubjectGoodsMapper>  implements MusicGroupSubjectGoodsMapperService {
-	
-	@Autowired
-	private MusicGroupSubjectGoodsMapperDao musicGroupSubjectGoodsMapperDao;
-
-	@Override
-	public BaseDAO<Long, MusicGroupSubjectGoodsMapper> getDAO() {
-		return musicGroupSubjectGoodsMapperDao;
-	}
-	
-}

+ 8 - 1
mec-web/src/main/resources/config/mybatis/MusicGroupSubjectGoodsGroupMapper.xml

@@ -39,7 +39,14 @@
 		VALUES(#{id},#{name},#{type},#{musicGroupId},#{subjectId},#{goodsIdList},#{createTime},#{updateTime},#{price})
 	</insert>
 
-	<!-- 根据主键查询一条记录 -->
+    <insert id="batchInsert" parameterType="java.util.List">
+		INSERT INTO music_group_subject_goods_group (id_,name_,type_,music_group_id_,subject_id_,goods_id_list_,create_time_,update_time_,price_) VALUES
+		<foreach collection="mappers" item="item" index="index" separator=",">
+			VALUES(#{item.id},#{item.name},#{item.type},#{item.musicGroupId},#{item.subjectId},#{item.goodsIdList},NOW(),NOW(),#{item.price})
+		</foreach>
+	</insert>
+
+    <!-- 根据主键查询一条记录 -->
 	<update id="update"
 		parameterType="com.ym.mec.web.dal.entity.MusicGroupSubjectGoodsGroup">
 		UPDATE music_group_subject_goods_group

+ 0 - 84
mec-web/src/main/resources/config/mybatis/MusicGroupSubjectGoodsMapperMapper.xml

@@ -1,84 +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.MusicGroupSubjectGoodsMapperDao">
-	
-	<resultMap type="com.ym.mec.web.dal.entity.MusicGroupSubjectGoodsMapper" id="MusicGroupSubjectGoodsMapper">
-		<result column="id_" property="id" />
-		<result column="organ_id_" property="organId" />
-		<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" />
-		<result column="type_" property="type" />
-	</resultMap>
-	
-	<!-- 根据主键查询一条记录 -->
-	<select id="get" resultMap="MusicGroupSubjectGoodsMapper" >
-		SELECT * FROM music_group_subject_goods_mapper WHERE id_ = #{id} 
-	</select>
-	
-	<!-- 全查询 -->
-	<select id="findAll" resultMap="MusicGroupSubjectGoodsMapper">
-		SELECT * FROM music_group_subject_goods_mapper ORDER BY id_
-	</select>
-	
-	<!-- 向数据库增加一条记录 -->
-	<insert id="insert" parameterType="com.ym.mec.web.dal.entity.MusicGroupSubjectGoodsMapper" useGeneratedKeys="true" keyColumn="id" keyProperty="id">
-		<!--
-		<selectKey resultClass="int" keyProperty="id" > 
-		SELECT SEQ_WSDEFINITION_ID.nextval AS ID FROM DUAL 
-		</selectKey>
-		-->
-		INSERT INTO music_group_subject_goods_mapper (id_,organ_id_,music_group_id_,subject_id_,goods_id_,create_time_,update_time_,type_) VALUES(#{id},#{organId},#{musicGroupId},#{subjectId},#{goodsId},#{createTime},#{updateTime},#{type})
-	</insert>
-	
-	<!-- 根据主键查询一条记录 -->
-	<update id="update" parameterType="com.ym.mec.web.dal.entity.MusicGroupSubjectGoodsMapper">
-		UPDATE music_group_subject_goods_mapper <set>
-<if test="subjectId != null">
-subject_id_ = #{subjectId},
-</if>
-<if test="organId != null">
-organ_id_ = #{organId},
-</if>
-<if test="id != null">
-id_ = #{id},
-</if>
-<if test="updateTime != null">
-update_time_ = #{updateTime},
-</if>
-<if test="musicGroupId != null">
-music_group_id_ = #{musicGroupId},
-</if>
-<if test="type != null">
-type_ = #{type},
-</if>
-<if test="goodsId != null">
-goods_id_ = #{goodsId},
-</if>
-<if test="createTime != null">
-create_time_ = #{createTime},
-</if>
-</set> WHERE id_ = #{id} 
-	</update>
-	
-	<!-- 根据主键删除一条记录 -->
-	<delete id="delete" >
-		DELETE FROM music_group_subject_goods_mapper WHERE id_ = #{id} 
-	</delete>
-	
-	<!-- 分页查询 -->
-	<select id="queryPage" resultMap="MusicGroupSubjectGoodsMapper" parameterType="map">
-		SELECT * FROM music_group_subject_goods_mapper ORDER BY id_ <include refid="global.limit"/>
-	</select>
-	
-	<!-- 查询当前表的总记录数 -->
-	<select id="queryCount" resultType="int">
-		SELECT COUNT(*) FROM music_group_subject_goods_mapper
-	</select>
-</mapper>

+ 5 - 5
mec-web/src/main/resources/config/mybatis/MusicGroupSubjectPlanMapper.xml

@@ -14,7 +14,7 @@
         <result column="apply_student_num_" property="applyStudentNum"/>
         <result column="fee_" property="fee"/>
         <result column="kit_group_purchase_type_" property="kitGroupPurchaseType" typeHandler="com.ym.mec.common.dal.CustomEnumTypeHandler"/>
-        <result column="kit_fee_" property="kitFee"/>
+        <result column="deposit_fee_" property="depositFee"/>
         <result column="create_time_" property="createTime"/>
         <result column="update_time_" property="updateTime"/>
     </resultMap>
@@ -38,8 +38,8 @@
         </selectKey>
         -->
         INSERT INTO music_group_subject_plan
-        (id_,music_group_id_,subject_id_,expected_student_num_,apply_student_num_,fee_,kit_group_purchase_type_,kit_fee_,create_time_,update_time_)
-        VALUES(#{id},#{musicGroupId},#{subjectId},#{expectedStudentNum},#{applyStudentNum},#{fee},#{kitGroupPurchaseType,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},#{kitFee},#{createTime},#{updateTime})
+        (id_,music_group_id_,subject_id_,expected_student_num_,apply_student_num_,fee_,kit_group_purchase_type_,deposit_fee_,create_time_,update_time_)
+        VALUES(#{id},#{musicGroupId},#{subjectId},#{expectedStudentNum},#{applyStudentNum},#{fee},#{kitGroupPurchaseType,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},#{depositFee},#{createTime},#{updateTime})
     </insert>
 
     <!-- 根据主键查询一条记录 -->
@@ -61,8 +61,8 @@
             <if test="updateTime != null">
                 update_time_ = #{updateTime},
             </if>
-            <if test="kitFee != null">
-                kit_fee_ = #{kitFee},
+            <if test="depositFee != null">
+                deposit_fee_ = #{depositFee},
             </if>
             <if test="expectedStudentNum != null">
                 expected_student_num_ = #{expectedStudentNum},