Explorar o código

Merge branch 'test' of git@git.coding.net:aft/AFT.git into test

wanghui %!s(int64=8) %!d(string=hai) anos
pai
achega
63c1c9e0e2
Modificáronse 32 ficheiros con 2718 adicións e 149 borrados
  1. 2 2
      GeneratorConfig.xml
  2. 600 0
      src/main/java/com/goafanti/admin/bo/BusinessProjectBo.java
  3. 31 0
      src/main/java/com/goafanti/admin/bo/ProjectSizeBo.java
  4. 5 4
      src/main/java/com/goafanti/admin/controller/AdminVarietiesApiController.java
  5. 191 3
      src/main/java/com/goafanti/admin/controller/BusinessProjectController.java
  6. 1 0
      src/main/java/com/goafanti/admin/service/AdminVarietiesService.java
  7. 42 0
      src/main/java/com/goafanti/admin/service/BusinessProjectService.java
  8. 7 4
      src/main/java/com/goafanti/admin/service/impl/AdminVarietiesServiceImpl.java
  9. 323 3
      src/main/java/com/goafanti/admin/service/impl/BusinessProjectServiceImpl.java
  10. 15 11
      src/main/java/com/goafanti/common/dao/BusinessProjectMapper.java
  11. 10 1
      src/main/java/com/goafanti/common/dao/BusinessVarietiesMapper.java
  12. 33 0
      src/main/java/com/goafanti/common/dao/PermissionMapper.java
  13. 6 0
      src/main/java/com/goafanti/common/dao/ProjectSizeMapper.java
  14. 4 2
      src/main/java/com/goafanti/common/enums/AttachmentType.java
  15. 2 2
      src/main/java/com/goafanti/common/mapper/AchievementMapper.xml
  16. 158 22
      src/main/java/com/goafanti/common/mapper/BusinessProjectMapper.xml
  17. 37 7
      src/main/java/com/goafanti/common/mapper/BusinessVarietiesMapper.xml
  18. 2 0
      src/main/java/com/goafanti/common/mapper/OrganizationManagementMapper.xml
  19. 161 1
      src/main/java/com/goafanti/common/mapper/PermissionMapper.xml
  20. 28 1
      src/main/java/com/goafanti/common/mapper/ProjectSizeMapper.xml
  21. 214 63
      src/main/java/com/goafanti/common/model/BusinessProject.java
  22. 156 16
      src/main/java/com/goafanti/common/model/BusinessProjectExample.java
  23. 90 0
      src/main/java/com/goafanti/common/model/Permission.java
  24. 26 0
      src/main/java/com/goafanti/common/model/ProjectSize.java
  25. 2 2
      src/main/java/com/goafanti/common/utils/FileUtils.java
  26. 157 0
      src/main/java/com/goafanti/permission/bo/PermissionBo.java
  27. 137 0
      src/main/java/com/goafanti/permission/controller/NewPermissionApiController.java
  28. 18 0
      src/main/java/com/goafanti/permission/service/PermissionService.java
  29. 255 0
      src/main/java/com/goafanti/permission/service/impl/PermissionServiceImpl.java
  30. 0 1
      src/main/resources/spring-context-4.0.xsd
  31. 3 3
      src/main/webapp/WEB-INF/views/portal/financial/index.html
  32. 2 1
      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>

+ 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;
+		}
 	}
 

+ 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));
 		

+ 191 - 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,187 @@ 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.getBnamecount(s.getBname())>1) {
+			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;
+			}
+		
+		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;
+	}
 }

+ 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);
 }

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

@@ -1,5 +1,47 @@
 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);
+	
 }

+ 7 - 4
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;
@@ -65,7 +64,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 +88,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 +221,10 @@ public class AdminVarietiesServiceImpl extends BaseMybatisDao<BusinessVarietiesM
 		
 		return Integer.valueOf(businessVarietiesMapper.getCount(id));
 	}
+	@Override
+	public int getLayer(String superId) {
+		return businessVarietiesMapper.getLayer(superId);
+	}
 	
 	
 }

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

@@ -1,33 +1,353 @@
 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());
+		}
+		if (StringUtils.isNotBlank(s.getMinLogo())) {
+			bp.setMinLogo(s.getMinLogo());
+		}
+		if (StringUtils.isNotBlank(s.getMaxLogo())) {
+			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());
+		//bp.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 (null!=list&&list.isEmpty()) {
+		if (list.size()>1&&list.get(0).getPid().equals(ps.getPid())) {
+			System.out.println("true");
+			return true;
+		}
+		}
+		return false;
+	}
+	
+	
 }

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

@@ -9,68 +9,72 @@ 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);
 }

+ 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);
 }

+ 33 - 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,36 @@ 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);
 }

+ 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

+ 158 - 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,115 @@
       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>
+  
 </mapper>

+ 37 - 7
src/main/java/com/goafanti/common/mapper/BusinessVarietiesMapper.xml

@@ -361,7 +361,8 @@
       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">
@@ -379,7 +380,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 +402,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 +422,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 +439,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>

+ 161 - 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,154 @@
 	  #{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
+		name=#{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>
 </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>

+ 214 - 63
src/main/java/com/goafanti/common/model/BusinessProject.java

