Browse Source

Merge remote-tracking branch 'origin/dev' into dev

Conflicts:
	src/main/java/com/goafanti/common/dao/CustomerMapper.java
	src/main/java/com/goafanti/customer/controller/AdminCustomerApiController.java
wanghui 8 years ago
parent
commit
83ecf1c754

+ 3 - 0
src/main/java/com/goafanti/admin/service/AdminService.java

@@ -8,6 +8,7 @@ import com.goafanti.admin.bo.AdminListBo;
 import com.goafanti.common.model.Admin;
 import com.goafanti.common.model.AdminLocation;
 import com.goafanti.core.mybatis.page.Pagination;
+import com.goafanti.customer.bo.AdminOut;
 
 public interface AdminService {
 
@@ -61,6 +62,8 @@ public interface AdminService {
 	int insertNewAdmin(Admin ad, List<AdminLocation> adminLocationList);
 
 	Map<String, String> listAdminSelect();
+	
+	List<AdminOut> selectAdmin();
 
 
 }

+ 6 - 0
src/main/java/com/goafanti/admin/service/impl/AdminServiceImpl.java

@@ -23,6 +23,7 @@ import com.goafanti.common.utils.StringUtils;
 import com.goafanti.core.mybatis.BaseMybatisDao;
 import com.goafanti.core.mybatis.page.Pagination;
 import com.goafanti.core.shiro.token.TokenManager;
+import com.goafanti.customer.bo.AdminOut;
 
 @Service
 public class AdminServiceImpl extends BaseMybatisDao<AdminMapper> implements AdminService {
@@ -250,4 +251,9 @@ public class AdminServiceImpl extends BaseMybatisDao<AdminMapper> implements Adm
 		return map;
 	}
 
+	@Override
+	public List<AdminOut> selectAdmin() {
+		return adminMapper.selectAdmin();
+	}
+
 }

+ 3 - 0
src/main/java/com/goafanti/common/dao/AdminMapper.java

@@ -6,6 +6,7 @@ import org.apache.ibatis.annotations.Param;
 
 import com.goafanti.common.model.Admin;
 import com.goafanti.common.model.Role;
