anderx 5 years ago
parent
commit
bc9df7632e

+ 0 - 26
src/main/java/com/goafanti/common/dao/BannersMapper.java

@@ -1,26 +0,0 @@
-package com.goafanti.common.dao;
-
-import java.util.List;
-import java.util.Map;
-
-import org.apache.ibatis.annotations.Param;
-
-import com.goafanti.common.model.Banners;
-
-public interface BannersMapper {
-    int deleteByPrimaryKey(Long id);
-
-    int insert(Banners record);
-
-    int insertSelective(Banners record);
-
-    Banners selectByPrimaryKey(Long id);
-
-    int updateByPrimaryKeySelective(Banners record);
-
-    int updateByPrimaryKey(Banners record);
-
-	List<Banners> findBannerList(Map<String, Object> params);
-
-	int findBannerListCount(@Param(value = "sign") String sign);
-}

+ 0 - 160
src/main/java/com/goafanti/common/mapper/BannersMapper.xml

@@ -1,160 +0,0 @@
-<?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.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" />
-    <result column="text" jdbcType="VARCHAR" property="text" />
-    <result column="imgUrl" jdbcType="VARCHAR" property="imgurl" />
-    <result column="url" jdbcType="VARCHAR" property="url" />
-    <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" />
-  </resultMap>
-  <sql id="Base_Column_List">
-    id, sign, text, imgUrl, url, width, height, start_date, end_date
-  </sql>
-  <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
-    select 
-    <include refid="Base_Column_List" />
-    from banners
-    where id = #{id,jdbcType=BIGINT}
-  </select>
-  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
-    delete from banners
-    where id = #{id,jdbcType=BIGINT}
-  </delete>
-  <insert id="insert" parameterType="com.goafanti.common.model.Banners">
-    insert into banners (id, sign, text, 
-      imgUrl, url, width, 
-      height, start_date, end_date
-      )
-    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}
-      )
-  </insert>
-  <insert id="insertSelective" parameterType="com.goafanti.common.model.Banners">
-    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>
-      <if test="url != null">
-        url,
-      </if>
-      <if test="width != null">
-        width,
-      </if>
-      <if test="height != null">
-        height,
-      </if>
-      <if test="startDate != null">
-        start_date,
-      </if>
-      <if test="endDate != null">
-        end_date,
-      </if>
-    </trim>
-    <trim prefix="values (" suffix=")" suffixOverrides=",">
-      <if test="id != null">
-        #{id,jdbcType=BIGINT},
-      </if>
-      <if test="sign != null">
-        #{sign,jdbcType=VARCHAR},
-      </if>
-      <if test="text != null">
-        #{text,jdbcType=VARCHAR},
-      </if>
-      <if test="imgurl != null">
-        #{imgurl,jdbcType=VARCHAR},
-      </if>
-      <if test="url != null">
-        #{url,jdbcType=VARCHAR},
-      </if>
-      <if test="width != null">
-        #{width,jdbcType=INTEGER},
-      </if>
-      <if test="height != null">
-        #{height,jdbcType=INTEGER},
-      </if>
-      <if test="startDate != null">
-        #{startDate,jdbcType=TIMESTAMP},
-      </if>
-      <if test="endDate != null">
-        #{endDate,jdbcType=TIMESTAMP},
-      </if>
-    </trim>
-  </insert>
-  <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.Banners">
-    update banners
-    <set>
-      <if test="sign != null">
-        sign = #{sign,jdbcType=VARCHAR},
-      </if>
-      <if test="text != null">
-        text = #{text,jdbcType=VARCHAR},
-      </if>
-      <if test="imgurl != null">
-        imgUrl = #{imgurl,jdbcType=VARCHAR},
-      </if>
-      <if test="url != null">
-        url = #{url,jdbcType=VARCHAR},
-      </if>
-      <if test="width != null">
-        width = #{width,jdbcType=INTEGER},
-      </if>
-      <if test="height != null">
-        height = #{height,jdbcType=INTEGER},
-      </if>
-      <if test="startDate != null">
-        start_date = #{startDate,jdbcType=TIMESTAMP},
-      </if>
-      <if test="endDate != null">
-        end_date = #{endDate,jdbcType=TIMESTAMP},
-      </if>
-    </set>
-    where id = #{id,jdbcType=BIGINT}
-  </update>
-  <update id="updateByPrimaryKey" parameterType="com.goafanti.common.model.Banners">
-    update banners
-    set sign = #{sign,jdbcType=VARCHAR},
-      text = #{text,jdbcType=VARCHAR},
-      imgUrl = #{imgurl,jdbcType=VARCHAR},
-      url = #{url,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}
-  </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>
-</mapper>

+ 1 - 1
src/main/java/com/goafanti/common/mapper/TOrderBonusMapper.xml

@@ -424,7 +424,7 @@
   		left join admin a on a.id = t.task_receiver 
   		left join admin oa on oa.id = o.salesman_id
   		where b.grant_type = 1
-  		<if test="fids != null">
+  		<if test="fids != null and fids.size > 0">
   		and b.grant_by in
   		<foreach collection="fids" item="id" open="(" separator="," close=")">
   		 #{id}