@@ -7,485 +7,636 @@ 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) {
 		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;

+ 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;
+	}
+	
+	
+}

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

@@ -0,0 +1,137 @@
+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.bo.PermissionBo;
+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.selectAutNoByName(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.selectAutNoByName(record.getName());
+		if(aut!=null){
+			res.getError().add(buildError("","权限已存在"));
+			return res;
+		}
+		String supaut=permissionMapper.selectAutNoByName(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.getName();
+		int subordinate=permissionMapper.selectCountBySuperId(superId);
+		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.selectAutNoByName(record.getSuperId());
+		if(StringUtils.isBlank(pname)){
+			res.getError().add(buildError("","上级权限不匹配"));
+			return res;
+		}
+		String supaut=permissionMapper.selectAutNoByName(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();
+
 }

+ 255 - 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,253 @@ 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("PM");//顶级为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.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);
+		}
+		record.setHierarchies("0");//0下层
+		record.setStatus("0");//0正常 1解除
+		record.setShowOrder("0");//正常
+		record.setSuperId(record.getSuperId());//上级名称	
+		permissionMapper.insertn(record);
+		return 1;
+	}
+
+	@Override
+	public int deleteById(String id) {
+		permissionMapper.deleteById(id);
+		return 1;
+	}
+
+	@Override
+	public Permission selectAllById(String id) {
+		
+		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);
+		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);
+		}
+		if(record.getSuperId().equals("平台超级模块")){
+			record.setHierarchies("1");
+		}else{
+			record.setHierarchies("0");
+		}
+			System.out.println("name修改:"+record.getName());
+		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){
+			String name=permissionMapper.selectNameById(i.getId());	
+			i.setKey(i.getId());
+			List<PermissionBo> two=permissionMapper.selectAllBySuperId(name);
+			for(PermissionBo o:two){
+				String name2=permissionMapper.selectNameById(o.getId());
+				o.setChildren(permissionMapper.selectAllBySuperId(name2));
+				o.setKey(o.getId());
+				List<PermissionBo> three=permissionMapper.selectAllBySuperId(name2);
+				for(PermissionBo p:three){
+					String name3=permissionMapper.selectNameById(p.getId());
+					p.setChildren(permissionMapper.selectAllBySuperId(name3));
+					p.setKey(p.getId());					
+				}
+				o.setChildren(three);
+			}
+			i.setChildren(two);
+		}
+		params.put("one", one);
+		return params;
+	}
+	
+	
+
 }

+ 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"

+ 3 - 3
src/main/webapp/WEB-INF/views/portal/financial/index.html

@@ -125,21 +125,21 @@
 		<div id="info">
 			<div class="info">
 				<div>
-					<img th:src="${avatarUploadHost + '/default/inverDatails1.jpg'}" alt="" />
+					<img th:src="${portalHost + '/img/inverDatails1.jpg'}" alt="" />
 					<h3>高新创投</h3>
 					<p>湖南高新创业投资集团有限公司(简称:高新创投)成立于2007年9月,系省委、省政府批准设立的全省唯一的省级国有创投机构,
 					是为创新财政投入方式、推进战略新兴产业和高新技术产业发展而打造的政府性投融资平台。</p>
 					<div><a th:href="${basePath + '/portal/financial/investmentDetail.html?organizationId=bc1c9b64-a285-47ca-b783-db7dfdde4b93'}">MORE+</a></div>
 				</div>
 				<div>
-					<img th:src="${avatarUploadHost + '/default/inverDatails2.jpg'}" alt="" />
+					<img th:src="${portalHost + '/img/inverDatails2.jpg'}" alt="" />
 					<h3>北极光</h3>
 					<p>北极光创投基金成立于2004年,资本来源于公益金、基金会、养老基金、联合基金,以及美国、欧洲和亚洲的个体投资人。
 					基金将集中投资于与TMT领域(通讯、新媒体、高科技)相关的、具有中国战略的企业。</p>
 					<div><a th:href="${basePath + '/portal/financial/investmentDetail.html?organizationId=3443f6eb-c077-453e-b542-9215f97b61ea'}">MORE+</a></div>
 				</div>
 				<div>
-					<img th:src="${avatarUploadHost + '/default/inverDatails3.jpg'}" alt="" />
+					<img th:src="${portalHost + '/img/inverDatails3.jpg'}" alt="" />
 					<h3>华兴资本</h3>
 					<p>华兴资本于2004年在北京成立,是中国领先的专注于为快速成长的中国创业型企业家提供顶级财务顾问服务的投资银行。
 					公司关注的行业包括:高科技、媒体、电信、医疗和消费品等行业。</p>

+ 2 - 1
src/main/webapp/WEB-INF/views/portal/technologyTrading/assessMent.html

@@ -136,8 +136,9 @@
   				</div>
   			</div>
   		</div>
+  		<input type="hidden" th:isLogin="${!isLogin}" id="isLogin" />
   		<div class="process_btn">
-  			<a href="javascript:;" onclick="_MEIQIA('showPanel')">立即评估</a>
+  			<a>立即评估</a>
   			<a href="javascript:;" onclick="_MEIQIA('showPanel')">在线咨询</a>
   		</div>
   	</div>