zou_ht лет назад: 8
Родитель
Сommit
5292c1de42

+ 3 - 3
src/main/java/com/goafanti/admin/controller/AdminCustomerApiController.java

@@ -33,7 +33,7 @@ public class AdminCustomerApiController extends CertifyApiController {
 	public Result addCustomer(String createTime, String companyName, String companyIndustry, String companyIntention,
 	public Result addCustomer(String createTime, String companyName, String companyIndustry, String companyIntention,
 			String adress, String customerName, String mobile, String email, String qq, String wechat,
 			String adress, String customerName, String mobile, String email, String qq, String wechat,
 			String customerPosition, String remark, String province, String fllowSituation, int sex,
 			String customerPosition, String remark, String province, String fllowSituation, int sex,
-			String customerStatue, String department, int customerTyp, String telNum) throws ParseException {
+			String customerStatue, String department, String customerTyp, String telNum) throws ParseException {
 		Customer cus = new Customer();
 		Customer cus = new Customer();
 		Result res = new Result();
 		Result res = new Result();
 		cus.setAdress(adress);
 		cus.setAdress(adress);
@@ -80,7 +80,7 @@ public class AdminCustomerApiController extends CertifyApiController {
 	 * @return
 	 * @return
 	 */
 	 */
 	@RequestMapping(value = "/searchCustomerList", method = RequestMethod.GET)
 	@RequestMapping(value = "/searchCustomerList", method = RequestMethod.GET)
-	public Result SearchCustomerList(String companyName, Integer customerTyp, String province,
+	public Result SearchCustomerList(String companyName, String customerTyp, String province,
 			String customerName, String telNum, String customerStatue, String CompanyIntention, String fllowSituation,Integer pageNo,Integer pageSize) {
 			String customerName, String telNum, String customerStatue, String CompanyIntention, String fllowSituation,Integer pageNo,Integer pageSize) {
 		Result res =new Result();
 		Result res =new Result();
 		res.setData(customerService.findCustomerByPage(companyName, customerTyp, province, customerName, telNum, customerStatue,
 		res.setData(customerService.findCustomerByPage(companyName, customerTyp, province, customerName, telNum, customerStatue,
@@ -109,7 +109,7 @@ public class AdminCustomerApiController extends CertifyApiController {
 	public Result updCustomerInfo(String id,String aid,String createTime, String companyName, String companyIndustry, String companyIntention,
 	public Result updCustomerInfo(String id,String aid,String createTime, String companyName, String companyIndustry, String companyIntention,
 			String adress, String customerName, String mobile, String email, String qq, String wechat,
 			String adress, String customerName, String mobile, String email, String qq, String wechat,
 			String customerPosition, String remark, String province, String fllowSituation, int sex,
 			String customerPosition, String remark, String province, String fllowSituation, int sex,
-			String customerStatue, String department, int customerTyp, String telNum) {
+			String customerStatue, String department, String customerTyp, String telNum) {
 		Result res =new Result();
 		Result res =new Result();
 		customerService.updCustomer(id, aid, createTime, companyName, companyIndustry, companyIntention, adress, customerName, mobile, email, qq, wechat, customerPosition, remark, province, fllowSituation, sex, customerStatue, department, customerTyp, telNum);
 		customerService.updCustomer(id, aid, createTime, companyName, companyIndustry, companyIntention, adress, customerName, mobile, email, qq, wechat, customerPosition, remark, province, fllowSituation, sex, customerStatue, department, customerTyp, telNum);
 		return res;
 		return res;

+ 2 - 2
src/main/java/com/goafanti/admin/service/CustomerService.java

@@ -10,13 +10,13 @@ public interface CustomerService {
 	
 	
 	int deleteCustomer(String id);
 	int deleteCustomer(String id);
 	
 	
-	Pagination<Customer> findCustomerByPage(String companyName ,Integer customerTyp ,String province ,String customerName ,String telNum ,
+	Pagination<Customer> findCustomerByPage(String companyName ,String customerTyp ,String province ,String customerName ,String telNum ,
 			String customerStatue  ,String CompanyIntention  ,String fllowSituation,Integer pageNo, Integer pageSize);
 			String customerStatue  ,String CompanyIntention  ,String fllowSituation,Integer pageNo, Integer pageSize);
 	
 	
 	int updCustomer(String id,String aid,String createTime, String companyName, String companyIndustry, String companyIntention,
 	int updCustomer(String id,String aid,String createTime, String companyName, String companyIndustry, String companyIntention,
 			String adress, String customerName, String mobile, String email, String qq, String wechat,
 			String adress, String customerName, String mobile, String email, String qq, String wechat,
 			String customerPosition, String remark, String province, String fllowSituation, int sex,
 			String customerPosition, String remark, String province, String fllowSituation, int sex,
-			String customerStatue, String department, int customerTyp, String telNum);
+			String customerStatue, String department, String customerTyp, String telNum);
 	
 	
 	Customer searchCustomer(String id);
 	Customer searchCustomer(String id);
 }
 }

+ 3 - 3
src/main/java/com/goafanti/admin/service/impl/CustomerServiceImpl.java

@@ -32,7 +32,7 @@ public class CustomerServiceImpl extends BaseMybatisDao<CustomerMapper> implemen
 	
 	
 	@SuppressWarnings("unchecked")
 	@SuppressWarnings("unchecked")
 	@Override
 	@Override
-	public Pagination<Customer> findCustomerByPage(String companyName ,Integer customerTyp ,String province ,String customerName ,String telNum ,
+	public Pagination<Customer> findCustomerByPage(String companyName ,String customerTyp ,String province ,String customerName ,String telNum ,
 			String customerStatue  ,String CompanyIntention  ,String fllowSituation ,Integer pageNo, Integer pageSize) {
 			String customerStatue  ,String CompanyIntention  ,String fllowSituation ,Integer pageNo, Integer pageSize) {
 		return (Pagination<Customer>) findPage("findSearchCustomerListByPage", "findSearchCustomerCount",
 		return (Pagination<Customer>) findPage("findSearchCustomerListByPage", "findSearchCustomerCount",
 				buildListParams(companyName, customerTyp, province, customerName, telNum, customerStatue, CompanyIntention, 
 				buildListParams(companyName, customerTyp, province, customerName, telNum, customerStatue, CompanyIntention, 
@@ -41,7 +41,7 @@ public class CustomerServiceImpl extends BaseMybatisDao<CustomerMapper> implemen
 	}
 	}
 	
 	
 	
 	
-	private Map<String, Object> buildListParams(String companyName, Integer customerTyp,String province,String customerName,String telNum,
+	private Map<String, Object> buildListParams(String companyName, String customerTyp,String province,String customerName,String telNum,
 			String customerStatue,String CompanyIntention,String fllowSituation,String aid) {
 			String customerStatue,String CompanyIntention,String fllowSituation,String aid) {
 		Map<String, Object> params = new HashMap<>();
 		Map<String, Object> params = new HashMap<>();
 
 
@@ -78,7 +78,7 @@ public class CustomerServiceImpl extends BaseMybatisDao<CustomerMapper> implemen
 	public int updCustomer(String id,String aid,String createTime, String companyName, String companyIndustry, String companyIntention,
 	public int updCustomer(String id,String aid,String createTime, String companyName, String companyIndustry, String companyIntention,
 			String adress, String customerName, String mobile, String email, String qq, String wechat,
 			String adress, String customerName, String mobile, String email, String qq, String wechat,
 			String customerPosition, String remark, String province, String fllowSituation, int sex,
 			String customerPosition, String remark, String province, String fllowSituation, int sex,
-			String customerStatue, String department, int customerTyp, String telNum) {
+			String customerStatue, String department, String customerTyp, String telNum) {
 		
 		
 		int res = customerMapper.updateByPrimaryKey(id,aid,createTime, companyName, companyIndustry, companyIntention, adress, customerName, mobile, 
 		int res = customerMapper.updateByPrimaryKey(id,aid,createTime, companyName, companyIndustry, companyIntention, adress, customerName, mobile, 
 				email, qq, wechat, customerPosition,remark, province, fllowSituation, sex,customerStatue, department, customerTyp, telNum);
 				email, qq, wechat, customerPosition,remark, province, fllowSituation, sex,customerStatue, department, customerTyp, telNum);

+ 2 - 2
src/main/java/com/goafanti/common/dao/CustomerMapper.java

@@ -22,7 +22,7 @@ public interface CustomerMapper {
 	 * 分页查询客户信息
 	 * 分页查询客户信息
 	 * @mbg.generated  Tue Oct 10 10:30:05 CST 2017
 	 * @mbg.generated  Tue Oct 10 10:30:05 CST 2017
 	 */
 	 */
-	List<Customer> findSearchCustomerListByPage(String companyName ,Integer customerTyp ,String province ,String customerName ,String telNum ,
+	List<Customer> findSearchCustomerListByPage(String companyName ,String customerTyp ,String province ,String customerName ,String telNum ,
 			String customerStatue  ,String CompanyIntention  ,String fllowSituation  ,String aid);
 			String customerStatue  ,String CompanyIntention  ,String fllowSituation  ,String aid);
 
 
 
 
@@ -40,5 +40,5 @@ public interface CustomerMapper {
 	int updateByPrimaryKey(String id,String aid,String createTime, String companyName, String companyIndustry, String companyIntention,
 	int updateByPrimaryKey(String id,String aid,String createTime, String companyName, String companyIndustry, String companyIntention,
 			String adress, String customerName, String mobile, String email, String qq, String wechat,
 			String adress, String customerName, String mobile, String email, String qq, String wechat,
 			String customerPosition, String remark, String province, String fllowSituation, int sex,
 			String customerPosition, String remark, String province, String fllowSituation, int sex,
-			String customerStatue, String department, int customerTyp, String telNum);
+			String customerStatue, String department, String customerTyp, String telNum);
 }
 }

+ 9 - 9
src/main/java/com/goafanti/common/mapper/CustomerMapper.xml

@@ -4,7 +4,7 @@
   <resultMap id="BaseResultMap" type="com.goafanti.common.model.Customer">
   <resultMap id="BaseResultMap" type="com.goafanti.common.model.Customer">
     <id column="id" jdbcType="VARCHAR" property="id" />
     <id column="id" jdbcType="VARCHAR" property="id" />
     <result column="aid" jdbcType="VARCHAR" property="aid" />
     <result column="aid" jdbcType="VARCHAR" property="aid" />
-    <result column="company_nmae" jdbcType="VARCHAR" property="companyName" />
+    <result column="company_name" jdbcType="VARCHAR" property="companyName" />
     <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
     <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
     <result column="company_industry" jdbcType="VARCHAR" property="companyIndustry" />
     <result column="company_industry" jdbcType="VARCHAR" property="companyIndustry" />
     <result column="company_intention" jdbcType="VARCHAR" property="companyIntention" />
     <result column="company_intention" jdbcType="VARCHAR" property="companyIntention" />
@@ -21,7 +21,7 @@
     <result column="fllow_situation" jdbcType="VARCHAR" property="fllowSituation" />
     <result column="fllow_situation" jdbcType="VARCHAR" property="fllowSituation" />
     <result column="sex" jdbcType="INTEGER" property="sex" />
     <result column="sex" jdbcType="INTEGER" property="sex" />
     <result column="customer_statue" jdbcType="VARCHAR" property="customerStatue" />
     <result column="customer_statue" jdbcType="VARCHAR" property="customerStatue" />
-    <result column="customer_typ" jdbcType="INTEGER" property="customerTyp" />
+    <result column="customer_typ" jdbcType="VARCHAR" property="customerTyp" />
     <result column="tel_num" jdbcType="VARCHAR" property="telNum" />
     <result column="tel_num" jdbcType="VARCHAR" property="telNum" />
   </resultMap>
   </resultMap>
   <sql id="Example_Where_Clause">
   <sql id="Example_Where_Clause">
@@ -83,7 +83,7 @@
     </where>
     </where>
   </sql>
   </sql>
   <sql id="Base_Column_List">
   <sql id="Base_Column_List">
-    id, aid, company_nmae, create_time, company_industry, company_intention, adress, 
+    id, aid, company_name, create_time, company_industry, company_intention, adress, 
     customer_name, customer_position, mobile, email, department, qq, wechat, remark, 
     customer_name, customer_position, mobile, email, department, qq, wechat, remark, 
     province, fllow_situation, sex, customer_statue
     province, fllow_situation, sex, customer_statue
   </sql>
   </sql>
@@ -104,7 +104,7 @@
   
   
    <!-- 新增客户 -->
    <!-- 新增客户 -->
   <insert id="insertCustomer" parameterType="com.goafanti.common.model.Customer">
   <insert id="insertCustomer" parameterType="com.goafanti.common.model.Customer">
-    insert into customer (id, aid, company_nmae, 
+    insert into customer (id, aid, company_name, 
       create_time, company_industry, company_intention, 
       create_time, company_industry, company_intention, 
       adress, customer_name, customer_position, 
       adress, customer_name, customer_position, 
       mobile, email, department, 
       mobile, email, department, 
@@ -117,7 +117,7 @@
       #{mobile,jdbcType=VARCHAR}, #{email,jdbcType=VARCHAR}, #{department,jdbcType=VARCHAR}, 
       #{mobile,jdbcType=VARCHAR}, #{email,jdbcType=VARCHAR}, #{department,jdbcType=VARCHAR}, 
       #{qq,jdbcType=VARCHAR}, #{wechat,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR}, 
       #{qq,jdbcType=VARCHAR}, #{wechat,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR}, 
       #{province,jdbcType=VARCHAR}, #{fllowSituation,jdbcType=VARCHAR}, #{sex,jdbcType=INTEGER}, 
       #{province,jdbcType=VARCHAR}, #{fllowSituation,jdbcType=VARCHAR}, #{sex,jdbcType=INTEGER}, 
-      #{customerStatue,jdbcType=VARCHAR}, #{customerTyp,jdbcType=INTEGER}, #{telNum,jdbcType=VARCHAR},0,0)
+      #{customerStatue,jdbcType=VARCHAR}, #{customerTyp,jdbcType=VARCHAR}, #{telNum,jdbcType=VARCHAR},0,0)
   </insert>
   </insert>
   
   
   <insert id="insertSelective" parameterType="com.goafanti.common.model.Customer">
   <insert id="insertSelective" parameterType="com.goafanti.common.model.Customer">
@@ -130,7 +130,7 @@
         aid,
         aid,
       </if>
       </if>
       <if test="companyName != null">
       <if test="companyName != null">
-        company_nmae,
+        company_name,
       </if>
       </if>
       <if test="createTime != null">
       <if test="createTime != null">
         create_time,
         create_time,
@@ -250,7 +250,7 @@
         aid = #{aid,jdbcType=VARCHAR},
         aid = #{aid,jdbcType=VARCHAR},
       </if>
       </if>
       <if test="companyName != null">
       <if test="companyName != null">
-        company_nmae = #{companyName,jdbcType=VARCHAR},
+        company_name = #{companyName,jdbcType=VARCHAR},
       </if>
       </if>
       <if test="createTime != null">
       <if test="createTime != null">
         create_time = #{createTime,jdbcType=TIMESTAMP},
         create_time = #{createTime,jdbcType=TIMESTAMP},
@@ -327,7 +327,7 @@
       a.tel_num = #{telNum,jdbcType=VARCHAR},
       a.tel_num = #{telNum,jdbcType=VARCHAR},
     </if>
     </if>
     <if test="customerTyp != null">
     <if test="customerTyp != null">
-      a.typ = #{customerTyp,jdbcType=INTEGER},
+      a.typ = #{customerTyp,jdbcType=VARCHAR},
     </if>
     </if>
     <if test="companyIntention != null">
     <if test="companyIntention != null">
       a.company_intention = #{companyIntention,jdbcType=VARCHAR},
       a.company_intention = #{companyIntention,jdbcType=VARCHAR},
@@ -364,7 +364,7 @@
       a.tel_num = #{telNum,jdbcType=VARCHAR},
       a.tel_num = #{telNum,jdbcType=VARCHAR},
     </if>
     </if>
     <if test="customerTyp != null">
     <if test="customerTyp != null">
-      a.typ = #{customerTyp,jdbcType=INTEGER},
+      a.typ = #{customerTyp,jdbcType=VARCHAR},
     </if>
     </if>
     <if test="companyIntention != null">
     <if test="companyIntention != null">
       a.company_intention = #{companyIntention,jdbcType=VARCHAR},
       a.company_intention = #{companyIntention,jdbcType=VARCHAR},

+ 3 - 3
src/main/java/com/goafanti/common/model/Customer.java

@@ -22,7 +22,7 @@ public class Customer {
 	/**
 	/**
 	 * 客户类型
 	 * 客户类型
 	 */
 	 */
-	private int customerTyp;
+	private String customerTyp;
 	
 	
 	/**
 	/**
 	 * 行业
 	 * 行业
@@ -212,10 +212,10 @@ public class Customer {
 		this.telNum = telNum;
 		this.telNum = telNum;
 	}
 	}
 	
 	
-	public int getCustomerTyp() {
+	public String getCustomerTyp() {
 		return customerTyp;
 		return customerTyp;
 	}
 	}
-	public void setCustomerTyp(int customerTyp) {
+	public void setCustomerTyp(String customerTyp) {
 		this.customerTyp = customerTyp;
 		this.customerTyp = customerTyp;
 	}
 	}
 	@Override
 	@Override