Browse Source

Merge branch 'patch' of https://git.coding.net/aft/AFT.git into patch

Conflicts:
	src/main/webapp/WEB-INF/views/portal/technologyTrading/assessMent.html
anderx 8 years ago
parent
commit
27bd5ddd4c
56 changed files with 3657 additions and 1031 deletions
  1. 2 2
      GeneratorConfig.xml
  2. 37 1
      src/main/java/com/goafanti/admin/bo/AdminListBo.java
  3. 600 0
      src/main/java/com/goafanti/admin/bo/BusinessProjectBo.java
  4. 31 0
      src/main/java/com/goafanti/admin/bo/ProjectSizeBo.java
  5. 1 1
      src/main/java/com/goafanti/admin/controller/AdminApiController.java
  6. 3 11
      src/main/java/com/goafanti/admin/controller/AdminSuperviseApiController.java
  7. 5 4
      src/main/java/com/goafanti/admin/controller/AdminVarietiesApiController.java
  8. 195 3
      src/main/java/com/goafanti/admin/controller/BusinessProjectController.java
  9. 2 2
      src/main/java/com/goafanti/admin/service/AdminService.java
  10. 1 0
      src/main/java/com/goafanti/admin/service/AdminVarietiesService.java
  11. 45 0
      src/main/java/com/goafanti/admin/service/BusinessProjectService.java
  12. 4 34
      src/main/java/com/goafanti/admin/service/impl/AdminServiceImpl.java
  13. 11 15
      src/main/java/com/goafanti/admin/service/impl/AdminVarietiesServiceImpl.java
  14. 345 3
      src/main/java/com/goafanti/admin/service/impl/BusinessProjectServiceImpl.java
  15. 78 77
      src/main/java/com/goafanti/app/controller/AppApiController.java
  16. 73 59
      src/main/java/com/goafanti/common/bo/Result.java
  17. 35 1
      src/main/java/com/goafanti/common/controller/PublicController.java
  18. 17 11
      src/main/java/com/goafanti/common/dao/BusinessProjectMapper.java
  19. 10 1
      src/main/java/com/goafanti/common/dao/BusinessVarietiesMapper.java
  20. 37 0
      src/main/java/com/goafanti/common/dao/PermissionMapper.java
  21. 6 0
      src/main/java/com/goafanti/common/dao/ProjectSizeMapper.java
  22. 4 2
      src/main/java/com/goafanti/common/enums/AttachmentType.java
  23. 2 2
      src/main/java/com/goafanti/common/mapper/AchievementMapper.xml
  24. 15 82
      src/main/java/com/goafanti/common/mapper/AdminMapper.xml
  25. 166 22
      src/main/java/com/goafanti/common/mapper/BusinessProjectMapper.xml
  26. 39 8
      src/main/java/com/goafanti/common/mapper/BusinessVarietiesMapper.xml
  27. 2 0
      src/main/java/com/goafanti/common/mapper/OrganizationManagementMapper.xml
  28. 175 1
      src/main/java/com/goafanti/common/mapper/PermissionMapper.xml
  29. 28 1
      src/main/java/com/goafanti/common/mapper/ProjectSizeMapper.xml
  30. 1 0
      src/main/java/com/goafanti/common/mapper/UserBusinessMapper.xml
  31. 23 16
      src/main/java/com/goafanti/common/mapper/UserMapperExt.xml
  32. 216 64
      src/main/java/com/goafanti/common/model/BusinessProject.java
  33. 156 16
      src/main/java/com/goafanti/common/model/BusinessProjectExample.java
  34. 90 0
      src/main/java/com/goafanti/common/model/Permission.java
  35. 26 0
      src/main/java/com/goafanti/common/model/ProjectSize.java
  36. 2 2
      src/main/java/com/goafanti/common/utils/FileUtils.java
  37. 43 44
      src/main/java/com/goafanti/core/shiro/filter/LoginFilter.java
  38. 201 211
      src/main/java/com/goafanti/core/shiro/session/CustomSessionManager.java
  39. 8 0
      src/main/java/com/goafanti/customer/bo/BusinessListBo.java
  40. 12 2
      src/main/java/com/goafanti/customer/bo/CustomerListOut.java
  41. 6 6
      src/main/java/com/goafanti/customer/controller/CustomerApiController.java
  42. 3 3
      src/main/java/com/goafanti/customer/service/CustomerService.java
  43. 6 6
      src/main/java/com/goafanti/customer/service/impl/CustomerServiceImpl.java
  44. 157 0
      src/main/java/com/goafanti/permission/bo/PermissionBo.java
  45. 136 0
      src/main/java/com/goafanti/permission/controller/NewPermissionApiController.java
  46. 18 0
      src/main/java/com/goafanti/permission/service/PermissionService.java
  47. 253 0
      src/main/java/com/goafanti/permission/service/impl/PermissionServiceImpl.java
  48. 118 116
      src/main/java/com/goafanti/user/controller/UserLoginController.java
  49. 9 2
      src/main/java/com/goafanti/user/controller/UserRegisterController.java
  50. 1 1
      src/main/java/com/goafanti/user/service/UserService.java
  51. 2 2
      src/main/java/com/goafanti/user/service/impl/UserServiceImpl.java
  52. 1 1
      src/main/resources/props/error.properties
  53. 32 32
      src/main/resources/shiro_base_auth.ini
  54. 0 1
      src/main/resources/spring-context-4.0.xsd
  55. 163 163
      src/main/resources/spring/spring-shiro.xml
  56. 5 0
      src/main/webapp/WEB-INF/views/portal/technologyTrading/assessMent.html

+ 2 - 2
GeneratorConfig.xml

@@ -1,13 +1,13 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE generatorConfiguration PUBLIC "-//mybatis.org//DTD MyBatis Generator Configuration 1.0//EN" "http://mybatis.org/dtd/mybatis-generator-config_1_0.dtd">
 <generatorConfiguration>
-  <classPathEntry location="E:/mysql-connector-java-5.1.40.jar" />
+  <classPathEntry location="C:\Users\Administrator\.dbeaver-drivers\maven\maven-central\mysql\mysql-connector-java-5.1.44.jar" />
   <context id="context1">	
     <jdbcConnection connectionURL="jdbc:mysql://192.168.1.213:3306/aft" 
     	driverClass="com.mysql.jdbc.Driver" password="123456" userId="dev" />
     <javaModelGenerator targetPackage="com.goafanti.common.model" targetProject="AFT" />
     <sqlMapGenerator targetPackage="com.goafanti.common.mapper" targetProject="AFT" />
     <javaClientGenerator targetPackage="com.goafanti.common.dao" targetProject="AFT" type="XMLMAPPER" />
-    <table schema="aft" tableName="user_identity"/>
+    <table schema="aft" tableName="business_project"/>
   </context>
 </generatorConfiguration>

+ 37 - 1
src/main/java/com/goafanti/admin/bo/AdminListBo.java

