Selaa lähdekoodia

待开发活动模块

anderx 4 vuotta sitten
vanhempi
commit
4bcb8c85cb

+ 53 - 9
GeneratorConfig.xml

@@ -1,14 +1,58 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE generatorConfiguration PUBLIC "-//mybatis.org//DTD MyBatis Generator Configuration 1.0//EN" "http://mybatis.org/dtd/mybatis-generator-config_1_0.dtd">
 <generatorConfiguration>
-  <classPathEntry location="C:/Users/Administrator/.dbeaver-drivers/maven/maven-central/mysql/mysql-connector-java-5.1.39.jar" />
-   <!-- <classPathEntry location="E:/mysql-connector-java-5.1.40.jar" /> -->
-  <context id="context1">	
-    <jdbcConnection connectionURL="jdbc:mysql://localhost:3306/aft_ow" 
-    	driverClass="com.mysql.jdbc.Driver" password="123456" userId="dev" />
-    <javaModelGenerator targetPackage="com.kede.common.model" targetProject="kede-officialWeb-HN" />
-    <sqlMapGenerator targetPackage="com.kede.common.mapper" targetProject="kede-officialWeb-HN" />
-    <javaClientGenerator targetPackage="com.kede.common.dao" targetProject="kede-officialWeb-HN" type="XMLMAPPER" />
-    <table schema="aft_ow" tableName="visiting_customers"/>
+   <classPathEntry location="C:\Users\Administrator.SC-202009251130\AppData\Roaming\DBeaverData\drivers\maven\maven-central\mysql\mysql-connector-java-5.1.39.jar" /> 
+   <!-- <classPathEntry location="C:\Users\Administrator.SC-202009251130\AppData\Roaming\DBeaverData\drivers\maven\maven-central\mysql\mysql-connector-java-8.0.17.jar" /> /> -->
+  <context  id="MysqlTables" targetRuntime="MyBatis3" defaultModelType="flat">
+  <!-- 自动识别数据库关键字,默认false,如果设置为true,根据SqlReservedWords中定义的关键字列表;一般保留默认值,遇到数据库关键字(Java关键字),使用columnOverride覆盖 -->
+        <property name="autoDelimitKeywords" value="true"/>	
+        <!-- 生成的Java文件的编码 -->
+        <property name="javaFileEncoding" value="utf-8"/>
+        <!-- beginningDelimiter和endingDelimiter:指明数据库的用于标记数据库对象名的符号,比如ORACLE就是双引号,MYSQL默认是`反引号; -->
+        <property name="beginningDelimiter" value="`"/>
+        <property name="endingDelimiter" value="`"/>
+        <!-- 格式化XML代码 -->
+        <property name="xmlFormatter" value="org.mybatis.generator.api.dom.DefaultXmlFormatter"/>
+        <plugin type="org.mybatis.generator.plugins.SerializablePlugin"/>
+        <plugin type="org.mybatis.generator.plugins.ToStringPlugin"/>
+        <!-- 注释 -->
+        <commentGenerator>
+            <property name="suppressAllComments" value="false"/><!-- 是否取消注释 -->
+            <property name="suppressDate" value="false"/> <!-- 是否生成注释代时间戳-->
+        </commentGenerator>
+     <jdbcConnection connectionURL="jdbc:mysql://localhost:3306/aft_ow?serverTimezone=UTC&amp;useSSL=true"  
+    	driverClass="com.mysql.cj.jdbc.Driver" password="123456" userId="root" >
+    	 <!-- 防止生成其它库的表 -->
+            <property name="nullCatalogMeansCurrent" value="true"/>
+        </jdbcConnection>
+         <!-- 类型转换 -->
+        <javaTypeResolver>
+            <!-- 是否使用bigDecimal, false可自动转化以下类型(Long, Integer, Short, etc.) -->
+            <property name="forceBigDecimals" value="false"/>
+        </javaTypeResolver>
+    <javaModelGenerator targetPackage="com.kede.common.model" targetProject="kede-web-hn" >
+    		<!-- 是否让schema作为包的后缀 -->
+            <property name="enableSubPackages" value="false"/>
+            <!-- 从数据库返回的值去掉前后空格 -->
+            <property name="trimStrings" value="true"/>
+    </javaModelGenerator>
+    <sqlMapGenerator targetPackage="com.kede.common.mapper" targetProject="kede-web-hn" >
+    	<property name="enableSubPackages" value="false"/>
+    </sqlMapGenerator>
+    <javaClientGenerator  targetPackage="com.kede.common.dao"  type="XMLMAPPER" targetProject="kede-web-hn"  >
+    <property name="enableSubPackages" value="false"/>
+     <property name="nullCatalogMeansCurrent" value="true"/>
+    </javaClientGenerator>
+    <table schema="aft_ow" tableName="activity"   enableCountByExample="false"
+               enableUpdateByExample="false"
+               enableDeleteByExample="false"
+               enableSelectByExample="false"
+               selectByExampleQueryId="false"
+               enableSelectByPrimaryKey="true"
+               enableUpdateByPrimaryKey="true"
+               enableDeleteByPrimaryKey="true"
+        >
+         <property name="useActualColumnNames" value="false"/>
+        </table>
   </context>
 </generatorConfiguration>

