浏览代码

轮播更换成动态获取

anderx 7 年之前
父节点
当前提交
60ffb057e7

+ 1 - 2
GeneratorConfig.xml

@@ -10,7 +10,6 @@
    <javaModelGenerator targetPackage="com.goafanti.common.model" targetProject="jitao-server" />
    <sqlMapGenerator targetPackage="com.goafanti.common.mapper" targetProject="jitao-server" />
    <javaClientGenerator targetPackage="com.goafanti.common.dao" targetProject="jitao-server" type="XMLMAPPER" />
-   <table schema="aft" tableName="jt_message_producer"/>
-   <table schema="aft" tableName="jt_message_consumer"/>
+   <table schema="aft" tableName="banners"/>
   </context>
 </generatorConfiguration>

+ 6 - 5
src/main/java/com/goafanti/app/controller/OpenAppHomeController.java

@@ -14,6 +14,8 @@ import org.springframework.web.bind.annotation.ResponseBody;
 import org.springframework.web.bind.annotation.RestController;
 
 import com.goafanti.app.bo.HomeImgBo;
+import com.goafanti.banners.enums.BannersType;
+import com.goafanti.banners.service.BannersService;
 import com.goafanti.business.service.JtBusinessService;
 import com.goafanti.business.service.JtTagService;
 import com.goafanti.comment.bo.CommentResult;
@@ -22,6 +24,7 @@ import com.goafanti.common.bo.Result;
 import com.goafanti.common.constant.AFTConstants;
 import com.goafanti.common.constant.ErrorConstants;
 import com.goafanti.common.controller.BaseApiController;
+import com.goafanti.common.enums.BannersStatus;
 import com.goafanti.common.utils.StringUtils;
 
 @RestController