+import com.goafanti.customer.bo.AdminOut;
 
 public interface AdminMapper {
     int deleteByPrimaryKey(String id);
@@ -57,5 +58,7 @@ public interface AdminMapper {
 	List<Admin> listAdminSelectBySuperAdmin();
 
 	List<Admin> listAdminSelectByAreaAdmin(@Param("provinceList")List<Integer> provinceList, @Param("cityList")List<Integer> cityList);
+	
+	List<AdminOut> selectAdmin();
 
 }

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

@@ -94,5 +94,4 @@ public interface CustomerMapper {
      * @return 查询团队 客户记录
      */
     List<Customer> updFollowId(Customer record);
-    
 }

+ 6 - 0
src/main/java/com/goafanti/common/mapper/AdminMapper.xml

@@ -168,6 +168,12 @@
     from admin 
   </select>
   
+   <select id="selectAdmin" resultType="com.goafanti.customer.bo.AdminOut">
+    select 
+    <include refid="Base_Column_List" />
+    from admin 
+  </select>
+  
   <select id="selectByMobile" parameterType="java.lang.String" resultMap="BaseResultMap">
      select 
     <include refid="Base_Column_List" />

+ 248 - 0
src/main/java/com/goafanti/customer/bo/AdminOut.java

@@ -0,0 +1,248 @@
+package com.goafanti.customer.bo;
+
+import java.util.Date;
+
+import org.apache.commons.lang3.time.DateFormatUtils;
+
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.goafanti.common.constant.AFTConstants;
+import com.goafanti.common.model.Admin;
+
+public class AdminOut extends Admin{
+	private static final long	serialVersionUID	= 1L;
+
+	private String				id;
+	
+	/**
+	 * 客户记录id
+	 */
+	private String              cid;
+
+	/**
+	 * 手机号(登录帐号)
+	 */
+	private String				mobile;
+
+	/**
+	 * 用户名
+	 */
+	private String				name;
+
+	/**
+	 * 密码
+	 */
+	private String				password;
+
+	/**
+	 * 邮箱
+	 */
+	private String				email;
+
+	/**
+	 * 创建时间
+	 */
+	private Date				createTime;
+
+	/**
+	 * 员工工号
+	 */
+	private Integer				number;
+
+	/**
+	 * 所在省份
+	 */
+	private Integer				province;
+	/**
+	 * 职位
+	 */
+	private String				position;
+
+	/**
+	 * 上级管理用户ID
+	 */
+	private String				superiorId;
+
+	/**
+	 * 意向
+	 */
+	private String				beforeCompanyIntention;
+	/**
+	 * 状态
+	 */
+	private String				beforeCustomerStatus;
+	/**
+	 * 跟进状态
+	 */
+	private String				beforeFollowSituation;
+	/**
+	 * 转交人
+	 */
+	private String				beforeAdminName;
+	/**
+	 * 所在市
+	 */
+	private Integer				city;
+	
+	public String getSuperiorId() {
+		return superiorId;
+	}
+
+	public void setSuperiorId(String superiorId) {
+		this.superiorId = superiorId;
+	}
+
+	
+	public String getCid() {
+		return cid;
+	}
+
+	public void setCid(String cid) {
+		this.cid = cid;
+	}
+
+	public String getPosition() {
+		return position;
+	}
+
+	public void setPosition(String position) {
+		this.position = position;
+	}
+
+	public String getId() {
+		return id;
+	}
+
+	public void setId(String id) {
+		this.id = id;
+	}
+
+	public String getMobile() {
+		return mobile;
+	}
+
+	public void setMobile(String mobile) {
+		this.mobile = mobile;
+	}
+
+	public String getName() {
+		return name;
+	}
+
+	public void setName(String name) {
+		this.name = name;
+	}
+
+	@JsonIgnore
+	public String getPassword() {
+		return password;
+	}
+
+	public void setPassword(String password) {
+		this.password = password;
+	}
+
+	public String getEmail() {
+		return email;
+	}
+
+	public void setEmail(String email) {
+		this.email = email;
+	}
+
+	public Date getCreateTime() {
+		return createTime;
+	}
+
+	public void setCreateTime(Date createTime) {
+		this.createTime = createTime;
+	}
+
+	public Integer getNumber() {
+		return number;
+	}
+
+	public void setNumber(Integer number) {
+		this.number = number;
+	}
+
+
+	public Integer getProvince() {
+		return province;
+	}
+
+	public void setProvince(Integer province) {
+		this.province = province;
+	}
+
+	public Integer getCity() {
+		return city;
+	}
+
+	public void setCity(Integer city) {
+		this.city = city;
+	}
+
+	// 创建时间
+	public String getCreateTimeFormattedDate() {
+		if (this.createTime == null) {
+			return null;
+		} else {
+			return DateFormatUtils.format(this.getCreateTime(), AFTConstants.YYYYMMDDHHMMSS);
+		}
+	}
+
+	public void setCreateTimeFormattedDate(String createTimeFormattedDate) {
+
+	}
+
+	@JsonIgnore
+	@Override
+	public String getAid() {
+		return null;
+	}
+
+	@Override
+	public Integer getType() {
+		return null;
+	}
+
+
+	public String getBeforeCompanyIntention() {
+		return beforeCompanyIntention;
+	}
+
+	public void setBeforeCompanyIntention(String beforeCompanyIntention) {
+		this.beforeCompanyIntention = beforeCompanyIntention;
+	}
+
+	public String getBeforeCustomerStatus() {
+		return beforeCustomerStatus;
+	}
+
+	public void setBeforeCustomerStatus(String beforeCustomerStatus) {
+		this.beforeCustomerStatus = beforeCustomerStatus;
+	}
+
+	public String getBeforeFollowSituation() {
+		return beforeFollowSituation;
+	}
+
+	public void setBeforeFollowSituation(String beforeFollowSituation) {
+		this.beforeFollowSituation = beforeFollowSituation;
+	}
+
+	public String getBeforeAdminName() {
+		return beforeAdminName;
+	}
+
+	public void setBeforeAdminName(String beforeAdminName) {
+		this.beforeAdminName = beforeAdminName;
+	}
+
+	public static long getSerialversionuid() {
+		return serialVersionUID;
+	}
+
+	
+
+}

+ 42 - 0
src/main/java/com/goafanti/customer/bo/CustomerOut.java

@@ -123,6 +123,16 @@ public class CustomerOut {
 	 * 跟单时间
 	 */
 	private String followDate;
+	/** 操作前客户状态  **/
+	private String beforeCustomerStatus;
+	
+	/** 操作前意向服务 **/
+	private String beforeCompanyIntention;
+	
+	/** 操作前跟进进度 **/
+	private String beforeFollowSituation;
+	/** 跟单人 **/
+	private String beforeAdminName;
 
 	public Integer getCustomerType() {
 		return customerType;
@@ -379,6 +389,38 @@ public class CustomerOut {
 	public void setFollowDate(String followDate) {
 		this.followDate = followDate;
 	}
+	
+	public String getBeforeCustomerStatus() {
+		return beforeCustomerStatus;
+	}
+
+	public void setBeforeCustomerStatus(String beforeCustomerStatus) {
+		this.beforeCustomerStatus = beforeCustomerStatus;
+	}
+
+	public String getBeforeCompanyIntention() {
+		return beforeCompanyIntention;
+	}
+
+	public void setBeforeCompanyIntention(String beforeCompanyIntention) {
+		this.beforeCompanyIntention = beforeCompanyIntention;
+	}
+
+	public String getBeforeFollowSituation() {
+		return beforeFollowSituation;
+	}
+
+	public void setBeforeFollowSituation(String beforeFollowSituation) {
+		this.beforeFollowSituation = beforeFollowSituation;
+	}
+
+	public String getBeforeAdminName() {
+		return beforeAdminName;
+	}
+
+	public void setBeforeAdminName(String beforeAdminName) {
+		this.beforeAdminName = beforeAdminName;
+	}
 
 	@Override
 	public String toString() {

+ 1 - 1
src/main/java/com/goafanti/customer/controller/AdminCustomerApiController.java

@@ -31,7 +31,6 @@ import com.goafanti.common.model.CustomerOrganizationInfo;
 import com.goafanti.common.model.CustomerUserInfo;
 import com.goafanti.common.model.FollowUpRecord;
 import com.goafanti.core.mybatis.page.Pagination;
-import com.goafanti.core.shiro.token.TokenManager;
 
 @RestController
 @RequestMapping(value = "/api/admin/customer")
@@ -283,4 +282,5 @@ public class AdminCustomerApiController extends BaseController {
 		res.setData(followUpService.listFollowUpRecord(customerId));
 		return res;
 	}
+	
 }

+ 12 - 0
src/main/java/com/goafanti/customer/service/CustomerUserService.java

@@ -33,4 +33,16 @@ public interface CustomerUserService {
 	 * @return
 	 */
 	int updPrimaryFlg (String cid);
+	
+	/**
+	 * 查询单个联系人信息
+	 * @return
+	 */
+	CustomerUserInfo findContractById (String id);
+	
+	/**
+	 * 修改单个联系人信息
+	 * @return
+	 */
+	int updateContractById (CustomerUserInfo cui);
 }

+ 10 - 0
src/main/java/com/goafanti/customer/service/impl/CustomerUserServiceImp.java

@@ -36,6 +36,16 @@ public class CustomerUserServiceImp extends BaseMybatisDao<CustomerUserInfoMappe
 		return customerUserInfoMapper.updataPrimaryFlg(cid);
 	}
 
+	@Override
+	public CustomerUserInfo findContractById(String id) {
+		return customerUserInfoMapper.selectByPrimaryKey(id);
+	}
+
+	@Override
+	public int updateContractById(CustomerUserInfo cui) {
+		return customerUserInfoMapper.updateByPrimaryKey(cui);
+	}
+