+ 27 - 0
src/main/java/com/kede/activity/bo/InputActivity.java

@@ -0,0 +1,27 @@
+package com.kede.activity.bo;
+
+
+import com.kede.common.model.Activity;
+
+public class InputActivity extends Activity {
+
+	/**
+	 * 
+	 */
+	private static final long serialVersionUID = 1L;
+
+
+	private String releaseTimes;
+
+
+	public String getReleaseTimes() {
+		return releaseTimes;
+	}
+
+	public void setReleaseTimes(String releaseTimes) {
+		this.releaseTimes = releaseTimes;
+	}
+
+	
+	
+}

+ 31 - 0
src/main/java/com/kede/activity/bo/OutActivity.java

@@ -0,0 +1,31 @@
+package com.kede.activity.bo;
+
+import com.kede.common.model.Activity;
+
+public class OutActivity extends Activity {
+
+	/**
+	 * 
+	 */
+	private static final long serialVersionUID = 1L;
+
+	private String createTimeConvert;
+	private String releaseTimeConvert;
+
+	public String getCreateTimeConvert() {
+		return createTimeConvert;
+	}
+
+	public void setCreateTimeConvert(String createTimeConvert) {
+		this.createTimeConvert = createTimeConvert;
+	}
+
+	public String getReleaseTimeConvert() {
+		return releaseTimeConvert;
+	}
+
+	public void setReleaseTimeConvert(String releaseTimeConvert) {
+		this.releaseTimeConvert = releaseTimeConvert;
+	}
+
+}

+ 108 - 0
src/main/java/com/kede/activity/controller/AdminActivityApiController.java

