Bläddra i källkod

增加数据字段

jz.kai 1 år sedan
förälder
incheckning
13bfaa1531

+ 9 - 2
common/src/main/java/com/jpsoft/employment/modules/base/entity/WishInfo.java

@@ -33,6 +33,11 @@ public class WishInfo {
 	
 				@ApiModelProperty(value = "数量")
 	private Integer amount;
+
+	@ApiModelProperty(value = "学生姓名")
+	private String studentName;
+	@ApiModelProperty(value = "学生类型")
+	private String studentType;
 	
 				@ApiModelProperty(value = "显示状态(0:下架,1:上架)")
 	private String status;
@@ -55,5 +60,7 @@ public class WishInfo {
 	
 			@ApiModelProperty(value = "是否删除")
 	private Boolean delFlag;
-	
-		}
+
+	@ApiModelProperty(value = "数量")
+	private Integer amount;
+	}

+ 14 - 3
common/src/main/resources/mapper/base/WishInfo.xml

@@ -10,6 +10,8 @@
 			<result property="introduction" column="introduction_" />
 			<result property="image" column="image_" />
 			<result property="amount" column="amount_" />
+		<result property="studentName" column="student_name" />
+		<result property="studentType" column="student_type" />
 			<result property="status" column="status_" />
 			<result property="createBy" column="create_by" />
 			<result property="createTime" column="create_time" />
@@ -25,7 +27,7 @@
 	-->
 	<![CDATA[
 		insert into base_wish_info
-	    (id_,category_,title_,introduction_,image_,amount_,status_,create_by,create_time,update_by,update_time,del_flag)
+	    (id_,category_,title_,introduction_,image_,amount_,student_name,student_type,status_,create_by,create_time,update_by,update_time,del_flag)
 		values
 		(
 #{id,jdbcType=VARCHAR}
@@ -34,6 +36,8 @@
 ,#{introduction,jdbcType=VARCHAR}
 ,#{image,jdbcType=VARCHAR}
 ,#{amount,jdbcType= NUMERIC }
+,#{studentName,jdbcType=VARCHAR}
+,#{studentType,jdbcType=VARCHAR}
 ,#{status,jdbcType=VARCHAR}
 ,#{createBy,jdbcType=VARCHAR}
 ,#{createTime,jdbcType= TIMESTAMP }
@@ -64,6 +68,12 @@
 				<if test="amount!=null">
 		amount_=#{amount,jdbcType= NUMERIC },
 		</if>
+			<if test="studentName!=null">
+				student_name=#{studentName,jdbcType=VARCHAR},
+			</if>
+			<if test="studentType!=null">
+				student_type=#{studentType,jdbcType=VARCHAR},
+			</if>
 				<if test="status!=null">
 		status_=#{status,jdbcType=VARCHAR},
 		</if>
@@ -99,8 +109,9 @@
 			select * from base_wish_info
 		]]>
 		<where>
-			<if test="searchParams.id != null">
-				and ID_ like #{searchParams.id}
+			del_flag = 0 and amount_ > 0
+			<if test="searchParams.title != null">
+				and title_ like #{searchParams.title}
 			</if>
 		</where>
 		<foreach item="sort" collection="sortList"  open="order by" separator=",">