|
@@ -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>
|