Parcourir la source

智能陪练新增图片

zouxuan il y a 3 ans
Parent
commit
5c247533d0

+ 12 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/entity/SysSuggestion.java

@@ -23,6 +23,10 @@ public class SysSuggestion {
 	/** 内容 */
 	@ApiModelProperty(value = "内容",required = false)
 	private String content;
+
+	/** 媒体 */
+	@ApiModelProperty(value = "媒体",required = false)
+	private String url;
 	
 	/** 用户编号 */
 	@ApiModelProperty(value = "用户编号",required = false)
@@ -40,6 +44,14 @@ public class SysSuggestion {
 	/** 提交时间 */
 	private java.util.Date createTime;
 
+	public String getUrl() {
+		return url;
+	}
+
+	public void setUrl(String url) {
+		this.url = url;
+	}
+
 	public String getUsername() {
 		return username;
 	}

+ 6 - 2
mec-biz/src/main/resources/config/mybatis/SysSuggestionMapper.xml

@@ -11,6 +11,7 @@
         <result column="mobile_no_" property="mobileNo"/>
         <result column="title_" property="title"/>
         <result column="content_" property="content"/>
+        <result column="url_" property="url"/>
         <result column="user_id_" property="userId"/>
         <result column="username_" property="username"/>
         <result column="create_time_" property="createTime"/>
@@ -31,14 +32,17 @@
     <!-- 向数据库增加一条记录 -->
     <insert id="insert" parameterType="com.ym.mec.biz.dal.entity.SysSuggestion" useGeneratedKeys="true" keyColumn="id"
             keyProperty="id">
-        INSERT INTO sys_suggestion (id_,mobile_no_,title_,content_,user_id_,create_time_,client_type_,type_)
-        VALUES(#{id},#{mobileNo},#{title},#{content},#{userId},now(),#{clientType},#{type, typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler})
+        INSERT INTO sys_suggestion (mobile_no_,title_,content_,user_id_,create_time_,client_type_,type_,url_)
+        VALUES(#{mobileNo},#{title},#{content},#{userId},now(),#{clientType},#{type, typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},#{url})
     </insert>
 
     <!-- 根据主键查询一条记录 -->
     <update id="update" parameterType="com.ym.mec.biz.dal.entity.SysSuggestion">
         UPDATE sys_suggestion
         <set>
+            <if test="url != null">
+                url_ = #{url},
+            </if>
             <if test="clientType != null">
                 client_type_ = #{clientType},
             </if>