@@ -0,0 +1,108 @@
+package com.kede.activity.controller;
+
+import javax.annotation.Resource;
+import javax.servlet.http.HttpServletRequest;
+
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.bind.annotation.RestController;
+
+import com.fasterxml.jackson.core.format.InputAccessor;
+import com.kede.activity.bo.InputActivity;
+import com.kede.activity.service.Impl.ActivityService;
+import com.kede.common.bo.Result;
+import com.kede.common.constant.ErrorConstants;
+import com.kede.common.controller.BaseApiController;
+import com.kede.common.utils.StringUtils;
+import com.kede.news.bo.InputNews;
+
+
+
+
+@RestController
+@RequestMapping(value = "/api/admin/activity")
+public class AdminActivityApiController extends BaseApiController {
+	@Resource
+ 	private ActivityService	activityService;
+	
+
+	@RequestMapping(value = "/addNews", method = RequestMethod.POST)
+	public Result addNews(InputActivity in) {
+		Result res =new Result();
+		inputcheke(in, res);
+		if(!res.getError().isEmpty())return res;
+		res.data(activityService.add(in));
+		return res;
+	}
+
+
+
+
+	private Result inputcheke(InputActivity in, Result res) {
+		if(StringUtils.isBlank(in.getContent())) {
+			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"内容","内容"));
+			return res;
+		}
+		if(StringUtils.isBlank(in.getTitle())) {
+			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"标题","标题"));
+			return res;
+		}
+		if(StringUtils.isBlank(in.getPublisher())) {
+			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"发布人","发布人"));
+			return res;
+		}
+		return res;
+	}
+
+		
+		
+	
+	@RequestMapping(value = "/updateNews", method = RequestMethod.POST)
+	public Result updateNews(InputActivity in) {
+		Result res =new Result();
+		res.data(activityService.update(in));
+		return res;
+	}
+	
+	@RequestMapping(value = "/deleteNews", method = RequestMethod.POST)
+	public Result deleteNews(InputActivity in) {
+		Result res =new Result();
+		if(in.getId()==null) {
+			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"ID","ID"));
+			return res;
+		}
+		res.data(activityService.delete(in));
+		return res;
+	}
+	
+	@RequestMapping(value = "/list", method = RequestMethod.GET)
+	public Result listNews(InputActivity in,Integer pageSize,Integer pageNo) {
+		Result res =new Result();
+		
+		res.data(activityService.listDetails(in,pageSize,pageNo));
+		return res;
+	}
+	
+	@RequestMapping(value = "/selectNews", method = RequestMethod.GET)
+	public Result selectNews(InputNews in) {
+		Result res =new Result();
+		if(in.getId()==null) {
+			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"ID","ID"));
+			return res;
+		}
+		if (!res.getError().isEmpty()) return res;
+//		res.data(activityService.selectNews(in));
+		return res;
+	}
+	
+	/** 上传图片 **/
+	@RequestMapping(value = "/uploadFile", method = RequestMethod.POST)
+	public Result uploadOrderInvoiceFile(HttpServletRequest req){
+		Result res = new Result();
+		res.setData(handleFile(res, "/activity/", false, req, "activity"));
+		return res;
+	}
+
+	
+
+}

+ 17 - 0
src/main/java/com/kede/activity/service/Impl/ActivityService.java

@@ -0,0 +1,17 @@
+package com.kede.activity.service.Impl;
+
+import com.kede.activity.bo.InputActivity;
+import com.kede.activity.bo.OutActivity;
+import com.kede.core.mybatis.page.Pagination;
+
+public interface ActivityService {
+
+	int add(InputActivity in);
+
+	int update(InputActivity in);
+
+	int delete(InputActivity in);
+
+	Pagination<OutActivity> listDetails(InputActivity in, Integer pageSize, Integer pageNo);
+
+}

+ 73 - 0
src/main/java/com/kede/activity/service/Impl/ActivityServiceImpl.java

@@ -0,0 +1,73 @@
+package com.kede.activity.service.Impl;
+
+
+
+
+import java.text.ParseException;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.Map;
+
+import org.springframework.beans.factory.annotation.Autowired;
+
+import com.kede.activity.bo.InputActivity;
+import com.kede.activity.bo.OutActivity;
+import com.kede.common.constant.AFTConstants;
+import com.kede.common.dao.ActivityMapper;
+import com.kede.common.error.BusinessException;
+import com.kede.common.utils.DateUtils;
+import com.kede.core.mybatis.BaseMybatisDao;
+import com.kede.core.mybatis.page.Pagination;
+
+public class ActivityServiceImpl extends BaseMybatisDao<ActivityMapper> implements ActivityService {
+
+	@Autowired
+	private ActivityMapper activityMapper;
+
+	@Override
+	public int add(InputActivity in) {
+		if (in.getReleaseTimes() != null) {
+			try {
+				in.setReleaseTime(DateUtils.StringToDate(in.getReleaseTimes(), AFTConstants.YYYYMMDDHHMMSS));
+			} catch (ParseException e) {
+				throw new BusinessException("转换异常");
+			}
+		}
+		if (in.getReleaseStatus() == 1 && in.getReleaseTime() == null) {
+			in.setReleaseTime(new Date());
+		}
+
+		return activityMapper.insertSelective(in);
+	}
+
+	@Override
+	public int update(InputActivity in) {
+		if (in.getReleaseTimes() != null) {
+			try {
+				in.setReleaseTime(DateUtils.StringToDate(in.getReleaseTimes(), AFTConstants.YYYYMMDDHHMMSS));
+			} catch (ParseException e) {
+				throw new BusinessException("转换异常");
+			}
+		}
+		if (in.getReleaseStatus() != null && in.getReleaseStatus() == 1 && in.getReleaseTime() == null) {
+			in.setReleaseTime(new Date());
+		}
+
+		return activityMapper.updateByPrimaryKeySelective(in);
+	}
+
+	@Override
+	public int delete(InputActivity in) {
+		return activityMapper.deleteByPrimaryKey(in.getId());
+	}
+
+	@SuppressWarnings("unchecked")
+	@Override
+	public Pagination<OutActivity> listDetails(InputActivity in, Integer pageSize, Integer pageNo) {Map<String, Object> params = new HashMap<>();
+	if(pageSize==null||pageSize<0)pageSize=10;
+	if(pageNo==null||pageNo<0)pageNo=1;
+	params.put("n", in);
+	return (Pagination<OutActivity>) findPage("findActivityList", "findActivityCount", params, pageNo, pageSize);
+	}
+
+}

