zou_ht 8 lat temu
rodzic
commit
bca9120743

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

@@ -80,7 +80,7 @@ public class AdminCustomerApiController extends CertifyApiController {
 	 * @return
 	 */
 	@RequestMapping(value = "/searchCustomerList", method = RequestMethod.GET)
-	public Result SearchCustomerList(String companyName, String customerTyp, String province,
+	public Result SearchCustomerList(String companyName, Integer customerTyp, String province,
 			String customerName, String telNum, String customerStatue, String CompanyIntention, String fllowSituation,Integer pageNo,Integer pageSize) {
 		Result res =new Result();
 		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,
 			String adress, String customerName, String mobile, String email, String qq, String wechat,
 			String customerPosition, String remark, String province, String fllowSituation, int sex,
-			String customerStatue, String department, String customerTyp, String telNum) {
+			String customerStatue, String department, Integer customerTyp, String telNum) {
 		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);
 		return res;

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

@@ -10,13 +10,13 @@ public interface CustomerService {
 	
 	int deleteCustomer(String id);
 	
-	Pagination<Customer> findCustomerByPage(String companyName ,String customerTyp ,String province ,String customerName ,String telNum ,
+	Pagination<Customer> findCustomerByPage(String companyName ,Integer customerTyp ,String province ,String customerName ,String telNum ,
 			String customerStatue  ,String CompanyIntention  ,String fllowSituation,Integer pageNo, Integer pageSize);
 	
 	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 customerPosition, String remark, String province, String fllowSituation, int sex,
-			String customerStatue, String department, String customerTyp, String telNum);
+			String customerStatue, String department, Integer customerTyp, String telNum);
 	
 	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")
 	@Override
-	public Pagination<Customer> findCustomerByPage(String companyName ,String customerTyp ,String province ,String customerName ,String telNum ,
+	public Pagination<Customer> findCustomerByPage(String companyName ,Integer customerTyp ,String province ,String customerName ,String telNum ,
 			String customerStatue  ,String CompanyIntention  ,String fllowSituation ,Integer pageNo, Integer pageSize) {
 		return (Pagination<Customer>) findPage("findSearchCustomerListByPage", "findSearchCustomerCount",
 				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, String customerTyp,String province,String customerName,String telNum,
+	private Map<String, Object> buildListParams(String companyName, Integer customerTyp,String province,String customerName,String telNum,
 			String customerStatue,String CompanyIntention,String fllowSituation,String aid) {
 		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,
 			String adress, String customerName, String mobile, String email, String qq, String wechat,
 			String customerPosition, String remark, String province, String fllowSituation, int sex,
-			String customerStatue, String department, String customerTyp, String telNum) {
+			String customerStatue, String department, Integer customerTyp, String telNum) {
 		
 		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);

+ 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
 	 */
-	List<Customer> findSearchCustomerListByPage(String companyName ,String customerTyp ,String province ,String customerName ,String telNum ,
+	List<Customer> findSearchCustomerListByPage(String companyName ,Integer customerTyp ,String province ,String customerName ,String telNum ,
 			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,
 			String adress, String customerName, String mobile, String email, String qq, String wechat,
 			String customerPosition, String remark, String province, String fllowSituation, int sex,
-			String customerStatue, String department, String customerTyp, String telNum);
+			String customerStatue, String department, Integer customerTyp, String telNum);
 }

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

@@ -2,6 +2,9 @@ package com.goafanti.common.model;
 
 import java.util.Date;
 
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.fasterxml.jackson.annotation.JsonFormat.Shape;
+
 public class Customer {
 	/**
 	 * 获取id
@@ -87,7 +90,7 @@ public class Customer {
 	/**
 	 * 性别
 	 */
-	private int sex;
+	private Integer sex;
 	/**
 	 * 客户状态
 	 */
@@ -204,10 +207,11 @@ public class Customer {
 	public void setFllowSituation(String fllowSituation) {
 		this.fllowSituation = fllowSituation;
 	}
-	public int getSex() {
+	@JsonFormat(shape = Shape.STRING)
+	public Integer getSex() {
 		return sex;
 	}
-	public void setSex(int sex) {
+	public void setSex(Integer sex) {
 		this.sex = sex;
 	}
 	public String getCustomerStatue() {
@@ -222,7 +226,7 @@ public class Customer {
 	public void setTelNum(String telNum) {
 		this.telNum = telNum;
 	}
-	
+	@JsonFormat(shape = Shape.STRING)
 	public Integer getCustomerTyp() {
 		return customerTyp;
 	}