yonge 5 years ago
parent
commit
131a1d9cfc

+ 0 - 3
mec-auth/mec-auth-api/src/main/java/com/ym/mec/auth/api/client/SysUserFeignService.java

@@ -25,9 +25,6 @@ public interface SysUserFeignService {
 	@PostMapping(value = "user/add", consumes = MediaType.APPLICATION_JSON_VALUE)
 	public Object addUser(SysUser user);
 
-	@GetMapping(value = "task/test")
-	public Object test();
-
 	@GetMapping(value = "queryUserInfo")
 	public SysUser queryUserInfo();
 

+ 0 - 6
mec-auth/mec-auth-api/src/main/java/com/ym/mec/auth/api/client/fallback/SysUserFeignServiceFallback.java

@@ -16,12 +16,6 @@ public class SysUserFeignServiceFallback implements SysUserFeignService {
 	}
 
 	@Override
-	public Object test() {
-		System.out.println("******进入服务降级方法******");
-		return "服务正在拍";
-	}
-
-	@Override
 	public SysUser queryUserInfo() {
 		return null;
 	}

+ 24 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/entity/SubjectGoodsMapper.java

@@ -17,10 +17,18 @@ public class SubjectGoodsMapper {
 	/**  */
 	@ApiModelProperty(value = "科目编号", required = false)
 	private String subjectId;
+	
+	/** 类型(乐器、辅件、教材) */
+	@ApiModelProperty(value = "商品类型",required = false)
+	private GoodsType type;
 
 	/**  */
 	@ApiModelProperty(value = "商品分类编号", required = false)
 	private Integer goodsCategoryId;
+	
+	/** 商品列表(用逗号,分开) */
+	@ApiModelProperty(value = "商品列表(用逗号,分开)",required = false)
+	private String goodsIdList;
 
 	@ApiModelProperty(value = "删除标记,删除时传true,其他传null", required = false)
 	private boolean delFlag = false;
@@ -79,6 +87,22 @@ public class SubjectGoodsMapper {
 		return this.updateTime;
 	}
 
+	public GoodsType getType() {
+		return type;
+	}
+
+	public void setType(GoodsType type) {
+		this.type = type;
+	}
+
+	public String getGoodsIdList() {
+		return goodsIdList;
+	}
+
+	public void setGoodsIdList(String goodsIdList) {
+		this.goodsIdList = goodsIdList;
+	}
+
 	@Override
 	public String toString() {
 		return ToStringBuilder.reflectionToString(this);

+ 11 - 2
mec-biz/src/main/resources/config/mybatis/SubjectGoodsMapperMapper.xml

@@ -9,7 +9,9 @@
     <resultMap type="com.ym.mec.biz.dal.entity.SubjectGoodsMapper" id="SubjectGoodsMapper">
         <result column="id_" property="id"/>
         <result column="subject_id_" property="subjectId"/>
+        <result column="type_" property="type" typeHandler="com.ym.mec.common.dal.CustomEnumTypeHandler"/>
         <result column="goods_category_id_" property="goodsCategoryId"/>
+        <result column="goods_id_list_" property="goodsIdList"/>
         <result column="create_time_" property="createTime"/>
         <result column="update_time_" property="updateTime"/>
     </resultMap>
@@ -27,9 +29,10 @@
     <!-- 向数据库增加一条记录 -->
     <insert id="insert" parameterType="com.ym.mec.biz.dal.entity.SubjectGoodsMapper" useGeneratedKeys="true"
             keyColumn="id" keyProperty="id">
-        INSERT INTO subject_goods_mapper (subject_id_,goods_category_id_,create_time_,update_time_)
-        VALUES(#{subjectId},#{goodsCategoryId},now(),now())
+        INSERT INTO subject_goods_mapper (subject_id_,goods_category_id_,create_time_,update_time_,type_,goods_id_list_)
+        VALUES(#{subjectId},#{goodsCategoryId},now(),now(),#{type,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},#{goodsIdList})
     </insert>
+    
     <insert id="batchAdd">
         INSERT INTO subject_goods_mapper (subject_id_,goods_category_id_,create_time_,update_time_)
         VALUES
@@ -51,6 +54,12 @@
             <if test="goodsCategoryId != null">
                 goods_category_id_ = #{goodsCategoryId},
             </if>
+            <if test="type != null">
+                type_ = #{type,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},
+            </if>
+            <if test="goodsIdList != null">
+                goods_id_list_ = #{goodsIdList},
+            </if>
         </set>
         WHERE id_ = #{id}
     </update>