zou_ht hace 8 años
padre
commit
c264037205

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

@@ -56,24 +56,25 @@
     id, aid, customer_typ, share_typ, agent_id, company_intention, create_time, follow_situation, 
     customer_statue, paid
   </sql>
-  <select id="selectCustomerByPrimaryKey" parameterType="java.lang.String" resultMap="com.goafanti.customer.bo.CustomerBo">
+   <select id="selectCustomerByPrimaryKey" parameterType="java.lang.String" resultType="com.goafanti.customer.bo.CustomerBo">
     select 
     a.customer_typ as customerTyp,
-    a.share_typ as shareTyp,
+     a.share_typ as shareTyp,
     a.company_intention as companyIntention,
     a.create_time as createTime,
     a.follow_situation as followSituation,
-    a.customer_statue as ,customerStatue,
-    b.name,b.sex,b.mobile,b.telNum,b.email,b.qq,b.wechat,b.depatrment,b.remarks,
+    a.customer_statue as customerStatue,
+    b.name,b.sex,b.mobile,b.tel_num as telNum,b.email,b.qq,b.wechat,b.depatrment,b.remarks,
     b.customer_position as customerPosition,
     c.company_name as companyName,
     c.location_province as locationProvince,
     c.company_industry as companyIndustry,
-    c.adress
-    from customer a left join customer_user_info b on  a.id=b.cid
-    				left join customer_organization_info c on a.id=c.cid
+    c.adress -->
+    from customer a 
+    left join customer_user_info b on  a.id=b.cid
+    left join customer_organization_info c on a.id=c.cid
     where id = #{id,jdbcType=VARCHAR}
-  </select>
+  </select> 
   <delete id="deleteCustomerByPrimaryKey" parameterType="java.lang.String">
     <!--
       WARNING - @mbg.generated

+ 27 - 6
src/main/java/com/goafanti/customer/bo/CustomerBo.java

@@ -7,8 +7,14 @@ public class CustomerBo {
 	 * 客户类型(1-个人用户,2-公司用户)
 	 */
 	private String customerTyp;
-
-
+	/**
+	 * id
+	 */
+	private String id;
+	/**
+	 * cid
+	 */
+	private String cid;
 	/**
 	 * 分享类型(1-个人用户,2-公共用户)
 	 */
@@ -18,7 +24,6 @@ public class CustomerBo {
 	 */
 	private String companyIntention;
 
-
 	/**
 	 * 创建时间
 	 */
@@ -40,7 +45,7 @@ public class CustomerBo {
 	/**
 	 * 性别(0-男,1-女)
 	 */
-	private String sex;
+	private char sex;
 	/**
 	 * 座机号码
 	 */
@@ -97,6 +102,8 @@ public class CustomerBo {
 	 * 详细地址
 	 */
 	private String adress;
+	
+	
 	public String getCustomerTyp() {
 		return customerTyp;
 	}
@@ -139,10 +146,10 @@ public class CustomerBo {
 	public void setName(String name) {
 		this.name = name;
 	}
-	public String getSex() {
+	public char getSex() {
 		return sex;
 	}
-	public void setSex(String sex) {
+	public void setSex(char sex) {
 		this.sex = sex;
 	}
 	public String getMobile() {
@@ -229,6 +236,20 @@ public class CustomerBo {
 	public void setAdress(String adress) {
 		this.adress = adress;
 	}
+	
+	public String getId() {
+		return id;
+	}
+	public void setId(String id) {
+		this.id = id;
+	}
+	
+	public String getCid() {
+		return cid;
+	}
+	public void setCid(String cid) {
+		this.cid = cid;
+	}
 	@Override
 	public String toString() {
 		return "CustomerBo [customerTyp=" + customerTyp + ", shareTyp=" + shareTyp + ", companyIntention="