@@ -34,6 +37,8 @@ public class OpenAppHomeController extends BaseApiController{
 	private CommentService	commentService;
 	@Resource
 	private JtTagService	jtTagService;
+	@Resource
+	private BannersService	bannersService;
 	
 	
 	
@@ -158,11 +163,7 @@ public class OpenAppHomeController extends BaseApiController{
 		Map<String, Object> map=new HashMap<>();
 		//1 赚钱数据    2首页数据
 		map.put("recommended", jtBusinessService.recommendedApplication(1,pageNo,pageSize));
-		List<HomeImgBo> l=new ArrayList<>();
-		l.add(new HomeImgBo("/img/index/continueHighApp.jpg","/portal/continueHighApp.html"));
-		l.add(new HomeImgBo("/img/index/practicalPatentApp.jpg","/portal/practicalPatentApp.html"));
-		l.add(new HomeImgBo("/img/index/militaryProjectApp.jpg","/portal/militaryProjectApp.html"));
-		map.put("homeImg", l);
+		map.put("homeImg", bannersService.findBannersList( BannersStatus.HOME.getDesc(),1, 3, 1));
 		result.setData(map);
 		return result;
 	}

+ 24 - 5
src/main/java/com/goafanti/banners/controller/AdminBannersApiController.java

@@ -25,7 +25,7 @@ import com.goafanti.common.utils.StringUtils;
 import com.goafanti.core.mybatis.JDBCIdGenerator;
 
 @Controller
-@RequestMapping(value = "/api/admin/banners")
+@RequestMapping(value = "/open/api/admin/banners")
 public class AdminBannersApiController extends BaseApiController {
 	@Resource
 	BannersService	bannersService;
@@ -42,7 +42,7 @@ public class AdminBannersApiController extends BaseApiController {
 		return res;
 	}
 
-	@RequestMapping(value = "/save", method = RequestMethod.POST)
+	/*@RequestMapping(value = "/save", method = RequestMethod.POST)
 	public Result save(@Valid Banners banners, BindingResult bindingResult) {
 		Assert.notNull(banners, "广告图参数不正确");
 		Assert.isTrue(StringUtils.isNotBlank(banners.getSign()) && BannersType.containsType(banners.getSign()),
@@ -75,14 +75,13 @@ public class AdminBannersApiController extends BaseApiController {
 	public Result delete(String id) {
 		Assert.isTrue(StringUtils.isNumeric(id), "广告图id不正确。");
 		return res().data(bannersService.deleteBanner(Long.valueOf(id)));
-	}
-
+	} 
 	@RequestMapping(value = "/clearCache", method = RequestMethod.GET)
 	public Result clearCache(String key) {
 		Assert.isTrue(StringUtils.isNotBlank(key) && BannersType.containsType(key), "广告图位置标示不正确。");
 		bannersService.cleanList(key);
 		return res().data(bannersService.findPortalBanners(key));
-	}
+	}*/
 
 	@RequestMapping(value = "/keys", method = RequestMethod.GET)
 	public Result portalBannersKeys() {
@@ -92,5 +91,25 @@ public class AdminBannersApiController extends BaseApiController {
 		}
 		return res().data(types);
 	}
+	
+	@RequestMapping(value="/save" ,method=RequestMethod.POST)
+	public Result save(Banners b){
+		Result result=new Result();
+		result.setData(bannersService.insertBanner(b));
+		return result;
+	}
+	@RequestMapping(value="/delete" ,method=RequestMethod.POST)
+	public Result delete(String  id){
+		Result result=new Result();
+		result.setData(bannersService.deleteBanner(id));
+		return result;
+	}
+	@RequestMapping(value="/list" ,method=RequestMethod.GET)
+	public Result list(String apiUrl,Integer client,Integer pageSize,Integer pageNo){
+		Result result=new Result();
+		result.setData(bannersService.findBannersList( apiUrl,client, pageSize, pageNo));
+		return result;
+	}
+	
 
 }

+ 14 - 16
src/main/java/com/goafanti/banners/service/BannersService.java

@@ -3,6 +3,7 @@ package com.goafanti.banners.service;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
+import java.util.UUID;
 
 import org.apache.commons.lang3.StringUtils;
 import org.slf4j.Logger;
@@ -12,6 +13,7 @@ import org.springframework.cache.annotation.CacheEvict;
 import org.springframework.cache.annotation.Cacheable;
 import org.springframework.stereotype.Service;
 
+import com.alibaba.druid.sql.visitor.functions.If;
 import com.goafanti.common.dao.BannersMapper;
 import com.goafanti.common.model.Banners;
 import com.goafanti.common.utils.LoggerUtils;
@@ -25,6 +27,7 @@ public class BannersService extends BaseMybatisDao<BannersMapper> {
 	private static final Logger	logger	= LoggerFactory.getLogger(BannersService.class);
 
 	public int insertBanner(Banners banners) {
+		banners.setId(UUID.randomUUID().toString());
 		return bannersMapper.insertSelective(banners);
 	}
 
@@ -32,34 +35,29 @@ public class BannersService extends BaseMybatisDao<BannersMapper> {
 		return bannersMapper.updateByPrimaryKeySelective(banners);
 	}
 
-	public int deleteBanner(Long id) {
+	public int deleteBanner(String id) {
 		return bannersMapper.deleteByPrimaryKey(id);
 	}
 
-	public List<Banners> findBannersList(String sign, Integer pageNo, Integer pageSize) {
-		return portalBanners(sign, pageNo, pageSize);
+	public List<Banners> findBannersList(String apiUrl,Integer client,Integer pageSize,Integer pageNo) {
+		return portalBanners(apiUrl, client, pageNo, pageSize);
 	}
 	
 	public int findBannersListCount(String sign) {
 		return bannersMapper.findBannerListCount(sign);
 	}
 
-	public List<Banners> previewPortalBanners(String key) {
-		return portalBanners(key, 0, 6);
-	}
-
-	@Cacheable(value = "BannersListCache", key = "'BannersList:Key:'+#key")
-	public List<Banners> findPortalBanners(String key) {
-		return portalBanners(key, 0, 6);
-	}
 
-	private List<Banners> portalBanners(String sign, Integer pageNo, Integer pageSize) {
+	private List<Banners> portalBanners(String apiUrl,Integer client, Integer pageNo, Integer pageSize) {
 		Map<String, Object> params = new HashMap<String, Object>();
-		if (StringUtils.isNotBlank(sign)) {
-			params.put("sign", sign);
+		if(pageSize==null||pageSize<1)pageSize=10;
+		if(pageNo==null||pageNo<1)pageNo=1;
+		if (StringUtils.isNotBlank(apiUrl)) {
+			params.put("apiUrl", apiUrl);
 		}
-		params.put("pageSize", pageSize);
-		params.put("pageNo", pageNo);
+		int pSize=(pageNo - 1) * pageSize;
+		params.put("pS", pSize<1?10:pSize);
+		params.put("pN", pSize);
 		return bannersMapper.findBannerList(params);
 	}
 

+ 4 - 4
src/main/java/com/goafanti/common/controller/WebpageController.java

@@ -325,7 +325,7 @@ public class WebpageController extends BaseController {
 	@RequestMapping(value = "/portal/evaluation/index", method = RequestMethod.GET)
 	public ModelAndView evaluation(HttpServletRequest request, ModelAndView modelview) {
 		modelview.setViewName("/portal/evaluation/index");
-		handleBanners(modelview, BannersType.JI_SHU_PING_GU);
+		//handleBanners(modelview, BannersType.JI_SHU_PING_GU);
 		return modelview;
 	}
 
@@ -549,7 +549,7 @@ public class WebpageController extends BaseController {
 	@RequestMapping(value = "/portal/technologyTrading/index", method = RequestMethod.GET)
 	public ModelAndView portalTechnologyTradingIndex(HttpServletRequest request, ModelAndView modelview) {
 		modelview.setViewName("/portal/technologyTrading/index");
-		handleBanners(modelview, BannersType.JI_SHU_JIAO_YI);
+		//handleBanners(modelview, BannersType.JI_SHU_JIAO_YI);
 		List<NewsPortalList> newsPortalList = newsService.portalNewsPolicy();
 		modelview.addObject("newsPortalList", newsPortalList);
 		List<NewsPortalList> portalNewsQuestion = newsService.portalNewsQuestion();
@@ -639,12 +639,12 @@ public class WebpageController extends BaseController {
 		return modelview;
 	}
 
-	private void handleBanners(ModelAndView modelview, BannersType bannersType) {
+	/*private void handleBanners(ModelAndView modelview, BannersType bannersType) {
 		List<Banners> banners = bannersService.findPortalBanners(bannersType.getKey());
 		if (!banners.isEmpty()) {
 			modelview.addObject("banners", banners);
 		}
-	}
+	}*/
 
 	/**
 	 * 服务-推荐

+ 61 - 6
src/main/java/com/goafanti/common/dao/BannersMapper.java

@@ -6,19 +6,74 @@ import java.util.Map;
 import org.apache.ibatis.annotations.Param;
 
 import com.goafanti.common.model.Banners;
+import com.goafanti.common.model.BannersExample;
 
 public interface BannersMapper {
-    int deleteByPrimaryKey(Long id);
+    /**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table banners
+	 * @mbg.generated  Thu Aug 30 08:27:53 CST 2018
+	 */
+	long countByExample(BannersExample example);
 
-    int insert(Banners record);
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table banners
+	 * @mbg.generated  Thu Aug 30 08:27:53 CST 2018
+	 */
+	int deleteByExample(BannersExample example);
 
-    int insertSelective(Banners record);
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table banners
+	 * @mbg.generated  Thu Aug 30 08:27:53 CST 2018
+	 */
+	int deleteByPrimaryKey(String id);
 
-    Banners selectByPrimaryKey(Long id);
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table banners
+	 * @mbg.generated  Thu Aug 30 08:27:53 CST 2018
+	 */
+	int insert(Banners record);
 
-    int updateByPrimaryKeySelective(Banners record);
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table banners
+	 * @mbg.generated  Thu Aug 30 08:27:53 CST 2018
+	 */
+	int insertSelective(Banners record);
 
-    int updateByPrimaryKey(Banners record);
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table banners
+	 * @mbg.generated  Thu Aug 30 08:27:53 CST 2018
+	 */
+	List<Banners> selectByExample(BannersExample example);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table banners
+	 * @mbg.generated  Thu Aug 30 08:27:53 CST 2018
+	 */
+	Banners selectByPrimaryKey(String id);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table banners
+	 * @mbg.generated  Thu Aug 30 08:27:53 CST 2018
+	 */
+	int updateByExampleSelective(@Param("record") Banners record, @Param("example") BannersExample example);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table banners
+	 * @mbg.generated  Thu Aug 30 08:27:53 CST 2018
+	 */
+	int updateByExample(@Param("record") Banners record, @Param("example") BannersExample example);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table banners
+	 * @mbg.generated  Thu Aug 30 08:27:53 CST 2018
+	 */
+	int updateByPrimaryKeySelective(Banners record);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table banners
+	 * @mbg.generated  Thu Aug 30 08:27:53 CST 2018
+	 */
+	int updateByPrimaryKey(Banners record);
 
 	List<Banners> findBannerList(Map<String, Object> params);
 

+ 55 - 0
src/main/java/com/goafanti/common/enums/BannersStatus.java

@@ -0,0 +1,55 @@
+package com.goafanti.common.enums;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.apache.commons.lang3.StringUtils;
+
+public enum BannersStatus {
+	
+	HOME( 1,"home"),
+	OTHER(0, "other");
+
+	private BannersStatus(Integer code, String desc) {
+		this.code = code;
+		this.desc = desc;
+	}
+
+	private static Map<Integer, BannersStatus> status = new HashMap<Integer, BannersStatus>();
+
+	static {
+		for (BannersStatus value : BannersStatus.values()) {
+			status.put(value.getCode(), value);
+		}
+	}
+
+	public static BannersStatus getStatus(Integer code) {
+		if (containsType(code)) {
+			return status.get(code);
+		}
+		return OTHER;
+	}
+
+	public static BannersStatus getStatus(String code) {
+		if (StringUtils.isNumeric(code)) {
+			return getStatus(Integer.parseInt(code));
+		}
+		return OTHER;
+	}
+
+	public static boolean containsType(Integer code) {
+		return status.containsKey(code);
+	}
+
+	private Integer	code;
+	private String	desc;
+
+	public Integer getCode() {
+		return code;
+	}
+
+	public String getDesc() {
+		return desc;
+	}
+
+}

+ 282 - 77
src/main/java/com/goafanti/common/mapper/BannersMapper.xml

@@ -2,56 +2,184 @@
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.goafanti.common.dao.BannersMapper">
   <resultMap id="BaseResultMap" type="com.goafanti.common.model.Banners">
-    <id column="id" jdbcType="BIGINT" property="id" />
-    <result column="sign" jdbcType="VARCHAR" property="sign" />
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Thu Aug 30 08:27:53 CST 2018.
+    -->
+    <id column="id" jdbcType="VARCHAR" property="id" />
     <result column="text" jdbcType="VARCHAR" property="text" />
-    <result column="imgUrl" jdbcType="VARCHAR" property="imgurl" />
-    <result column="url" jdbcType="VARCHAR" property="url" />
+    <result column="img_url" jdbcType="VARCHAR" property="imgUrl" />
+    <result column="api_url" jdbcType="VARCHAR" property="apiUrl" />
+    <result column="forward_url" jdbcType="VARCHAR" property="forwardUrl" />
     <result column="width" jdbcType="INTEGER" property="width" />
     <result column="height" jdbcType="INTEGER" property="height" />
-    <result column="start_date" jdbcType="TIMESTAMP" property="startDate" />
-    <result column="end_date" jdbcType="TIMESTAMP" property="endDate" />
+    <result column="client" jdbcType="INTEGER" property="client" />
+    <result column="delete_sign" jdbcType="BIT" property="deleteSign" />
   </resultMap>
+  <sql id="Example_Where_Clause">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Thu Aug 30 08:27:53 CST 2018.
+    -->
+    <where>
+      <foreach collection="oredCriteria" item="criteria" separator="or">
+        <if test="criteria.valid">
+          <trim prefix="(" prefixOverrides="and" suffix=")">
+            <foreach collection="criteria.criteria" item="criterion">
+              <choose>
+                <when test="criterion.noValue">
+                  and ${criterion.condition}
+                </when>
+                <when test="criterion.singleValue">
+                  and ${criterion.condition} #{criterion.value}
+                </when>
+                <when test="criterion.betweenValue">
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
+                </when>
+                <when test="criterion.listValue">
+                  and ${criterion.condition}
+                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
+                    #{listItem}
+                  </foreach>
+                </when>
+              </choose>
+            </foreach>
+          </trim>
+        </if>
+      </foreach>
+    </where>
+  </sql>
+  <sql id="Update_By_Example_Where_Clause">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Thu Aug 30 08:27:53 CST 2018.
+    -->
+    <where>
+      <foreach collection="example.oredCriteria" item="criteria" separator="or">
+        <if test="criteria.valid">
+          <trim prefix="(" prefixOverrides="and" suffix=")">
+            <foreach collection="criteria.criteria" item="criterion">
+              <choose>
+                <when test="criterion.noValue">
+                  and ${criterion.condition}
+                </when>
+                <when test="criterion.singleValue">
+                  and ${criterion.condition} #{criterion.value}
+                </when>
+                <when test="criterion.betweenValue">
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
+                </when>
+                <when test="criterion.listValue">
+                  and ${criterion.condition}
+                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
+                    #{listItem}
+                  </foreach>
+                </when>
+              </choose>
+            </foreach>
+          </trim>
+        </if>
+      </foreach>
+    </where>
+  </sql>
   <sql id="Base_Column_List">
-    id, sign, text, imgUrl, url, width, height, start_date, end_date
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Thu Aug 30 08:27:53 CST 2018.
+    -->
+    id, text, img_url, api_url, forward_url, width, height, client, delete_sign
   </sql>
-  <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
+  <select id="selectByExample" parameterType="com.goafanti.common.model.BannersExample" resultMap="BaseResultMap">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Thu Aug 30 08:27:53 CST 2018.
+    -->
+    select
+    <if test="distinct">
+      distinct
+    </if>
+    <include refid="Base_Column_List" />
+    from banners
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+    <if test="orderByClause != null">
+      order by ${orderByClause}
+    </if>
+  </select>
+  <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Thu Aug 30 08:27:53 CST 2018.
+    -->
     select 
     <include refid="Base_Column_List" />
     from banners
-    where id = #{id,jdbcType=BIGINT}
+    where id = #{id,jdbcType=VARCHAR}
   </select>
-  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Thu Aug 30 08:27:53 CST 2018.
+    -->
+    delete from banners
+    where id = #{id,jdbcType=VARCHAR}
+  </delete>
+  <delete id="deleteByExample" parameterType="com.goafanti.common.model.BannersExample">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Thu Aug 30 08:27:53 CST 2018.
+    -->
     delete from banners
-    where id = #{id,jdbcType=BIGINT}
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
   </delete>
   <insert id="insert" parameterType="com.goafanti.common.model.Banners">
-    insert into banners (id, sign, text, 
-      imgUrl, url, width, 
-      height, start_date, end_date
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Thu Aug 30 08:27:53 CST 2018.
+    -->
+    insert into banners (id, text, img_url, 
+      api_url, forward_url, width, 
+      height, client, delete_sign
       )
-    values (#{id,jdbcType=BIGINT}, #{sign,jdbcType=VARCHAR}, #{text,jdbcType=VARCHAR}, 
-      #{imgurl,jdbcType=VARCHAR}, #{url,jdbcType=VARCHAR}, #{width,jdbcType=INTEGER}, 
-      #{height,jdbcType=INTEGER}, #{startDate,jdbcType=TIMESTAMP}, #{endDate,jdbcType=TIMESTAMP}
+    values (#{id,jdbcType=VARCHAR}, #{text,jdbcType=VARCHAR}, #{imgUrl,jdbcType=VARCHAR}, 
+      #{apiUrl,jdbcType=VARCHAR}, #{forwardUrl,jdbcType=VARCHAR}, #{width,jdbcType=INTEGER}, 
+      #{height,jdbcType=INTEGER}, #{client,jdbcType=INTEGER}, #{deleteSign,jdbcType=BIT}
       )
   </insert>
   <insert id="insertSelective" parameterType="com.goafanti.common.model.Banners">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Thu Aug 30 08:27:53 CST 2018.
+    -->
     insert into banners
     <trim prefix="(" suffix=")" suffixOverrides=",">
       <if test="id != null">
         id,
       </if>
-      <if test="sign != null">
-        sign,
-      </if>
       <if test="text != null">
         text,
       </if>
-      <if test="imgurl != null">
-        imgUrl,
+      <if test="imgUrl != null">
+        img_url,
       </if>
-      <if test="url != null">
-        url,
+      <if test="apiUrl != null">
+        api_url,
+      </if>
+      <if test="forwardUrl != null">
+        forward_url,
       </if>
       <if test="width != null">
         width,
@@ -59,28 +187,28 @@
       <if test="height != null">
         height,
       </if>
-      <if test="startDate != null">
-        start_date,
+      <if test="client != null">
+        client,
       </if>
-      <if test="endDate != null">
-        end_date,
+      <if test="deleteSign != null">
+        delete_sign,
       </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides=",">
       <if test="id != null">
-        #{id,jdbcType=BIGINT},
-      </if>
-      <if test="sign != null">
-        #{sign,jdbcType=VARCHAR},
+        #{id,jdbcType=VARCHAR},
       </if>
       <if test="text != null">
         #{text,jdbcType=VARCHAR},
       </if>
-      <if test="imgurl != null">
-        #{imgurl,jdbcType=VARCHAR},
+      <if test="imgUrl != null">
+        #{imgUrl,jdbcType=VARCHAR},
       </if>
-      <if test="url != null">
-        #{url,jdbcType=VARCHAR},
+      <if test="apiUrl != null">
+        #{apiUrl,jdbcType=VARCHAR},
+      </if>
+      <if test="forwardUrl != null">
+        #{forwardUrl,jdbcType=VARCHAR},
       </if>
       <if test="width != null">
         #{width,jdbcType=INTEGER},
@@ -88,28 +216,104 @@
       <if test="height != null">
         #{height,jdbcType=INTEGER},
       </if>
-      <if test="startDate != null">
-        #{startDate,jdbcType=TIMESTAMP},
+      <if test="client != null">
+        #{client,jdbcType=INTEGER},
       </if>
-      <if test="endDate != null">
-        #{endDate,jdbcType=TIMESTAMP},
+      <if test="deleteSign != null">
+        #{deleteSign,jdbcType=BIT},
       </if>
     </trim>
   </insert>
-  <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.Banners">
+  <select id="countByExample" parameterType="com.goafanti.common.model.BannersExample" resultType="java.lang.Long">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Thu Aug 30 08:27:53 CST 2018.
+    -->
+    select count(*) from banners
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </select>
+  <update id="updateByExampleSelective" parameterType="map">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Thu Aug 30 08:27:53 CST 2018.
+    -->
     update banners
     <set>
-      <if test="sign != null">
-        sign = #{sign,jdbcType=VARCHAR},
+      <if test="record.id != null">
+        id = #{record.id,jdbcType=VARCHAR},
+      </if>
+      <if test="record.text != null">
+        text = #{record.text,jdbcType=VARCHAR},
+      </if>
+      <if test="record.imgUrl != null">
+        img_url = #{record.imgUrl,jdbcType=VARCHAR},
       </if>
+      <if test="record.apiUrl != null">
+        api_url = #{record.apiUrl,jdbcType=VARCHAR},
+      </if>
+      <if test="record.forwardUrl != null">
+        forward_url = #{record.forwardUrl,jdbcType=VARCHAR},
+      </if>
+      <if test="record.width != null">
+        width = #{record.width,jdbcType=INTEGER},
+      </if>
+      <if test="record.height != null">
+        height = #{record.height,jdbcType=INTEGER},
+      </if>
+      <if test="record.client != null">
+        client = #{record.client,jdbcType=INTEGER},
+      </if>
+      <if test="record.deleteSign != null">
+        delete_sign = #{record.deleteSign,jdbcType=BIT},
+      </if>
+    </set>
+    <if test="_parameter != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByExample" parameterType="map">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Thu Aug 30 08:27:53 CST 2018.
+    -->
+    update banners
+    set id = #{record.id,jdbcType=VARCHAR},
+      text = #{record.text,jdbcType=VARCHAR},
+      img_url = #{record.imgUrl,jdbcType=VARCHAR},
+      api_url = #{record.apiUrl,jdbcType=VARCHAR},
+      forward_url = #{record.forwardUrl,jdbcType=VARCHAR},
+      width = #{record.width,jdbcType=INTEGER},
+      height = #{record.height,jdbcType=INTEGER},
+      client = #{record.client,jdbcType=INTEGER},
+      delete_sign = #{record.deleteSign,jdbcType=BIT}
+    <if test="_parameter != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.Banners">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Thu Aug 30 08:27:53 CST 2018.
+    -->
+    update banners
+    <set>
       <if test="text != null">
         text = #{text,jdbcType=VARCHAR},
       </if>
-      <if test="imgurl != null">
-        imgUrl = #{imgurl,jdbcType=VARCHAR},
+      <if test="imgUrl != null">
+        img_url = #{imgUrl,jdbcType=VARCHAR},
+      </if>
+      <if test="apiUrl != null">
+        api_url = #{apiUrl,jdbcType=VARCHAR},
       </if>
-      <if test="url != null">
-        url = #{url,jdbcType=VARCHAR},
+      <if test="forwardUrl != null">
+        forward_url = #{forwardUrl,jdbcType=VARCHAR},
       </if>
       <if test="width != null">
         width = #{width,jdbcType=INTEGER},
@@ -117,44 +321,45 @@
       <if test="height != null">
         height = #{height,jdbcType=INTEGER},
       </if>
-      <if test="startDate != null">
-        start_date = #{startDate,jdbcType=TIMESTAMP},
+      <if test="client != null">
+        client = #{client,jdbcType=INTEGER},
       </if>
-      <if test="endDate != null">
-        end_date = #{endDate,jdbcType=TIMESTAMP},
+      <if test="deleteSign != null">
+        delete_sign = #{deleteSign,jdbcType=BIT},
       </if>
     </set>
-    where id = #{id,jdbcType=BIGINT}
+    where id = #{id,jdbcType=VARCHAR}
   </update>
   <update id="updateByPrimaryKey" parameterType="com.goafanti.common.model.Banners">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Thu Aug 30 08:27:53 CST 2018.
+    -->
     update banners
-    set sign = #{sign,jdbcType=VARCHAR},
-      text = #{text,jdbcType=VARCHAR},
-      imgUrl = #{imgurl,jdbcType=VARCHAR},
-      url = #{url,jdbcType=VARCHAR},
+    set text = #{text,jdbcType=VARCHAR},
+      img_url = #{imgUrl,jdbcType=VARCHAR},
+      api_url = #{apiUrl,jdbcType=VARCHAR},
+      forward_url = #{forwardUrl,jdbcType=VARCHAR},
       width = #{width,jdbcType=INTEGER},
       height = #{height,jdbcType=INTEGER},
-      start_date = #{startDate,jdbcType=TIMESTAMP},
-      end_date = #{endDate,jdbcType=TIMESTAMP}
-    where id = #{id,jdbcType=BIGINT}
+      client = #{client,jdbcType=INTEGER},
+      delete_sign = #{deleteSign,jdbcType=BIT}
+    where id = #{id,jdbcType=VARCHAR}
   </update>
   <select id="findBannerList" resultMap="BaseResultMap">
-		select
-		<include refid="Base_Column_List" />
-		from banners where 1=1 
-		<if test="sign != null">
-			and sign = #{sign,jdbcType=VARCHAR}
-		</if>
-		order by id desc
-		<if test="pageNo != null and pageSize != null">
-		limit #{pageNo,jdbcType=INTEGER}, #{pageSize,jdbcType=INTEGER}
-		</if>
-	</select>
-	<select id="findBannerListCount" parameterType="java.lang.String" resultType="java.lang.Integer">
-		select count(1)
-		from banners where 1=1 
-		<if test="sign != null">
-			and sign = #{sign,jdbcType=VARCHAR}
-		</if>
-	</select>
+  select
+  <include refid="Base_Column_List" /> 
+ 	from banners
+	where delete_sign=0
+	<if test="apiUrl != null">
+	and api_url= #{apiUrl,jdbcType=VARCHAR}
+	</if>
+	<if test="client != null">
+	and client= #{client,jdbcType=INTEGER}
+	</if>
+	<if test="pN != null and pS != null">
+	limit #{pN,jdbcType=INTEGER},#{pS,jdbcType=INTEGER}
+	</if>
+  </select>
 </mapper>

+ 145 - 60
src/main/java/com/goafanti/common/model/Banners.java

@@ -9,128 +9,213 @@ import com.fasterxml.jackson.annotation.JsonFormat;
 import com.fasterxml.jackson.annotation.JsonFormat.Shape;
 
 public class Banners {
+
 	/**
-	 * 主键
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column banners.id
+	 * @mbg.generated  Thu Aug 30 08:27:53 CST 2018
 	 */
-	private Long	id;
-
+	private String id;
 	/**
-	 * 广告图位置标识
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column banners.text
+	 * @mbg.generated  Thu Aug 30 08:27:53 CST 2018
 	 */
-	private String	sign;
-
+	private String text;
 	/**
-	 * 图片描述
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column banners.img_url
+	 * @mbg.generated  Thu Aug 30 08:27:53 CST 2018
 	 */
-	@Size(min = 0, max = 255)
-	private String	text;
-
+	private String imgUrl;
 	/**
-	 * 图片url
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column banners.api_url
+	 * @mbg.generated  Thu Aug 30 08:27:53 CST 2018
 	 */
-	@Size(min = 0, max = 255)
-	private String	imgurl;
-
+	private String apiUrl;
 	/**
-	 * 广告图跳转链接地址
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column banners.forward_url
+	 * @mbg.generated  Thu Aug 30 08:27:53 CST 2018
 	 */
-	@Size(min = 0, max = 255)
-	private String	url;
-
+	private String forwardUrl;
 	/**
-	 * 广告图宽度
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column banners.width
+	 * @mbg.generated  Thu Aug 30 08:27:53 CST 2018
 	 */
-	@Max(value = 99999)
-	private Integer	width;
-
+	private Integer width;
 	/**
-	 * 广告图高度
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column banners.height
+	 * @mbg.generated  Thu Aug 30 08:27:53 CST 2018
 	 */
-	@Max(value = 99999)
-	private Integer	height;
-
+	private Integer height;
 	/**
-	 * 开始日期
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column banners.client
+	 * @mbg.generated  Thu Aug 30 08:27:53 CST 2018
 	 */
-	private Date	startDate;
-
+	private Integer client;
 	/**
-	 * 结束日期
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column banners.delete_sign
+	 * @mbg.generated  Thu Aug 30 08:27:53 CST 2018
 	 */
-	private Date	endDate;
+	private Boolean deleteSign;
 
-	@JsonFormat(shape = Shape.STRING)
-	public Long getId() {
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column banners.id
+	 * @return  the value of banners.id
+	 * @mbg.generated  Thu Aug 30 08:27:53 CST 2018
+	 */
+	public String getId() {
 		return id;
 	}
 
-	public void setId(Long id) {
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column banners.id
+	 * @param id  the value for banners.id
+	 * @mbg.generated  Thu Aug 30 08:27:53 CST 2018
+	 */
+	public void setId(String id) {
 		this.id = id;
 	}
 
-	public String getSign() {
-		return sign;
-	}
-
-	public void setSign(String sign) {
-		this.sign = sign;
-	}
-
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column banners.text
+	 * @return  the value of banners.text
+	 * @mbg.generated  Thu Aug 30 08:27:53 CST 2018
+	 */
 	public String getText() {
 		return text;
 	}
 
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column banners.text
+	 * @param text  the value for banners.text
+	 * @mbg.generated  Thu Aug 30 08:27:53 CST 2018
+	 */
 	public void setText(String text) {
 		this.text = text;
 	}
 
-	public String getImgurl() {
-		return imgurl;
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column banners.img_url
+	 * @return  the value of banners.img_url
+	 * @mbg.generated  Thu Aug 30 08:27:53 CST 2018
+	 */
+	public String getImgUrl() {
+		return imgUrl;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column banners.img_url
+	 * @param imgUrl  the value for banners.img_url
+	 * @mbg.generated  Thu Aug 30 08:27:53 CST 2018
+	 */
+	public void setImgUrl(String imgUrl) {
+		this.imgUrl = imgUrl;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column banners.api_url
+	 * @return  the value of banners.api_url
+	 * @mbg.generated  Thu Aug 30 08:27:53 CST 2018
+	 */
+	public String getApiUrl() {
+		return apiUrl;
 	}
 
-	public void setImgurl(String imgurl) {
-		this.imgurl = imgurl;
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column banners.api_url
+	 * @param apiUrl  the value for banners.api_url
+	 * @mbg.generated  Thu Aug 30 08:27:53 CST 2018
+	 */
+	public void setApiUrl(String apiUrl) {
+		this.apiUrl = apiUrl;
 	}
 
-	public String getUrl() {
-		return url;
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column banners.forward_url
+	 * @return  the value of banners.forward_url
+	 * @mbg.generated  Thu Aug 30 08:27:53 CST 2018
+	 */
+	public String getForwardUrl() {
+		return forwardUrl;
 	}
 
-	public void setUrl(String url) {
-		this.url = url;
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column banners.forward_url
+	 * @param forwardUrl  the value for banners.forward_url
+	 * @mbg.generated  Thu Aug 30 08:27:53 CST 2018
+	 */
+	public void setForwardUrl(String forwardUrl) {
+		this.forwardUrl = forwardUrl;
 	}
 
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column banners.width
+	 * @return  the value of banners.width
+	 * @mbg.generated  Thu Aug 30 08:27:53 CST 2018
+	 */
 	public Integer getWidth() {
 		return width;
 	}
 
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column banners.width
+	 * @param width  the value for banners.width
+	 * @mbg.generated  Thu Aug 30 08:27:53 CST 2018
+	 */
 	public void setWidth(Integer width) {
 		this.width = width;
 	}
 
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column banners.height
+	 * @return  the value of banners.height
+	 * @mbg.generated  Thu Aug 30 08:27:53 CST 2018
+	 */
 	public Integer getHeight() {
 		return height;
 	}
 
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column banners.height
+	 * @param height  the value for banners.height
+	 * @mbg.generated  Thu Aug 30 08:27:53 CST 2018
+	 */
 	public void setHeight(Integer height) {
 		this.height = height;
 	}
 
-	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", locale = "zh", timezone = "GMT+8")
-	public Date getStartDate() {
-		return startDate;
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column banners.client
+	 * @return  the value of banners.client
+	 * @mbg.generated  Thu Aug 30 08:27:53 CST 2018
+	 */
+	public Integer getClient() {
+		return client;
 	}
 
-	public void setStartDate(Date startDate) {
-		this.startDate = startDate;
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column banners.client
+	 * @param client  the value for banners.client
+	 * @mbg.generated  Thu Aug 30 08:27:53 CST 2018
+	 */
+	public void setClient(Integer client) {
+		this.client = client;
 	}
 
-	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", locale = "zh", timezone = "GMT+8")
-	public Date getEndDate() {
-		return endDate;
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column banners.delete_sign
+	 * @return  the value of banners.delete_sign
+	 * @mbg.generated  Thu Aug 30 08:27:53 CST 2018
+	 */
+	public Boolean getDeleteSign() {
+		return deleteSign;
 	}
 
-	public void setEndDate(Date endDate) {
-		this.endDate = endDate;
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column banners.delete_sign
+	 * @param deleteSign  the value for banners.delete_sign
+	 * @mbg.generated  Thu Aug 30 08:27:53 CST 2018
+	 */
+	public void setDeleteSign(Boolean deleteSign) {
+		this.deleteSign = deleteSign;
 	}
+
 }

+ 851 - 0
src/main/java/com/goafanti/common/model/BannersExample.java

@@ -0,0 +1,851 @@
+package com.goafanti.common.model;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class BannersExample {
+    /**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database table banners
+	 * @mbg.generated  Thu Aug 30 08:27:53 CST 2018
+	 */
+	protected String orderByClause;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database table banners
+	 * @mbg.generated  Thu Aug 30 08:27:53 CST 2018
+	 */
+	protected boolean distinct;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database table banners
+	 * @mbg.generated  Thu Aug 30 08:27:53 CST 2018
+	 */
+	protected List<Criteria> oredCriteria;
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table banners
+	 * @mbg.generated  Thu Aug 30 08:27:53 CST 2018
+	 */
+	public BannersExample() {
+		oredCriteria = new ArrayList<Criteria>();
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table banners
+	 * @mbg.generated  Thu Aug 30 08:27:53 CST 2018
+	 */
+	public void setOrderByClause(String orderByClause) {
+		this.orderByClause = orderByClause;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table banners
+	 * @mbg.generated  Thu Aug 30 08:27:53 CST 2018
+	 */
+	public String getOrderByClause() {
+		return orderByClause;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table banners
+	 * @mbg.generated  Thu Aug 30 08:27:53 CST 2018
+	 */
+	public void setDistinct(boolean distinct) {
+		this.distinct = distinct;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table banners
+	 * @mbg.generated  Thu Aug 30 08:27:53 CST 2018
+	 */
+	public boolean isDistinct() {
+		return distinct;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table banners
+	 * @mbg.generated  Thu Aug 30 08:27:53 CST 2018
+	 */
+	public List<Criteria> getOredCriteria() {
+		return oredCriteria;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table banners
+	 * @mbg.generated  Thu Aug 30 08:27:53 CST 2018
+	 */
+	public void or(Criteria criteria) {
+		oredCriteria.add(criteria);
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table banners
+	 * @mbg.generated  Thu Aug 30 08:27:53 CST 2018
+	 */
+	public Criteria or() {
+		Criteria criteria = createCriteriaInternal();
+		oredCriteria.add(criteria);
+		return criteria;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table banners
+	 * @mbg.generated  Thu Aug 30 08:27:53 CST 2018
+	 */
+	public Criteria createCriteria() {
+		Criteria criteria = createCriteriaInternal();
+		if (oredCriteria.size() == 0) {
+			oredCriteria.add(criteria);
+		}
+		return criteria;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table banners
+	 * @mbg.generated  Thu Aug 30 08:27:53 CST 2018
+	 */
+	protected Criteria createCriteriaInternal() {
+		Criteria criteria = new Criteria();
+		return criteria;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table banners
+	 * @mbg.generated  Thu Aug 30 08:27:53 CST 2018
+	 */
+	public void clear() {
+		oredCriteria.clear();
+		orderByClause = null;
+		distinct = false;
+	}
+
+	/**
+	 * This class was generated by MyBatis Generator. This class corresponds to the database table banners
+	 * @mbg.generated  Thu Aug 30 08:27:53 CST 2018
+	 */
+	protected abstract static class GeneratedCriteria {
+		protected List<Criterion> criteria;
+
+		protected GeneratedCriteria() {
+			super();
+			criteria = new ArrayList<Criterion>();
+		}
+
+		public boolean isValid() {
+			return criteria.size() > 0;
+		}
+
+		public List<Criterion> getAllCriteria() {
+			return criteria;
+		}
+
+		public List<Criterion> getCriteria() {
+			return criteria;
+		}
+
+		protected void addCriterion(String condition) {
+			if (condition == null) {
+				throw new RuntimeException("Value for condition cannot be null");
+			}
+			criteria.add(new Criterion(condition));
+		}
+
+		protected void addCriterion(String condition, Object value, String property) {
+			if (value == null) {
+				throw new RuntimeException("Value for " + property + " cannot be null");
+			}
+			criteria.add(new Criterion(condition, value));
+		}
+
+		protected void addCriterion(String condition, Object value1, Object value2, String property) {
+			if (value1 == null || value2 == null) {
+				throw new RuntimeException("Between values for " + property + " cannot be null");
+			}
+			criteria.add(new Criterion(condition, value1, value2));
+		}
+
+		public Criteria andIdIsNull() {
+			addCriterion("id is null");
+			return (Criteria) this;
+		}
+
+		public Criteria andIdIsNotNull() {
+			addCriterion("id is not null");
+			return (Criteria) this;
+		}
+
+		public Criteria andIdEqualTo(String value) {
+			addCriterion("id =", value, "id");
+			return (Criteria) this;
+		}
+
+		public Criteria andIdNotEqualTo(String value) {
+			addCriterion("id <>", value, "id");
+			return (Criteria) this;
+		}
+
+		public Criteria andIdGreaterThan(String value) {
+			addCriterion("id >", value, "id");
+			return (Criteria) this;
+		}
+
+		public Criteria andIdGreaterThanOrEqualTo(String value) {
+			addCriterion("id >=", value, "id");
+			return (Criteria) this;
+		}
+
+		public Criteria andIdLessThan(String value) {
+			addCriterion("id <", value, "id");
+			return (Criteria) this;
+		}
+
+		public Criteria andIdLessThanOrEqualTo(String value) {
+			addCriterion("id <=", value, "id");
+			return (Criteria) this;
+		}
+
+		public Criteria andIdLike(String value) {
+			addCriterion("id like", value, "id");
+			return (Criteria) this;
+		}
+
+		public Criteria andIdNotLike(String value) {
+			addCriterion("id not like", value, "id");
+			return (Criteria) this;
+		}
+
+		public Criteria andIdIn(List<String> values) {
+			addCriterion("id in", values, "id");
+			return (Criteria) this;
+		}
+
+		public Criteria andIdNotIn(List<String> values) {
+			addCriterion("id not in", values, "id");
+			return (Criteria) this;
+		}
+
+		public Criteria andIdBetween(String value1, String value2) {
+			addCriterion("id between", value1, value2, "id");
+			return (Criteria) this;
+		}
+
+		public Criteria andIdNotBetween(String value1, String value2) {
+			addCriterion("id not between", value1, value2, "id");
+			return (Criteria) this;
+		}
+
+		public Criteria andTextIsNull() {
+			addCriterion("text is null");
+			return (Criteria) this;
+		}
+
+		public Criteria andTextIsNotNull() {
+			addCriterion("text is not null");
+			return (Criteria) this;
+		}
+
+		public Criteria andTextEqualTo(String value) {
+			addCriterion("text =", value, "text");
+			return (Criteria) this;
+		}
+
+		public Criteria andTextNotEqualTo(String value) {
+			addCriterion("text <>", value, "text");
+			return (Criteria) this;
+		}
+
+		public Criteria andTextGreaterThan(String value) {
+			addCriterion("text >", value, "text");
+			return (Criteria) this;
+		}
+
+		public Criteria andTextGreaterThanOrEqualTo(String value) {
+			addCriterion("text >=", value, "text");
+			return (Criteria) this;
+		}
+
+		public Criteria andTextLessThan(String value) {
+			addCriterion("text <", value, "text");
+			return (Criteria) this;
+		}
+
+		public Criteria andTextLessThanOrEqualTo(String value) {
+			addCriterion("text <=", value, "text");
+			return (Criteria) this;
+		}
+
+		public Criteria andTextLike(String value) {
+			addCriterion("text like", value, "text");
+			return (Criteria) this;
+		}
+
+		public Criteria andTextNotLike(String value) {
+			addCriterion("text not like", value, "text");
+			return (Criteria) this;
+		}
+
+		public Criteria andTextIn(List<String> values) {
+			addCriterion("text in", values, "text");
+			return (Criteria) this;
+		}
+
+		public Criteria andTextNotIn(List<String> values) {
+			addCriterion("text not in", values, "text");
+			return (Criteria) this;
+		}
+
+		public Criteria andTextBetween(String value1, String value2) {
+			addCriterion("text between", value1, value2, "text");
+			return (Criteria) this;
+		}
+
+		public Criteria andTextNotBetween(String value1, String value2) {
+			addCriterion("text not between", value1, value2, "text");
+			return (Criteria) this;
+		}
+
+		public Criteria andImgUrlIsNull() {
+			addCriterion("img_url is null");
+			return (Criteria) this;
+		}
+
+		public Criteria andImgUrlIsNotNull() {
+			addCriterion("img_url is not null");
+			return (Criteria) this;
+		}
+
+		public Criteria andImgUrlEqualTo(String value) {
+			addCriterion("img_url =", value, "imgUrl");
+			return (Criteria) this;
+		}
+
+		public Criteria andImgUrlNotEqualTo(String value) {
+			addCriterion("img_url <>", value, "imgUrl");
+			return (Criteria) this;
+		}
+
+		public Criteria andImgUrlGreaterThan(String value) {
+			addCriterion("img_url >", value, "imgUrl");
+			return (Criteria) this;
+		}
+
+		public Criteria andImgUrlGreaterThanOrEqualTo(String value) {
+			addCriterion("img_url >=", value, "imgUrl");
+			return (Criteria) this;
+		}
+
+		public Criteria andImgUrlLessThan(String value) {
+			addCriterion("img_url <", value, "imgUrl");
+			return (Criteria) this;
+		}
+
+		public Criteria andImgUrlLessThanOrEqualTo(String value) {
+			addCriterion("img_url <=", value, "imgUrl");
+			return (Criteria) this;
+		}
+
+		public Criteria andImgUrlLike(String value) {
+			addCriterion("img_url like", value, "imgUrl");
+			return (Criteria) this;
+		}
+
+		public Criteria andImgUrlNotLike(String value) {
+			addCriterion("img_url not like", value, "imgUrl");
+			return (Criteria) this;
+		}
+
+		public Criteria andImgUrlIn(List<String> values) {
+			addCriterion("img_url in", values, "imgUrl");
+			return (Criteria) this;
+		}
+
+		public Criteria andImgUrlNotIn(List<String> values) {
+			addCriterion("img_url not in", values, "imgUrl");
+			return (Criteria) this;
+		}
+
+		public Criteria andImgUrlBetween(String value1, String value2) {
+			addCriterion("img_url between", value1, value2, "imgUrl");
+			return (Criteria) this;
+		}
+
+		public Criteria andImgUrlNotBetween(String value1, String value2) {
+			addCriterion("img_url not between", value1, value2, "imgUrl");
+			return (Criteria) this;
+		}
+
+		public Criteria andApiUrlIsNull() {
+			addCriterion("api_url is null");
+			return (Criteria) this;
+		}
+
+		public Criteria andApiUrlIsNotNull() {
+			addCriterion("api_url is not null");
+			return (Criteria) this;
+		}
+
+		public Criteria andApiUrlEqualTo(String value) {
+			addCriterion("api_url =", value, "apiUrl");
+			return (Criteria) this;
+		}
+
+		public Criteria andApiUrlNotEqualTo(String value) {
+			addCriterion("api_url <>", value, "apiUrl");
+			return (Criteria) this;
+		}
+
+		public Criteria andApiUrlGreaterThan(String value) {
+			addCriterion("api_url >", value, "apiUrl");
+			return (Criteria) this;
+		}
+
+		public Criteria andApiUrlGreaterThanOrEqualTo(String value) {
+			addCriterion("api_url >=", value, "apiUrl");
+			return (Criteria) this;
+		}
+
+		public Criteria andApiUrlLessThan(String value) {
+			addCriterion("api_url <", value, "apiUrl");
+			return (Criteria) this;
+		}
+
+		public Criteria andApiUrlLessThanOrEqualTo(String value) {
+			addCriterion("api_url <=", value, "apiUrl");
+			return (Criteria) this;
+		}
+
+		public Criteria andApiUrlLike(String value) {
+			addCriterion("api_url like", value, "apiUrl");
+			return (Criteria) this;
+		}
+
+		public Criteria andApiUrlNotLike(String value) {
+			addCriterion("api_url not like", value, "apiUrl");
+			return (Criteria) this;
+		}
+
+		public Criteria andApiUrlIn(List<String> values) {
+			addCriterion("api_url in", values, "apiUrl");
+			return (Criteria) this;
+		}
+
+		public Criteria andApiUrlNotIn(List<String> values) {
+			addCriterion("api_url not in", values, "apiUrl");
+			return (Criteria) this;
+		}
+
+		public Criteria andApiUrlBetween(String value1, String value2) {
+			addCriterion("api_url between", value1, value2, "apiUrl");
+			return (Criteria) this;
+		}
+
+		public Criteria andApiUrlNotBetween(String value1, String value2) {
+			addCriterion("api_url not between", value1, value2, "apiUrl");
+			return (Criteria) this;
+		}
+
+		public Criteria andForwardUrlIsNull() {
+			addCriterion("forward_url is null");
+			return (Criteria) this;
+		}
+
+		public Criteria andForwardUrlIsNotNull() {
+			addCriterion("forward_url is not null");
+			return (Criteria) this;
+		}
+
+		public Criteria andForwardUrlEqualTo(String value) {
+			addCriterion("forward_url =", value, "forwardUrl");
+			return (Criteria) this;
+		}
+
+		public Criteria andForwardUrlNotEqualTo(String value) {
+			addCriterion("forward_url <>", value, "forwardUrl");
+			return (Criteria) this;
+		}
+
+		public Criteria andForwardUrlGreaterThan(String value) {
+			addCriterion("forward_url >", value, "forwardUrl");
+			return (Criteria) this;
+		}
+
+		public Criteria andForwardUrlGreaterThanOrEqualTo(String value) {
+			addCriterion("forward_url >=", value, "forwardUrl");
+			return (Criteria) this;
+		}
+
+		public Criteria andForwardUrlLessThan(String value) {
+			addCriterion("forward_url <", value, "forwardUrl");
+			return (Criteria) this;
+		}
+
+		public Criteria andForwardUrlLessThanOrEqualTo(String value) {
+			addCriterion("forward_url <=", value, "forwardUrl");
+			return (Criteria) this;
+		}
+
+		public Criteria andForwardUrlLike(String value) {
+			addCriterion("forward_url like", value, "forwardUrl");
+			return (Criteria) this;
+		}
+
+		public Criteria andForwardUrlNotLike(String value) {
+			addCriterion("forward_url not like", value, "forwardUrl");
+			return (Criteria) this;
+		}
+
+		public Criteria andForwardUrlIn(List<String> values) {
+			addCriterion("forward_url in", values, "forwardUrl");
+			return (Criteria) this;
+		}
+
+		public Criteria andForwardUrlNotIn(List<String> values) {
+			addCriterion("forward_url not in", values, "forwardUrl");
+			return (Criteria) this;
+		}
+
+		public Criteria andForwardUrlBetween(String value1, String value2) {
+			addCriterion("forward_url between", value1, value2, "forwardUrl");
+			return (Criteria) this;
+		}
+
+		public Criteria andForwardUrlNotBetween(String value1, String value2) {
+			addCriterion("forward_url not between", value1, value2, "forwardUrl");
+			return (Criteria) this;
+		}
+
+		public Criteria andWidthIsNull() {
+			addCriterion("width is null");
+			return (Criteria) this;
+		}
+
+		public Criteria andWidthIsNotNull() {
+			addCriterion("width is not null");
+			return (Criteria) this;
+		}
+
+		public Criteria andWidthEqualTo(Integer value) {
+			addCriterion("width =", value, "width");
+			return (Criteria) this;
+		}
+
+		public Criteria andWidthNotEqualTo(Integer value) {
+			addCriterion("width <>", value, "width");
+			return (Criteria) this;
+		}
+
+		public Criteria andWidthGreaterThan(Integer value) {
+			addCriterion("width >", value, "width");
+			return (Criteria) this;
+		}
+
+		public Criteria andWidthGreaterThanOrEqualTo(Integer value) {
+			addCriterion("width >=", value, "width");
+			return (Criteria) this;
+		}
+
+		public Criteria andWidthLessThan(Integer value) {
+			addCriterion("width <", value, "width");
+			return (Criteria) this;
+		}
+
+		public Criteria andWidthLessThanOrEqualTo(Integer value) {
+			addCriterion("width <=", value, "width");
+			return (Criteria) this;
+		}
+
+		public Criteria andWidthIn(List<Integer> values) {
+			addCriterion("width in", values, "width");
+			return (Criteria) this;
+		}
+
+		public Criteria andWidthNotIn(List<Integer> values) {
+			addCriterion("width not in", values, "width");
+			return (Criteria) this;
+		}
+
+		public Criteria andWidthBetween(Integer value1, Integer value2) {
+			addCriterion("width between", value1, value2, "width");
+			return (Criteria) this;
+		}
+
+		public Criteria andWidthNotBetween(Integer value1, Integer value2) {
+			addCriterion("width not between", value1, value2, "width");
+			return (Criteria) this;
+		}
+
+		public Criteria andHeightIsNull() {
+			addCriterion("height is null");
+			return (Criteria) this;
+		}
+
+		public Criteria andHeightIsNotNull() {
+			addCriterion("height is not null");
+			return (Criteria) this;
+		}
+
+		public Criteria andHeightEqualTo(Integer value) {
+			addCriterion("height =", value, "height");
+			return (Criteria) this;
+		}
+
+		public Criteria andHeightNotEqualTo(Integer value) {
+			addCriterion("height <>", value, "height");
+			return (Criteria) this;
+		}
+
+		public Criteria andHeightGreaterThan(Integer value) {
+			addCriterion("height >", value, "height");
+			return (Criteria) this;
+		}
+
+		public Criteria andHeightGreaterThanOrEqualTo(Integer value) {
+			addCriterion("height >=", value, "height");
+			return (Criteria) this;
+		}
+
+		public Criteria andHeightLessThan(Integer value) {
+			addCriterion("height <", value, "height");
+			return (Criteria) this;
+		}
+
+		public Criteria andHeightLessThanOrEqualTo(Integer value) {
+			addCriterion("height <=", value, "height");
+			return (Criteria) this;
+		}
+
+		public Criteria andHeightIn(List<Integer> values) {
+			addCriterion("height in", values, "height");
+			return (Criteria) this;
+		}
+
+		public Criteria andHeightNotIn(List<Integer> values) {
+			addCriterion("height not in", values, "height");
+			return (Criteria) this;
+		}
+
+		public Criteria andHeightBetween(Integer value1, Integer value2) {
+			addCriterion("height between", value1, value2, "height");
+			return (Criteria) this;
+		}
+
+		public Criteria andHeightNotBetween(Integer value1, Integer value2) {
+			addCriterion("height not between", value1, value2, "height");
+			return (Criteria) this;
+		}
+
+		public Criteria andClientIsNull() {
+			addCriterion("client is null");
+			return (Criteria) this;
+		}
+
+		public Criteria andClientIsNotNull() {
+			addCriterion("client is not null");
+			return (Criteria) this;
+		}
+
+		public Criteria andClientEqualTo(Integer value) {
+			addCriterion("client =", value, "client");
+			return (Criteria) this;
+		}
+
+		public Criteria andClientNotEqualTo(Integer value) {
+			addCriterion("client <>", value, "client");
+			return (Criteria) this;
+		}
+
+		public Criteria andClientGreaterThan(Integer value) {
+			addCriterion("client >", value, "client");
+			return (Criteria) this;
+		}
+
+		public Criteria andClientGreaterThanOrEqualTo(Integer value) {
+			addCriterion("client >=", value, "client");
+			return (Criteria) this;
+		}
+
+		public Criteria andClientLessThan(Integer value) {
+			addCriterion("client <", value, "client");
+			return (Criteria) this;
+		}
+
+		public Criteria andClientLessThanOrEqualTo(Integer value) {
+			addCriterion("client <=", value, "client");
+			return (Criteria) this;
+		}
+
+		public Criteria andClientIn(List<Integer> values) {
+			addCriterion("client in", values, "client");
+			return (Criteria) this;
+		}
+
+		public Criteria andClientNotIn(List<Integer> values) {
+			addCriterion("client not in", values, "client");
+			return (Criteria) this;
+		}
+
+		public Criteria andClientBetween(Integer value1, Integer value2) {
+			addCriterion("client between", value1, value2, "client");
+			return (Criteria) this;
+		}
+
+		public Criteria andClientNotBetween(Integer value1, Integer value2) {
+			addCriterion("client not between", value1, value2, "client");
+			return (Criteria) this;
+		}
+
+		public Criteria andDeleteSignIsNull() {
+			addCriterion("delete_sign is null");
+			return (Criteria) this;
+		}
+
+		public Criteria andDeleteSignIsNotNull() {
+			addCriterion("delete_sign is not null");
+			return (Criteria) this;
+		}
+
+		public Criteria andDeleteSignEqualTo(Boolean value) {
+			addCriterion("delete_sign =", value, "deleteSign");
+			return (Criteria) this;
+		}
+
+		public Criteria andDeleteSignNotEqualTo(Boolean value) {
+			addCriterion("delete_sign <>", value, "deleteSign");
+			return (Criteria) this;
+		}
+
+		public Criteria andDeleteSignGreaterThan(Boolean value) {
+			addCriterion("delete_sign >", value, "deleteSign");
+			return (Criteria) this;
+		}
+
+		public Criteria andDeleteSignGreaterThanOrEqualTo(Boolean value) {
+			addCriterion("delete_sign >=", value, "deleteSign");
+			return (Criteria) this;
+		}
+
+		public Criteria andDeleteSignLessThan(Boolean value) {
+			addCriterion("delete_sign <", value, "deleteSign");
+			return (Criteria) this;
+		}
+
+		public Criteria andDeleteSignLessThanOrEqualTo(Boolean value) {
+			addCriterion("delete_sign <=", value, "deleteSign");
+			return (Criteria) this;
+		}
+
+		public Criteria andDeleteSignIn(List<Boolean> values) {
+			addCriterion("delete_sign in", values, "deleteSign");
+			return (Criteria) this;
+		}
+
+		public Criteria andDeleteSignNotIn(List<Boolean> values) {
+			addCriterion("delete_sign not in", values, "deleteSign");
+			return (Criteria) this;
+		}
+
+		public Criteria andDeleteSignBetween(Boolean value1, Boolean value2) {
+			addCriterion("delete_sign between", value1, value2, "deleteSign");
+			return (Criteria) this;
+		}
+
+		public Criteria andDeleteSignNotBetween(Boolean value1, Boolean value2) {
+			addCriterion("delete_sign not between", value1, value2, "deleteSign");
+			return (Criteria) this;
+		}
+	}
+
+	/**
+	 * This class was generated by MyBatis Generator. This class corresponds to the database table banners
+	 * @mbg.generated  Thu Aug 30 08:27:53 CST 2018
+	 */
+	public static class Criterion {
+		private String condition;
+		private Object value;
+		private Object secondValue;
+		private boolean noValue;
+		private boolean singleValue;
+		private boolean betweenValue;
+		private boolean listValue;
+		private String typeHandler;
+
+		public String getCondition() {
+			return condition;
+		}
+
+		public Object getValue() {
+			return value;
+		}
+
+		public Object getSecondValue() {
+			return secondValue;
+		}
+
+		public boolean isNoValue() {
+			return noValue;
+		}
+
+		public boolean isSingleValue() {
+			return singleValue;
+		}
+
+		public boolean isBetweenValue() {
+			return betweenValue;
+		}
+
+		public boolean isListValue() {
+			return listValue;
+		}
+
+		public String getTypeHandler() {
+			return typeHandler;
+		}
+
+		protected Criterion(String condition) {
+			super();
+			this.condition = condition;
+			this.typeHandler = null;
+			this.noValue = true;
+		}
+
+		protected Criterion(String condition, Object value, String typeHandler) {
+			super();
+			this.condition = condition;
+			this.value = value;
+			this.typeHandler = typeHandler;
+			if (value instanceof List<?>) {
+				this.listValue = true;
+			} else {
+				this.singleValue = true;
+			}
+		}
+
+		protected Criterion(String condition, Object value) {
+			this(condition, value, null);
+		}
+
+		protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
+			super();
+			this.condition = condition;
+			this.value = value;
+			this.secondValue = secondValue;
+			this.typeHandler = typeHandler;
+			this.betweenValue = true;
+		}
+
+		protected Criterion(String condition, Object value, Object secondValue) {
+			this(condition, value, secondValue, null);
+		}
+	}
+
+	/**
+     * This class was generated by MyBatis Generator.
+     * This class corresponds to the database table banners
+     *
+     * @mbg.generated do_not_delete_during_merge Thu Aug 30 08:14:36 CST 2018
+     */
+    public static class Criteria extends GeneratedCriteria {
+
+        protected Criteria() {
+            super();
+        }
+    }
+}