Browse Source

新增访问客户数据

Signed-off-by: anderx <312518615@qq.com>
anderx 5 years ago
parent
commit
f517d351fd

+ 1 - 1
GeneratorConfig.xml

@@ -9,6 +9,6 @@
     <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="organization"/>
+    <table schema="aft_ow" tableName="visiting_customers"/>
   </context>
 </generatorConfiguration>

+ 21 - 1
src/main/java/com/kede/common/controller/publicApiController.java

@@ -10,6 +10,9 @@ import org.springframework.web.bind.annotation.RestController;
 
 import com.kede.banners.service.BannersService;
 import com.kede.common.bo.Result;
+import com.kede.common.constant.ErrorConstants;
+import com.kede.common.model.VisitingCustomers;
+import com.kede.common.utils.StringUtils;
 import com.kede.customerCase.bo.InputCustomerCase;
 import com.kede.customerCase.service.CustomerCaseService;
 import com.kede.news.bo.InputNews;
@@ -18,11 +21,12 @@ import com.kede.organization.bo.InputOrganization;
 import com.kede.organization.service.OrganizationService;
 import com.kede.recruitment.bo.InputRecruitment;
 import com.kede.recruitment.service.RecruitmentService;
+import com.kede.visitingCustomers.service.VisitingCustomersService;
 
 
 @RestController
 @RequestMapping(value = "/open")
-public class publicApiController extends BaseController {
+public class PublicApiController extends BaseController {
 	
 	@Resource
 	private BannersService	bannersService;
@@ -34,6 +38,8 @@ public class publicApiController extends BaseController {
 	private OrganizationService	organizationService;
 	@Resource
 	private RecruitmentService	recruitmentService;
+	@Resource
+	private VisitingCustomersService	visitingCustomersService;
 
 	
 	@RequestMapping(value = "/listNews", method = RequestMethod.GET)
@@ -67,4 +73,18 @@ public class publicApiController extends BaseController {
 		res.data(customerCaseService.listCustomerCase(ic,pageSize,pageNo));
 		return res;
 	}
+	
+	@RequestMapping(value = "/addVisitingCustomers", method = RequestMethod.POST)
+	public Result addVisitingCustomers(VisitingCustomers vc) {
+		Result res =new Result();
+		if(StringUtils.isBlank(vc.getName())||StringUtils.isBlank(vc.getMobile())) {
+			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"名字和电话","名字和电话"));
+			return res;
+		}
+		if (!res.getError().isEmpty()) {
+			return res;
+		}
+		res.data(visitingCustomersService.addVisitingCustomers(vc));
+		return res;
+	}
 }

+ 96 - 0
src/main/java/com/kede/common/dao/VisitingCustomersMapper.java

@@ -0,0 +1,96 @@
+package com.kede.common.dao;
+
+import com.kede.common.model.VisitingCustomers;
+import com.kede.common.model.VisitingCustomersExample;
+import java.util.List;
+import org.apache.ibatis.annotations.Param;
+
+public interface VisitingCustomersMapper {
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table visiting_customers
+     *
+     * @mbg.generated Thu Apr 02 14:03:54 CST 2020
+     */
+    long countByExample(VisitingCustomersExample example);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table visiting_customers
+     *
+     * @mbg.generated Thu Apr 02 14:03:54 CST 2020
+     */
+    int deleteByExample(VisitingCustomersExample example);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table visiting_customers
+     *
+     * @mbg.generated Thu Apr 02 14:03:54 CST 2020
+     */
+    int deleteByPrimaryKey(Integer id);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table visiting_customers
+     *
+     * @mbg.generated Thu Apr 02 14:03:54 CST 2020
+     */
+    int insert(VisitingCustomers record);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table visiting_customers
+     *
+     * @mbg.generated Thu Apr 02 14:03:54 CST 2020
+     */
+    int insertSelective(VisitingCustomers record);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table visiting_customers
+     *
+     * @mbg.generated Thu Apr 02 14:03:54 CST 2020
+     */
+    List<VisitingCustomers> selectByExample(VisitingCustomersExample example);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table visiting_customers
+     *
+     * @mbg.generated Thu Apr 02 14:03:54 CST 2020
+     */
+    VisitingCustomers selectByPrimaryKey(Integer id);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table visiting_customers
+     *
+     * @mbg.generated Thu Apr 02 14:03:54 CST 2020
+     */
+    int updateByExampleSelective(@Param("record") VisitingCustomers record, @Param("example") VisitingCustomersExample example);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table visiting_customers
+     *
+     * @mbg.generated Thu Apr 02 14:03:54 CST 2020
+     */
+    int updateByExample(@Param("record") VisitingCustomers record, @Param("example") VisitingCustomersExample example);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table visiting_customers
+     *
+     * @mbg.generated Thu Apr 02 14:03:54 CST 2020
+     */
+    int updateByPrimaryKeySelective(VisitingCustomers record);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table visiting_customers
+     *
+     * @mbg.generated Thu Apr 02 14:03:54 CST 2020
+     */
+    int updateByPrimaryKey(VisitingCustomers record);
+}