@@ -39,6 +39,12 @@ public class AdminListBo {
 	 * 所在省份
 	 */
 	private String	province;
+	
+	/**
+	 * 所在市 
+	 */
+	private String city;
+	
 	/**
 	 * 职位
 	 */
@@ -53,7 +59,13 @@ public class AdminListBo {
 	 * 上级管理用户ID
 	 */
 	private String	superiorId;
-
+	
+	/** 部门ID **/
+	private String departmentId;
+	
+	/** 部门名称 **/
+	private String departmentName;
+	
 	public String getSuperiorId() {
 		return superiorId;
 	}
@@ -118,6 +130,14 @@ public class AdminListBo {
 		this.province = province;
 	}
 
+	public String getCity() {
+		return city;
+	}
+
+	public void setCity(String city) {
+		this.city = city;
+	}
+
 	public String getPosition() {
 		return position;
 	}
@@ -133,6 +153,22 @@ public class AdminListBo {
 	public void setSuperior(String superior) {
 		this.superior = superior;
 	}
+	
+	public String getDepartmentId() {
+		return departmentId;
+	}
+
+	public void setDepartmentId(String departmentId) {
+		this.departmentId = departmentId;
+	}
+
+	public String getDepartmentName() {
+		return departmentName;
+	}
+
+	public void setDepartmentName(String departmentName) {
+		this.departmentName = departmentName;
+	}
 
 	// 创建时间
 	public String getCreateTimeFormattedDate() {

+ 600 - 0
src/main/java/com/goafanti/admin/bo/BusinessProjectBo.java

@@ -0,0 +1,600 @@
+package com.goafanti.admin.bo;
+
+
+import java.math.BigDecimal;
+import java.util.Date;
+
+import org.apache.commons.lang3.time.DateFormatUtils;
+
+import com.goafanti.common.constant.AFTConstants;
+
+public class BusinessProjectBo {
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column business_project.id
+	 * @mbg.generated  Mon Dec 04 15:29:25 CST 2017
+	 */
+	private String id;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column business_project.create_id
+	 * @mbg.generated  Mon Dec 04 15:29:25 CST 2017
+	 */
+	private String createId;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column business_project.create_time
+	 * @mbg.generated  Mon Dec 04 15:29:25 CST 2017
+	 */
+	private Date createTime;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column business_project.update_time
+	 * @mbg.generated  Mon Dec 04 15:29:25 CST 2017
+	 */
+	private Date updateTime;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column business_project.delete_sign
+	 * @mbg.generated  Mon Dec 04 15:29:25 CST 2017
+	 */
+	private Integer deleteSign;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column business_project.bname
+	 * @mbg.generated  Mon Dec 04 15:29:25 CST 2017
+	 */
+	private String bname;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column business_project.cid
+	 * @mbg.generated  Mon Dec 04 15:29:25 CST 2017
+	 */
+	private String cid;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column business_project.price
+	 * @mbg.generated  Mon Dec 04 15:29:25 CST 2017
+	 */
+	private BigDecimal price;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column business_project.offset
+	 * @mbg.generated  Mon Dec 04 15:29:25 CST 2017
+	 */
+	private BigDecimal offset;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column business_project.activity_price
+	 * @mbg.generated  Mon Dec 04 15:29:25 CST 2017
+	 */
+	private BigDecimal activityPrice;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column business_project.activity_flag
+	 * @mbg.generated  Mon Dec 04 15:29:25 CST 2017
+	 */
+	private String activityFlag;
+	
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column business_project.member_price
+	 * @mbg.generated  Mon Dec 04 15:29:25 CST 2017
+	 */
+	private BigDecimal memberPrice;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column business_project.introduce
+	 * @mbg.generated  Mon Dec 04 15:29:25 CST 2017
+	 */
+	private String introduce;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column business_project.status
+	 * @mbg.generated  Mon Dec 04 15:29:25 CST 2017
+	 */
+	private String status;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column business_project.country
+	 * @mbg.generated  Mon Dec 04 15:29:25 CST 2017
+	 */
+	private String country;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column business_project.province
+	 * @mbg.generated  Mon Dec 04 15:29:25 CST 2017
+	 */
+	private String province;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column business_project.city
+	 * @mbg.generated  Mon Dec 04 15:29:25 CST 2017
+	 */
+	private String city;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column business_project.district
+	 * @mbg.generated  Mon Dec 04 15:29:25 CST 2017
+	 */
+	private String district;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column business_project.principal_id
+	 * @mbg.generated  Mon Dec 04 15:29:25 CST 2017
+	 */
+	private String principalId;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column business_project.Value_effect
+	 * @mbg.generated  Mon Dec 04 15:29:25 CST 2017
+	 */
+	private String valueEffect;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column business_project.client_size
+	 * @mbg.generated  Mon Dec 04 15:29:25 CST 2017
+	 */
+	private String clientSize;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column business_project.max_logo
+	 * @mbg.generated  Tue Dec 12 11:46:55 CST 2017
+	 */
+	private String maxLogo;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column business_project.min_logo
+	 * @mbg.generated  Tue Dec 12 11:46:55 CST 2017
+	 */
+	private String minLogo;
+	
+	/**
+	 * 分类名称
+	 */
+	private String cname;
+	/**
+	 * 创建人名称
+	 */
+	private String createName;
+	
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column business_project.max_logo
+	 * @return  the value of business_project.max_logo
+	 * @mbg.generated  Tue Dec 12 11:46:55 CST 2017
+	 */
+	public String getMaxLogo() {
+		return maxLogo;
+	}
+
+
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column business_project.max_logo
+	 * @param maxLogo  the value for business_project.max_logo
+	 * @mbg.generated  Tue Dec 12 11:46:55 CST 2017
+	 */
+	public void setMaxLogo(String maxLogo) {
+		this.maxLogo = maxLogo;
+	}
+
+
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column business_project.min_logo
+	 * @return  the value of business_project.min_logo
+	 * @mbg.generated  Tue Dec 12 11:46:55 CST 2017
+	 */
+	public String getMinLogo() {
+		return minLogo;
+	}
+
+
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column business_project.min_logo
+	 * @param minLogo  the value for business_project.min_logo
+	 * @mbg.generated  Tue Dec 12 11:46:55 CST 2017
+	 */
+	
+	public void setMinLogo(String minLogo) {
+		this.minLogo = minLogo;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column business_project.id
+	 * @return  the value of business_project.id
+	 * @mbg.generated  Mon Dec 04 15:29:25 CST 2017
+	 */
+	public String getId() {
+		return id;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column business_project.id
+	 * @param id  the value for business_project.id
+	 * @mbg.generated  Mon Dec 04 15:29:25 CST 2017
+	 */
+	public void setId(String id) {
+		this.id = id;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column business_project.create_id
+	 * @return  the value of business_project.create_id
+	 * @mbg.generated  Mon Dec 04 15:29:25 CST 2017
+	 */
+	public String getCreateId() {
+		return createId;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column business_project.create_id
+	 * @param createId  the value for business_project.create_id
+	 * @mbg.generated  Mon Dec 04 15:29:25 CST 2017
+	 */
+	public void setCreateId(String createId) {
+		this.createId = createId;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column business_project.create_time
+	 * @return  the value of business_project.create_time
+	 * @mbg.generated  Mon Dec 04 15:29:25 CST 2017
+	 */
+	public Date getCreateTime() {
+		return createTime;
+	}
+	public String getCreateTimeFormattedDate() {
+		if (this.createTime == null) {
+			return null;
+		} else {
+			return DateFormatUtils.format(this.getCreateTime(), AFTConstants.YYYYMMDDHHMMSS);
+		}
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column business_project.create_time
+	 * @param createTime  the value for business_project.create_time
+	 * @mbg.generated  Mon Dec 04 15:29:25 CST 2017
+	 */
+	public void setCreateTime(Date createTime) {
+		this.createTime = createTime;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column business_project.update_time
+	 * @return  the value of business_project.update_time
+	 * @mbg.generated  Mon Dec 04 15:29:25 CST 2017
+	 */
+	public Date getUpdateTime() {
+		return updateTime;
+	}
+	public String getUpdateTimeFormattedDate() {
+		if (this.updateTime == null) {
+			return null;
+		} else {
+			return DateFormatUtils.format(this.getUpdateTime(), AFTConstants.YYYYMMDDHHMMSS);
+		}
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column business_project.update_time
+	 * @param updateTime  the value for business_project.update_time
+	 * @mbg.generated  Mon Dec 04 15:29:25 CST 2017
+	 */
+	public void setUpdateTime(Date updateTime) {
+		this.updateTime = updateTime;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column business_project.delete_sign
+	 * @return  the value of business_project.delete_sign
+	 * @mbg.generated  Mon Dec 04 15:29:25 CST 2017
+	 */
+	public Integer getDeleteSign() {
+		return deleteSign;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column business_project.delete_sign
+	 * @param deleteSign  the value for business_project.delete_sign
+	 * @mbg.generated  Mon Dec 04 15:29:25 CST 2017
+	 */
+	public void setDeleteSign(Integer deleteSign) {
+		this.deleteSign = deleteSign;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column business_project.bname
+	 * @return  the value of business_project.bname
+	 * @mbg.generated  Mon Dec 04 15:29:25 CST 2017
+	 */
+	public String getBname() {
+		return bname;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column business_project.bname
+	 * @param bname  the value for business_project.bname
+	 * @mbg.generated  Mon Dec 04 15:29:25 CST 2017
+	 */
+	public void setBname(String bname) {
+		this.bname = bname;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column business_project.cid
+	 * @return  the value of business_project.cid
+	 * @mbg.generated  Mon Dec 04 15:29:25 CST 2017
+	 */
+	public String getCid() {
+		return cid;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column business_project.cid
+	 * @param cid  the value for business_project.cid
+	 * @mbg.generated  Mon Dec 04 15:29:25 CST 2017
+	 */
+	public void setCid(String cid) {
+		this.cid = cid;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column business_project.price
+	 * @return  the value of business_project.price
+	 * @mbg.generated  Mon Dec 04 15:29:25 CST 2017
+	 */
+	public BigDecimal getPrice() {
+		return price;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column business_project.price
+	 * @param price  the value for business_project.price
+	 * @mbg.generated  Mon Dec 04 15:29:25 CST 2017
+	 */
+	public void setPrice(BigDecimal price) {
+		this.price = price;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column business_project.offset
+	 * @return  the value of business_project.offset
+	 * @mbg.generated  Mon Dec 04 15:29:25 CST 2017
+	 */
+	public BigDecimal getOffset() {
+		return offset;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column business_project.offset
+	 * @param offset  the value for business_project.offset
+	 * @mbg.generated  Mon Dec 04 15:29:25 CST 2017
+	 */
+	public void setOffset(BigDecimal offset) {
+		this.offset = offset;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column business_project.activity_price
+	 * @return  the value of business_project.activity_price
+	 * @mbg.generated  Mon Dec 04 15:29:25 CST 2017
+	 */
+	public BigDecimal getActivityPrice() {
+		return activityPrice;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column business_project.activity_price
+	 * @param activityPrice  the value for business_project.activity_price
+	 * @mbg.generated  Mon Dec 04 15:29:25 CST 2017
+	 */
+	public void setActivityPrice(BigDecimal activityPrice) {
+		this.activityPrice = activityPrice;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column business_project.activity_flag
+	 * @return  the value of business_project.activity_flag
+	 * @mbg.generated  Mon Dec 04 15:29:25 CST 2017
+	 */
+	public String getActivityFlag() {
+		return activityFlag;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column business_project.activity_flag
+	 * @param activityFlag  the value for business_project.activity_flag
+	 * @mbg.generated  Mon Dec 04 15:29:25 CST 2017
+	 */
+	public void setActivityFlag(String activityFlag) {
+		this.activityFlag = activityFlag;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column business_project.member_price
+	 * @return  the value of business_project.member_price
+	 * @mbg.generated  Mon Dec 04 15:29:25 CST 2017
+	 */
+	public BigDecimal getMemberPrice() {
+		return memberPrice;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column business_project.member_price
+	 * @param memberPrice  the value for business_project.member_price
+	 * @mbg.generated  Mon Dec 04 15:29:25 CST 2017
+	 */
+	public void setMemberPrice(BigDecimal memberPrice) {
+		this.memberPrice = memberPrice;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column business_project.introduce
+	 * @return  the value of business_project.introduce
+	 * @mbg.generated  Mon Dec 04 15:29:25 CST 2017
+	 */
+	public String getIntroduce() {
+		return introduce;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column business_project.introduce
+	 * @param introduce  the value for business_project.introduce
+	 * @mbg.generated  Mon Dec 04 15:29:25 CST 2017
+	 */
+	public void setIntroduce(String introduce) {
+		this.introduce = introduce;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column business_project.status
+	 * @return  the value of business_project.status
+	 * @mbg.generated  Mon Dec 04 15:29:25 CST 2017
+	 */
+	public String getStatus() {
+		return status;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column business_project.status
+	 * @param status  the value for business_project.status
+	 * @mbg.generated  Mon Dec 04 15:29:25 CST 2017
+	 */
+	public void setStatus(String status) {
+		this.status = status;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column business_project.country
+	 * @return  the value of business_project.country
+	 * @mbg.generated  Mon Dec 04 15:29:25 CST 2017
+	 */
+	public String getCountry() {
+		return country;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column business_project.country
+	 * @param country  the value for business_project.country
+	 * @mbg.generated  Mon Dec 04 15:29:25 CST 2017
+	 */
+	public void setCountry(String country) {
+		this.country = country;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column business_project.province
+	 * @return  the value of business_project.province
+	 * @mbg.generated  Mon Dec 04 15:29:25 CST 2017
+	 */
+	public String getProvince() {
+		return province;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column business_project.province
+	 * @param province  the value for business_project.province
+	 * @mbg.generated  Mon Dec 04 15:29:25 CST 2017
+	 */
+	public void setProvince(String province) {
+		this.province = province;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column business_project.city
+	 * @return  the value of business_project.city
+	 * @mbg.generated  Mon Dec 04 15:29:25 CST 2017
+	 */
+	public String getCity() {
+		return city;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column business_project.city
+	 * @param city  the value for business_project.city
+	 * @mbg.generated  Mon Dec 04 15:29:25 CST 2017
+	 */
+	public void setCity(String city) {
+		this.city = city;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column business_project.district
+	 * @return  the value of business_project.district
+	 * @mbg.generated  Mon Dec 04 15:29:25 CST 2017
+	 */
+	public String getDistrict() {
+		return district;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column business_project.district
+	 * @param district  the value for business_project.district
+	 * @mbg.generated  Mon Dec 04 15:29:25 CST 2017
+	 */
+	public void setDistrict(String district) {
+		this.district = district;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column business_project.principal_id
+	 * @return  the value of business_project.principal_id
+	 * @mbg.generated  Mon Dec 04 15:29:25 CST 2017
+	 */
+	public String getPrincipalId() {
+		return principalId;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column business_project.principal_id
+	 * @param principalId  the value for business_project.principal_id
+	 * @mbg.generated  Mon Dec 04 15:29:25 CST 2017
+	 */
+	public void setPrincipalId(String principalId) {
+		this.principalId = principalId;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column business_project.Value_effect
+	 * @return  the value of business_project.Value_effect
+	 * @mbg.generated  Mon Dec 04 15:29:25 CST 2017
+	 */
+	public String getValueEffect() {
+		return valueEffect;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column business_project.Value_effect
+	 * @param valueEffect  the value for business_project.Value_effect
+	 * @mbg.generated  Mon Dec 04 15:29:25 CST 2017
+	 */
+	public void setValueEffect(String valueEffect) {
+		this.valueEffect = valueEffect;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column business_project.client_size
+	 * @return  the value of business_project.client_size
+	 * @mbg.generated  Mon Dec 04 15:29:25 CST 2017
+	 */
+	public String getClientSize() {
+		return clientSize;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column business_project.client_size
+	 * @param clientSize  the value for business_project.client_size
+	 * @mbg.generated  Mon Dec 04 15:29:25 CST 2017
+	 */
+	public void setClientSize(String clientSize) {
+		this.clientSize = clientSize;
+	}
+
+	public String getCname() {
+		return cname;
+	}
+
+	public void setCname(String cname) {
+		this.cname = cname;
+	}
+
+	public String getCreateName() {
+		return createName;
+	}
+
+	public void setCreateName(String createName) {
+		this.createName = createName;
+	}
+
+	@Override
+	public String toString() {
+		return "BusinessProjectBo [id=" + id + ", createId=" + createId + ", createTime=" + createTime + ", updateTime="
+				+ updateTime + ", deleteSign=" + deleteSign + ", bname=" + bname + ", cid=" + cid + ", price=" + price
+				+ ", offset=" + offset + ", activityPrice=" + activityPrice + ", activityFlag=" + activityFlag
+				+ ", memberPrice=" + memberPrice + ", introduce=" + introduce + ", status=" + status + ", country="
+				+ country + ", province=" + province + ", city=" + city + ", district=" + district + ", principalId="
+				+ principalId + ", valueEffect=" + valueEffect + ", clientSize=" + clientSize + ", cname=" + cname
+				+ ", createName=" + createName + "]";
+	}
+	
+}

+ 31 - 0
src/main/java/com/goafanti/admin/bo/ProjectSizeBo.java

@@ -1,8 +1,13 @@
 package com.goafanti.admin.bo;
 
+
 import java.math.BigDecimal;
 import java.util.Date;
 
+import org.apache.commons.lang3.time.DateFormatUtils;
+
+import com.goafanti.common.constant.AFTConstants;
+
 public class ProjectSizeBo {
 
 	    /**
@@ -112,6 +117,10 @@ public class ProjectSizeBo {
 	     * @mbg.generated Mon Dec 04 09:52:04 CST 2017
 	     */
 	    private Integer status;
+	    /**
+	     * 项目名称
+	     */
+	    private String bname;
 
 	    /**
 	     * This method was generated by MyBatis Generator.
@@ -172,6 +181,13 @@ public class ProjectSizeBo {
 	    public Date getCreateTime() {
 	        return createTime;
 	    }
+	    public String getCreateTimeFormattedDate() {
+			if (this.createTime == null) {
+				return null;
+			} else {
+				return DateFormatUtils.format(this.getCreateTime(), AFTConstants.YYYYMMDDHHMMSS);
+			}
+		}
 
 	    /**
 	     * This method was generated by MyBatis Generator.
@@ -196,6 +212,13 @@ public class ProjectSizeBo {
 	    public Date getUpdateTime() {
 	        return updateTime;
 	    }
+	    public String getUpdateTimeFormattedDate() {
+			if (this.updateTime == null) {
+				return null;
+			} else {
+				return DateFormatUtils.format(this.getCreateTime(), AFTConstants.YYYYMMDDHHMMSS);
+			}
+		}
 
 	    /**
 	     * This method was generated by MyBatis Generator.
@@ -400,5 +423,13 @@ public class ProjectSizeBo {
 	    public void setStatus(Integer status) {
 	        this.status = status;
 	    }
+
+		public String getBname() {
+			return bname;
+		}
+
+		public void setBname(String bname) {
+			this.bname = bname;
+		}
 	}
 

+ 1 - 1
src/main/java/com/goafanti/admin/controller/AdminApiController.java

@@ -456,7 +456,7 @@ public class AdminApiController extends CertifyApiController {
 		u.setPassword(passwordUtil.getEncryptPwd(u));
 		u.setLvl(UserLevel.GENERAL.getCode());
 		u.setAid(TokenManager.getAdminId());
-		userService.insertRegister(u, "", inputUser.getUnitName(), inputUser.getUsername());
+		userService.insertRegister(u,inputUser.getUnitName(), inputUser.getUsername());
 		return res;
 	}
 

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

@@ -156,13 +156,6 @@ public class AdminSuperviseApiController extends CertifyApiController {
 			Admin ad = new Admin();
 			BeanUtils.copyProperties(admin, ad);
 			ad.setId(UUID.randomUUID().toString());
-			res = disposeAdminLocationList(res, jo, ad);
-			if (!res.getError().isEmpty()) {
-				return res;
-			}
-
-			List<AdminLocation> adminLocationList = (List<AdminLocation>) res.getData();
-
 			Calendar now = Calendar.getInstance();
 			now.set(Calendar.MILLISECOND, 0);
 
@@ -171,7 +164,7 @@ public class AdminSuperviseApiController extends CertifyApiController {
 				ad.setPassword(AFTConstants.INITIALPASSWORD);
 			}
 			ad.setPassword(passwordUtil.getEncryptPwd(ad));
-			res.setData(adminService.insertNewAdmin(ad, adminLocationList));
+			res.setData(adminService.insertNewAdmin(ad));
 		}
 
 		return res;
@@ -180,7 +173,6 @@ public class AdminSuperviseApiController extends CertifyApiController {
 	/**
 	 * 修改管理员信息
 	 */
-	@SuppressWarnings("unchecked")
 	@RequestMapping(value = "/updateAdmin", method = RequestMethod.POST)
 	public Result updateAdmin(@RequestParam(value = "roles[]", required = false) String[] roleIds, String data) {
 		Result res = new Result();
@@ -221,14 +213,14 @@ public class AdminSuperviseApiController extends CertifyApiController {
 			if (!res.getError().isEmpty()) {
 				return res;
 			}
-			List<AdminLocation> adminLocationList = (List<AdminLocation>) res.getData();
+		
 			List<String> roles = new ArrayList<String>();
 			if (roleIds != null && roleIds.length > 0) {
 				for (String role : roleIds) {
 					roles.add(role);
 				}
 			}
-			res.setData(adminService.updateByPrimaryKeySelective(ad, roles, adminLocationList));
+			res.setData(adminService.updateByPrimaryKeySelective(ad, roles));
 		}
 		return res;
 	}

+ 5 - 4
src/main/java/com/goafanti/admin/controller/AdminVarietiesApiController.java

@@ -5,7 +5,6 @@ import javax.annotation.Resource;
 
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RequestMethod;
-import org.springframework.web.bind.annotation.RequestParam;
 import org.springframework.web.bind.annotation.RestController;
 
 
@@ -13,11 +12,9 @@ import com.goafanti.admin.service.AdminVarietiesService;
 import com.goafanti.common.bo.Result;
 import com.goafanti.common.constant.ErrorConstants;
 import com.goafanti.common.controller.BaseController;
-import com.goafanti.common.model.Admin;
-import com.goafanti.common.model.BusinessVarieties;
 import com.goafanti.common.utils.StringUtils;
 @RestController
-@RequestMapping("open/api/admin/Varieties")
+@RequestMapping("api/admin/Varieties")
 public class AdminVarietiesApiController extends BaseController{
 	@Resource
 	private AdminVarietiesService adminVarietiesService;
@@ -40,6 +37,10 @@ public class AdminVarietiesApiController extends BaseController{
 			res.getError().add(buildError(ErrorConstants.PARAM_BEING_ERROR, "品类名称已存在", "品类名称"));
 			return res;
 		}
+		if (2<adminVarietiesService.getLayer(superId)) {
+			res.getError().add(buildError( "品类层级不能大于3", "品类层级不能大于3")); 
+			return res;
+		}
 		
 		res.setData(adminVarietiesService.insert(cname,superId));
 		

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

@@ -1,22 +1,35 @@
 package com.goafanti.admin.controller;
 
 
+import javax.annotation.Resource;
+import javax.servlet.http.HttpServletRequest;
+
+
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RequestMethod;
 import org.springframework.web.bind.annotation.RestController;
 
+
 import com.goafanti.admin.service.BusinessProjectService;
 import com.goafanti.common.bo.Result;
+import com.goafanti.common.constant.AFTConstants;
 import com.goafanti.common.constant.ErrorConstants;
-import com.goafanti.common.controller.BaseController;
+
+import com.goafanti.common.controller.CertifyApiController;
+import com.goafanti.common.enums.AttachmentType;
+import com.goafanti.common.model.BusinessProject;
+import com.goafanti.common.model.ProjectSize;
 import com.goafanti.common.utils.StringUtils;
 
 @RestController
-@RequestMapping("open/api/admin/ProjectSize")
-public class BusinessProjectController extends BaseController{
+@RequestMapping("api/admin/ProjectSize")
+public class BusinessProjectController extends CertifyApiController{
 	
+	@Resource
 	BusinessProjectService businessprojectService;
 	
+	
+	
 	/**
 	 * 新增项目
 	 */
@@ -27,12 +40,191 @@ public class BusinessProjectController extends BaseController{
 			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "项目名称名称为空", "项目名称"));
 			return res;
 		}
+		
 		if (StringUtils.isBlank(cid)) {
 			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "所属品类为空", "所属品类"));
 			return res;
 		}
+		if (businessprojectService.getBnamecount(bname)>0) {
+			res.getError().add(buildError(ErrorConstants.PARAM_BEING_ERROR, "项目名称已存在", "项目名称"));
+			return res;
+		}
+		if(Integer.valueOf(country)==0){
+			if (StringUtils.isBlank(province)) {
+				res.getError().add(buildError( "至少指定省", "至少指定省"));
+				return res;
+			}
+		}
 		res.setData(businessprojectService.insert(bname, cid, country,province,city,district));
+		return res; 
+	}
+	
+	/**
+	 * 项目搜索
+	 */
+	@RequestMapping(value = "/listProject" , method = RequestMethod.POST)
+	public Result listProject(String bname,String cid,String country,String province,String city,String district,String activityFlag,String status,Integer pageNo, Integer pageSize ){
+		Result res=new Result();
+		if (country==AFTConstants.USER_TYPE_PERSONAL) {
+			if (StringUtils.isBlank(province)) {
+				res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "所属省份为空", "所属省份"));
+				return res;
+			}
+		}
+		
+		 res.setData(businessprojectService.listProject( bname, cid, country,province, city, district ,activityFlag, status, pageNo,pageSize ));
 		return res;
 	}
+	/**
+	 * 图片上传
+	 */
+	@RequestMapping(value = "/uploadPicture", method = RequestMethod.POST)
+	public Result uploadPicture(HttpServletRequest req, String sign) {
+		Result res = new Result();
+		AttachmentType attachmentType = AttachmentType.getField(sign);
 
+		if (attachmentType == AttachmentType.BUSINESS_PROJECT_MAX_PICTURE
+				|| attachmentType == AttachmentType.BUSINESS_PROJECT_MIN_PICTURE
+				) {
+			res.setData(handleFiles(res, "/Project/", false, req, sign, "project"));
+		} else {
+			res.getError().add(buildError(ErrorConstants.PARAM_ERROR, "", "附件"));
+		}
+		return res;
+	}
+	/**
+	 * 获取项目详情
+	 */
+	@RequestMapping(value = "/orgProject", method = RequestMethod.GET)
+	public Result orgProject(String id){
+		Result res=new Result();
+		res.setData(businessprojectService.orgProject(id));
+		return res;
+	}
+	/**
+	 * 删除项目
+	 */
+	@RequestMapping(value = "/deleteProject", method = RequestMethod.GET)
+	public Result deleteProject(String id){
+		Result res=new Result();
+		res.setData(businessprojectService.deleteProject(id));
+		return res;
+	}
+	
+	/**
+	 * 停用项目
+	 */
+	@RequestMapping(value = "/stopProject", method = RequestMethod.GET)
+	public Result stopProject(String id){
+		Result res=new Result();
+		res.setData(businessprojectService.updateStopProject(id));
+		return res;
+	}
+	/**
+	 * 获取业务品类全路径()
+	 */
+	@RequestMapping(value = "/getAllCname", method = RequestMethod.GET)
+	public Result getAllCname(Integer flag){
+		Result res=new Result();
+		res.setData(businessprojectService.getAllCnames(flag));
+		return res;
+	}
+	
+	/**
+	 * 编辑基本保存
+	 */
+	@RequestMapping(value = "/updateProject", method = RequestMethod.POST)
+	public Result updateProject(BusinessProject s){
+		Result res=new Result();
+		if (StringUtils.isBlank(s.getBname())) {
+			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "项目名称名称为空", "项目名称"));
+			return res;
+		}
+		
+		if (StringUtils.isBlank(s.getCid())) {
+			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "所属品类为空", "所属品类"));
+			return res;
+		}
+		if (businessprojectService.judgeBeing(s)) {
+			res.getError().add(buildError(ErrorConstants.PARAM_BEING_ERROR, "项目名称已存在", "项目名称"));
+			return res;
+		}
+		if(Integer.valueOf(s.getCountry())==0){
+			if (StringUtils.isBlank(s.getProvince())) {
+				res.getError().add(buildError( "至少指定省", "至少指定省"));
+				return res;
+			}
+		}
+		res.setData(businessprojectService.updateProject(s));
+		return res;
+	}
+	/**
+	 * 新建规格
+	 */
+	@RequestMapping(value = "/addProjectSize", method = RequestMethod.POST)
+	public Result addProjectSize(ProjectSize ps){
+		Result res=new Result();
+		if (businessprojectService.WhetherRepeat(ps)) {
+				res.getError().add(buildError(ErrorConstants.PARAM_BEING_ERROR, "规格名称已存在", "规格名称"));
+				return res;
+			}
+		if (businessprojectService.judgeStatus(ps)) {
+			res.getError().add(buildError( "项目已停用", "项目已停用"));
+			return res;
+		}
+		
+		res.setData(businessprojectService.addProjectSize(ps));
+		return res;
+	}
+	
+	/**
+	 * 编辑保存规格
+	 */
+	@RequestMapping(value = "/orgProjectSize", method = RequestMethod.POST)
+	public Result orgProjectSize(ProjectSize ps){
+		Result res=new Result();
+		res.setData(businessprojectService.updateOrgProjectSize(ps));
+		return res;
+	}
+	/**
+	 * 规格列表
+	 */
+	@RequestMapping(value = "/listProjectSize", method = RequestMethod.GET)
+	public Result listProjectSize(String pid,Integer pNo,Integer Psize){
+		Result res=new Result();
+		if (StringUtils.isBlank(pid)) {
+			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "项目名称名称为空", "项目"));
+			return res;
+		}
+		res.setData(businessprojectService.listProjectSize(pid,pNo, Psize));
+		return res;
+	}
+	
+	/**
+	 * 获取规格详情
+	 */
+	@RequestMapping(value = "/getProjectSize", method = RequestMethod.GET)
+	public Result getProjectSize(String  id){
+		Result res=new Result();
+		res.setData(businessprojectService.getProjectSize(id));
+		return res;
+	}
+	/**
+	 * 删除规格
+	 */
+	@RequestMapping(value = "/deleteProjectSize", method = RequestMethod.GET)
+	public Result deleteProjectSize(String  id){
+		Result res=new Result();
+		res.setData(businessprojectService.deleteProjectSize(id));
+		return res;
+	}
+	/**
+	 * 停用规格
+	 */
+	@RequestMapping(value = "/stopProjectSize", method = RequestMethod.GET)
+	public Result stopProjectSize(String  id){
+		Result res=new Result();
+		res.setData(businessprojectService.updateSotpProjectSize(id));
+		return res;
+	}
 }

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

@@ -22,7 +22,7 @@ public interface AdminService {
 
 	int insert(Admin ad);
 
-	int updateByPrimaryKeySelective(Admin ad, List<String> roleIds, List<AdminLocation> adminLocationList);
+	int updateByPrimaryKeySelective(Admin ad, List<String> roleIds);
 
 	int updateByPrimaryKey(Admin a);
 
@@ -58,7 +58,7 @@ public interface AdminService {
 
 	Map<String, String> selectTechBroder();
 
-	int insertNewAdmin(Admin ad, List<AdminLocation> adminLocationList);
+	int insertNewAdmin(Admin ad);
 
 	Map<String, String> listAdminSelect();
 

+ 1 - 0
src/main/java/com/goafanti/admin/service/AdminVarietiesService.java

@@ -26,4 +26,5 @@ public interface AdminVarietiesService {
 	int isBeing(String cname);
 	
 	int getCountSon(String id);
+	int getLayer(String superId);
 }

+ 45 - 0
src/main/java/com/goafanti/admin/service/BusinessProjectService.java

@@ -1,5 +1,50 @@
 package com.goafanti.admin.service;
 
+
+
+import java.util.List;
+import java.util.Map;
+
+import com.goafanti.admin.bo.BusinessProjectBo;
+import com.goafanti.admin.bo.ProjectSizeBo;
+import com.goafanti.common.model.BusinessProject;
+import com.goafanti.common.model.ProjectSize;
+import com.goafanti.core.mybatis.page.Pagination;
+
 public interface BusinessProjectService {
 	int insert(String bname,String cid,String country,String province,String city,String district);
+	
+	Pagination<BusinessProjectBo> listProject(String bname,String cid,String country,String province,String city,String district,String activityFlag,
+										String status,Integer pageNo, Integer pageSize );
+	int getBnamecount(String bname);
+	
+	int deleteProject(String id);
+	
+	int updateStopProject(String id);
+	
+	
+	BusinessProjectBo orgProject(String id);
+	
+	List<Map<String, String>> getAllCnames(Integer flag);
+	
+	
+	int updateProject(BusinessProject s);
+	
+	int addProjectSize(ProjectSize ps);
+	
+	int updateOrgProjectSize(ProjectSize ps);
+	
+	Pagination<ProjectSizeBo> listProjectSize(String pid,Integer pNo,Integer pSize);
+
+	ProjectSizeBo getProjectSize(String id);
+
+	int  deleteProjectSize(String id);
+
+	int updateSotpProjectSize(String id);
+
+	boolean WhetherRepeat(ProjectSize ps);
+	
+	boolean judgeStatus(ProjectSize ps);
+	
+	boolean judgeBeing(BusinessProject s);
 }

+ 4 - 34
src/main/java/com/goafanti/admin/service/impl/AdminServiceImpl.java

@@ -1,6 +1,5 @@
 package com.goafanti.admin.service.impl;
 
-import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
@@ -73,32 +72,10 @@ public class AdminServiceImpl extends BaseMybatisDao<AdminMapper> implements Adm
 			pageSize = 10;
 		}
 		if (province != null) {
-			List<Integer> provinceList = new ArrayList<>();
-			provinceList.add(province);
-			params.put("provinceList", provinceList);
+			params.put("province", province);
 		}
-		if (TokenManager.hasRole(AFTConstants.SUPERADMIN)) {
-			return (Pagination<AdminListBo>) findPage("findAreaAdminListByPage", "findAreaAdminCount", params, pageNo,
-					pageSize);
-		} else if (TokenManager.hasRole(AFTConstants.AREAADMIN)) {
-			List<Integer> provinceList = adminLocationMapper
-					.selectProvinceWhereCityIsNullByAdminId(TokenManager.getAdminId());
-			if (province != null && provinceList.contains(province)) {
-				provinceList = new ArrayList<>();
-				provinceList.add(province);
-			}
-			List<Integer> cityList = adminLocationMapper.selectCityByAdminId(TokenManager.getAdminId());
-			provinceList.addAll(cityList);
-			if (null != provinceList && provinceList.size() > 0) {
-				params.put("provinceList", provinceList);
-			}
-			if (null != cityList && cityList.size() > 0) {
-				params.put("cityList", cityList);
-			}
-			return (Pagination<AdminListBo>) findPage("findAreaAdminListByPage", "findAreaAdminCount", params, pageNo,
+		return (Pagination<AdminListBo>) findPage("findAdminListByPage", "findAdminCount", params, pageNo,
 					pageSize);
-		}
-		return null;
 	}
 
 	@Override
@@ -107,7 +84,7 @@ public class AdminServiceImpl extends BaseMybatisDao<AdminMapper> implements Adm
 	}
 
 	@Override
-	public int updateByPrimaryKeySelective(Admin ad, List<String> roleIds, List<AdminLocation> adminLocationList) {
+	public int updateByPrimaryKeySelective(Admin ad, List<String> roleIds) {
 		Map<String, Object> params = new HashMap<>();
 		params.put("uid", ad.getId());
 		params.put("roles", roleIds);
@@ -119,10 +96,6 @@ public class AdminServiceImpl extends BaseMybatisDao<AdminMapper> implements Adm
 			}
 			TokenManager.clearUserAuthByUserId(ad.getId());
 		}
-		adminLocationMapper.deleteByAdminId(ad.getId());
-		if (null != adminLocationList && adminLocationList.size() > 0) {
-			adminLocationMapper.insertBatch(adminLocationList);
-		}
 		return adminMapper.updateByPrimaryKeySelective(ad);
 	}
 
@@ -220,10 +193,7 @@ public class AdminServiceImpl extends BaseMybatisDao<AdminMapper> implements Adm
 	}
 
 	@Override
-	public int insertNewAdmin(Admin ad, List<AdminLocation> adminLocationList) {
-		if (null != adminLocationList && adminLocationList.size() > 0) {
-			adminLocationMapper.insertBatch(adminLocationList);
-		}
+	public int insertNewAdmin(Admin ad) {
 		return adminMapper.insert(ad);
 	}
 

+ 11 - 15
src/main/java/com/goafanti/admin/service/impl/AdminVarietiesServiceImpl.java

@@ -12,7 +12,6 @@ import org.springframework.stereotype.Service;
 
 import com.goafanti.admin.bo.BusinessVarietiesBo;
 import com.goafanti.admin.service.AdminVarietiesService;
-import com.goafanti.common.dao.AdminVarietiesMapper;
 import com.goafanti.common.dao.BusinessVarietiesMapper;
 import com.goafanti.common.model.BusinessVarieties;
 import com.goafanti.common.utils.StringUtils;
@@ -35,25 +34,18 @@ public class AdminVarietiesServiceImpl extends BaseMybatisDao<BusinessVarietiesM
 		buv.setDeleteSign(0);
 		String str=businessVarietiesMapper.getCid(superId);
 		int i=Integer.valueOf(businessVarietiesMapper.getCount(superId));
-		if (3>=str.length()) {
-			 if(Integer.valueOf(i)<10){
-				buv.setCid("BZ0"+i);
-			}else {
-				buv.setCid("BZ"+i);
-			}
-		}else {
-			int w=i+1;
-			if(Integer.valueOf(i)<10){
+		int w=i+1;
+			if(w<10){
 				buv.setCid(str+"0"+w);
 			}else {
 				buv.setCid(str+w);
-			}
+			
 		}
 		
 		//判断是否数据库这个ID已经存在
 		String n=businessVarietiesMapper.ThanCid(buv.getCid());
 		while(StringUtils.isNotBlank(n)) {
-			String s1=buv.getCid().substring(0, buv.getCid().length()-3);
+			String s1=buv.getCid().substring(0, buv.getCid().length()-2);
 			String s2=buv.getCid().substring(buv.getCid().length()-2, buv.getCid().length());
 			int i1=Integer.valueOf(s2)+1;
 			if(i1<10){
@@ -65,7 +57,8 @@ public class AdminVarietiesServiceImpl extends BaseMybatisDao<BusinessVarietiesM
 		}
 		System.out.println("cid:"+buv.getCid());
 		buv.setLayer(buv.getCid().length()/2-1);
-		buv.setCreateId("f31c0d1a-05bc-4f5c-b4a8-95f983d24131");//测试
+		
+		//buv.setCreateId("f31c0d1a-05bc-4f5c-b4a8-95f983d24131");
 		if (StringUtils.isNotBlank(TokenManager.getAdminId())) {
 			buv.setCreateId(TokenManager.getAdminId());
 		}
@@ -88,8 +81,7 @@ public class AdminVarietiesServiceImpl extends BaseMybatisDao<BusinessVarietiesM
 			pSize = 10;
 		} 
 		
-		Pagination<?> a = findPage("findVarietiesListByPage", "findVarietiesListCount",
-				disposeParams(cname,superId,layer,status),pNo,pSize);
+		
 		return (Pagination<BusinessVarieties>)findPage("findVarietiesListByPage", "findVarietiesListCount",
 				disposeParams(cname,superId,layer,status),pNo,pSize);
 	}
@@ -222,6 +214,10 @@ public class AdminVarietiesServiceImpl extends BaseMybatisDao<BusinessVarietiesM
 		
 		return Integer.valueOf(businessVarietiesMapper.getCount(id));
 	}
+	@Override
+	public int getLayer(String superId) {
+		return businessVarietiesMapper.getLayer(superId);
+	}
 	
 	
 }

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

@@ -1,33 +1,375 @@
 package com.goafanti.admin.service.impl;
 
+
+import java.util.ArrayList;
 import java.util.Date;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
 import java.util.UUID;
 
+import org.springframework.beans.BeanUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import com.goafanti.admin.bo.BusinessProjectBo;
+import com.goafanti.admin.bo.ProjectSizeBo;
 import com.goafanti.admin.service.BusinessProjectService;
 
 import com.goafanti.common.dao.BusinessProjectMapper;
+import com.goafanti.common.dao.BusinessVarietiesMapper;
+import com.goafanti.common.dao.ProjectSizeMapper;
 import com.goafanti.common.model.BusinessProject;
-
+import com.goafanti.common.model.BusinessVarieties;
+import com.goafanti.common.model.ProjectSize;
+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;
 
-public class BusinessProjectServiceImpl implements BusinessProjectService {
+@Service
+public class BusinessProjectServiceImpl extends BaseMybatisDao<BusinessProjectMapper> implements BusinessProjectService {
+	@Autowired
 	BusinessProjectMapper businessProjectMapper;
+	@Autowired
+	BusinessVarietiesMapper businessVarietiesMapper;
+	@Autowired
+	ProjectSizeMapper projectSizeMapper;
+	
 	@Override
 	public int insert(String bname, String cid, String country, String province, String city, String district) {
 		BusinessProject bp=new BusinessProject();
 		bp.setId(UUID.randomUUID().toString());
 		bp.setBname(bname);
+		bp.setCid(cid);
 		bp.setCountry(country);
 		if (1!=Integer.valueOf(country)) {
 			bp.setProvince(province);
 			bp.setCity(city);
 			bp.setDistrict(district);
 		}
-		bp.setCreateId(TokenManager.getAdminId());
+		bp.setDeleteSign(0);
+		if (StringUtils.isNotBlank(TokenManager.getAdminId())) {
+			bp.setCreateId(TokenManager.getAdminId());
+		}
+		bp.setCreateId("f31c0d1a-05bc-4f5c-b4a8-95f983d24131");
 		bp.setCreateTime(new Date());
 		bp.setStatus("0");
 
 		return businessProjectMapper.insert(bp);
 	}
+	@SuppressWarnings("unchecked")
+	@Override
+	public Pagination<BusinessProjectBo> listProject(String bname, String cid, String country,String province,String city,String district, String activityFlag,
+			String status, Integer pNo, Integer pSize) {
+		if (pNo == null || pNo < 0) {
+			pNo = 1;
+		}
 
+		if (pSize == null || pSize < 0 || pSize > 10) {
+			pSize = 10;
+		} 	
+		Pagination<BusinessProjectBo> pt=(Pagination<BusinessProjectBo>)findPage("findProjectListByPage", "findProjectListCount",
+				disposeParams(bname,  cid,  country, province, city, district,  activityFlag,
+						 status),pNo,pSize);
+		List<BusinessProjectBo> list=(List<BusinessProjectBo>) pt.getList();
+		for (BusinessProjectBo o : list) {
+			o.setCname(getAllCname(o.getCid()));
+		}
+		return pt;
+	}
+	private Map<String, Object> disposeParams(String bname, String cid, String country,String province,String city,String district, String activityFlag,
+			String status) {
+		Map<String, Object> params = new HashMap<>();
+		if (StringUtils.isNotBlank(bname)) {
+			params.put("bname", bname);
+		}
+		if (StringUtils.isNotBlank(cid)) {
+			params.put("cid", cid);
+		}
+		if (StringUtils.isNotBlank(country)) {
+			params.put("country", country);
+		}
+		if (StringUtils.isNotBlank(province)) {
+			params.put("province", province);
+		}
+		if (StringUtils.isNotBlank(city)) {
+			params.put("city", city);
+		}
+		if (StringUtils.isNotBlank(district)) {
+			params.put("district", district);
+		}
+		if (StringUtils.isNotBlank(activityFlag)) {
+			params.put("activityFlag", activityFlag);
+		}
+		if (StringUtils.isNotBlank(status)) {
+			params.put("status", status);
+		}
+		return params;
+	}
+	@Override
+	public int getBnamecount(String bname) {
+		
+		return businessProjectMapper.getBnamecount(bname);
+	}
+	@Override
+	public int deleteProject(String id) {
+		BusinessProject bp=businessProjectMapper.selectByPrimaryKey(id);
+		if (bp.getDeleteSign()==0) {
+			bp.setDeleteSign(1);
+		}else {
+			bp.setDeleteSign(0);
+		}
+		
+		return businessProjectMapper.updateByPrimaryKey(bp);
+	}
+	@Override
+	public int updateStopProject(String id) {
+		BusinessProject bp=businessProjectMapper.selectByPrimaryKey(id);
+		if (Integer.valueOf(bp.getStatus())==0) {
+			bp.setStatus("1");
+		}else {
+			bp.setStatus("0");
+		}
+		
+		return businessProjectMapper.updateByPrimaryKey(bp);
+	}
+	@Override
+	public BusinessProjectBo orgProject(String id) {
+		BusinessProject bp=businessProjectMapper.selectByPrimaryKey(id);
+		
+		BusinessProjectBo bpo=new BusinessProjectBo();
+		BeanUtils.copyProperties(bp,bpo);
+		String cname=getAllCname(bpo.getCid());
+		String createId=bpo.getCreateId();
+		bpo.setCreateName(businessProjectMapper.getCreateName(createId));
+		bpo.setCname(cname);
+		return bpo;
+	}
+	@Override
+	public List<Map<String, String>> getAllCnames(Integer flag) {
+		List<Map<String, String>> list=new ArrayList<Map<String, String>>();
+		List<String> listcid=businessVarietiesMapper.getListId();
+		
+		for (String s : listcid) {
+			Map<String, String> map=new HashMap<>(); 
+			String cname=getAllCname(s);
+			map.put("id", s);
+			map.put("cname", cname);
+			if (flag==1) {
+				if (StringUtils.isBlank(cname)) {
+					map.put("cname", "平台超级业务品类");
+				}
+				list.add(map);
+			}else {
+				if (StringUtils.isNotBlank(cname)) {
+					list.add(map);
+				}
+			}
+			
+			
+			
+		}
+		return list;
+	}
+	/**
+	 * 递归获取上级来获取全路径
+	 * @param s	ID
+	 * @return  路径
+	 */
+	private String getAllCname(String s) {
+		String cid=businessVarietiesMapper.getThisCid(s);
+		String cname=businessVarietiesMapper.getThisCname(cid);
+		BusinessVarieties bv=businessVarietiesMapper.selectByPrimaryKey(s);
+		String sid=bv.getSuperId();
+		if (cid.length()>4) {
+			String w=getAllCname(sid)+"-"+cname;
+			 return w;
+		}else{
+			return cid.length()>3?cname:"";
+		}
+	}
+	
+	
+	
+	@Override
+	public int updateProject(BusinessProject s) {
+		BusinessProject bp=businessProjectMapper.selectByPrimaryKey(s.getId());
+		TheGinseng(s, bp);
+		return businessProjectMapper.updateByPrimaryKey(bp);
+	}
+	private void TheGinseng(BusinessProject s, BusinessProject bp) {
+		
+		if (StringUtils.isNotBlank(s.getBname())) {
+			bp.setBname(s.getBname());
+		}
+		if (StringUtils.isNotBlank(s.getCid())) {
+			bp.setCid(s.getCid());
+		}
+		if (StringUtils.isNotBlank(s.getCountry())) {
+			bp.setCountry(s.getCountry());
+		}
+		if (StringUtils.isNotBlank(s.getProvince())) {
+			bp.setProvince(s.getProvince());
+			bp.setCity(s.getCity());
+			bp.setDistrict(s.getDistrict());
+		}
+		if (StringUtils.isNotBlank(s.getCity())) {
+			bp.setCity(s.getCity());
+			bp.setDistrict(s.getDistrict());
+		}
+		if (StringUtils.isNotBlank(s.getDistrict())) {
+			bp.setDistrict(s.getDistrict());
+		}
+		if (null!=s.getPrice()) {
+			bp.setPrice(s.getPrice());
+		}
+		if (null!=(s.getOffset())) {
+			bp.setOffset(s.getOffset());
+		}
+		if (null!=(s.getActivityFlag())) {
+			bp.setActivityFlag(s.getActivityFlag());
+		}
+		if (null!=(s.getMemberPrice())) {
+			bp.setMemberPrice(s.getMemberPrice());
+		}
+		if (null!=(s.getActivityPrice())) {
+			bp.setActivityPrice(s.getActivityPrice());
+		}
+		if (StringUtils.isNotBlank(s.getIntroduce())) {
+			bp.setIntroduce(s.getIntroduce());
+		}
+		if (StringUtils.isNotBlank(s.getValueEffect())) {
+			bp.setValueEffect(s.getValueEffect());
+		}
+		if (StringUtils.isNotBlank(s.getClientSize())) {
+			bp.setClientSize(s.getClientSize());
+		}
+		
+		bp.setMinLogo(s.getMinLogo());
+		bp.setMaxLogo(s.getMaxLogo());
+		
+		if (null!=(s.getStatus())) {
+			bp.setStatus(s.getStatus());
+		}
+		bp.setUpdateTime(new Date());
+	}
+	@Override
+	public int addProjectSize(ProjectSize ps) {
+		ps.setId(UUID.randomUUID().toString());
+		if (StringUtils.isNotBlank(TokenManager.getAdminId())) {
+		ps.setCreateId(TokenManager.getAdminId());
+		}
+		//ps.setCreateId("f31c0d1a-05bc-4f5c-b4a8-95f983d24131");
+		ps.setCreateTime(new Date());
+		ps.setStatus(0);
+		return projectSizeMapper.insert(ps);
+	}
+	@Override
+	public int updateOrgProjectSize(ProjectSize ps) {
+		ProjectSize psz=projectSizeMapper.selectByPrimaryKey(ps.getId());
+		projectSizeConfiguration(ps, psz);
+		System.out.println(psz);
+		return projectSizeMapper.updateByPrimaryKeySelective(psz);
+	}
+	private void projectSizeConfiguration(ProjectSize ps, ProjectSize psz) {
+		if (StringUtils.isNotBlank(ps.getPid())) {
+			psz.setId(ps.getPid());
+		}
+		if (StringUtils.isNotBlank(ps.getPname())) {
+			psz.setPname(ps.getPname());
+		}
+		if (null!=ps.getPrice()) {
+			psz.setPrice(ps.getPrice());
+		}
+		if (null!=(ps.getOffset())) {
+			psz.setOffset(ps.getOffset());
+		}
+		if (null!=(ps.getActivityFlag())) {
+			psz.setActivityFlag(ps.getActivityFlag());
+		}
+		if (null!=(ps.getMemberPrice())) {
+			psz.setMemberPrice(ps.getMemberPrice());
+		}
+		if (null!=(ps.getActivityPrice())) {
+			psz.setActivityPrice(ps.getActivityPrice());
+		}
+		if (null!=(ps.getStatus())) {
+			psz.setStatus(ps.getStatus());
+		}
+		psz.setUpdateTime(new Date());
+	}
+	@SuppressWarnings("unchecked")
+	@Override
+	public Pagination<ProjectSizeBo>  listProjectSize(String pid,Integer pNo,Integer pSize) {
+		if (pNo == null || pNo < 0) {
+			pNo = 1;
+		}
+
+		if (pSize == null || pSize < 0 || pSize > 10) {
+			pSize = 10;
+		} 
+		Map<String, Object>map=new HashMap<>();
+		map.put("pid", pid);
+			
+		
+		Pagination<ProjectSizeBo> pt=(Pagination<ProjectSizeBo>)findPage("findProjectSizeListByPage", "findProjectSizeListCount",
+				map,pNo,pSize);
+		return pt;
+	}
+	@Override
+	public ProjectSizeBo getProjectSize(String id) {
+		return projectSizeMapper.selectByBusinessId(id);
+	}
+	@Override
+	public int deleteProjectSize(String id) {
+		
+		return projectSizeMapper.deleteByPrimaryKey(id);
+	}
+	@Override
+	public int updateSotpProjectSize(String id) {
+		ProjectSize ps=projectSizeMapper.selectByPrimaryKey(id);
+			int i=ps.getStatus();
+			if (i==0) {
+				ps.setStatus(1);
+			}else {
+				ps.setStatus(0);
+			}
+		return projectSizeMapper.updateByPrimaryKey(ps);
+	}
+	@Override
+	public boolean WhetherRepeat(ProjectSize ps) {
+		List<ProjectSizeBo> list=projectSizeMapper.getgetPnamecount(ps.getPname());
+		
+		if (list.size()>0&&!(list.get(0).getPid().equals(ps.getPid()))) {
+			System.out.println("true");
+			return true;
+		
+		}
+		
+		return false;
+	}
+	@Override
+	public boolean judgeStatus(ProjectSize ps) {
+		 BusinessProject bp=businessProjectMapper.selectByPrimaryKey(ps.getPid());
+		if (Integer.valueOf(bp.getStatus())==1) {
+			return true;
+		}else {
+			return false;
+		}
+		
+	}
+	@Override
+	public boolean judgeBeing(BusinessProject s) {
+		BusinessProject bp=businessProjectMapper.selectByPrimaryKey(s.getId());
+		BusinessProject bp1=businessProjectMapper.selectByPrimaryBname(s.getBname());
+		if (bp.getId().equals(bp1.getId())) {
+			return false;
+		}else {
+			return true;
+		}
+		
+	}
+	
+	
 }

+ 78 - 77
src/main/java/com/goafanti/app/controller/AppApiController.java

@@ -1,77 +1,78 @@
-package com.goafanti.app.controller;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import javax.annotation.Resource;
-import javax.servlet.http.HttpServletRequest;
-
-import org.apache.commons.lang3.StringUtils;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RequestMethod;
-import org.springframework.web.bind.annotation.RestController;
-
-import com.goafanti.achievement.service.AchievementService;
-import com.goafanti.activity.service.ActivityService;
-import com.goafanti.banners.enums.BannersType;
-import com.goafanti.banners.service.BannersService;
-import com.goafanti.common.bo.Result;
-import com.goafanti.common.constant.ErrorConstants;
-import com.goafanti.common.controller.BaseApiController;
-import com.goafanti.demand.service.DemandService;
-import com.goafanti.news.enums.NewsType;
-import com.goafanti.news.service.NewsService;
-
-@RestController
-@RequestMapping(path = "/api/portal/app", method = RequestMethod.GET)
-public class AppApiController extends BaseApiController {
-	@Resource
-	private BannersService		bannersService;
-	@Resource
-	private ActivityService		activityService;
-	@Resource
-	private NewsService			newsService;
-	@Resource
-	private AchievementService	achievementService;
-	@Resource
-	private DemandService		demandService;
-
-	@RequestMapping(value = "/index", method = RequestMethod.GET)
-	public Result index(HttpServletRequest request) {
-		Map<String, Object> result = new HashMap<>();
-		String domainName = request.getServerName();
-		result.put("banners", bannersService.findPortalBanners(BannersType.APP.getKey()));
-		result.put("activities", activityService.findPortalList(0, 3, null));
-		result.put("policies", newsService.findNewsList(0, NewsType.GJZC.getCode(), 3, domainName, true));
-		result.put("news", newsService.findNewsList(0, NewsType.JTDT.getCode(), 5, domainName, true));
-		return res().data(result);
-	}
-
-	/**
-	 * 科技成果详情
-	 */
-	@RequestMapping(value = "/achievementDetail", method = RequestMethod.GET)
-	public Result achievementDetail(String id) {
-		Result res = new Result();
-		if (StringUtils.isBlank(id)) {
-			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "找不到成果ID", "成果ID"));
-			return res;
-		}
-		res.setData(achievementService.selectAchievementDetail(id));
-		return res;
-	}
-
-	/**
-	 * 科技需求详情
-	 */
-	@RequestMapping(value = "/demandDetail", method = RequestMethod.GET)
-	public Result demandDetail(String id) {
-		Result res = new Result();
-		if (StringUtils.isBlank(id)) {
-			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "找不到需求ID", "需求ID"));
-			return res;
-		}
-		res.setData(demandService.selectDemandDetail(id));
-		return res;
-	}
-}
+package com.goafanti.app.controller;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.annotation.Resource;
+import javax.servlet.http.HttpServletRequest;
+
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.bind.annotation.RestController;
+
+import com.goafanti.achievement.service.AchievementService;
+import com.goafanti.activity.service.ActivityService;
+import com.goafanti.banners.enums.BannersType;
+import com.goafanti.banners.service.BannersService;
+import com.goafanti.common.bo.Result;
+import com.goafanti.common.constant.ErrorConstants;
+import com.goafanti.common.controller.BaseApiController;
+import com.goafanti.demand.service.DemandService;
+import com.goafanti.news.enums.NewsType;
+import com.goafanti.news.service.NewsService;
+
+@RestController
+@RequestMapping(path = "/api/open/app", method = RequestMethod.GET)
+public class AppApiController extends BaseApiController {
+	@Resource
+	private BannersService		bannersService;
+	@Resource
+	private ActivityService		activityService;
+	@Resource
+	private NewsService			newsService;
+	@Resource
+	private AchievementService	achievementService;
+	@Resource
+	private DemandService		demandService;
+	@RequestMapping(value = "/index", method = RequestMethod.GET)
+	public Result index(HttpServletRequest request) {
+		Map<String, Object> result = new HashMap<>();
+		String domainName = request.getServerName();
+		result.put("banners", bannersService.findPortalBanners(BannersType.APP.getKey()));
+		result.put("activities", activityService.findPortalList(0, 3, null));
+		result.put("policies", newsService.findNewsList(0, NewsType.GJZC.getCode(), 3, domainName, true));
+		result.put("news", newsService.findNewsList(0, NewsType.JTDT.getCode(), 5, domainName, true));
+		return res().data(result);
+	}
+
+	/**
+	 * 科技成果详情
+	 */
+	@RequestMapping(value = "/achievementDetail", method = RequestMethod.GET)
+	public Result achievementDetail(String id) {
+		Result res = new Result();
+		if (StringUtils.isBlank(id)) {
+			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "找不到成果ID", "成果ID"));
+			return res;
+		}
+		res.setData(achievementService.selectAchievementDetail(id));
+		return res;
+	}
+
+	/**
+	 * 科技需求详情
+	 */
+	@RequestMapping(value = "/demandDetail", method = RequestMethod.GET)
+	public Result demandDetail(String id) {
+		Result res = new Result();
+		if (StringUtils.isBlank(id)) {
+			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "找不到需求ID", "需求ID"));
+			return res;
+		}
+		res.setData(demandService.selectDemandDetail(id));
+		return res;
+	}
+	
+
+}

+ 73 - 59
src/main/java/com/goafanti/common/bo/Result.java

@@ -1,59 +1,73 @@
-package com.goafanti.common.bo;
-
-import java.util.ArrayList;
-import java.util.List;
-
-public class Result {
-	private Object		data;
-	private List<Error>	error	= new ArrayList<Error>();
-
-	public Result() {
-	}
-
-	public Result(Object data) {
-		this.data = data;
-	}
-
-	/**
-	 * @return the data
-	 */
-	public Object getData() {
-		return data;
-	}
-
-	/**
-	 * @param data
-	 *            the data to set
-	 */
-	public void setData(Object data) {
-		this.data = data;
-	}
-
-	/**
-	 * @return the error
-	 */
-	public List<Error> getError() {
-		return error;
-	}
-
-	/**
-	 * @param error
-	 *            the error to set
-	 */
-	public void setError(List<Error> error) {
-		this.error = error;
-	}
-
-	public Result error(Error e) {
-		if (e != null) {
-			this.error.add(e);
-		}
-		return this;
-	}
-
-	public Result data(Object o) {
-		this.data = o;
-		return this;
-	}
-
-}
+package com.goafanti.common.bo;
+
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.shiro.SecurityUtils;
+
+import com.goafanti.core.shiro.token.TokenManager;
+
+public class Result {
+	private Object		data;
+	private List<Error>	error	= new ArrayList<Error>();
+	private Serializable token;
+	public Result() {
+		/*if(TokenManager.isLogin())
+		this.token = SecurityUtils.getSubject().getSession().getId();*/
+	}
+
+	public Result(Object data) {
+		this.data = data;
+	}
+
+	/**
+	 * @return the data
+	 */
+	public Object getData() {
+		return data;
+	}
+
+	/**
+	 * @param data
+	 *            the data to set
+	 */
+	public void setData(Object data) {
+		this.data = data;
+	}
+
+	/**
+	 * @return the error
+	 */
+	public List<Error> getError() {
+		return error;
+	}
+
+	/**
+	 * @param error
+	 *            the error to set
+	 */
+	public void setError(List<Error> error) {
+		this.error = error;
+	}
+
+	public Result error(Error e) {
+		if (e != null) {
+			this.error.add(e);
+		}
+		return this;
+	}
+
+	public Result data(Object o) {
+		this.data = o;
+		return this;
+	}
+
+	public Serializable getToken() {
+		return token;
+	}
+
+	public void setToken(Serializable token) {
+		this.token = token;
+	}
+}

+ 35 - 1
src/main/java/com/goafanti/common/controller/PublicController.java

@@ -419,7 +419,7 @@ public class PublicController extends BaseController {
 			return res;
 		}
 		if (!TokenManager.getSession().getAttribute(VerifyCodeUtils.RESET_CODE).equals(resetCode)) {
-			res.getError().add(buildError(ErrorConstants.RESET_CODE_ERROR, "", "页面失效,请重新获取验证码!"));
+			res.getError().add(buildError(ErrorConstants.RESET_CODE_ERROR, "", "验证码错误,请重新获取验证码!"));
 			cleanCodeSession();
 			return res;
 		}
@@ -458,5 +458,39 @@ public class PublicController extends BaseController {
 		VerifyCodeUtils.clearMobileCode();
 		VerifyCodeUtils.clearMobileCodeTime();
 	}
+	
+	/**
+	 * APP手机验证码
+	 * 
+	 * @param mobile
+	 * @param sign
+	 *            是否用与找回密码
+	 * @param type
+	 * @return
+	 */
+	@RequestMapping(value = "/getAppMCode", method = RequestMethod.GET)
+	@ResponseBody
+	public Result getAppMcode(String mobile, boolean sign, Integer type) {
+		Result res = new Result();
+		// 用于找回密码
+		if (sign) {
+			if (null == userService.selectByMobieAndType(mobile.trim(), type)) {
+				res.getError().add(buildError(ErrorConstants.NON_REGISTER, "", "该用户未注册!"));
+				return res;
+			}
+		}
+		if (TokenManager.getSession().getAttribute(VerifyCodeUtils.M_CODE_TIME) == null
+				|| TokenManager.getSession().getAttribute(VerifyCodeUtils.M_CODE_TIME) == "") {
+			sendMessage(mobile, res);
+		} else if (TimeUtils.checkOverTime("getMCode")) {
+			VerifyCodeUtils.clearMobileCode();
+			VerifyCodeUtils.clearMobileCodeTime();
+			sendMessage(mobile, res);
+		} else {
+			res.getError().add(buildError(ErrorConstants.MCODE_FREQUENCY_ERROR, "", "手机验证码发送频繁!"));
+		}
 
+		return res;
+	}
+	
 }

+ 17 - 11
src/main/java/com/goafanti/common/dao/BusinessProjectMapper.java

@@ -9,68 +9,74 @@ public interface BusinessProjectMapper {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table business_project
-	 * @mbg.generated  Mon Dec 04 15:29:25 CST 2017
+	 * @mbg.generated  Tue Dec 12 11:46:55 CST 2017
 	 */
 	long countByExample(BusinessProjectExample example);
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table business_project
-	 * @mbg.generated  Mon Dec 04 15:29:25 CST 2017
+	 * @mbg.generated  Tue Dec 12 11:46:55 CST 2017
 	 */
 	int deleteByExample(BusinessProjectExample example);
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table business_project
-	 * @mbg.generated  Mon Dec 04 15:29:25 CST 2017
+	 * @mbg.generated  Tue Dec 12 11:46:55 CST 2017
 	 */
 	int deleteByPrimaryKey(String id);
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table business_project
-	 * @mbg.generated  Mon Dec 04 15:29:25 CST 2017
+	 * @mbg.generated  Tue Dec 12 11:46:55 CST 2017
 	 */
 	int insert(BusinessProject record);
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table business_project
-	 * @mbg.generated  Mon Dec 04 15:29:25 CST 2017
+	 * @mbg.generated  Tue Dec 12 11:46:55 CST 2017
 	 */
 	int insertSelective(BusinessProject record);
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table business_project
-	 * @mbg.generated  Mon Dec 04 15:29:25 CST 2017
+	 * @mbg.generated  Tue Dec 12 11:46:55 CST 2017
 	 */
 	List<BusinessProject> selectByExample(BusinessProjectExample example);
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table business_project
-	 * @mbg.generated  Mon Dec 04 15:29:25 CST 2017
+	 * @mbg.generated  Tue Dec 12 11:46:55 CST 2017
 	 */
 	BusinessProject selectByPrimaryKey(String id);
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table business_project
-	 * @mbg.generated  Mon Dec 04 15:29:25 CST 2017
+	 * @mbg.generated  Tue Dec 12 11:46:55 CST 2017
 	 */
 	int updateByExampleSelective(@Param("record") BusinessProject record,
 			@Param("example") BusinessProjectExample example);
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table business_project
-	 * @mbg.generated  Mon Dec 04 15:29:25 CST 2017
+	 * @mbg.generated  Tue Dec 12 11:46:55 CST 2017
 	 */
 	int updateByExample(@Param("record") BusinessProject record, @Param("example") BusinessProjectExample example);
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table business_project
-	 * @mbg.generated  Mon Dec 04 15:29:25 CST 2017
+	 * @mbg.generated  Tue Dec 12 11:46:55 CST 2017
 	 */
 	int updateByPrimaryKeySelective(BusinessProject record);
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table business_project
-	 * @mbg.generated  Mon Dec 04 15:29:25 CST 2017
+	 * @mbg.generated  Tue Dec 12 11:46:55 CST 2017
 	 */
 	int updateByPrimaryKey(BusinessProject record);
+
+	int getBnamecount(String bname);
+	
+	String getCreateName(String id);
+	
+	BusinessProject selectByPrimaryBname(String bname);
 }

+ 10 - 1
src/main/java/com/goafanti/common/dao/BusinessVarietiesMapper.java

@@ -105,6 +105,15 @@ public interface BusinessVarietiesMapper {
     
 	String ThanCid(String cid);
 	
-	int getcname(String cname);
+	int getcname(String cname);//获取有多少条
+	
 	List<BusinessVarietiesBo>  selectSuperid(String spuerId);
+	
+	String getThisCid(String id);
+	
+	String getThisCname(String cid);
+	
+	List<String> getListId();
+	
+	int getLayer(String superId);
 }

+ 37 - 0
src/main/java/com/goafanti/common/dao/PermissionMapper.java

@@ -4,6 +4,7 @@ import java.util.List;
 import java.util.Set;
 
 import com.goafanti.common.model.Permission;
+import com.goafanti.permission.bo.PermissionBo;
 
 public interface PermissionMapper {
     int deleteByPrimaryKey(String id);
@@ -25,4 +26,40 @@ public interface PermissionMapper {
 	List<Permission> findAll();
 
 	int deleteByPrimaryKeys(List<String> ids);
+	
+	int insertn(Permission record);
+	
+	String selectAdminNameById(String id);
+	
+	int selectAutNoCount (String superId);
+	
+	String selectIdByAutNo(String autNo);
+	
+	String selectAutNoByName(String name);
+	
+	Permission selectSuperIdById(String id);
+	
+	int deleteById(String id);
+	
+	Permission selectAllById(String id);
+	
+	int selectCountBySuperId(String superId);
+	
+	List<Permission> selectName(String name);
+	
+	int updateById(Permission record);
+	
+	List<Permission> selectIDNBySuperId(String superId);
+	
+	int updateByNumber(Permission record);
+	
+	List<PermissionBo> selectOneAll();
+	
+	String selectNameById(String id);
+	
+	List<PermissionBo> selectAllBySuperId (String superId);
+	
+	String selectAutNoByNamei(String name);
+	
+	String selectIdByName(String name);
 }

+ 6 - 0
src/main/java/com/goafanti/common/dao/ProjectSizeMapper.java

@@ -1,5 +1,6 @@
 package com.goafanti.common.dao;
 
+import com.goafanti.admin.bo.ProjectSizeBo;
 import com.goafanti.common.model.ProjectSize;
 import com.goafanti.common.model.ProjectSizeExample;
 import java.util.List;
@@ -72,4 +73,9 @@ public interface ProjectSizeMapper {
 	 * @mbg.generated  Mon Dec 04 15:29:25 CST 2017
 	 */
 	int updateByPrimaryKey(ProjectSize record);
+
+	List<ProjectSizeBo> selectByPrimaryBusinessId(String id);
+					
+	ProjectSizeBo selectByBusinessId(String id);
+	List<ProjectSizeBo> getgetPnamecount(String pname);
 }

+ 4 - 2
src/main/java/com/goafanti/common/enums/AttachmentType.java

@@ -48,8 +48,10 @@ public enum AttachmentType {
 	LECTURE_PICTURE("lecture_picture", "科技讲堂展示图片"),
 	ACTIVITY_TITLE_PICTURE("activity_title_picture", "活动题图"),
 	ACTIVITY_CONTENT_PICTURE("activity_content_picture", "活动内容图片"),
-	CUSTOMER_SYS_FILE("customer_sys_file","客户系统文件");
-
+	CUSTOMER_SYS_FILE("customer_sys_file","客户系统文件"),
+	BUSINESS_PROJECT_MIN_PICTURE("business_project_min_picture","业务项目小图"),
+	BUSINESS_PROJECT_MAX_PICTURE("business_project_max_picture","业务项目大图");
+	
 	private AttachmentType(String code, String desc) {
 		this.code = code;
 		this.desc = desc;

+ 2 - 2
src/main/java/com/goafanti/common/mapper/AchievementMapper.xml

@@ -1119,9 +1119,9 @@
 		    a.cooperation_mode as cooperationMode, a.transfer_mode as transferMode, a.bargaining_mode as bargainingMode, 
 		    a.transfer_price as transferPrice, a.technical_scene as technicalScene, a.breakthrough, 
 		    a.patent_case as patentCase, a.awards, a.team_des as teamDes, 
-		    a.parameter, a.tech_plan_url as techPlanUrl, a.business_plan_url as businessPlanUrl, 
+		    a.parameter, a.tech_plan_url as techPlanUrl, a.business_plan_url as businessPlanUrl, 
 		    a.contacts, a.manager_id as managerId, a.salesman_id as salesmanId,  a.international_flag as internationalFlag,
-		    a.create_time as createTime, a.release_status as releaseStatus, 
+		    a.create_time as createTime, a.release_status as releaseStatus,
 		    a.release_date as releaseDate, a.audit_status as auditStatus, a.tech_broker_id as techBrokerId,
 		    oi.unit_name as iOwnerName, oi.postal_address as iOwnerPostalAddress, u.email as iOwnerEmail,
 		    oi.org_code as iOwnerIdNumber, u.mobile as iOwnerMobile,a.boutique,ifnull(mm.effective,0) hot,mm.cover_img as coverImg

+ 15 - 82
src/main/java/com/goafanti/common/mapper/AdminMapper.xml

@@ -319,11 +319,17 @@
   	select 
    		 a.number, a.mobile, a.name, 
    		 a.position, a.email, a.id,
-   		 a.create_time as createTime, GROUP_CONCAT(DISTINCT(al.province)) AS province,
-   		 aa.name as superior, a.superior_id as superiorId
+   		 a.province,
+   		 a.city,
+   		 a.create_time as createTime, 
+   		 aa.name as superior, 
+   		 a.superior_id as superiorId,
+   		 a.department_id as departmentId,
+   		 dm.name as departmentName
     from admin a 
     left join admin_location al on a.id = al.admin_id
     left join admin aa on aa.id = a.superior_id
+    left join department_management dm on a.department_id = dm.id
     where a.id <![CDATA[ <> ]]> '1'
     <if test = "mobile != null"> 
     	and a.mobile = #{mobile,jdbcType=VARCHAR}
@@ -334,52 +340,9 @@
     <if test = "number != null">
     	and a.number = #{number,jdbcType=INTEGER}
     </if>
-    group by a.id  
-    order by a.number 
-    <if test="page_sql!=null">
-			${page_sql}
-	</if>
-  </select>
-  
-  <select id= "findAreaAdminListByPage" parameterType="java.lang.String" resultType="com.goafanti.admin.bo.AdminListBo" >
-  	select 
-   		 a.number, a.mobile, a.name, 
-   		 a.position, a.email, a.id,
-   		 a.create_time as createTime,
-   		 aa.name as superior, GROUP_CONCAT(DISTINCT(al.province)) AS province,
-   		 a.superior_id as superiorId
-    from admin a 
-    left join admin_location al on a.id = al.admin_id
-    left join admin aa on aa.id = a.superior_id
-    where 1 =1
-    <if test = "mobile != null"> 
-    	and a.mobile = #{mobile,jdbcType=VARCHAR}
-    </if>
-    <if test = "name != null"> 
-    	and a.name = #{name,jdbcType=VARCHAR}
-    </if>
-    <if test = "number != null">
-    	and a.number = #{number,jdbcType=INTEGER}
+    <if test = "province != null">
+    	and a.province = #{province,jdbcType=VARCHAR}
     </if>
-    <if test="provinceList != null">
-	   and  al.province in
-	    <foreach collection="provinceList" item="plist"  open="(" separator="," close=")">
-			#{plist}
-		</foreach>
-	</if>
-	<if test = "provinceList != null and cityList != null">
-	or 
-	</if>
-	<if test="cityList != null">
-		<if test="provinceList == null">
-			and
-		</if>
-			al.city in 
-			<foreach collection="cityList" item="clist"  open="(" separator="," close=")">
-				#{clist}
-			</foreach>
-	</if>
-	group by a.id
     order by a.number 
     <if test="page_sql!=null">
 			${page_sql}
@@ -387,8 +350,8 @@
   </select>
   
   <select id = "findAdminCount" parameterType="java.lang.String" resultType="java.lang.Integer">
-   select count(1) from admin
-     where id <![CDATA[ <> ]]> '1'
+   	select count(1) from admin
+    where id <![CDATA[ <> ]]> '1'
     <if test = "mobile != null"> 
     	and mobile = #{mobile,jdbcType=VARCHAR}
     </if>
@@ -398,41 +361,11 @@
     <if test = "number != null">
     	and number = #{number,jdbcType=INTEGER}
     </if>
-  </select>
-  
-  <select id = "findAreaAdminCount" parameterType="java.lang.String" resultType="java.lang.Integer">
-   select count(distinct(a.number))  
-   from admin a 
-    left join admin_location al on a.id = al.admin_id
-    where 1 = 1
-    <if test = "mobile != null"> 
-    	and a.mobile = #{mobile,jdbcType=VARCHAR}
+    <if test = "province != null">
+    	and a.province = #{province,jdbcType=VARCHAR}
     </if>
-    <if test = "name != null"> 
-    	and a.name = #{name,jdbcType=VARCHAR}
-    </if>
-    <if test = "number != null">
-    	and a.number = #{number,jdbcType=INTEGER}
-    </if>
-    <if test="provinceList != null">
-	   and  al.province in
-	    <foreach collection="provinceList" item="plist"  open="(" separator="," close=")">
-			#{plist}
-		</foreach>
-	</if>
-	<if test = "provinceList != null &amp;&amp; cityList != null">
-	or 
-	</if>
-	<if test="cityList != null">
-		<if test="provinceList == null">
-			and
-		</if>
-			al.city in 
-			<foreach collection="cityList" item="clist"  open="(" separator="," close=")">
-				#{clist}
-			</foreach>
-	</if>
   </select>
+
   
   <select id="listAdminByName" parameterType="java.lang.String" resultMap="BaseResultMap">
 	select id,name from admin where name like concat('%',#{name},'%')  

+ 166 - 22
src/main/java/com/goafanti/common/mapper/BusinessProjectMapper.xml

@@ -5,7 +5,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Mon Dec 04 15:29:25 CST 2017.
+      This element was generated on Tue Dec 12 11:46:55 CST 2017.
     -->
     <id column="id" jdbcType="VARCHAR" property="id" />
     <result column="create_id" jdbcType="VARCHAR" property="createId" />
@@ -28,12 +28,14 @@
     <result column="principal_id" jdbcType="VARCHAR" property="principalId" />
     <result column="Value_effect" jdbcType="VARCHAR" property="valueEffect" />
     <result column="client_size" jdbcType="VARCHAR" property="clientSize" />
+    <result column="max_logo" jdbcType="VARCHAR" property="maxLogo" />
+    <result column="min_logo" jdbcType="VARCHAR" property="minLogo" />
   </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 Mon Dec 04 15:29:25 CST 2017.
+      This element was generated on Tue Dec 12 11:46:55 CST 2017.
     -->
     <where>
       <foreach collection="oredCriteria" item="criteria" separator="or">
@@ -67,7 +69,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Mon Dec 04 15:29:25 CST 2017.
+      This element was generated on Tue Dec 12 11:46:55 CST 2017.
     -->
     <where>
       <foreach collection="example.oredCriteria" item="criteria" separator="or">
@@ -101,17 +103,17 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Mon Dec 04 15:29:25 CST 2017.
+      This element was generated on Tue Dec 12 11:46:55 CST 2017.
     -->
     id, create_id, create_time, update_time, delete_sign, bname, cid, price, offset, 
     activity_price, activity_flag, member_price, introduce, status, country, province, 
-    city, district, principal_id, Value_effect, client_size
+    city, district, principal_id, Value_effect, client_size, max_logo, min_logo
   </sql>
   <select id="selectByExample" parameterType="com.goafanti.common.model.BusinessProjectExample" resultMap="BaseResultMap">
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Mon Dec 04 15:29:25 CST 2017.
+      This element was generated on Tue Dec 12 11:46:55 CST 2017.
     -->
     select
     <if test="distinct">
@@ -130,7 +132,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Mon Dec 04 15:29:25 CST 2017.
+      This element was generated on Tue Dec 12 11:46:55 CST 2017.
     -->
     select 
     <include refid="Base_Column_List" />
@@ -141,7 +143,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Mon Dec 04 15:29:25 CST 2017.
+      This element was generated on Tue Dec 12 11:46:55 CST 2017.
     -->
     delete from business_project
     where id = #{id,jdbcType=VARCHAR}
@@ -150,7 +152,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Mon Dec 04 15:29:25 CST 2017.
+      This element was generated on Tue Dec 12 11:46:55 CST 2017.
     -->
     delete from business_project
     <if test="_parameter != null">
@@ -161,7 +163,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Mon Dec 04 15:29:25 CST 2017.
+      This element was generated on Tue Dec 12 11:46:55 CST 2017.
     -->
     insert into business_project (id, create_id, create_time, 
       update_time, delete_sign, bname, 
@@ -169,22 +171,22 @@
       activity_price, activity_flag, member_price, 
       introduce, status, country, 
       province, city, district, 
-      principal_id, Value_effect, client_size
-      )
+      principal_id, Value_effect, client_size, 
+      max_logo, min_logo)
     values (#{id,jdbcType=VARCHAR}, #{createId,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, 
       #{updateTime,jdbcType=TIMESTAMP}, #{deleteSign,jdbcType=INTEGER}, #{bname,jdbcType=VARCHAR}, 
       #{cid,jdbcType=VARCHAR}, #{price,jdbcType=DECIMAL}, #{offset,jdbcType=DECIMAL}, 
       #{activityPrice,jdbcType=DECIMAL}, #{activityFlag,jdbcType=VARCHAR}, #{memberPrice,jdbcType=DECIMAL}, 
       #{introduce,jdbcType=VARCHAR}, #{status,jdbcType=VARCHAR}, #{country,jdbcType=VARCHAR}, 
       #{province,jdbcType=VARCHAR}, #{city,jdbcType=VARCHAR}, #{district,jdbcType=VARCHAR}, 
-      #{principalId,jdbcType=VARCHAR}, #{valueEffect,jdbcType=VARCHAR}, #{clientSize,jdbcType=VARCHAR}
-      )
+      #{principalId,jdbcType=VARCHAR}, #{valueEffect,jdbcType=VARCHAR}, #{clientSize,jdbcType=VARCHAR}, 
+      #{maxLogo,jdbcType=VARCHAR}, #{minLogo,jdbcType=VARCHAR})
   </insert>
   <insert id="insertSelective" parameterType="com.goafanti.common.model.BusinessProject">
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Mon Dec 04 15:29:25 CST 2017.
+      This element was generated on Tue Dec 12 11:46:55 CST 2017.
     -->
     insert into business_project
     <trim prefix="(" suffix=")" suffixOverrides=",">
@@ -251,6 +253,12 @@
       <if test="clientSize != null">
         client_size,
       </if>
+      <if test="maxLogo != null">
+        max_logo,
+      </if>
+      <if test="minLogo != null">
+        min_logo,
+      </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides=",">
       <if test="id != null">
@@ -316,13 +324,19 @@
       <if test="clientSize != null">
         #{clientSize,jdbcType=VARCHAR},
       </if>
+      <if test="maxLogo != null">
+        #{maxLogo,jdbcType=VARCHAR},
+      </if>
+      <if test="minLogo != null">
+        #{minLogo,jdbcType=VARCHAR},
+      </if>
     </trim>
   </insert>
   <select id="countByExample" parameterType="com.goafanti.common.model.BusinessProjectExample" resultType="java.lang.Long">
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Mon Dec 04 15:29:25 CST 2017.
+      This element was generated on Tue Dec 12 11:46:55 CST 2017.
     -->
     select count(*) from business_project
     <if test="_parameter != null">
@@ -333,7 +347,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Mon Dec 04 15:29:25 CST 2017.
+      This element was generated on Tue Dec 12 11:46:55 CST 2017.
     -->
     update business_project
     <set>
@@ -400,6 +414,12 @@
       <if test="record.clientSize != null">
         client_size = #{record.clientSize,jdbcType=VARCHAR},
       </if>
+      <if test="record.maxLogo != null">
+        max_logo = #{record.maxLogo,jdbcType=VARCHAR},
+      </if>
+      <if test="record.minLogo != null">
+        min_logo = #{record.minLogo,jdbcType=VARCHAR},
+      </if>
     </set>
     <if test="_parameter != null">
       <include refid="Update_By_Example_Where_Clause" />
@@ -409,7 +429,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Mon Dec 04 15:29:25 CST 2017.
+      This element was generated on Tue Dec 12 11:46:55 CST 2017.
     -->
     update business_project
     set id = #{record.id,jdbcType=VARCHAR},
@@ -432,7 +452,9 @@
       district = #{record.district,jdbcType=VARCHAR},
       principal_id = #{record.principalId,jdbcType=VARCHAR},
       Value_effect = #{record.valueEffect,jdbcType=VARCHAR},
-      client_size = #{record.clientSize,jdbcType=VARCHAR}
+      client_size = #{record.clientSize,jdbcType=VARCHAR},
+      max_logo = #{record.maxLogo,jdbcType=VARCHAR},
+      min_logo = #{record.minLogo,jdbcType=VARCHAR}
     <if test="_parameter != null">
       <include refid="Update_By_Example_Where_Clause" />
     </if>
@@ -441,7 +463,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Mon Dec 04 15:29:25 CST 2017.
+      This element was generated on Tue Dec 12 11:46:55 CST 2017.
     -->
     update business_project
     <set>
@@ -505,6 +527,12 @@
       <if test="clientSize != null">
         client_size = #{clientSize,jdbcType=VARCHAR},
       </if>
+      <if test="maxLogo != null">
+        max_logo = #{maxLogo,jdbcType=VARCHAR},
+      </if>
+      <if test="minLogo != null">
+        min_logo = #{minLogo,jdbcType=VARCHAR},
+      </if>
     </set>
     where id = #{id,jdbcType=VARCHAR}
   </update>
@@ -512,7 +540,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Mon Dec 04 15:29:25 CST 2017.
+      This element was generated on Tue Dec 12 11:46:55 CST 2017.
     -->
     update business_project
     set create_id = #{createId,jdbcType=VARCHAR},
@@ -534,7 +562,123 @@
       district = #{district,jdbcType=VARCHAR},
       principal_id = #{principalId,jdbcType=VARCHAR},
       Value_effect = #{valueEffect,jdbcType=VARCHAR},
-      client_size = #{clientSize,jdbcType=VARCHAR}
+      client_size = #{clientSize,jdbcType=VARCHAR},
+      max_logo = #{maxLogo,jdbcType=VARCHAR},
+      min_logo = #{minLogo,jdbcType=VARCHAR}
     where id = #{id,jdbcType=VARCHAR}
   </update>
+
+  	<select id="findProjectListByPage" resultType="com.goafanti.admin.bo.BusinessProjectBo">
+ 		select b.id, b.create_id as createId, b.create_time as createTime, b.update_time as updateTime,  b.delete_sign deleteSign, b.bname,
+ 		  b.cid,  b.price,  b.offset,  b.activity_price as activityPrice,  b.activity_flag as activityFlag,  b.member_price as memberPrice, 
+ 		  b.introduce,  b.status,  b.country,  b.province,  b.city,  b.district, 
+          b.principal_id as principalId,  b.Value_effect as ValueEffect,  b.client_size as  clientSize,b2.cname 
+  		from business_project b
+  		left join business_varieties b2 on b.cid = b2.id
+  		where b.delete_sign=0 
+  		<if test="bname != null">
+		and b.bname = #{bname,jdbcType=VARCHAR}
+		</if>
+		<if test="cid != null">
+		and b.cid = #{cid,jdbcType=VARCHAR}
+		</if>
+		<if test="country != null">
+		and b.country = #{country,jdbcType=INTEGER}
+		</if>
+		<if test="province != null">
+		and b.province = #{province,jdbcType=VARCHAR}
+		</if>
+		<if test="city != null">
+		and b.city = #{city,jdbcType=VARCHAR}
+		</if>
+		<if test="district != null">
+		and b.district = #{district,jdbcType=VARCHAR}
+		</if>
+		<if test="activityFlag != null">
+		and b.activity_flag = #{activityFlag,jdbcType=INTEGER}
+		</if>
+		<if test="status != null">
+		and b.status = #{status,jdbcType=VARCHAR}
+		</if>
+		<if test="page_sql!=null">
+			${page_sql}
+	</if>
+  </select>
+  <select id="findProjectListCount" resultType="Integer">
+ 		select 
+  			count(0)
+  		from business_project b
+  		 left join business_varieties b2 on b.cid = b2.id
+  		where b.delete_sign=0 
+  		<if test="bname != null">
+		and b.bname = #{bname,jdbcType=VARCHAR}
+		</if>
+		<if test="cid != null">
+		and b.cid = #{cid,jdbcType=VARCHAR}
+		</if>
+		<if test="country != null">
+		and b.country = #{country,jdbcType=INTEGER}
+		</if>
+		<if test="province != null">
+		and b.province = #{province,jdbcType=VARCHAR}
+		</if>
+		<if test="city != null">
+		and b.city = #{city,jdbcType=VARCHAR}
+		</if>
+		<if test="district != null">
+		and b.district = #{district,jdbcType=VARCHAR}
+		</if>
+		<if test="activityFlag != null">
+		and b.activity_flag = #{activityFlag,jdbcType=INTEGER}
+		</if>
+		<if test="status != null">
+		and b.status = #{status,jdbcType=VARCHAR}
+		</if>
+		
+  </select>
+  
+  <select id="getBnamecount" resultType="Integer">
+  select 
+  			count(0)
+  		from business_project
+  where  bname = #{bname,jdbcType=VARCHAR}
+  
+  </select>
+  
+  <select id="getCreateName" resultType="string">
+  select 
+  			name
+  		from admin
+  where  id = #{id,jdbcType=VARCHAR}
+  
+  </select>
+  
+  <select id="findProjectSizeListByPage" resultType="com.goafanti.admin.bo.ProjectSizeBo">
+  select 
+  	 p.id, p.create_id as createId, p.create_time as createTime, p.update_time as updateTime, p.pid, p.pname, p.price, p.offset, p.activity_price as activityPrice, 
+    p.activity_flag as activityFlag, p.member_price as memberPrice, p.status,b.bname
+    from project_size p
+    left join business_project b on  p.pid =b.id 
+    where p.pid = #{pid,jdbcType=VARCHAR}
+    <if test="page_sql!=null">
+			${page_sql}
+	</if>
+  </select>
+  
+  <select id="findProjectSizeListCount" resultType="Integer">
+  select 
+  	count(0)
+    from project_size p
+    left join business_project b on  p.pid =b.id 
+    where p.pid = #{pid,jdbcType=VARCHAR}
+  </select>
+  
+  <select id="selectByPrimaryBname" parameterType="java.lang.String" resultMap="BaseResultMap">
+    
+    select 
+    <include refid="Base_Column_List" />
+    from business_project
+    where bname = #{bname,jdbcType=VARCHAR}
+  </select>
+  
 </mapper>

+ 39 - 8
src/main/java/com/goafanti/common/mapper/BusinessVarietiesMapper.xml

@@ -361,12 +361,14 @@
       super_id = #{superId,jdbcType=VARCHAR},
       layer = #{layer,jdbcType=INTEGER},
       status = #{status,jdbcType=VARCHAR}
-    where id = #{id,jdbcType=VARCHAR}
+    
+  	where id = #{id,jdbcType=VARCHAR}
   </update>
   
   <select id="getCount" resultType="string">
   	select count(1) from business_varieties
-  	where super_id=#{superId,jdbcType=VARCHAR} 
+  	where delete_sign=0
+  	and super_id=#{superId,jdbcType=VARCHAR} 
   	</select>
   	
   	<select id="getCid" resultType="string">
@@ -379,7 +381,7 @@
   		b.delete_sign daleteSign,b.cid,b.cname,b.super_id superId ,b.layer,b.status,b2.cname as superName
   		from business_varieties b
   		left join business_varieties b2 on b.super_id = b2.id
-  		where b.delete_sign=0 
+  		where b.delete_sign=0 and b.layer>0
   		<if test="cname != null">
 		and b.cname like CONCAT('%',#{cname,jdbcType=VARCHAR},'%')
 		</if>
@@ -401,7 +403,7 @@
   			count(0)
   		from business_varieties b
   		 left join business_varieties b2 on b.super_id = b2.id
-  		where b.delete_sign=0 
+  		where b.delete_sign=0 and b.layer>0
   		<if test="cname != null">
 		and b.cname like CONCAT('%',#{cname,jdbcType=VARCHAR},'%')
 		</if>
@@ -421,7 +423,7 @@
   		select b.id,b.create_id as createId ,b.create_time as createTime,b.update_time as updateTime,
   		b.delete_sign daleteSign,b.cid,b.cname,b.super_id superId ,b.layer,b.status
   		from business_varieties b
-  		where b.delete_sign=0
+  		where b.delete_sign=0 and status=0
   </select>
   <select id="editVarieties" parameterType="string" resultType="com.goafanti.admin.bo.BusinessVarietiesBo">
   		select b.id,b.create_id as createId ,b.create_time as createTime,b.update_time as updateTime,
@@ -438,19 +440,48 @@
   <select id="ThanCid" resultType="string">
   		select b.id 
   		from business_varieties b
-  		where b.cid= #{cid,jdbcType=VARCHAR}
+  		where b.cid= #{cid,jdbcType=VARCHAR} 
   	</select>
   	
   	<select id="getcname" resultType="Integer">
   		select count(1) 
   		from business_varieties b
-  		where b.cname= #{cname,jdbcType=VARCHAR}
+  		where b.delete_sign=0
+  		and b.cname= #{cname,jdbcType=VARCHAR}
   	</select>
   	
   	<select id="selectSuperid" resultType="com.goafanti.admin.bo.BusinessVarietiesBo">
   		select b.id,b.create_id as createId ,b.create_time as createTime,b.update_time as updateTime,
   		b.delete_sign as deleteSign,b.cid,b.cname,b.super_id superId ,b.layer,b.status
   		from business_varieties b 
-  		where b.super_id= #{superId,jdbcType=VARCHAR}
+  		where b.delete_sign=0
+  		and b.super_id= #{superId,jdbcType=VARCHAR}
+  	</select>
+  	
+  	<select id="getThisCid" resultType="String">
+  		select b.cid
+  		from business_varieties b
+  		
+  		where b.id= #{id,jdbcType=VARCHAR}
+  	</select>
+  	
+  	<select id="getThisCname" resultType="String">
+  		select b.cname
+  		from business_varieties b
+  		where b.cid= #{cid,jdbcType=VARCHAR}
+  	</select>
+  	
+  	<select id="getListId" resultType="String">
+  		select b.id
+  		from business_varieties b
+  		where b.delete_sign=0
+  		and b.status=0
+  	</select>
+  	
+  	<select id="getLayer" resultType="Integer">
+  		select b.layer
+  		from business_varieties b
+  		where b.delete_sign=0
+  		and b.id= #{superId,jdbcType=VARCHAR}
   	</select>
 </mapper>

+ 2 - 0
src/main/java/com/goafanti/common/mapper/OrganizationManagementMapper.xml

@@ -406,6 +406,8 @@
 		from department_management om 
 		where
 		om.deleted_sign = '0'
+		and
+		om.name != '平台超管中心'
 		<if test="name !=null">
 			AND om.name=#{name,jdbcType=VARCHAR}
 		</if>

+ 175 - 1
src/main/java/com/goafanti/common/mapper/PermissionMapper.xml

@@ -5,9 +5,19 @@
     <id column="id" jdbcType="VARCHAR" property="id" />
     <result column="url" jdbcType="VARCHAR" property="url" />
     <result column="name" jdbcType="VARCHAR" property="name" />
+    <result column="create_id" jdbcType="VARCHAR" property="createId" />
+    <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
+    <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
+    <result column="deleted_sign" jdbcType="VARCHAR" property="deletedSign" />
+    <result column="aut_no" jdbcType="VARCHAR" property="autNo" />
+    <result column="hierarchies" jdbcType="VARCHAR" property="hierarchies" />
+    <result column="status" jdbcType="VARCHAR" property="status" />
+    <result column="show_order" jdbcType="VARCHAR" property="showOrder" />
+    <result column="super_id" jdbcType="VARCHAR" property="superId" />
   </resultMap>
   <sql id="Base_Column_List">
-    id, url, name
+    id, url, name,create_id as createId ,create_time as createTime,update_time as updateTime,
+     deleted_sign as deletedSign, aut_no as autNo, hierarchies,status ,show_order as showOrder, super_id as superId
   </sql>
   <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
     select 
@@ -99,4 +109,168 @@
 	  #{item,jdbcType=VARCHAR}  
     </foreach>
   </delete>
+  <insert id="insertn" parameterType="com.goafanti.common.model.Permission">
+    insert into permission (id, url, name, 
+      create_id, create_time, update_time, 
+      deleted_sign, aut_no, hierarchies, 
+      status, show_order, super_id
+      )
+    values (#{id,jdbcType=VARCHAR}, #{url,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, 
+      #{createId,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, 
+      #{deletedSign,jdbcType=VARCHAR}, #{autNo,jdbcType=VARCHAR}, #{hierarchies,jdbcType=VARCHAR}, 
+      #{status,jdbcType=VARCHAR}, #{showOrder,jdbcType=VARCHAR}, #{superId,jdbcType=VARCHAR}
+      )
+  </insert>
+  <select id="selectAdminNameById" parameterType="java.lang.String" resultType="java.lang.String">
+  		select 
+  		name
+  		from admin
+  		where 
+  		id=#{id,jdbcType=VARCHAR}
+  </select>
+  <select id="selectAutNoCount" parameterType="String" resultType="java.lang.Integer">
+		select
+		count(0)
+		from permission
+		where
+		super_id=#{superId,jdbcType=VARCHAR}
+  </select>	
+  <select id="selectIdByAutNo" parameterType="java.lang.String" resultType="java.lang.String">
+  		select
+  		id
+  		from permission
+  		where
+  		aut_no=#{autNo,jdbcType=VARCHAR}
+  </select>
+  <select id="selectAutNoByName" resultType="java.lang.String">
+		select
+		aut_No as AutNo
+		from permission
+		where
+		id=#{name,jdbcType=VARCHAR}
+  </select>
+  <select id="selectSuperIdById" parameterType="java.lang.String" resultType="com.goafanti.common.model.Permission">
+  		select
+		name as superId
+		from permission
+		where
+		id=#{id,jdbcType=VARCHAR} 
+  </select>
+  <delete id="deleteById" parameterType="java.lang.String">
+	    delete from permission
+	    where id = #{id,jdbcType=VARCHAR}
+  </delete>
+  <select id="selectAllById" parameterType="java.lang.String" resultType="com.goafanti.common.model.Permission">
+  		select 
+    	<include refid="Base_Column_List" />
+    	from permission
+    	where
+    	id=#{id,jdbcType=VARCHAR}
+    	order by name
+  </select>
+  <select id="selectCountBySuperId" parameterType="String" resultType="java.lang.Integer">
+  		select
+		count(0)
+		from permission
+		where
+		super_id=#{superId,jdbcType=VARCHAR}
+  </select>
+  <select id="selectName" resultType="com.goafanti.common.model.Permission">
+		select
+		name
+		from permission
+		where
+		name  like concat('%',#{name,jdbcType=VARCHAR},'%')
+  </select>
+  <update id="updateById"  parameterType="com.goafanti.common.model.Permission">
+  	update permission
+    <set>
+      <if test="url != null">
+        url = #{url,jdbcType=VARCHAR},
+      </if>
+      <if test="name != null">
+        name = #{name,jdbcType=VARCHAR},
+      </if>
+      <if test="createId != null">
+        create_id = #{createId,jdbcType=VARCHAR},
+      </if>
+      <if test="createTime != null">
+        create_time = #{createTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="updateTime != null">
+        update_time = #{updateTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="deletedSign != null">
+        deleted_sign = #{deletedSign,jdbcType=VARCHAR},
+      </if>
+      <if test="autNo != null">
+        aut_no = #{autNo,jdbcType=VARCHAR},
+      </if>
+      <if test="hierarchies != null">
+        hierarchies = #{hierarchies,jdbcType=VARCHAR},
+      </if>
+      <if test="status != null">
+        status = #{status,jdbcType=VARCHAR},
+      </if>
+      <if test="showOrder != null">
+        show_order = #{showOrder,jdbcType=VARCHAR},
+      </if>
+      <if test="superId != null">
+        super_id = #{superId,jdbcType=VARCHAR},
+      </if>
+    </set>
+    where id = #{id,jdbcType=VARCHAR} 		
+  </update>
+  <select id="selectIDNBySuperId" parameterType="java.lang.String" resultType="com.goafanti.common.model.Permission">
+  		select
+  		<include refid="Base_Column_List" />
+  		from permission 		
+  		where
+  		super_id=#{superId,jdbcType=VARCHAR}
+  		order by aut_no
+  </select>
+  <update id="updateByNumber" parameterType="com.goafanti.common.model.Permission">
+  		update permission
+	    <set>
+	    	aut_no = #{autNo,jdbcType=VARCHAR}
+	    </set>
+	    where
+	    id=#{id,jdbcType=VARCHAR}
+  </update>
+  <select id="selectOneAll" resultType="com.goafanti.permission.bo.PermissionBo">
+  		select
+  		<include refid="Base_Column_List" />
+  		from permission 		
+  		where
+  		hierarchies=1
+  		order by aut_no
+  </select>
+  <select id="selectNameById" parameterType="java.lang.String" resultType="java.lang.String">
+  		select
+		name as superId
+		from permission
+		where
+		id=#{id,jdbcType=VARCHAR} 
+  </select>
+  <select id="selectAllBySuperId" parameterType="String" resultType="com.goafanti.permission.bo.PermissionBo">
+  		select
+		<include refid="Base_Column_List" />
+		from permission
+		where
+		super_id=#{superId,jdbcType=VARCHAR}
+  </select>
+  <select id="selectAutNoByNamei" resultType="java.lang.String">
+		select
+		aut_No as AutNo
+		from permission
+		where
+		name=#{name,jdbcType=VARCHAR}
+  </select>
+  <select id="selectIdByName" resultType="java.lang.String">
+		select
+		id
+		from permission
+		where
+		name=#{name,jdbcType=VARCHAR}
+  </select>
 </mapper>

+ 28 - 1
src/main/java/com/goafanti/common/mapper/ProjectSizeMapper.xml

@@ -331,7 +331,7 @@
       <include refid="Update_By_Example_Where_Clause" />
     </if>
   </update>
-  <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.ProjectSize">
+  <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.admin.bo.ProjectSizeBo">
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
@@ -395,4 +395,31 @@
       status = #{status,jdbcType=INTEGER}
     where id = #{id,jdbcType=VARCHAR}
   </update>
+ 	
+  <select id="selectByPrimaryBusinessId" resultType="com.goafanti.admin.bo.ProjectSizeBo">
+    
+    select 
+  	 p.id, p.create_id as createId, p.create_time as createTime, p.update_time as updateTime, p.pid, p.pname, p.price, p.offset, p.activity_price as activityPrice, 
+    p.activity_flag as activityFlag, p.member_price as memberPrice, p.status,b.bname
+    from project_size p
+    left join business_project b on  p.pid =b.id 
+    where p.pid = #{pid,jdbcType=VARCHAR}
+  </select>
+  
+  <select id="selectByBusinessId" parameterType="java.lang.String" resultType="com.goafanti.admin.bo.ProjectSizeBo">
+    select 
+    p.id, p.create_id as createId, p.create_time as createTime, p.update_time as updateTime, p.pid, p.pname, p.price, p.offset, p.activity_price as activityPrice, 
+    p.activity_flag as activityFlag, p.member_price as memberPrice, p.status,b.bname
+    from project_size p
+    left join business_project b on  p.pid =b.id 
+    where p.id = #{id,jdbcType=VARCHAR}
+  </select>	
+  
+  <select id="getgetPnamecount" resultType="com.goafanti.admin.bo.ProjectSizeBo">
+   select 
+   p.id, p.create_id as createId, p.create_time as createTime, p.update_time as updateTime, p.pid, p.pname, p.price, p.offset, p.activity_price as activityPrice, 
+   p.activity_flag as activityFlag, p.member_price as memberPrice, p.status
+    from project_size p
+   where p.pname=#{pname,jdbcType=VARCHAR}
+  </select>
 </mapper>

+ 1 - 0
src/main/java/com/goafanti/common/mapper/UserBusinessMapper.xml

@@ -354,6 +354,7 @@
 		b.identify_name as identifyName,
 		a.id as businessId,
 		a.create_time as createTime,
+		a.update_time as updateTime,
 		a.follow_situation as followSituation,
 		a.customer_status as customerStatus,
 		d.name as adminName

+ 23 - 16
src/main/java/com/goafanti/common/mapper/UserMapperExt.xml

@@ -22,10 +22,12 @@
 			dg1.name as province,
 			dg2.name as city, 
 			dg3.name as area,
-			c.name as industry
+			c.name as industry,
+			d.name as adminName
 		from
 		(select
 			id,
+			aid,
 			type,
 			status,
 			create_time,
@@ -76,6 +78,7 @@
 		left join district_glossory dg2 on b.city = dg2.id
 		left join district_glossory dg3 on b.area = dg3.id
 		left join industry_category c on b.industry = c.id
+		left join admin d on a.aid = d.id 
 		where 1=1
 		<if test="province != null">
 			and b.province = #{province,jdbcType=INTEGER}
@@ -196,10 +199,12 @@
 			dg1.name as province,
 			dg2.name as city, 
 			dg3.name as area,
-			c.name as industry
+			c.name as industry,
+			d.name as adminName
 		from
 		(select
 			id,
+			aid,
 			type,
 			status,
 			create_time,
@@ -249,6 +254,7 @@
 		left join district_glossory dg2 on b.location_city = dg2.id
 		left join district_glossory dg3 on b.location_area = dg3.id
 		left join industry_category c on b.industry = c.id
+		left join admin d on a.aid = d.id 
 		where 1=1
 		<if test="province != null">
 			and b.location_province = #{province,jdbcType=INTEGER}
@@ -347,12 +353,12 @@
 	
 	<select id="findCustomerByName" parameterType="java.lang.String" resultType="com.goafanti.customer.bo.CustomerSimpleBo">
 		select id,identify_name as name from user where identify_name like
-		concat('%',#{identifyName},'%') and status <![CDATA[!= ]]> 2
+		concat('%',#{identifyName},'%') and status <![CDATA[!= ]]> 1
 	</select>
 	
 	<select id="judgeCustomerByName" resultType="java.lang.Integer">
 		select count(0) from user where identify_name = #{identifyName,jdbcType=VARCHAR}
-		and status <![CDATA[!= ]]> 2
+		and status <![CDATA[!= ]]> 1
 	</select>
 	
 	<select id="findOrganizationCustomerDetail" parameterType="java.lang.String" resultType="com.goafanti.customer.bo.CustomerOrganizationDetailBo">
@@ -587,8 +593,8 @@
 			)a 
 		left join admin b on a.aid = b.id 
 		left join department_management c on b.department_id = c.id
-		<if test="departmentId !=null">
-			where b.department_id = #{departmentId,jdbcType=VARCHAR}
+		<if test="depNo != null">
+			where c.dep_no like concat(#{depNo,jdbcType=VARCHAR},'%')
 		</if>
 		<if test="page_sql != null">
     		${page_sql}
@@ -613,8 +619,8 @@
 		)a
 		left join admin b on a.aid = b.id 
 		left join department_management c on b.department_id = c.id
-		<if test="departmentId !=null">
-			where b.department_id = #{departmentId,jdbcType=VARCHAR}
+		<if test="depNo !=null">
+			where c.dep_no like concat(#{depNo,jdbcType=VARCHAR},'%')
 		</if>
 	</select>
 	
@@ -644,8 +650,8 @@
 			)a
 			left join admin b on a.aid = b.id 
 			left join department_management c on b.department_id = c.id
-		<if test="departmentId !=null">
-			where b.department_id = #{departmentId,jdbcType=VARCHAR}
+		<if test="depNo !=null">
+			where c.dep_no like concat(#{depNo,jdbcType=VARCHAR},'%')
 		</if>
 		<if test="page_sql != null">
     		${page_sql}
@@ -670,8 +676,8 @@
 			)a
 			left join admin b on a.aid = b.id 
 			left join department_management c on b.department_id = c.id
-		<if test="departmentId !=null">
-			where b.department_id = #{departmentId,jdbcType=VARCHAR}
+		<if test="depNo !=null">
+			where c.dep_no like concat(#{depNo,jdbcType=VARCHAR},'%')
 		</if>
 	</select>
 	
@@ -717,8 +723,8 @@
 				group by
 					aid
 		)y on x.aid = y.aid
-		<if test="departmentId !=null">
-			where b.department_id = #{departmentId,jdbcType=VARCHAR}
+		<if test="depNo !=null">
+			where c.dep_no like concat(#{depNo,jdbcType=VARCHAR},'%')
 		</if>
 	</select>
 	
@@ -736,8 +742,9 @@
 			group by aid
 		)x
 		left join admin b on x.aid = b.id 
-		<if test="departmentId !=null">
-			where b.department_id = #{departmentId,jdbcType=VARCHAR}
+		left join department_management c on b.department_id = c.id
+		<if test="depNo !=null">
+			where c.dep_no like concat(#{depNo,jdbcType=VARCHAR},'%')
 		</if>
 	</select>
 	

+ 216 - 64
src/main/java/com/goafanti/common/model/BusinessProject.java

@@ -7,485 +7,637 @@ public class BusinessProject {
 
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column business_project.id
-	 * @mbg.generated  Mon Dec 04 15:29:25 CST 2017
+	 * @mbg.generated  Tue Dec 12 11:46:55 CST 2017
 	 */
 	private String id;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column business_project.create_id
-	 * @mbg.generated  Mon Dec 04 15:29:25 CST 2017
+	 * @mbg.generated  Tue Dec 12 11:46:55 CST 2017
 	 */
 	private String createId;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column business_project.create_time
-	 * @mbg.generated  Mon Dec 04 15:29:25 CST 2017
+	 * @mbg.generated  Tue Dec 12 11:46:55 CST 2017
 	 */
 	private Date createTime;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column business_project.update_time
-	 * @mbg.generated  Mon Dec 04 15:29:25 CST 2017
+	 * @mbg.generated  Tue Dec 12 11:46:55 CST 2017
 	 */
 	private Date updateTime;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column business_project.delete_sign
-	 * @mbg.generated  Mon Dec 04 15:29:25 CST 2017
+	 * @mbg.generated  Tue Dec 12 11:46:55 CST 2017
 	 */
 	private Integer deleteSign;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column business_project.bname
-	 * @mbg.generated  Mon Dec 04 15:29:25 CST 2017
+	 * @mbg.generated  Tue Dec 12 11:46:55 CST 2017
 	 */
 	private String bname;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column business_project.cid
-	 * @mbg.generated  Mon Dec 04 15:29:25 CST 2017
+	 * @mbg.generated  Tue Dec 12 11:46:55 CST 2017
 	 */
 	private String cid;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column business_project.price
-	 * @mbg.generated  Mon Dec 04 15:29:25 CST 2017
+	 * @mbg.generated  Tue Dec 12 11:46:55 CST 2017
 	 */
 	private BigDecimal price;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column business_project.offset
-	 * @mbg.generated  Mon Dec 04 15:29:25 CST 2017
+	 * @mbg.generated  Tue Dec 12 11:46:55 CST 2017
 	 */
 	private BigDecimal offset;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column business_project.activity_price
-	 * @mbg.generated  Mon Dec 04 15:29:25 CST 2017
+	 * @mbg.generated  Tue Dec 12 11:46:55 CST 2017
 	 */
 	private BigDecimal activityPrice;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column business_project.activity_flag
-	 * @mbg.generated  Mon Dec 04 15:29:25 CST 2017
+	 * @mbg.generated  Tue Dec 12 11:46:55 CST 2017
 	 */
 	private String activityFlag;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column business_project.member_price
-	 * @mbg.generated  Mon Dec 04 15:29:25 CST 2017
+	 * @mbg.generated  Tue Dec 12 11:46:55 CST 2017
 	 */
 	private BigDecimal memberPrice;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column business_project.introduce
-	 * @mbg.generated  Mon Dec 04 15:29:25 CST 2017
+	 * @mbg.generated  Tue Dec 12 11:46:55 CST 2017
 	 */
 	private String introduce;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column business_project.status
-	 * @mbg.generated  Mon Dec 04 15:29:25 CST 2017
+	 * @mbg.generated  Tue Dec 12 11:46:55 CST 2017
 	 */
 	private String status;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column business_project.country
-	 * @mbg.generated  Mon Dec 04 15:29:25 CST 2017
+	 * @mbg.generated  Tue Dec 12 11:46:55 CST 2017
 	 */
 	private String country;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column business_project.province
-	 * @mbg.generated  Mon Dec 04 15:29:25 CST 2017
+	 * @mbg.generated  Tue Dec 12 11:46:55 CST 2017
 	 */
 	private String province;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column business_project.city
-	 * @mbg.generated  Mon Dec 04 15:29:25 CST 2017
+	 * @mbg.generated  Tue Dec 12 11:46:55 CST 2017
 	 */
 	private String city;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column business_project.district
-	 * @mbg.generated  Mon Dec 04 15:29:25 CST 2017
+	 * @mbg.generated  Tue Dec 12 11:46:55 CST 2017
 	 */
 	private String district;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column business_project.principal_id
-	 * @mbg.generated  Mon Dec 04 15:29:25 CST 2017
+	 * @mbg.generated  Tue Dec 12 11:46:55 CST 2017
 	 */
 	private String principalId;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column business_project.Value_effect
-	 * @mbg.generated  Mon Dec 04 15:29:25 CST 2017
+	 * @mbg.generated  Tue Dec 12 11:46:55 CST 2017
 	 */
 	private String valueEffect;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column business_project.client_size
-	 * @mbg.generated  Mon Dec 04 15:29:25 CST 2017
+	 * @mbg.generated  Tue Dec 12 11:46:55 CST 2017
 	 */
 	private String clientSize;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column business_project.max_logo
+	 * @mbg.generated  Tue Dec 12 11:46:55 CST 2017
+	 */
+	private String maxLogo;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column business_project.min_logo
+	 * @mbg.generated  Tue Dec 12 11:46:55 CST 2017
+	 */
+	private String minLogo;
 
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column business_project.id
 	 * @return  the value of business_project.id
-	 * @mbg.generated  Mon Dec 04 15:29:25 CST 2017
+	 * @mbg.generated  Tue Dec 12 11:46:55 CST 2017
 	 */
 	public String getId() {
 		return id;
 	}
 
+
+
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column business_project.id
 	 * @param id  the value for business_project.id
-	 * @mbg.generated  Mon Dec 04 15:29:25 CST 2017
+	 * @mbg.generated  Tue Dec 12 11:46:55 CST 2017
 	 */
 	public void setId(String id) {
 		this.id = id;
 	}
 
+
+
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column business_project.create_id
 	 * @return  the value of business_project.create_id
-	 * @mbg.generated  Mon Dec 04 15:29:25 CST 2017
+	 * @mbg.generated  Tue Dec 12 11:46:55 CST 2017
 	 */
 	public String getCreateId() {
 		return createId;
 	}
 
+
+
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column business_project.create_id
 	 * @param createId  the value for business_project.create_id
-	 * @mbg.generated  Mon Dec 04 15:29:25 CST 2017
+	 * @mbg.generated  Tue Dec 12 11:46:55 CST 2017
 	 */
 	public void setCreateId(String createId) {
 		this.createId = createId;
 	}
 
+
+
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column business_project.create_time
 	 * @return  the value of business_project.create_time
-	 * @mbg.generated  Mon Dec 04 15:29:25 CST 2017
+	 * @mbg.generated  Tue Dec 12 11:46:55 CST 2017
 	 */
 	public Date getCreateTime() {
 		return createTime;
 	}
 
+
+
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column business_project.create_time
 	 * @param createTime  the value for business_project.create_time
-	 * @mbg.generated  Mon Dec 04 15:29:25 CST 2017
+	 * @mbg.generated  Tue Dec 12 11:46:55 CST 2017
 	 */
 	public void setCreateTime(Date createTime) {
 		this.createTime = createTime;
 	}
 
+
+
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column business_project.update_time
 	 * @return  the value of business_project.update_time
-	 * @mbg.generated  Mon Dec 04 15:29:25 CST 2017
+	 * @mbg.generated  Tue Dec 12 11:46:55 CST 2017
 	 */
 	public Date getUpdateTime() {
 		return updateTime;
 	}
 
+
+
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column business_project.update_time
 	 * @param updateTime  the value for business_project.update_time
-	 * @mbg.generated  Mon Dec 04 15:29:25 CST 2017
+	 * @mbg.generated  Tue Dec 12 11:46:55 CST 2017
 	 */
 	public void setUpdateTime(Date updateTime) {
 		this.updateTime = updateTime;
 	}
 
+
+
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column business_project.delete_sign
 	 * @return  the value of business_project.delete_sign
-	 * @mbg.generated  Mon Dec 04 15:29:25 CST 2017
+	 * @mbg.generated  Tue Dec 12 11:46:55 CST 2017
 	 */
 	public Integer getDeleteSign() {
 		return deleteSign;
 	}
 
+
+
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column business_project.delete_sign
 	 * @param deleteSign  the value for business_project.delete_sign
-	 * @mbg.generated  Mon Dec 04 15:29:25 CST 2017
+	 * @mbg.generated  Tue Dec 12 11:46:55 CST 2017
 	 */
 	public void setDeleteSign(Integer deleteSign) {
 		this.deleteSign = deleteSign;
 	}
 
+
+
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column business_project.bname
 	 * @return  the value of business_project.bname
-	 * @mbg.generated  Mon Dec 04 15:29:25 CST 2017
+	 * @mbg.generated  Tue Dec 12 11:46:55 CST 2017
 	 */
 	public String getBname() {
 		return bname;
 	}
 
+
+
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column business_project.bname
 	 * @param bname  the value for business_project.bname
-	 * @mbg.generated  Mon Dec 04 15:29:25 CST 2017
+	 * @mbg.generated  Tue Dec 12 11:46:55 CST 2017
 	 */
 	public void setBname(String bname) {
 		this.bname = bname;
 	}
 
+
+
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column business_project.cid
 	 * @return  the value of business_project.cid
-	 * @mbg.generated  Mon Dec 04 15:29:25 CST 2017
+	 * @mbg.generated  Tue Dec 12 11:46:55 CST 2017
 	 */
 	public String getCid() {
 		return cid;
 	}
 
+
+
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column business_project.cid
 	 * @param cid  the value for business_project.cid
-	 * @mbg.generated  Mon Dec 04 15:29:25 CST 2017
+	 * @mbg.generated  Tue Dec 12 11:46:55 CST 2017
 	 */
 	public void setCid(String cid) {
 		this.cid = cid;
 	}
 
+
+
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column business_project.price
 	 * @return  the value of business_project.price
-	 * @mbg.generated  Mon Dec 04 15:29:25 CST 2017
+	 * @mbg.generated  Tue Dec 12 11:46:55 CST 2017
 	 */
 	public BigDecimal getPrice() {
 		return price;
 	}
 
+
+
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column business_project.price
 	 * @param price  the value for business_project.price
-	 * @mbg.generated  Mon Dec 04 15:29:25 CST 2017
+	 * @mbg.generated  Tue Dec 12 11:46:55 CST 2017
 	 */
 	public void setPrice(BigDecimal price) {
 		this.price = price;
 	}
 
+
+
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column business_project.offset
 	 * @return  the value of business_project.offset
-	 * @mbg.generated  Mon Dec 04 15:29:25 CST 2017
+	 * @mbg.generated  Tue Dec 12 11:46:55 CST 2017
 	 */
 	public BigDecimal getOffset() {
 		return offset;
 	}
 
+
+
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column business_project.offset
 	 * @param offset  the value for business_project.offset
-	 * @mbg.generated  Mon Dec 04 15:29:25 CST 2017
+	 * @mbg.generated  Tue Dec 12 11:46:55 CST 2017
 	 */
 	public void setOffset(BigDecimal offset) {
 		this.offset = offset;
 	}
 
+
+
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column business_project.activity_price
 	 * @return  the value of business_project.activity_price
-	 * @mbg.generated  Mon Dec 04 15:29:25 CST 2017
+	 * @mbg.generated  Tue Dec 12 11:46:55 CST 2017
 	 */
 	public BigDecimal getActivityPrice() {
 		return activityPrice;
 	}
 
+
+
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column business_project.activity_price
 	 * @param activityPrice  the value for business_project.activity_price
-	 * @mbg.generated  Mon Dec 04 15:29:25 CST 2017
+	 * @mbg.generated  Tue Dec 12 11:46:55 CST 2017
 	 */
-	public void setActivityPrice(BigDecimal activityPrice) {
+	public void setActivityPrice(BigDecimal
+			activityPrice) {
 		this.activityPrice = activityPrice;
 	}
 
+
+
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column business_project.activity_flag
 	 * @return  the value of business_project.activity_flag
-	 * @mbg.generated  Mon Dec 04 15:29:25 CST 2017
+	 * @mbg.generated  Tue Dec 12 11:46:55 CST 2017
 	 */
 	public String getActivityFlag() {
 		return activityFlag;
 	}
 
+
+
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column business_project.activity_flag
 	 * @param activityFlag  the value for business_project.activity_flag
-	 * @mbg.generated  Mon Dec 04 15:29:25 CST 2017
+	 * @mbg.generated  Tue Dec 12 11:46:55 CST 2017
 	 */
 	public void setActivityFlag(String activityFlag) {
 		this.activityFlag = activityFlag;
 	}
 
+
+
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column business_project.member_price
 	 * @return  the value of business_project.member_price
-	 * @mbg.generated  Mon Dec 04 15:29:25 CST 2017
+	 * @mbg.generated  Tue Dec 12 11:46:55 CST 2017
 	 */
 	public BigDecimal getMemberPrice() {
 		return memberPrice;
 	}
 
+
+
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column business_project.member_price
 	 * @param memberPrice  the value for business_project.member_price
-	 * @mbg.generated  Mon Dec 04 15:29:25 CST 2017
+	 * @mbg.generated  Tue Dec 12 11:46:55 CST 2017
 	 */
 	public void setMemberPrice(BigDecimal memberPrice) {
 		this.memberPrice = memberPrice;
 	}
 
+
+
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column business_project.introduce
 	 * @return  the value of business_project.introduce
-	 * @mbg.generated  Mon Dec 04 15:29:25 CST 2017
+	 * @mbg.generated  Tue Dec 12 11:46:55 CST 2017
 	 */
 	public String getIntroduce() {
 		return introduce;
 	}
 
+
+
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column business_project.introduce
 	 * @param introduce  the value for business_project.introduce
-	 * @mbg.generated  Mon Dec 04 15:29:25 CST 2017
+	 * @mbg.generated  Tue Dec 12 11:46:55 CST 2017
 	 */
 	public void setIntroduce(String introduce) {
 		this.introduce = introduce;
 	}
 
+
+
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column business_project.status
 	 * @return  the value of business_project.status
-	 * @mbg.generated  Mon Dec 04 15:29:25 CST 2017
+	 * @mbg.generated  Tue Dec 12 11:46:55 CST 2017
 	 */
 	public String getStatus() {
 		return status;
 	}
 
+
+
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column business_project.status
 	 * @param status  the value for business_project.status
-	 * @mbg.generated  Mon Dec 04 15:29:25 CST 2017
+	 * @mbg.generated  Tue Dec 12 11:46:55 CST 2017
 	 */
 	public void setStatus(String status) {
 		this.status = status;
 	}
 
+
+
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column business_project.country
 	 * @return  the value of business_project.country
-	 * @mbg.generated  Mon Dec 04 15:29:25 CST 2017
+	 * @mbg.generated  Tue Dec 12 11:46:55 CST 2017
 	 */
 	public String getCountry() {
 		return country;
 	}
 
+
+
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column business_project.country
 	 * @param country  the value for business_project.country
-	 * @mbg.generated  Mon Dec 04 15:29:25 CST 2017
+	 * @mbg.generated  Tue Dec 12 11:46:55 CST 2017
 	 */
 	public void setCountry(String country) {
 		this.country = country;
 	}
 
+
+
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column business_project.province
 	 * @return  the value of business_project.province
-	 * @mbg.generated  Mon Dec 04 15:29:25 CST 2017
+	 * @mbg.generated  Tue Dec 12 11:46:55 CST 2017
 	 */
 	public String getProvince() {
 		return province;
 	}
 
+
+
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column business_project.province
 	 * @param province  the value for business_project.province
-	 * @mbg.generated  Mon Dec 04 15:29:25 CST 2017
+	 * @mbg.generated  Tue Dec 12 11:46:55 CST 2017
 	 */
 	public void setProvince(String province) {
 		this.province = province;
 	}
 
+
+
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column business_project.city
 	 * @return  the value of business_project.city
-	 * @mbg.generated  Mon Dec 04 15:29:25 CST 2017
+	 * @mbg.generated  Tue Dec 12 11:46:55 CST 2017
 	 */
 	public String getCity() {
 		return city;
 	}
 
+
+
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column business_project.city
 	 * @param city  the value for business_project.city
-	 * @mbg.generated  Mon Dec 04 15:29:25 CST 2017
+	 * @mbg.generated  Tue Dec 12 11:46:55 CST 2017
 	 */
 	public void setCity(String city) {
 		this.city = city;
 	}
 
+
+
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column business_project.district
 	 * @return  the value of business_project.district
-	 * @mbg.generated  Mon Dec 04 15:29:25 CST 2017
+	 * @mbg.generated  Tue Dec 12 11:46:55 CST 2017
 	 */
 	public String getDistrict() {
 		return district;
 	}
 
+
+
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column business_project.district
 	 * @param district  the value for business_project.district
-	 * @mbg.generated  Mon Dec 04 15:29:25 CST 2017
+	 * @mbg.generated  Tue Dec 12 11:46:55 CST 2017
 	 */
 	public void setDistrict(String district) {
 		this.district = district;
 	}
 
+
+
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column business_project.principal_id
 	 * @return  the value of business_project.principal_id
-	 * @mbg.generated  Mon Dec 04 15:29:25 CST 2017
+	 * @mbg.generated  Tue Dec 12 11:46:55 CST 2017
 	 */
 	public String getPrincipalId() {
 		return principalId;
 	}
 
+
+
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column business_project.principal_id
 	 * @param principalId  the value for business_project.principal_id
-	 * @mbg.generated  Mon Dec 04 15:29:25 CST 2017
+	 * @mbg.generated  Tue Dec 12 11:46:55 CST 2017
 	 */
 	public void setPrincipalId(String principalId) {
 		this.principalId = principalId;
 	}
 
+
+
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column business_project.Value_effect
 	 * @return  the value of business_project.Value_effect
-	 * @mbg.generated  Mon Dec 04 15:29:25 CST 2017
+	 * @mbg.generated  Tue Dec 12 11:46:55 CST 2017
 	 */
 	public String getValueEffect() {
 		return valueEffect;
 	}
 
+
+
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column business_project.Value_effect
 	 * @param valueEffect  the value for business_project.Value_effect
-	 * @mbg.generated  Mon Dec 04 15:29:25 CST 2017
+	 * @mbg.generated  Tue Dec 12 11:46:55 CST 2017
 	 */
 	public void setValueEffect(String valueEffect) {
 		this.valueEffect = valueEffect;
 	}
 
+
+
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column business_project.client_size
 	 * @return  the value of business_project.client_size
-	 * @mbg.generated  Mon Dec 04 15:29:25 CST 2017
+	 * @mbg.generated  Tue Dec 12 11:46:55 CST 2017
 	 */
 	public String getClientSize() {
 		return clientSize;
 	}
 
+
+
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column business_project.client_size
 	 * @param clientSize  the value for business_project.client_size
-	 * @mbg.generated  Mon Dec 04 15:29:25 CST 2017
+	 * @mbg.generated  Tue Dec 12 11:46:55 CST 2017
 	 */
 	public void setClientSize(String clientSize) {
 		this.clientSize = clientSize;
 	}
+
+
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column business_project.max_logo
+	 * @return  the value of business_project.max_logo
+	 * @mbg.generated  Tue Dec 12 11:46:55 CST 2017
+	 */
+	public String getMaxLogo() {
+		return maxLogo;
+	}
+
+
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column business_project.max_logo
+	 * @param maxLogo  the value for business_project.max_logo
+	 * @mbg.generated  Tue Dec 12 11:46:55 CST 2017
+	 */
+	public void setMaxLogo(String maxLogo) {
+		this.maxLogo = maxLogo;
+	}
+
+
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column business_project.min_logo
+	 * @return  the value of business_project.min_logo
+	 * @mbg.generated  Tue Dec 12 11:46:55 CST 2017
+	 */
+	public String getMinLogo() {
+		return minLogo;
+	}
+
+
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column business_project.min_logo
+	 * @param minLogo  the value for business_project.min_logo
+	 * @mbg.generated  Tue Dec 12 11:46:55 CST 2017
+	 */
+	
+	public void setMinLogo(String minLogo) {
+		this.minLogo = minLogo;
+	}
+
+	
+	
+
+	@Override
+	public String toString() {
+		return "BusinessProject [id=" + id + ", createId=" + createId + ", createTime=" + createTime + ", updateTime="
+				+ updateTime + ", deleteSign=" + deleteSign + ", bname=" + bname + ", cid=" + cid + ", price=" + price
+				+ ", offset=" + offset + ", activityPrice=" + activityPrice + ", activityFlag=" + activityFlag
+				+ ", memberPrice=" + memberPrice + ", introduce=" + introduce + ", status=" + status + ", country="
+				+ country + ", province=" + province + ", city=" + city + ", district=" + district + ", principalId="
+				+ principalId + ", valueEffect=" + valueEffect + ", clientSize=" + clientSize + "]";
+	}
+	
 }

+ 156 - 16
src/main/java/com/goafanti/common/model/BusinessProjectExample.java

@@ -8,23 +8,23 @@ import java.util.List;
 public class BusinessProjectExample {
     /**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database table business_project
-	 * @mbg.generated  Mon Dec 04 15:29:25 CST 2017
+	 * @mbg.generated  Tue Dec 12 11:46:55 CST 2017
 	 */
 	protected String orderByClause;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database table business_project
-	 * @mbg.generated  Mon Dec 04 15:29:25 CST 2017
+	 * @mbg.generated  Tue Dec 12 11:46:55 CST 2017
 	 */
 	protected boolean distinct;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database table business_project
-	 * @mbg.generated  Mon Dec 04 15:29:25 CST 2017
+	 * @mbg.generated  Tue Dec 12 11:46:55 CST 2017
 	 */
 	protected List<Criteria> oredCriteria;
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table business_project
-	 * @mbg.generated  Mon Dec 04 15:29:25 CST 2017
+	 * @mbg.generated  Tue Dec 12 11:46:55 CST 2017
 	 */
 	public BusinessProjectExample() {
 		oredCriteria = new ArrayList<Criteria>();
@@ -32,7 +32,7 @@ public class BusinessProjectExample {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table business_project
-	 * @mbg.generated  Mon Dec 04 15:29:25 CST 2017
+	 * @mbg.generated  Tue Dec 12 11:46:55 CST 2017
 	 */
 	public void setOrderByClause(String orderByClause) {
 		this.orderByClause = orderByClause;
@@ -40,7 +40,7 @@ public class BusinessProjectExample {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table business_project
-	 * @mbg.generated  Mon Dec 04 15:29:25 CST 2017
+	 * @mbg.generated  Tue Dec 12 11:46:55 CST 2017
 	 */
 	public String getOrderByClause() {
 		return orderByClause;
@@ -48,7 +48,7 @@ public class BusinessProjectExample {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table business_project
-	 * @mbg.generated  Mon Dec 04 15:29:25 CST 2017
+	 * @mbg.generated  Tue Dec 12 11:46:55 CST 2017
 	 */
 	public void setDistinct(boolean distinct) {
 		this.distinct = distinct;
@@ -56,7 +56,7 @@ public class BusinessProjectExample {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table business_project
-	 * @mbg.generated  Mon Dec 04 15:29:25 CST 2017
+	 * @mbg.generated  Tue Dec 12 11:46:55 CST 2017
 	 */
 	public boolean isDistinct() {
 		return distinct;
@@ -64,7 +64,7 @@ public class BusinessProjectExample {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table business_project
-	 * @mbg.generated  Mon Dec 04 15:29:25 CST 2017
+	 * @mbg.generated  Tue Dec 12 11:46:55 CST 2017
 	 */
 	public List<Criteria> getOredCriteria() {
 		return oredCriteria;
@@ -72,7 +72,7 @@ public class BusinessProjectExample {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table business_project
-	 * @mbg.generated  Mon Dec 04 15:29:25 CST 2017
+	 * @mbg.generated  Tue Dec 12 11:46:55 CST 2017
 	 */
 	public void or(Criteria criteria) {
 		oredCriteria.add(criteria);
@@ -80,7 +80,7 @@ public class BusinessProjectExample {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table business_project
-	 * @mbg.generated  Mon Dec 04 15:29:25 CST 2017
+	 * @mbg.generated  Tue Dec 12 11:46:55 CST 2017
 	 */
 	public Criteria or() {
 		Criteria criteria = createCriteriaInternal();
@@ -90,7 +90,7 @@ public class BusinessProjectExample {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table business_project
-	 * @mbg.generated  Mon Dec 04 15:29:25 CST 2017
+	 * @mbg.generated  Tue Dec 12 11:46:55 CST 2017
 	 */
 	public Criteria createCriteria() {
 		Criteria criteria = createCriteriaInternal();
@@ -102,7 +102,7 @@ public class BusinessProjectExample {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table business_project
-	 * @mbg.generated  Mon Dec 04 15:29:25 CST 2017
+	 * @mbg.generated  Tue Dec 12 11:46:55 CST 2017
 	 */
 	protected Criteria createCriteriaInternal() {
 		Criteria criteria = new Criteria();
@@ -111,7 +111,7 @@ public class BusinessProjectExample {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table business_project
-	 * @mbg.generated  Mon Dec 04 15:29:25 CST 2017
+	 * @mbg.generated  Tue Dec 12 11:46:55 CST 2017
 	 */
 	public void clear() {
 		oredCriteria.clear();
@@ -121,7 +121,7 @@ public class BusinessProjectExample {
 
 	/**
 	 * This class was generated by MyBatis Generator. This class corresponds to the database table business_project
-	 * @mbg.generated  Mon Dec 04 15:29:25 CST 2017
+	 * @mbg.generated  Tue Dec 12 11:46:55 CST 2017
 	 */
 	protected abstract static class GeneratedCriteria {
 		protected List<Criterion> criteria;
@@ -1563,11 +1563,151 @@ public class BusinessProjectExample {
 			addCriterion("client_size not between", value1, value2, "clientSize");
 			return (Criteria) this;
 		}
+
+		public Criteria andMaxLogoIsNull() {
+			addCriterion("max_logo is null");
+			return (Criteria) this;
+		}
+
+		public Criteria andMaxLogoIsNotNull() {
+			addCriterion("max_logo is not null");
+			return (Criteria) this;
+		}
+
+		public Criteria andMaxLogoEqualTo(String value) {
+			addCriterion("max_logo =", value, "maxLogo");
+			return (Criteria) this;
+		}
+
+		public Criteria andMaxLogoNotEqualTo(String value) {
+			addCriterion("max_logo <>", value, "maxLogo");
+			return (Criteria) this;
+		}
+
+		public Criteria andMaxLogoGreaterThan(String value) {
+			addCriterion("max_logo >", value, "maxLogo");
+			return (Criteria) this;
+		}
+
+		public Criteria andMaxLogoGreaterThanOrEqualTo(String value) {
+			addCriterion("max_logo >=", value, "maxLogo");
+			return (Criteria) this;
+		}
+
+		public Criteria andMaxLogoLessThan(String value) {
+			addCriterion("max_logo <", value, "maxLogo");
+			return (Criteria) this;
+		}
+
+		public Criteria andMaxLogoLessThanOrEqualTo(String value) {
+			addCriterion("max_logo <=", value, "maxLogo");
+			return (Criteria) this;
+		}
+
+		public Criteria andMaxLogoLike(String value) {
+			addCriterion("max_logo like", value, "maxLogo");
+			return (Criteria) this;
+		}
+
+		public Criteria andMaxLogoNotLike(String value) {
+			addCriterion("max_logo not like", value, "maxLogo");
+			return (Criteria) this;
+		}
+
+		public Criteria andMaxLogoIn(List<String> values) {
+			addCriterion("max_logo in", values, "maxLogo");
+			return (Criteria) this;
+		}
+
+		public Criteria andMaxLogoNotIn(List<String> values) {
+			addCriterion("max_logo not in", values, "maxLogo");
+			return (Criteria) this;
+		}
+
+		public Criteria andMaxLogoBetween(String value1, String value2) {
+			addCriterion("max_logo between", value1, value2, "maxLogo");
+			return (Criteria) this;
+		}
+
+		public Criteria andMaxLogoNotBetween(String value1, String value2) {
+			addCriterion("max_logo not between", value1, value2, "maxLogo");
+			return (Criteria) this;
+		}
+
+		public Criteria andMinLogoIsNull() {
+			addCriterion("min_logo is null");
+			return (Criteria) this;
+		}
+
+		public Criteria andMinLogoIsNotNull() {
+			addCriterion("min_logo is not null");
+			return (Criteria) this;
+		}
+
+		public Criteria andMinLogoEqualTo(String value) {
+			addCriterion("min_logo =", value, "minLogo");
+			return (Criteria) this;
+		}
+
+		public Criteria andMinLogoNotEqualTo(String value) {
+			addCriterion("min_logo <>", value, "minLogo");
+			return (Criteria) this;
+		}
+
+		public Criteria andMinLogoGreaterThan(String value) {
+			addCriterion("min_logo >", value, "minLogo");
+			return (Criteria) this;
+		}
+
+		public Criteria andMinLogoGreaterThanOrEqualTo(String value) {
+			addCriterion("min_logo >=", value, "minLogo");
+			return (Criteria) this;
+		}
+
+		public Criteria andMinLogoLessThan(String value) {
+			addCriterion("min_logo <", value, "minLogo");
+			return (Criteria) this;
+		}
+
+		public Criteria andMinLogoLessThanOrEqualTo(String value) {
+			addCriterion("min_logo <=", value, "minLogo");
+			return (Criteria) this;
+		}
+
+		public Criteria andMinLogoLike(String value) {
+			addCriterion("min_logo like", value, "minLogo");
+			return (Criteria) this;
+		}
+
+		public Criteria andMinLogoNotLike(String value) {
+			addCriterion("min_logo not like", value, "minLogo");
+			return (Criteria) this;
+		}
+
+		public Criteria andMinLogoIn(List<String> values) {
+			addCriterion("min_logo in", values, "minLogo");
+			return (Criteria) this;
+		}
+
+		public Criteria andMinLogoNotIn(List<String> values) {
+			addCriterion("min_logo not in", values, "minLogo");
+			return (Criteria) this;
+		}
+
+		public Criteria andMinLogoBetween(String value1, String value2) {
+			addCriterion("min_logo between", value1, value2, "minLogo");
+			return (Criteria) this;
+		}
+
+		public Criteria andMinLogoNotBetween(String value1, String value2) {
+			addCriterion("min_logo not between", value1, value2, "minLogo");
+			return (Criteria) this;
+		}
 	}
 
 	/**
 	 * This class was generated by MyBatis Generator. This class corresponds to the database table business_project
-	 * @mbg.generated  Mon Dec 04 15:29:25 CST 2017
+	 * @mbg.generated  Tue Dec 12 11:46:55 CST 2017
 	 */
 	public static class Criterion {
 		private String condition;

+ 90 - 0
src/main/java/com/goafanti/common/model/Permission.java

@@ -1,5 +1,7 @@
 package com.goafanti.common.model;
 
+import java.util.Date;
+
 public class Permission  {
 
 	private String id;
@@ -14,7 +16,95 @@ public class Permission  {
 	 */
 	private String	name;
 	
+	private String createId;
+	
+	private Date createTime;
+	
+	private Date updateTime;
+	
+	private String deletedSign;
+	
+	private String autNo;
+	
+	private String hierarchies;
 	
+	private String status;
+	
+	private String showOrder;
+	
+	private String superId;	
+
+	public String getCreateId() {
+		return createId;
+	}
+
+	public void setCreateId(String createId) {
+		this.createId = createId;
+	}
+
+	public Date getCreateTime() {
+		return createTime;
+	}
+
+	public void setCreateTime(Date createTime) {
+		this.createTime = createTime;
+	}
+
+	public Date getUpdateTime() {
+		return updateTime;
+	}
+
+	public void setUpdateTime(Date updateTime) {
+		this.updateTime = updateTime;
+	}
+
+	public String getDeletedSign() {
+		return deletedSign;
+	}
+
+	public void setDeletedSign(String deletedSign) {
+		this.deletedSign = deletedSign;
+	}
+
+	public String getAutNo() {
+		return autNo;
+	}
+
+	public void setAutNo(String autNo) {
+		this.autNo = autNo;
+	}
+
+	public String getHierarchies() {
+		return hierarchies;
+	}
+
+	public void setHierarchies(String hierarchies) {
+		this.hierarchies = hierarchies;
+	}
+
+	public String getStatus() {
+		return status;
+	}
+
+	public void setStatus(String status) {
+		this.status = status;
+	}
+
+	public String getShowOrder() {
+		return showOrder;
+	}
+
+	public void setShowOrder(String showOrder) {
+		this.showOrder = showOrder;
+	}
+
+	public String getSuperId() {
+		return superId;
+	}
+
+	public void setSuperId(String superId) {
+		this.superId = superId;
+	}
 
 	public String getId() {
 		return id;

+ 26 - 0
src/main/java/com/goafanti/common/model/ProjectSize.java

@@ -3,6 +3,10 @@ package com.goafanti.common.model;
 import java.math.BigDecimal;
 import java.util.Date;
 
+import org.apache.commons.lang3.time.DateFormatUtils;
+
+import com.goafanti.common.constant.AFTConstants;
+
 public class ProjectSize {
 
 	/**
@@ -110,6 +114,13 @@ public class ProjectSize {
 	public Date getCreateTime() {
 		return createTime;
 	}
+	public String getCreateTimeFormattedDate() {
+		if (this.createTime == null) {
+			return null;
+		} else {
+			return DateFormatUtils.format(this.getCreateTime(), AFTConstants.YYYYMMDDHHMMSS);
+		}
+	}
 
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column project_size.create_time
@@ -128,6 +139,13 @@ public class ProjectSize {
 	public Date getUpdateTime() {
 		return updateTime;
 	}
+	public String getUpdateTimeFormattedDate() {
+		if (this.updateTime == null) {
+			return null;
+		} else {
+			return DateFormatUtils.format(this.getCreateTime(), AFTConstants.YYYYMMDDHHMMSS);
+		}
+	}
 
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column project_size.update_time
@@ -281,4 +299,12 @@ public class ProjectSize {
 	public void setStatus(Integer status) {
 		this.status = status;
 	}
+
+	@Override
+	public String toString() {
+		return "ProjectSize [id=" + id + ", createId=" + createId + ", createTime=" + createTime + ", updateTime="
+				+ updateTime + ", pid=" + pid + ", pname=" + pname + ", price=" + price + ", offset=" + offset
+				+ ", activityPrice=" + activityPrice + ", activityFlag=" + activityFlag + ", memberPrice=" + memberPrice
+				+ ", status=" + status + "]";
+	}
 }

+ 2 - 2
src/main/java/com/goafanti/common/utils/FileUtils.java

@@ -106,7 +106,7 @@ public class FileUtils {
 				|| sign.indexOf("achievement_technical_picture") != -1
 				|| sign.indexOf("achievement_maturity_picture") != -1 || sign.indexOf("demand_order_file") != -1
 				|| sign.indexOf("lecture_picture") != -1|| sign.indexOf("cover_picture") != -1 
-				|| sign.indexOf("news") != -1||sign.indexOf("customer_sys_file") != -1) {
+				|| sign.indexOf("news") != -1||sign.indexOf("customer_sys_file") != -1||sign.indexOf("business_project_max_picture") != -1||sign.indexOf("business_project_min_picture") != -1) {
 			uniq = true;
 		}
 		String fileName = "";
@@ -114,7 +114,7 @@ public class FileUtils {
 			if (uniq) {
 				fileName = path + uid + "/" + System.nanoTime() + "_" + sign + suffix;
 			} else {
-				fileName = path + uid + "/" + sign + suffix;
+				fileName = path + uid + "/" +  sign + suffix;
 			}
 		} else {
 			fileName = path + uid + "/" + System.nanoTime() + suffix;

+ 43 - 44
src/main/java/com/goafanti/core/shiro/filter/LoginFilter.java

@@ -1,44 +1,43 @@
-package com.goafanti.core.shiro.filter;
-
-import javax.servlet.ServletRequest;
-import javax.servlet.ServletResponse;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
-import org.apache.shiro.web.filter.AccessControlFilter;
-import org.springframework.beans.factory.annotation.Autowired;
-
-import com.goafanti.common.bo.Error;
-import com.goafanti.common.bo.Result;
-import com.goafanti.common.utils.LoggerUtils;
-import com.goafanti.core.shiro.token.TokenManager;
-
-public class LoginFilter extends AccessControlFilter {
-	final static Class<LoginFilter>	CLASS	= LoginFilter.class;
-
-	@Autowired
-	private ShiroFilterUtils		shiroFilterUtils;
-
-	@Override
-	protected boolean isAccessAllowed(ServletRequest request, ServletResponse response, Object mappedValue)
-			throws Exception {
-
-		if (TokenManager.isLogin()) {
-			return Boolean.TRUE;
-		}
-		return Boolean.FALSE;
-	}
-
-	@Override
-	protected boolean onAccessDenied(ServletRequest request, ServletResponse response) throws Exception {
-		// 保存Request和Response 到登录后的链接
-		if (!shiroFilterUtils.isAjax((HttpServletRequest) request)) {
-			saveRequestAndRedirectToLogin(request, response);
-		} else {
-			LoggerUtils.debug(getClass(), "当前用户没有登录,并且是Ajax请求!");
-			shiroFilterUtils.out((HttpServletResponse) response, new Result().error(new Error("", "403", "当前用户没有登录!")));
-		}
-		return Boolean.FALSE;
-	}
-
-}
+package com.goafanti.core.shiro.filter;
+
+import javax.servlet.ServletRequest;
+import javax.servlet.ServletResponse;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.apache.shiro.web.filter.AccessControlFilter;
+import org.springframework.beans.factory.annotation.Autowired;
+
+import com.goafanti.common.bo.Error;
+import com.goafanti.common.bo.Result;
+import com.goafanti.common.utils.LoggerUtils;
+import com.goafanti.core.shiro.token.TokenManager;
+
+public class LoginFilter extends AccessControlFilter {
+	final static Class<LoginFilter>	CLASS	= LoginFilter.class;
+
+	@Autowired
+	private ShiroFilterUtils		shiroFilterUtils;
+
+	@Override
+	protected boolean isAccessAllowed(ServletRequest request, ServletResponse response, Object mappedValue)
+			throws Exception {
+		if (TokenManager.isLogin()) {
+			return Boolean.TRUE;
+		}
+		return Boolean.FALSE;
+	}
+
+	@Override
+	protected boolean onAccessDenied(ServletRequest request, ServletResponse response) throws Exception {
+		// 保存Request和Response 到登录后的链接
+		if (!shiroFilterUtils.isAjax((HttpServletRequest) request)) {
+			saveRequestAndRedirectToLogin(request, response);
+		} else {
+			LoggerUtils.debug(getClass(), "当前用户没有登录,并且是Ajax请求!");
+			shiroFilterUtils.out((HttpServletResponse) response, new Result().error(new Error("", "403", "当前用户没有登录!")));
+		}
+		return Boolean.FALSE;
+	}
+
+}

+ 201 - 211
src/main/java/com/goafanti/core/shiro/session/CustomSessionManager.java

@@ -1,211 +1,201 @@
-package com.goafanti.core.shiro.session;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-import org.apache.shiro.session.Session;
-import org.apache.shiro.subject.SimplePrincipalCollection;
-import org.apache.shiro.subject.support.DefaultSubjectContext;
-import org.springframework.beans.factory.annotation.Autowired;
-
-import com.goafanti.common.constant.ShiroConstants;
-import com.goafanti.common.model.AftUser;
-import com.goafanti.common.utils.ArrayUtils;
-import com.goafanti.common.utils.LoggerUtils;
-import com.goafanti.core.shiro.CustomShiroSessionDAO;
-
-public class CustomSessionManager {
-
-	/**
-	 * session status
-	 */
-	@Autowired
-	ShiroSessionRepository	shiroSessionRepository;
-
-	@Autowired
-	CustomShiroSessionDAO	customShiroSessionDAO;
-
-	// /**
-	// * 获取所有的有效Session用户
-	// *
-	// * @return
-	// */
-	// public List<UserOnlineBo> getAllUser() {
-	// // 获取所有session
-	// Collection<Session> sessions = customShiroSessionDAO.getActiveSessions();
-	// List<UserOnlineBo> list = new ArrayList<UserOnlineBo>();
-	//
-	// for (Session session : sessions) {
-	// UserOnlineBo bo = getSessionBo(session);
-	// if (null != bo) {
-	// list.add(bo);
-	// }
-	// }
-	// return list;
-	// }
-
-	/**
-	 * 根据ID查询 SimplePrincipalCollection
-	 * 
-	 * @param userIds
-	 *            用户ID
-	 * @return
-	 */
-	@SuppressWarnings("unchecked")
-	public List<SimplePrincipalCollection> getSimplePrincipalCollectionByUserId(String... userIds) {
-		// 把userIds 转成Set,好判断
-		Set<String> idset = (Set<String>) ArrayUtils.array2Set(userIds);
-		// 获取所有session
-		Collection<Session> sessions = customShiroSessionDAO.getActiveSessions();
-		// 定义返回
-		List<SimplePrincipalCollection> list = new ArrayList<SimplePrincipalCollection>();
-		for (Session session : sessions) {
-			// 获取SimplePrincipalCollection
-			Object obj = session.getAttribute(DefaultSubjectContext.PRINCIPALS_SESSION_KEY);
-			if (null != obj && obj instanceof SimplePrincipalCollection) {
-				// 强转
-				SimplePrincipalCollection spc = (SimplePrincipalCollection) obj;
-				// 判断用户,匹配用户ID。
-				obj = spc.getPrimaryPrincipal();
-				if (null != obj && obj instanceof AftUser) {
-					AftUser user = (AftUser) obj;
-					// 比较用户ID,符合即加入集合
-					if (null != user && idset.contains(user.getId())) {
-						list.add(spc);
-					}
-				}
-			}
-		}
-		return list;
-	}
-
-	// /**
-	// * 获取单个Session
-	// *
-	// * @param sessionId
-	// * @return
-	// */
-	// public UserOnlineBo getSession(String sessionId) {
-	// Session session = shiroSessionRepository.getSession(sessionId);
-	// UserOnlineBo bo = getSessionBo(session);
-	// return bo;
-	// }
-
-	// private UserOnlineBo getSessionBo(Session session) {
-	// // 获取session登录信息。
-	// Object obj =
-	// session.getAttribute(DefaultSubjectContext.PRINCIPALS_SESSION_KEY);
-	// if (null == obj) {
-	// return null;
-	// }
-	// // 确保是 SimplePrincipalCollection对象。
-	// if (obj instanceof SimplePrincipalCollection) {
-	// SimplePrincipalCollection spc = (SimplePrincipalCollection) obj;
-	// /**
-	// * 获取用户登录的,@link UserRealm.doGetAuthenticationInfo(...)方法中 return
-	// * new SimpleAuthenticationInfo(user,user.getPwd(),
-	// * getName());的user 对象。
-	// */
-	// obj = spc.getPrimaryPrincipal();
-	// if (null != obj && obj instanceof User) {
-	// // 存储session + user 综合信息
-	// UserOnlineBo userBo = new UserOnlineBo((User) obj);
-	// // 最后一次和系统交互的时间
-	// userBo.setLastAccess(session.getLastAccessTime());
-	// // 主机的ip地址
-	// userBo.setHost(session.getHost());
-	// // session ID
-	// userBo.setSessionId(session.getId().toString());
-	// // 回话到期 ttl(ms)
-	// userBo.setTimeout(session.getTimeout());
-	// // session创建时间
-	// userBo.setStartTime(session.getStartTimestamp());
-	// // 是否踢出
-	// SessionStatus sessionStatus = (SessionStatus)
-	// session.getAttribute(ShiroConstants.SESSION_STATUS);
-	// boolean status = Boolean.TRUE;
-	// if (null != sessionStatus) {
-	// status = sessionStatus.getOnlineStatus();
-	// }
-	// userBo.setSessionStatus(status);
-	// return userBo;
-	// }
-	// }
-	// return null;
-	// }
-
-	/**
-	 * 改变Session状态
-	 * 
-	 * @param status
-	 *            {true:踢出,false:激活}
-	 * @param sessionId
-	 * @return
-	 */
-	public Map<String, Object> changeSessionStatus(Boolean status, String sessionIds) {
-		Map<String, Object> map = new HashMap<String, Object>();
-		try {
-			String[] sessionIdArray = null;
-			if (sessionIds.indexOf(",") == -1) {
-				sessionIdArray = new String[] { sessionIds };
-			} else {
-				sessionIdArray = sessionIds.split(",");
-			}
-			for (String id : sessionIdArray) {
-				Session session = shiroSessionRepository.getSession(id);
-				SessionStatus sessionStatus = new SessionStatus();
-				sessionStatus.setOnlineStatus(status);
-				session.setAttribute(ShiroConstants.SESSION_STATUS, sessionStatus);
-				customShiroSessionDAO.update(session);
-			}
-			map.put("status", 200);
-			map.put("sessionStatus", status ? 1 : 0);
-			map.put("sessionStatusText", status ? "踢出" : "激活");
-			map.put("sessionStatusTextTd", status ? "有效" : "已踢出");
-		} catch (Exception e) {
-			LoggerUtils.fmtError(getClass(), e, "改变Session状态错误,sessionId[%s]", sessionIds);
-			map.put("status", 500);
-			map.put("message", "改变失败,有可能Session不存在,请刷新再试!");
-		}
-		return map;
-	}
-
-	// /**
-	// * 查询要禁用的用户是否在线。
-	// *
-	// * @param id
-	// * 用户ID
-	// * @param status
-	// * 用户状态
-	// */
-	// public void forbidUserById(Long id, Integer status) {
-	// // 获取所有在线用户
-	// for (UserOnlineBo bo : getAllUser()) {
-	// Long userId = bo.getId();
-	// // 匹配用户ID
-	// if (userId.equals(id)) {
-	// // 获取用户Session
-	// Session session = shiroSessionRepository.getSession(bo.getSessionId());
-	// // 标记用户Session
-	// SessionStatus sessionStatus = (SessionStatus)
-	// session.getAttribute(ShiroConstants.SESSION_STATUS);
-	// // 是否踢出 true:有效,false:踢出。
-	// sessionStatus.setOnlineStatus(status == 1);
-	// // 更新Session
-	// customShiroSessionDAO.update(session);
-	// }
-	// }
-	// }
-
-	public void setShiroSessionRepository(ShiroSessionRepository shiroSessionRepository) {
-		this.shiroSessionRepository = shiroSessionRepository;
-	}
-
-	public void setCustomShiroSessionDAO(CustomShiroSessionDAO customShiroSessionDAO) {
-		this.customShiroSessionDAO = customShiroSessionDAO;
-	}
-}
+package com.goafanti.core.shiro.session;
+
+import java.io.Serializable;
+import java.util.Collection;
+import java.util.Date;
+
+import javax.servlet.ServletRequest;
+import javax.servlet.ServletResponse;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.apache.shiro.session.InvalidSessionException;
+import org.apache.shiro.session.Session;
+import org.apache.shiro.session.UnknownSessionException;
+import org.apache.shiro.session.mgt.SessionContext;
+import org.apache.shiro.session.mgt.SessionKey;
+import org.apache.shiro.session.mgt.SimpleSession;
+import org.apache.shiro.web.servlet.Cookie;
+import org.apache.shiro.web.servlet.ShiroHttpServletRequest;
+import org.apache.shiro.web.servlet.SimpleCookie;
+import org.apache.shiro.web.session.mgt.DefaultWebSessionManager;
+import org.apache.shiro.web.util.WebUtils;
+
+import com.goafanti.common.utils.StringUtils;
+
+public class CustomSessionManager extends DefaultWebSessionManager {
+	public CustomSessionManager() {
+		super();
+	}
+
+	@Override
+	protected Serializable getSessionId(ServletRequest request, ServletResponse response) {
+		String sid = request.getParameter("token");
+		if (StringUtils.isNotBlank(sid)) {
+			// 是否将sid保存到cookie,浏览器模式下使用此参数。
+			if (WebUtils.isTrue(request, "AFT_SID")) {
+				HttpServletRequest rq = (HttpServletRequest) request;
+				HttpServletResponse rs = (HttpServletResponse) response;
+				Cookie template = getSessionIdCookie();
+				Cookie cookie = new SimpleCookie(template);
+				cookie.setValue(sid);
+				cookie.saveTo(rq, rs);
+			}
+			// 设置当前session状态
+			request.setAttribute(ShiroHttpServletRequest.REFERENCED_SESSION_ID_SOURCE, ShiroHttpServletRequest.URL_SESSION_ID_SOURCE);
+			request.setAttribute(ShiroHttpServletRequest.REFERENCED_SESSION_ID, sid);
+			request.setAttribute(ShiroHttpServletRequest.REFERENCED_SESSION_ID_IS_VALID, Boolean.TRUE);
+			return sid;
+		} else {
+			return super.getSessionId(request, response);
+		}
+	}
+
+	@Override
+	public void validateSessions() {
+		super.validateSessions();
+	}
+
+	protected Session retrieveSession(SessionKey sessionKey) {
+		try {
+			return super.retrieveSession(sessionKey);
+		} catch (UnknownSessionException e) {
+			// 获取不到SESSION不抛出异常
+			return null;
+		}
+	}
+
+	public Date getStartTimestamp(SessionKey key) {
+		try {
+			return super.getStartTimestamp(key);
+		} catch (InvalidSessionException e) {
+			// 获取不到SESSION不抛出异常
+			return null;
+		}
+	}
+
+	public Date getLastAccessTime(SessionKey key) {
+		try {
+			return super.getLastAccessTime(key);
+		} catch (InvalidSessionException e) {
+			// 获取不到SESSION不抛出异常
+			return null;
+		}
+	}
+
+	public long getTimeout(SessionKey key) {
+		try {
+			return super.getTimeout(key);
+		} catch (InvalidSessionException e) {
+			// 获取不到SESSION不抛出异常
+			return 0;
+		}
+	}
+
+	public void setTimeout(SessionKey key, long maxIdleTimeInMillis) {
+		try {
+			super.setTimeout(key, maxIdleTimeInMillis);
+		} catch (InvalidSessionException e) {
+			// 获取不到SESSION不抛出异常
+		}
+	}
+
+	public void touch(SessionKey key) {
+		try {
+			super.touch(key);
+		} catch (InvalidSessionException e) {
+			// 获取不到SESSION不抛出异常
+		}
+	}
+
+	public String getHost(SessionKey key) {
+		try {
+			return super.getHost(key);
+		} catch (InvalidSessionException e) {
+			// 获取不到SESSION不抛出异常
+			return null;
+		}
+	}
+
+	public Collection<Object> getAttributeKeys(SessionKey key) {
+		try {
+			return super.getAttributeKeys(key);
+		} catch (InvalidSessionException e) {
+			// 获取不到SESSION不抛出异常
+			return null;
+		}
+	}
+
+	public Object getAttribute(SessionKey sessionKey, Object attributeKey) {
+		try {
+			return super.getAttribute(sessionKey, attributeKey);
+		} catch (InvalidSessionException e) {
+			// 获取不到SESSION不抛出异常
+			return null;
+		}
+	}
+
+	public void setAttribute(SessionKey sessionKey, Object attributeKey, Object value) {
+		try {
+			super.setAttribute(sessionKey, attributeKey, value);
+		} catch (InvalidSessionException e) {
+			// 获取不到SESSION不抛出异常
+		}
+	}
+
+	public Object removeAttribute(SessionKey sessionKey, Object attributeKey) {
+		try {
+			return super.removeAttribute(sessionKey, attributeKey);
+		} catch (InvalidSessionException e) {
+			// 获取不到SESSION不抛出异常
+			return null;
+		}
+	}
+
+	public void stop(SessionKey key) {
+		try {
+			super.stop(key);
+		} catch (InvalidSessionException e) {
+			// 获取不到SESSION不抛出异常
+		}
+	}
+
+	public void checkValid(SessionKey key) {
+		try {
+			super.checkValid(key);
+		} catch (InvalidSessionException e) {
+			// 获取不到SESSION不抛出异常
+		}
+	}
+
+	@Override
+	protected Session doCreateSession(SessionContext context) {
+		try {
+			return super.doCreateSession(context);
+		} catch (IllegalStateException e) {
+			return null;
+		}
+	}
+
+	@Override
+	protected Session newSessionInstance(SessionContext context) {
+		Session session = super.newSessionInstance(context);
+		session.setTimeout(getGlobalSessionTimeout());
+		return session;
+	}
+
+	@Override
+	public Session start(SessionContext context) {
+		try {
+			return super.start(context);
+		} catch (NullPointerException e) {
+			SimpleSession session = new SimpleSession();
+			session.setId(0);
+			return session;
+		}
+	}
+
+	public Session getSession(String sessionId) {
+		return sessionDAO.readSession(sessionId);
+	}
+}

+ 8 - 0
src/main/java/com/goafanti/customer/bo/BusinessListBo.java

@@ -23,6 +23,8 @@ public class BusinessListBo {
 	private String endDate;
 	/** 业务创建时间 **/
 	private String createTime;
+	/** 更新时间 **/
+	private String updateTime;
 	/** 业务字典ID **/
 	private String businessGlossoryId;
 	
@@ -92,6 +94,12 @@ public class BusinessListBo {
 	public void setCreateTime(String createTime) {
 		this.createTime = createTime;
 	}
+	public String getUpdateTime() {
+		return updateTime;
+	}
+	public void setUpdateTime(String updateTime) {
+		this.updateTime = updateTime;
+	}
 	public String getBusinessGlossoryId() {
 		return businessGlossoryId;
 	}

+ 12 - 2
src/main/java/com/goafanti/customer/bo/CustomerListOut.java

@@ -12,7 +12,10 @@ public class CustomerListOut extends CustomerListIn{
 	
 	/** 创建时间 **/
 	private String createTime;
-
+	
+	/** 营销员姓名 **/
+	private String adminName;
+	
 	public String getUid() {
 		return uid;
 	}
@@ -44,6 +47,13 @@ public class CustomerListOut extends CustomerListIn{
 	public void setCreateTime(String createTime) {
 		this.createTime = createTime;
 	}
-	
+
+	public String getAdminName() {
+		return adminName;
+	}
+
+	public void setAdminName(String adminName) {
+		this.adminName = adminName;
+	}
 	
 }

+ 6 - 6
src/main/java/com/goafanti/customer/controller/CustomerApiController.java

@@ -486,7 +486,7 @@ public class CustomerApiController extends BaseApiController{
 	 * @throws ParseException
 	 */
 	@RequestMapping(value = "/customerStatistics",method = RequestMethod.GET)
-	public Result customerStatistics(String startDate,String endDate,String timeSpan,String depId,String businessGlossoryId,Integer pageNo, Integer pageSize) throws ParseException{
+	public Result customerStatistics(String startDate,String endDate,String timeSpan,String depNo,String businessGlossoryId,Integer pageNo, Integer pageSize) throws ParseException{
 		Result res = new Result();
 		Date sDate = null;
 		Date eDate = null;
@@ -507,7 +507,7 @@ public class CustomerApiController extends BaseApiController{
 				sDate = DateUtils.getLastDayOfLastYear(date);
 			}		
 		}
-		res.setData(customerService.customerStatistics(sDate,eDate,depId,businessGlossoryId,pageNo,pageSize));
+		res.setData(customerService.customerStatistics(sDate,eDate,depNo,businessGlossoryId,pageNo,pageSize));
 		return res;
 	}
 	
@@ -524,7 +524,7 @@ public class CustomerApiController extends BaseApiController{
 	 * @throws ParseException 
 	 */
 	@RequestMapping(value = "/businessStatistic", method = RequestMethod.GET)
-	public Result businessStatistic(String startDate,String endDate,String timeSpan,String depId,String businessGlossoryId,Integer pageNo, Integer pageSize) throws ParseException{
+	public Result businessStatistic(String startDate,String endDate,String timeSpan,String depNo,String businessGlossoryId,Integer pageNo, Integer pageSize) throws ParseException{
 		Result res = new Result();
 		Date sDate = null;
 		Date eDate = null;
@@ -545,7 +545,7 @@ public class CustomerApiController extends BaseApiController{
 				sDate = DateUtils.getLastDayOfLastYear(date);
 			}		
 		}
-		res.setData(customerService.businessStatistic(sDate,eDate,depId,businessGlossoryId,pageNo,pageSize));
+		res.setData(customerService.businessStatistic(sDate,eDate,depNo,businessGlossoryId,pageNo,pageSize));
 		return res;
 	}
 	
@@ -563,7 +563,7 @@ public class CustomerApiController extends BaseApiController{
 	 */
 
 	@RequestMapping(value = "/followStatistic",method = RequestMethod.GET)
-	public Result followStatistic(String startDate,String endDate,String timeSpan,String depId,Integer pageNo, Integer pageSize) throws ParseException{
+	public Result followStatistic(String startDate,String endDate,String timeSpan,String depNo,Integer pageNo, Integer pageSize) throws ParseException{
 		Result res = new Result();
 		Date sDate = null;
 		Date eDate = null;
@@ -584,7 +584,7 @@ public class CustomerApiController extends BaseApiController{
 				sDate = DateUtils.getLastDayOfLastYear(date);
 			}		
 		}
-		res.setData(customerService.followStatistic(sDate, eDate, depId, pageNo, pageSize));
+		res.setData(customerService.followStatistic(sDate, eDate, depNo, pageNo, pageSize));
 		return res;
 	}
 	

+ 3 - 3
src/main/java/com/goafanti/customer/service/CustomerService.java

@@ -234,7 +234,7 @@ public interface CustomerService {
 	 * @param depId
 	 * @return
 	 */
-	Pagination<StatisticBo> customerStatistics(Date sDate, Date eDate, String depId, String businessGlossoryId, Integer pageNo, Integer pageSize);
+	Pagination<StatisticBo> customerStatistics(Date sDate, Date eDate, String depNo, String businessGlossoryId, Integer pageNo, Integer pageSize);
 	
 	/**
 	 * 业务进度统计
@@ -242,7 +242,7 @@ public interface CustomerService {
 	 * @param eDate
 	 * @return
 	 */
-	Pagination<StatisticBo> businessStatistic(Date sDate, Date eDate, String depId, String businessGlossoryId,Integer pageNo, Integer pageSize);
+	Pagination<StatisticBo> businessStatistic(Date sDate, Date eDate, String depNo, String businessGlossoryId,Integer pageNo, Integer pageSize);
 	
 	/**
 	 * 拜访统计
@@ -250,5 +250,5 @@ public interface CustomerService {
 	 * @param eDate
 	 * @return
 	 */
-	Pagination<StatisticBo> followStatistic(Date sDate, Date eDate, String depId, Integer pageNo, Integer pageSize);
+	Pagination<StatisticBo> followStatistic(Date sDate, Date eDate, String depNo, Integer pageNo, Integer pageSize);
 }

+ 6 - 6
src/main/java/com/goafanti/customer/service/impl/CustomerServiceImpl.java

@@ -689,11 +689,11 @@ public class CustomerServiceImpl  extends BaseMybatisDao<UserMapper> implements
 
 	@SuppressWarnings("unchecked")
 	@Override
-	public Pagination<StatisticBo> customerStatistics(Date sDate, Date eDate, String depId, String businessGlossoryId, Integer pageNo, Integer pageSize) {
+	public Pagination<StatisticBo> customerStatistics(Date sDate, Date eDate, String depNo, String businessGlossoryId, Integer pageNo, Integer pageSize) {
 		Map<String,Object> params = new HashMap<String,Object>();
 		if(null != sDate) params.put("sDate", sDate);
 		if(null != eDate) params.put("eDate", eDate);
-		if(StringUtils.isNotBlank(depId)) params.put("departmentId", depId);
+		if(StringUtils.isNotBlank(depNo)) params.put("depNo", depNo);
 		if(StringUtils.isNotBlank(businessGlossoryId)) params.put("businessGlossoryId", businessGlossoryId);
 		Pagination<StatisticBo> page = (Pagination<StatisticBo>)findPage("customerStatisticsList", "customerStatisticsCount", params, pageNo, pageSize);
 		return page;
@@ -701,11 +701,11 @@ public class CustomerServiceImpl  extends BaseMybatisDao<UserMapper> implements
 
 	@SuppressWarnings("unchecked")
 	@Override
-	public Pagination<StatisticBo> businessStatistic(Date sDate, Date eDate,String depId, String businessGlossoryId,Integer pageNo, Integer pageSize) {
+	public Pagination<StatisticBo> businessStatistic(Date sDate, Date eDate,String depNo, String businessGlossoryId,Integer pageNo, Integer pageSize) {
 		Map<String,Object> params = new HashMap<String,Object>();
 		if(null != sDate) params.put("sDate", sDate);
 		if(null != eDate) params.put("eDate", eDate);
-		if(StringUtils.isNotBlank(depId)) params.put("departmentId", depId);
+		if(StringUtils.isNotBlank(depNo)) params.put("depNo", depNo);
 		if(StringUtils.isNotBlank(businessGlossoryId)) params.put("businessGlossoryId", businessGlossoryId);
 		Pagination<StatisticBo> page = (Pagination<StatisticBo>)findPage("businessStatisticList", "businessStatisticCount", params, pageNo, pageSize);
 		return page;
@@ -713,11 +713,11 @@ public class CustomerServiceImpl  extends BaseMybatisDao<UserMapper> implements
 
 	@SuppressWarnings("unchecked")
 	@Override
-	public Pagination<StatisticBo> followStatistic(Date sDate, Date eDate, String depId, Integer pageNo, Integer pageSize) {
+	public Pagination<StatisticBo> followStatistic(Date sDate, Date eDate, String depNo, Integer pageNo, Integer pageSize) {
 		Map<String,Object> params = new HashMap<String,Object>();
 		if(null != sDate) params.put("sDate", sDate);
 		if(null != eDate) params.put("eDate", eDate);
-		if(StringUtils.isNotBlank(depId)) params.put("departmentId", depId);
+		if(StringUtils.isNotBlank(depNo)) params.put("depNo", depNo);
 		Pagination<StatisticBo> page = (Pagination<StatisticBo>)findPage("followStatisticList", "followStatisticCount", params, pageNo, pageSize);
 		return page;
 	}

+ 157 - 0
src/main/java/com/goafanti/permission/bo/PermissionBo.java

@@ -0,0 +1,157 @@
+package com.goafanti.permission.bo;
+
+import java.util.Date;
+import java.util.List;
+
+public class PermissionBo {
+	private String id;
+
+	/**
+	 * 权限对应的url path
+	 */
+	private String	url;
+
+	/**
+	 * 权限名字
+	 */
+	private String	name;
+	
+	private String createId;
+	
+	private Date createTime;
+	
+	private Date updateTime;
+	
+	private String deletedSign;
+	
+	private String autNo;
+	
+	private String hierarchies;
+	
+	private String status;
+	
+	private String showOrder;
+	
+	private String superId;	
+	
+	private List<PermissionBo> children;
+	
+	private String key;
+	
+
+	
+
+	public String getKey() {
+		return key;
+	}
+
+	public void setKey(String key) {
+		this.key = key;
+	}
+
+	public List<PermissionBo> getChildren() {
+		return children;
+	}
+
+	public void setChildren(List<PermissionBo> children) {
+		this.children = children;
+	}
+
+	public String getCreateId() {
+		return createId;
+	}
+
+	public void setCreateId(String createId) {
+		this.createId = createId;
+	}
+
+	public Date getCreateTime() {
+		return createTime;
+	}
+
+	public void setCreateTime(Date createTime) {
+		this.createTime = createTime;
+	}
+
+	public Date getUpdateTime() {
+		return updateTime;
+	}
+
+	public void setUpdateTime(Date updateTime) {
+		this.updateTime = updateTime;
+	}
+
+	public String getDeletedSign() {
+		return deletedSign;
+	}
+
+	public void setDeletedSign(String deletedSign) {
+		this.deletedSign = deletedSign;
+	}
+
+	public String getAutNo() {
+		return autNo;
+	}
+
+	public void setAutNo(String autNo) {
+		this.autNo = autNo;
+	}
+
+	public String getHierarchies() {
+		return hierarchies;
+	}
+
+	public void setHierarchies(String hierarchies) {
+		this.hierarchies = hierarchies;
+	}
+
+	public String getStatus() {
+		return status;
+	}
+
+	public void setStatus(String status) {
+		this.status = status;
+	}
+
+	public String getShowOrder() {
+		return showOrder;
+	}
+
+	public void setShowOrder(String showOrder) {
+		this.showOrder = showOrder;
+	}
+
+	public String getSuperId() {
+		return superId;
+	}
+
+	public void setSuperId(String superId) {
+		this.superId = superId;
+	}
+
+	public String getId() {
+		return id;
+	}
+
+	public void setId(String id) {
+		this.id = id;
+	}
+
+	public String getUrl() {
+		return url;
+	}
+
+	public void setUrl(String url) {
+		this.url = url;
+	}
+
+	public String getName() {
+		return name;
+	}
+
+	public void setName(String name) {
+		this.name = name;
+	}
+	
+	
+}

+ 136 - 0
src/main/java/com/goafanti/permission/controller/NewPermissionApiController.java

@@ -0,0 +1,136 @@
+package com.goafanti.permission.controller;
+
+import javax.annotation.Resource;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.bind.annotation.RestController;
+
+import com.goafanti.common.bo.Result;
+import com.goafanti.common.constant.ErrorConstants;
+import com.goafanti.common.controller.BaseApiController;
+import com.goafanti.common.dao.PermissionMapper;
+import com.goafanti.common.model.Permission;
+import com.goafanti.common.utils.StringUtils;
+import com.goafanti.permission.service.PermissionService;
+
+@RestController
+@RequestMapping("api/admin")
+public class NewPermissionApiController extends BaseApiController {
+	@Resource
+	private PermissionService permissionService;
+	@Autowired
+	PermissionMapper		permissionMapper;
+	/**权限管理列表 **/
+	@RequestMapping(value = "/permissions", method = RequestMethod.POST)
+	public Result permissions() {
+		Result res = new Result();
+		res.setData(permissionService.findPermissionsAll());
+		return res;
+	}
+	
+	/**权限管理最上级新增 **/
+	@RequestMapping(value = "/addSupPermission" , method = RequestMethod.POST)
+	public Result addSupPermission(Permission record ){
+		Result res = new Result();
+		if(StringUtils.isBlank(record.getName())){
+			res.getError().add(buildError("","权限名不能为空"));
+			return res;
+		}
+		String aut=permissionMapper.selectAutNoByNamei(record.getName());
+		if(aut!=null){
+			res.getError().add(buildError("","权限已存在"));
+			return res;
+		}
+		res.setData(permissionService.insertn(record));
+		return res;
+	}
+	/**新增上级名称自动生成 **/
+	@RequestMapping(value = "/selectSuperIdById" , method = RequestMethod.POST)
+	public Permission selectSuperIdById(String id ){
+		return permissionService.selectSuperIdById(id);
+	}
+	
+	/**权限管理新增 **/
+	@RequestMapping(value = "/addPermission" , method = RequestMethod.POST)
+	public Result addPermission(Permission record ){
+		Result res = new Result();
+		if(StringUtils.isBlank(record.getName())|| StringUtils.isBlank(record.getUrl())
+				|| StringUtils.isBlank(record.getSuperId())){
+			res.getError().add(buildError("","名称、路径、上级不能为空"));
+			return res;
+		}
+		String aut=permissionMapper.selectAutNoByNamei(record.getName());
+		if(aut!=null){
+			res.getError().add(buildError("","权限已存在"));
+			return res;
+		}
+		String supaut=permissionMapper.selectAutNoByName(permissionMapper.selectIdByName(record.getSuperId()));
+		if(supaut.length()>=7){
+			res.getError().add(buildError("","权限层级超限"));
+			return res;
+		}
+		res.setData(permissionService.insertSubordinate(record));
+		return res;
+	}
+	
+	/**删除列表信息**/
+	@RequestMapping(value = "/deleteById" , method = RequestMethod.POST)
+	public Result deleteById(String id){
+		Result res = new Result();
+		if(StringUtils.isBlank(id)){
+			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "id"));
+			return res;
+		}
+		/*Permission permission=permissionMapper.selectAllById(id);
+		String superId=permission.getSuperId();*/
+		int subordinate=permissionMapper.selectCountBySuperId(id);
+		if(subordinate>0){
+			res.getError().add(buildError("","存在下级权限不能删除"));
+			return res;
+		}
+		res.setData(permissionService.deleteById(id));
+		return res;
+	}
+	
+	/**编辑页面数据读取**/
+	@RequestMapping(value = "/selectAllById" , method = RequestMethod.POST)
+	public Result selectAllById(String id){
+		Result res = new Result();
+		res.setData(permissionService.selectAllById(id));
+		return res;
+	}
+	
+	/**上级权限自动补全查询**/
+	@RequestMapping(value = "/selectName" , method = RequestMethod.POST)
+	public Result selectName(String name){
+		Result res = new Result();
+		res.setData(permissionService.selectName(name));
+		return res;
+	}
+	
+	/**修改信息**/
+	@RequestMapping(value = "/updateById" , method = RequestMethod.POST)
+	public Result updateById(Permission record ){
+		Result res = new Result();
+		if(StringUtils.isBlank(record.getName())|| StringUtils.isBlank(record.getUrl())
+				|| StringUtils.isBlank(record.getSuperId())){
+			res.getError().add(buildError("","名称、路径、上级不能为空"));
+			return res;
+		}
+		String pname=permissionMapper.selectAutNoByNamei(record.getSuperId());
+		if(StringUtils.isBlank(pname)){
+			res.getError().add(buildError("","上级权限不匹配"));
+			return res;
+		}
+		String supaut=permissionMapper.selectAutNoByNamei(record.getSuperId());
+		if(supaut.length()>=7){
+			res.getError().add(buildError("","权限层级超限"));
+			return res;
+		}
+		res.setData(permissionService.updateById(record));
+		return res;
+	}
+	
+}

+ 18 - 0
src/main/java/com/goafanti/permission/service/PermissionService.java

@@ -1,6 +1,7 @@
 package com.goafanti.permission.service;
 
 import java.util.List;
+import java.util.Map;
 import java.util.Set;
 
 import com.goafanti.common.model.Permission;
@@ -15,4 +16,21 @@ public interface PermissionService {
 	List<Permission> findPermissions();
 
 	int insert(List<Permission> records);
+	
+	int insertn(Permission record);
+	
+	Permission selectSuperIdById(String id);
+	
+	int insertSubordinate(Permission record);
+	
+	int deleteById(String id);
+	
+	Permission selectAllById(String id);
+	
+	List<Permission> selectName(String name);
+	
+	int updateById(Permission record);
+	
+	Map<String,Object> findPermissionsAll();
+
 }

+ 253 - 0
src/main/java/com/goafanti/permission/service/impl/PermissionServiceImpl.java

@@ -1,7 +1,11 @@
 package com.goafanti.permission.service.impl;
 
+import java.util.Date;
+import java.util.HashMap;
 import java.util.List;
+import java.util.Map;
 import java.util.Set;
+import java.util.UUID;
 
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
@@ -12,7 +16,9 @@ import com.goafanti.common.dao.UserMapper;
 import com.goafanti.common.dao.UserRoleMapper;
 import com.goafanti.common.model.Permission;
 import com.goafanti.core.mybatis.BaseMybatisDao;
+import com.goafanti.core.shiro.token.TokenManager;
 import com.goafanti.permission.service.PermissionService;
+import com.goafanti.permission.bo.PermissionBo;
 
 @Service
 public class PermissionServiceImpl extends BaseMybatisDao<PermissionMapper> implements PermissionService {
@@ -47,4 +53,251 @@ public class PermissionServiceImpl extends BaseMybatisDao<PermissionMapper> impl
 		return permissionMapper.deleteByPrimaryKeys(ids);
 	}
 
+	@Override
+	public int insertn(Permission record) {
+		String id = UUID.randomUUID().toString();
+		Date now = new Date();
+		record.setId(id);
+		record.setUrl(record.getUrl());
+		record.setName(record.getName());
+		String createId=permissionMapper.selectAdminNameById(TokenManager.getAdminId());
+		record.setCreateId(createId);
+		record.setCreateTime(now);
+		record.setUpdateTime(now);
+		record.setDeletedSign("0");
+		int Count=permissionMapper.selectAutNoCount("PM");
+		if(Count<10){
+			String aut="PM0"+Count;
+			String sid=permissionMapper.selectIdByAutNo(aut);
+			while(sid!=null){
+				Count=Count+1;				
+				if(Count>=10){
+					aut="PM"+Count;	
+				}else{
+					aut="PM0"+Count;
+				}
+				sid=permissionMapper.selectIdByAutNo(aut);			
+			}
+			record.setAutNo(aut);
+		}
+		if(Count>=10){
+			String aut="PM"+Count;
+			String sid=permissionMapper.selectIdByAutNo(aut);
+			while(sid!=null){
+				Count=Count+1;				
+				aut="PM"+Count;
+				sid=permissionMapper.selectIdByAutNo(aut);				
+			}
+			record.setAutNo(aut);
+		}
+		record.setHierarchies("1");//1第一层
+		record.setStatus("0");//0正常 1解除
+		record.setShowOrder("0");//0
+		record.setSuperId(permissionMapper.selectIdByName("平台超级模块"));//顶级为PM	
+		permissionMapper.insertn(record);
+		return 1;
+	}
+
+	@Override
+	public Permission selectSuperIdById(String id) {
+		return permissionMapper.selectSuperIdById(id);
+	}
+
+	@Override
+	public int insertSubordinate(Permission record) {
+		String id = UUID.randomUUID().toString();
+		Date now = new Date();
+		record.setId(id);
+		record.setUrl(record.getUrl());
+		record.setName(record.getName());
+		String createId=permissionMapper.selectAdminNameById(TokenManager.getAdminId());
+		record.setCreateId(createId);
+		record.setCreateTime(now);
+		record.setUpdateTime(now);
+		record.setDeletedSign("0");
+		String autNo=permissionMapper.selectAutNoByNamei(record.getSuperId());
+		int Count=permissionMapper.selectAutNoCount(record.getSuperId());
+		if(Count<10){
+			String aut=autNo+"0"+Count;
+			String sid=permissionMapper.selectIdByAutNo(aut);
+			while(sid!=null){
+				Count=Count+1;				
+				if(Count>=10){
+					aut=autNo+Count;	
+				}else{
+					aut=autNo+"0"+Count;
+				}
+				sid=permissionMapper.selectIdByAutNo(aut);			
+			}
+			record.setAutNo(aut);
+		}
+		if(Count>=10){
+			String aut=autNo+Count;
+			String sid=permissionMapper.selectIdByAutNo(aut);
+			while(sid!=null){
+				Count=Count+1;				
+				aut=autNo+Count;
+				sid=permissionMapper.selectIdByAutNo(aut);				
+			}
+			record.setAutNo(aut);
+		}
+		record.setHierarchies("0");//0下层
+		record.setStatus("0");//0正常 1解除
+		record.setShowOrder("0");//正常
+		record.setSuperId(permissionMapper.selectIdByName(record.getSuperId()));//上级名称	
+		permissionMapper.insertn(record);
+		return 1;
+	}
+
+	@Override
+	public int deleteById(String id) {
+		permissionMapper.deleteById(id);
+		return 1;
+	}
+
+	@Override
+	public Permission selectAllById(String id) {
+		Permission permission=permissionMapper.selectAllById(id);
+		permission.setSuperId(permissionMapper.selectNameById(permission.getSuperId()));
+		return permissionMapper.selectAllById(id);
+	}
+
+	@Override
+	public List<Permission> selectName(String name) {
+		return permissionMapper.selectName(name);
+	}
+
+	@Override
+	public int updateById(Permission record) {
+		Date now=new Date();
+		record.setUpdateTime(now);
+		if(record.getSuperId().equals("平台超级模块")){
+			record.setHierarchies("1");
+		}else{
+			record.setHierarchies("0");
+		}
+		record.setSuperId(permissionMapper.selectIdByName(record.getSuperId()));
+		String autNo=permissionMapper.selectAutNoByName(record.getSuperId());
+		int Count=permissionMapper.selectAutNoCount(record.getSuperId());
+		if(Count<10){
+			String aut=autNo+"0"+Count;
+			String sid=permissionMapper.selectIdByAutNo(aut);
+			while(sid!=null){
+				Count=Count+1;				
+				if(Count>=10){
+					aut=autNo+Count;	
+				}else{
+					aut=autNo+"0"+Count;
+				}
+				sid=permissionMapper.selectIdByAutNo(aut);			
+			}
+			record.setAutNo(aut);
+		}
+		if(Count>=10){
+			String aut=autNo+Count;
+			String sid=permissionMapper.selectIdByAutNo(aut);
+			while(sid!=null){
+				Count=Count+1;				
+				aut=autNo+Count;
+				sid=permissionMapper.selectIdByAutNo(aut);				
+			}
+			record.setAutNo(aut);
+		}
+		permissionMapper.updateById(record);
+		//*******下级编号修改
+		int n=0;
+		List<Permission> Nos =permissionMapper.selectIDNBySuperId(record.getName());
+		for(Permission i:Nos){			
+			autNo=permissionMapper.selectAutNoByName(i.getSuperId());
+			if(n<10){
+				String aut=autNo+"0"+n;			
+				if(n>=10){
+					aut=autNo+n;	
+				}else{
+					aut=autNo+"0"+n;
+				}	
+				i.setAutNo(aut);
+			}
+			if(n>=10){
+				String aut=autNo+n;			
+				aut=autNo+n;	
+				i.setAutNo(aut);
+			}
+			permissionMapper.updateByNumber(i);
+			n++;
+			
+			//*******下下级编号修改
+			int m=0;
+			List<Permission> Noss =permissionMapper.selectIDNBySuperId(i.getName());
+			for(Permission o:Noss){			
+				autNo=permissionMapper.selectAutNoByName(o.getSuperId());
+				if(m<10){
+					String aut=autNo+"0"+m;			
+					if(m>=10){
+						aut=autNo+m;	
+					}else{
+						aut=autNo+"0"+m;
+					}	
+					o.setAutNo(aut);
+				}
+				if(m>=10){
+					String aut=autNo+m;			
+					aut=autNo+m;	
+					o.setAutNo(aut);
+				}
+				permissionMapper.updateByNumber(o);
+				m++;
+				//*******下下级编号修改
+				int z=0;
+				List<Permission> Nosss =permissionMapper.selectIDNBySuperId(o.getName());
+				for(Permission p:Nosss){			
+					autNo=permissionMapper.selectAutNoByName(p.getSuperId());
+					if(z<10){
+						String aut=autNo+"0"+z;			
+						if(z>=10){
+							aut=autNo+z;	
+						}else{
+							aut=autNo+"0"+z;
+						}	
+						p.setAutNo(aut);
+					}
+					if(z>=10){
+						String aut=autNo+z;			
+						aut=autNo+z;	
+						p.setAutNo(aut);
+					}
+					permissionMapper.updateByNumber(p);
+					z++;
+				}
+			}
+			
+		}
+		return permissionMapper.updateById(record);
+	}
+
+	@Override
+	public Map<String,Object> findPermissionsAll() {
+		Map<String,Object> params = new HashMap<String, Object>();
+		List<PermissionBo> one=permissionMapper.selectOneAll();	
+		for (PermissionBo i:one){
+			i.setKey(i.getId());
+			List<PermissionBo> two=permissionMapper.selectAllBySuperId(i.getId());
+			for(PermissionBo o:two){
+				o.setChildren(permissionMapper.selectAllBySuperId(o.getId()));
+				o.setKey(o.getId());
+				List<PermissionBo> three=permissionMapper.selectAllBySuperId(o.getId());
+				for(PermissionBo p:three){
+					p.setChildren(permissionMapper.selectAllBySuperId(p.getId()));
+					p.setKey(p.getId());					
+				}
+				o.setChildren(three);
+			}
+			i.setChildren(two);
+		}
+		params.put("one", one);
+		return params;
+	}
+	
+	
+
 }

+ 118 - 116
src/main/java/com/goafanti/user/controller/UserLoginController.java

@@ -1,116 +1,118 @@
-package com.goafanti.user.controller;
-
-import javax.annotation.Resource;
-import javax.servlet.http.HttpServletRequest;
-
-import org.apache.commons.lang3.StringUtils;
-import org.apache.shiro.web.util.SavedRequest;
-import org.apache.shiro.web.util.WebUtils;
-import org.springframework.stereotype.Controller;
-import org.springframework.ui.Model;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RequestMethod;
-import org.springframework.web.bind.annotation.ResponseBody;
-import org.springframework.web.servlet.ModelAndView;
-import org.springframework.web.servlet.view.RedirectView;
-
-import com.alibaba.fastjson.JSON;
-import com.alibaba.fastjson.JSONObject;
-import com.goafanti.common.bo.Result;
-import com.goafanti.common.constant.ErrorConstants;
-import com.goafanti.common.controller.BaseController;
-import com.goafanti.common.model.Admin;
-import com.goafanti.common.model.User;
-import com.goafanti.common.utils.TimeUtils;
-import com.goafanti.common.utils.VerifyCodeUtils;
-import com.goafanti.core.shiro.token.TokenManager;
-import com.goafanti.user.service.UserService;
-
-@Controller
-public class UserLoginController extends BaseController {
-	@Resource
-	private UserService userService;
-
-	@RequestMapping(value = "/login", method = RequestMethod.GET)
-	@ResponseBody
-	public Result login(HttpServletRequest request, Model model) {
-		Result res = new Result();
-		TokenManager.logout();
-		return res;
-	}
-
-	@RequestMapping(value = "/login", method = RequestMethod.POST)
-	public ModelAndView doLogin(User user, Boolean rememberMe, HttpServletRequest request, ModelAndView modelview) {
-		TokenManager.login(user, rememberMe);
-		RedirectView rv = new RedirectView();
-		rv.setUrl(request.getContextPath() + "/index");
-		rv.setExposeModelAttributes(false);
-		modelview.setView(rv);
-		return modelview;
-	}
-
-	/**
-	 * 用户登录
-	 * 
-	 * @param user
-	 * @param remember
-	 * @param request
-	 * @return
-	 */
-	@RequestMapping(value = "/signin", method = RequestMethod.POST)
-	@ResponseBody
-	public Result signin(User user, Boolean remember, HttpServletRequest request) {
-		Result res = new Result();
-		JSONObject jo = (JSONObject) JSON.toJSON(TokenManager.login(user, remember));
-		SavedRequest sr = WebUtils.getAndClearSavedRequest(request);
-		if (sr != null) {
-			jo.put("requestURI", sr.getRequestURI());
-			jo.put("queryString", sr.getQueryString());
-		}
-		res.setData(jo);
-		return res;
-	}
-
-	/**
-	 * 管理端登录
-	 * 
-	 * @param user
-	 * @param remember
-	 * @param request
-	 * @return
-	 */
-	@RequestMapping(value = "/managesignin", method = RequestMethod.POST)
-	@ResponseBody
-	public Result managesignin(Admin admin, Boolean remember, HttpServletRequest request) {
-		Result res = new Result();
-		res.setData(TokenManager.manageLogin(admin, remember));
-		return res;
-	}
-
-	/**
-	 * 忘记密码 使用手机号+手机验证码登录
-	 * 
-	 * @param mobile
-	 * @param mobileCode
-	 * @param type
-	 * @return
-	 */
-	@RequestMapping(value = "/mobileSigin", method = RequestMethod.POST)
-	@ResponseBody
-	public Result mobileSignIn(User user, String mobileCode) {
-		Result res = new Result();
-		if (StringUtils.isBlank(user.getMobile())) {
-			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "必须指定", "手机号"));
-			return res;
-		}
-		if (TimeUtils.checkOverTime("register")) {
-			res.getError().add(buildError(ErrorConstants.MCODE_OVERTIME_ERROR, "手机验证码超时失效"));
-			return res;
-		}
-		if (!TokenManager.getSession().getAttribute(VerifyCodeUtils.M_CODE).equals(mobileCode)) {
-			res.getError().add(buildError(ErrorConstants.MCODE_ERROR, "手机验证码错误"));
-			return res;
-		}
-		return res;
-	}
-}
+package com.goafanti.user.controller;
+
+import javax.annotation.Resource;
+import javax.servlet.http.HttpServletRequest;
+
+import org.apache.commons.lang3.StringUtils;
+import org.apache.shiro.SecurityUtils;
+import org.apache.shiro.web.util.SavedRequest;
+import org.apache.shiro.web.util.WebUtils;
+import org.springframework.stereotype.Controller;
+import org.springframework.ui.Model;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.bind.annotation.ResponseBody;
+import org.springframework.web.servlet.ModelAndView;
+import org.springframework.web.servlet.view.RedirectView;
+
+import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson.JSONObject;
+import com.goafanti.common.bo.Result;
+import com.goafanti.common.constant.ErrorConstants;
+import com.goafanti.common.controller.BaseController;
+import com.goafanti.common.model.Admin;
+import com.goafanti.common.model.User;
+import com.goafanti.common.utils.TimeUtils;
+import com.goafanti.common.utils.VerifyCodeUtils;
+import com.goafanti.core.shiro.token.TokenManager;
+import com.goafanti.user.service.UserService;
+
+@Controller
+public class UserLoginController extends BaseController {
+	@Resource
+	private UserService userService;
+
+	@RequestMapping(value = "/login", method = RequestMethod.GET)
+	@ResponseBody
+	public Result login(HttpServletRequest request, Model model) {
+		Result res = new Result();
+		TokenManager.logout();
+		return res;
+	}
+
+	@RequestMapping(value = "/login", method = RequestMethod.POST)
+	public ModelAndView doLogin(User user, Boolean rememberMe, HttpServletRequest request, ModelAndView modelview) {
+		TokenManager.login(user, rememberMe);
+		RedirectView rv = new RedirectView();
+		rv.setUrl(request.getContextPath() + "/index");
+		rv.setExposeModelAttributes(false);
+		modelview.setView(rv);
+		return modelview;
+	}
+
+	/**
+	 * 用户登录
+	 * 
+	 * @param user
+	 * @param remember
+	 * @param request
+	 * @return
+	 */
+	@RequestMapping(value = "/signin", method = RequestMethod.POST)
+	@ResponseBody
+	public Result signin(User user, Boolean remember, HttpServletRequest request) {
+		Result res = new Result();
+		JSONObject jo = (JSONObject) JSON.toJSON(TokenManager.login(user, remember));
+		SavedRequest sr = WebUtils.getAndClearSavedRequest(request);
+		if (sr != null) {
+			jo.put("requestURI", sr.getRequestURI());
+			jo.put("queryString", sr.getQueryString());
+		}
+		res.setToken(SecurityUtils.getSubject().getSession().getId());
+		res.setData(jo);
+		return res;
+	}
+
+	/**
+	 * 管理端登录
+	 * 
+	 * @param user
+	 * @param remember
+	 * @param request
+	 * @return
+	 */
+	@RequestMapping(value = "/managesignin", method = RequestMethod.POST)
+	@ResponseBody
+	public Result managesignin(Admin admin, Boolean remember, HttpServletRequest request) {
+		Result res = new Result();
+		res.setData(TokenManager.manageLogin(admin, remember));
+		return res;
+	}
+
+	/**
+	 * 忘记密码 使用手机号+手机验证码登录
+	 * 
+	 * @param mobile
+	 * @param mobileCode
+	 * @param type
+	 * @return
+	 */
+	@RequestMapping(value = "/mobileSigin", method = RequestMethod.POST)
+	@ResponseBody
+	public Result mobileSignIn(User user, String mobileCode) {
+		Result res = new Result();
+		if (StringUtils.isBlank(user.getMobile())) {
+			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "必须指定", "手机号"));
+			return res;
+		}
+		if (TimeUtils.checkOverTime("register")) {
+			res.getError().add(buildError(ErrorConstants.MCODE_OVERTIME_ERROR, "手机验证码超时失效"));
+			return res;
+		}
+		if (!TokenManager.getSession().getAttribute(VerifyCodeUtils.M_CODE).equals(mobileCode)) {
+			res.getError().add(buildError(ErrorConstants.MCODE_ERROR, "手机验证码错误"));
+			return res;
+		}
+		return res;
+	}
+}

+ 9 - 2
src/main/java/com/goafanti/user/controller/UserRegisterController.java

@@ -20,6 +20,7 @@ import com.goafanti.common.constant.AFTConstants;
 import com.goafanti.common.constant.ErrorConstants;
 import com.goafanti.common.controller.BaseController;
 import com.goafanti.common.enums.UserFields;
+import com.goafanti.common.enums.UserLevel;
 import com.goafanti.common.model.User;
 import com.goafanti.common.utils.PasswordUtil;
 import com.goafanti.common.utils.TimeUtils;
@@ -77,7 +78,7 @@ public class UserRegisterController extends BaseController {
 		} else {
 			User u = userService.selectByMobieAndType(user.getMobile().trim(), user.getType());
 			if (null != u) {
-					res.getError().add(buildError(ErrorConstants.USER_ALREADY_EXIST, "用户已存在"));
+					res.getError().add(buildError(ErrorConstants.USER_ALREADY_EXIST, "用户已存在"));
 			}
 		}
 		if (res.getError().isEmpty()) {
@@ -89,9 +90,15 @@ public class UserRegisterController extends BaseController {
 			Calendar now = Calendar.getInstance();
 			now.set(Calendar.MILLISECOND, 0);
 			us.setCreateTime(now.getTime());
+			us.setUpdateTime(now.getTime());
 			us.setPassword(passwordUtil.getEncryptPwd(us));
 			us.setLvl(0);
 			us.setSource(AFTConstants.USER_SOURCE_REGISTER);
+			us.setIsMember(AFTConstants.NO);
+			us.setStatus(AFTConstants.USER_STATUS_NORMAL);
+			us.setShareType(AFTConstants.USER_SHARE_PUBLIC);
+			us.setIdentifyName(StringUtils.isBlank(companyName)?"":companyName);
+			us.setLvl(UserLevel.GENERAL.getCode());
 			/*
 			List<Admin> admins = adminService.selectAllAdmin();
 			if (!admins.isEmpty()) {
@@ -100,7 +107,7 @@ public class UserRegisterController extends BaseController {
 			}
 			*/
 			us.setAid("2");//ID为"2"的管理员
-			userService.insertRegister(us, contacts, companyName, user.getUsername());
+			userService.insertRegister(us,companyName,contacts);
 		}
 
 		return res;

+ 1 - 1
src/main/java/com/goafanti/user/service/UserService.java

@@ -26,7 +26,7 @@ public interface UserService {
 
 	User selectByMobieAndType(String mobile, Integer type);
 
-	User insertRegister(User user, String companyName, String contacts, String username);
+	User insertRegister(User user, String unitName, String contacts);
 
 	UserPageHomeBo selectUserPageHomeBoByUserId(String userId);
 

+ 2 - 2
src/main/java/com/goafanti/user/service/impl/UserServiceImpl.java

@@ -56,7 +56,7 @@ public class UserServiceImpl extends BaseMybatisDao<UserMapper> implements UserS
 	private OrgIntellectualPropertyMapper	orgIntellectualPropertyMapper;
 
 	@Override
-	public User insertRegister(User user, String contacts, String unitName, String username) {
+	public User insertRegister(User user, String unitName, String contacts) {
 		userMapper.insert(user);
 		if (null != user.getType() && UserType.ORGANIZATION.getCode().equals(user.getType())) {
 			OrganizationIdentity organizationIdentity = new OrganizationIdentity();
@@ -80,7 +80,7 @@ public class UserServiceImpl extends BaseMybatisDao<UserMapper> implements UserS
 			ui.setAuditStatus(0);
 			ui.setProcess(0);
 			ui.setWrongCount(0);
-			ui.setUsername(StringUtils.isBlank(username) ? "" : username);
+			ui.setUsername(StringUtils.isBlank(unitName) ? "" : unitName);
 			userIdentityMapper.insert(ui);
 		}
 

+ 1 - 1
src/main/resources/props/error.properties

@@ -81,7 +81,7 @@ MCODE_EMPTY_ERROR=\u624B\u673A\u9A8C\u8BC1\u7801\u4E0D\u80FD\u4E3A\u7A7A\uFF01
 
 MCODE_OVERTIME_ERROR=\u624B\u673A\u9A8C\u8BC1\u7801\u8D85\u65F6\u5931\u6548\uFF01
 
-RESET_CODE_ERROR=\u9875\u9762\u5931\u6548,\u8BF7\u91CD\u65B0\u83B7\u53D6\u9A8C\u8BC1\u7801\uFF01
+RESET_CODE_ERROR=\u9A8C\u8BC1\u7801\u9519\u8BEF,\u8BF7\u91CD\u65B0\u83B7\u53D6\u9A8C\u8BC1\u7801\uFF01
 
 RESET_CODE_OVERTIME=\u9875\u9762\u8D85\u65F6\u5931\u6548,\u8BF7\u91CD\u65B0\u83B7\u53D6\u9A8C\u8BC1\u7801\uFF01
 

+ 32 - 32
src/main/resources/shiro_base_auth.ini

@@ -1,32 +1,32 @@
-[base_auth]
-/=anon
-/index=anon
-/login=anon
-/user/subscriberDetail=anon
-/user/subscriberDetail.html=anon
-/user/login.html=anon
-/user/login=anon
-/user/msignIn=anon
-/user/msignIn.html=anon
-/user/login=anon
-/user/signIn.html=anon
-/admin/login=anon
-/admin/login.html=anon
-/admin/set.html=admin
-/admin/index.html=admin
-/signin=anon
-/managesignin=anon
-/register=anon
-/open/**=anon
-/favicon.ico=anon
-/static/**=anon
-/portal/**=anon
-/api/portal/**=anon
-/api/admin/**=admin,permission
-/api/user/partner/**=anon
-/api/user/**=login
-/admin/servicesManage/**=admin
-/admin/**=admin,permission
-/role/**=admin,permission
-/permission/**=admin,permission
-/**=login
+[base_auth]
+/=anon
+/index=anon
+/login=anon
+/user/subscriberDetail=anon
+/user/subscriberDetail.html=anon
+/user/login.html=anon
+/user/login=anon
+/user/msignIn=anon
+/user/msignIn.html=anon
+/user/login=anon
+/user/signIn.html=anon
+/admin/login=anon
+/admin/login.html=anon
+/admin/set.html=admin
+/admin/index.html=admin
+/signin=anon
+/managesignin=anon
+/register=anon
+/open/**=anon
+/favicon.ico=anon
+/static/**=anon
+/portal/**=anon
+/api/portal/**=anon
+/api/admin/**=admin,permission
+/api/user/partner/**=anon
+/api/user/**=login
+/admin/servicesManage/**=admin
+/admin/**=admin,permission
+/role/**=admin,permission
+/permission/**=admin,permission
+/**=login

+ 0 - 1
src/main/resources/spring-context-4.0.xsd

@@ -1,5 +1,4 @@
 <?xml version="1.0" encoding="UTF-8"?>
-
 <xsd:schema xmlns="http://www.springframework.org/schema/context"
 		xmlns:xsd="http://www.w3.org/2001/XMLSchema"
 		xmlns:beans="http://www.springframework.org/schema/beans"

+ 163 - 163
src/main/resources/spring/spring-shiro.xml

@@ -1,164 +1,164 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<beans xmlns="http://www.springframework.org/schema/beans"
-	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:aop="http://www.springframework.org/schema/aop"
-	xmlns:tx="http://www.springframework.org/schema/tx" xmlns:util="http://www.springframework.org/schema/util"
-	xmlns:context="http://www.springframework.org/schema/context"
-	xsi:schemaLocation="
-       http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
-       http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx.xsd
-       http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop.xsd
-       http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util.xsd
-       http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.0.xsd">
-
-	<bean id="jedisPoolConfig" class="redis.clients.jedis.JedisPoolConfig">
-		<property name="maxIdle" value="100" />
-		<property name="minIdle" value="10" />
-		<property name="testOnBorrow" value="true" />
-	</bean>
-
-	<bean id="redisConnectionFactory"
-		class="org.springframework.data.redis.connection.jedis.JedisConnectionFactory">
-		<property name="hostName" value="${jedis.host}" />
-		<property name="port" value="${jedis.port}" />
-		<property name="password" value="${jedis.password}" />
-		<property name="timeout" value="${jedis.timeout}" />
-		<property name="poolConfig" ref="jedisPoolConfig" />
-		<!-- <property name="database" value="${jedis.dbIndex}" /> -->
-	</bean>
-
-	<bean id="redisTemplate" class="com.goafanti.core.cache.template.FastJsonRedisTemplate">
-		<constructor-arg index="0" ref="redisConnectionFactory" />
-	</bean>
-	
-    <bean id="jedisQueueListener" class="com.goafanti.easemob.queue.EasemobRedisQueueListener"/>  
-    
-    
-    <bean id="jedisQueue" class="com.goafanti.easemob.queue.EasemobRedisQueue" destroy-method="destroy">  
-        <property name="redisTemplate" ref="redisTemplate"></property>  
-        <property name="key" value="easemob:queue"></property>  
-        <property name="listener" ref="jedisQueueListener"></property>  
-    </bean> 
-    
-    <bean id="easemobUtils" class="com.goafanti.easemob.EasemobUtils"/>
-      
-
-	<bean id="sessionRedisTemplate" class="com.goafanti.core.shiro.cache.template.SessionRedisTemplate">
-		<constructor-arg index="0" ref="redisConnectionFactory" />
-	</bean>
-
-	<bean id="cacheManager" class="org.springframework.data.redis.cache.RedisCacheManager">
-		<constructor-arg index="0" ref="redisTemplate" />
-		<property name="defaultExpiration" value="86400" />		
-	</bean>
-	
-	<bean id="shrioRedisCacheManager" class="com.goafanti.core.shiro.cache.ShiroRedisCacheManager">
-		<property name="redisTemplate" ref="sessionRedisTemplate" />
-		<property name="expire" value="2592000" />
-	</bean>
-
-	<bean id="sessionIdGenerator"
-		class="org.apache.shiro.session.mgt.eis.JavaUuidSessionIdGenerator" />
-
-
-	<bean id="sessionIdCookie" class="org.apache.shiro.web.servlet.SimpleCookie">
-		<constructor-arg value="AFT_SID" />
-		<property name="httpOnly" value="true" />
-		<property name="maxAge" value="2592000" />
-		<!-- <property name="domain" value=""/> -->
-	</bean>
-
-	<bean id="customSessionListener" class="com.goafanti.core.shiro.listener.CustomSessionListener">
-		<property name="redisTemplate" ref="sessionRedisTemplate" />
-	</bean>
-
-	<bean id="enterpriseCacheSessionDAO"
-		class="org.apache.shiro.session.mgt.eis.EnterpriseCacheSessionDAO">
-		<property name="sessionIdGenerator" ref="sessionIdGenerator" />
-	</bean>
-
-	<!-- -->
-	<bean id="sessionValidationScheduler"
-		class="org.apache.shiro.session.mgt.ExecutorServiceSessionValidationScheduler">
-		<!-- -->
-		<property name="interval" value="${session.validate.timespan}" />
-		<property name="sessionManager" ref="sessionManager" />
-	</bean>
-	<!-- -->
-	<bean id="securityManager" class="org.apache.shiro.web.mgt.DefaultWebSecurityManager">
-		<property name="realm" ref="userRealm" />
-		<property name="sessionManager" ref="sessionManager" />
-		<property name="cacheManager" ref="shrioRedisCacheManager" />
-	</bean>
-
-	<bean id="authorizationAttributeSourceAdvisor"
-		class="org.apache.shiro.spring.security.interceptor.AuthorizationAttributeSourceAdvisor">
-		<property name="securityManager" ref="securityManager" />
-	</bean>
-
-	<!-- credential matcher -->
-	<bean id="credentialsMatcher"
-		class="org.apache.shiro.authc.credential.HashedCredentialsMatcher">
-		<property name="hashAlgorithmName" value="${pwd.hash_algorithm_name}" />
-		<property name="hashIterations" value="${pwd.hash_iterations}" />
-		<property name="storedCredentialsHexEncoded" value="true" />
-	</bean>
-	<!-- -->
-	<bean id="userRealm" class="com.goafanti.core.shiro.token.UserRealm">
-		<property name="credentialsMatcher" ref="credentialsMatcher" />
-	</bean>
-
-	<!-- Session Manager -->
-	<bean id="sessionManager"
-		class="org.apache.shiro.web.session.mgt.DefaultWebSessionManager">
-		<property name="sessionIdUrlRewritingEnabled" value="false" />
-		<!-- -->
-		<property name="sessionValidationInterval" value="1800000" />
-		<!-- -->
-		<property name="globalSessionTimeout" value="1800000" />
-		<property name="sessionDAO" ref="enterpriseCacheSessionDAO" />
-		<property name="cacheManager" ref="shrioRedisCacheManager" />
-		<!-- session -->
-		<property name="sessionListeners">
-			<list>
-				<ref bean="customSessionListener" />
-			</list>
-		</property>
-		<!-- -->
-		<property name="sessionValidationScheduler" ref="sessionValidationScheduler" />
-		<!-- -->
-		<property name="sessionValidationSchedulerEnabled" value="true" />
-		<!-- -->
-		<property name="deleteInvalidSessions" value="true" />
-		<!-- -->
-		<property name="sessionIdCookie" ref="sessionIdCookie" />
-	</bean>
-
-	<bean id="shiroManager" class="com.goafanti.core.shiro.service.impl.ShiroManagerImpl" />
-
-	<bean id="shiroFilter" class="org.apache.shiro.spring.web.ShiroFilterFactoryBean">
-		<property name="securityManager" ref="securityManager" />
-		<property name="loginUrl" value="/user/login" />
-		<property name="successUrl" value="/" />
-		<property name="unauthorizedUrl" value="/user/login" />
-		<property name="filterChainDefinitions" value="#{shiroManager.loadFilterChainDefinitions()}" />
-		<property name="filters">
-			<util:map>
-				<entry key="login">
-					<bean id="login" class="com.goafanti.core.shiro.filter.LoginFilter" />
-				</entry>
-				<entry key="permission">
-					<bean id="permission" class="com.goafanti.core.shiro.filter.PermissionFilter">
-						<property name="loginUrl" value="/admin/login" />
-					</bean>
-				</entry>
-				<entry key="admin">
-					<bean id="admin" class="com.goafanti.core.shiro.filter.AdminFilter">
-						<property name="loginUrl" value="/admin/login" />
-					</bean>
-				</entry>
-			</util:map>
-		</property>
-	</bean>
-	<!-- -->
-	<bean id="lifecycleBeanPostProcessor" class="org.apache.shiro.spring.LifecycleBeanPostProcessor" />
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://www.springframework.org/schema/beans"
+	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:aop="http://www.springframework.org/schema/aop"
+	xmlns:tx="http://www.springframework.org/schema/tx" xmlns:util="http://www.springframework.org/schema/util"
+	xmlns:context="http://www.springframework.org/schema/context"
+	xsi:schemaLocation="
+       http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
+       http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx.xsd
+       http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop.xsd
+       http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util.xsd
+       http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.0.xsd">
+
+	<bean id="jedisPoolConfig" class="redis.clients.jedis.JedisPoolConfig">
+		<property name="maxIdle" value="100" />
+		<property name="minIdle" value="10" />
+		<property name="testOnBorrow" value="true" />
+	</bean>
+
+	<bean id="redisConnectionFactory"
+		class="org.springframework.data.redis.connection.jedis.JedisConnectionFactory">
+		<property name="hostName" value="${jedis.host}" />
+		<property name="port" value="${jedis.port}" />
+		<property name="password" value="${jedis.password}" />
+		<property name="timeout" value="${jedis.timeout}" />
+		<property name="poolConfig" ref="jedisPoolConfig" />
+		<!-- <property name="database" value="${jedis.dbIndex}" /> -->
+	</bean>
+
+	<bean id="redisTemplate" class="com.goafanti.core.cache.template.FastJsonRedisTemplate">
+		<constructor-arg index="0" ref="redisConnectionFactory" />
+	</bean>
+	
+    <bean id="jedisQueueListener" class="com.goafanti.easemob.queue.EasemobRedisQueueListener"/>  
+    
+    
+    <bean id="jedisQueue" class="com.goafanti.easemob.queue.EasemobRedisQueue" destroy-method="destroy">  
+        <property name="redisTemplate" ref="redisTemplate"></property>  
+        <property name="key" value="easemob:queue"></property>  
+        <property name="listener" ref="jedisQueueListener"></property>  
+    </bean> 
+    
+    <bean id="easemobUtils" class="com.goafanti.easemob.EasemobUtils"/>
+      
+
+	<bean id="sessionRedisTemplate" class="com.goafanti.core.shiro.cache.template.SessionRedisTemplate">
+		<constructor-arg index="0" ref="redisConnectionFactory" />
+	</bean>
+
+	<bean id="cacheManager" class="org.springframework.data.redis.cache.RedisCacheManager">
+		<constructor-arg index="0" ref="redisTemplate" />
+		<property name="defaultExpiration" value="86400" />		
+	</bean>
+	
+	<bean id="shrioRedisCacheManager" class="com.goafanti.core.shiro.cache.ShiroRedisCacheManager">
+		<property name="redisTemplate" ref="sessionRedisTemplate" />
+		<property name="expire" value="2592000" />
+	</bean>
+
+	<bean id="sessionIdGenerator"
+		class="org.apache.shiro.session.mgt.eis.JavaUuidSessionIdGenerator" />
+
+
+	<bean id="sessionIdCookie" class="org.apache.shiro.web.servlet.SimpleCookie">
+		<constructor-arg value="AFT_SID" />
+		<property name="httpOnly" value="true" />
+		<property name="maxAge" value="2592000" />
+		<!-- <property name="domain" value=""/> -->
+	</bean>
+
+	<bean id="customSessionListener" class="com.goafanti.core.shiro.listener.CustomSessionListener">
+		<property name="redisTemplate" ref="sessionRedisTemplate" />
+	</bean>
+
+	<bean id="enterpriseCacheSessionDAO"
+		class="org.apache.shiro.session.mgt.eis.EnterpriseCacheSessionDAO">
+		<property name="sessionIdGenerator" ref="sessionIdGenerator" />
+	</bean>
+
+	<!-- -->
+	<bean id="sessionValidationScheduler"
+		class="org.apache.shiro.session.mgt.ExecutorServiceSessionValidationScheduler">
+		<!-- -->
+		<property name="interval" value="${session.validate.timespan}" />
+		<property name="sessionManager" ref="sessionManager" />
+	</bean>
+	<!-- -->
+	<bean id="securityManager" class="org.apache.shiro.web.mgt.DefaultWebSecurityManager">
+		<property name="realm" ref="userRealm" />
+		<property name="sessionManager" ref="sessionManager" />
+		<property name="cacheManager" ref="shrioRedisCacheManager" />
+	</bean>
+
+	<bean id="authorizationAttributeSourceAdvisor"
+		class="org.apache.shiro.spring.security.interceptor.AuthorizationAttributeSourceAdvisor">
+		<property name="securityManager" ref="securityManager" />
+	</bean>
+
+	<!-- credential matcher -->
+	<bean id="credentialsMatcher"
+		class="org.apache.shiro.authc.credential.HashedCredentialsMatcher">
+		<property name="hashAlgorithmName" value="${pwd.hash_algorithm_name}" />
+		<property name="hashIterations" value="${pwd.hash_iterations}" />
+		<property name="storedCredentialsHexEncoded" value="true" />
+	</bean>
+	<!-- -->
+	<bean id="userRealm" class="com.goafanti.core.shiro.token.UserRealm">
+		<property name="credentialsMatcher" ref="credentialsMatcher" />
+	</bean>
+
+	<!-- Session Manager -->
+	<bean id="sessionManager" class="com.goafanti.core.shiro.session.CustomSessionManager">
+		<!-- class="org.apache.shiro.web.session.mgt.DefaultWebSessionManager"> -->
+		<property name="sessionIdUrlRewritingEnabled" value="false" />
+		<!-- -->
+		<property name="sessionValidationInterval" value="1800000" />
+		<!-- -->
+		<property name="globalSessionTimeout" value="1800000" />
+		<property name="sessionDAO" ref="enterpriseCacheSessionDAO" />
+		<property name="cacheManager" ref="shrioRedisCacheManager" />
+		<!-- session -->
+		<property name="sessionListeners">
+			<list>
+				<ref bean="customSessionListener" />
+			</list>
+		</property>
+		<!-- -->
+		<property name="sessionValidationScheduler" ref="sessionValidationScheduler" />
+		<!-- -->
+		<property name="sessionValidationSchedulerEnabled" value="true" />
+		<!-- -->
+		<property name="deleteInvalidSessions" value="true" />
+		<!-- -->
+		<property name="sessionIdCookie" ref="sessionIdCookie" />
+	</bean>
+
+	<bean id="shiroManager" class="com.goafanti.core.shiro.service.impl.ShiroManagerImpl" />
+
+	<bean id="shiroFilter" class="org.apache.shiro.spring.web.ShiroFilterFactoryBean">
+		<property name="securityManager" ref="securityManager" />
+		<property name="loginUrl" value="/user/login" />
+		<property name="successUrl" value="/" />
+		<property name="unauthorizedUrl" value="/user/login" />
+		<property name="filterChainDefinitions" value="#{shiroManager.loadFilterChainDefinitions()}" />
+		<property name="filters">
+			<util:map>
+				<entry key="login">
+					<bean id="login" class="com.goafanti.core.shiro.filter.LoginFilter" />
+				</entry>
+				<entry key="permission">
+					<bean id="permission" class="com.goafanti.core.shiro.filter.PermissionFilter">
+						<property name="loginUrl" value="/admin/login" />
+					</bean>
+				</entry>
+				<entry key="admin">
+					<bean id="admin" class="com.goafanti.core.shiro.filter.AdminFilter">
+						<property name="loginUrl" value="/admin/login" />
+					</bean>
+				</entry>
+			</util:map>
+		</property>
+	</bean>
+	<!-- -->
+	<bean id="lifecycleBeanPostProcessor" class="org.apache.shiro.spring.LifecycleBeanPostProcessor" />
 </beans>

+ 5 - 0
src/main/webapp/WEB-INF/views/portal/technologyTrading/assessMent.html

@@ -136,8 +136,13 @@
   				</div>
   			</div>
   		</div>
+  		<input type="hidden" th:isLogin="${!isLogin}" id="isLogin" />
   		<div class="process_btn">
+<<<<<<< HEAD
   			<a href="/user/account/index.html#normal" >立即评估</a>
+=======
+  			<a>立即评估</a>
+>>>>>>> branch 'patch' of https://git.coding.net/aft/AFT.git
   			<a href="javascript:;" onclick="_MEIQIA('showPanel')">在线咨询</a>
   		</div>
   	</div>