+ 61 - 0
src/main/java/com/kede/common/dao/ActivityMapper.java

@@ -0,0 +1,61 @@
+package com.kede.common.dao;
+
+import com.kede.common.model.Activity;
+
+public interface ActivityMapper {
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table activity
+     *
+     * @mbg.generated Mon Feb 01 17:23:07 CST 2021
+     */
+    int deleteByPrimaryKey(Integer id);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table activity
+     *
+     * @mbg.generated Mon Feb 01 17:23:07 CST 2021
+     */
+    int insert(Activity record);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table activity
+     *
+     * @mbg.generated Mon Feb 01 17:23:07 CST 2021
+     */
+    int insertSelective(Activity record);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table activity
+     *
+     * @mbg.generated Mon Feb 01 17:23:07 CST 2021
+     */
+    Activity selectByPrimaryKey(Integer id);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table activity
+     *
+     * @mbg.generated Mon Feb 01 17:23:07 CST 2021
+     */
+    int updateByPrimaryKeySelective(Activity record);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table activity
+     *
+     * @mbg.generated Mon Feb 01 17:23:07 CST 2021
+     */
+    int updateByPrimaryKeyWithBLOBs(Activity record);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table activity
+     *
+     * @mbg.generated Mon Feb 01 17:23:07 CST 2021
+     */
+    int updateByPrimaryKey(Activity record);
+}

+ 214 - 0
src/main/java/com/kede/common/mapper/ActivityMapper.xml