+ 329 - 0
src/main/java/com/kede/common/mapper/VisitingCustomersMapper.xml

@@ -0,0 +1,329 @@
+<?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.VisitingCustomersMapper">
+  <resultMap id="BaseResultMap" type="com.kede.common.model.VisitingCustomers">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Thu Apr 02 14:03:54 CST 2020.
+    -->
+    <id column="id" jdbcType="INTEGER" property="id" />
+    <result column="name" jdbcType="VARCHAR" property="name" />
+    <result column="mobile" jdbcType="VARCHAR" property="mobile" />
+    <result column="status" jdbcType="INTEGER" property="status" />
+    <result column="remark" jdbcType="VARCHAR" property="remark" />
+    <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
+  </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 Apr 02 14:03:54 CST 2020.
+    -->
+    <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 Apr 02 14:03:54 CST 2020.
+    -->
+    <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">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Thu Apr 02 14:03:54 CST 2020.
+    -->
+    id, name, mobile, status, remark, create_time
+  </sql>
+  <select id="selectByExample" parameterType="com.kede.common.model.VisitingCustomersExample" resultMap="BaseResultMap">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Thu Apr 02 14:03:54 CST 2020.
+    -->
+    select
+    <if test="distinct">
+      distinct
+    </if>
+    <include refid="Base_Column_List" />
+    from visiting_customers
+    <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.Integer" resultMap="BaseResultMap">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Thu Apr 02 14:03:54 CST 2020.
+    -->
+    select 
+    <include refid="Base_Column_List" />
+    from visiting_customers
+    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 Thu Apr 02 14:03:54 CST 2020.
+    -->
+    delete from visiting_customers
+    where id = #{id,jdbcType=INTEGER}
+  </delete>
+  <delete id="deleteByExample" parameterType="com.kede.common.model.VisitingCustomersExample">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Thu Apr 02 14:03:54 CST 2020.
+    -->
+    delete from visiting_customers
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </delete>
+  <insert id="insert" parameterType="com.kede.common.model.VisitingCustomers">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Thu Apr 02 14:03:54 CST 2020.
+    -->
+    insert into visiting_customers (id, name, mobile, 
+      status, remark, create_time
+      )
+    values (#{id,jdbcType=INTEGER}, #{name,jdbcType=VARCHAR}, #{mobile,jdbcType=VARCHAR}, 
+      #{status,jdbcType=INTEGER}, #{remark,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}
+      )
+  </insert>
+  <insert id="insertSelective" parameterType="com.kede.common.model.VisitingCustomers">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Thu Apr 02 14:03:54 CST 2020.
+    -->
+    insert into visiting_customers
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        id,
+      </if>
+      <if test="name != null">
+        name,
+      </if>
+      <if test="mobile != null">
+        mobile,
+      </if>
+      <if test="status != null">
+        status,
+      </if>
+      <if test="remark != null">
+        remark,
+      </if>
+      <if test="createTime != null">
+        create_time,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        #{id,jdbcType=INTEGER},
+      </if>
+      <if test="name != null">
+        #{name,jdbcType=VARCHAR},
+      </if>
+      <if test="mobile != null">
+        #{mobile,jdbcType=VARCHAR},
+      </if>
+      <if test="status != null">
+        #{status,jdbcType=INTEGER},
+      </if>
+      <if test="remark != null">
+        #{remark,jdbcType=VARCHAR},
+      </if>
+      <if test="createTime != null">
+        #{createTime,jdbcType=TIMESTAMP},
+      </if>
+    </trim>
+  </insert>
+  <select id="countByExample" parameterType="com.kede.common.model.VisitingCustomersExample" resultType="java.lang.Long">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Thu Apr 02 14:03:54 CST 2020.
+    -->
+    select count(*) from visiting_customers
+    <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 Apr 02 14:03:54 CST 2020.
+    -->
+    update visiting_customers
+    <set>
+      <if test="record.id != null">
+        id = #{record.id,jdbcType=INTEGER},
+      </if>
+      <if test="record.name != null">
+        name = #{record.name,jdbcType=VARCHAR},
+      </if>
+      <if test="record.mobile != null">
+        mobile = #{record.mobile,jdbcType=VARCHAR},
+      </if>
+      <if test="record.status != null">
+        status = #{record.status,jdbcType=INTEGER},
+      </if>
+      <if test="record.remark != null">
+        remark = #{record.remark,jdbcType=VARCHAR},
+      </if>
+      <if test="record.createTime != null">
+        create_time = #{record.createTime,jdbcType=TIMESTAMP},
+      </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 Apr 02 14:03:54 CST 2020.
+    -->
+    update visiting_customers
+    set id = #{record.id,jdbcType=INTEGER},
+      name = #{record.name,jdbcType=VARCHAR},
+      mobile = #{record.mobile,jdbcType=VARCHAR},
+      status = #{record.status,jdbcType=INTEGER},
+      remark = #{record.remark,jdbcType=VARCHAR},
+      create_time = #{record.createTime,jdbcType=TIMESTAMP}
+    <if test="_parameter != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByPrimaryKeySelective" parameterType="com.kede.common.model.VisitingCustomers">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Thu Apr 02 14:03:54 CST 2020.
+    -->
+    update visiting_customers
+    <set>
+      <if test="name != null">
+        name = #{name,jdbcType=VARCHAR},
+      </if>
+      <if test="mobile != null">
+        mobile = #{mobile,jdbcType=VARCHAR},
+      </if>
+      <if test="status != null">
+        status = #{status,jdbcType=INTEGER},
+      </if>
+      <if test="remark != null">
+        remark = #{remark,jdbcType=VARCHAR},
+      </if>
+      <if test="createTime != null">
+        create_time = #{createTime,jdbcType=TIMESTAMP},
+      </if>
+    </set>
+    where id = #{id,jdbcType=INTEGER}
+  </update>
+  <update id="updateByPrimaryKey" parameterType="com.kede.common.model.VisitingCustomers">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Thu Apr 02 14:03:54 CST 2020.
+    -->
+    update visiting_customers
+    set name = #{name,jdbcType=VARCHAR},
+      mobile = #{mobile,jdbcType=VARCHAR},
+      status = #{status,jdbcType=INTEGER},
+      remark = #{remark,jdbcType=VARCHAR},
+      create_time = #{createTime,jdbcType=TIMESTAMP}
+    where id = #{id,jdbcType=INTEGER}
+  </update>
+  <select id="findVisitingCustomersList" resultType="com.kede.visitingCustomers.bo.OutVisitingCustomers">
+  select id, name,mobile,remark,status,date_format(create_time,'%Y-%m-%d %H:%i:%S')createTimes 
+  from visiting_customers where 1=1 and status !=2
+	<if test="name  != null">
+	and name like concat('%',#{name},'%')
+	</if>
+	<if test="startTime != null and endTime  != null">
+	and create_time between #{startTime} and #{endTime}
+	</if>
+	order by create_time 
+	<if test="page_sql!=null">
+			${page_sql}
+	</if>
+  </select>
+  
+    <select id="findVisitingCustomersCount" resultType="java.lang.Integer">
+  select count(*) from visiting_customers
+	where 1=1 and status !=2
+	<if test="name  != null">
+	and name like concat('%',#{name},'%')
+	</if>
+	<if test="startTime != null and endTime  != null">
+	and create_time between #{startTime} and #{endTime}
+	</if>
+	
+  </select>
+</mapper>

+ 203 - 0
src/main/java/com/kede/common/model/VisitingCustomers.java

@@ -0,0 +1,203 @@
+package com.kede.common.model;
+
+import java.util.Date;
+
+public class VisitingCustomers {
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column visiting_customers.id
+     *
+     * @mbg.generated Thu Apr 02 14:03:54 CST 2020
+     */
+    private Integer id;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column visiting_customers.name
+     *
+     * @mbg.generated Thu Apr 02 14:03:54 CST 2020
+     */
+    private String name;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column visiting_customers.mobile
+     *
+     * @mbg.generated Thu Apr 02 14:03:54 CST 2020
+     */
+    private String mobile;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column visiting_customers.status
+     *
+     * @mbg.generated Thu Apr 02 14:03:54 CST 2020
+     */
+    private Integer status;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column visiting_customers.remark
+     *
+     * @mbg.generated Thu Apr 02 14:03:54 CST 2020
+     */
+    private String remark;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column visiting_customers.create_time
+     *
+     * @mbg.generated Thu Apr 02 14:03:54 CST 2020
+     */
+    private Date createTime;
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column visiting_customers.id
+     *
+     * @return the value of visiting_customers.id
+     *
+     * @mbg.generated Thu Apr 02 14:03:54 CST 2020
+     */
+    public Integer getId() {
+        return id;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column visiting_customers.id
+     *
+     * @param id the value for visiting_customers.id
+     *
+     * @mbg.generated Thu Apr 02 14:03:54 CST 2020
+     */
+    public void setId(Integer id) {
+        this.id = id;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column visiting_customers.name
+     *
+     * @return the value of visiting_customers.name
+     *
+     * @mbg.generated Thu Apr 02 14:03:54 CST 2020
+     */
+    public String getName() {
+        return name;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column visiting_customers.name
+     *
+     * @param name the value for visiting_customers.name
+     *
+     * @mbg.generated Thu Apr 02 14:03:54 CST 2020
+     */
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column visiting_customers.mobile
+     *
+     * @return the value of visiting_customers.mobile
+     *
+     * @mbg.generated Thu Apr 02 14:03:54 CST 2020
+     */
+    public String getMobile() {
+        return mobile;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column visiting_customers.mobile
+     *
+     * @param mobile the value for visiting_customers.mobile
+     *
+     * @mbg.generated Thu Apr 02 14:03:54 CST 2020
+     */
+    public void setMobile(String mobile) {
+        this.mobile = mobile;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column visiting_customers.status
+     *
+     * @return the value of visiting_customers.status
+     *
+     * @mbg.generated Thu Apr 02 14:03:54 CST 2020
+     */
+    public Integer getStatus() {
+        return status;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column visiting_customers.status
+     *
+     * @param status the value for visiting_customers.status
+     *
+     * @mbg.generated Thu Apr 02 14:03:54 CST 2020
+     */
+    public void setStatus(Integer status) {
+        this.status = status;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column visiting_customers.remark
+     *
+     * @return the value of visiting_customers.remark
+     *
+     * @mbg.generated Thu Apr 02 14:03:54 CST 2020
+     */
+    public String getRemark() {
+        return remark;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column visiting_customers.remark
+     *
+     * @param remark the value for visiting_customers.remark
+     *
+     * @mbg.generated Thu Apr 02 14:03:54 CST 2020
+     */
+    public void setRemark(String remark) {
+        this.remark = remark;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column visiting_customers.create_time
+     *
+     * @return the value of visiting_customers.create_time
+     *
+     * @mbg.generated Thu Apr 02 14:03:54 CST 2020
+     */
+    public Date getCreateTime() {
+        return createTime;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column visiting_customers.create_time
+     *
+     * @param createTime the value for visiting_customers.create_time
+     *
+     * @mbg.generated Thu Apr 02 14:03:54 CST 2020
+     */
+    public void setCreateTime(Date createTime) {
+        this.createTime = createTime;
+    }
+}

+ 693 - 0
src/main/java/com/kede/common/model/VisitingCustomersExample.java

@@ -0,0 +1,693 @@
+package com.kede.common.model;
+
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+
+public class VisitingCustomersExample {
+    /**
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database table visiting_customers
+     *
+     * @mbg.generated Thu Apr 02 14:03:54 CST 2020
+     */
+    protected String orderByClause;
+
+    /**
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database table visiting_customers
+     *
+     * @mbg.generated Thu Apr 02 14:03:54 CST 2020
+     */
+    protected boolean distinct;
+
+    /**
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database table visiting_customers
+     *
+     * @mbg.generated Thu Apr 02 14:03:54 CST 2020
+     */
+    protected List<Criteria> oredCriteria;
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table visiting_customers
+     *
+     * @mbg.generated Thu Apr 02 14:03:54 CST 2020
+     */
+    public VisitingCustomersExample() {
+        oredCriteria = new ArrayList<Criteria>();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table visiting_customers
+     *
+     * @mbg.generated Thu Apr 02 14:03:54 CST 2020
+     */
+    public void setOrderByClause(String orderByClause) {
+        this.orderByClause = orderByClause;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table visiting_customers
+     *
+     * @mbg.generated Thu Apr 02 14:03:54 CST 2020
+     */
+    public String getOrderByClause() {
+        return orderByClause;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table visiting_customers
+     *
+     * @mbg.generated Thu Apr 02 14:03:54 CST 2020
+     */
+    public void setDistinct(boolean distinct) {
+        this.distinct = distinct;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table visiting_customers
+     *
+     * @mbg.generated Thu Apr 02 14:03:54 CST 2020
+     */
+    public boolean isDistinct() {
+        return distinct;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table visiting_customers
+     *
+     * @mbg.generated Thu Apr 02 14:03:54 CST 2020
+     */
+    public List<Criteria> getOredCriteria() {
+        return oredCriteria;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table visiting_customers
+     *
+     * @mbg.generated Thu Apr 02 14:03:54 CST 2020
+     */
+    public void or(Criteria criteria) {
+        oredCriteria.add(criteria);
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table visiting_customers
+     *
+     * @mbg.generated Thu Apr 02 14:03:54 CST 2020
+     */
+    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 visiting_customers
+     *
+     * @mbg.generated Thu Apr 02 14:03:54 CST 2020
+     */
+    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 visiting_customers
+     *
+     * @mbg.generated Thu Apr 02 14:03:54 CST 2020
+     */
+    protected Criteria createCriteriaInternal() {
+        Criteria criteria = new Criteria();
+        return criteria;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table visiting_customers
+     *
+     * @mbg.generated Thu Apr 02 14:03:54 CST 2020
+     */
+    public void clear() {
+        oredCriteria.clear();
+        orderByClause = null;
+        distinct = false;
+    }
+
+    /**
+     * This class was generated by MyBatis Generator.
+     * This class corresponds to the database table visiting_customers
+     *
+     * @mbg.generated Thu Apr 02 14:03:54 CST 2020
+     */
+    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(Integer value) {
+            addCriterion("id =", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdNotEqualTo(Integer value) {
+            addCriterion("id <>", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdGreaterThan(Integer value) {
+            addCriterion("id >", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdGreaterThanOrEqualTo(Integer value) {
+            addCriterion("id >=", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdLessThan(Integer value) {
+            addCriterion("id <", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdLessThanOrEqualTo(Integer value) {
+            addCriterion("id <=", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdIn(List<Integer> values) {
+            addCriterion("id in", values, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdNotIn(List<Integer> values) {
+            addCriterion("id not in", values, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdBetween(Integer value1, Integer value2) {
+            addCriterion("id between", value1, value2, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdNotBetween(Integer value1, Integer value2) {
+            addCriterion("id not between", value1, value2, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andNameIsNull() {
+            addCriterion("name is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andNameIsNotNull() {
+            addCriterion("name is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andNameEqualTo(String value) {
+            addCriterion("name =", value, "name");
+            return (Criteria) this;
+        }
+
+        public Criteria andNameNotEqualTo(String value) {
+            addCriterion("name <>", value, "name");
+            return (Criteria) this;
+        }
+
+        public Criteria andNameGreaterThan(String value) {
+            addCriterion("name >", value, "name");
+            return (Criteria) this;
+        }
+
+        public Criteria andNameGreaterThanOrEqualTo(String value) {
+            addCriterion("name >=", value, "name");
+            return (Criteria) this;
+        }
+
+        public Criteria andNameLessThan(String value) {
+            addCriterion("name <", value, "name");
+            return (Criteria) this;
+        }
+
+        public Criteria andNameLessThanOrEqualTo(String value) {
+            addCriterion("name <=", value, "name");
+            return (Criteria) this;
+        }
+
+        public Criteria andNameLike(String value) {
+            addCriterion("name like", value, "name");
+            return (Criteria) this;
+        }
+
+        public Criteria andNameNotLike(String value) {
+            addCriterion("name not like", value, "name");
+            return (Criteria) this;
+        }
+
+        public Criteria andNameIn(List<String> values) {
+            addCriterion("name in", values, "name");
+            return (Criteria) this;
+        }
+
+        public Criteria andNameNotIn(List<String> values) {
+            addCriterion("name not in", values, "name");
+            return (Criteria) this;
+        }
+
+        public Criteria andNameBetween(String value1, String value2) {
+            addCriterion("name between", value1, value2, "name");
+            return (Criteria) this;
+        }
+
+        public Criteria andNameNotBetween(String value1, String value2) {
+            addCriterion("name not between", value1, value2, "name");
+            return (Criteria) this;
+        }
+
+        public Criteria andMobileIsNull() {
+            addCriterion("mobile is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andMobileIsNotNull() {
+            addCriterion("mobile is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andMobileEqualTo(String value) {
+            addCriterion("mobile =", value, "mobile");
+            return (Criteria) this;
+        }
+
+        public Criteria andMobileNotEqualTo(String value) {
+            addCriterion("mobile <>", value, "mobile");
+            return (Criteria) this;
+        }
+
+        public Criteria andMobileGreaterThan(String value) {
+            addCriterion("mobile >", value, "mobile");
+            return (Criteria) this;
+        }
+
+        public Criteria andMobileGreaterThanOrEqualTo(String value) {
+            addCriterion("mobile >=", value, "mobile");
+            return (Criteria) this;
+        }
+
+        public Criteria andMobileLessThan(String value) {
+            addCriterion("mobile <", value, "mobile");
+            return (Criteria) this;
+        }
+
+        public Criteria andMobileLessThanOrEqualTo(String value) {
+            addCriterion("mobile <=", value, "mobile");
+            return (Criteria) this;
+        }
+
+        public Criteria andMobileLike(String value) {
+            addCriterion("mobile like", value, "mobile");
+            return (Criteria) this;
+        }
+
+        public Criteria andMobileNotLike(String value) {
+            addCriterion("mobile not like", value, "mobile");
+            return (Criteria) this;
+        }
+
+        public Criteria andMobileIn(List<String> values) {
+            addCriterion("mobile in", values, "mobile");
+            return (Criteria) this;
+        }
+
+        public Criteria andMobileNotIn(List<String> values) {
+            addCriterion("mobile not in", values, "mobile");
+            return (Criteria) this;
+        }
+
+        public Criteria andMobileBetween(String value1, String value2) {
+            addCriterion("mobile between", value1, value2, "mobile");
+            return (Criteria) this;
+        }
+
+        public Criteria andMobileNotBetween(String value1, String value2) {
+            addCriterion("mobile not between", value1, value2, "mobile");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusIsNull() {
+            addCriterion("status is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusIsNotNull() {
+            addCriterion("status is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusEqualTo(Integer value) {
+            addCriterion("status =", value, "status");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusNotEqualTo(Integer value) {
+            addCriterion("status <>", value, "status");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusGreaterThan(Integer value) {
+            addCriterion("status >", value, "status");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusGreaterThanOrEqualTo(Integer value) {
+            addCriterion("status >=", value, "status");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusLessThan(Integer value) {
+            addCriterion("status <", value, "status");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusLessThanOrEqualTo(Integer value) {
+            addCriterion("status <=", value, "status");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusIn(List<Integer> values) {
+            addCriterion("status in", values, "status");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusNotIn(List<Integer> values) {
+            addCriterion("status not in", values, "status");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusBetween(Integer value1, Integer value2) {
+            addCriterion("status between", value1, value2, "status");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusNotBetween(Integer value1, Integer value2) {
+            addCriterion("status not between", value1, value2, "status");
+            return (Criteria) this;
+        }
+
+        public Criteria andRemarkIsNull() {
+            addCriterion("remark is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andRemarkIsNotNull() {
+            addCriterion("remark is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andRemarkEqualTo(String value) {
+            addCriterion("remark =", value, "remark");
+            return (Criteria) this;
+        }
+
+        public Criteria andRemarkNotEqualTo(String value) {
+            addCriterion("remark <>", value, "remark");
+            return (Criteria) this;
+        }
+
+        public Criteria andRemarkGreaterThan(String value) {
+            addCriterion("remark >", value, "remark");
+            return (Criteria) this;
+        }
+
+        public Criteria andRemarkGreaterThanOrEqualTo(String value) {
+            addCriterion("remark >=", value, "remark");
+            return (Criteria) this;
+        }
+
+        public Criteria andRemarkLessThan(String value) {
+            addCriterion("remark <", value, "remark");
+            return (Criteria) this;
+        }
+
+        public Criteria andRemarkLessThanOrEqualTo(String value) {
+            addCriterion("remark <=", value, "remark");
+            return (Criteria) this;
+        }
+
+        public Criteria andRemarkLike(String value) {
+            addCriterion("remark like", value, "remark");
+            return (Criteria) this;
+        }
+
+        public Criteria andRemarkNotLike(String value) {
+            addCriterion("remark not like", value, "remark");
+            return (Criteria) this;
+        }
+
+        public Criteria andRemarkIn(List<String> values) {
+            addCriterion("remark in", values, "remark");
+            return (Criteria) this;
+        }
+
+        public Criteria andRemarkNotIn(List<String> values) {
+            addCriterion("remark not in", values, "remark");
+            return (Criteria) this;
+        }
+
+        public Criteria andRemarkBetween(String value1, String value2) {
+            addCriterion("remark between", value1, value2, "remark");
+            return (Criteria) this;
+        }
+
+        public Criteria andRemarkNotBetween(String value1, String value2) {
+            addCriterion("remark not between", value1, value2, "remark");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeIsNull() {
+            addCriterion("create_time is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeIsNotNull() {
+            addCriterion("create_time is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeEqualTo(Date value) {
+            addCriterion("create_time =", value, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeNotEqualTo(Date value) {
+            addCriterion("create_time <>", value, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeGreaterThan(Date value) {
+            addCriterion("create_time >", value, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeGreaterThanOrEqualTo(Date value) {
+            addCriterion("create_time >=", value, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeLessThan(Date value) {
+            addCriterion("create_time <", value, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeLessThanOrEqualTo(Date value) {
+            addCriterion("create_time <=", value, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeIn(List<Date> values) {
+            addCriterion("create_time in", values, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeNotIn(List<Date> values) {
+            addCriterion("create_time not in", values, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeBetween(Date value1, Date value2) {
+            addCriterion("create_time between", value1, value2, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeNotBetween(Date value1, Date value2) {
+            addCriterion("create_time not between", value1, value2, "createTime");
+            return (Criteria) this;
+        }
+    }
+
+    /**
+     * This class was generated by MyBatis Generator.
+     * This class corresponds to the database table visiting_customers
+     *
+     * @mbg.generated do_not_delete_during_merge Thu Apr 02 14:03:54 CST 2020
+     */
+    public static class Criteria extends GeneratedCriteria {
+
+        protected Criteria() {
+            super();
+        }
+    }
+
+    /**
+     * This class was generated by MyBatis Generator.
+     * This class corresponds to the database table visiting_customers
+     *
+     * @mbg.generated Thu Apr 02 14:03:54 CST 2020
+     */
+    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);
+        }
+    }
+}

+ 36 - 0
src/main/java/com/kede/visitingCustomers/bo/InputVisitingCustomers.java

@@ -0,0 +1,36 @@
+package com.kede.visitingCustomers.bo;
+
+import com.kede.common.model.VisitingCustomers;
+
+public class InputVisitingCustomers extends VisitingCustomers{
+	private Integer pageNo;
+	private Integer pageSize;
+	private String startTime;
+	private String endTime;
+	public Integer getPageNo() {
+		return pageNo;
+	}
+	public void setPageNo(Integer pageNo) {
+		this.pageNo = pageNo;
+	}
+	public Integer getPageSize() {
+		return pageSize;
+	}
+	public void setPageSize(Integer pageSize) {
+		this.pageSize = pageSize;
+	}
+	public String getStartTime() {
+		return startTime;
+	}
+	public void setStartTime(String startTime) {
+		this.startTime = startTime;
+	}
+	public String getEndTime() {
+		return endTime;
+	}
+	public void setEndTime(String endTime) {
+		this.endTime = endTime;
+	}
+	
+
+}

+ 16 - 0
src/main/java/com/kede/visitingCustomers/bo/OutVisitingCustomers.java

@@ -0,0 +1,16 @@
+package com.kede.visitingCustomers.bo;
+
+import com.kede.common.model.VisitingCustomers;
+
+public class OutVisitingCustomers extends VisitingCustomers{
+	private String createTimes;
+
+	public String getCreateTimes() {
+		return createTimes;
+	}
+
+	public void setCreateTimes(String createTimes) {
+		this.createTimes = createTimes;
+	}
+
+}

+ 71 - 0
src/main/java/com/kede/visitingCustomers/controller/AdminVisitingCustomersApiController.java

@@ -0,0 +1,71 @@
+package com.kede.visitingCustomers.controller;
+
+import javax.annotation.Resource;
+
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.bind.annotation.RestController;
+
+import com.kede.common.bo.Result;
+import com.kede.common.constant.ErrorConstants;
+import com.kede.common.controller.BaseApiController;
+import com.kede.common.model.VisitingCustomers;
+import com.kede.common.utils.StringUtils;
+import com.kede.visitingCustomers.bo.InputVisitingCustomers;
+import com.kede.visitingCustomers.service.VisitingCustomersService;
+
+
+
+
+
+@RestController
+@RequestMapping(value = "/api/admin/visitingCustomers")
+public class AdminVisitingCustomersApiController extends BaseApiController {
+	@Resource
+ 	private VisitingCustomersService	visitingCustomersService;
+	
+
+	@RequestMapping(value = "/addVisitingCustomers", method = RequestMethod.POST)
+	public Result addVisitingCustomers(VisitingCustomers vc) {
+		Result res =new Result();
+		if(StringUtils.isBlank(vc.getName())||StringUtils.isBlank(vc.getMobile())) {
+			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"名字和电话","名字和电话"));
+			return res;
+		}
+		if (!res.getError().isEmpty()) {
+			return res;
+		}
+		res.data(visitingCustomersService.addVisitingCustomers(vc));
+		return res;
+	}
+
+	@RequestMapping(value = "/updateVisitingCustomers", method = RequestMethod.POST)
+	public Result updateVisitingCustomers(VisitingCustomers vc) {
+		Result res =new Result();
+		res.data(visitingCustomersService.updateVisitingCustomers(vc));
+		return res;
+	}
+	
+	@RequestMapping(value = "/deleteVisitingCustomers", method = RequestMethod.POST)
+	public Result deleteVisitingCustomers(VisitingCustomers vc) {
+		Result res =new Result();
+		if(vc.getId()==null) {
+			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"ID","ID"));
+			return res;
+		}
+		res.data(visitingCustomersService.deleteVisitingCustomers(vc.getId()));
+		return res;
+	}
+	
+	@RequestMapping(value = "/listVisitingCustomers", method = RequestMethod.GET)
+	public Result listRecruitment(InputVisitingCustomers vc ) {
+		Result res =new Result();
+		
+		res.data(visitingCustomersService.listVisitingCustomers(vc));
+		return res;
+	}
+	
+	
+	
+
+}

+ 20 - 0
src/main/java/com/kede/visitingCustomers/service/VisitingCustomersService.java

@@ -0,0 +1,20 @@
+package com.kede.visitingCustomers.service;
+
+import com.kede.common.model.VisitingCustomers;
+import com.kede.core.mybatis.page.Pagination;
+import com.kede.visitingCustomers.bo.InputVisitingCustomers;
+import com.kede.visitingCustomers.bo.OutVisitingCustomers;
+
+public interface VisitingCustomersService {
+
+
+	int addVisitingCustomers(VisitingCustomers vc);
+
+	int updateVisitingCustomers(VisitingCustomers vc);
+	
+	int deleteVisitingCustomers(Integer id);
+
+	Pagination<OutVisitingCustomers> listVisitingCustomers(InputVisitingCustomers vc);
+
+
+}

+ 55 - 0
src/main/java/com/kede/visitingCustomers/service/impl/VisitingCustomersServiceImpl.java

@@ -0,0 +1,55 @@
+package com.kede.visitingCustomers.service.impl;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import com.kede.common.dao.VisitingCustomersMapper;
+import com.kede.common.model.VisitingCustomers;
+import com.kede.core.mybatis.BaseMybatisDao;
+import com.kede.core.mybatis.page.Pagination;
+import com.kede.recruitment.bo.OutRecruitment;
+import com.kede.visitingCustomers.bo.InputVisitingCustomers;
+import com.kede.visitingCustomers.bo.OutVisitingCustomers;
+import com.kede.visitingCustomers.service.VisitingCustomersService;
+
+@Service
+public class VisitingCustomersServiceImpl extends BaseMybatisDao<VisitingCustomersMapper> implements VisitingCustomersService {
+	
+	
+	@Autowired
+	private VisitingCustomersMapper	visitingCustomersMapper;
+	
+	@Override
+	public int addVisitingCustomers(VisitingCustomers vc) {
+		
+		return visitingCustomersMapper.insertSelective(vc);
+	}
+
+	@Override
+	public int updateVisitingCustomers(VisitingCustomers vc) {
+		VisitingCustomers v=new VisitingCustomers();
+		v.setId(vc.getId());
+		v.setStatus(vc.getStatus());
+		v.setRemark(vc.getRemark());
+		return visitingCustomersMapper.updateByPrimaryKeySelective(v);
+	}
+
+	@Override
+	public int deleteVisitingCustomers(Integer id) {
+		return visitingCustomersMapper.deleteByPrimaryKey(id);
+	}
+
+	@SuppressWarnings("unchecked")
+	@Override
+	public Pagination<OutVisitingCustomers> listVisitingCustomers(InputVisitingCustomers vc) {
+		Map<String, Object> params=new HashMap<>();
+		params.put("startTime", vc.getStartTime());
+		params.put("endTime", vc.getEndTime()+" 23:59:59");
+		params.put("name", vc.getName());
+		return (Pagination<OutVisitingCustomers>) findPage("findVisitingCustomersList", "findVisitingCustomersCount", params, vc.getPageNo(), vc.getPageSize());
+	}
+
+}

+ 13 - 0
src/main/webapp/WEB-INF/views/common.html

@@ -443,6 +443,19 @@
                     <a href="http://www.beian.miit.gov.cn" target="_blank"><span> ©湘ICP备15019731号-5</span></a>
                 </div>
             </div>
+            <div class="infoDown" style="height: 80px;">
+                <div class="container">
+                </div>
+            </div>
+            <div class="footer-submit">
+                <div class="submit-body">
+                    <span style="color: white; font-size: 20px; margin-right: 20px;">请留下您的联系方式,我们将尽快为您回电!</span>
+                    <input type="text" id="submitName" class="submit-name" placeholder="请输入您的姓名:" />
+                    <input type="text" id="submitPhone" class="submit-name" placeholder="请输入您的联系方式:" />
+                    <button id="submitGo" class="submit-button" >提交咨询</button>
+                    <img th:src="${portalHost+'/images/close.png'}" alt="" width="30px" id="submit-close" >
+                </div>
+            </div>
             <!-- 回到顶部 -->
             <div class="toTop"><img th:src="${portalHost+'/images/toTop.png'}"></div>
              <!-- 底部  end -->