Selaa lähdekoodia

update 乐保增加新搜索条件

周箭河 4 vuotta sitten
vanhempi
commit
222d448799

+ 28 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/entity/StudentInstrument.java

@@ -29,6 +29,18 @@ public class StudentInstrument {
     private Integer goodsId;
 
     /**
+     * 分类id
+     */
+    @ApiModelProperty(value = "商品分类id")
+    private Integer goodsCategoryId;
+
+    /**
+     * 分类id
+     */
+    @ApiModelProperty(value = "商品分类名称")
+    private Integer goodsCategoryName;
+
+    /**
      * 是否月保 0-不是 1-是
      */
     @ApiModelProperty(value = "是否月保 0-不是 1-是")
@@ -207,4 +219,20 @@ public class StudentInstrument {
     public void setOrganName(String organName) {
         this.organName = organName;
     }
+
+    public Integer getGoodsCategoryId() {
+        return goodsCategoryId;
+    }
+
+    public void setGoodsCategoryId(Integer goodsCategoryId) {
+        this.goodsCategoryId = goodsCategoryId;
+    }
+
+    public Integer getGoodsCategoryName() {
+        return goodsCategoryName;
+    }
+
+    public void setGoodsCategoryName(Integer goodsCategoryName) {
+        this.goodsCategoryName = goodsCategoryName;
+    }
 }

+ 66 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/page/StudentInstrumentQueryInfo.java

@@ -17,6 +17,32 @@ public class StudentInstrumentQueryInfo extends QueryInfo {
     @ApiModelProperty(value = "分部ids", required = true)
     private String organId;
 
+    /**
+     * 商品id
+     */
+    @ApiModelProperty(value = "商品id")
+    private Integer goodsId;
+
+    /**
+     * 分类id
+     */
+    @ApiModelProperty(value = "商品分类id")
+    private Integer goodsCategoryId;
+
+
+    @ApiModelProperty(value = "乐器品牌")
+    private String goodsBrand;
+
+    @ApiModelProperty(value = "乐器规格")
+    private String specification;
+
+    /**
+     * 是否月保 0-不是 1-是
+     */
+    @ApiModelProperty(value = "是否月保 0-不是 1-是")
+    private Integer status;
+
+
     public Integer getStudentId() {
         return studentId;
     }
@@ -32,4 +58,44 @@ public class StudentInstrumentQueryInfo extends QueryInfo {
     public void setOrganId(String organId) {
         this.organId = organId;
     }
+
+    public Integer getGoodsId() {
+        return goodsId;
+    }
+
+    public void setGoodsId(Integer goodsId) {
+        this.goodsId = goodsId;
+    }
+
+    public Integer getGoodsCategoryId() {
+        return goodsCategoryId;
+    }
+
+    public void setGoodsCategoryId(Integer goodsCategoryId) {
+        this.goodsCategoryId = goodsCategoryId;
+    }
+
+    public Integer getStatus() {
+        return status;
+    }
+
+    public void setStatus(Integer status) {
+        this.status = status;
+    }
+
+    public String getGoodsBrand() {
+        return goodsBrand;
+    }
+
+    public void setGoodsBrand(String goodsBrand) {
+        this.goodsBrand = goodsBrand;
+    }
+
+    public String getSpecification() {
+        return specification;
+    }
+
+    public void setSpecification(String specification) {
+        this.specification = specification;
+    }
 }

+ 9 - 9
mec-biz/src/main/resources/config/mybatis/StudentInstrumentMapper.xml

@@ -8,6 +8,8 @@
     <result column="student_id_" property="studentId" />
     <result column="organ_id_" property="organId" />
     <result column="goods_id_" property="goodsId" />
+    <result column="goods_category_id_" property="goodsCategoryId" />
+    <result column="goods_category_name_" property="goodsCategoryName" />
     <result column="status_" property="status" />
     <result column="start_time_" property="startTime" />
     <result column="end_time_" property="endTime" />
@@ -18,15 +20,10 @@
     <result column="goods_brand_" property="goodsBrand" />
     <result column="goods_img_" property="goodsImg" />
   </resultMap>
-  <sql id="Base_Column_List">
-    <!--@mbg.generated-->
-    id_,student_id_,organ_id_, goods_id_,goods_name_,goods_brand_,specification_,goods_img_, status_, start_time_, end_time_, create_time_, update_time
-  </sql>
+
   <select id="get" parameterType="java.lang.Integer" resultMap="StudentInstrument">
     <!--@mbg.generated-->
-    select 
-    <include refid="Base_Column_List" />
-    from student_instrument
+    SELECT * FROM student_instrument
     where id_ = #{id}
   </select>
   <delete id="delete" parameterType="java.lang.Integer">
@@ -37,9 +34,9 @@
   
   <insert id="insert" keyColumn="id_" keyProperty="id" parameterType="com.ym.mec.biz.dal.entity.StudentInstrument" useGeneratedKeys="true">
     <!--@mbg.generated-->
-    insert into student_instrument (student_id_,organ_id_,goods_id_,goods_name_,goods_brand_,specification_,goods_img_, status_, start_time_, end_time_, create_time_, update_time
+    insert into student_instrument (student_id_,organ_id_,goods_id_,goods_category_id_,goods_category_name_,goods_name_,goods_brand_,specification_,goods_img_, status_, start_time_, end_time_, create_time_, update_time
       )
-    values (#{studentId},#{organId},#{goodsId},#{goodsName},#{goodsBrand},#{specification},#{goodsImg}, #{status}, #{startTime}, #{endTime}, #{createTime}, #{updateTime}
+    values (#{studentId},#{organId},#{goodsId},#{goodsCategoryId},#{goodsCategoryName},#{goodsName},#{goodsBrand},#{specification},#{goodsImg}, #{status}, #{startTime}, #{endTime}, #{createTime}, #{updateTime}
       )
   </insert>
   <update id="update" parameterType="com.ym.mec.biz.dal.entity.StudentInstrument">
@@ -120,6 +117,9 @@
       <if test="goodsId != null">
         AND si.goods_id_ = #{goodsId}
       </if>
+      <if test="goodsCategoryId != null">
+        AND si.goods_category_id_ = #{goodsCategoryId}
+      </if>
       <if test="goodsBrand != null">
         AND si.goods_brand_ LIKE CONCAT('%',#{goodsBrand},'%')
       </if>