@@ -0,0 +1,214 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.kede.common.dao.ActivityMapper">
+  <resultMap id="BaseResultMap" type="com.kede.common.model.Activity">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Mon Feb 01 17:23:07 CST 2021.
+    -->
+    <id column="id" jdbcType="INTEGER" property="id" />
+    <result column="title" jdbcType="VARCHAR" property="title" />
+    <result column="publisher" jdbcType="VARCHAR" property="publisher" />
+    <result column="picture_url" jdbcType="VARCHAR" property="pictureUrl" />
+    <result column="sort" jdbcType="INTEGER" property="sort" />
+    <result column="release_status" jdbcType="INTEGER" property="releaseStatus" />
+    <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
+    <result column="release_time" jdbcType="TIMESTAMP" property="releaseTime" />
+  </resultMap>
+  <resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.kede.common.model.Activity">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Mon Feb 01 17:23:07 CST 2021.
+    -->
+    <result column="content" jdbcType="LONGVARCHAR" property="content" />
+  </resultMap>
+  <sql id="Base_Column_List">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Mon Feb 01 17:23:07 CST 2021.
+    -->
+    id, title, publisher, picture_url, sort, release_status, create_time, release_time
+  </sql>
+  <sql id="Blob_Column_List">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Mon Feb 01 17:23:07 CST 2021.
+    -->
+    content
+  </sql>
+  <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="ResultMapWithBLOBs">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Mon Feb 01 17:23:07 CST 2021.
+    -->
+    select 
+    <include refid="Base_Column_List" />
+    ,
+    <include refid="Blob_Column_List" />
+    from activity
+    where id = #{id,jdbcType=INTEGER}
+  </select>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Mon Feb 01 17:23:07 CST 2021.
+    -->
+    delete from activity
+    where id = #{id,jdbcType=INTEGER}
+  </delete>
+  <insert id="insert" parameterType="com.kede.common.model.Activity">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Mon Feb 01 17:23:07 CST 2021.
+    -->
+    insert into activity (id, title, publisher, 
+      picture_url, sort, release_status, 
+      create_time, release_time, content
+      )
+    values (#{id,jdbcType=INTEGER}, #{title,jdbcType=VARCHAR}, #{publisher,jdbcType=VARCHAR}, 
+      #{pictureUrl,jdbcType=VARCHAR}, #{sort,jdbcType=INTEGER}, #{releaseStatus,jdbcType=INTEGER}, 
+      #{createTime,jdbcType=TIMESTAMP}, #{releaseTime,jdbcType=TIMESTAMP}, #{content,jdbcType=LONGVARCHAR}
+      )
+  </insert>
+  <insert id="insertSelective" parameterType="com.kede.common.model.Activity">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Mon Feb 01 17:23:07 CST 2021.
+    -->
+    insert into activity
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        id,
+      </if>
+      <if test="title != null">
+        title,
+      </if>
+      <if test="publisher != null">
+        publisher,
+      </if>
+      <if test="pictureUrl != null">
+        picture_url,
+      </if>
+      <if test="sort != null">
+        sort,
+      </if>
+      <if test="releaseStatus != null">
+        release_status,
+      </if>
+      <if test="createTime != null">
+        create_time,
+      </if>
+      <if test="releaseTime != null">
+        release_time,
+      </if>
+      <if test="content != null">
+        content,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        #{id,jdbcType=INTEGER},
+      </if>
+      <if test="title != null">
+        #{title,jdbcType=VARCHAR},
+      </if>
+      <if test="publisher != null">
+        #{publisher,jdbcType=VARCHAR},
+      </if>
+      <if test="pictureUrl != null">
+        #{pictureUrl,jdbcType=VARCHAR},
+      </if>
+      <if test="sort != null">
+        #{sort,jdbcType=INTEGER},
+      </if>
+      <if test="releaseStatus != null">
+        #{releaseStatus,jdbcType=INTEGER},
+      </if>
+      <if test="createTime != null">
+        #{createTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="releaseTime != null">
+        #{releaseTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="content != null">
+        #{content,jdbcType=LONGVARCHAR},
+      </if>
+    </trim>
+  </insert>
+  <update id="updateByPrimaryKeySelective" parameterType="com.kede.common.model.Activity">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Mon Feb 01 17:23:07 CST 2021.
+    -->
+    update activity
+    <set>
+      <if test="title != null">
+        title = #{title,jdbcType=VARCHAR},
+      </if>
+      <if test="publisher != null">
+        publisher = #{publisher,jdbcType=VARCHAR},
+      </if>
+      <if test="pictureUrl != null">
+        picture_url = #{pictureUrl,jdbcType=VARCHAR},
+      </if>
+      <if test="sort != null">
+        sort = #{sort,jdbcType=INTEGER},
+      </if>
+      <if test="releaseStatus != null">
+        release_status = #{releaseStatus,jdbcType=INTEGER},
+      </if>
+      <if test="createTime != null">
+        create_time = #{createTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="releaseTime != null">
+        release_time = #{releaseTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="content != null">
+        content = #{content,jdbcType=LONGVARCHAR},
+      </if>
+    </set>
+    where id = #{id,jdbcType=INTEGER}
+  </update>
+  <update id="updateByPrimaryKeyWithBLOBs" parameterType="com.kede.common.model.Activity">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Mon Feb 01 17:23:07 CST 2021.
+    -->
+    update activity
+    set title = #{title,jdbcType=VARCHAR},
+      publisher = #{publisher,jdbcType=VARCHAR},
+      picture_url = #{pictureUrl,jdbcType=VARCHAR},
+      sort = #{sort,jdbcType=INTEGER},
+      release_status = #{releaseStatus,jdbcType=INTEGER},
+      create_time = #{createTime,jdbcType=TIMESTAMP},
+      release_time = #{releaseTime,jdbcType=TIMESTAMP},
+      content = #{content,jdbcType=LONGVARCHAR}
+    where id = #{id,jdbcType=INTEGER}
+  </update>
+  <update id="updateByPrimaryKey" parameterType="com.kede.common.model.Activity">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Mon Feb 01 17:23:07 CST 2021.
+    -->
+    update activity
+    set title = #{title,jdbcType=VARCHAR},
+      publisher = #{publisher,jdbcType=VARCHAR},
+      picture_url = #{pictureUrl,jdbcType=VARCHAR},
+      sort = #{sort,jdbcType=INTEGER},
+      release_status = #{releaseStatus,jdbcType=INTEGER},
+      create_time = #{createTime,jdbcType=TIMESTAMP},
+      release_time = #{releaseTime,jdbcType=TIMESTAMP}
+    where id = #{id,jdbcType=INTEGER}
+  </update>
+</mapper>

