Browse Source

update:更新表信息

yonge 5 năm trước cách đây
mục cha
commit
49863481f5

+ 25 - 15
mec-auth/mec-auth-api/src/main/java/com/ym/mec/auth/api/entity/SysUserLoginLog.java

@@ -7,18 +7,28 @@ import org.apache.commons.lang3.builder.ToStringBuilder;
  */
 public class SysUserLoginLog {
 
+	private Long id;
+
 	/** 会员ID */
 	private Integer userId;
-	
+
 	/** 登录IP */
 	private String loginIp;
-	
+
 	/** 登录时间 */
 	private java.util.Date loginTime;
-	
+
 	/** 终端类型(0,pc端;1,人工;2,移动端;3,自动) */
 	private Integer source;
 
+	public Long getId() {
+		return id;
+	}
+
+	public void setId(Long id) {
+		this.id = id;
+	}
+
 	public Integer getUserId() {
 		return userId;
 	}
@@ -27,30 +37,30 @@ public class SysUserLoginLog {
 		this.userId = userId;
 	}
 
-	public void setLoginIp(String loginIp){
+	public void setLoginIp(String loginIp) {
 		this.loginIp = loginIp;
 	}
-	
-	public String getLoginIp(){
+
+	public String getLoginIp() {
 		return this.loginIp;
 	}
-			
-	public void setLoginTime(java.util.Date loginTime){
+
+	public void setLoginTime(java.util.Date loginTime) {
 		this.loginTime = loginTime;
 	}
-	
-	public java.util.Date getLoginTime(){
+
+	public java.util.Date getLoginTime() {
 		return this.loginTime;
 	}
-			
-	public void setSource(Integer source){
+
+	public void setSource(Integer source) {
 		this.source = source;
 	}
-	
-	public Integer getSource(){
+
+	public Integer getSource() {
 		return this.source;
 	}
-			
+
 	@Override
 	public String toString() {
 		return ToStringBuilder.reflectionToString(this);

+ 2 - 1
mec-auth/mec-auth-server/src/main/resources/config/mybatis/SysUserLoginLogMapper.xml

@@ -7,6 +7,7 @@
 <mapper namespace="com.ym.mec.auth.dal.dao.SysUserLoginLogDao">
 	
 	<resultMap type="com.ym.mec.auth.api.entity.SysUserLoginLog" id="SysUserLoginLog">
+		<result column="id_" property="id"/>
 		<result column="user_id_" property="userId" />
 		<result column="login_ip_" property="loginIp" />
 		<result column="login_time_" property="loginTime" />
@@ -26,7 +27,7 @@
 		SELECT SEQ_WSDEFINITION_ID.nextval AS ID FROM DUAL 
 		</selectKey>
 		-->
-		INSERT INTO sys_user_login_log (user_id_,login_ip_,login_time_,source_) VALUES(#{userId},#{loginIp},#{loginTime},#{source})
+		INSERT INTO sys_user_login_log (id_,user_id_,login_ip_,login_time_,source_) VALUES(#{id},#{userId},#{loginIp},#{loginTime},#{source})
 	</insert>
 	
 	

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

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

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

@@ -0,0 +1,9 @@
+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> {
+
+	
+}

+ 114 - 0
mec-web/src/main/java/com/ym/mec/web/dal/entity/MusicGroupSubjectGoodsGroup.java

@@ -0,0 +1,114 @@
+package com.ym.mec.web.dal.entity;
+
+import org.apache.commons.lang3.builder.ToStringBuilder;
+
+/**
+ * 对应数据库表(music_group_subject_goods_group):
+ */
+public class MusicGroupSubjectGoodsGroup {
+
+	/**  */
+	private Long id;
+	
+	/** 名称 */
+	private String name;
+	
+	/** 类型(乐器、辅件、教材) */
+	private String type;
+	
+	/**  */
+	private Integer musicGroupId;
+	
+	/**  */
+	private Integer subjectId;
+	
+	/** 商品列表(用户|分开) */
+	private String goodsIdList;
+	
+	/**  */
+	private java.util.Date createTime;
+	
+	/**  */
+	private java.util.Date updateTime;
+	
+	/** 打包价格 */
+	private long price;
+	
+	public void setId(Long id){
+		this.id = id;
+	}
+	
+	public Long getId(){
+		return this.id;
+	}
+			
+	public void setName(String name){
+		this.name = name;
+	}
+	
+	public String getName(){
+		return this.name;
+	}
+			
+	public void setType(String type){
+		this.type = type;
+	}
+	
+	public String getType(){
+		return this.type;
+	}
+			
+	public void setMusicGroupId(Integer musicGroupId){
+		this.musicGroupId = musicGroupId;
+	}
+	
+	public Integer getMusicGroupId(){
+		return this.musicGroupId;
+	}
+			
+	public void setSubjectId(Integer subjectId){
+		this.subjectId = subjectId;
+	}
+	
+	public Integer getSubjectId(){
+		return this.subjectId;
+	}
+			
+	public void setGoodsIdList(String goodsIdList){
+		this.goodsIdList = goodsIdList;
+	}
+	
+	public String getGoodsIdList(){
+		return this.goodsIdList;
+	}
+			
+	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 setPrice(long price){
+		this.price = price;
+	}
+	
+	public long getPrice(){
+		return this.price;
+	}
+			
+	@Override
+	public String toString() {
+		return ToStringBuilder.reflectionToString(this);
+	}
+
+}

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

@@ -0,0 +1,103 @@
+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);
+	}
+
+}

+ 51 - 27
mec-web/src/main/java/com/ym/mec/web/dal/entity/SubjectGoodsMapper.java

@@ -1,8 +1,11 @@
 package com.ym.mec.web.dal.entity;
 
 import io.swagger.annotations.ApiModelProperty;
+
 import org.apache.commons.lang3.builder.ToStringBuilder;
 
+import com.ym.mec.web.dal.enums.GoodsType;
+
 /**
  * 对应数据库表(subject_plan_goods_mapper):
  */
@@ -10,61 +13,82 @@ public class SubjectGoodsMapper {
 
 	/**  */
 	private Long id;
-	
+
+	@ApiModelProperty(value = "组织编号", required = false)
+	private Integer organId;
+
 	/**  */
-	@ApiModelProperty(value = "科目编号",required = false)
+	@ApiModelProperty(value = "科目编号", required = false)
 	private String subjectId;
-	
+
 	/**  */
-	@ApiModelProperty(value = "商品编号",required = false)
+	@ApiModelProperty(value = "商品编号", required = false)
 	private Integer goodsId;
-	
+
+	private GoodsType type;
+
 	/**  */
 	private java.util.Date createTime;
-	
+
 	/**  */
 	private java.util.Date updateTime;
-	
-	public void setId(Long id){
+
+	public void setId(Long id) {
 		this.id = id;
 	}
-	
-	public Long getId(){
+
+	public Long getId() {
 		return this.id;
 	}
-			
-	public void setSubjectId(String subjectId){
+
+	public Integer getOrganId() {
+		return organId;
+	}
+
+	public void setOrganId(Integer organId) {
+		this.organId = organId;
+	}
+
+	public void setSubjectId(String subjectId) {
 		this.subjectId = subjectId;
 	}
-	
-	public String getSubjectId(){
+
+	public String getSubjectId() {
 		return this.subjectId;
 	}
-			
-	public void setGoodsId(Integer goodsId){
+
+	public void setGoodsId(Integer goodsId) {
 		this.goodsId = goodsId;
 	}
-	
-	public Integer getGoodsId(){
+
+	public Integer getGoodsId() {
 		return this.goodsId;
 	}
-			
-	public void setCreateTime(java.util.Date createTime){
+
+	public GoodsType getType() {
+		return type;
+	}
+
+	public void setType(GoodsType type) {
+		this.type = type;
+	}
+
+	public void setCreateTime(java.util.Date createTime) {
 		this.createTime = createTime;
 	}
-	
-	public java.util.Date getCreateTime(){
+
+	public java.util.Date getCreateTime() {
 		return this.createTime;
 	}
-			
-	public void setUpdateTime(java.util.Date updateTime){
+
+	public void setUpdateTime(java.util.Date updateTime) {
 		this.updateTime = updateTime;
 	}
-	
-	public java.util.Date getUpdateTime(){
+
+	public java.util.Date getUpdateTime() {
 		return this.updateTime;
 	}
-			
+
 	@Override
 	public String toString() {
 		return ToStringBuilder.reflectionToString(this);

+ 27 - 0
mec-web/src/main/java/com/ym/mec/web/dal/enums/GoodsType.java

@@ -0,0 +1,27 @@
+package com.ym.mec.web.dal.enums;
+
+import com.ym.mec.common.enums.BaseEnum;
+
+public enum GoodsType implements BaseEnum<String, GoodsType> {
+
+	INSTRUMENT("instrument", "乐器"), ACCESSORIES("accessories", "辅件"), MATERIAL("material", "教材");
+
+	private String code;
+
+	private String desc;
+
+	private GoodsType(String code, String desc) {
+		this.code = code;
+		this.desc = desc;
+	}
+
+	@Override
+	public String getCode() {
+		return code;
+	}
+
+	public String getDesc() {
+		return desc;
+	}
+
+}

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

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

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

@@ -0,0 +1,8 @@
+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> {
+
+}

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

@@ -0,0 +1,23 @@
+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.MusicGroupSubjectGoodsGroupDao;
+import com.ym.mec.web.dal.entity.MusicGroupSubjectGoodsGroup;
+import com.ym.mec.web.service.MusicGroupSubjectGoodsGroupService;
+
+@Service
+public class MusicGroupSubjectGoodsGroupServiceImpl extends BaseServiceImpl<Long, MusicGroupSubjectGoodsGroup>  implements MusicGroupSubjectGoodsGroupService {
+	
+	@Autowired
+	private MusicGroupSubjectGoodsGroupDao musicGroupSubjectGoodsGroupDao;
+
+	@Override
+	public BaseDAO<Long, MusicGroupSubjectGoodsGroup> getDAO() {
+		return musicGroupSubjectGoodsGroupDao;
+	}
+	
+}

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

@@ -0,0 +1,23 @@
+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;
+	}
+	
+}

+ 96 - 0
mec-web/src/main/resources/config/mybatis/MusicGroupSubjectGoodsGroupMapper.xml

@@ -0,0 +1,96 @@
+<?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.MusicGroupSubjectGoodsGroupDao">
+
+	<resultMap type="com.ym.mec.web.dal.entity.MusicGroupSubjectGoodsGroup"
+		id="MusicGroupSubjectGoodsGroup">
+		<result column="id_" property="id" />
+		<result column="name_" property="name" />
+		<result column="type_" property="type" />
+		<result column="music_group_id_" property="musicGroupId" />
+		<result column="subject_id_" property="subjectId" />
+		<result column="goods_id_list_" property="goodsIdList" />
+		<result column="create_time_" property="createTime" />
+		<result column="update_time_" property="updateTime" />
+		<result column="price_" property="price" />
+	</resultMap>
+
+	<!-- 根据主键查询一条记录 -->
+	<select id="get" resultMap="MusicGroupSubjectGoodsGroup">
+		SELECT
+		* FROM music_group_subject_goods_group WHERE id_ = #{id}
+	</select>
+
+	<!-- 全查询 -->
+	<select id="findAll" resultMap="MusicGroupSubjectGoodsGroup">
+		SELECT * FROM
+		music_group_subject_goods_group ORDER BY id_
+	</select>
+
+	<!-- 向数据库增加一条记录 -->
+	<insert id="insert"
+		parameterType="com.ym.mec.web.dal.entity.MusicGroupSubjectGoodsGroup"
+		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_group
+		(id_,name_,type_,music_group_id_,subject_id_,goods_id_list_,create_time_,update_time_,price_)
+		VALUES(#{id},#{name},#{type},#{musicGroupId},#{subjectId},#{goodsIdList},#{createTime},#{updateTime},#{price})
+	</insert>
+
+	<!-- 根据主键查询一条记录 -->
+	<update id="update"
+		parameterType="com.ym.mec.web.dal.entity.MusicGroupSubjectGoodsGroup">
+		UPDATE music_group_subject_goods_group
+		<set>
+			<if test="price != null">
+				price_ = #{price},
+			</if>
+			<if test="subjectId != null">
+				subject_id_ = #{subjectId},
+			</if>
+			<if test="goodsIdList != null">
+				goods_id_list_ = #{goodsIdList},
+			</if>
+			<if test="id != null">
+				id_ = #{id},
+			</if>
+			<if test="updateTime != null">
+				update_time_ = #{updateTime},
+			</if>
+			<if test="type != null">
+				type_ = #{type},
+			</if>
+			<if test="musicGroupId != null">
+				music_group_id_ = #{musicGroupId},
+			</if>
+			<if test="name != null">
+				name_ = #{name},
+			</if>
+			<if test="createTime != null">
+				create_time_ = #{createTime},
+			</if>
+		</set>
+		WHERE id_ = #{id}
+	</update>
+
+	<!-- 根据主键删除一条记录 -->
+	<delete id="delete">
+		DELETE FROM music_group_subject_goods_group
+		WHERE id_ = #{id}
+	</delete>
+
+	<!-- 分页查询 -->
+	<select id="queryPage" resultMap="MusicGroupSubjectGoodsGroup"
+		parameterType="map">
+		SELECT * FROM music_group_subject_goods_group ORDER BY id_
+		<include refid="global.limit" />
+	</select>
+
+	<!-- 查询当前表的总记录数 -->
+	<select id="queryCount" resultType="int">
+		SELECT COUNT(*) FROM
+		music_group_subject_goods_group
+	</select>
+</mapper>

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

@@ -0,0 +1,84 @@
+<?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>

+ 10 - 2
mec-web/src/main/resources/config/mybatis/SubjectGoodsMapperMapper.xml

@@ -8,7 +8,9 @@
 
     <resultMap type="com.ym.mec.web.dal.entity.SubjectGoodsMapper" id="SubjectGoodsMapper">
         <result column="id_" property="id"/>
+        <result column="organ_id_" property="organId"/>
         <result column="subject_id_" property="subjectId"/>
+        <result column="type_" property="type" typeHandler="com.ym.mec.common.dal.CustomEnumTypeHandler" />
         <result column="goods_id_" property="goodsId"/>
         <result column="create_time_" property="createTime"/>
         <result column="update_time_" property="updateTime"/>
@@ -32,8 +34,8 @@
         SELECT SEQ_WSDEFINITION_ID.nextval AS ID FROM DUAL
         </selectKey>
         -->
-        INSERT INTO subject_plan_goods_mapper (id_,subject_id_,goods_id_,create_time_,update_time_)
-        VALUES(#{id},#{subjectId},#{goodsId},#{createTime},#{updateTime})
+        INSERT INTO subject_plan_goods_mapper (id_,organ_id_,subject_id_,goods_id_,type_,create_time_,update_time_)
+        VALUES(#{id},#{organId},#{subjectId},#{goodsId},#{type,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},#{createTime},#{updateTime})
     </insert>
 
     <!-- 根据主键查询一条记录 -->
@@ -43,6 +45,12 @@
             <if test="subjectId != null">
                 subject_id_ = #{subjectId},
             </if>
+            <if test="organId != null">
+                organ_id_ = #{organId},
+            </if>
+            <if test="type != null">
+                type_ = #{type,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},
+            </if>
             <if test="updateTime != null">
                 update_time_ = #{updateTime},
             </if>