+ 337 - 0
src/main/java/com/kede/common/model/Activity.java

@@ -0,0 +1,337 @@
+package com.kede.common.model;
+
+import java.io.Serializable;
+import java.util.Date;
+
+public class Activity implements Serializable {
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column activity.id
+     *
+     * @mbg.generated Mon Feb 01 17:23:07 CST 2021
+     */
+    private Integer id;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column activity.title
+     *
+     * @mbg.generated Mon Feb 01 17:23:07 CST 2021
+     */
+    private String title;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column activity.publisher
+     *
+     * @mbg.generated Mon Feb 01 17:23:07 CST 2021
+     */
+    private String publisher;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column activity.picture_url
+     *
+     * @mbg.generated Mon Feb 01 17:23:07 CST 2021
+     */
+    private String pictureUrl;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column activity.sort
+     *
+     * @mbg.generated Mon Feb 01 17:23:07 CST 2021
+     */
+    private Integer sort;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column activity.release_status
+     *
+     * @mbg.generated Mon Feb 01 17:23:07 CST 2021
+     */
+    private Integer releaseStatus;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column activity.create_time
+     *
+     * @mbg.generated Mon Feb 01 17:23:07 CST 2021
+     */
+    private Date createTime;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column activity.release_time
+     *
+     * @mbg.generated Mon Feb 01 17:23:07 CST 2021
+     */
+    private Date releaseTime;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column activity.content
+     *
+     * @mbg.generated Mon Feb 01 17:23:07 CST 2021
+     */
+    private String content;
+
+    /**
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database table activity
+     *
+     * @mbg.generated Mon Feb 01 17:23:07 CST 2021
+     */
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column activity.id
+     *
+     * @return the value of activity.id
+     *
+     * @mbg.generated Mon Feb 01 17:23:07 CST 2021
+     */
+    public Integer getId() {
+        return id;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column activity.id
+     *
+     * @param id the value for activity.id
+     *
+     * @mbg.generated Mon Feb 01 17:23:07 CST 2021
+     */
+    public void setId(Integer id) {
+        this.id = id;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column activity.title
+     *
+     * @return the value of activity.title
+     *
+     * @mbg.generated Mon Feb 01 17:23:07 CST 2021
+     */
+    public String getTitle() {
+        return title;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column activity.title
+     *
+     * @param title the value for activity.title
+     *
+     * @mbg.generated Mon Feb 01 17:23:07 CST 2021
+     */
+    public void setTitle(String title) {
+        this.title = title == null ? null : title.trim();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column activity.publisher
+     *
+     * @return the value of activity.publisher
+     *
+     * @mbg.generated Mon Feb 01 17:23:07 CST 2021
+     */
+    public String getPublisher() {
+        return publisher;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column activity.publisher
+     *
+     * @param publisher the value for activity.publisher
+     *
+     * @mbg.generated Mon Feb 01 17:23:07 CST 2021
+     */
+    public void setPublisher(String publisher) {
+        this.publisher = publisher == null ? null : publisher.trim();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column activity.picture_url
+     *
+     * @return the value of activity.picture_url
+     *
+     * @mbg.generated Mon Feb 01 17:23:07 CST 2021
+     */
+    public String getPictureUrl() {
+        return pictureUrl;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column activity.picture_url
+     *
+     * @param pictureUrl the value for activity.picture_url
+     *
+     * @mbg.generated Mon Feb 01 17:23:07 CST 2021
+     */
+    public void setPictureUrl(String pictureUrl) {
+        this.pictureUrl = pictureUrl == null ? null : pictureUrl.trim();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column activity.sort
+     *
+     * @return the value of activity.sort
+     *
+     * @mbg.generated Mon Feb 01 17:23:07 CST 2021
+     */
+    public Integer getSort() {
+        return sort;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column activity.sort
+     *
+     * @param sort the value for activity.sort
+     *
+     * @mbg.generated Mon Feb 01 17:23:07 CST 2021
+     */
+    public void setSort(Integer sort) {
+        this.sort = sort;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column activity.release_status
+     *
+     * @return the value of activity.release_status
+     *
+     * @mbg.generated Mon Feb 01 17:23:07 CST 2021
+     */
+    public Integer getReleaseStatus() {
+        return releaseStatus;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column activity.release_status
+     *
+     * @param releaseStatus the value for activity.release_status
+     *
+     * @mbg.generated Mon Feb 01 17:23:07 CST 2021
+     */
+    public void setReleaseStatus(Integer releaseStatus) {
+        this.releaseStatus = releaseStatus;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column activity.create_time
+     *
+     * @return the value of activity.create_time
+     *
+     * @mbg.generated Mon Feb 01 17:23:07 CST 2021
+     */
+    public Date getCreateTime() {
+        return createTime;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column activity.create_time
+     *
+     * @param createTime the value for activity.create_time
+     *
+     * @mbg.generated Mon Feb 01 17:23:07 CST 2021
+     */
+    public void setCreateTime(Date createTime) {
+        this.createTime = createTime;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column activity.release_time
+     *
+     * @return the value of activity.release_time
+     *
+     * @mbg.generated Mon Feb 01 17:23:07 CST 2021
+     */
+    public Date getReleaseTime() {
+        return releaseTime;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column activity.release_time
+     *
+     * @param releaseTime the value for activity.release_time
+     *
+     * @mbg.generated Mon Feb 01 17:23:07 CST 2021
+     */
+    public void setReleaseTime(Date releaseTime) {
+        this.releaseTime = releaseTime;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column activity.content
+     *
+     * @return the value of activity.content
+     *
+     * @mbg.generated Mon Feb 01 17:23:07 CST 2021
+     */
+    public String getContent() {
+        return content;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column activity.content
+     *
+     * @param content the value for activity.content
+     *
+     * @mbg.generated Mon Feb 01 17:23:07 CST 2021
+     */
+    public void setContent(String content) {
+        this.content = content == null ? null : content.trim();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table activity
+     *
+     * @mbg.generated Mon Feb 01 17:23:07 CST 2021
+     */
+    @Override
+    public String toString() {
+        StringBuilder sb = new StringBuilder();
+        sb.append(getClass().getSimpleName());
+        sb.append(" [");
+        sb.append("Hash = ").append(hashCode());
+        sb.append(", id=").append(id);
+        sb.append(", title=").append(title);
+        sb.append(", publisher=").append(publisher);
+        sb.append(", pictureUrl=").append(pictureUrl);
+        sb.append(", sort=").append(sort);
+        sb.append(", releaseStatus=").append(releaseStatus);
+        sb.append(", createTime=").append(createTime);
+        sb.append(", releaseTime=").append(releaseTime);
+        sb.append(", content=").append(content);
+        sb.append(", serialVersionUID=").append(serialVersionUID);
+        sb.append("]");
+        return sb.toString();
+    }
+}