Browse Source

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

Conflicts:
	GeneratorConfig.xml
	src/main/java/com/goafanti/business/service/impl/BusinessProjectServiceImpl.java
	src/main/java/com/goafanti/common/dao/BusinessProjectMapper.java
	src/main/java/com/goafanti/common/mapper/BusinessProjectMapper.xml
wanghui 8 years ago
parent
commit
b2d8855338
100 changed files with 4889 additions and 688 deletions
  1. 1 0
      GeneratorConfig.xml
  2. 10 10
      pom.xml
  3. 28 2
      src/main/java/com/goafanti/achievement/bo/AchievementListBo.java
  4. 20 0
      src/main/java/com/goafanti/achievement/bo/AchievementPartnerListBo.java
  5. 3 0
      src/main/java/com/goafanti/achievement/bo/AchievementUserOwnerDetailBo.java
  6. 89 6
      src/main/java/com/goafanti/achievement/controller/AdminAchievementApiController.java
  7. 9 0
      src/main/java/com/goafanti/achievement/service/AchievementService.java
  8. 1 0
      src/main/java/com/goafanti/achievement/service/impl/AchievementInterestServiceImpl.java
  9. 139 8
      src/main/java/com/goafanti/achievement/service/impl/AchievementServiceImpl.java
  10. 36 1
      src/main/java/com/goafanti/admin/controller/AdminSuperviserApiController.java
  11. 65 23
      src/main/java/com/goafanti/admin/service/impl/NewAdminServiceImpl.java
  12. 46 0
      src/main/java/com/goafanti/app/bo/AppConfigBo.java
  13. 10 0
      src/main/java/com/goafanti/app/bo/ProjectBo.java
  14. 0 35
      src/main/java/com/goafanti/app/controller/AppConfigController.java
  15. 195 3
      src/main/java/com/goafanti/app/controller/AppUserController.java
  16. 24 0
      src/main/java/com/goafanti/app/controller/OpenAppConfigController.java
  17. 108 0
      src/main/java/com/goafanti/app/controller/OpenAppDiscoveryController.java
  18. 110 0
      src/main/java/com/goafanti/app/controller/OpenAppServiceController.java
  19. 102 0
      src/main/java/com/goafanti/app/controller/OpenAppUserController.java
  20. 0 34
      src/main/java/com/goafanti/app/service/AppConfigService.java
  21. 8 0
      src/main/java/com/goafanti/business/service/BusinessProjectService.java
  22. 2 0
      src/main/java/com/goafanti/business/service/BusinessVarietiesService.java
  23. 37 1
      src/main/java/com/goafanti/business/service/impl/BusinessProjectServiceImpl.java
  24. 7 2
      src/main/java/com/goafanti/business/service/impl/BusinessVarietiesServiceImpl.java
  25. 43 0
      src/main/java/com/goafanti/common/bo/AreaBo.java
  26. 55 0
      src/main/java/com/goafanti/common/bo/CityBo.java
  27. 57 0
      src/main/java/com/goafanti/common/bo/ProvinceBo.java
  28. 72 1
      src/main/java/com/goafanti/common/controller/PortalController.java
  29. 13 0
      src/main/java/com/goafanti/common/controller/PublicController.java
  30. 16 131
      src/main/java/com/goafanti/common/controller/WebpageController.java
  31. 8 0
      src/main/java/com/goafanti/common/dao/AdminMapper.java
  32. 82 21
      src/main/java/com/goafanti/common/dao/AppConfigMapper.java
  33. 2 0
      src/main/java/com/goafanti/common/dao/BusinessProjectMapper.java
  34. 2 0
      src/main/java/com/goafanti/common/dao/BusinessVarietiesMapper.java
  35. 9 0
      src/main/java/com/goafanti/common/dao/DistrictGlossoryMapper.java
  36. 6 0
      src/main/java/com/goafanti/common/dao/FieldGlossoryMapper.java
  37. 6 1
      src/main/java/com/goafanti/common/dao/UserMapper.java
  38. 358 33
      src/main/java/com/goafanti/common/mapper/AchievementMapper.xml
  39. 29 1
      src/main/java/com/goafanti/common/mapper/AdminMapper.xml
  40. 330 97
      src/main/java/com/goafanti/common/mapper/AppConfigMapper.xml
  41. 10 0
      src/main/java/com/goafanti/common/mapper/BusinessProjectMapper.xml
  42. 6 0
      src/main/java/com/goafanti/common/mapper/BusinessVarietiesMapper.xml
  43. 403 47
      src/main/java/com/goafanti/common/mapper/DemandMapper.xml
  44. 21 0
      src/main/java/com/goafanti/common/mapper/DistrictGlossoryMapper.xml
  45. 12 0
      src/main/java/com/goafanti/common/mapper/FieldGlossoryMapper.xml
  46. 7 3
      src/main/java/com/goafanti/common/mapper/NewsMapper.xml
  47. 12 2
      src/main/java/com/goafanti/common/mapper/NewsMapperExt.xml
  48. 33 64
      src/main/java/com/goafanti/common/mapper/UserIdentityMapper.xml
  49. 13 0
      src/main/java/com/goafanti/common/mapper/UserMapper.xml
  50. 492 22
      src/main/java/com/goafanti/common/mapper/UserMapperExt.xml
  51. 167 65
      src/main/java/com/goafanti/common/model/AppConfig.java
  52. 712 0
      src/main/java/com/goafanti/common/model/AppConfigExample.java
  53. 26 0
      src/main/java/com/goafanti/common/model/News.java
  54. 20 0
      src/main/java/com/goafanti/common/model/User.java
  55. 20 0
      src/main/java/com/goafanti/common/model/UserIdentity.java
  56. 31 0
      src/main/java/com/goafanti/common/service/DistrictGlossoryService.java
  57. 7 0
      src/main/java/com/goafanti/common/service/FieldGlossoryService.java
  58. 28 26
      src/main/java/com/goafanti/common/utils/MobileMessageUtils.java
  59. 11 0
      src/main/java/com/goafanti/customer/bo/CustomerListIn.java
  60. 33 0
      src/main/java/com/goafanti/customer/bo/CustomerListOut.java
  61. 7 0
      src/main/java/com/goafanti/customer/bo/CustomerOrganizationDetailBo.java
  62. 28 0
      src/main/java/com/goafanti/customer/bo/CustomerPersonalDetailBo.java
  63. 74 0
      src/main/java/com/goafanti/customer/controller/AdminCustomerApiController.java
  64. 36 0
      src/main/java/com/goafanti/customer/service/CustomerService.java
  65. 89 2
      src/main/java/com/goafanti/customer/service/impl/CustomerServiceImpl.java
  66. 1 2
      src/main/java/com/goafanti/demand/bo/DemandListBo.java
  67. 13 0
      src/main/java/com/goafanti/demand/bo/DemandManageListBo.java
  68. 65 9
      src/main/java/com/goafanti/demand/controller/AdminDemandApiController.java
  69. 12 0
      src/main/java/com/goafanti/demand/service/DemandService.java
  70. 141 8
      src/main/java/com/goafanti/demand/service/impl/DemandServiceImpl.java
  71. 1 1
      src/main/java/com/goafanti/message/service/impl/MessageServiceImpl.java
  72. 26 0
      src/main/java/com/goafanti/news/bo/InputNews.java
  73. 26 0
      src/main/java/com/goafanti/news/bo/NewsSummary.java
  74. 2 2
      src/main/java/com/goafanti/news/controller/AdminNewsApiController.java
  75. 9 1
      src/main/java/com/goafanti/news/service/NewsService.java
  76. 3 0
      src/main/java/com/goafanti/portal/controller/PortalNewsController.java
  77. 79 0
      src/main/java/com/goafanti/portal/controller/PortalServicesController.java
  78. 2 3
      src/main/java/com/goafanti/user/controller/UserRegisterController.java
  79. 5 0
      src/main/java/com/goafanti/user/service/UserIdentityService.java
  80. 29 2
      src/main/java/com/goafanti/user/service/impl/UserIdentityServiceImpl.java
  81. 2 0
      src/main/webapp/WEB-INF/views/admin/achievement.html
  82. 2 0
      src/main/webapp/WEB-INF/views/admin/customer.html
  83. 2 0
      src/main/webapp/WEB-INF/views/admin/demand.html
  84. 2 0
      src/main/webapp/WEB-INF/views/admin/idea.html
  85. 2 0
      src/main/webapp/WEB-INF/views/admin/index.html
  86. 2 0
      src/main/webapp/WEB-INF/views/admin/login.html
  87. 2 0
      src/main/webapp/WEB-INF/views/admin/operate.html
  88. 2 0
      src/main/webapp/WEB-INF/views/admin/order.html
  89. 2 0
      src/main/webapp/WEB-INF/views/admin/servicesManage/contract.html
  90. 2 0
      src/main/webapp/WEB-INF/views/admin/servicesManage/copyright.html
  91. 2 0
      src/main/webapp/WEB-INF/views/admin/servicesManage/highTech.html
  92. 2 0
      src/main/webapp/WEB-INF/views/admin/servicesManage/highTechInfo.html
  93. 2 0
      src/main/webapp/WEB-INF/views/admin/servicesManage/patent.html
  94. 2 0
      src/main/webapp/WEB-INF/views/admin/servicesManage/projectOrder.html
  95. 2 0
      src/main/webapp/WEB-INF/views/admin/servicesManage/technology.html
  96. 2 0
      src/main/webapp/WEB-INF/views/admin/set.html
  97. 2 0
      src/main/webapp/WEB-INF/views/admin/userManage.html
  98. 2 0
      src/main/webapp/WEB-INF/views/admin/userOrder.html
  99. 3 19
      src/main/webapp/WEB-INF/views/common.html
  100. 0 0
      src/main/webapp/WEB-INF/views/portal/aboutUs.html

+ 1 - 0
GeneratorConfig.xml

@@ -11,5 +11,6 @@
     <sqlMapGenerator targetPackage="com.goafanti.common.mapper" targetProject="AFT" />
     <javaClientGenerator targetPackage="com.goafanti.common.dao" targetProject="AFT" type="XMLMAPPER" />
     <table schema="aft" tableName="contract"/>
+    
   </context>
 </generatorConfiguration>

+ 10 - 10
pom.xml

@@ -329,16 +329,16 @@
 		    <artifactId>poi-ooxml</artifactId>
 		    <version>3.17</version>
 		</dependency>
-        <dependency>
-            <groupId>com.aliyun</groupId>
-            <artifactId>aliyun-java-sdk-core</artifactId>
-            <version>2.4.2</version>
-        </dependency>
-        <dependency>
-            <groupId>com.aliyun</groupId>
-            <artifactId>aliyun-java-sdk-sms</artifactId>
-            <version>3.0.0-rc1</version>
-        </dependency>
+       <dependency>
+ 		 	<groupId>com.aliyun</groupId>
+  			<artifactId>aliyun-java-sdk-dysmsapi</artifactId>
+  			<version>1.0.0</version>
+		</dependency>
+		<dependency>
+			<groupId>com.aliyun</groupId>
+			<artifactId>aliyun-java-sdk-core</artifactId>
+			<version>3.5.0</version>
+		</dependency>
         <dependency>
 			<groupId>org.apache.httpcomponents</groupId>
 			<artifactId>httpasyncclient</artifactId>

+ 28 - 2
src/main/java/com/goafanti/achievement/bo/AchievementListBo.java

@@ -57,6 +57,11 @@ public class AchievementListBo {
 	 * 发布时间
 	 */
 	private Date	releaseDate;
+	
+	/**
+	 * 发布状态
+	 */
+	private Integer	releaseStatus;
 
 	/**
 	 * 审核状态
@@ -67,6 +72,11 @@ public class AchievementListBo {
 	 * 技术经纪人
 	 */
 	private String	techBrokerId;
+	
+	/**
+	 * 技术经纪人IDD
+	 */
+	private String	techBrokerIdd;
 
 	/**
 	 * 认证所有人名称
@@ -141,6 +151,22 @@ public class AchievementListBo {
 	
 	private String buyIntention;
 	
+	public Integer getReleaseStatus() {
+		return releaseStatus;
+	}
+
+	public void setReleaseStatus(Integer releaseStatus) {
+		this.releaseStatus = releaseStatus;
+	}
+
+	public String getTechBrokerIdd() {
+		return techBrokerIdd;
+	}
+
+	public void setTechBrokerIdd(String techBrokerIdd) {
+		this.techBrokerIdd = techBrokerIdd;
+	}
+
 	public String getOrgId() {
 		return orgId;
 	}
@@ -382,7 +408,7 @@ public class AchievementListBo {
 
 
 	public String getCountInterest() {
-		if (StringUtils.isBlank(countInterest)) countInterest = "0";
+		if (StringUtils.isBlank(countInterest)) countInterest = "20";
 			return String.valueOf(Integer.valueOf(countInterest)+20);
 	}
 
@@ -419,7 +445,7 @@ public class AchievementListBo {
 		if (this.createTime == null) {
 			return null;
 		} else {
-			return DateFormatUtils.format(this.getCreateTime(), AFTConstants.YYYYMMDD);
+			return DateFormatUtils.format(this.getCreateTime(), AFTConstants.YYYYMMDDHHMMSS);
 		}
 
 	}

+ 20 - 0
src/main/java/com/goafanti/achievement/bo/AchievementPartnerListBo.java

@@ -47,6 +47,11 @@ public class AchievementPartnerListBo {
 	 * 发布时间
 	 */
 	private Date		releaseDate;
+	
+	/**
+	 * 创建时间
+	 */
+	private Date		createTime;
 
 	/**
 	 * 应用领域1
@@ -285,6 +290,21 @@ public class AchievementPartnerListBo {
 	public void setOwnerPostalAddress(String ownerPostalAddress) {
 		this.ownerPostalAddress = ownerPostalAddress;
 	}
+
+	public Date getCreateTime() {
+		return createTime;
+	}
+
+	public void setCreateTime(Date createTime) {
+		this.createTime = createTime;
+	}
+	public String getCreateTimeFormattedDate() {
+		if (this.createTime == null) {
+			return null;
+		} else {
+			return DateFormatUtils.format(this.getCreateTime(), AFTConstants.YYYYMMDDHHMMSS);
+		}
+	}
 	
 	
 	

+ 3 - 0
src/main/java/com/goafanti/achievement/bo/AchievementUserOwnerDetailBo.java

@@ -4,6 +4,8 @@ import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.List;
 
+import com.goafanti.common.utils.StringUtils;
+
 public class AchievementUserOwnerDetailBo extends AchievementOrgOwnerDetailBo {
 	
 	private Integer province;
@@ -105,6 +107,7 @@ public class AchievementUserOwnerDetailBo extends AchievementOrgOwnerDetailBo {
 	}
 
 	public String getCountInterest() {
+		if (StringUtils.isBlank(CountInterest)) CountInterest = "20";
 		return String.valueOf(Integer.valueOf(CountInterest)+20);
 	}
 

+ 89 - 6
src/main/java/com/goafanti/achievement/controller/AdminAchievementApiController.java

@@ -26,6 +26,7 @@ import com.goafanti.common.bo.Result;
 import com.goafanti.common.constant.AFTConstants;
 import com.goafanti.common.constant.ErrorConstants;
 import com.goafanti.common.controller.CertifyApiController;
+import com.goafanti.common.dao.AdminMapper;
 import com.goafanti.common.enums.AchievementAuditStatus;
 import com.goafanti.common.enums.AchievementFields;
 import com.goafanti.common.enums.AchievementImportFields;
@@ -57,6 +58,8 @@ public class AdminAchievementApiController extends CertifyApiController {
     private AchievementOrderService	achievementOrderService;
     @Resource
     private MarketingManagementService marketingManagementService;
+    @Resource
+    private AdminMapper adminMapper;
     /**
      * 个人成果列表
      */
@@ -80,7 +83,7 @@ public class AdminAchievementApiController extends CertifyApiController {
         return res;
     }
     /**
-     * 组织用户成果列表
+     * 组织用户成果列表(个人组织合并)
      */
     @RequestMapping(value = "/orgList", method = RequestMethod.GET)
     private Result orgList(Integer ownerType,String unitName, String ownerName, String ownerId, Integer auditStatus, Integer serialNumber, String name,
@@ -142,16 +145,20 @@ public class AdminAchievementApiController extends CertifyApiController {
         return res;
     }
     /**
-     * 组织用户成果详情详情
+     * 组织用户成果详情详情(个人组织合并)
      */
     @RequestMapping(value = "/orgDetail", method = RequestMethod.GET)
-    private Result orgDetail(String id) {
+    private Result orgDetail(String id,int ownerType) {
         Result res = new Result();
         if (StringUtils.isBlank(id)) {
             res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "找不到成果ID", "成果ID"));
             return res;
         }
-        res.setData(achievementService.selectOrgOwnerDetail(id));
+        if(ownerType==0){
+        	res.setData(achievementService.selectUserOwnerDetail(id));
+        }else if(ownerType==1){
+        	res.setData(achievementService.selectOrgOwnerDetail(id));
+        }       
         return res;
     }
     /**
@@ -399,7 +406,7 @@ public class AdminAchievementApiController extends CertifyApiController {
      * 成果撤消发布(下架)
      */
     @RequestMapping(value = "/offShelf", method = RequestMethod.POST)
-    public Result offShelf(String id) {
+    public Result offShelf(String id,Integer releaseStatus) {
         Result res = new Result();
         if (StringUtils.isBlank(id)) {
             res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "找不到成果ID", "成果ID"));
@@ -410,6 +417,7 @@ public class AdminAchievementApiController extends CertifyApiController {
             res.getError().add(buildError(ErrorConstants.PARAM_ERROR, "", "需求ID"));
             return res;
         }
+        a.setReleaseStatus(releaseStatus);
         res.setData(achievementService.updateReleaseStatus(a));
         return res;
     }
@@ -511,13 +519,43 @@ public class AdminAchievementApiController extends CertifyApiController {
             return res;
         }
         if (null == ia.getOwnerType()) {
-            res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "找不到所有人类型", "所有人类型"));
+            res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "找不到所有人类型", "成果类别"));
             return res;
         }
         if (null == ia.getCooperationMode()) {
             res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "找不到合作方式", "合作方式"));
             return res;
         }
+        if (null == ia.getMaturity()) {
+            res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "找不到成熟度", "成熟度"));
+            return res;
+        }
+        if (null == ia.getInnovation()) {
+            res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "找不到创新度", "创新度"));
+            return res;
+        }
+        if (null == ia.getBargainingMode()) {
+            res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "找不到议价方式", "议价方式"));
+            return res;
+        }
+        if (null == ia.getOwnerName()) {
+            res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "找不到成果所有人", "成果所有人"));
+            return res;
+        }
+        if (null == ia.getBreakthrough()) {
+            res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "找不到技术突破", "技术突破"));
+            return res;
+        }
+        if (null == ia.getPatentCase()) {
+            res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "找不到专利情况", "专利情况"));
+            return res;
+        }if (null == ia.getParameter()) {
+            res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "找不到技术参数", "技术参数"));
+            return res;
+        }if (null == ia.getTechnicalPictureUrl()) {
+            res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "找不到上传图片", "上传图片"));
+            return res;
+        }
         for (int i = 0; i < keywords.length; i++) {
             if (AFTConstants.KEYWORDLENTH < keywords[i].length()) {
                 res.getError().add(buildError(ErrorConstants.PARAM_ERROR, "", "关键词长度"));
@@ -629,4 +667,49 @@ public class AdminAchievementApiController extends CertifyApiController {
         res.setData(data);
         return res;
     }
+    /**
+     * 我的成果列表
+     */
+    @RequestMapping(value = "/myList", method = RequestMethod.GET)
+    private Result myList(Integer ownerType,String unitName, String ownerName, String ownerId, Integer auditStatus, Integer serialNumber, String name,
+            String keyword, Integer category, Integer status, String releaseDateStartDate, String releaseDateEndDate,String createDateStartDate, String createDateEndDate,
+            Integer releaseStatus,String internationalFlag, String pageNo, String pageSize,Integer boutique,Integer hot) {
+        Result res = new Result();
+        Integer pNo = 1;
+        Integer pSize = 10;
+        if (StringUtils.isNumeric(pageSize)) {
+            pSize = Integer.parseInt(pageSize);
+        }
+        if (StringUtils.isNumeric(pageNo)) {
+            pNo = Integer.parseInt(pageNo);
+        }
+        String techBrokerId=TokenManager.getAdminId();
+        Object o = achievementService.listMyAchievement(techBrokerId,ownerType,unitName, ownerName, ownerId, auditStatus, serialNumber, name,
+                keyword, category, status, releaseDateStartDate, releaseDateEndDate, createDateStartDate,  createDateEndDate, releaseStatus,internationalFlag, pNo, pSize,boutique,hot);
+        res.setData(o);     
+        return res;
+    }
+    
+    /**
+     * 科技成果管理列表
+     */
+    @RequestMapping(value = "/manageList", method = RequestMethod.GET)
+    private Result manageList(Integer ownerType,String unitName, String ownerName, String ownerId, Integer auditStatus, Integer serialNumber, String name,
+            String keyword, Integer category, Integer status, String releaseDateStartDate, String releaseDateEndDate,String createDateStartDate, String createDateEndDate,
+            Integer releaseStatus,String internationalFlag, String pageNo, String pageSize,Integer boutique,Integer hot) {
+        Result res = new Result();
+        Integer pNo = 1;
+        Integer pSize = 10;
+        if (StringUtils.isNumeric(pageSize)) {
+            pSize = Integer.parseInt(pageSize);
+        }
+        if (StringUtils.isNumeric(pageNo)) {
+            pNo = Integer.parseInt(pageNo);
+        }
+        String techBrokerId=TokenManager.getAdminId();
+        Object o = achievementService.listManageAchievement(techBrokerId,ownerType,unitName, ownerName, ownerId, auditStatus, serialNumber, name,
+                keyword, category, status, releaseDateStartDate, releaseDateEndDate, createDateStartDate,  createDateEndDate, releaseStatus,internationalFlag, pNo, pSize,boutique,hot);
+        res.setData(o);     
+        return res;
+    }
 }

+ 9 - 0
src/main/java/com/goafanti/achievement/service/AchievementService.java

@@ -93,7 +93,16 @@ public interface AchievementService {
 	Pagination<AchievementPartnerListBo> listAppMyAchievement(Integer pNo, Integer pSize);
 
 	AchievementUserOwnerDetailBo selectAppUserOwnerDetail(String id);
+
 
+	int saveAppAchievement(Achievement a, String[] keywords);
+
+	Pagination<AchievementListBo> listManageAchievement(String techBrokerId,Integer ownerType,String unitName, String ownerName, String ownerId, Integer auditStatus, Integer serialNumber,
+			String name, String keyword, Integer category, Integer status, String releaseDateStartDate,
+			String releaseDateEndDate,String createDateStartDate, String createDateEndDate, Integer releaseStatus,String internationalFlag, Integer pNo, Integer pSize,Integer boutique,Integer hot);
 	
+	Pagination<AchievementListBo> listMyAchievement(String techBrokerId,Integer ownerType,String unitName, String ownerName, String ownerId, Integer auditStatus, Integer serialNumber,
+			String name, String keyword, Integer category, Integer status, String releaseDateStartDate,
+			String releaseDateEndDate,String createDateStartDate, String createDateEndDate, Integer releaseStatus,String internationalFlag, Integer pNo, Integer pSize,Integer boutique,Integer hot);
 	
 }

+ 1 - 0
src/main/java/com/goafanti/achievement/service/impl/AchievementInterestServiceImpl.java

@@ -95,6 +95,7 @@ public class AchievementInterestServiceImpl extends BaseMybatisDao<AchievementIn
 	@Override
 	public String saveInterest(String uid,Integer type,String objectId,String interest) {
 		int i=0; 
+		
 		if (type==InterestType.POLICY.getCode()) {
 			NewsInterest n=new NewsInterest();
 			n.setId(UUID.randomUUID().toString());

+ 139 - 8
src/main/java/com/goafanti/achievement/service/impl/AchievementServiceImpl.java

@@ -35,6 +35,7 @@ import com.goafanti.common.dao.DemandKeywordMapper;
 import com.goafanti.common.dao.NoticeMapper;
 import com.goafanti.common.dao.OrganizationIdentityMapper;
 import com.goafanti.common.dao.UserIdentityMapper;
+import com.goafanti.common.dao.UserMapper;
 import com.goafanti.common.dao.UserRoleMapper;
 import com.goafanti.common.enums.AchievementAuditStatus;
 import com.goafanti.common.enums.AchievementReleaseStatus;
@@ -52,12 +53,15 @@ import com.goafanti.common.model.AchievementKeyword;
 import com.goafanti.common.model.Admin;
 import com.goafanti.common.model.Notice;
 import com.goafanti.common.model.OrganizationIdentity;
+import com.goafanti.common.model.User;
 import com.goafanti.common.model.UserIdentity;
 import com.goafanti.common.utils.DateUtils;
 import com.goafanti.common.utils.LoggerUtils;
 import com.goafanti.core.mybatis.BaseMybatisDao;
 import com.goafanti.core.mybatis.page.Pagination;
 import com.goafanti.core.shiro.token.TokenManager;
+import com.goafanti.customer.bo.CustomerOrganizationDetailBo;
+import com.goafanti.customer.bo.CustomerPersonalDetailBo;
 import com.goafanti.demand.bo.DemandAchievementListBo;
 import com.goafanti.portal.bo.AchievementDetailBo;
 import com.goafanti.portal.bo.AchievementPortalDetailBo;
@@ -89,6 +93,8 @@ public class AchievementServiceImpl extends BaseMybatisDao<AchievementMapper> im
 	private OrganizationIdentityMapper		organizationIdentityMapper;
 	@Autowired
 	private AchievementInterestMapper	achievementInterestMapper;
+	@Autowired
+	private UserMapper					userMapper;
 
 	private static final Logger				logger	= LoggerFactory.getLogger(AchievementServiceImpl.class);
 
@@ -144,7 +150,8 @@ public class AchievementServiceImpl extends BaseMybatisDao<AchievementMapper> im
 		a.setDeletedSign(DeleteStatus.UNDELETE.getCode());
 		Calendar now = Calendar.getInstance();
 		now.set(Calendar.MILLISECOND, 0);
-
+		CustomerPersonalDetailBo up= new CustomerPersonalDetailBo();
+		CustomerOrganizationDetailBo uo=new CustomerOrganizationDetailBo();
 		if (TokenManager.getToken() instanceof Admin) {
 			a.setTechBrokerId(TokenManager.getAdminId());
 		}
@@ -156,8 +163,43 @@ public class AchievementServiceImpl extends BaseMybatisDao<AchievementMapper> im
 		} else {
 			a.setAuditStatus(AchievementAuditStatus.CREATE.getCode());
 		}
-
+		Integer ownerType = a.getOwnerType();
+		String ownerMobile = a.getOwnerMobile();
+		String ownerName = a.getOwnerName();
+		String ownerId = "";
+		if (TokenManager.getToken() instanceof User) {
+			a.setOwnerId(TokenManager.getUserId());
+			User u=userMapper.selectByPrimaryKey(TokenManager.getUserId());
+			if (null != u) {
+				ownerId = u.getId();
+				if(ownerType == null) ownerType = u.getType();
+				if(StringUtils.isBlank(ownerMobile)) ownerMobile = u.getMobile();
+				if(StringUtils.isBlank(ownerName)) ownerName = u.getNickname();
+				// 如果是单位客户 -查询单位客户的邮件 和通讯地址、证件号码
+				//or 
+				//如果是个人 。。。
+				if(ownerType==1){
+					 uo=userMapper.findOrganizationCustomerDetail(ownerId);
+				}else if (ownerType==0){
+					up=userMapper.findPersonalCustomerDetail(ownerId);
+				}
+			}
+		} 
 		a.setCreateTime(now.getTime());
+		a.setOwnerType(ownerType);
+		a.setOwnerMobile(ownerMobile);
+		a.setOwnerName(ownerName);
+		a.setOrgId(ownerId);
+		//设置邮件和。。。
+		if(ownerType==1){
+			a.setOrgEmail(uo.getLegalPersonEmail());
+			a.setOwnerPostalAddress(uo.getPostalAddress());
+			a.setOwnerIdNumber(uo.getLicenceNumber());
+		}else if(ownerType==0){
+			a.setOrgEmail(up.getEmail());
+			a.setOwnerPostalAddress(up.getPostalAddress());
+			a.setOwnerIdNumber(up.getIdNumber());
+		}
 		achievementMapper.insert(a);
 		disposeAchievementKeyword(keywords, a, false);
 	}
@@ -342,7 +384,7 @@ public class AchievementServiceImpl extends BaseMybatisDao<AchievementMapper> im
 			Calendar now = Calendar.getInstance();
 			now.set(Calendar.MILLISECOND, 0);
 			a.setReleaseDate(now.getTime());
-			a.setReleaseStatus(DemandReleaseStatus.RELEASED.getCode());
+			a.setReleaseStatus(DemandReleaseStatus.UNRELEASE.getCode());
 			a.setTechBrokerId(techBroderId);
 			if (StringUtils.isNotBlank(a.getKeyword())) {
 				String[] keywords = a.getKeyword().trim().split(",|,");
@@ -383,11 +425,16 @@ public class AchievementServiceImpl extends BaseMybatisDao<AchievementMapper> im
 
 	@Override
 	public int updateReleaseStatus(Achievement a) {
-		a.setAuditStatus(AchievementAuditStatus.CREATE.getCode());
-		a.setReleaseStatus(AchievementReleaseStatus.UNRELEASE.getCode());
+		a.setAuditStatus(AchievementAuditStatus.AUDITED.getCode());
+		if(a.getReleaseStatus()==1){
+			Calendar now = Calendar.getInstance();
+			now.set(Calendar.MILLISECOND, 0);
+			a.setReleaseDate(now.getTime());
+		}
 		achievementDemandMapper.deleteByAchievementId(a.getId());
 		achievementKeywordMapper.batchDeleteByAchievementId(a.getId());
-		achievementMapper.updateByPrimaryKeySelective(a);
+		int i=0;
+		i=achievementMapper.updateByPrimaryKeySelective(a);
 		if (StringUtils.isNotBlank(a.getOwnerId())) {
 			AchievementDemandCount adc = achievementDemandCountMapper.selectByUid(a.getOwnerId());
 			if (null != adc) {
@@ -398,7 +445,7 @@ public class AchievementServiceImpl extends BaseMybatisDao<AchievementMapper> im
 				achievementDemandCountMapper.updateByPrimaryKeySelective(adc);
 			}
 		}
-		return achievementMapper.updateReleaseDate(a.getId());
+		return i;
 	}
 
 	@Override
@@ -407,7 +454,7 @@ public class AchievementServiceImpl extends BaseMybatisDao<AchievementMapper> im
 		int i=achievementMapper.countInterest(a.getId());
 		a.setCountInterest(String.valueOf(i));
 		String uid=TokenManager.getUserId();
-		if(StringUtils.isNotBlank(TokenManager.getUserId())&&achievementInterestMapper.checkUidAndDid(uid,id)>0){
+		if(TokenManager.isLogin()&&achievementInterestMapper.checkUidAndDid(uid,id)>0){
 			a.setInterest("1");
 		}else {
 			a.setInterest("0");
@@ -758,5 +805,89 @@ public class AchievementServiceImpl extends BaseMybatisDao<AchievementMapper> im
 		return (Pagination<AchievementPartnerListBo>) findPage("findMyAchievementListByPage", "findMyAchievementCount",
 				params,pNo, pSize);
 	}
+	
+	@SuppressWarnings("unchecked")
+	@Override
+	public Pagination<AchievementListBo> listMyAchievement(String techBrokerId,Integer ownerType,String unitName, String ownerName, String ownerId,
+			Integer auditStatus, Integer serialNumber, String name, String keyword, Integer category, Integer status,
+			String releaseDateStartDate, String releaseDateEndDate,String createDateStartDate, String createDateEndDate, Integer releaseStatus, String internationalFlag,Integer pNo, Integer pSize,
+			Integer boutique, Integer hot) {
+		Map<String, Object> params = disposeParams(ownerType,unitName, ownerName, ownerId, auditStatus, serialNumber, name, keyword, category, status,
+				releaseDateStartDate, releaseDateEndDate, createDateStartDate,  createDateEndDate, releaseStatus, UserType.ORGANIZATION.getCode(),
+				boutique,internationalFlag, hot);
+		if (pNo == null || pNo < 0) {
+			pNo = 1;
+		}
+
+		if (pSize == null || pSize < 0 || pSize > 10) {
+			pSize = 10;
+		}
+		
+		if (null != techBrokerId) {
+			params.put("techBrokerId", techBrokerId);
+		}
+		
+		return (Pagination<AchievementListBo>) findPage("findMyyAchievementListByPage",
+				"findMyyAchievementCount",params,pNo, pSize);
+	}
+	
+	@SuppressWarnings("unchecked")
+	@Override
+	public Pagination<AchievementListBo> listManageAchievement(String techBrokerId,Integer ownerType,String unitName, String ownerName, String ownerId,
+			Integer auditStatus, Integer serialNumber, String name, String keyword, Integer category, Integer status,
+			String releaseDateStartDate, String releaseDateEndDate,String createDateStartDate, String createDateEndDate, Integer releaseStatus, String internationalFlag,Integer pNo, Integer pSize,
+			Integer boutique, Integer hot) {
+		Map<String, Object> params = disposeParams(ownerType,unitName, ownerName, ownerId, auditStatus, serialNumber, name, keyword, category, status,
+				releaseDateStartDate, releaseDateEndDate, createDateStartDate,  createDateEndDate, releaseStatus, UserType.ORGANIZATION.getCode(),
+				boutique,internationalFlag, hot);
+		if (pNo == null || pNo < 0) {
+			pNo = 1;
+		}
+
+		if (pSize == null || pSize < 0 || pSize > 10) {
+			pSize = 10;
+		}
+		
+		if (null != techBrokerId) {
+			params.put("techBrokerId", techBrokerId);
+		}
+		
+		return (Pagination<AchievementListBo>) findPage("findManageAchievementListByPage",
+				"findManageAchievementCount",params,pNo, pSize);
+	}
+
+	@Override
+	public int saveAppAchievement(Achievement a, String[] keywords) {
+		a.setId(UUID.randomUUID().toString());
+		a.setDeletedSign(DeleteStatus.UNDELETE.getCode());
+		Calendar now = Calendar.getInstance();
+		now.set(Calendar.MILLISECOND, 0);
+		if (TokenManager.getToken() instanceof Admin) {
+			a.setTechBrokerId(TokenManager.getAdminId());
+		}
+		a.setReleaseStatus(AchievementReleaseStatus.UNRELEASE.getCode());
+
+		if (AchievementAuditStatus.SUBMIT.getCode().equals(a.getAuditStatus())) {
+			a.setAuditStatus(DemandAuditStatus.INAUDIT.getCode());
+			createAuditorNotice(a);
+		} else {
+			a.setAuditStatus(AchievementAuditStatus.INAUDIT.getCode());
+		}
+		if (null!=TokenManager.getUserId()) {
+			a.setOwnerId(TokenManager.getUserId());
+			User u=userMapper.selectByPrimaryKey(TokenManager.getUserId());
+			if (null!=u.getType()) {
+				a.setOwnerType(u.getType());
+			}if (StringUtils.isNotBlank(u.getMobile())) {
+				a.setOwnerMobile(u.getMobile());
+			}if (StringUtils.isNotBlank(u.getNickname())) {
+				a.setOwnerName(u.getNickname());
+			}
+		}
+		a.setDataCategory(0);
+		a.setCreateTime(now.getTime());
+		disposeAchievementKeyword(keywords, a, false);
+		return achievementMapper.insert(a);
+	}
 
 }

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

@@ -9,6 +9,7 @@ import javax.annotation.Resource;
 import javax.servlet.http.HttpServletRequest;
 
 import org.springframework.beans.BeanUtils;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Controller;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RequestMethod;
@@ -25,6 +26,7 @@ import com.goafanti.common.bo.Result;
 import com.goafanti.common.constant.AFTConstants;
 import com.goafanti.common.constant.ErrorConstants;
 import com.goafanti.common.controller.CertifyApiController;
+import com.goafanti.common.dao.AdminMapper;
 import com.goafanti.common.model.Admin;
 import com.goafanti.common.model.AdminLocation;
 import com.goafanti.common.utils.PasswordUtil;
@@ -43,6 +45,8 @@ public class AdminSuperviserApiController extends CertifyApiController {
 	private AdminLocationService	adminLocationService;
 	@Resource
 	private UserService				userService;
+	@Autowired
+	private AdminMapper			adminMapper;
 	/**管理员列表*/
 	@RequestMapping(value = "/adminList", method = RequestMethod.GET)
 	public Result adminList(AdminListBo alb, String rid, String pageNo,
@@ -147,9 +151,40 @@ public class AdminSuperviserApiController extends CertifyApiController {
 			Admin a = newAdminService.selectByPrimaryKey(admin.getId());
 			if (null == a) {	
 				res.getError().add(buildError(ErrorConstants.PARAM_ERROR, "", "用户id"));				
+				return res;	
+			}	
+			//*********用户编号判断**************
+			String sdepNo=adminMapper.selectUserNoBySuperiorId(admin.getSuperiorId());
+			int Count=adminMapper.selectCountBySuperiorId(admin.getSuperiorId());
+			if((Count+1)>99){
+				res.getError().add(buildError("","每层最多存在99个子类"));
 				return res;
-				
 			}
+			if(Count<10){
+				String dep=sdepNo+"0"+Count;
+				String sid=adminMapper.selectIdByUserNo(dep);
+				while(sid!=null){
+					Count=(Count+1)%100;				
+					if(Count>=10){
+						dep=sdepNo+Count;	
+					}else{
+						dep=sdepNo+"0"+Count;
+					}
+					sid=adminMapper.selectIdByUserNo(dep);				
+				}
+				admin.setUserNo(dep);
+			}
+			if(Count>=10){
+				String dep=sdepNo+Count;
+				String sid=adminMapper.selectIdByUserNo(dep);
+				while(sid!=null){
+					Count=(Count+1)%100;				
+					dep=sdepNo+Count;
+					sid=adminMapper.selectIdByUserNo(dep);				
+				}
+				admin.setUserNo(dep);
+			}
+			
 			Admin ad = new Admin();
 			BeanUtils.copyProperties(admin, ad);
 			res = disposeAdminLocationList(res, jo, ad);

+ 65 - 23
src/main/java/com/goafanti/admin/service/impl/NewAdminServiceImpl.java

@@ -86,33 +86,75 @@ public class NewAdminServiceImpl extends BaseMybatisDao<AdminMapper> implements
 			}
 			TokenManager.clearUserAuthByUserId(ad.getId());
 		}
-		String sdepNo=adminMapper.selectUserNoBySuperiorId(ad.getSuperiorId());
-		int Count=adminMapper.selectCountBySuperiorId(ad.getSuperiorId());
-		if(Count<10){
-			String dep=sdepNo+"0"+Count;
-			String sid=adminMapper.selectIdByUserNo(dep);
-			while(sid!=null){
-				Count=Count+1;				
-				if(Count>=10){
-					dep=sdepNo+Count;	
+			
+		int count=adminMapper.updateByPrimaryKeySelective(ad);
+		//*******下第一级管理员用户修改
+		String autNo;
+		int n=0;
+		List<Admin> Nos =adminMapper.selectIDNBySuperiorId(ad.getId());
+		for(Admin i:Nos){			
+			autNo=adminMapper.selectUserNoById(i.getSuperiorId());
+			if(n<10){
+				String aut=autNo+"0"+n;			
+				if(n>=10){
+					aut=autNo+n;	
 				}else{
-					dep=sdepNo+"0"+Count;
+					aut=autNo+"0"+n;
+				}	
+				i.setUserNo(aut);
+			}
+			if(n>=10){
+				String aut=autNo+n;			
+				aut=autNo+n;	
+				i.setUserNo(aut);
+			}
+			adminMapper.updateByUserNo(i);
+			n++;
+			//*******下第二级管理员用户修改
+			int m=0;
+			List<Admin> Noss =adminMapper.selectIDNBySuperiorId(i.getId());
+			for(Admin o:Noss){			
+				autNo=adminMapper.selectUserNoById(o.getSuperiorId());
+				if(m<10){
+					String aut=autNo+"0"+m;			
+					if(m>=10){
+						aut=autNo+m;	
+					}else{
+						aut=autNo+"0"+m;
+					}	
+					o.setUserNo(aut);
+				}
+				if(m>=10){
+					String aut=autNo+m;			
+					aut=autNo+m;	
+					o.setUserNo(aut);
+				}
+				adminMapper.updateByUserNo(o);
+				m++;
+				//*******下第三级管理员用户修改
+				int z=0;
+				List<Admin> Nosss =adminMapper.selectIDNBySuperiorId(o.getId());
+				for(Admin p:Nosss){			
+					autNo=adminMapper.selectUserNoById(p.getSuperiorId());
+					if(z<10){
+						String aut=autNo+"0"+z;			
+						if(z>=10){
+							aut=autNo+z;	
+						}else{
+							aut=autNo+"0"+z;
+						}	
+						p.setUserNo(aut);
+					}
+					if(z>=10){
+						String aut=autNo+z;			
+						aut=autNo+z;	
+						p.setUserNo(aut);
+					}
+					adminMapper.updateByUserNo(p);
+					z++;
 				}
-				sid=adminMapper.selectIdByUserNo(dep);				
 			}
-			ad.setUserNo(dep);
 		}
-		if(Count>=10){
-			String dep=sdepNo+Count;
-			String sid=adminMapper.selectIdByUserNo(dep);
-			while(sid!=null){
-				Count=Count+1;				
-				dep=sdepNo+Count;
-				sid=adminMapper.selectIdByUserNo(dep);				
-			}
-			ad.setUserNo(dep);
-		}	
-		int count=adminMapper.updateByPrimaryKeySelective(ad);
 		return count;
 	}
 

+ 46 - 0
src/main/java/com/goafanti/app/bo/AppConfigBo.java

@@ -0,0 +1,46 @@
+package com.goafanti.app.bo;
+
+public class AppConfigBo {
+	private String releaseVersion;
+	private String releaseDesc;
+	private String releaseDate;
+	private String appUrl;
+	private Integer forceUpdate;
+	private Integer releaseCode;
+	public String getReleaseVersion() {
+		return releaseVersion;
+	}
+	public void setReleaseVersion(String releaseVersion) {
+		this.releaseVersion = releaseVersion;
+	}
+	public String getReleaseDesc() {
+		return releaseDesc;
+	}
+	public void setReleaseDesc(String releaseDesc) {
+		this.releaseDesc = releaseDesc;
+	}
+	public String getReleaseDate() {
+		return releaseDate;
+	}
+	public void setReleaseDate(String releaseDate) {
+		this.releaseDate = releaseDate;
+	}
+	public String getAppUrl() {
+		return appUrl;
+	}
+	public void setAppUrl(String appUrl) {
+		this.appUrl = appUrl;
+	}
+	public Integer getForceUpdate() {
+		return forceUpdate;
+	}
+	public void setForceUpdate(Integer forceUpdate) {
+		this.forceUpdate = forceUpdate;
+	}
+	public Integer getReleaseCode() {
+		return releaseCode;
+	}
+	public void setReleaseCode(Integer releaseCode) {
+		this.releaseCode = releaseCode;
+	}
+}

+ 10 - 0
src/main/java/com/goafanti/app/bo/ProjectBo.java

@@ -7,6 +7,8 @@ public class ProjectBo {
 	
 	private String minLogoUrl;
 	
+	private String maxLogoUrl;
+	
 	private String name;
 	
 	private String introduce;
@@ -80,4 +82,12 @@ public class ProjectBo {
 	public void setProjectUrl(String projectUrl) {
 		this.projectUrl = projectUrl;
 	}
+
+	public String getMaxLogoUrl() {
+		return maxLogoUrl;
+	}
+
+	public void setMaxLogoUrl(String maxLogoUrl) {
+		this.maxLogoUrl = maxLogoUrl;
+	}
 }

+ 0 - 35
src/main/java/com/goafanti/app/controller/AppConfigController.java

@@ -1,35 +0,0 @@
-package com.goafanti.app.controller;
-
-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.app.service.AppConfigService;
-import com.goafanti.app.service.MyAppService;
-import com.goafanti.common.bo.Result;
-import com.goafanti.common.controller.BaseApiController;
-import com.goafanti.common.utils.StringUtils;
-
-@RestController
-@RequestMapping(path = "/api/app", method = RequestMethod.GET)
-public class AppConfigController extends BaseApiController {
-
-	@Autowired
-	AppConfigService	appConfigService;
-	@Autowired
-	MyAppService		myAppService;
-
-	@RequestMapping(value = "/config", method = RequestMethod.GET)
-	public Result config(String noCache) {
-		if (StringUtils.equals(noCache, "1")) {
-			appConfigService.cleanList();
-		}
-		return res().data(appConfigService.findPortalAppConfigs());
-	}
-
-	@RequestMapping(value = "/count", method = RequestMethod.GET)
-	public Result count(String cate) {
-		return res().data(myAppService.countByCate(cate));
-	}
-}

+ 195 - 3
src/main/java/com/goafanti/app/controller/AppUserController.java

@@ -5,18 +5,19 @@ import java.util.ArrayList;
 import java.util.Date;
 import java.util.List;
 import java.util.UUID;
-
 import javax.annotation.Resource;
 import javax.servlet.http.HttpServletRequest;
-
+import javax.validation.Valid;
 import org.apache.commons.lang3.StringUtils;
 import org.apache.shiro.crypto.hash.SimpleHash;
+import org.springframework.beans.BeanUtils;
 import org.springframework.http.HttpMethod;
+import org.springframework.validation.BindingResult;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RequestMethod;
 import org.springframework.web.bind.annotation.RestController;
-
 import com.alibaba.fastjson.JSONObject;
+import com.goafanti.achievement.bo.InputAchievement;
 import com.goafanti.achievement.service.AchievementInterestService;
 import com.goafanti.achievement.service.AchievementService;
 import com.goafanti.activity.service.ActivityService;
@@ -25,13 +26,20 @@ import com.goafanti.common.bo.Result;
 import com.goafanti.common.constant.AFTConstants;
 import com.goafanti.common.constant.ErrorConstants;
 import com.goafanti.common.controller.BaseApiController;
+import com.goafanti.common.enums.AchievementFields;
+import com.goafanti.common.enums.AttachmentType;
+import com.goafanti.common.enums.DemandFields;
+import com.goafanti.common.model.Achievement;
+import com.goafanti.common.model.Demand;
 import com.goafanti.common.model.JpushEasemobAccount;
 import com.goafanti.common.model.MessageConsumer;
 import com.goafanti.common.model.MessageFromSystem;
 import com.goafanti.common.model.MessageProducer;
 import com.goafanti.common.model.User;
+import com.goafanti.common.service.FieldGlossoryService;
 import com.goafanti.common.utils.DateUtils;
 import com.goafanti.core.shiro.token.TokenManager;
+import com.goafanti.demand.bo.InputDemand;
 import com.goafanti.demand.service.DemandService;
 import com.goafanti.easemob.EasemobUtils;
 import com.goafanti.easemob.bo.EasemobInfo;
@@ -71,6 +79,10 @@ public class AppUserController extends BaseApiController {
 	private UserIdentityService	userIdentityService;
 	@Resource
 	AchievementInterestService achievementInterestService;
+	@Resource
+	private FieldGlossoryService fieldGlossoryService;
+	
+	
 	
 	@RequestMapping(value = "/uploadImg",method = RequestMethod.POST)
 	public Result uploadAvatar(HttpServletRequest req){
@@ -363,6 +375,186 @@ public class AppUserController extends BaseApiController {
 		return res;
 	}
 	
+	/**
+     * 新增成果
+     */
+    
+	@RequestMapping(value = "/appAddAchievement", method = RequestMethod.POST)
+    private Result appAddAchievement(@Valid InputAchievement ia, BindingResult bindingResult,
+            String keyword1,String keyword2,String keyword3) {
+        Result res = new Result();
+        List<String> keyword=new ArrayList<>();
+        if (!StringUtils.isBlank(keyword1)) {
+        	keyword.add(keyword1);
+		}
+        if (!StringUtils.isBlank(keyword2)) {
+        	keyword.add(keyword2);
+		}
+        if (!StringUtils.isBlank(keyword3)) {
+        	keyword.add(keyword3);
+		}
+        String[] keywords=(String[])keyword.toArray(new String[keyword.size()]);
+        System.out.println(StringUtils.join(keywords,","));
+        ia.setKeyword(StringUtils.join(keywords,","));
+        if (bindingResult.hasErrors()) {
+            res.getError().add(buildErrorByMsg(bindingResult.getFieldError().getDefaultMessage(),
+                    AchievementFields.getFieldDesc(bindingResult.getFieldError().getField())));
+            return res;
+        }
+        
+       res = disposeInputAchievement(res, ia, keywords);
+        if (!res.getError().isEmpty()) {
+            return res;
+        }
+        Achievement a = new Achievement();
+        BeanUtils.copyProperties(ia, a);
+        res.setData(achievementService.saveAppAchievement(a, keywords));
+        return res;
+    }
+    
+    private Result disposeInputAchievement(Result res, InputAchievement ia, String[] keywords) {
+        if (StringUtils.isBlank(ia.getName())) {
+            res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "找不到成果名称", "成果名称"));
+            return res;
+        }
+        if (null == ia.getCategory()) {
+            res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "找不到数据类别", "数据类别"));
+            return res;
+        }
+        if (StringUtils.isBlank(ia.getKeyword())) {
+            res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "找不到关键词", "关键词"));
+            return res;
+        }
+        if (null == keywords || keywords.length < 1) {
+            res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "找不到关键词", "关键词"));
+            return res;
+        }
+        
+        if (null == ia.getCooperationMode()) {
+            res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "找不到合作方式", "合作方式"));
+            return res;
+        }
+        for (int i = 0; i < keywords.length; i++) {
+            if (AFTConstants.KEYWORDLENTH < keywords[i].length()) {
+                res.getError().add(buildError(ErrorConstants.PARAM_ERROR, "", "关键词长度"));
+                return res;
+            }
+        }
+        return res;
+    }
+    
+    /**
+	 * 新增需求
+	 */
+	@RequestMapping(value = "/appAddDemand", method = RequestMethod.POST)
+	public Result appAddDemand(@Valid InputDemand demand, BindingResult bindingResult,
+			String keyword1,String keyword2,String keyword3,
+			String validityPeriodFormattedDate) {
+		Result res = new Result();
+		 /*String[] keywords ;
+	       if (StringUtils.isNotEmpty(keyword3)) {
+	        	keywords=new String[]{keyword1,keyword2}; 
+	        }else if (StringUtils.isNotEmpty(keyword2)) {
+	        	keywords=new String[]{keyword1};
+	        }else {
+	        	keywords=new String[]{keyword1,keyword2,keyword3};
+			}
+	        if (null!=keywords) {
+	        	demand.setKeyword(StringUtils.join(keywords,","));
+			}*/
+		if (bindingResult.hasErrors()) {
+			res.getError().add(buildErrorByMsg(bindingResult.getFieldError().getDefaultMessage(),
+					DemandFields.getFieldDesc(bindingResult.getFieldError().getField())));
+			return res;
+		}
+		res = disposeDemand(res, demand, null);
+		if (!res.getError().isEmpty()) {
+			return res;
+		}
+		Demand d = new Demand();
+		BeanUtils.copyProperties(demand, d);
+		if (StringUtils.isNotBlank(demand.getUrgentDays())) {
+			d.setUrgentDays(demand.getUrgentDays());
+		}
+		if (StringUtils.isNotBlank(demand.getUrgentMoney())) {
+			d.setUrgentMoney(demand.getUrgentMoney());
+		}
+		res.setData(demandService.saveAppUserDemand(d, validityPeriodFormattedDate, null));
+		return res;
+	}
+	
+	private Result disposeDemand(Result res, InputDemand demand, String[] keywords) {
+		if (StringUtils.isBlank(demand.getName())) {
+			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "找不到需求名称", "需求名称"));
+			return res;
+		}
+
+		/*if (StringUtils.isBlank(demand.getKeyword())) {
+			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "找不到关键词", "关键词"));
+			return res;
+		}
+
+		if (null == keywords || keywords.length < 1) {
+			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "找不到关键词", "关键词"));
+			return res;
+		}*/
+
+		if (null == demand.getIndustryCategoryA()) {
+			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "找不到行业类别", "行业类别"));
+			return res;
+		}
+
+		if (null == demand.getDemandType()) {
+			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "找不到需求类型", "需求类型"));
+			return res;
+		}
+
+		if (StringUtils.isBlank(demand.getProblemDes())) {
+			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "找不到问题说明", "问题说明"));
+			return res;
+		}
+		
+
+		/*for (int i = 0; i < keywords.length; i++) {
+			if (AFTConstants.KEYWORDLENTH < keywords[i].length()) {
+				res.getError().add(buildError(ErrorConstants.PARAM_ERROR, "", "关键词长度"));
+				return res;
+			}
+		}*/
+
+		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.ACHIEVEMENT_TECHNICAL_PICTURE) {
+            res.setData(handleFiles(res, "/achievement/", false, req, sign, "achievement"));
+        } else if (attachmentType==AttachmentType.DEMAND_PICTURE){
+        	 res.setData(handleFiles(res, "/demand/", false, req, sign, "demand"));
+        }else {
+            res.getError().add(buildError(ErrorConstants.PARAM_ERROR, "", "附件标示"));
+        }
+        return res;
+    }
+    /**
+     * 获取领域
+     * @param pid
+     * @param level
+     * @return
+     */
+    @RequestMapping(value = "/getField", method = RequestMethod.POST)
+    public Result getField(Integer pid, Integer level) {
+    	Result res = new Result();
+    	res.setData(fieldGlossoryService.getField(pid, level));
+    	return res;
+    }
+	
 
 	/**
 	 * 获取环信登录账号,如果未注册则先注册

+ 24 - 0
src/main/java/com/goafanti/app/controller/OpenAppConfigController.java

@@ -0,0 +1,24 @@
+package com.goafanti.app.controller;
+
+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.controller.BaseApiController;
+import com.goafanti.common.dao.AppConfigMapper;
+
+@RestController
+@RequestMapping(path = "open/app/config")
+public class OpenAppConfigController extends BaseApiController{
+	@Autowired
+	private AppConfigMapper appConfigMapper;
+	
+	@RequestMapping(value = "/getAppRelease", method = RequestMethod.GET)
+	public Result getAppRelease(){
+		Result res = new Result();
+		res.setData(appConfigMapper.getAppRelease());
+		return res;
+	}
+}

+ 108 - 0
src/main/java/com/goafanti/app/controller/OpenAppDiscoveryController.java

@@ -0,0 +1,108 @@
+package com.goafanti.app.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.achievement.service.AchievementInterestService;
+import com.goafanti.achievement.service.AchievementService;
+import com.goafanti.common.bo.Result;
+import com.goafanti.common.controller.BaseApiController;
+import com.goafanti.common.dao.AppConfigMapper;
+import com.goafanti.common.utils.StringUtils;
+import com.goafanti.demand.service.DemandService;
+import com.goafanti.user.service.UserIdentityService;
+
+@RestController
+@RequestMapping(path = "open/app/discovery", method = RequestMethod.GET)
+public class OpenAppDiscoveryController extends BaseApiController {
+	@Resource
+	private AchievementService	achievementService;
+	@Resource
+	private DemandService	demandService;
+	@Resource
+	private UserIdentityService	userIdentityService;
+	@Resource
+	private AchievementInterestService	achievementInterestService;
+	
+	/**
+	 * 成果列表
+	 */
+	@RequestMapping(value = "/achievementList", method = RequestMethod.GET)
+	private Result achievementList(Integer auditStatus, Integer serialNumber, String name, String keyword,Integer dataCategory,Integer category,
+			Integer ownerType,Integer fieldA, Integer status, String releaseDateStartDate, String releaseDateEndDate,
+			Integer releaseStatus,String ownerId,String pageNo, String pageSize) {
+		Result res = new Result();
+		Integer pNo = 1;
+		Integer pSize = 10;
+		if (StringUtils.isNumeric(pageSize)) {
+			pSize = Integer.parseInt(pageSize);
+		}
+
+		if (StringUtils.isNumeric(pageNo)) {
+			pNo = Integer.parseInt(pageNo);
+		}
+		res.setData(achievementService.listAppUserAchievement(auditStatus, serialNumber, name, keyword,  dataCategory,category,
+				ownerType,  status, releaseDateStartDate, releaseDateEndDate, releaseStatus,ownerId, fieldA, pNo, pSize));
+		return res;
+	}
+	
+	
+	
+	/**
+	 * 需求列表
+	 */
+	@RequestMapping(value = "/demandList", method = RequestMethod.GET)
+	public Result demandList(Integer auditStatus, Integer serialNumber, String name, String keyword, Integer demandType,Integer industryCategoryA,
+			String validityPeriodStartDate, String validityPeriodEndDate, Integer status, Integer releaseStatus,
+			String releaseDateStartDate, String releaseDateEndDate, String employerId,String pageNo, String pageSize) {
+		Result res = new Result();
+		Integer pNo = 1;
+		Integer pSize = 10;
+		if (StringUtils.isNumeric(pageSize)) {
+			pSize = Integer.parseInt(pageSize);
+		}
+
+		if (StringUtils.isNumeric(pageNo)) {
+			pNo = Integer.parseInt(pageNo);
+		}
+		res.setData(demandService.listAppDemand(auditStatus, serialNumber, name, keyword, demandType, industryCategoryA,
+				validityPeriodStartDate, validityPeriodEndDate, status, releaseStatus, releaseDateStartDate,
+				releaseDateEndDate, employerId, pNo, pSize));
+		return res;
+	}
+	
+	/**
+	 * 行业分类列表
+	 * 
+	 */
+	@RequestMapping(value = "/industryList", method = RequestMethod.GET)
+	public Result industryList() {
+		Result res = new Result();
+		res.setData(userIdentityService.industryList());
+		return res;
+	}
+	
+	/**
+	 * 专家列表
+	 */
+	@RequestMapping(value = "/expertsList", method = RequestMethod.GET)
+	public Result expertsList(String industry, Integer pNo, Integer pSize) {
+		Result res = new Result();
+		res.setData(userIdentityService.expertsList(industry,  pNo,  pSize));
+		return res;
+	}
+	
+	/**
+	 * 发现页面广告
+	 */
+	@RequestMapping(value = "/advertising", method = RequestMethod.GET)
+	public Result advertising() {
+		Result res = new Result();
+		res.setData(userIdentityService.advertising());
+		return res;
+	}
+}

+ 110 - 0
src/main/java/com/goafanti/app/controller/OpenAppServiceController.java

@@ -0,0 +1,110 @@
+package com.goafanti.app.controller;
+
+import javax.annotation.Resource;
+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.AdminService;
+
+import com.goafanti.app.bo.ServiceImages;
+import com.goafanti.business.service.BusinessVarietiesService;
+import com.goafanti.business.service.BusinessProjectService;
+import com.goafanti.common.bo.Result;
+import com.goafanti.common.constant.ErrorConstants;
+import com.goafanti.common.controller.BaseApiController;
+import com.goafanti.common.utils.StringUtils;
+
+import com.goafanti.user.service.UserIdentityService;
+
+
+@RestController
+@RequestMapping(path = "open/app/service", method = RequestMethod.GET)
+public class OpenAppServiceController extends BaseApiController {
+	@Resource
+	private BusinessVarietiesService	adminVarietiesService;
+	@Resource
+	private BusinessProjectService	businessProjectService;
+	@Resource
+	private AdminService			adminService;
+	@Resource
+	private UserIdentityService 	userIdentityService;
+
+	/**
+	 * 获取初级品类
+	 */
+	@RequestMapping(value = "/getVarieties", method = RequestMethod.GET)
+	public Result getVarieties() {
+		Result res = new Result();
+		res.setData(adminVarietiesService.getVarieties());
+		return res;
+	}
+	/**
+	 * 获取服务轮播图
+	 */
+	@RequestMapping(value = "/getImagers", method = RequestMethod.GET)
+	public Result getImagers() {
+		Result res = new Result();
+		ServiceImages	serviceImages=new ServiceImages();
+		res.setData(serviceImages.getImagers());
+		return res;
+	}
+	/**
+	 * 获取品类下的项目
+	 */
+	@RequestMapping(value = "/getBusinessProject", method = RequestMethod.GET)
+	public Result getBusinessProject(String id,Integer pNo,Integer pSize) {
+		Result res = new Result();
+		if (StringUtils.isBlank(id)) {
+			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"品类必须指定","品类"));
+			return res;
+		}
+		res.setData(businessProjectService.getBusinessProject(id,pNo, pSize));
+		return res;
+	}
+	/**
+	 * 项目详情
+	 */
+	@RequestMapping(value = "/ProjectDetail", method = RequestMethod.GET)
+	public Result ProjectDetail(String id) {
+		Result res = new Result();
+		if (StringUtils.isBlank(id)) {
+			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"项目必须指定","项目"));
+			return res;
+		}
+		res.setData(businessProjectService.orgProject(id));
+		return res;
+	}
+	/**
+	 * 推荐列表
+	 */
+	@RequestMapping(value = "/recommendProjectList", method = RequestMethod.GET)
+	public Result recommendProjectList(Integer pNo,Integer pSize) {
+		Result res = new Result();
+		res.setData(businessProjectService.recommendProjectList( pNo, pSize));
+		return res;
+	}
+	/**
+	 * 权威咨询师
+	 */
+	@RequestMapping(value = "/consultantList", method = RequestMethod.GET)
+	public Result consultantList(Integer pNo,Integer pSize) {
+		Result res = new Result();
+		res.setData(userIdentityService.consultantList( pNo, pSize));
+		return res;
+	}
+	/**
+	 * 咨询师详情
+	 */
+	@RequestMapping(value = "/consultantDetail", method = RequestMethod.GET)
+	public Result consultantDetail(String id) {
+		Result res = new Result();
+		if (StringUtils.isBlank(id)) {
+			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"咨询师必须指定","咨询师"));
+			return res;
+		}
+		res.setData(userIdentityService.consultantDetail( id));
+		return res;
+	}
+}

+ 102 - 0
src/main/java/com/goafanti/app/controller/OpenAppUserController.java

@@ -0,0 +1,102 @@
+package com.goafanti.app.controller;
+
+import javax.annotation.Resource;
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.bind.annotation.RestController;
+
+import com.goafanti.achievement.service.AchievementInterestService;
+import com.goafanti.achievement.service.AchievementService;
+import com.goafanti.activity.service.ActivityService;
+import com.goafanti.banners.service.BannersService;
+import com.goafanti.common.bo.Result;
+import com.goafanti.common.constant.ErrorConstants;
+import com.goafanti.common.controller.BaseApiController;
+import com.goafanti.demand.service.DemandService;
+import com.goafanti.easemob.EasemobUtils;
+import com.goafanti.message.service.MessageService;
+import com.goafanti.news.service.NewsService;
+import com.goafanti.user.service.UserCareerService;
+import com.goafanti.user.service.UserIdentityService;
+import com.goafanti.user.service.UserInterestService;
+import com.goafanti.user.service.UserService;
+
+@RestController
+@RequestMapping(path = "open/app/user", method = RequestMethod.GET)
+public class OpenAppUserController extends BaseApiController {
+	@Resource
+	private UserService userServiceImpl;
+	@Resource
+	private MessageService messageService;
+	@Resource
+	private EasemobUtils   easemobUtils;
+	@Resource
+	private BannersService		bannersService;
+	@Resource
+	private ActivityService		activityService;
+	@Resource
+	private NewsService			newsService;
+	@Resource
+	private AchievementService	achievementService;
+	@Resource
+	private DemandService		demandService;
+	@Resource
+	private UserCareerService	userCareerService;
+	@Resource
+	private UserInterestService userInterestService; 
+	@Resource
+	private UserIdentityService	userIdentityService;
+	@Resource
+	AchievementInterestService achievementInterestService;
+	
+	
+	/**
+	 * 专家详情
+	 */
+	@RequestMapping(value = "/expertsDetail", method = RequestMethod.GET)
+	public Result expertsDetail(String uid) {
+		Result res = new Result();
+		if (StringUtils.isBlank(uid)) {
+			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"专家必须指定","专家"));
+			return res;
+		}
+		res.setData(userIdentityService.expertsDetail( uid));
+		return res;
+	}
+	/**
+	 * 成果详情
+	 * @param id
+	 * @return
+	 */
+	@RequestMapping(value = "/achievementDetail", method = RequestMethod.GET)
+	private Result userDetail(String id ) {
+		Result res = new Result();
+		if (StringUtils.isBlank(id)) {
+			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"成果必须指定","成果"));
+			return res;
+		}
+		res.setData(achievementService.selectAppUserOwnerDetail(id));
+		return res;
+	}
+	/**
+	 * 需求详情
+	 */
+	@RequestMapping(value = "/demandDetail", method = RequestMethod.GET)
+	public Result DemandDetail(String id ) {
+		Result res = new Result();
+		if (StringUtils.isBlank(id)) {
+			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"需求必须指定","需求"));
+			return res;
+		}
+		res.setData(demandService.selectDemandDetail( id));
+		return res;
+	}
+	
+	@RequestMapping(value = "/index", method = RequestMethod.GET)
+	public Result index(){
+		Result res = new Result();
+		res.setData(messageService.selectMessageWithGroup());
+		return res;
+	}
+}

+ 0 - 34
src/main/java/com/goafanti/app/service/AppConfigService.java

@@ -1,34 +0,0 @@
-package com.goafanti.app.service;
-
-import java.util.List;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.cache.annotation.CacheEvict;
-import org.springframework.cache.annotation.Cacheable;
-import org.springframework.stereotype.Service;
-
-import com.alibaba.fastjson.JSONObject;
-import com.goafanti.common.dao.AppConfigMapper;
-import com.goafanti.common.utils.LoggerUtils;
-import com.goafanti.core.mybatis.BaseMybatisDao;
-
-@Service
-public class AppConfigService extends BaseMybatisDao<AppConfigMapper> {
-	@Autowired
-	AppConfigMapper				appConfigMapper;
-
-	private static final Logger	logger	= LoggerFactory.getLogger(AppConfigService.class);
-
-	@Cacheable(value = "AppConfigListCache", key = "'AppConfigList'")
-	public List<JSONObject> findPortalAppConfigs() {
-		return appConfigMapper.findList();
-	}
-
-	@CacheEvict(value = "AppConfigListCache", key = "'AppConfigList'")
-	public void cleanList() {
-		LoggerUtils.debug(logger, "清除app配置列表缓存");
-	}
-
-}

+ 8 - 0
src/main/java/com/goafanti/business/service/BusinessProjectService.java

@@ -49,11 +49,19 @@ public interface BusinessProjectService {
 	
 	boolean judgeBeing(BusinessProject s);
 
+	List<ProjectBo> portalRecommend();
+	
 	Pagination<ProjectBo> getBusinessProject(String id,Integer pNo,Integer pSize);
 
 	Pagination<ProjectBo> recommendProjectList(Integer pNo, Integer pSize);
 
 	boolean checkProject(String id);
+
+	Pagination<ProjectBo> portalRecommendList(Integer pNo, Integer pSize);
+
+	Pagination<ProjectBo> portalBusinessProject(String id, Integer pNo, Integer pSize);
+
+	ProjectDetailBo ProjectDetail(String id);
 	
 	List<BusinessProject> selectBusinessProjectByName(String businessName);
 	

+ 2 - 0
src/main/java/com/goafanti/business/service/BusinessVarietiesService.java

@@ -34,5 +34,7 @@ public interface BusinessVarietiesService {
 	List<VarietiesBo> getVarieties();
 
 	int  updateLocation(String id, Integer sort, Integer flag);
+
+	List<VarietiesBo> portalVarieties();
 }
 

+ 37 - 1
src/main/java/com/goafanti/business/service/impl/BusinessProjectServiceImpl.java

@@ -151,7 +151,9 @@ public class BusinessProjectServiceImpl extends BaseMybatisDao<BusinessProjectMa
 	@Override
 	public ProjectDetailBo orgProject(String id) {
 		ProjectDetailBo pd=businessProjectMapper.selectAppProjectDetail(id);
-		if (StringUtils.isNotBlank(TokenManager.getUserId())&&projectInterestMapper.checkUidAndDid(id,TokenManager.getUserId())>0) {
+		int i=projectInterestMapper.checkUidAndDid(id,TokenManager.getUserId());
+		
+		if (TokenManager.isLogin()&&i>0) {
 			pd.setInterest("1");
 		}else {
 			pd.setInterest("0");
@@ -411,6 +413,40 @@ public class BusinessProjectServiceImpl extends BaseMybatisDao<BusinessProjectMa
 	public List<BusinessProject> selectBusinessProjectByName(String businessName) {
 		return businessProjectMapper.selectBusinessProjectByName(businessName);
 	}
+	@SuppressWarnings("unchecked")
+	@Override
+	public Pagination<ProjectBo> portalRecommendList(Integer pNo, Integer pSize) {
+		Map<String, Object> params = new HashMap<>();
+		return (Pagination<ProjectBo>)findPage("findRecommendProjectListByPage", "findRecommendProjectListCount",
+				params,pNo,pSize);
+	}
+	@SuppressWarnings("unchecked")
+	@Override
+	public Pagination<ProjectBo> portalBusinessProject(String id, Integer pNo, Integer pSize) {
+		Map<String, Object> params = new HashMap<>();
+		if (StringUtils.isNotBlank(id)) {
+			params.put("id", id);
+		}
+		Pagination<ProjectBo> data =  (Pagination<ProjectBo>)findPage("getBusinessProject", "getBusinessProjectCount",
+				params,pNo,pSize);
+		return data;
 	
+	}
+	@Override
+	public ProjectDetailBo ProjectDetail(String id) {
+		ProjectDetailBo pd=businessProjectMapper.selectAppProjectDetail(id);
+		if (StringUtils.isNotBlank(TokenManager.getUserId())&&projectInterestMapper.checkUidAndDid(id,TokenManager.getUserId())>0) {
+			pd.setInterest("1");
+		}else {
+			pd.setInterest("0");
+		}
+		pd.setProjectSize(projectSizeMapper.selectPidList(id));
+		return pd;
+	
+	}
+	@Override
+	public List<ProjectBo> portalRecommend() {
+		return businessProjectMapper.selectServiceProjectDetail();
+	}
 }
 

+ 7 - 2
src/main/java/com/goafanti/business/service/impl/BusinessVarietiesServiceImpl.java

@@ -197,13 +197,14 @@ public class BusinessVarietiesServiceImpl extends BaseMybatisDao<BusinessVarieti
 	public int deleteState(String id) {
 		BusinessVarieties bs=new BusinessVarieties();
 		bs=businessVarietiesMapper.selectByPrimaryKey(id);
-		
 		if (0 ==bs.getDeleteSign()) {
 			bs.setDeleteSign(1);
 		}else {
 			bs.setDeleteSign(0);
 		}
-		
+		if (null!=bs.getSort()) {
+			businessVarietiesMapper.updateFollowSort(bs.getSort());
+		}
 		return businessVarietiesMapper.updateByPrimaryKey(bs);
 	}
 	@Override
@@ -268,6 +269,10 @@ public class BusinessVarietiesServiceImpl extends BaseMybatisDao<BusinessVarieti
 		}
 
 	}
+	@Override
+	public List<VarietiesBo> portalVarieties() {
+		return businessVarietiesMapper.getVarieties();
+	}
 	
 }
 

+ 43 - 0
src/main/java/com/goafanti/common/bo/AreaBo.java

@@ -0,0 +1,43 @@
+package com.goafanti.common.bo;
+
+public class AreaBo {
+	private Integer id;
+
+    private String name;
+
+    private Integer pid;
+
+    private Integer level;
+
+	public Integer getId() {
+		return id;
+	}
+
+	public void setId(Integer id) {
+		this.id = id;
+	}
+
+	public String getName() {
+		return name;
+	}
+
+	public void setName(String name) {
+		this.name = name;
+	}
+
+	public Integer getPid() {
+		return pid;
+	}
+
+	public void setPid(Integer pid) {
+		this.pid = pid;
+	}
+
+	public Integer getLevel() {
+		return level;
+	}
+
+	public void setLevel(Integer level) {
+		this.level = level;
+	}
+}

+ 55 - 0
src/main/java/com/goafanti/common/bo/CityBo.java

@@ -0,0 +1,55 @@
+package com.goafanti.common.bo;
+
+import java.util.List;
+
+public class CityBo {
+	private Integer id;
+
+    private String name;
+
+    private Integer pid;
+
+    private Integer level;
+    
+    private List<AreaBo> areaList;
+
+	public List<AreaBo> getAreaList() {
+		return areaList;
+	}
+
+	public void setAreaList(List<AreaBo> areaList) {
+		this.areaList = areaList;
+	}
+
+	public Integer getId() {
+		return id;
+	}
+
+	public void setId(Integer id) {
+		this.id = id;
+	}
+
+	public String getName() {
+		return name;
+	}
+
+	public void setName(String name) {
+		this.name = name;
+	}
+
+	public Integer getPid() {
+		return pid;
+	}
+
+	public void setPid(Integer pid) {
+		this.pid = pid;
+	}
+
+	public Integer getLevel() {
+		return level;
+	}
+
+	public void setLevel(Integer level) {
+		this.level = level;
+	}
+}

+ 57 - 0
src/main/java/com/goafanti/common/bo/ProvinceBo.java

@@ -0,0 +1,57 @@
+package com.goafanti.common.bo;
+
+import java.util.List;
+
+public class ProvinceBo {
+	private Integer id;
+
+    private String name;
+
+    private Integer pid;
+
+    private Integer level;
+    
+    private List<CityBo> cityList;
+
+	public List<CityBo> getCityList() {
+		return cityList;
+	}
+
+	public void setCityList(List<CityBo> cityList) {
+		this.cityList = cityList;
+	}
+
+	public Integer getId() {
+		return id;
+	}
+
+	public void setId(Integer id) {
+		this.id = id;
+	}
+
+	public String getName() {
+		return name;
+	}
+
+	public void setName(String name) {
+		this.name = name;
+	}
+
+	public Integer getPid() {
+		return pid;
+	}
+
+	public void setPid(Integer pid) {
+		this.pid = pid;
+	}
+
+	public Integer getLevel() {
+		return level;
+	}
+
+	public void setLevel(Integer level) {
+		this.level = level;
+	}
+    
+    
+}

+ 72 - 1
src/main/java/com/goafanti/common/controller/PortalController.java

@@ -16,6 +16,8 @@ import org.springframework.web.servlet.view.RedirectView;
 import com.goafanti.achievement.bo.AchievementListBo;
 import com.goafanti.achievement.bo.AchievementPartnerListBo;
 import com.goafanti.achievement.service.AchievementService;
+import com.goafanti.app.bo.ServiceImages;
+import com.goafanti.business.service.BusinessProjectService;
 import com.goafanti.common.enums.AchievementBargainingMode;
 import com.goafanti.common.enums.AchievementMaturity;
 import com.goafanti.common.enums.AchievementTransferMode;
@@ -27,11 +29,13 @@ import com.goafanti.core.shiro.token.TokenManager;
 import com.goafanti.demand.bo.DemandListBo;
 import com.goafanti.demand.service.DemandInterestService;
 import com.goafanti.demand.service.DemandService;
+import com.goafanti.order.service.OrderService;
 import com.goafanti.portal.bo.AchievementPortalDetailBo;
 import com.goafanti.portal.bo.AchievementPortalSimilarListBo;
 import com.goafanti.portal.bo.DemandPortalDetailBo;
 import com.goafanti.portal.bo.DemandPortalSimilarListBo;
 import com.goafanti.user.bo.UserPartnerDetailBo;
+import com.goafanti.user.service.UserIdentityService;
 import com.goafanti.user.service.UserService;
 
 @Controller
@@ -43,6 +47,8 @@ public class PortalController extends BaseController {
 	@Resource
 	private DemandService demandService;
 	@Resource
+	UserIdentityService	userIdentityService;
+	@Resource
 	private FieldGlossoryService fieldGlossoryService;
 	@Resource
 	private DemandInterestService  demandInterestService;
@@ -50,6 +56,11 @@ public class PortalController extends BaseController {
 	private UserService userService;
 	@Resource
 	private DistrictGlossoryService districtglossoryservice;
+	@Resource
+	BusinessProjectService	businessProjectService;
+	@Resource
+	OrderService	orderService;
+	
 	private static final String UNIT = "万元";
 
 	private static final int MULTIPLE = 20;
@@ -950,5 +961,65 @@ public class PortalController extends BaseController {
 		mv.addObject("uid", uid);
 		return mv;
 
-	};
+	}
+	
+	/**
+	 * 服务
+	 */
+	@RequestMapping(value = "/portal/services", method = RequestMethod.GET)
+	public ModelAndView services(HttpServletRequest request, ModelAndView modelview) {
+		ModelAndView mv = new ModelAndView();
+		mv.setViewName("");
+		//获取首页轮播图
+		mv.addObject("serviceImages",new ServiceImages().getImagers());
+		return mv;
+	}
+	/**
+	 * 服务 权威咨询师
+	 */
+	@RequestMapping(value = "/portal/services/consultant", method = RequestMethod.GET)
+	public ModelAndView consultant(HttpServletRequest request, ModelAndView modelview) {
+		ModelAndView mv = new ModelAndView();
+		mv.setViewName("");
+		return mv;
+	}
+	
+	/**
+	 * 项目详情
+	 */
+	@RequestMapping(value = "/portal/services/projectDetail", method = RequestMethod.GET)
+	public ModelAndView projectDetail(HttpServletRequest request, ModelAndView modelview,String id,Integer pSize ) {
+		ModelAndView mv = new ModelAndView();
+		mv.setViewName("");
+		//获取项目详情
+		mv.addObject("project", businessProjectService.ProjectDetail(id));
+		//获取3条推荐
+		mv.addObject("recommend",businessProjectService.recommendProjectList(null,3));
+		return mv;
+	}
+	
+	/**
+	 * 咨询师详情
+	 */
+	@RequestMapping(value = "/portal/services/consultantDetail", method = RequestMethod.GET)
+	public ModelAndView consultantDetail(HttpServletRequest request, ModelAndView modelview,String id,Integer pSize ) {
+		ModelAndView mv = new ModelAndView();
+		mv.setViewName("");
+		//获取咨询师详情
+		mv.addObject("consultant", userIdentityService.consultantDetail( id));
+		//获取咨询师列表(传入显示数)
+		mv.addObject("recommend",userIdentityService.consultantList(null,pSize));
+		return mv;
+	}
+	/**
+	 * 服务意向
+	 */
+	@RequestMapping(value = "/portal/services/AddIntention", method = RequestMethod.GET)
+	public ModelAndView AddIntention(HttpServletRequest request, ModelAndView modelview,String commodityId,Integer commodityType ) {
+		ModelAndView mv = new ModelAndView();
+		mv.setViewName("");
+		//获取服务意向参数
+		mv.addObject("Intention", orderService.selectCommodityDetail(commodityId, commodityType));
+		return mv;
+	}
 }

+ 13 - 0
src/main/java/com/goafanti/common/controller/PublicController.java

@@ -26,6 +26,7 @@ import com.goafanti.common.constant.ErrorConstants;
 import com.goafanti.common.enums.UserType;
 import com.goafanti.common.model.User;
 import com.goafanti.common.service.DistrictGlossoryService;
+import com.goafanti.common.service.FieldGlossoryService;
 import com.goafanti.common.service.IndustryCategoryService;
 import com.goafanti.common.utils.LoggerUtils;
 import com.goafanti.common.utils.MobileMessageUtils;
@@ -63,6 +64,9 @@ public class PublicController extends BaseController {
 
 	@Resource
 	private AftFileService			aftFileService;
+	
+	@Resource
+	private FieldGlossoryService			fieldGlossoryService;
 
 	@Autowired
 	private IndustryCategoryService	industryCategoryService;
@@ -503,4 +507,13 @@ public class PublicController extends BaseController {
 		return res;
 	}
 	
+	/** 省市区查询 **/
+	@RequestMapping(value = "/listAllProvince" , method = RequestMethod.POST)
+	@ResponseBody
+	public Result listAllProvince(){
+		Result res = new Result();
+		res.setData(districtGlossoryService.getProvince());
+		return res;
+	}
+	
 }

+ 16 - 131
src/main/java/com/goafanti/common/controller/WebpageController.java

@@ -176,11 +176,6 @@ public class WebpageController extends BaseController {
 		return modelview;
 	}
 
-	@RequestMapping(value = "/admin/servicesManage/highTechInfo", method = RequestMethod.GET)
-	public ModelAndView adminServicesManageHighTechInfo(HttpServletRequest request, ModelAndView modelview) {
-		modelview.setViewName("/admin/servicesManage/highTechInfo");
-		return modelview;
-	}
 
 	@RequestMapping(value = "/admin/servicesManage/copyright", method = RequestMethod.GET)
 	public ModelAndView adminServicesManageCopyright(HttpServletRequest request, ModelAndView modelview) {
@@ -279,132 +274,6 @@ public class WebpageController extends BaseController {
 	}
 
 	/**
-	 * 创业圈
-	 */
-	@RequestMapping(value = "/portal/entrepreneurship/entrepreneurshipIndex", method = RequestMethod.GET)
-	public ModelAndView portalEntrepreneurshipEntrepreneurshipIndex(HttpServletRequest request,
-			ModelAndView modelview) {
-		modelview.setViewName("/portal/entrepreneurship/entrepreneurshipIndex");
-		handleBanners(modelview, BannersType.CHUANG_YE_QUAN);
-		return modelview;
-	}
-
-	/**
-	 * 高企自评-基本信息
-	 */
-	@RequestMapping(value = "/portal/highTech/evaluate/basicInfo", method = RequestMethod.GET)
-	public ModelAndView portalHighTechEvaluateBasicInfo(HttpServletRequest request, ModelAndView modelview) {
-		modelview.setViewName("/portal/highTech/evaluate/basicInfo");
-		return modelview;
-	}
-
-	/**
-	 * 高企自评-研发管理
-	 */
-	@RequestMapping(value = "/portal/highTech/evaluate/evaluate", method = RequestMethod.GET)
-	public ModelAndView portalHighTechEvaluateEvaluate(HttpServletRequest request, ModelAndView modelview) {
-		modelview.setViewName("/portal/highTech/evaluate/evaluate");
-		return modelview;
-	}
-
-	/**
-	 * 高企自评-财务信息
-	 */
-	@RequestMapping(value = "/portal/highTech/evaluate/financeInfo", method = RequestMethod.GET)
-	public ModelAndView portalHighTechEvaluateFinanceInfo(HttpServletRequest request, ModelAndView modelview) {
-		modelview.setViewName("/portal/highTech/evaluate/financeInfo");
-		return modelview;
-	}
-
-	/**
-	 * 高企自评-知识产权
-	 */
-	@RequestMapping(value = "/portal/highTech/evaluate/iprInfo", method = RequestMethod.GET)
-	public ModelAndView portalHighTechEvaluateIprInfo(HttpServletRequest request, ModelAndView modelview) {
-		modelview.setViewName("/portal/highTech/evaluate/iprInfo");
-		return modelview;
-	}
-
-	/**
-	 * 高企自评-研发管理
-	 */
-	@RequestMapping(value = "/portal/highTech/evaluate/rdManage", method = RequestMethod.GET)
-	public ModelAndView portalHighTechEvaluateRdManage(HttpServletRequest request, ModelAndView modelview) {
-		modelview.setViewName("/portal/highTech/evaluate/rdManage");
-		return modelview;
-	}
-
-	/**
-	 * 高企认定服务
-	 */
-	@RequestMapping(value = "/portal/highTech/authentication", method = RequestMethod.GET)
-	public ModelAndView portalHighTechAuthentication(HttpServletRequest request, ModelAndView modelview) {
-		modelview.setViewName("/portal/highTech/authentication");
-		handleBanners(modelview, BannersType.GAO_QI_REN_DING);
-		return modelview;
-	}
-
-	/**
-	 * 知识产权申请
-	 */
-	@RequestMapping(value = "/portal/ipr/apply", method = RequestMethod.GET)
-	public ModelAndView portalIprApply(HttpServletRequest request, ModelAndView modelview) {
-		modelview.setViewName("/portal/ipr/apply");
-		handleBanners(modelview, BannersType.ZHI_SHI_CHAN_QUAN_SHEN_QING);
-		return modelview;
-	}
-
-	/**
-	 * 知识产权服务
-	 */
-	@RequestMapping(value = "/portal/ipr/service", method = RequestMethod.GET)
-	public ModelAndView portalIprService(HttpServletRequest request, ModelAndView modelview) {
-		modelview.setViewName("/portal/ipr/service");
-		handleBanners(modelview, BannersType.ZHI_SHI_CHAN_QUAN_FU_WU);
-		return modelview;
-	}
-
-	/**
-	 * 金融圈
-	 */
-	@RequestMapping(value = "/portal/financial/index", method = RequestMethod.GET)
-	public ModelAndView portalFinancialFinancialIndex(HttpServletRequest request, ModelAndView modelview) {
-		modelview.setViewName("/portal/financial/index");
-		handleBanners(modelview, BannersType.JIN_RONG_QUAN);
-		return modelview;
-	}
-
-	/**
-	 * 建设兵团
-	 */
-	@RequestMapping(value = "/portal/websiteBuild/websiteBuildIndex", method = RequestMethod.GET)
-	public ModelAndView portalWebsiteBuildWebsiteBuildIndex(HttpServletRequest request, ModelAndView modelview) {
-		modelview.setViewName("/portal/websiteBuild/websiteBuildIndex");
-		handleBanners(modelview, BannersType.JIAN_SHE_BING_TUAN);
-		return modelview;
-	}
-
-	/**
-	 * 知识产权贯标
-	 */
-	@RequestMapping(value = "/portal/ipr/iso", method = RequestMethod.GET)
-	public ModelAndView portalIprIso(HttpServletRequest request, ModelAndView modelview) {
-		modelview.setViewName("/portal/ipr/iso");
-		handleBanners(modelview, BannersType.ZHI_SHI_CHAN_QUAN_GUAN_BIAO);
-		return modelview;
-	}
-
-	/**
-	 * 专利运营与布局
-	 */
-	@RequestMapping(value = "/portal/ipr/patentOperation", method = RequestMethod.GET)
-	public ModelAndView portalIprPatentOperation(HttpServletRequest request, ModelAndView modelview) {
-		modelview.setViewName("/portal/ipr/patentOperation");
-		handleBanners(modelview, BannersType.ZHUAN_LI_YUN_YING);
-		return modelview;
-	}
-
-	/**
 	 * 评估页
 	 */
 	@RequestMapping(value = "/portal/evaluation/index", method = RequestMethod.GET)
@@ -559,5 +428,21 @@ public class WebpageController extends BaseController {
 		if (!banners.isEmpty()) {
 			modelview.addObject("banners", banners);
 		}
+	} 
+	
+	/**
+	 * 服务-推荐
+	 * 
+	 * @param request
+	 * @param modelview
+	 * @return
+	 */
+	@RequestMapping(value = "/portal/service/recommended")
+	public ModelAndView recommended(HttpServletRequest request, ModelAndView modelview) {
+		modelview.setViewName("/portal/service/recommended");
+		return modelview;
 	}
+	
+	
+	
 }

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

@@ -83,5 +83,13 @@ public interface AdminMapper {
 	int deleteById(String id);
 
 	Pagination<AppAdminListBo> consultantList();
+	
+	List<Admin> selectIDNBySuperiorId(String superiorId);
+	
+	String selectUserNoById(String superiorId);
+	
+	int updateByUserNo(Admin record);
+	
+	List<String>selectIdBySuperiorId(String superiorId);
 
 }

+ 82 - 21
src/main/java/com/goafanti/common/dao/AppConfigMapper.java

@@ -1,22 +1,83 @@
-package com.goafanti.common.dao;
-
-import java.util.List;
-
-import com.alibaba.fastjson.JSONObject;
-import com.goafanti.common.model.AppConfig;
-
-public interface AppConfigMapper {
-	int deleteByPrimaryKey(Integer id);
-
-	int insert(AppConfig record);
-
-	int insertSelective(AppConfig record);
-
-	AppConfig selectByPrimaryKey(Integer id);
-
-	int updateByPrimaryKeySelective(AppConfig record);
-
-	int updateByPrimaryKey(AppConfig record);
-
-	List<JSONObject> findList();
+package com.goafanti.common.dao;
+
+import java.util.List;
+
+import com.goafanti.app.bo.AppConfigBo;
+import com.goafanti.common.model.AppConfig;
+import com.goafanti.common.model.AppConfigExample;
+import org.apache.ibatis.annotations.Param;
+
+public interface AppConfigMapper {
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table app_config
+	 * @mbg.generated  Wed Jan 24 16:21:41 CST 2018
+	 */
+	long countByExample(AppConfigExample example);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table app_config
+	 * @mbg.generated  Wed Jan 24 16:21:41 CST 2018
+	 */
+	int deleteByExample(AppConfigExample example);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table app_config
+	 * @mbg.generated  Wed Jan 24 16:21:41 CST 2018
+	 */
+	int deleteByPrimaryKey(Integer id);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table app_config
+	 * @mbg.generated  Wed Jan 24 16:21:41 CST 2018
+	 */
+	int insert(AppConfig record);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table app_config
+	 * @mbg.generated  Wed Jan 24 16:21:41 CST 2018
+	 */
+	int insertSelective(AppConfig record);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table app_config
+	 * @mbg.generated  Wed Jan 24 16:21:41 CST 2018
+	 */
+	List<AppConfig> selectByExample(AppConfigExample example);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table app_config
+	 * @mbg.generated  Wed Jan 24 16:21:41 CST 2018
+	 */
+	AppConfig selectByPrimaryKey(Integer id);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table app_config
+	 * @mbg.generated  Wed Jan 24 16:21:41 CST 2018
+	 */
+	int updateByExampleSelective(@Param("record") AppConfig record, @Param("example") AppConfigExample example);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table app_config
+	 * @mbg.generated  Wed Jan 24 16:21:41 CST 2018
+	 */
+	int updateByExample(@Param("record") AppConfig record, @Param("example") AppConfigExample example);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table app_config
+	 * @mbg.generated  Wed Jan 24 16:21:41 CST 2018
+	 */
+	int updateByPrimaryKeySelective(AppConfig record);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table app_config
+	 * @mbg.generated  Wed Jan 24 16:21:41 CST 2018
+	 */
+	int updateByPrimaryKey(AppConfig record);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table app_config
+	 * @mbg.generated  Wed Jan 24 16:14:16 CST 2018
+	 */
+	AppConfigBo getAppRelease();
 }

+ 2 - 0
src/main/java/com/goafanti/common/dao/BusinessProjectMapper.java

@@ -89,4 +89,6 @@ public interface BusinessProjectMapper {
 	int checkProject(String id);
 
 	List<BusinessProject> selectBusinessProjectByName(String businessName);
+	
+	List<ProjectBo> selectServiceProjectDetail();
 }

+ 2 - 0
src/main/java/com/goafanti/common/dao/BusinessVarietiesMapper.java

@@ -104,4 +104,6 @@ public interface BusinessVarietiesMapper {
 	String getSortMax();
 
 	BusinessVarieties selectBySort(Integer sort);
+
+	int updateFollowSort(Integer sort);
 }

+ 9 - 0
src/main/java/com/goafanti/common/dao/DistrictGlossoryMapper.java

@@ -2,6 +2,9 @@ package com.goafanti.common.dao;
 
 import java.util.List;
 
+import com.goafanti.common.bo.AreaBo;
+import com.goafanti.common.bo.CityBo;
+import com.goafanti.common.bo.ProvinceBo;
 import com.goafanti.common.model.DistrictGlossory;
 
 public interface DistrictGlossoryMapper {
@@ -20,4 +23,10 @@ public interface DistrictGlossoryMapper {
     List<DistrictGlossory> findByPid(Integer pid);
     
     String selectNameById(Integer id);
+    
+    List<ProvinceBo> getProvince();
+	
+	List<CityBo> getCity();
+	
+	List<AreaBo> getArea();
 }

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

@@ -1,5 +1,9 @@
 package com.goafanti.common.dao;
 
+import java.util.List;
+
+import org.apache.ibatis.annotations.Param;
+
 import com.goafanti.common.model.FieldGlossory;
 
 public interface FieldGlossoryMapper {
@@ -14,4 +18,6 @@ public interface FieldGlossoryMapper {
     int updateByPrimaryKeySelective(FieldGlossory record);
 
     int updateByPrimaryKey(FieldGlossory record);
+
+	List<FieldGlossory> getField(@Param("pid")Integer pid, @Param("level")Integer level);
 }

+ 6 - 1
src/main/java/com/goafanti/common/dao/UserMapper.java

@@ -6,6 +6,7 @@ import java.util.List;
 import org.apache.ibatis.annotations.Param;
 
 import com.goafanti.app.bo.UserBasicInfo;
+import com.goafanti.common.model.Admin;
 import com.goafanti.common.model.OrganizationContactBook;
 import com.goafanti.common.model.User;
 import com.goafanti.common.model.UserBusiness;
@@ -200,5 +201,9 @@ public interface UserMapper {
 	 * @param easemobName
 	 * @return
 	 */
-	User selectByNumber(@Param("easemobName")String easemobName);
+	User selectByNumber(@Param("easemobName")String easemobName);
+	
+	List<Admin> findAdminName(String aid);
+	
+	int updateEnteringAudit(@Param("id")String id,@Param("auditStatus")Integer auditStatus,@Param("auditOpinion")String auditOpinion);
 }

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

@@ -855,8 +855,9 @@
   	select 
   		a.id, a.serial_number as serialNumber, a.data_category as dataCategory, 
   		a.name, a.keyword, a.category, a.owner_name as ownerName, a.owner_type as ownerType, 
-  		<!-- oi.unit_name as username,  -->a.owner_id as ownerId, a.org_id as orgId, a.contacts,a.create_time as createTime,
-  		a.release_date as releaseDate, a.audit_status as auditStatus, ad.name as techBrokerId,a.boutique
+  		a.owner_id as ownerId, a.org_id as orgId, a.contacts,a.create_time as createTime,
+  		a.release_date as releaseDate, a.audit_status as auditStatus, ad.name as techBrokerId,a.boutique,ad.id techBrokerIdd,
+  		a.release_status as releaseStatus
   	<if test="hot != null and hot == 1"><!-- 在首页 -->
 		,1 as hot
 	</if>
@@ -868,10 +869,6 @@
 	</if>
   	from achievement a
   	LEFT JOIN admin ad on ad.id = a.tech_broker_id
-	<!-- LEFT JOIN organization_identity oi on a.owner_id = oi.uid -->
-	<if test="adminId != null">
-		LEFT JOIN user u on a.owner_id = u.id
-	</if>
   	<if test="hot != null and hot == 1"> <!-- 在首页 -->
 		inner join marketing_management mm on a.id = mm.product_id
 	</if>
@@ -882,15 +879,9 @@
   	<if test="ownerType != null">
 		and a.owner_type = #{ownerType,jdbcType=VARCHAR}
 	</if>
-  	<if test="techBrokerId != null">
-		and a.tech_broker_id = #{techBrokerId,jdbcType=VARCHAR}
-	</if>
   	<if test="ownerName != null">
   		and  a.owner_name like CONCAT('%',#{ownerName,jdbcType=VARCHAR},'%') 	
   	</if>
-  	<!-- <if test="unitName != null">
-  		and  oi.unit_name like CONCAT('%',#{unitName,jdbcType=VARCHAR},'%')
-  	</if> -->
   	<if test="ownerId != null">
 		and  a.owner_id = #{ownerId,jdbcType=VARCHAR}
 	</if>
@@ -948,10 +939,6 @@
   		count(1)
   	from achievement a
   	LEFT JOIN admin ad on ad.id = a.tech_broker_id
-	<!-- LEFT JOIN organization_identity oi on a.owner_id = oi.uid -->
-	<if test="adminId != null">
-		LEFT JOIN user u on a.owner_id = u.id
-	</if>
   	<if test="hot != null and hot == 1"><!-- 在首页 -->
 		inner join marketing_management mm on a.id = mm.product_id
 	</if>
@@ -962,15 +949,9 @@
   	<if test="ownerType != null">
 		and a.owner_type = #{ownerType,jdbcType=VARCHAR}
 	</if>
-  	<if test="techBrokerId != null">
-		and a.tech_broker_id = #{techBrokerId,jdbcType=VARCHAR}
-	</if>
   	<if test="ownerName != null">
   		and  a.owner_name like CONCAT('%',#{ownerName,jdbcType=VARCHAR},'%')
   	</if>
-  	<!-- <if test="unitName != null">
-  		and  oi.unit_name like CONCAT('%',#{unitName,jdbcType=VARCHAR},'%')
-  	</if> -->
   	<if test="ownerId != null">
 		and  a.owner_id = #{ownerId,jdbcType=VARCHAR}
 	</if>
@@ -1007,7 +988,9 @@
 	<if test="releaseStatus != null">
 	   and  a.release_status = #{releaseStatus,jdbcType=INTEGER}
 	</if>
-	
+	<if test="boutique != null">
+		and a.boutique = #{boutique,jdbcType=INTEGER}
+	</if>
 	<if test="hot != null and hot == 0"><!-- 不在首页 -->
 		and a.id not in(select mm.product_id from marketing_management mm where mm.effective = 1)
 	</if>
@@ -1234,11 +1217,11 @@
 	</select>
   
   <select id="selectUserOwnerDetail" parameterType="java.lang.String" resultType="com.goafanti.achievement.bo.AchievementUserOwnerDetailBo">
-     	select  
+	select  
 		  	a.id, a.serial_number as serialNumber, a.data_category as dataCategory, 
 		  	a.name, a.keyword, a.category, 
 		  	a.summary, a.introduction, a.technical_picture_url as technicalPictureUrl, 
-		  	a.field_a as fieldA, a.field_b as fieldB, a.field_c as fieldC, 
+		  	a.field_a as fieldA, a.field_b as fieldB, a.field_c as fieldC, f.name as field1, f2.name as field2,
 		  	a.maturity, a.maturity_picture_url as maturityPictureUrl, a.maturity_text_file_url as maturityTextFileUrl, 
 		  	a.maturity_video_url as maturityVideoUrl, a.innovation, a.owner_id as ownerId, 
 		  	a.owner_name as ownerName, a.owner_type as ownerType, a.owner_id_number as ownerIdNumber, 
@@ -1251,10 +1234,13 @@
 		    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,
 		    ui.username as iOwnerName, ui.province, ui.city, ui.area, u.email as iOwnerEmail,
-			ui.id_number as iOwnerIdNumber, u.mobile as iOwnerMobile,j.easemob_name as easemobName,
-			ifnull(t.x,0) as orderIntentionCount ,ifnull(t2.x,0) as orderCount
-    from achievement a
+			ui.id_number as iOwnerIdNumber, u.mobile as iOwnerMobile,j.easemob_name as easemobName,a.remark,
+			ifnull(t.x,0) as orderIntentionCount ,ifnull(t2.x,0) as orderCount,ifnull(mm.effective,0) hot,a.boutique,
+			a.international_flag as internationalFlag
+	from achievement a
     left join user_identity ui on a.owner_id = ui.uid
+    left join field_glossory f on a.field_a=f.id
+  	left join field_glossory f2 on a.field_b=f2.id
     left join (select count(0) as x,tl.commodity_id from t_order tr
 				left join t_order_detail tl on tl.order_no=tr.order_no
 				where order_status != 4
@@ -1265,6 +1251,7 @@
 				group by  tl.commodity_id) t2 on a.id=t2.commodity_id 
     left join jpush_easemob_account j on a.owner_id=j.uid
     left join user u on u.id = a.owner_id
+    left join marketing_management mm on a.id = mm.product_id
   where a.id =#{id,jdbcType=VARCHAR}
   </select>
   
@@ -1776,19 +1763,22 @@
   	</select>
   	
   	 <select id="findMyAchievementListByPage" parameterType="String" resultType="com.goafanti.achievement.bo.AchievementListBo">
-  	select 
+  	  
+  select 
 	  a.id, a.boutique,a.name,a.category, a.audit_status as auditStatus,ifnull(t.x,0) as buyIntention,
-	  a.release_date as releaseDate,ifnull(i.y,0) as countInterest
+	  a.release_date as releaseDate,a.create_time as createTime,ifnull(i.y,0) as countInterest
 	from  achievement a 
-	left join (select count(0) as x,commodity_id from t_order
-				where order_status != 4
-				group by  commodity_id ) t on a.id=t.commodity_id 
+	left join (select count(0) as x, tl.commodity_id from t_order tr
+				left join t_order_detail tl on tr.order_no=tl.order_no
+				where tr.order_status != 4
+				group by  tl.commodity_id ) t on a.id=t.commodity_id 
 	left join (select count(0) as y,achievement_id from achievement_interest
 				group by achievement_id ) i on a.id=i.achievement_id	
 	where a.deleted_sign = 0
 	<if test="ownerId != null">
   	and a.owner_id = #{ownerId,jdbcType=VARCHAR}
   	</if>
+  	order by a.create_time desc
   	<if test="page_sql!=null">
 			${page_sql}
 	</if>
@@ -1804,5 +1794,340 @@
   	</if>
   	</select>
   	
+  	<select id="findMyyAchievementListByPage" parameterType="String" resultType="com.goafanti.achievement.bo.AchievementListBo">
+  	select 
+  		a.id, a.serial_number as serialNumber, a.data_category as dataCategory, 
+  		a.name, a.keyword, a.category, a.owner_name as ownerName, a.owner_type as ownerType, 
+  		<!-- oi.unit_name as username,  -->a.owner_id as ownerId, a.org_id as orgId, a.contacts,a.create_time as createTime,
+  		a.release_date as releaseDate, a.audit_status as auditStatus, ad.name as techBrokerId,a.boutique
+  	<if test="hot != null and hot == 1"><!-- 在首页 -->
+		,1 as hot
+	</if>
+	<if test="hot != null and hot == 0"><!-- 无首页参数 -->
+		,0 as hot
+	</if>
+	<if test="hot==null"><!-- 在首页 -->
+		,ifnull(mm.effective,0) as hot
+	</if>
+  	from achievement a
+  	LEFT JOIN admin ad on ad.id = a.tech_broker_id
+	<!-- LEFT JOIN organization_identity oi on a.owner_id = oi.uid -->
+	<if test="adminId != null">
+		LEFT JOIN user u on a.owner_id = u.id
+	</if>
+  	<if test="hot != null and hot == 1"> <!-- 在首页 -->
+		inner join marketing_management mm on a.id = mm.product_id
+	</if>
+	<if test="hot == null"> <!-- 无首页参数 -->
+		left join marketing_management mm on a.id = mm.product_id 
+	</if>
+  	where a.deleted_sign = 0 
+  	<if test="ownerType != null">
+		and a.owner_type = #{ownerType,jdbcType=VARCHAR}
+	</if>
+  	<if test="techBrokerId != null">
+		and a.tech_broker_id = #{techBrokerId,jdbcType=VARCHAR} 
+	</if>
+  	<if test="ownerName != null">
+  		and  a.owner_name like CONCAT('%',#{ownerName,jdbcType=VARCHAR},'%') 	
+  	</if>
+  	<!-- <if test="unitName != null">
+  		and  oi.unit_name like CONCAT('%',#{unitName,jdbcType=VARCHAR},'%')
+  	</if> -->
+  	<if test="ownerId != null">
+		and  a.owner_id = #{ownerId,jdbcType=VARCHAR}
+	</if>
+  	<if test="serialNumber != null">
+		and  a.serial_number = #{serialNumber,jdbcType=INTEGER}
+	</if>
+	<if test="auditStatus != null">
+		and  a.audit_status = #{auditStatus,jdbcType=INTEGER}
+	</if>
+	<if test="name != null">
+		and  a.name like CONCAT('%',#{name,jdbcType=VARCHAR},'%')
+	</if>
+	<if test="keyword != null">
+		and  a.keyword like "%"#{keyword,jdbcType=VARCHAR}"%"
+	</if>
+	<if test="category != null">
+		and  a.category = #{category,jdbcType=INTEGER}
+	</if>
+	<if test="status != null">
+		and  a.status = #{status,jdbcType=INTEGER}
+	</if>
+	<if test="rStart != null">
+       and	a.release_date <![CDATA[ >= ]]> #{rStart,jdbcType=TIMESTAMP}
+	</if>
+	<if test="rEnd != null">
+	   and a.release_date <![CDATA[ < ]]> #{rEnd,jdbcType=TIMESTAMP}
+	</if>
+	<if test="cStart != null">
+       and	a.create_time <![CDATA[ >= ]]> #{cStart,jdbcType=TIMESTAMP}
+	</if>
+	<if test="cEnd != null">
+	   and a.create_time <![CDATA[ < ]]> #{cEnd,jdbcType=TIMESTAMP}
+	</if>
+	<if test="releaseStatus != null">
+	   and  a.release_status = #{releaseStatus,jdbcType=INTEGER}
+	</if>
+	
+	<if test="boutique != null">
+		and a.boutique = #{boutique,jdbcType=INTEGER}
+	</if>
+	<if test="hot != null and hot == 0"><!-- 不在首页 -->
+		and a.id not in(select mm.product_id from marketing_management mm where mm.effective = 1)
+	</if>
+	<if test="hot != null and hot == 1"><!-- 在首页 -->
+		and mm.effective = 1
+	</if>
+	order by serial_number desc
+	<if test="page_sql!=null">
+			${page_sql}
+	</if>
+  </select>
+  
+  <select id="findMyyAchievementCount" parameterType="String" resultType="java.lang.Integer">
+  	select 
+  		count(1)
+  	from achievement a
+  	LEFT JOIN admin ad on ad.id = a.tech_broker_id
+	<!-- LEFT JOIN organization_identity oi on a.owner_id = oi.uid -->
+	<if test="adminId != null">
+		LEFT JOIN user u on a.owner_id = u.id
+	</if>
+  	<if test="hot != null and hot == 1"><!-- 在首页 -->
+		inner join marketing_management mm on a.id = mm.product_id
+	</if>
+	<if test="hot == null"> <!-- 无首页参数 -->
+		left join marketing_management mm on a.id = mm.product_id 
+	</if>
+  	where a.deleted_sign = 0 
+  	<if test="ownerType != null">
+		and a.owner_type = #{ownerType,jdbcType=VARCHAR}
+	</if>
+  	<if test="techBrokerId != null">
+		and a.tech_broker_id = #{techBrokerId,jdbcType=VARCHAR} 
+	</if>
+  	<if test="ownerName != null">
+  		and  a.owner_name like CONCAT('%',#{ownerName,jdbcType=VARCHAR},'%')
+  	</if>
+  	<!-- <if test="unitName != null">
+  		and  oi.unit_name like CONCAT('%',#{unitName,jdbcType=VARCHAR},'%')
+  	</if> -->
+  	<if test="ownerId != null">
+		and  a.owner_id = #{ownerId,jdbcType=VARCHAR}
+	</if>
+  	<if test="serialNumber != null">
+		and  a.serial_number = #{serialNumber,jdbcType=INTEGER}
+	</if>
+	<if test="auditStatus != null">
+		and  a.audit_status = #{auditStatus,jdbcType=INTEGER}
+	</if>
+	<if test="name != null">
+		and  a.name like CONCAT('%',#{name,jdbcType=VARCHAR},'%')
+	</if>
+	<if test="keyword != null">
+		and  a.keyword like "%"#{keyword,jdbcType=VARCHAR}"%"
+	</if>
+	<if test="category != null">
+		and  a.category = #{category,jdbcType=INTEGER}
+	</if>
+	<if test="status != null">
+		and  a.status = #{status,jdbcType=INTEGER}
+	</if>
+	<if test="rStart != null">
+       and	a.release_date <![CDATA[ >= ]]> #{rStart,jdbcType=TIMESTAMP}
+	</if>
+	<if test="rEnd != null">
+	   and a.release_date <![CDATA[ < ]]> #{rEnd,jdbcType=TIMESTAMP}
+	</if>
+	<if test="cStart != null">
+       and	a.create_time <![CDATA[ >= ]]> #{cStart,jdbcType=TIMESTAMP}
+	</if>
+	<if test="cEnd != null">
+	   and a.create_time <![CDATA[ < ]]> #{cEnd,jdbcType=TIMESTAMP}
+	</if>
+	<if test="releaseStatus != null">
+	   and  a.release_status = #{releaseStatus,jdbcType=INTEGER}
+	</if>
+	<if test="boutique != null">
+		and a.boutique = #{boutique,jdbcType=INTEGER}
+	</if>
+	<if test="hot != null and hot == 0"><!-- 不在首页 -->
+		and a.id not in(select mm.product_id from marketing_management mm where mm.effective = 1)
+	</if>
+	<if test="hot != null and hot == 1"><!-- 在首页 -->
+		and  mm.effective = 1
+	</if>
+  </select>
+  	
+  	<select id="findManageAchievementListByPage" parameterType="String" resultType="com.goafanti.achievement.bo.AchievementListBo">
+  	select 
+  		a.id, a.serial_number as serialNumber, a.data_category as dataCategory, 
+  		a.name, a.keyword, a.category, a.owner_name as ownerName, a.owner_type as ownerType, 
+  		<!-- oi.unit_name as username,  -->a.owner_id as ownerId, a.org_id as orgId, a.contacts,a.create_time as createTime,
+  		a.release_date as releaseDate, a.audit_status as auditStatus, ad.name as techBrokerId,a.boutique
+  	<if test="hot != null and hot == 1"><!-- 在首页 -->
+		,1 as hot
+	</if>
+	<if test="hot != null and hot == 0"><!-- 无首页参数 -->
+		,0 as hot
+	</if>
+	<if test="hot==null"><!-- 在首页 -->
+		,ifnull(mm.effective,0) as hot
+	</if>
+  	from achievement a
+  	LEFT JOIN admin ad on ad.id = a.tech_broker_id
+  	LEFT JOIN department_management dm on dm.id = ad.department_id
+	<!-- LEFT JOIN organization_identity oi on a.owner_id = oi.uid -->
+	<if test="adminId != null">
+		LEFT JOIN user u on a.owner_id = u.id
+	</if>
+  	<if test="hot != null and hot == 1"> <!-- 在首页 -->
+		inner join marketing_management mm on a.id = mm.product_id
+	</if>
+	<if test="hot == null"> <!-- 无首页参数 -->
+		left join marketing_management mm on a.id = mm.product_id 
+	</if>
+  	where a.deleted_sign = 0 
+  	<if test="ownerType != null">
+		and a.owner_type = #{ownerType,jdbcType=VARCHAR}
+	</if>
+  	<if test="techBrokerId != null">
+		and (a.tech_broker_id = #{techBrokerId,jdbcType=VARCHAR} or ad.department_id=(select department_id from admin where id=#{techBrokerId,jdbcType=VARCHAR}))
+	</if>
+  	<if test="ownerName != null">
+  		and  a.owner_name like CONCAT('%',#{ownerName,jdbcType=VARCHAR},'%') 	
+  	</if>
+  	<!-- <if test="unitName != null">
+  		and  oi.unit_name like CONCAT('%',#{unitName,jdbcType=VARCHAR},'%')
+  	</if> -->
+  	<if test="ownerId != null">
+		and  a.owner_id = #{ownerId,jdbcType=VARCHAR}
+	</if>
+  	<if test="serialNumber != null">
+		and  a.serial_number = #{serialNumber,jdbcType=INTEGER}
+	</if>
+	<if test="auditStatus != null">
+		and  a.audit_status = #{auditStatus,jdbcType=INTEGER}
+	</if>
+	<if test="name != null">
+		and  a.name like CONCAT('%',#{name,jdbcType=VARCHAR},'%')
+	</if>
+	<if test="keyword != null">
+		and  a.keyword like "%"#{keyword,jdbcType=VARCHAR}"%"
+	</if>
+	<if test="category != null">
+		and  a.category = #{category,jdbcType=INTEGER}
+	</if>
+	<if test="status != null">
+		and  a.status = #{status,jdbcType=INTEGER}
+	</if>
+	<if test="rStart != null">
+       and	a.release_date <![CDATA[ >= ]]> #{rStart,jdbcType=TIMESTAMP}
+	</if>
+	<if test="rEnd != null">
+	   and a.release_date <![CDATA[ < ]]> #{rEnd,jdbcType=TIMESTAMP}
+	</if>
+	<if test="cStart != null">
+       and	a.create_time <![CDATA[ >= ]]> #{cStart,jdbcType=TIMESTAMP}
+	</if>
+	<if test="cEnd != null">
+	   and a.create_time <![CDATA[ < ]]> #{cEnd,jdbcType=TIMESTAMP}
+	</if>
+	<if test="releaseStatus != null">
+	   and  a.release_status = #{releaseStatus,jdbcType=INTEGER}
+	</if>
+	
+	<if test="boutique != null">
+		and a.boutique = #{boutique,jdbcType=INTEGER}
+	</if>
+	<if test="hot != null and hot == 0"><!-- 不在首页 -->
+		and a.id not in(select mm.product_id from marketing_management mm where mm.effective = 1)
+	</if>
+	<if test="hot != null and hot == 1"><!-- 在首页 -->
+		and mm.effective = 1
+	</if>
+	order by serial_number desc
+	<if test="page_sql!=null">
+			${page_sql}
+	</if>
+  </select>
+  
+  <select id="findManageAchievementCount" parameterType="String" resultType="java.lang.Integer">
+  	select 
+  		count(1)
+  	from achievement a
+  	LEFT JOIN admin ad on ad.id = a.tech_broker_id
+  	LEFT JOIN department_management dm on dm.id = ad.department_id
+	<!-- LEFT JOIN organization_identity oi on a.owner_id = oi.uid -->
+	<if test="adminId != null">
+		LEFT JOIN user u on a.owner_id = u.id
+	</if>
+  	<if test="hot != null and hot == 1"><!-- 在首页 -->
+		inner join marketing_management mm on a.id = mm.product_id
+	</if>
+	<if test="hot == null"> <!-- 无首页参数 -->
+		left join marketing_management mm on a.id = mm.product_id 
+	</if>
+  	where a.deleted_sign = 0 
+  	<if test="ownerType != null">
+		and a.owner_type = #{ownerType,jdbcType=VARCHAR}
+	</if>
+  	<if test="techBrokerId != null">
+		and (a.tech_broker_id = #{techBrokerId,jdbcType=VARCHAR} or ad.department_id=(select department_id from admin where id=#{techBrokerId,jdbcType=VARCHAR}))
+	</if>
+  	<if test="ownerName != null">
+  		and  a.owner_name like CONCAT('%',#{ownerName,jdbcType=VARCHAR},'%')
+  	</if>
+  	<!-- <if test="unitName != null">
+  		and  oi.unit_name like CONCAT('%',#{unitName,jdbcType=VARCHAR},'%')
+  	</if> -->
+  	<if test="ownerId != null">
+		and  a.owner_id = #{ownerId,jdbcType=VARCHAR}
+	</if>
+  	<if test="serialNumber != null">
+		and  a.serial_number = #{serialNumber,jdbcType=INTEGER}
+	</if>
+	<if test="auditStatus != null">
+		and  a.audit_status = #{auditStatus,jdbcType=INTEGER}
+	</if>
+	<if test="name != null">
+		and  a.name like CONCAT('%',#{name,jdbcType=VARCHAR},'%')
+	</if>
+	<if test="keyword != null">
+		and  a.keyword like "%"#{keyword,jdbcType=VARCHAR}"%"
+	</if>
+	<if test="category != null">
+		and  a.category = #{category,jdbcType=INTEGER}
+	</if>
+	<if test="status != null">
+		and  a.status = #{status,jdbcType=INTEGER}
+	</if>
+	<if test="rStart != null">
+       and	a.release_date <![CDATA[ >= ]]> #{rStart,jdbcType=TIMESTAMP}
+	</if>
+	<if test="rEnd != null">
+	   and a.release_date <![CDATA[ < ]]> #{rEnd,jdbcType=TIMESTAMP}
+	</if>
+	<if test="cStart != null">
+       and	a.create_time <![CDATA[ >= ]]> #{cStart,jdbcType=TIMESTAMP}
+	</if>
+	<if test="cEnd != null">
+	   and a.create_time <![CDATA[ < ]]> #{cEnd,jdbcType=TIMESTAMP}
+	</if>
+	<if test="releaseStatus != null">
+	   and  a.release_status = #{releaseStatus,jdbcType=INTEGER}
+	</if>
+	<if test="boutique != null">
+		and a.boutique = #{boutique,jdbcType=INTEGER}
+	</if>
+	<if test="hot != null and hot == 0"><!-- 不在首页 -->
+		and a.id not in(select mm.product_id from marketing_management mm where mm.effective = 1)
+	</if>
+	<if test="hot != null and hot == 1"><!-- 在首页 -->
+		and  mm.effective = 1
+	</if>
+  </select>
   	
 </mapper>

+ 29 - 1
src/main/java/com/goafanti/common/mapper/AdminMapper.xml

@@ -543,5 +543,33 @@
   	delete from admin
     where id = #{id,jdbcType=VARCHAR}
   </delete>
-
+  
+  <select id="selectIDNBySuperiorId" parameterType="java.lang.String" resultType="com.goafanti.common.model.Admin">
+	select id, mobile, name, 
+	    password, email, create_time as createTime, 
+	    province, position, 
+	    superior_id as superiorId,department_id as departmentId,
+	    status,user_no as userNo,duty,district,head_portrait_url as headPortraitUrl
+	from admin
+	where
+	superior_id=#{superiorId,jdbcType=VARCHAR}
+  </select>
+  <select id="selectUserNoById" resultType="java.lang.String">
+	select user_no as userNo
+	from admin
+	where
+	id=#{superiorId,jdbcType=VARCHAR}  
+  </select>
+  <update id="updateByUserNo" parameterType="com.goafanti.common.model.Admin">
+	update admin
+	set user_no = #{userNo,jdbcType=VARCHAR}
+	where
+	id=#{id,jdbcType=VARCHAR}  
+  </update>
+  <select id="selectIdBySuperiorId" parameterType="java.lang.String" resultType="java.lang.String">
+	select id
+	from admin
+	where
+	superior_id=#{superiorId,jdbcType=VARCHAR}
+  </select>
 </mapper>

+ 330 - 97
src/main/java/com/goafanti/common/mapper/AppConfigMapper.xml

@@ -1,98 +1,331 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="com.goafanti.common.dao.AppConfigMapper">
-  <resultMap id="BaseResultMap" type="com.goafanti.common.model.AppConfig">
-    <id column="id" jdbcType="INTEGER" property="id" />
-    <result column="cate" jdbcType="VARCHAR" property="cate" />
-    <result column="key" jdbcType="VARCHAR" property="key" />
-    <result column="name" jdbcType="VARCHAR" property="name" />
-    <result column="value" jdbcType="VARCHAR" property="value" />
-  </resultMap>
-  <sql id="Base_Column_List">
-    `id`, `cate`, `key`, `name`, `value`
-  </sql>
-  <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
-    select 
-    <include refid="Base_Column_List" />
-    from app_config
-    where id = #{id,jdbcType=INTEGER}
-  </select>
-  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
-    delete from app_config
-    where id = #{id,jdbcType=INTEGER}
-  </delete>
-  <insert id="insert" parameterType="com.goafanti.common.model.AppConfig">
-    insert into app_config (`id`, `cate`, `key`, 
-      `name`, `value`)
-    values (#{id,jdbcType=INTEGER}, #{cate,jdbcType=VARCHAR}, #{key,jdbcType=VARCHAR}, 
-      #{name,jdbcType=VARCHAR}, #{value,jdbcType=VARCHAR})
-  </insert>
-  <insert id="insertSelective" parameterType="com.goafanti.common.model.AppConfig">
-    insert into app_config
-    <trim prefix="(" suffix=")" suffixOverrides=",">
-      <if test="id != null">
-        `id`,
-      </if>
-      <if test="cate != null">
-        `cate`,
-      </if>
-      <if test="key != null">
-        `key`,
-      </if>
-      <if test="name != null">
-        `name`,
-      </if>
-      <if test="value != null">
-        `value`,
-      </if>
-    </trim>
-    <trim prefix="values (" suffix=")" suffixOverrides=",">
-      <if test="id != null">
-        #{id,jdbcType=INTEGER},
-      </if>
-      <if test="cate != null">
-        #{cate,jdbcType=VARCHAR},
-      </if>
-      <if test="key != null">
-        #{key,jdbcType=VARCHAR},
-      </if>
-      <if test="name != null">
-        #{name,jdbcType=VARCHAR},
-      </if>
-      <if test="value != null">
-        #{value,jdbcType=VARCHAR},
-      </if>
-    </trim>
-  </insert>
-  <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.AppConfig">
-    update app_config
-    <set>
-      <if test="cate != null">
-        `cate` = #{cate,jdbcType=VARCHAR},
-      </if>
-      <if test="key != null">
-        `key` = #{key,jdbcType=VARCHAR},
-      </if>
-      <if test="name != null">
-        `name` = #{name,jdbcType=VARCHAR},
-      </if>
-      <if test="value != null">
-        `value` = #{value,jdbcType=VARCHAR},
-      </if>
-    </set>
-    where id = #{id,jdbcType=INTEGER}
-  </update>
-  <update id="updateByPrimaryKey" parameterType="com.goafanti.common.model.AppConfig">
-    update app_config
-    set `cate` = #{cate,jdbcType=VARCHAR},
-      `key` = #{key,jdbcType=VARCHAR},
-      `name` = #{name,jdbcType=VARCHAR},
-      `value` = #{value,jdbcType=VARCHAR}
-    where id = #{id,jdbcType=INTEGER}
-  </update>
-  <select id="findList" resultType="com.alibaba.fastjson.JSONObject">
-    select 
-    <include refid="Base_Column_List" />
-    from app_config
-  </select>
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.goafanti.common.dao.AppConfigMapper">
+  <resultMap id="BaseResultMap" type="com.goafanti.common.model.AppConfig">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Wed Jan 24 16:21:41 CST 2018.
+    -->
+    <id column="id" jdbcType="INTEGER" property="id" />
+    <result column="release_version" jdbcType="VARCHAR" property="releaseVersion" />
+    <result column="release_desc" jdbcType="VARCHAR" property="releaseDesc" />
+    <result column="release_date" jdbcType="TIMESTAMP" property="releaseDate" />
+    <result column="app_url" jdbcType="VARCHAR" property="appUrl" />
+    <result column="force_update" jdbcType="INTEGER" property="forceUpdate" />
+    <result column="release_code" jdbcType="INTEGER" property="releaseCode" />
+  </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 Wed Jan 24 16:21:41 CST 2018.
+    -->
+    <where>
+      <foreach collection="oredCriteria" item="criteria" separator="or">
+        <if test="criteria.valid">
+          <trim prefix="(" prefixOverrides="and" suffix=")">
+            <foreach collection="criteria.criteria" item="criterion">
+              <choose>
+                <when test="criterion.noValue">
+                  and ${criterion.condition}
+                </when>
+                <when test="criterion.singleValue">
+                  and ${criterion.condition} #{criterion.value}
+                </when>
+                <when test="criterion.betweenValue">
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
+                </when>
+                <when test="criterion.listValue">
+                  and ${criterion.condition}
+                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
+                    #{listItem}
+                  </foreach>
+                </when>
+              </choose>
+            </foreach>
+          </trim>
+        </if>
+      </foreach>
+    </where>
+  </sql>
+  <sql id="Update_By_Example_Where_Clause">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Wed Jan 24 16:21:41 CST 2018.
+    -->
+    <where>
+      <foreach collection="example.oredCriteria" item="criteria" separator="or">
+        <if test="criteria.valid">
+          <trim prefix="(" prefixOverrides="and" suffix=")">
+            <foreach collection="criteria.criteria" item="criterion">
+              <choose>
+                <when test="criterion.noValue">
+                  and ${criterion.condition}
+                </when>
+                <when test="criterion.singleValue">
+                  and ${criterion.condition} #{criterion.value}
+                </when>
+                <when test="criterion.betweenValue">
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
+                </when>
+                <when test="criterion.listValue">
+                  and ${criterion.condition}
+                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
+                    #{listItem}
+                  </foreach>
+                </when>
+              </choose>
+            </foreach>
+          </trim>
+        </if>
+      </foreach>
+    </where>
+  </sql>
+  <sql id="Base_Column_List">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Wed Jan 24 16:21:41 CST 2018.
+    -->
+    id, release_version, release_desc, release_date, app_url, force_update, release_code
+  </sql>
+  <select id="selectByExample" parameterType="com.goafanti.common.model.AppConfigExample" resultMap="BaseResultMap">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Wed Jan 24 16:21:41 CST 2018.
+    -->
+    select
+    <if test="distinct">
+      distinct
+    </if>
+    <include refid="Base_Column_List" />
+    from app_config
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+    <if test="orderByClause != null">
+      order by ${orderByClause}
+    </if>
+  </select>
+  <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Wed Jan 24 16:21:41 CST 2018.
+    -->
+    select 
+    <include refid="Base_Column_List" />
+    from app_config
+    where id = #{id,jdbcType=INTEGER}
+  </select>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Wed Jan 24 16:21:41 CST 2018.
+    -->
+    delete from app_config
+    where id = #{id,jdbcType=INTEGER}
+  </delete>
+  <delete id="deleteByExample" parameterType="com.goafanti.common.model.AppConfigExample">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Wed Jan 24 16:21:41 CST 2018.
+    -->
+    delete from app_config
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </delete>
+  <insert id="insert" parameterType="com.goafanti.common.model.AppConfig">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Wed Jan 24 16:21:41 CST 2018.
+    -->
+    insert into app_config (id, release_version, release_desc, 
+      release_date, app_url, force_update, 
+      release_code)
+    values (#{id,jdbcType=INTEGER}, #{releaseVersion,jdbcType=VARCHAR}, #{releaseDesc,jdbcType=VARCHAR}, 
+      #{releaseDate,jdbcType=TIMESTAMP}, #{appUrl,jdbcType=VARCHAR}, #{forceUpdate,jdbcType=INTEGER}, 
+      #{releaseCode,jdbcType=INTEGER})
+  </insert>
+  <insert id="insertSelective" parameterType="com.goafanti.common.model.AppConfig">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Wed Jan 24 16:21:41 CST 2018.
+    -->
+    insert into app_config
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        id,
+      </if>
+      <if test="releaseVersion != null">
+        release_version,
+      </if>
+      <if test="releaseDesc != null">
+        release_desc,
+      </if>
+      <if test="releaseDate != null">
+        release_date,
+      </if>
+      <if test="appUrl != null">
+        app_url,
+      </if>
+      <if test="forceUpdate != null">
+        force_update,
+      </if>
+      <if test="releaseCode != null">
+        release_code,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        #{id,jdbcType=INTEGER},
+      </if>
+      <if test="releaseVersion != null">
+        #{releaseVersion,jdbcType=VARCHAR},
+      </if>
+      <if test="releaseDesc != null">
+        #{releaseDesc,jdbcType=VARCHAR},
+      </if>
+      <if test="releaseDate != null">
+        #{releaseDate,jdbcType=TIMESTAMP},
+      </if>
+      <if test="appUrl != null">
+        #{appUrl,jdbcType=VARCHAR},
+      </if>
+      <if test="forceUpdate != null">
+        #{forceUpdate,jdbcType=INTEGER},
+      </if>
+      <if test="releaseCode != null">
+        #{releaseCode,jdbcType=INTEGER},
+      </if>
+    </trim>
+  </insert>
+  <select id="countByExample" parameterType="com.goafanti.common.model.AppConfigExample" resultType="java.lang.Long">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Wed Jan 24 16:21:41 CST 2018.
+    -->
+    select count(*) from app_config
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </select>
+  <update id="updateByExampleSelective" parameterType="map">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Wed Jan 24 16:21:41 CST 2018.
+    -->
+    update app_config
+    <set>
+      <if test="record.id != null">
+        id = #{record.id,jdbcType=INTEGER},
+      </if>
+      <if test="record.releaseVersion != null">
+        release_version = #{record.releaseVersion,jdbcType=VARCHAR},
+      </if>
+      <if test="record.releaseDesc != null">
+        release_desc = #{record.releaseDesc,jdbcType=VARCHAR},
+      </if>
+      <if test="record.releaseDate != null">
+        release_date = #{record.releaseDate,jdbcType=TIMESTAMP},
+      </if>
+      <if test="record.appUrl != null">
+        app_url = #{record.appUrl,jdbcType=VARCHAR},
+      </if>
+      <if test="record.forceUpdate != null">
+        force_update = #{record.forceUpdate,jdbcType=INTEGER},
+      </if>
+      <if test="record.releaseCode != null">
+        release_code = #{record.releaseCode,jdbcType=INTEGER},
+      </if>
+    </set>
+    <if test="_parameter != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByExample" parameterType="map">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Wed Jan 24 16:21:41 CST 2018.
+    -->
+    update app_config
+    set id = #{record.id,jdbcType=INTEGER},
+      release_version = #{record.releaseVersion,jdbcType=VARCHAR},
+      release_desc = #{record.releaseDesc,jdbcType=VARCHAR},
+      release_date = #{record.releaseDate,jdbcType=TIMESTAMP},
+      app_url = #{record.appUrl,jdbcType=VARCHAR},
+      force_update = #{record.forceUpdate,jdbcType=INTEGER},
+      release_code = #{record.releaseCode,jdbcType=INTEGER}
+    <if test="_parameter != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.AppConfig">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Wed Jan 24 16:21:41 CST 2018.
+    -->
+    update app_config
+    <set>
+      <if test="releaseVersion != null">
+        release_version = #{releaseVersion,jdbcType=VARCHAR},
+      </if>
+      <if test="releaseDesc != null">
+        release_desc = #{releaseDesc,jdbcType=VARCHAR},
+      </if>
+      <if test="releaseDate != null">
+        release_date = #{releaseDate,jdbcType=TIMESTAMP},
+      </if>
+      <if test="appUrl != null">
+        app_url = #{appUrl,jdbcType=VARCHAR},
+      </if>
+      <if test="forceUpdate != null">
+        force_update = #{forceUpdate,jdbcType=INTEGER},
+      </if>
+      <if test="releaseCode != null">
+        release_code = #{releaseCode,jdbcType=INTEGER},
+      </if>
+    </set>
+    where id = #{id,jdbcType=INTEGER}
+  </update>
+  <update id="updateByPrimaryKey" parameterType="com.goafanti.common.model.AppConfig">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Wed Jan 24 16:21:41 CST 2018.
+    -->
+    update app_config
+    set release_version = #{releaseVersion,jdbcType=VARCHAR},
+      release_desc = #{releaseDesc,jdbcType=VARCHAR},
+      release_date = #{releaseDate,jdbcType=TIMESTAMP},
+      app_url = #{appUrl,jdbcType=VARCHAR},
+      force_update = #{forceUpdate,jdbcType=INTEGER},
+      release_code = #{releaseCode,jdbcType=INTEGER}
+    where id = #{id,jdbcType=INTEGER}
+  </update>
+  
+  <select id="getAppRelease" resultType="com.goafanti.app.bo.AppConfigBo">
+  	select  
+  		release_version as releaseVersion, 
+	  	release_desc as releaseDesc, 
+	  	date_format(release_date, '%Y-%m-%d %H:%I:%S') as releaseDate, 
+	  	app_url as appUrl, 
+	  	force_update forceUpdate, 
+	  	release_code releaseCode
+  	from 
+  		app_config 
+  	order by id desc limit 1
+  </select>
 </mapper>

+ 10 - 0
src/main/java/com/goafanti/common/mapper/BusinessProjectMapper.xml

@@ -791,4 +791,14 @@ where id=#{id,jdbcType=VARCHAR}
  	select  <include refid="Base_Column_List" /> from business_project 
  	where bname like concat('%',#{businessName},'%') and delete_sign=0 and status=0
  </select>
+ 
+  
+  <select id="getPortalBusinessProject" resultType="com.goafanti.app.bo.ProjectBo">
+  select id ,min_logo as minLogoUrl,bname as name 
+   from business_project
+	where delete_sign=0 
+	and status=0
+	and boutique=1	
+	LIMIT 0, 3	
+  </select>
 </mapper>

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

@@ -542,4 +542,10 @@
     from business_varieties
     where sort = #{sort,jdbcType=VARCHAR}
   </select>
+  
+  <update id="updateFollowSort" parameterType="com.goafanti.common.model.BusinessVarieties">
+    update business_varieties
+    set sort = sort-1
+    where sort > #{sort,jdbcType=VARCHAR}
+  </update>
 </mapper>

+ 403 - 47
src/main/java/com/goafanti/common/mapper/DemandMapper.xml

@@ -713,11 +713,11 @@
   	select 
 	  d.id, d.serial_number as serialNumber, d.data_category as dataCategory, 
 	  d.name, d.keyword, d.info_sources as infoSources, 
-	  <!-- oi.unit_name as username, --> d.demand_type as demandType, d.validity_period as validityPeriod, 
-	  d.employer_name as employerName, <!-- oi.licence_province as province, --> d.status, d.urgent_days as urgentDays,d.urgent_money as urgentMoney,
+	  d.demand_type as demandType, d.validity_period as validityPeriod, 
+	  d.employer_name as employerName,d.status, d.urgent_days as urgentDays,d.urgent_money as urgentMoney,
 	  d.release_status as releaseStatus, d.release_date as releaseDate, a.name as techBrokerId,d.create_time as createTime,
 	  d.employer_id as employerId, d.audit_status as auditStatus,
-	  d.tech_broker_id as techBrokerId,d.boutique
+	  d.tech_broker_id as techBrokerIdd,d.boutique
 	 <if test="hot != null and hot == 1"><!-- 在首页 -->
 		,1 as hot
 	 </if>
@@ -728,11 +728,7 @@
 		,ifnull(mm.effective,0) as hot
 	 </if>
 	from  demand d 
-	<!-- LEFT JOIN organization_identity oi on d.employer_id = oi.uid -->
 	LEFT JOIN admin a on a.id = d.tech_broker_id
-	<if test="adminId != null">
-		LEFT JOIN user u on d.employer_id = u.id
-	</if>
 	<if test="hot != null and hot == 1"><!-- 在首页 -->
 		inner join marketing_management mm on d.id = mm.product_id
 	</if>
@@ -743,19 +739,6 @@
 	<if test="dataCategory != null">
 		and d.data_category = #{dataCategory,jdbcType=VARCHAR}
 	</if>
-	<if test="adminId != null">
-		and (u.mid = #{adminId,jdbcType=VARCHAR}
-	</if>
-	<if test="adminId != null">
-		or  d.principal_id = #{adminId,jdbcType=VARCHAR}
-	</if>
-	<if test="adminId != null">
-		or  d.tech_broker_id = #{adminId,jdbcType=VARCHAR}
-		)
-	</if>
-	<!-- <if test="province != null">
-		and  oi.licence_province = #{province,jdbcType=INTEGER}
-	</if> -->
 	<if test="serialNumber != null">
 		and  d.serial_number = #{serialNumber,jdbcType=INTEGER}
 	</if>
@@ -768,9 +751,6 @@
 	<if test="keyword != null">
 		and  d.keyword like CONCAT('%',#{keyword,jdbcType=VARCHAR},'%')
 	</if>
-	<!-- <if test="unitName != null">
-		and  oi.unit_name like CONCAT('%',#{unitName,jdbcType=VARCHAR},'%')
-	</if> -->
 	<if test="employerName != null">
 		and  d.employer_name like CONCAT('%',#{employerName,jdbcType=VARCHAR},'%')
 		and  (d.employer_id is null or d.employer_id='')
@@ -826,9 +806,6 @@
 	from  demand d 
 	<!-- LEFT JOIN organization_identity oi on d.employer_id = oi.uid -->
 	LEFT JOIN admin a on a.id = d.tech_broker_id
-	<if test="adminId != null">
-		LEFT JOIN user u on d.employer_id = u.id
-	</if>
 	<if test="hot != null and hot == 1"><!-- 在首页 -->
 		inner join marketing_management mm on d.id = mm.product_id
 	</if>
@@ -839,34 +816,18 @@
 	<if test="dataCategory != null">
 		and d.data_category = #{dataCategory,jdbcType=VARCHAR}
 	</if>
-	<if test="adminId != null">
-		and (u.mid = #{adminId,jdbcType=VARCHAR}
-	</if>
-	<if test="adminId != null">
-		or  d.principal_id = #{adminId,jdbcType=VARCHAR}
-	</if>
-	<if test="adminId != null">
-		or  d.tech_broker_id = #{adminId,jdbcType=VARCHAR}
-		)
-	</if>
 	<if test="serialNumber != null">
 		and  d.serial_number = #{serialNumber,jdbcType=INTEGER}
 	</if>
 	<if test="auditStatus != null">
 		and  d.audit_status = #{auditStatus,jdbcType=INTEGER}
 	</if>
-	<!-- <if test="province != null">
-		and  oi.licence_province = #{province,jdbcType=INTEGER}
-	</if> -->
 	<if test="name != null">
 		and  d.name like CONCAT('%',#{name,jdbcType=VARCHAR},'%')
 	</if>
 	<if test="keyword != null">
 		and  d.keyword like "%"#{keyword,jdbcType=VARCHAR}"%"
 	</if>
-	<!-- <if test="unitName != null">
-		and  oi.unit_name like CONCAT('%',#{unitName,jdbcType=VARCHAR},'%')
-	</if> -->
 	<if test="employerName != null">
 		and  d.employer_name like CONCAT('%',#{employerName,jdbcType=VARCHAR},'%')
 		and  (d.employer_id is null or d.employer_id='')
@@ -1574,13 +1535,14 @@
   </select>
   
   <select id="findAppMyDemandListByPage" parameterType="String" resultType="com.goafanti.demand.bo.DemandListBo">
-  			select 
+  	select 
 	  d.id, d.boutique,d.name, d.audit_status as auditStatus,ifnull(t.x,0) as orderCount,
-	  d.release_date as releaseDate,ifnull(i.y,0) as countInterest
+	  d.release_date as releaseDate,d.create_time as createTime,ifnull(i.y,0) as countInterest
 	from  demand d 
-	left join (select count(0) as x,commodity_id from t_order
-				where order_status != 4 and order_status != 0
-				group by  commodity_id ) t on d.id=t.commodity_id
+	left join (select count(0) as x,tl.commodity_id from t_order tr
+				left join t_order_detail tl on tl.order_no=tr.order_no
+				where tr.order_status != 4 and tr.order_status != 0
+				group by  tl.commodity_id ) t on d.id=t.commodity_id
 	left join (select count(0) as y,demand_id from demand_interest
 				group by demand_id ) i on d.id=i.demand_id	
 	where d.deleted_sign = 0 
@@ -1704,4 +1666,398 @@
 	left join business_project  b on t.project_id=b.id
 	where  t.uid=#{uid,jdbcType=VARCHAR}
 	</select>
+	
+  <select id="findMyDemandListByPage" parameterType="String" resultType="com.goafanti.demand.bo.DemandManageListBo">
+  	select 
+	  d.id, d.serial_number as serialNumber, d.data_category as dataCategory, 
+	  d.name, d.keyword, d.info_sources as infoSources, 
+	  <!-- oi.unit_name as username, --> d.demand_type as demandType, d.validity_period as validityPeriod, 
+	  d.employer_name as employerName, <!-- oi.licence_province as province, --> d.status, d.urgent_days as urgentDays,d.urgent_money as urgentMoney,
+	  d.release_status as releaseStatus, d.release_date as releaseDate, a.name as techBrokerId,d.create_time as createTime,
+	  d.employer_id as employerId, d.audit_status as auditStatus,
+	  d.tech_broker_id as techBrokerId,d.boutique
+	 <if test="hot != null and hot == 1"><!-- 在首页 -->
+		,1 as hot
+	 </if>
+	 <if test="hot != null and hot == 0"><!-- 不在首页 -->
+		,0 as hot
+	 </if>
+	 <if test="hot==null"><!-- 无首页参数 -->
+		,ifnull(mm.effective,0) as hot
+	 </if>
+	from  demand d 
+	<!-- LEFT JOIN organization_identity oi on d.employer_id = oi.uid -->
+	LEFT JOIN admin a on a.id = d.tech_broker_id
+	<if test="adminId != null">
+		LEFT JOIN user u on d.employer_id = u.id
+	</if>
+	<if test="hot != null and hot == 1"><!-- 在首页 -->
+		inner join marketing_management mm on d.id = mm.product_id
+	</if>
+	<if test="hot == null"> <!-- 无首页参数 -->
+		left join marketing_management mm on d.id = mm.product_id 
+	</if>
+	where d.deleted_sign = 0 
+	<if test="techBrokerId != null">
+		and d.tech_broker_id = #{techBrokerId,jdbcType=VARCHAR}
+	</if>
+	<if test="dataCategory != null">
+		and d.data_category = #{dataCategory,jdbcType=VARCHAR}
+	</if>
+	<if test="adminId != null">
+		and (u.mid = #{adminId,jdbcType=VARCHAR}
+	</if>
+	<if test="adminId != null">
+		or  d.principal_id = #{adminId,jdbcType=VARCHAR}
+	</if>
+	<if test="adminId != null">
+		or  d.tech_broker_id = #{adminId,jdbcType=VARCHAR}
+		)
+	</if>
+	<!-- <if test="province != null">
+		and  oi.licence_province = #{province,jdbcType=INTEGER}
+	</if> -->
+	<if test="serialNumber != null">
+		and  d.serial_number = #{serialNumber,jdbcType=INTEGER}
+	</if>
+	<if test="auditStatus != null">
+		and  d.audit_status = #{auditStatus,jdbcType=INTEGER}
+	</if>
+	<if test="name != null">
+		and  d.name like CONCAT('%',#{name,jdbcType=VARCHAR},'%')
+	</if>
+	<if test="keyword != null">
+		and  d.keyword like CONCAT('%',#{keyword,jdbcType=VARCHAR},'%')
+	</if>
+	<!-- <if test="unitName != null">
+		and  oi.unit_name like CONCAT('%',#{unitName,jdbcType=VARCHAR},'%')
+	</if> -->
+	<if test="employerName != null">
+		and  d.employer_name like CONCAT('%',#{employerName,jdbcType=VARCHAR},'%')
+		and  (d.employer_id is null or d.employer_id='')
+	</if>
+	<if test="infoSources != null">
+		and  d.info_sources = #{infoSources,jdbcType=INTEGER}
+	</if>
+	<if test="demandType != null">
+		and  d.demand_type = #{demandType,jdbcType=INTEGER}
+	</if>
+	<if test="status != null">
+		and  d.status = #{status,jdbcType=INTEGER}
+	</if>
+	<if test="releaseStatus != null">
+		and  d.release_status = #{releaseStatus,jdbcType=VARCHAR}
+	</if>
+	<if test="vStart != null">
+	   and d.validity_period <![CDATA[ >= ]]> #{vStart,jdbcType=TIMESTAMP}
+	</if>
+	<if test="vEnd != null">
+	   and d.validity_period <![CDATA[ < ]]> #{vEnd,jdbcType=TIMESTAMP}
+	</if>
+	<if test="rStart != null">
+       and	d.release_date <![CDATA[ >= ]]> #{rStart,jdbcType=TIMESTAMP}
+	</if>
+	<if test="rEnd != null">
+	   and d.release_date <![CDATA[ < ]]> #{rEnd,jdbcType=TIMESTAMP}
+	</if>
+	<if test="cStart != null">
+       and	d.create_time <![CDATA[ > ]]> #{cStart,jdbcType=TIMESTAMP}
+	</if>
+	<if test="cEnd != null">
+	   and d.create_time <![CDATA[ < ]]> #{cEnd,jdbcType=TIMESTAMP}
+	</if>
+	<if test="boutique != null">
+		and d.boutique = #{boutique,jdbcType=INTEGER}
+	</if>
+	<if test="hot != null and hot == 0"><!-- 不在首页 -->
+		and d.id not in(select mm.product_id from marketing_management mm where mm.effective = 1)
+	</if>
+	<if test="hot != null and hot == 1"><!-- 在首页 -->
+		and mm.effective = 1
+	</if>
+  	order by d.serial_number desc
+  	<if test="page_sql!=null">
+			${page_sql}
+	</if>
+  </select>
+  
+  <select id ="findMyDemandCount" parameterType="String" resultType="java.lang.Integer">
+  	select 
+	count(1)
+	from  demand d 
+	<!-- LEFT JOIN organization_identity oi on d.employer_id = oi.uid -->
+	LEFT JOIN admin a on a.id = d.tech_broker_id
+	<if test="adminId != null">
+		LEFT JOIN user u on d.employer_id = u.id
+	</if>
+	<if test="hot != null and hot == 1"><!-- 在首页 -->
+		inner join marketing_management mm on d.id = mm.product_id
+	</if>
+	<if test="hot == null"> <!-- 无首页参数 -->
+		left join marketing_management mm on d.id = mm.product_id 
+	</if>
+	where d.deleted_sign = 0 
+	<if test="techBrokerId != null">
+		and d.tech_broker_id = #{techBrokerId,jdbcType=VARCHAR}
+	</if>
+	<if test="dataCategory != null">
+		and d.data_category = #{dataCategory,jdbcType=VARCHAR}
+	</if>
+	<if test="adminId != null">
+		and (u.mid = #{adminId,jdbcType=VARCHAR}
+	</if>
+	<if test="adminId != null">
+		or  d.principal_id = #{adminId,jdbcType=VARCHAR}
+	</if>
+	<if test="adminId != null">
+		or  d.tech_broker_id = #{adminId,jdbcType=VARCHAR}
+		)
+	</if>
+	<if test="serialNumber != null">
+		and  d.serial_number = #{serialNumber,jdbcType=INTEGER}
+	</if>
+	<if test="auditStatus != null">
+		and  d.audit_status = #{auditStatus,jdbcType=INTEGER}
+	</if>
+	<!-- <if test="province != null">
+		and  oi.licence_province = #{province,jdbcType=INTEGER}
+	</if> -->
+	<if test="name != null">
+		and  d.name like CONCAT('%',#{name,jdbcType=VARCHAR},'%')
+	</if>
+	<if test="keyword != null">
+		and  d.keyword like "%"#{keyword,jdbcType=VARCHAR}"%"
+	</if>
+	<!-- <if test="unitName != null">
+		and  oi.unit_name like CONCAT('%',#{unitName,jdbcType=VARCHAR},'%')
+	</if> -->
+	<if test="employerName != null">
+		and  d.employer_name like CONCAT('%',#{employerName,jdbcType=VARCHAR},'%')
+		and  (d.employer_id is null or d.employer_id='')
+	</if>
+	<if test="infoSources != null">
+		and  d.info_sources = #{infoSources,jdbcType=INTEGER}
+	</if>
+	<if test="demandType != null">
+		and  d.demand_type = #{demandType,jdbcType=INTEGER}
+	</if>
+	<if test="status != null">
+		and  d.status = #{status,jdbcType=VARCHAR}
+	</if>
+	<if test="releaseStatus != null">
+		and  d.release_status = #{releaseStatus,jdbcType=VARCHAR}
+	</if>
+	<if test="vStart != null">
+	   and d.validity_period <![CDATA[ >= ]]> #{vStart,jdbcType=TIMESTAMP}
+	</if>
+	<if test="vEnd != null">
+	   and d.validity_period <![CDATA[ < ]]> #{vEnd,jdbcType=TIMESTAMP}
+	</if>
+	<if test="rStart != null">
+       and	d.release_date <![CDATA[ >= ]]> #{rStart,jdbcType=TIMESTAMP}
+	</if>
+	<if test="rEnd != null">
+	   and d.release_date <![CDATA[ < ]]> #{rEnd,jdbcType=TIMESTAMP}
+	</if>
+	<if test="cStart != null">
+       and	d.create_time <![CDATA[ > ]]> #{cStart,jdbcType=TIMESTAMP}
+	</if>
+	<if test="cEnd != null">
+	   and d.create_time <![CDATA[ < ]]> #{cEnd,jdbcType=TIMESTAMP}
+	</if>
+	<if test="boutique != null">
+		and d.boutique = #{boutique,jdbcType=INTEGER}
+	</if>
+	<if test="hot != null and hot == 0"><!-- 不在首页 -->
+		and d.id not in(select mm.product_id from marketing_management mm where mm.effective = 1)
+	</if>
+	<if test="hot != null and hot == 1"><!-- 在首页 -->
+		and mm.effective = 1
+	</if>
+  </select>
+  
+  <select id="findManageDemandListByPage" parameterType="String" resultType="com.goafanti.demand.bo.DemandManageListBo">
+  	select 
+	  d.id, d.serial_number as serialNumber, d.data_category as dataCategory, 
+	  d.name, d.keyword, d.info_sources as infoSources, 
+	  <!-- oi.unit_name as username, --> d.demand_type as demandType, d.validity_period as validityPeriod, 
+	  d.employer_name as employerName, <!-- oi.licence_province as province, --> d.status, d.urgent_days as urgentDays,d.urgent_money as urgentMoney,
+	  d.release_status as releaseStatus, d.release_date as releaseDate, a.name as techBrokerId,d.create_time as createTime,
+	  d.employer_id as employerId, d.audit_status as auditStatus,
+	  d.tech_broker_id as techBrokerId,d.boutique
+	 <if test="hot != null and hot == 1"><!-- 在首页 -->
+		,1 as hot
+	 </if>
+	 <if test="hot != null and hot == 0"><!-- 不在首页 -->
+		,0 as hot
+	 </if>
+	 <if test="hot==null"><!-- 无首页参数 -->
+		,ifnull(mm.effective,0) as hot
+	 </if>
+	from  demand d 
+	<!-- LEFT JOIN organization_identity oi on d.employer_id = oi.uid -->
+	LEFT JOIN admin a on a.id = d.tech_broker_id
+	LEFT JOIN department_management dm on dm.id = a.department_id
+	<if test="hot != null and hot == 1"><!-- 在首页 -->
+		inner join marketing_management mm on d.id = mm.product_id
+	</if>
+	<if test="hot == null"> <!-- 无首页参数 -->
+		left join marketing_management mm on d.id = mm.product_id 
+	</if>
+	where d.deleted_sign = 0 
+	<if test="techBrokerId != null">
+		and (d.tech_broker_id = #{techBrokerId,jdbcType=VARCHAR} or a.department_id=(select department_id from admin where id=#{techBrokerId,jdbcType=VARCHAR}))
+	</if>
+	<if test="dataCategory != null">
+		and d.data_category = #{dataCategory,jdbcType=VARCHAR}
+	</if>
+	<!-- <if test="province != null">
+		and  oi.licence_province = #{province,jdbcType=INTEGER}
+	</if> -->
+	<if test="serialNumber != null">
+		and  d.serial_number = #{serialNumber,jdbcType=INTEGER}
+	</if>
+	<if test="auditStatus != null">
+		and  d.audit_status = #{auditStatus,jdbcType=INTEGER}
+	</if>
+	<if test="name != null">
+		and  d.name like CONCAT('%',#{name,jdbcType=VARCHAR},'%')
+	</if>
+	<if test="keyword != null">
+		and  d.keyword like CONCAT('%',#{keyword,jdbcType=VARCHAR},'%')
+	</if>
+	<!-- <if test="unitName != null">
+		and  oi.unit_name like CONCAT('%',#{unitName,jdbcType=VARCHAR},'%')
+	</if> -->
+	<if test="employerName != null">
+		and  d.employer_name like CONCAT('%',#{employerName,jdbcType=VARCHAR},'%')
+		and  (d.employer_id is null or d.employer_id='')
+	</if>
+	<if test="infoSources != null">
+		and  d.info_sources = #{infoSources,jdbcType=INTEGER}
+	</if>
+	<if test="demandType != null">
+		and  d.demand_type = #{demandType,jdbcType=INTEGER}
+	</if>
+	<if test="status != null">
+		and  d.status = #{status,jdbcType=INTEGER}
+	</if>
+	<if test="releaseStatus != null">
+		and  d.release_status = #{releaseStatus,jdbcType=VARCHAR}
+	</if>
+	<if test="vStart != null">
+	   and d.validity_period <![CDATA[ >= ]]> #{vStart,jdbcType=TIMESTAMP}
+	</if>
+	<if test="vEnd != null">
+	   and d.validity_period <![CDATA[ < ]]> #{vEnd,jdbcType=TIMESTAMP}
+	</if>
+	<if test="rStart != null">
+       and	d.release_date <![CDATA[ >= ]]> #{rStart,jdbcType=TIMESTAMP}
+	</if>
+	<if test="rEnd != null">
+	   and d.release_date <![CDATA[ < ]]> #{rEnd,jdbcType=TIMESTAMP}
+	</if>
+	<if test="cStart != null">
+       and	d.create_time <![CDATA[ > ]]> #{cStart,jdbcType=TIMESTAMP}
+	</if>
+	<if test="cEnd != null">
+	   and d.create_time <![CDATA[ < ]]> #{cEnd,jdbcType=TIMESTAMP}
+	</if>
+	<if test="boutique != null">
+		and d.boutique = #{boutique,jdbcType=INTEGER}
+	</if>
+	<if test="hot != null and hot == 0"><!-- 不在首页 -->
+		and d.id not in(select mm.product_id from marketing_management mm where mm.effective = 1)
+	</if>
+	<if test="hot != null and hot == 1"><!-- 在首页 -->
+		and mm.effective = 1
+	</if>
+  	order by d.serial_number desc
+  	<if test="page_sql!=null">
+			${page_sql}
+	</if>
+  </select>
+  
+  <select id ="findManagegDemandCount" parameterType="String" resultType="java.lang.Integer">
+  	select 
+	count(1)
+	from  demand d 
+	<!-- LEFT JOIN organization_identity oi on d.employer_id = oi.uid -->
+	LEFT JOIN admin a on a.id = d.tech_broker_id
+	LEFT JOIN department_management dm on dm.id = a.department_id
+	<if test="hot != null and hot == 1"><!-- 在首页 -->
+		inner join marketing_management mm on d.id = mm.product_id
+	</if>
+	<if test="hot == null"> <!-- 无首页参数 -->
+		left join marketing_management mm on d.id = mm.product_id 
+	</if>
+	where d.deleted_sign = 0 
+	<if test="techBrokerId != null">
+		and (d.tech_broker_id = #{techBrokerId,jdbcType=VARCHAR} or a.department_id=(select department_id from admin where id=#{techBrokerId,jdbcType=VARCHAR}))
+	</if>
+	<if test="dataCategory != null">
+		and d.data_category = #{dataCategory,jdbcType=VARCHAR}
+	</if>
+	<if test="serialNumber != null">
+		and  d.serial_number = #{serialNumber,jdbcType=INTEGER}
+	</if>
+	<if test="auditStatus != null">
+		and  d.audit_status = #{auditStatus,jdbcType=INTEGER}
+	</if>
+	<!-- <if test="province != null">
+		and  oi.licence_province = #{province,jdbcType=INTEGER}
+	</if> -->
+	<if test="name != null">
+		and  d.name like CONCAT('%',#{name,jdbcType=VARCHAR},'%')
+	</if>
+	<if test="keyword != null">
+		and  d.keyword like "%"#{keyword,jdbcType=VARCHAR}"%"
+	</if>
+	<!-- <if test="unitName != null">
+		and  oi.unit_name like CONCAT('%',#{unitName,jdbcType=VARCHAR},'%')
+	</if> -->
+	<if test="employerName != null">
+		and  d.employer_name like CONCAT('%',#{employerName,jdbcType=VARCHAR},'%')
+		and  (d.employer_id is null or d.employer_id='')
+	</if>
+	<if test="infoSources != null">
+		and  d.info_sources = #{infoSources,jdbcType=INTEGER}
+	</if>
+	<if test="demandType != null">
+		and  d.demand_type = #{demandType,jdbcType=INTEGER}
+	</if>
+	<if test="status != null">
+		and  d.status = #{status,jdbcType=VARCHAR}
+	</if>
+	<if test="releaseStatus != null">
+		and  d.release_status = #{releaseStatus,jdbcType=VARCHAR}
+	</if>
+	<if test="vStart != null">
+	   and d.validity_period <![CDATA[ >= ]]> #{vStart,jdbcType=TIMESTAMP}
+	</if>
+	<if test="vEnd != null">
+	   and d.validity_period <![CDATA[ < ]]> #{vEnd,jdbcType=TIMESTAMP}
+	</if>
+	<if test="rStart != null">
+       and	d.release_date <![CDATA[ >= ]]> #{rStart,jdbcType=TIMESTAMP}
+	</if>
+	<if test="rEnd != null">
+	   and d.release_date <![CDATA[ < ]]> #{rEnd,jdbcType=TIMESTAMP}
+	</if>
+	<if test="cStart != null">
+       and	d.create_time <![CDATA[ > ]]> #{cStart,jdbcType=TIMESTAMP}
+	</if>
+	<if test="cEnd != null">
+	   and d.create_time <![CDATA[ < ]]> #{cEnd,jdbcType=TIMESTAMP}
+	</if>
+	<if test="boutique != null">
+		and d.boutique = #{boutique,jdbcType=INTEGER}
+	</if>
+	<if test="hot != null and hot == 0"><!-- 不在首页 -->
+		and d.id not in(select mm.product_id from marketing_management mm where mm.effective = 1)
+	</if>
+	<if test="hot != null and hot == 1"><!-- 在首页 -->
+		and mm.effective = 1
+	</if>
+  </select>
 </mapper>

+ 21 - 0
src/main/java/com/goafanti/common/mapper/DistrictGlossoryMapper.xml

@@ -90,4 +90,25 @@
   <select id="selectNameById" parameterType="java.lang.Integer" resultType="String">
     select name from aft.district_glossory where id=#{id,jdbcType=INTEGER}
   </select>
+  
+  <select id="getProvince" resultType="com.goafanti.common.bo.ProvinceBo">
+    select 
+    id,name,pid,level
+    from district_glossory
+    where level=1
+  </select>
+  
+  <select id="getCity" resultType="com.goafanti.common.bo.CityBo" >
+    select 
+    id,name,pid,level
+    from district_glossory
+    where level=2
+  </select>
+  
+  <select id="getArea" resultType="com.goafanti.common.bo.AreaBo" >
+    select 
+    id,name,pid,level
+    from district_glossory
+    where level=3
+  </select>
 </mapper>

+ 12 - 0
src/main/java/com/goafanti/common/mapper/FieldGlossoryMapper.xml

@@ -79,4 +79,16 @@
       level = #{level,jdbcType=INTEGER}
     where id = #{id,jdbcType=INTEGER}
   </update>
+  <select id="getField" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
+    select 
+    <include refid="Base_Column_List" />
+    from field_glossory
+    where 1=1
+    <if test="pid != null" >
+     and   pid = #{pid,jdbcType=INTEGER}
+      </if>
+    <if test="level != null" >
+       and  level = #{level,jdbcType=INTEGER}
+      </if>
+  </select>
 </mapper>

+ 7 - 3
src/main/java/com/goafanti/common/mapper/NewsMapper.xml

@@ -41,7 +41,9 @@
     source_url as sourceUrl, 
     summary,
     jmrh_flag as jmrhFlag,
-    province_id as provinceId
+    province_id as provinceId,
+    audit_status as auditStatus,
+    release_status as releaseStatus
     from news
     where id = #{id,jdbcType=BIGINT}
   </select>
@@ -209,7 +211,9 @@
       summary = #{summary,jdbcType=VARCHAR},
       content = #{content,jdbcType=LONGVARCHAR},
       jmrh_flag = #{jmrhFlag,jdbcType=INTEGER},
-      province_id = #{provinceId,jdbcType=INTEGER}
+      province_id = #{provinceId,jdbcType=INTEGER},
+      audit_status = #{auditStatus,jdbcType=INTEGER},
+      release_status = #{releaseStatus,jdbcType=INTEGER}
     where id = #{id,jdbcType=BIGINT}
   </update>
   <update id="updateByPrimaryKey" parameterType="com.goafanti.common.model.News">
@@ -231,7 +235,7 @@
   <select id="portalNewsList" resultType="com.goafanti.news.bo.NewsPortalList">
 		select
 			a.id,
-			DATE_FORMAT(a.create_time,'%Y-%d-%m') as createTime,
+			DATE_FORMAT(a.create_time,'%Y-%m-%d') as createTime,
 			a.title,
 			a.title_img as titleImg,
 			a.type,

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

@@ -10,9 +10,11 @@
 		<result column="hot" jdbcType="INTEGER" property="hot" />
 		<result column="summary" jdbcType="VARCHAR" property="summary" />
 		<result column="source" jdbcType="VARCHAR" property="source" />
+		<result column="audit_status" jdbcType="INTEGER" property="auditStatus" />
+		<result column="release_status" jdbcType="INTEGER" property="releaseStatus" />
 	</resultMap>
 	<sql id="Summary_Column_List">
-		id, create_time, title, title_img, type, hot, summary, source
+		id, create_time, title, title_img, type, hot, summary, source,audit_status,release_status
 	</sql>
 	<select id="findList" resultType="com.goafanti.news.bo.NewsSummary">
 		select
@@ -63,9 +65,17 @@
   		type,
   		hot,
   		source,
-  		summary
+  		summary,
+  		audit_status as auditStatus,
+  		release_status as releaseStatus
   	from news
   	where 1 =1
+  	<if test="auditStatus != null">
+  		and audit_status = #{auditStatus,jdbcType=INTEGER}
+  	</if>
+  	<if test="releaseStatus != null">
+  		and release_status = #{releaseStatus,jdbcType=INTEGER}
+  	</if>
   	<if test="type != null">
   		and type = #{type,jdbcType=INTEGER}
   	</if>

+ 33 - 64
src/main/java/com/goafanti/common/mapper/UserIdentityMapper.xml

@@ -44,7 +44,6 @@
     <result column="education" jdbcType="VARCHAR" property="education" />
     <result column="major_category" jdbcType="VARCHAR" property="majorCategory" />
     <result column="qualification" jdbcType="VARCHAR" property="qualification" />
-    <result column="investment" jdbcType="INTEGER" property="investment" />
     <result column="graduate_school" jdbcType="VARCHAR" property="graduateSchool" />
     <result column="consultant" jdbcType="INTEGER" property="consultant" />
     <result column="consultation_price" jdbcType="DECIMAL" property="consultationPrice" />
@@ -127,8 +126,8 @@
     opposite_id_url, province, city, area, contact_mobile, bank_name, bank_account, bank_card_number, 
     amount_money, audit_status, process, wrong_count, payment_date, expert, celebrity, 
     international, fixed_tel, qq, postal_address, postcode, review_instructions, industry, 
-    contacts, email, professional_title, work_unit, education, major_category, qualification, 
-    investment, graduate_school, consultant, consultation_price
+    contacts, email, professional_title, work_unit, education, major_category, qualification,
+    graduate_school, consultation_price 
   </sql>
   <select id="selectByExample" parameterType="com.goafanti.common.model.UserIdentityExample" resultMap="BaseResultMap">
     <!--
@@ -193,13 +192,13 @@
       contact_mobile, bank_name, bank_account, 
       bank_card_number, amount_money, audit_status, 
       process, wrong_count, payment_date, 
-      expert, celebrity, international, 
+      expert, international, 
       fixed_tel, qq, postal_address, 
       postcode, review_instructions, industry, 
       contacts, email, professional_title, 
       work_unit, education, major_category, 
-      qualification, investment, graduate_school, 
-      consultant, consultation_price)
+      qualification, graduate_school, 
+      consultation_price)
     values (#{id,jdbcType=VARCHAR}, #{uid,jdbcType=VARCHAR}, #{username,jdbcType=VARCHAR}, 
       #{sex,jdbcType=VARCHAR}, #{dateOfBirthYear,jdbcType=VARCHAR}, #{dateOfBirthMonth,jdbcType=VARCHAR}, 
       #{idNumber,jdbcType=VARCHAR}, #{positiveIdUrl,jdbcType=VARCHAR}, #{oppositeIdUrl,jdbcType=VARCHAR}, 
@@ -207,13 +206,13 @@
       #{contactMobile,jdbcType=VARCHAR}, #{bankName,jdbcType=VARCHAR}, #{bankAccount,jdbcType=VARCHAR}, 
       #{bankCardNumber,jdbcType=VARCHAR}, #{amountMoney,jdbcType=DECIMAL}, #{auditStatus,jdbcType=INTEGER}, 
       #{process,jdbcType=INTEGER}, #{wrongCount,jdbcType=INTEGER}, #{paymentDate,jdbcType=TIMESTAMP}, 
-      #{expert,jdbcType=INTEGER}, #{celebrity,jdbcType=INTEGER}, #{international,jdbcType=INTEGER}, 
+      #{expert,jdbcType=INTEGER}, #{international,jdbcType=INTEGER}, 
       #{fixedTel,jdbcType=VARCHAR}, #{qq,jdbcType=VARCHAR}, #{postalAddress,jdbcType=VARCHAR}, 
       #{postcode,jdbcType=VARCHAR}, #{reviewInstructions,jdbcType=VARCHAR}, #{industry,jdbcType=INTEGER}, 
       #{contacts,jdbcType=VARCHAR}, #{email,jdbcType=VARCHAR}, #{professionalTitle,jdbcType=VARCHAR}, 
       #{workUnit,jdbcType=VARCHAR}, #{education,jdbcType=VARCHAR}, #{majorCategory,jdbcType=VARCHAR}, 
-      #{qualification,jdbcType=VARCHAR}, #{investment,jdbcType=INTEGER}, #{graduateSchool,jdbcType=VARCHAR}, 
-      #{consultant,jdbcType=INTEGER}, #{consultationPrice,jdbcType=DECIMAL})
+      #{qualification,jdbcType=VARCHAR}, #{graduateSchool,jdbcType=VARCHAR}, 
+      #{consultationPrice,jdbcType=DECIMAL})
   </insert>
   <insert id="insertSelective" parameterType="com.goafanti.common.model.UserIdentity">
     <!--
@@ -289,9 +288,6 @@
       <if test="expert != null">
         expert,
       </if>
-      <if test="celebrity != null">
-        celebrity,
-      </if>
       <if test="international != null">
         international,
       </if>
@@ -334,15 +330,9 @@
       <if test="qualification != null">
         qualification,
       </if>
-      <if test="investment != null">
-        investment,
-      </if>
       <if test="graduateSchool != null">
         graduate_school,
       </if>
-      <if test="consultant != null">
-        consultant,
-      </if>
       <if test="consultationPrice != null">
         consultation_price,
       </if>
@@ -414,9 +404,6 @@
       <if test="expert != null">
         #{expert,jdbcType=INTEGER},
       </if>
-      <if test="celebrity != null">
-        #{celebrity,jdbcType=INTEGER},
-      </if>
       <if test="international != null">
         #{international,jdbcType=INTEGER},
       </if>
@@ -459,15 +446,9 @@
       <if test="qualification != null">
         #{qualification,jdbcType=VARCHAR},
       </if>
-      <if test="investment != null">
-        #{investment,jdbcType=INTEGER},
-      </if>
       <if test="graduateSchool != null">
         #{graduateSchool,jdbcType=VARCHAR},
       </if>
-      <if test="consultant != null">
-        #{consultant,jdbcType=INTEGER},
-      </if>
       <if test="consultationPrice != null">
         #{consultationPrice,jdbcType=DECIMAL},
       </if>
@@ -558,9 +539,6 @@
       <if test="record.expert != null">
         expert = #{record.expert,jdbcType=INTEGER},
       </if>
-      <if test="record.celebrity != null">
-        celebrity = #{record.celebrity,jdbcType=INTEGER},
-      </if>
       <if test="record.international != null">
         international = #{record.international,jdbcType=INTEGER},
       </if>
@@ -603,15 +581,9 @@
       <if test="record.qualification != null">
         qualification = #{record.qualification,jdbcType=VARCHAR},
       </if>
-      <if test="record.investment != null">
-        investment = #{record.investment,jdbcType=INTEGER},
-      </if>
       <if test="record.graduateSchool != null">
         graduate_school = #{record.graduateSchool,jdbcType=VARCHAR},
       </if>
-      <if test="record.consultant != null">
-        consultant = #{record.consultant,jdbcType=INTEGER},
-      </if>
       <if test="record.consultationPrice != null">
         consultation_price = #{record.consultationPrice,jdbcType=DECIMAL},
       </if>
@@ -649,7 +621,6 @@
       wrong_count = #{record.wrongCount,jdbcType=INTEGER},
       payment_date = #{record.paymentDate,jdbcType=TIMESTAMP},
       expert = #{record.expert,jdbcType=INTEGER},
-      celebrity = #{record.celebrity,jdbcType=INTEGER},
       international = #{record.international,jdbcType=INTEGER},
       fixed_tel = #{record.fixedTel,jdbcType=VARCHAR},
       qq = #{record.qq,jdbcType=VARCHAR},
@@ -664,9 +635,7 @@
       education = #{record.education,jdbcType=VARCHAR},
       major_category = #{record.majorCategory,jdbcType=VARCHAR},
       qualification = #{record.qualification,jdbcType=VARCHAR},
-      investment = #{record.investment,jdbcType=INTEGER},
       graduate_school = #{record.graduateSchool,jdbcType=VARCHAR},
-      consultant = #{record.consultant,jdbcType=INTEGER},
       consultation_price = #{record.consultationPrice,jdbcType=DECIMAL}
     <if test="_parameter != null">
       <include refid="Update_By_Example_Where_Clause" />
@@ -743,9 +712,6 @@
       <if test="expert != null">
         expert = #{expert,jdbcType=INTEGER},
       </if>
-      <if test="celebrity != null">
-        celebrity = #{celebrity,jdbcType=INTEGER},
-      </if>
       <if test="international != null">
         international = #{international,jdbcType=INTEGER},
       </if>
@@ -788,18 +754,18 @@
       <if test="qualification != null">
         qualification = #{qualification,jdbcType=VARCHAR},
       </if>
-      <if test="investment != null">
-        investment = #{investment,jdbcType=INTEGER},
-      </if>
       <if test="graduateSchool != null">
         graduate_school = #{graduateSchool,jdbcType=VARCHAR},
       </if>
-      <if test="consultant != null">
-        consultant = #{consultant,jdbcType=INTEGER},
-      </if>
       <if test="consultationPrice != null">
         consultation_price = #{consultationPrice,jdbcType=DECIMAL},
       </if>
+      <if test="expertAudit != null">
+        expert_audit = #{expertAudit,jdbcType=DECIMAL},
+      </if>
+      <if test="releaseStatus != null">
+        release_status = #{releaseStatus,jdbcType=DECIMAL},
+      </if>
     </set>
     where id = #{id,jdbcType=VARCHAR}
   </update>
@@ -831,7 +797,6 @@
       wrong_count = #{wrongCount,jdbcType=INTEGER},
       payment_date = #{paymentDate,jdbcType=TIMESTAMP},
       expert = #{expert,jdbcType=INTEGER},
-      celebrity = #{celebrity,jdbcType=INTEGER},
       international = #{international,jdbcType=INTEGER},
       fixed_tel = #{fixedTel,jdbcType=VARCHAR},
       qq = #{qq,jdbcType=VARCHAR},
@@ -846,9 +811,7 @@
       education = #{education,jdbcType=VARCHAR},
       major_category = #{majorCategory,jdbcType=VARCHAR},
       qualification = #{qualification,jdbcType=VARCHAR},
-      investment = #{investment,jdbcType=INTEGER},
       graduate_school = #{graduateSchool,jdbcType=VARCHAR},
-      consultant = #{consultant,jdbcType=INTEGER},
       consultation_price = #{consultationPrice,jdbcType=DECIMAL}
     where id = #{id,jdbcType=VARCHAR}
   </update>
@@ -894,8 +857,7 @@
   		ui.amount_money as amountMoney,
   		ui.audit_status as auditStatus, 
   		ui.payment_date as paymentDate, 
-  		ui.expert, 
-  		ui.celebrity
+  		ui.expert
   	from user u 
   	LEFT JOIN user_identity ui on u.id = ui.uid
   	where u.id = #{uid,jdbcType=VARCHAR}
@@ -1050,14 +1012,15 @@
 		limit 0,6	
 	</select> 
 	 <select id="selectUserIdentityByUid" resultType="com.goafanti.user.bo.UserIdentityBo">
-	 	select 	t.id ,t.uid,u.nickname as username,t.work_unit as workUnit,t.province,t.area,t.professional_title as professionalTitle,
+	 	  select 	t.id ,t.uid,u.nickname as username,t.work_unit as workUnit,t.province,t.area,t.professional_title as professionalTitle,
 			t.industry,t.city,u.introduction,u.head_portrait_url as headPortraitUrl,ifnull(o.x,0) as reservationCount,j.easemob_name as easemobName
 	from user_identity t left JOIN user u on t.uid = u.id
 	left join jpush_easemob_account j on t.uid=j.uid
 	left join (select count(0) as x,seller_id from t_order
 				where order_status != 4
 				group by  seller_id ) o on t.uid=o.seller_id
-	where t.uid=#{uid,jdbcType=VARCHAR}
+	where t.expert=1
+	and t.uid=#{uid,jdbcType=VARCHAR}
 	 </select>
 	 
  <select id="findUserIdentityListByPage" parameterType="String" resultType="com.goafanti.user.bo.UserIdentityBo">
@@ -1097,11 +1060,16 @@
   </select>
   
   <select id="findConsultantListByPage" resultType="com.goafanti.app.bo.consultantListBo">
-  select t.uid as id,u.nickname as username ,u.head_portrait_url as headPortraitUrl,u.introduction ,t.consultant
-  from user_identity t
-  left join `user` u on t.uid=u.id
-  where t.consultant=1
-    <if test="page_sql!=null">
+	 	select t.uid as id,t.username as username ,u.head_portrait_url as headPortraitUrl,u.introduction ,
+	  t.expert as consultant,ifnull(x.n,0) as reservationCount
+	  from user_identity t
+	  left join `user` u on t.uid=u.id
+	  left join ( select y.x  as n, y.seller_id
+	from (select count( 0 ) as x,seller_id from t_order
+			where order_status != 4
+			group by seller_id)y)x on t.uid=x.seller_id 
+  where t.expert=2
+   <if test="page_sql!=null">
 			${page_sql}
 	</if>
   </select>
@@ -1110,20 +1078,21 @@
    	select count(0) 
   from user_identity t
   left join `user` u on t.uid=u.id
-  where t.consultant=1
+  where t.expert=2
   </select>
   
   
   <select id="selectconsultantByUid" parameterType="java.lang.String" resultType="com.goafanti.app.bo.consultantListBo">
-  	select 
-  		t.uid as id ,u.nickname as username ,t.consultant,u.head_portrait_url as headPortraitUrl,u.introduction,ifnull(o.x,0) as reservationCount,j.easemob_name as easemobName
+  select 
+  		t.uid as id ,t.username as username ,t.expert as consultant,u.head_portrait_url as headPortraitUrl,
+  		u.introduction,ifnull(o.x,0) as reservationCount,j.easemob_name as easemobName
   	from  user_identity t 
   	left join user u on t.uid =u.id
   	 left join jpush_easemob_account j on t.uid=j.uid
   	left join (select count(0) as x,seller_id from t_order
 				where order_status != 4
 				group by  seller_id ) o on t.uid=o.seller_id
-  	where t.consultant = 1
+  	where t.expert=2
   	and t.uid = #{uid,jdbcType=VARCHAR}
   </select>
 </mapper>

+ 13 - 0
src/main/java/com/goafanti/common/mapper/UserMapper.xml

@@ -1450,4 +1450,17 @@
 	<select id="selectByNumber" parameterType="java.lang.String" resultMap="BaseResultMap">
 		select nickname,head_portrait_url from user where number = #{easemobName,jdbcType=VARCHAR}
 	</select>
+	
+	<update id="updateEnteringAudit" parameterType="com.goafanti.common.model.User">
+    update user
+    <set>
+      <if test="auditStatus != null">
+        audit_status = #{auditStatus,jdbcType=INTEGER},
+      </if>
+      <if test="auditOpinion != null">
+        audit_opinion = #{auditOpinion,jdbcType=VARCHAR},
+      </if>
+    </set>
+    where id = #{id,jdbcType=VARCHAR}
+  </update>
 </mapper>

+ 492 - 22
src/main/java/com/goafanti/common/mapper/UserMapperExt.xml

@@ -17,24 +17,27 @@
 			b.contact_mobile as contactMobile,
 			b.international,
 			b.expert,
-			b.celebrity,
 			b.audit_status as auditStatus,
-			b.consultant,
 			dg1.name as province,
 			dg2.name as city, 
 			dg3.name as area,
 			c.name as industry,
-			d.name as adminName
+			d.name as adminName,
+			b.expert_audit as expertAudit,
+			b.release_status as releaseStatus
 		from user a inner join user_identity b on a.id = b.uid
 		left join district_glossory dg1 on b.province = dg1.id
 		left join district_glossory dg2 on b.city = dg2.id
 		left join district_glossory dg3 on b.area = dg3.id
 		left join industry_category c on b.industry = c.id
 		left join admin d on a.aid = d.id 		
-		where a.type = 0  and a.status != 1
+		where a.type = 0  and a.status != 1 and a.audit_status = 1
 		<if test="aid != null and aid !=''">
 			and a.aid = #{aid,jdbcType=VARCHAR}
 		</if>
+		<if test="expertAudit != null and expertAudit !=''">
+			and b.expert_audit = #{expertAudit,jdbcType=VARCHAR}
+		</if>
 		<if test="name != null and name != ''">
 			and a.identify_name like concat('%',#{name},'%')
 		</if>
@@ -80,16 +83,12 @@
 		<if test="expert != null">
 			and b.expert = #{expert,jdbcType=INTEGER}
 		</if>
-		<if test="celebrity != null">
-			and b.celebrity = #{celebrity,jdbcType=INTEGER}
-		</if>
 		<if test="international != null">
 			and b.international = #{international,jdbcType=INTEGER}
 		</if>
 		<if test="auditStatus != null">
 			and b.audit_status = #{auditStatus,jdbcType=INTEGER}
 		</if>
-			order by a.create_time desc 
 		 <if test="page_sql != null">
     		${page_sql}
    		 </if>
@@ -97,7 +96,7 @@
 	<select id="selectPersonalCustomerCount" resultType="java.lang.Integer">
 		select count(0)
 			from user a inner join user_identity b on a.id = b.uid
-		where a.type = 0  and a.status != 1
+		where a.type = 0  and a.status != 1 and a.audit_status = 1
 		<if test="aid != null and aid !=''">
 			and a.aid = #{aid,jdbcType=VARCHAR}
 		</if>
@@ -146,9 +145,6 @@
 		<if test="expert != null">
 			and b.expert = #{expert,jdbcType=INTEGER}
 		</if>
-		<if test="celebrity != null">
-			and b.celebrity = #{celebrity,jdbcType=INTEGER}
-		</if>
 		<if test="international != null">
 			and b.international = #{international,jdbcType=INTEGER}
 		</if>
@@ -186,7 +182,7 @@
 		left join district_glossory dg3 on b.location_area = dg3.id
 		left join industry_category c on b.industry = c.id
 		left join admin d on a.aid = d.id 	
-		where a.type = 1 and a.status != 1
+		where a.type = 1 and a.status != 1 and a.audit_status = 1
 		<if test="aid != null and aid !=''">
 			and a.aid = #{aid,jdbcType=VARCHAR}
 		</if>
@@ -244,7 +240,6 @@
 		<if test="auditStatus != null">
       		and b.audit_status = #{auditStatus,jdbcType=INTEGER}
    		 </if>
-			order by a.create_time desc 
 		 <if test="page_sql != null">
     		${page_sql}
    		 </if>
@@ -253,7 +248,7 @@
 		select 
 			count(0)	
 		from user a inner join organization_identity b on a.id = b.uid
-		where a.type = 1 and a.status != 1
+		where a.type = 1 and a.status != 1 and a.audit_status = 1
 		<if test="aid != null and aid !=''">
 			and a.aid = #{aid,jdbcType=VARCHAR}
 		</if>
@@ -312,7 +307,7 @@
 	
 	<select id="findCustomerByName" parameterType="java.lang.String" resultType="com.goafanti.customer.bo.CustomerSimpleBo">
 		select id,identify_name as name from user where identify_name like
-		concat('%',#{identifyName},'%') and status <![CDATA[!= ]]> 1
+		concat('%',#{identifyName},'%') and status <![CDATA[!= ]]> 1 and audit_status = 1
 	</select>
 	
 	<select id="judgeCustomerByName" resultType="java.lang.Integer">
@@ -350,10 +345,12 @@
 			b.id,
 			b.contacts,
 			b.contact_mobile as contactMobile,
-			b.investment,
-			b.audit_status as auditStatus
+			b.audit_status as auditStatus,
+			b.licence_number as licenceNumber,
+			a.aid as aid,d.name as adminName
 		from 
 			user a inner join organization_identity b on a.id = b.uid
+			left join admin d on d.id = a.aid
 		where 
 			a.id = #{uid,jdbcType=VARCHAR}
 	</select>
@@ -382,7 +379,6 @@
 			b.fixed_tel as fixedTel,
 			b.email,
 			b.expert,
-			b.celebrity,		
 			b.international,
 			b.contacts,
 			b.contact_mobile as contactMobile,
@@ -392,14 +388,16 @@
 			b.education,
 			b.major_category as majorCategory,
 			b.qualification,
-			b.investment,
 			b.audit_status as auditStatus,
 			b.graduate_school as graduateSchool,
-			b.consultant,
-			b.consultation_price as consultationPrice
+			b.consultation_price as consultationPrice,
+			b.expert_audit as expertAudit,
+			b.release_status as releaseStatus,
+			a.aid as aid,d.name as adminName
 		from
 			user a inner join user_identity b on
 			a.id = b.uid	
+			left join admin d on d.id = a.aid
 		where
 			a.id = #{uid,jdbcType=VARCHAR}
 	</select>
@@ -787,4 +785,476 @@
 		and a.create_time &lt; STR_TO_DATE(#{endDate},'%Y-%m-%d %H:%i:%s')
 	</if>		
   </select>
+  
+  <select id="selectBusinessManageList" resultType="com.goafanti.customer.bo.BusinessListBo">
+	  select
+		c.name as businessName,
+		b.identify_name as identifyName,
+		a.id as businessId,
+		a.create_time as createTime,
+		a.update_time as updateTime,
+		a.follow_situation as followSituation,
+		a.customer_status as customerStatus,
+		d.name as adminName
+	from
+		user_business a inner join user b on
+		a.uid = b.id left join business_glossory c on
+		a.business_glossory_id = c.id left join admin d on
+		a.aid = d.id
+		LEFT JOIN department_management dm on dm.id = d.department_id 	
+	where 1 = 1
+	<if test="aid != null and aid != ''">
+		and (b.aid = #{aid,jdbcType=VARCHAR} or d.department_id=(select department_id from admin where id=#{aid,jdbcType=VARCHAR}))
+	</if>
+	<if test="uid != null and uid !=''">
+		and a.uid = #{uid,jdbcType=VARCHAR}
+	</if>
+	<if test="businessGlossoryId !=null and businessGlossoryId != ''">
+		and a.business_glossory_id = #{businessGlossoryId,jdbcType=VARCHAR}
+	</if>
+	<if test="identifyName != null and identifyName != ''">
+		and b.identify_name like concat('%', #{identifyName},'%')
+	</if>
+	<if test="followSituation != null">
+		and a.follow_situation = #{followSituation,jdbcType=INTEGER}
+	</if>
+	<if test="customerStatus != null">
+		and a.customer_status = #{customerStatus,jdbcType=INTEGER}
+	</if>
+	<if test="adminName != null and adminName != ''">
+		and d.name = #{adminName,jdbcType=VARCHAR}
+	</if>
+	<if test="startDate != null and startDate != ''">
+		and a.create_time &gt; STR_TO_DATE(#{startDate},'%Y-%m-%d %H:%i:%s')
+	</if>
+	<if test="endDate != null and endDate != ''">
+		and a.create_time &lt; STR_TO_DATE(#{endDate},'%Y-%m-%d %H:%i:%s')
+	</if>
+	<if test="page_sql != null">
+    	${page_sql}
+    </if>
+  </select>
+  
+  <select id="selectBusinessManageCount" parameterType="com.goafanti.customer.bo.BusinessListBo" resultType="java.lang.Integer">
+  	select
+  		count(0)
+  	from
+		user_business a inner join user b on
+		a.uid = b.id left join business_glossory c on
+		a.business_glossory_id = c.id left join admin d on
+		a.aid = d.id
+		LEFT JOIN department_management dm on dm.id = d.department_id 	
+	where 1 = 1
+	<if test="aid != null and aid != ''">
+		and (b.aid = #{aid,jdbcType=VARCHAR} or d.department_id=(select department_id from admin where id=#{aid,jdbcType=VARCHAR}))
+	</if>
+	<if test="uid != null and uid !=''">
+		and a.uid = #{uid,jdbcType=VARCHAR}
+	</if>
+	<if test="businessGlossoryId !=null and businessGlossoryId != ''">
+		and a.business_glossory_id = #{businessGlossoryId,jdbcType=VARCHAR}
+	</if>
+	<if test="identifyName != null and identifyName != ''">
+		and b.identify_name like concat('%', #{identifyName},'%')
+	</if>
+	<if test="followSituation != null">
+		and a.follow_situation = #{followSituation,jdbcType=INTEGER}
+	</if>
+	<if test="customerStatus != null">
+		and a.customer_status = #{customerStatus,jdbcType=INTEGER}
+	</if>
+	<if test="adminName != null and adminName != ''">
+		and d.name = #{adminName,jdbcType=VARCHAR}
+	</if>
+	<if test="startDate != null and startDate != ''">
+		and a.create_time &gt; STR_TO_DATE(#{startDate},'%Y-%m-%d %H:%i:%s')
+	</if>
+	<if test="endDate != null and endDate != ''">
+		and a.create_time &lt; STR_TO_DATE(#{endDate},'%Y-%m-%d %H:%i:%s')
+	</if>		
+  </select>
+  
+  <select id="selectManagePersonalCustomerList" resultType="com.goafanti.customer.bo.CustomerListOut">
+		select
+			a.id as uid,
+			a.type,
+			a.status, 
+			date_format(a.create_time,'%Y-%m-%d %H:%i:%s') as createTime,
+			a.business_audit as businessAudit,
+			a.current_member_status as currentMemberStatus,
+			a.identify_name as name,
+			a.lvl,a.is_member as isMember,
+			a.society_tag as societyTag,
+			a.share_type as shareType,
+			b.contacts,
+			b.contact_mobile as contactMobile,
+			b.international,
+			b.expert,
+			b.audit_status as auditStatus,
+			dg1.name as province,
+			dg2.name as city, 
+			dg3.name as area,
+			c.name as industry,
+			d.name as adminName,
+			b.expert_audit as expertAudit,
+			b.release_status as releaseStatus
+		from user a inner join user_identity b on a.id = b.uid
+		left join district_glossory dg1 on b.province = dg1.id
+		left join district_glossory dg2 on b.city = dg2.id
+		left join district_glossory dg3 on b.area = dg3.id
+		left join industry_category c on b.industry = c.id
+		left join admin d on a.aid = d.id
+		LEFT JOIN department_management dm on dm.id = d.department_id 		
+		where a.type = 0  and a.status != 1 and a.audit_status = 1
+		<if test="aid != null and aid !=''">
+			and (a.aid = #{aid,jdbcType=VARCHAR} or d.department_id=(select department_id from admin where id=#{aid,jdbcType=VARCHAR}))
+		</if>
+		<if test="name != null and name != ''">
+			and a.identify_name like concat('%',#{name},'%')
+		</if>
+		<if test="shareType != null">
+			and a.share_type = #{shareType,jdbcType=INTEGER}
+		</if>
+		<if test="status != null">
+			and a.status = #{status,jdbcType=INTEGER}
+		</if>
+		<if test="businessAudit != null">
+			and a.business_audit = #{businessAudit,jdbcType=INTEGER}
+		</if>
+		<if test="isMember != null">
+			and a.is_member = #{isMember,jdbcType=INTEGER}
+		</if>
+		<if test="lvl != null">
+			and a.lvl = #{lvl,jdbcType=INTEGER}
+		</if> 
+		<if test="currentMemberStatus != null">
+			and a.current_member_status = #{currentMemberStatus,jdbcType=INTEGER}
+		</if>
+		<if test="societyTag != null and societyTag != ''">
+			and a.society_tag = #{societyTag,jdbcType=VARCHAR}
+		</if>
+		<if test="startDate != null and startDate != ''">
+			and a.create_time &gt; STR_TO_DATE(#{startDate},'%Y-%m-%d %H:%i:%s')
+		</if>
+		<if test="endDate != null and endDate != ''">
+			and a.create_time &lt; STR_TO_DATE(#{endDate},'%Y-%m-%d %H:%i:%s')
+		</if>
+		<if test="province != null">
+			and b.province = #{province,jdbcType=INTEGER}
+		</if>
+		<if test="city != null">
+			and b.city = #{city,jdbcType=INTEGER}
+		</if>
+		<if test="area != null">
+			and b.area = #{area,jdbcType=INTEGER}
+		</if>
+		<if test="industry != null">
+			and b.industry = #{industry,jdbcType=INTEGER}
+		</if>
+		<if test="expert != null">
+			and b.expert = #{expert,jdbcType=INTEGER}
+		</if>
+		<if test="international != null">
+			and b.international = #{international,jdbcType=INTEGER}
+		</if>
+		<if test="auditStatus != null">
+			and b.audit_status = #{auditStatus,jdbcType=INTEGER}
+		</if>
+		 <if test="page_sql != null">
+    		${page_sql}
+   		 </if>
+	</select>
+	<select id="selectManagePersonalCustomerCount" resultType="java.lang.Integer">
+		select count(0)
+			from user a inner join user_identity b on a.id = b.uid
+			left join admin d on a.aid = d.id
+			LEFT JOIN department_management dm on dm.id = d.department_id 	
+		where a.type = 0  and a.status != 1 and a.audit_status = 1
+		<if test="aid != null and aid !=''">
+			and (a.aid = #{aid,jdbcType=VARCHAR} or d.department_id=(select department_id from admin where id=#{aid,jdbcType=VARCHAR}))
+		</if>
+		<if test="name != null and name != ''">
+			and a.identify_name like concat('%',#{name},'%')
+		</if>
+		<if test="shareType != null">
+			and a.share_type = #{shareType,jdbcType=VARCHAR}
+		</if>
+		<if test="status != null">
+			and a.status = #{status,jdbcType=INTEGER}
+		</if>
+		<if test="businessAudit != null">
+			and a.business_audit = #{businessAudit,jdbcType=INTEGER}
+		</if>
+		<if test="isMember != null">
+			and a.is_member = #{isMember,jdbcType=INTEGER}
+		</if>
+		<if test="lvl != null">
+			and a.lvl = #{lvl,jdbcType=INTEGER}
+		</if> 
+		<if test="currentMemberStatus != null">
+			and a.current_member_status = #{currentMemberStatus,jdbcType=INTEGER}
+		</if>
+		<if test="societyTag != null and societyTag != ''">
+			and a.society_tag = #{societyTag,jdbcType=VARCHAR}
+		</if>
+		<if test="startDate != null and startDate != ''">
+			and a.create_time &gt; STR_TO_DATE(#{startDate},'%Y-%m-%d %H:%i:%s')
+		</if>
+		<if test="endDate != null and endDate != ''">
+			and a.create_time &lt; STR_TO_DATE(#{endDate},'%Y-%m-%d %H:%i:%s')
+		</if>
+		<if test="province != null">
+			and b.province = #{province,jdbcType=INTEGER}
+		</if>
+		<if test="city != null">
+			and b.city = #{city,jdbcType=INTEGER}
+		</if>
+		<if test="area != null">
+			and b.area = #{area,jdbcType=INTEGER}
+		</if>
+		<if test="industry != null">
+			and b.industry = #{industry,jdbcType=INTEGER}
+		</if>
+		<if test="expert != null">
+			and b.expert = #{expert,jdbcType=INTEGER}
+		</if>
+		<if test="international != null">
+			and b.international = #{international,jdbcType=INTEGER}
+		</if>
+		<if test="auditStatus != null">
+			and b.audit_status = #{auditStatus,jdbcType=INTEGER}
+		</if>
+	</select>
+	
+	<select id="selectManageOrganizationCustomerList" resultType="com.goafanti.customer.bo.CustomerListOut">
+		select
+			a.id as uid,
+			a.type,
+			a.status, 
+			date_format(a.create_time,'%Y-%m-%d %H:%i:%s') as createTime,
+			a.business_audit as businessAudit,
+			a.current_member_status as currentMemberStatus,
+			a.identify_name as name,
+			a.lvl,
+			a.is_member as isMember,
+			a.society_tag as societyTag,
+			share_type as shareType,
+			b.contacts,
+			b.contact_mobile as contactMobile,
+			b.international,
+			b.listed,
+			b.high_tech_zone as highTechZone,
+			b.audit_status as auditStatus,
+			dg1.name as province,
+			dg2.name as city, 
+			dg3.name as area,
+			c.name as industry,
+			d.name as adminName		
+		from user a inner join organization_identity b on a.id = b.uid
+		left join district_glossory dg1 on b.location_province = dg1.id
+		left join district_glossory dg2 on b.location_city = dg2.id
+		left join district_glossory dg3 on b.location_area = dg3.id
+		left join industry_category c on b.industry = c.id
+		left join admin d on a.aid = d.id
+		LEFT JOIN department_management dm on dm.id = d.department_id 	 	
+		where a.type = 1 and a.status != 1 and a.audit_status = 1 
+		<if test="aid != null and aid !=''">
+			and (a.aid = #{aid,jdbcType=VARCHAR} or d.department_id=(select department_id from admin where id=#{aid,jdbcType=VARCHAR}))
+		</if>
+		<if test="name != null and name != ''">
+			and a.identify_name like concat('%',#{name},'%')
+		</if>
+		<if test="shareType != null">
+			and a.share_type = #{shareType,jdbcType=VARCHAR}
+		</if>
+		<if test="status != null">
+			and a.status = #{status,jdbcType=INTEGER}
+		</if>
+		<if test="businessAudit != null">
+      		and a.business_audit = #{businessAudit,jdbcType=INTEGER}
+   		</if>
+		<if test="isMember != null">
+			and a.is_member = #{isMember,jdbcType=INTEGER}
+		</if>
+		<if test="currentMemberStatus != null">
+			and a.current_member_status = #{currentMemberStatus,jdbcType=INTEGER}
+		</if>
+		<if test="lvl != null">
+			and a.lvl = #{lvl,jdbcType=INTEGER}
+		</if> 
+		<if test="societyTag != null and societyTag != ''">
+			and a.society_tag = #{societyTag,jdbcType=VARCHAR}
+		</if>
+		<if test="startDate != null and startDate != ''">
+			and a.create_time &gt; STR_TO_DATE(#{startDate},'%Y-%m-%d %H:%i:%s')
+		</if>
+		<if test="endDate != null and endDate != ''">
+			and a.create_time &lt; STR_TO_DATE(#{endDate},'%Y-%m-%d %H:%i:%s')
+		</if>
+		<if test="province != null">
+			and b.location_province = #{province,jdbcType=INTEGER}
+		</if>
+		<if test="city != null">
+			and b.location_city = #{city,jdbcType=INTEGER}
+		</if>
+		<if test="area != null">
+			and b.location_area = #{area,jdbcType=INTEGER}
+		</if>
+		<if test="industry != null">
+			and b.industry = #{industry,jdbcType=INTEGER}
+		</if>
+		<if test="listed != null">
+			and b.listed = #{listed,jdbcType=INTEGER}
+		</if>
+		<if test="highTechZone != null">
+			and b.high_tech_zone = #{highTechZone,jdbcType=INTEGER}
+		</if>
+		<if test="international != null">
+			and b.international = #{international,jdbcType=INTEGER}
+		</if>
+		<if test="auditStatus != null">
+      		and b.audit_status = #{auditStatus,jdbcType=INTEGER}
+   		 </if>
+		 <if test="page_sql != null">
+    		${page_sql}
+   		 </if>
+	</select>
+	
+	<select id="selectManageOrganizationCustomerCount" resultType="java.lang.Integer">
+		select 
+			count(0)	
+		from user a inner join organization_identity b on a.id = b.uid
+		left join admin d on a.aid = d.id
+		LEFT JOIN department_management dm on dm.id = d.department_id 
+		where a.type = 1 and a.status != 1 and a.audit_status = 1 
+		<if test="aid != null and aid !=''">
+			and (a.aid = #{aid,jdbcType=VARCHAR} or d.department_id=(select department_id from admin where id=#{aid,jdbcType=VARCHAR}))
+		</if>
+		<if test="name != null and name != ''">
+			and a.identify_name like concat('%',#{name},'%')
+		</if>
+		<if test="shareType != null">
+			and a.share_type = #{shareType,jdbcType=VARCHAR}
+		</if>
+		<if test="status != null">
+			and a.status = #{status,jdbcType=INTEGER}
+		</if>
+		<if test="businessAudit != null">
+      		and a.business_audit = #{businessAudit,jdbcType=INTEGER}
+   		</if>
+		<if test="currentMemberStatus != null">
+			and a.current_member_status = #{currentMemberStatus,jdbcType=INTEGER}
+		</if>
+		<if test="isMember != null">
+			and a.is_member = #{isMember,jdbcType=INTEGER}
+		</if>
+		<if test="societyTag != null and societyTag != ''">
+			and a.society_tag = #{societyTag,jdbcType=VARCHAR}
+		</if>
+		<if test="startDate != null and startDate != ''">
+			and a.create_time &gt; STR_TO_DATE(#{startDate},'%Y-%m-%d %H:%i:%s')
+		</if>
+		<if test="endDate != null and endDate != ''">
+			and a.create_time &lt; STR_TO_DATE(#{endDate},'%Y-%m-%d %H:%i:%s')
+		</if>
+		<if test="province != null">
+			and b.location_province = #{province,jdbcType=INTEGER}
+		</if>
+		<if test="city != null">
+			and b.location_city = #{city,jdbcType=INTEGER}
+		</if>
+		<if test="area != null">
+			and b.location_area = #{area,jdbcType=INTEGER}
+		</if>
+		<if test="industry != null">
+			and b.industry = #{industry,jdbcType=INTEGER}
+		</if>
+		<if test="listed != null">
+			and b.listed = #{listed,jdbcType=INTEGER}
+		</if>
+		<if test="highTechZone != null">
+			and b.high_tech_zone = #{highTechZone,jdbcType=INTEGER}
+		</if>
+		<if test="international != null">
+			and b.international = #{international,jdbcType=INTEGER}
+		</if>
+		<if test="auditStatus != null">
+     		and b.audit_status = #{auditStatus,jdbcType=INTEGER}
+    	</if>
+	</select>
+	
+	<select id="findAdminName" resultType="com.goafanti.customer.bo.CustomerListOut">
+		select d.name as adminName,d.id as aid
+		from admin d left join department_management dm on dm.id = d.department_id
+		where d.department_id=(select department_id from admin where id=#{aid,jdbcType=INTEGER})
+	</select>
+	
+	<select id="findEnteringAuditList" resultType="com.goafanti.customer.bo.CustomerListOut">
+		select u.id as uid,u.nickname as name,u.mobile as contactMobile,a.name as adminName,u.create_time as createTime,u.audit_status as auditStatus
+		from user u left join admin a on u.aid=a.id
+		where u.audit_status=0 and u.status != 1 and u.share_type=0
+		<if test="aid != null and aid !=''">
+			and u.aid = #{aid,jdbcType=VARCHAR}
+		</if>
+		<if test="name != null and name != ''">
+			and u.nickname = #{name,jdbcType=VARCHAR}
+		</if>
+		<if test="adminName != null and adminName != ''">
+			and a.name = #{adminName,jdbcType=VARCHAR}
+		</if>
+		<if test="page_sql != null">
+    		${page_sql}
+   		 </if>
+	</select>
+	
+	<select id="findEnteringAuditCount" resultType="java.lang.Integer">
+		select 
+			count(0)	
+		from user u left join admin a on u.aid=a.id
+		where u.audit_status=0 and u.status != 1 and u.share_type=0
+		<if test="aid != null and aid !=''">
+			and u.aid = #{aid,jdbcType=VARCHAR}
+		</if>
+		<if test="name != null and name != ''">
+			and u.nickname = #{name,jdbcType=VARCHAR}
+		</if>
+		<if test="adminName != null and adminName != ''">
+			and a.name = #{adminName,jdbcType=VARCHAR}
+		</if>
+	</select>
+	
+	<select id="findEnteringAuditIsNoList" resultType="com.goafanti.customer.bo.CustomerListOut">
+		select u.id as uid,u.nickname as name,u.mobile as contactMobile,a.name as adminName,u.create_time as createTime,
+		u.audit_status as auditStatus,u.audit_opinion as auditOpinion
+		from user u left join admin a on u.aid=a.id
+		where u.audit_status=2 and u.status != 1
+		<if test="aid != null and aid !=''">
+			and u.aid = #{aid,jdbcType=VARCHAR}
+		</if>
+		<if test="name != null and name != ''">
+			and u.nickname = #{name,jdbcType=VARCHAR}
+		</if>
+		<if test="adminName != null and adminName != ''">
+			and a.name = #{adminName,jdbcType=VARCHAR}
+		</if>
+		<if test="page_sql != null">
+    		${page_sql}
+   		 </if>
+	</select>
+	
+	<select id="findEnteringAuditIsNoCount" resultType="java.lang.Integer">
+		select 
+			count(0)	
+		from user u left join admin a on u.aid=a.id
+		where u.audit_status=2 and u.status != 1
+		<if test="aid != null and aid !=''">
+			and u.aid = #{aid,jdbcType=VARCHAR}
+		</if>
+		<if test="name != null and name != ''">
+			and u.nickname = #{name,jdbcType=VARCHAR}
+		</if>
+		<if test="adminName != null and adminName != ''">
+			and a.name = #{adminName,jdbcType=VARCHAR}
+		</if>
+	</select>
 </mapper>

+ 167 - 65
src/main/java/com/goafanti/common/model/AppConfig.java

@@ -1,66 +1,168 @@
-package com.goafanti.common.model;
-
-public class AppConfig {
-	private Integer	id;
-
-	/**
-	 * 分类
-	 */
-	private String	cate;
-
-	/**
-	 * 关键字
-	 */
-	private String	key;
-
-	/**
-	 * 名称
-	 */
-	private String	name;
-
-	/**
-	 * 值
-	 */
-	private String	value;
-
-	public Integer getId() {
-		return id;
-	}
-
-	public void setId(Integer id) {
-		this.id = id;
-	}
-
-	public String getCate() {
-		return cate;
-	}
-
-	public void setCate(String cate) {
-		this.cate = cate;
-	}
-
-	public String getKey() {
-		return key;
-	}
-
-	public void setKey(String key) {
-		this.key = key;
-	}
-
-	public String getName() {
-		return name;
-	}
-
-	public void setName(String name) {
-		this.name = name;
-	}
-
-	public String getValue() {
-		return value;
-	}
-
-	public void setValue(String value) {
-		this.value = value;
-	}
-
+package com.goafanti.common.model;
+
+import java.util.Date;
+
+public class AppConfig {
+
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column app_config.id
+	 * @mbg.generated  Wed Jan 24 16:21:41 CST 2018
+	 */
+	private Integer id;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column app_config.release_version
+	 * @mbg.generated  Wed Jan 24 16:21:41 CST 2018
+	 */
+	private String releaseVersion;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column app_config.release_desc
+	 * @mbg.generated  Wed Jan 24 16:21:41 CST 2018
+	 */
+	private String releaseDesc;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column app_config.release_date
+	 * @mbg.generated  Wed Jan 24 16:21:41 CST 2018
+	 */
+	private Date releaseDate;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column app_config.app_url
+	 * @mbg.generated  Wed Jan 24 16:21:41 CST 2018
+	 */
+	private String appUrl;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column app_config.force_update
+	 * @mbg.generated  Wed Jan 24 16:21:41 CST 2018
+	 */
+	private Integer forceUpdate;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column app_config.release_code
+	 * @mbg.generated  Wed Jan 24 16:21:41 CST 2018
+	 */
+	private Integer releaseCode;
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column app_config.id
+	 * @return  the value of app_config.id
+	 * @mbg.generated  Wed Jan 24 16:21:41 CST 2018
+	 */
+	public Integer getId() {
+		return id;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column app_config.id
+	 * @param id  the value for app_config.id
+	 * @mbg.generated  Wed Jan 24 16:21:41 CST 2018
+	 */
+	public void setId(Integer id) {
+		this.id = id;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column app_config.release_version
+	 * @return  the value of app_config.release_version
+	 * @mbg.generated  Wed Jan 24 16:21:41 CST 2018
+	 */
+	public String getReleaseVersion() {
+		return releaseVersion;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column app_config.release_version
+	 * @param releaseVersion  the value for app_config.release_version
+	 * @mbg.generated  Wed Jan 24 16:21:41 CST 2018
+	 */
+	public void setReleaseVersion(String releaseVersion) {
+		this.releaseVersion = releaseVersion;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column app_config.release_desc
+	 * @return  the value of app_config.release_desc
+	 * @mbg.generated  Wed Jan 24 16:21:41 CST 2018
+	 */
+	public String getReleaseDesc() {
+		return releaseDesc;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column app_config.release_desc
+	 * @param releaseDesc  the value for app_config.release_desc
+	 * @mbg.generated  Wed Jan 24 16:21:41 CST 2018
+	 */
+	public void setReleaseDesc(String releaseDesc) {
+		this.releaseDesc = releaseDesc;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column app_config.release_date
+	 * @return  the value of app_config.release_date
+	 * @mbg.generated  Wed Jan 24 16:21:41 CST 2018
+	 */
+	public Date getReleaseDate() {
+		return releaseDate;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column app_config.release_date
+	 * @param releaseDate  the value for app_config.release_date
+	 * @mbg.generated  Wed Jan 24 16:21:41 CST 2018
+	 */
+	public void setReleaseDate(Date releaseDate) {
+		this.releaseDate = releaseDate;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column app_config.app_url
+	 * @return  the value of app_config.app_url
+	 * @mbg.generated  Wed Jan 24 16:21:41 CST 2018
+	 */
+	public String getAppUrl() {
+		return appUrl;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column app_config.app_url
+	 * @param appUrl  the value for app_config.app_url
+	 * @mbg.generated  Wed Jan 24 16:21:41 CST 2018
+	 */
+	public void setAppUrl(String appUrl) {
+		this.appUrl = appUrl;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column app_config.force_update
+	 * @return  the value of app_config.force_update
+	 * @mbg.generated  Wed Jan 24 16:21:41 CST 2018
+	 */
+	public Integer getForceUpdate() {
+		return forceUpdate;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column app_config.force_update
+	 * @param forceUpdate  the value for app_config.force_update
+	 * @mbg.generated  Wed Jan 24 16:21:41 CST 2018
+	 */
+	public void setForceUpdate(Integer forceUpdate) {
+		this.forceUpdate = forceUpdate;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column app_config.release_code
+	 * @return  the value of app_config.release_code
+	 * @mbg.generated  Wed Jan 24 16:21:41 CST 2018
+	 */
+	public Integer getReleaseCode() {
+		return releaseCode;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column app_config.release_code
+	 * @param releaseCode  the value for app_config.release_code
+	 * @mbg.generated  Wed Jan 24 16:21:41 CST 2018
+	 */
+	public void setReleaseCode(Integer releaseCode) {
+		this.releaseCode = releaseCode;
+	}
 }

+ 712 - 0
src/main/java/com/goafanti/common/model/AppConfigExample.java

@@ -0,0 +1,712 @@
+package com.goafanti.common.model;
+
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+
+public class AppConfigExample {
+    /**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database table app_config
+	 * @mbg.generated  Wed Jan 24 16:21:41 CST 2018
+	 */
+	protected String orderByClause;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database table app_config
+	 * @mbg.generated  Wed Jan 24 16:21:41 CST 2018
+	 */
+	protected boolean distinct;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database table app_config
+	 * @mbg.generated  Wed Jan 24 16:21:41 CST 2018
+	 */
+	protected List<Criteria> oredCriteria;
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table app_config
+	 * @mbg.generated  Wed Jan 24 16:21:41 CST 2018
+	 */
+	public AppConfigExample() {
+		oredCriteria = new ArrayList<Criteria>();
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table app_config
+	 * @mbg.generated  Wed Jan 24 16:21:41 CST 2018
+	 */
+	public void setOrderByClause(String orderByClause) {
+		this.orderByClause = orderByClause;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table app_config
+	 * @mbg.generated  Wed Jan 24 16:21:41 CST 2018
+	 */
+	public String getOrderByClause() {
+		return orderByClause;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table app_config
+	 * @mbg.generated  Wed Jan 24 16:21:41 CST 2018
+	 */
+	public void setDistinct(boolean distinct) {
+		this.distinct = distinct;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table app_config
+	 * @mbg.generated  Wed Jan 24 16:21:41 CST 2018
+	 */
+	public boolean isDistinct() {
+		return distinct;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table app_config
+	 * @mbg.generated  Wed Jan 24 16:21:41 CST 2018
+	 */
+	public List<Criteria> getOredCriteria() {
+		return oredCriteria;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table app_config
+	 * @mbg.generated  Wed Jan 24 16:21:41 CST 2018
+	 */
+	public void or(Criteria criteria) {
+		oredCriteria.add(criteria);
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table app_config
+	 * @mbg.generated  Wed Jan 24 16:21:41 CST 2018
+	 */
+	public Criteria or() {
+		Criteria criteria = createCriteriaInternal();
+		oredCriteria.add(criteria);
+		return criteria;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table app_config
+	 * @mbg.generated  Wed Jan 24 16:21:41 CST 2018
+	 */
+	public Criteria createCriteria() {
+		Criteria criteria = createCriteriaInternal();
+		if (oredCriteria.size() == 0) {
+			oredCriteria.add(criteria);
+		}
+		return criteria;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table app_config
+	 * @mbg.generated  Wed Jan 24 16:21:41 CST 2018
+	 */
+	protected Criteria createCriteriaInternal() {
+		Criteria criteria = new Criteria();
+		return criteria;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table app_config
+	 * @mbg.generated  Wed Jan 24 16:21:41 CST 2018
+	 */
+	public void clear() {
+		oredCriteria.clear();
+		orderByClause = null;
+		distinct = false;
+	}
+
+	/**
+	 * This class was generated by MyBatis Generator. This class corresponds to the database table app_config
+	 * @mbg.generated  Wed Jan 24 16:21:41 CST 2018
+	 */
+	protected abstract static class GeneratedCriteria {
+		protected List<Criterion> criteria;
+
+		protected GeneratedCriteria() {
+			super();
+			criteria = new ArrayList<Criterion>();
+		}
+
+		public boolean isValid() {
+			return criteria.size() > 0;
+		}
+
+		public List<Criterion> getAllCriteria() {
+			return criteria;
+		}
+
+		public List<Criterion> getCriteria() {
+			return criteria;
+		}
+
+		protected void addCriterion(String condition) {
+			if (condition == null) {
+				throw new RuntimeException("Value for condition cannot be null");
+			}
+			criteria.add(new Criterion(condition));
+		}
+
+		protected void addCriterion(String condition, Object value, String property) {
+			if (value == null) {
+				throw new RuntimeException("Value for " + property + " cannot be null");
+			}
+			criteria.add(new Criterion(condition, value));
+		}
+
+		protected void addCriterion(String condition, Object value1, Object value2, String property) {
+			if (value1 == null || value2 == null) {
+				throw new RuntimeException("Between values for " + property + " cannot be null");
+			}
+			criteria.add(new Criterion(condition, value1, value2));
+		}
+
+		public Criteria andIdIsNull() {
+			addCriterion("id is null");
+			return (Criteria) this;
+		}
+
+		public Criteria andIdIsNotNull() {
+			addCriterion("id is not null");
+			return (Criteria) this;
+		}
+
+		public Criteria andIdEqualTo(Integer value) {
+			addCriterion("id =", value, "id");
+			return (Criteria) this;
+		}
+
+		public Criteria andIdNotEqualTo(Integer value) {
+			addCriterion("id <>", value, "id");
+			return (Criteria) this;
+		}
+
+		public Criteria andIdGreaterThan(Integer value) {
+			addCriterion("id >", value, "id");
+			return (Criteria) this;
+		}
+
+		public Criteria andIdGreaterThanOrEqualTo(Integer value) {
+			addCriterion("id >=", value, "id");
+			return (Criteria) this;
+		}
+
+		public Criteria andIdLessThan(Integer value) {
+			addCriterion("id <", value, "id");
+			return (Criteria) this;
+		}
+
+		public Criteria andIdLessThanOrEqualTo(Integer value) {
+			addCriterion("id <=", value, "id");
+			return (Criteria) this;
+		}
+
+		public Criteria andIdIn(List<Integer> values) {
+			addCriterion("id in", values, "id");
+			return (Criteria) this;
+		}
+
+		public Criteria andIdNotIn(List<Integer> values) {
+			addCriterion("id not in", values, "id");
+			return (Criteria) this;
+		}
+
+		public Criteria andIdBetween(Integer value1, Integer value2) {
+			addCriterion("id between", value1, value2, "id");
+			return (Criteria) this;
+		}
+
+		public Criteria andIdNotBetween(Integer value1, Integer value2) {
+			addCriterion("id not between", value1, value2, "id");
+			return (Criteria) this;
+		}
+
+		public Criteria andReleaseVersionIsNull() {
+			addCriterion("release_version is null");
+			return (Criteria) this;
+		}
+
+		public Criteria andReleaseVersionIsNotNull() {
+			addCriterion("release_version is not null");
+			return (Criteria) this;
+		}
+
+		public Criteria andReleaseVersionEqualTo(String value) {
+			addCriterion("release_version =", value, "releaseVersion");
+			return (Criteria) this;
+		}
+
+		public Criteria andReleaseVersionNotEqualTo(String value) {
+			addCriterion("release_version <>", value, "releaseVersion");
+			return (Criteria) this;
+		}
+
+		public Criteria andReleaseVersionGreaterThan(String value) {
+			addCriterion("release_version >", value, "releaseVersion");
+			return (Criteria) this;
+		}
+
+		public Criteria andReleaseVersionGreaterThanOrEqualTo(String value) {
+			addCriterion("release_version >=", value, "releaseVersion");
+			return (Criteria) this;
+		}
+
+		public Criteria andReleaseVersionLessThan(String value) {
+			addCriterion("release_version <", value, "releaseVersion");
+			return (Criteria) this;
+		}
+
+		public Criteria andReleaseVersionLessThanOrEqualTo(String value) {
+			addCriterion("release_version <=", value, "releaseVersion");
+			return (Criteria) this;
+		}
+
+		public Criteria andReleaseVersionLike(String value) {
+			addCriterion("release_version like", value, "releaseVersion");
+			return (Criteria) this;
+		}
+
+		public Criteria andReleaseVersionNotLike(String value) {
+			addCriterion("release_version not like", value, "releaseVersion");
+			return (Criteria) this;
+		}
+
+		public Criteria andReleaseVersionIn(List<String> values) {
+			addCriterion("release_version in", values, "releaseVersion");
+			return (Criteria) this;
+		}
+
+		public Criteria andReleaseVersionNotIn(List<String> values) {
+			addCriterion("release_version not in", values, "releaseVersion");
+			return (Criteria) this;
+		}
+
+		public Criteria andReleaseVersionBetween(String value1, String value2) {
+			addCriterion("release_version between", value1, value2, "releaseVersion");
+			return (Criteria) this;
+		}
+
+		public Criteria andReleaseVersionNotBetween(String value1, String value2) {
+			addCriterion("release_version not between", value1, value2, "releaseVersion");
+			return (Criteria) this;
+		}
+
+		public Criteria andReleaseDescIsNull() {
+			addCriterion("release_desc is null");
+			return (Criteria) this;
+		}
+
+		public Criteria andReleaseDescIsNotNull() {
+			addCriterion("release_desc is not null");
+			return (Criteria) this;
+		}
+
+		public Criteria andReleaseDescEqualTo(String value) {
+			addCriterion("release_desc =", value, "releaseDesc");
+			return (Criteria) this;
+		}
+
+		public Criteria andReleaseDescNotEqualTo(String value) {
+			addCriterion("release_desc <>", value, "releaseDesc");
+			return (Criteria) this;
+		}
+
+		public Criteria andReleaseDescGreaterThan(String value) {
+			addCriterion("release_desc >", value, "releaseDesc");
+			return (Criteria) this;
+		}
+
+		public Criteria andReleaseDescGreaterThanOrEqualTo(String value) {
+			addCriterion("release_desc >=", value, "releaseDesc");
+			return (Criteria) this;
+		}
+
+		public Criteria andReleaseDescLessThan(String value) {
+			addCriterion("release_desc <", value, "releaseDesc");
+			return (Criteria) this;
+		}
+
+		public Criteria andReleaseDescLessThanOrEqualTo(String value) {
+			addCriterion("release_desc <=", value, "releaseDesc");
+			return (Criteria) this;
+		}
+
+		public Criteria andReleaseDescLike(String value) {
+			addCriterion("release_desc like", value, "releaseDesc");
+			return (Criteria) this;
+		}
+
+		public Criteria andReleaseDescNotLike(String value) {
+			addCriterion("release_desc not like", value, "releaseDesc");
+			return (Criteria) this;
+		}
+
+		public Criteria andReleaseDescIn(List<String> values) {
+			addCriterion("release_desc in", values, "releaseDesc");
+			return (Criteria) this;
+		}
+
+		public Criteria andReleaseDescNotIn(List<String> values) {
+			addCriterion("release_desc not in", values, "releaseDesc");
+			return (Criteria) this;
+		}
+
+		public Criteria andReleaseDescBetween(String value1, String value2) {
+			addCriterion("release_desc between", value1, value2, "releaseDesc");
+			return (Criteria) this;
+		}
+
+		public Criteria andReleaseDescNotBetween(String value1, String value2) {
+			addCriterion("release_desc not between", value1, value2, "releaseDesc");
+			return (Criteria) this;
+		}
+
+		public Criteria andReleaseDateIsNull() {
+			addCriterion("release_date is null");
+			return (Criteria) this;
+		}
+
+		public Criteria andReleaseDateIsNotNull() {
+			addCriterion("release_date is not null");
+			return (Criteria) this;
+		}
+
+		public Criteria andReleaseDateEqualTo(Date value) {
+			addCriterion("release_date =", value, "releaseDate");
+			return (Criteria) this;
+		}
+
+		public Criteria andReleaseDateNotEqualTo(Date value) {
+			addCriterion("release_date <>", value, "releaseDate");
+			return (Criteria) this;
+		}
+
+		public Criteria andReleaseDateGreaterThan(Date value) {
+			addCriterion("release_date >", value, "releaseDate");
+			return (Criteria) this;
+		}
+
+		public Criteria andReleaseDateGreaterThanOrEqualTo(Date value) {
+			addCriterion("release_date >=", value, "releaseDate");
+			return (Criteria) this;
+		}
+
+		public Criteria andReleaseDateLessThan(Date value) {
+			addCriterion("release_date <", value, "releaseDate");
+			return (Criteria) this;
+		}
+
+		public Criteria andReleaseDateLessThanOrEqualTo(Date value) {
+			addCriterion("release_date <=", value, "releaseDate");
+			return (Criteria) this;
+		}
+
+		public Criteria andReleaseDateIn(List<Date> values) {
+			addCriterion("release_date in", values, "releaseDate");
+			return (Criteria) this;
+		}
+
+		public Criteria andReleaseDateNotIn(List<Date> values) {
+			addCriterion("release_date not in", values, "releaseDate");
+			return (Criteria) this;
+		}
+
+		public Criteria andReleaseDateBetween(Date value1, Date value2) {
+			addCriterion("release_date between", value1, value2, "releaseDate");
+			return (Criteria) this;
+		}
+
+		public Criteria andReleaseDateNotBetween(Date value1, Date value2) {
+			addCriterion("release_date not between", value1, value2, "releaseDate");
+			return (Criteria) this;
+		}
+
+		public Criteria andAppUrlIsNull() {
+			addCriterion("app_url is null");
+			return (Criteria) this;
+		}
+
+		public Criteria andAppUrlIsNotNull() {
+			addCriterion("app_url is not null");
+			return (Criteria) this;
+		}
+
+		public Criteria andAppUrlEqualTo(String value) {
+			addCriterion("app_url =", value, "appUrl");
+			return (Criteria) this;
+		}
+
+		public Criteria andAppUrlNotEqualTo(String value) {
+			addCriterion("app_url <>", value, "appUrl");
+			return (Criteria) this;
+		}
+
+		public Criteria andAppUrlGreaterThan(String value) {
+			addCriterion("app_url >", value, "appUrl");
+			return (Criteria) this;
+		}
+
+		public Criteria andAppUrlGreaterThanOrEqualTo(String value) {
+			addCriterion("app_url >=", value, "appUrl");
+			return (Criteria) this;
+		}
+
+		public Criteria andAppUrlLessThan(String value) {
+			addCriterion("app_url <", value, "appUrl");
+			return (Criteria) this;
+		}
+
+		public Criteria andAppUrlLessThanOrEqualTo(String value) {
+			addCriterion("app_url <=", value, "appUrl");
+			return (Criteria) this;
+		}
+
+		public Criteria andAppUrlLike(String value) {
+			addCriterion("app_url like", value, "appUrl");
+			return (Criteria) this;
+		}
+
+		public Criteria andAppUrlNotLike(String value) {
+			addCriterion("app_url not like", value, "appUrl");
+			return (Criteria) this;
+		}
+
+		public Criteria andAppUrlIn(List<String> values) {
+			addCriterion("app_url in", values, "appUrl");
+			return (Criteria) this;
+		}
+
+		public Criteria andAppUrlNotIn(List<String> values) {
+			addCriterion("app_url not in", values, "appUrl");
+			return (Criteria) this;
+		}
+
+		public Criteria andAppUrlBetween(String value1, String value2) {
+			addCriterion("app_url between", value1, value2, "appUrl");
+			return (Criteria) this;
+		}
+
+		public Criteria andAppUrlNotBetween(String value1, String value2) {
+			addCriterion("app_url not between", value1, value2, "appUrl");
+			return (Criteria) this;
+		}
+
+		public Criteria andForceUpdateIsNull() {
+			addCriterion("force_update is null");
+			return (Criteria) this;
+		}
+
+		public Criteria andForceUpdateIsNotNull() {
+			addCriterion("force_update is not null");
+			return (Criteria) this;
+		}
+
+		public Criteria andForceUpdateEqualTo(Integer value) {
+			addCriterion("force_update =", value, "forceUpdate");
+			return (Criteria) this;
+		}
+
+		public Criteria andForceUpdateNotEqualTo(Integer value) {
+			addCriterion("force_update <>", value, "forceUpdate");
+			return (Criteria) this;
+		}
+
+		public Criteria andForceUpdateGreaterThan(Integer value) {
+			addCriterion("force_update >", value, "forceUpdate");
+			return (Criteria) this;
+		}
+
+		public Criteria andForceUpdateGreaterThanOrEqualTo(Integer value) {
+			addCriterion("force_update >=", value, "forceUpdate");
+			return (Criteria) this;
+		}
+
+		public Criteria andForceUpdateLessThan(Integer value) {
+			addCriterion("force_update <", value, "forceUpdate");
+			return (Criteria) this;
+		}
+
+		public Criteria andForceUpdateLessThanOrEqualTo(Integer value) {
+			addCriterion("force_update <=", value, "forceUpdate");
+			return (Criteria) this;
+		}
+
+		public Criteria andForceUpdateIn(List<Integer> values) {
+			addCriterion("force_update in", values, "forceUpdate");
+			return (Criteria) this;
+		}
+
+		public Criteria andForceUpdateNotIn(List<Integer> values) {
+			addCriterion("force_update not in", values, "forceUpdate");
+			return (Criteria) this;
+		}
+
+		public Criteria andForceUpdateBetween(Integer value1, Integer value2) {
+			addCriterion("force_update between", value1, value2, "forceUpdate");
+			return (Criteria) this;
+		}
+
+		public Criteria andForceUpdateNotBetween(Integer value1, Integer value2) {
+			addCriterion("force_update not between", value1, value2, "forceUpdate");
+			return (Criteria) this;
+		}
+
+		public Criteria andReleaseCodeIsNull() {
+			addCriterion("release_code is null");
+			return (Criteria) this;
+		}
+
+		public Criteria andReleaseCodeIsNotNull() {
+			addCriterion("release_code is not null");
+			return (Criteria) this;
+		}
+
+		public Criteria andReleaseCodeEqualTo(Integer value) {
+			addCriterion("release_code =", value, "releaseCode");
+			return (Criteria) this;
+		}
+
+		public Criteria andReleaseCodeNotEqualTo(Integer value) {
+			addCriterion("release_code <>", value, "releaseCode");
+			return (Criteria) this;
+		}
+
+		public Criteria andReleaseCodeGreaterThan(Integer value) {
+			addCriterion("release_code >", value, "releaseCode");
+			return (Criteria) this;
+		}
+
+		public Criteria andReleaseCodeGreaterThanOrEqualTo(Integer value) {
+			addCriterion("release_code >=", value, "releaseCode");
+			return (Criteria) this;
+		}
+
+		public Criteria andReleaseCodeLessThan(Integer value) {
+			addCriterion("release_code <", value, "releaseCode");
+			return (Criteria) this;
+		}
+
+		public Criteria andReleaseCodeLessThanOrEqualTo(Integer value) {
+			addCriterion("release_code <=", value, "releaseCode");
+			return (Criteria) this;
+		}
+
+		public Criteria andReleaseCodeIn(List<Integer> values) {
+			addCriterion("release_code in", values, "releaseCode");
+			return (Criteria) this;
+		}
+
+		public Criteria andReleaseCodeNotIn(List<Integer> values) {
+			addCriterion("release_code not in", values, "releaseCode");
+			return (Criteria) this;
+		}
+
+		public Criteria andReleaseCodeBetween(Integer value1, Integer value2) {
+			addCriterion("release_code between", value1, value2, "releaseCode");
+			return (Criteria) this;
+		}
+
+		public Criteria andReleaseCodeNotBetween(Integer value1, Integer value2) {
+			addCriterion("release_code not between", value1, value2, "releaseCode");
+			return (Criteria) this;
+		}
+	}
+
+	/**
+	 * This class was generated by MyBatis Generator. This class corresponds to the database table app_config
+	 * @mbg.generated  Wed Jan 24 16:21:41 CST 2018
+	 */
+	public static class Criterion {
+		private String condition;
+		private Object value;
+		private Object secondValue;
+		private boolean noValue;
+		private boolean singleValue;
+		private boolean betweenValue;
+		private boolean listValue;
+		private String typeHandler;
+
+		public String getCondition() {
+			return condition;
+		}
+
+		public Object getValue() {
+			return value;
+		}
+
+		public Object getSecondValue() {
+			return secondValue;
+		}
+
+		public boolean isNoValue() {
+			return noValue;
+		}
+
+		public boolean isSingleValue() {
+			return singleValue;
+		}
+
+		public boolean isBetweenValue() {
+			return betweenValue;
+		}
+
+		public boolean isListValue() {
+			return listValue;
+		}
+
+		public String getTypeHandler() {
+			return typeHandler;
+		}
+
+		protected Criterion(String condition) {
+			super();
+			this.condition = condition;
+			this.typeHandler = null;
+			this.noValue = true;
+		}
+
+		protected Criterion(String condition, Object value, String typeHandler) {
+			super();
+			this.condition = condition;
+			this.value = value;
+			this.typeHandler = typeHandler;
+			if (value instanceof List<?>) {
+				this.listValue = true;
+			} else {
+				this.singleValue = true;
+			}
+		}
+
+		protected Criterion(String condition, Object value) {
+			this(condition, value, null);
+		}
+
+		protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
+			super();
+			this.condition = condition;
+			this.value = value;
+			this.secondValue = secondValue;
+			this.typeHandler = typeHandler;
+			this.betweenValue = true;
+		}
+
+		protected Criterion(String condition, Object value, Object secondValue) {
+			this(condition, value, secondValue, null);
+		}
+	}
+
+	/**
+     * This class was generated by MyBatis Generator.
+     * This class corresponds to the database table app_config
+     *
+     * @mbg.generated do_not_delete_during_merge Wed Jan 24 16:14:16 CST 2018
+     */
+    public static class Criteria extends GeneratedCriteria {
+
+        protected Criteria() {
+            super();
+        }
+    }
+}

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

@@ -85,6 +85,16 @@ public class News {
 	 */
 	private Integer provinceId;
 	
+	/**
+	 * 审核状态
+	 */
+	private Integer auditStatus;
+	
+	/**
+	 * 是否发布
+	 */
+	private Integer releaseStatus;
+	
 	@JsonFormat(shape = Shape.STRING)
 	public Long getId() {
 		return id;
@@ -94,6 +104,22 @@ public class News {
 		this.id = id;
 	}
 
+	public Integer getAuditStatus() {
+		return auditStatus;
+	}
+
+	public void setAuditStatus(Integer auditStatus) {
+		this.auditStatus = auditStatus;
+	}
+
+	public Integer getReleaseStatus() {
+		return releaseStatus;
+	}
+
+	public void setReleaseStatus(Integer releaseStatus) {
+		this.releaseStatus = releaseStatus;
+	}
+
 	public Date getCreateTime() {
 		return createTime;
 	}

+ 20 - 0
src/main/java/com/goafanti/common/model/User.java

@@ -139,6 +139,26 @@ public class  User extends BaseModel implements AftUser{
 	 * @return  the value of user.id
 	 * @mbg.generated  Thu Nov 30 16:41:39 CST 2017
 	 */
+	private Integer auditStatus;
+	
+	private String auditOpinion;
+	
+	public Integer getAuditStatus() {
+		return auditStatus;
+	}
+
+	public void setAuditStatus(Integer auditStatus) {
+		this.auditStatus = auditStatus;
+	}
+
+	public String getAuditOpinion() {
+		return auditOpinion;
+	}
+
+	public void setAuditOpinion(String auditOpinion) {
+		this.auditOpinion = auditOpinion;
+	}
+
 	public String getId() {
 		return id;
 	}

+ 20 - 0
src/main/java/com/goafanti/common/model/UserIdentity.java

@@ -210,6 +210,26 @@ public class UserIdentity {
 	 * @mbg.generated  Fri Dec 29 09:20:50 CST 2017
 	 */
 	private BigDecimal consultationPrice;
+	
+	private Integer expertAudit;
+	
+	private Integer releaseStatus;
+
+	public Integer getExpertAudit() {
+		return expertAudit;
+	}
+
+	public void setExpertAudit(Integer expertAudit) {
+		this.expertAudit = expertAudit;
+	}
+
+	public Integer getReleaseStatus() {
+		return releaseStatus;
+	}
+
+	public void setReleaseStatus(Integer releaseStatus) {
+		this.releaseStatus = releaseStatus;
+	}
 
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column user_identity.id

+ 31 - 0
src/main/java/com/goafanti/common/service/DistrictGlossoryService.java

@@ -1,5 +1,6 @@
 package com.goafanti.common.service;
 
+import java.util.ArrayList;
 import java.util.List;
 
 import org.slf4j.Logger;
@@ -9,6 +10,9 @@ import org.springframework.cache.annotation.CacheEvict;
 import org.springframework.cache.annotation.Cacheable;
 import org.springframework.stereotype.Service;
 
+import com.goafanti.common.bo.AreaBo;
+import com.goafanti.common.bo.CityBo;
+import com.goafanti.common.bo.ProvinceBo;
 import com.goafanti.common.dao.DistrictGlossoryMapper;
 import com.goafanti.common.model.DistrictGlossory;
 import com.goafanti.common.utils.LoggerUtils;
@@ -37,4 +41,31 @@ public class DistrictGlossoryService {
 	public String selectNameById(Integer id) {
 		return districtGlossoryMapper.selectNameById(id);
 	}
+	
+	public List<ProvinceBo> getProvince(){
+		List<ProvinceBo> provinces=districtGlossoryMapper.getProvince();
+		List<CityBo> city=districtGlossoryMapper.getCity();
+		List<AreaBo> Area=districtGlossoryMapper.getArea();		
+		for(ProvinceBo one:provinces){
+			List <CityBo> cc=new ArrayList<CityBo>();
+			int pbid = one.getId();
+			for(CityBo two:city){
+				List <AreaBo> aa=new ArrayList<AreaBo>();
+				int cbid=two.getId();
+				int cbpid=two.getPid();
+				if(cbpid==pbid){					
+					for(AreaBo three:Area){
+						int abpid=three.getPid();
+						if(abpid==cbid){
+							aa.add(three);
+							two.setAreaList(aa);
+						}
+					}
+					cc.add(two);
+					one.setCityList(cc);
+				}
+			}
+		}
+		return provinces;
+	}
 }

+ 7 - 0
src/main/java/com/goafanti/common/service/FieldGlossoryService.java

@@ -1,5 +1,7 @@
 package com.goafanti.common.service;
 
+import java.util.List;
+
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -7,6 +9,7 @@ import org.springframework.cache.annotation.CacheEvict;
 import org.springframework.cache.annotation.Cacheable;
 import org.springframework.stereotype.Service;
 
+import com.goafanti.common.bo.Result;
 import com.goafanti.common.dao.FieldGlossoryMapper;
 import com.goafanti.common.model.FieldGlossory;
 import com.goafanti.common.utils.LoggerUtils;
@@ -29,4 +32,8 @@ public class FieldGlossoryService {
 	public void clear(Integer id) {
 		LoggerUtils.debug(logger, "清除领域列表缓存:[%s]", id);
 	}
+	
+	public List<FieldGlossory> getField(Integer pid, Integer level){
+		return fieldGlossoryMapper.getField(pid,level);
+	}
 }

+ 28 - 26
src/main/java/com/goafanti/common/utils/MobileMessageUtils.java

@@ -1,47 +1,49 @@
 package com.goafanti.common.utils;
 
-
 import com.aliyuncs.DefaultAcsClient;
 import com.aliyuncs.IAcsClient;
+import com.aliyuncs.dysmsapi.model.v20170525.SendSmsRequest;
+import com.aliyuncs.dysmsapi.model.v20170525.SendSmsResponse;
 import com.aliyuncs.exceptions.ClientException;
-import com.aliyuncs.exceptions.ServerException;
+import com.aliyuncs.http.MethodType;
 import com.aliyuncs.profile.DefaultProfile;
 import com.aliyuncs.profile.IClientProfile;
-import com.aliyuncs.sms.model.v20160927.SingleSendSmsRequest;
-import com.aliyuncs.sms.model.v20160927.SingleSendSmsResponse;
-import com.goafanti.common.constant.ErrorConstants;
 
 public class MobileMessageUtils {
-	
+
 	private final static String SIGN_NAME = "技淘网";
-	
-	private final static String SERVER_EXCEPTION = "服务器端手机验证码异常:%s";
-	
-	private final static String CLIENT_EXCEPTION = "客户端手机验证码异常:%s";
+	private final static String CLIENT_EXCEPTION = "手机验证码异常:%s";
 
 	@SuppressWarnings("unused")
-	public static String sendMessage(String templateCode, String paramString, String mobile, String accessKey, String accessSecret) {
+	public static String sendMessage(String templateCode, String paramString, String mobile, String accessKey,
+			String accessSecret) {
+
 		IClientProfile profile = DefaultProfile.getProfile("cn-hangzhou", accessKey, accessSecret);
 		try {
-			DefaultProfile.addEndpoint("cn-hangzhou", "cn-hangzhou", "Sms", "sms.aliyuncs.com");
-		} catch (ClientException e1) {
-			LoggerUtils.fmtError(MobileMessageUtils.class, e1, CLIENT_EXCEPTION, e1.getMessage());
-			return ErrorConstants.M_CODE_ERROR;
-		}
-		IAcsClient client = new DefaultAcsClient(profile);
-		SingleSendSmsRequest request = new SingleSendSmsRequest();
-		try {
+			DefaultProfile.addEndpoint("cn-hangzhou", "cn-hangzhou", "Dysmsapi", "dysmsapi.aliyuncs.com");
+			IAcsClient acsClient = new DefaultAcsClient(profile);
+			// 组装请求对象
+			SendSmsRequest request = new SendSmsRequest();
+			// 使用post提交
+			request.setMethod(MethodType.POST);
+			// 必填:待发送手机号。支持以逗号分隔的形式进行批量调用,批量上限为1000个手机号码,批量调用相对于单条调用及时性稍有延迟,验证码类型的短信推荐使用单条调用的方式
+			request.setPhoneNumbers(mobile);
+			// 必填:短信签名-可在短信控制台中找到
 			request.setSignName(SIGN_NAME);
+			// 必填:短信模板-可在短信控制台中找到
 			request.setTemplateCode(templateCode);
-			request.setParamString(paramString);
-			request.setRecNum(mobile);
-			SingleSendSmsResponse httpResponse = client.getAcsResponse(request);
-		} catch (ServerException e) {
-			LoggerUtils.fmtError(MobileMessageUtils.class, e, SERVER_EXCEPTION, e.getMessage());
-			return ErrorConstants.M_CODE_ERROR;
+			// 可选:模板中的变量替换JSON串,如模板内容为"亲爱的${name},您的验证码为${code}"时,此处的值为
+			// 友情提示:如果JSON中需要带换行符,请参照标准的JSON协议对换行符的要求,比如短信内容中包含\r\n的情况在JSON中需要表示成\\r\\n,否则会导致JSON在服务端解析失败
+			request.setTemplateParam(paramString);
+			// 可选-上行短信扩展码(扩展码字段控制在7位或以下,无特殊需求用户请忽略此字段)
+			// request.setSmsUpExtendCode("90997");
+			// 可选:outId为提供给业务方扩展字段,最终在短信回执消息中将此值带回给调用者
+			// request.setOutId("yourOutId");
+			// 请求失败这里会抛ClientException异常
+			SendSmsResponse sendSmsResponse = acsClient.getAcsResponse(request);
 		} catch (ClientException e) {
 			LoggerUtils.fmtError(MobileMessageUtils.class, e, CLIENT_EXCEPTION, e.getMessage());
-			return ErrorConstants.M_CODE_ERROR;
+			e.printStackTrace();
 		}
 		return null;
 	}

+ 11 - 0
src/main/java/com/goafanti/customer/bo/CustomerListIn.java

@@ -77,6 +77,17 @@ public class CustomerListIn {
 	/** 是否为咨询师 **/
 	private String consultant;
 	
+	/** 专家审核状态 **/
+	private Integer expertAudit ;
+
+	public Integer getExpertAudit() {
+		return expertAudit;
+	}
+
+	public void setExpertAudit(Integer expertAudit) {
+		this.expertAudit = expertAudit;
+	}
+
 	public String getType() {
 		return type;
 	}

+ 33 - 0
src/main/java/com/goafanti/customer/bo/CustomerListOut.java

@@ -16,6 +16,39 @@ public class CustomerListOut extends CustomerListIn{
 	/** 营销员姓名 **/
 	private String adminName;
 	
+	/** 专家审核状态 **/
+	private Integer expertAudit;
+	
+	/** 专家发布状态**/
+	private Integer releaseStatus;
+	
+	/** 审核意见**/
+	private String auditOpinion;
+	
+	public String getAuditOpinion() {
+		return auditOpinion;
+	}
+
+	public void setAuditOpinion(String auditOpinion) {
+		this.auditOpinion = auditOpinion;
+	}
+
+	public Integer getReleaseStatus() {
+		return releaseStatus;
+	}
+
+	public void setReleaseStatus(Integer releaseStatus) {
+		this.releaseStatus = releaseStatus;
+	}
+
+	public Integer getExpertAudit() {
+		return expertAudit;
+	}
+
+	public void setExpertAudit(Integer expertAudit) {
+		this.expertAudit = expertAudit;
+	}
+
 	public String getUid() {
 		return uid;
 	}

+ 7 - 0
src/main/java/com/goafanti/customer/bo/CustomerOrganizationDetailBo.java

@@ -8,6 +8,13 @@ public class CustomerOrganizationDetailBo extends OrganizationIdentity{
 	private String companyLogoUrl;
 	private String introduction;
 	private Integer businessAudit;
+	private String licenceNumber;
+	public String getLicenceNumber() {
+		return licenceNumber;
+	}
+	public void setLicenceNumber(String licenceNumber) {
+		this.licenceNumber = licenceNumber;
+	}
 	public String getIdentifyName() {
 		return identifyName;
 	}

+ 28 - 0
src/main/java/com/goafanti/customer/bo/CustomerPersonalDetailBo.java

@@ -8,6 +8,34 @@ public class CustomerPersonalDetailBo extends UserIdentity{
 	private String headPortraitUrl;
 	private String introduction;
 	private Integer businessAudit;
+	private Integer expertAudit;
+	private Integer releaseStatus;
+	private String aid;
+	private String adminName;
+	public String getAdminName() {
+		return adminName;
+	}
+	public void setAdminName(String adminName) {
+		this.adminName = adminName;
+	}
+	public String getAid() {
+		return aid;
+	}
+	public void setAid(String aid) {
+		this.aid = aid;
+	}
+	public Integer getReleaseStatus() {
+		return releaseStatus;
+	}
+	public void setReleaseStatus(Integer releaseStatus) {
+		this.releaseStatus = releaseStatus;
+	}
+	public Integer getExpertAudit() {
+		return expertAudit;
+	}
+	public void setExpertAudit(Integer expertAudit) {
+		this.expertAudit = expertAudit;
+	}
 	public String getIdentifyName() {
 		return identifyName;
 	}

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

@@ -43,6 +43,7 @@ import com.goafanti.customer.bo.BusinessListBo;
 import com.goafanti.customer.bo.BussinessFollowBo;
 import com.goafanti.customer.bo.CustomerExcelBo;
 import com.goafanti.customer.bo.CustomerListIn;
+import com.goafanti.customer.bo.CustomerListOut;
 import com.goafanti.customer.bo.CustomerOrganizationDetailBo;
 import com.goafanti.customer.bo.CustomerPersonalDetailBo;
 import com.goafanti.customer.bo.FollowBusinessBo;
@@ -84,6 +85,15 @@ public class AdminCustomerApiController extends BaseApiController{
 		return res;
 	}
 	
+	/** 管理个人客户查询 **/
+	@RequestMapping(value = "/listAllManagePersonalCustomer" , method = RequestMethod.POST)
+	public Result listAllManagePersonalCustomer(CustomerListIn cli,Integer pageNo, Integer pageSize){
+		Result res = new Result();
+		cli.setAid(TokenManager.getAdminId());
+		res.setData(customerService.listAllManagePersonalCustomer(cli, pageNo, pageSize));
+		return res;
+	}
+	
 	/** 私有单位客户列表 **/
 	@RequestMapping(value = "/listPrivateOrganizationCustomer" , method = RequestMethod.POST)
 	public Result listPrivateOrganizationCustomer(CustomerListIn cli,Integer pageNo, Integer pageSize){
@@ -108,6 +118,14 @@ public class AdminCustomerApiController extends BaseApiController{
 		return res;
 	}
 	
+	/** 管理单位客户查询 **/
+	@RequestMapping(value = "/listAllManageOrganizationCustomer" , method = RequestMethod.POST)
+	public Result listAllManageOrganizationCustomer(CustomerListIn cli,Integer pageNo, Integer pageSize){
+		Result res = new Result();
+		cli.setAid(TokenManager.getAdminId());
+		res.setData(customerService.listAllManageOrganizationCustomer(cli, pageNo, pageSize));
+		return res;
+	}
 	
 	/** 客户即时检索 **/
 	@RequestMapping(value = "/findCustomerByName",method = RequestMethod.GET)
@@ -623,6 +641,14 @@ public class AdminCustomerApiController extends BaseApiController{
 		return res;
 	}
 	
+	/** 业务管理列表 **/
+	@RequestMapping(value = "/listManageBusiness", method = RequestMethod.POST)
+	public Result listManageBusiness(BusinessListBo blo,Integer pageNo, Integer pageSize){
+		Result res = new Result();
+		res.setData(customerService.listManageBusiness(blo, pageNo, pageSize));
+		return res;
+	}
+	
 	/** 查询业务字典 **/
 	@RequestMapping(value = "/findBusinessGlossory",method = RequestMethod.GET)
 	public Result findBusinessGlossory(){
@@ -795,4 +821,52 @@ public class AdminCustomerApiController extends BaseApiController{
 		customerService.updateBusinessToStop(businessId);
 		return res;
 	}
+	
+	/** 客户分配查询(本部门) **/
+	@RequestMapping(value = "/findAdminName" , method = RequestMethod.POST)
+	public Result findAdminName(){
+		Result res = new Result();
+		res.setData(customerService.findAdminName());
+		return res;
+	}
+	
+	/** 分配个人客户 **/
+	@RequestMapping(value = "/updatePersonalCustomerz", method = RequestMethod.POST)
+	public Result updatePersonalCustomerz(CustomerPersonalDetailBo bo){
+		Result res = new Result();
+		if(StringUtils.isBlank(bo.getUid()) || StringUtils.isBlank(bo.getId())){
+			res.getError().add(buildError(ErrorConstants.PARAM_ERROR,""));
+			return res;
+		}
+		customerService.updatePersonalCustomerz(bo);
+		return res;
+	}
+	
+	/** 客户录入审核 **/
+	@RequestMapping(value = "/findEnteringAudit" , method = RequestMethod.POST)
+	public Result findEnteringAudit(CustomerListOut clo,Integer pageNo, Integer pageSize){
+		Result res = new Result();
+		res.setData(customerService.findEnteringAudit(clo, pageNo, pageSize));
+		return res;
+	}
+	
+	/** 修改客户录入审核状态 **/
+	@RequestMapping(value = "/updateEnteringAudit", method = RequestMethod.POST)
+	public Result updateEnteringAudit(User bo){
+		Result res = new Result();
+		if(StringUtils.isBlank(bo.getId())){
+			res.getError().add(buildError(ErrorConstants.PARAM_ERROR,""));
+			return res;
+		}
+		customerService.updateEnteringAudit(bo);
+		return res;
+	}
+	
+	/** 审核拒绝客户查询 **/
+	@RequestMapping(value = "/findEnteringAuditIsNo" , method = RequestMethod.POST)
+	public Result findEnteringAuditIsNo(CustomerListOut clo,Integer pageNo, Integer pageSize){
+		Result res = new Result();
+		res.setData(customerService.findEnteringAuditIsNo(clo, pageNo, pageSize));
+		return res;
+	}
 }

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

@@ -6,6 +6,7 @@ import java.util.List;
 import java.util.Set;
 
 import com.goafanti.common.error.BusinessException;
+import com.goafanti.common.model.Admin;
 import com.goafanti.common.model.OrganizationContactBook;
 import com.goafanti.common.model.User;
 import com.goafanti.common.model.UserBusiness;
@@ -52,6 +53,15 @@ public interface CustomerService {
 	Pagination<CustomerListOut> listAllPersonalCustomer(CustomerListIn cli, Integer pageNo, Integer pageSize);
 	
 	/**
+	 * 管理个人客户查询(所属人同部门客户管理)
+	 * @param cin
+	 * @param pageSize
+	 * @param pageNumber
+	 * @return
+	 */
+	Pagination<CustomerListOut> listAllManagePersonalCustomer(CustomerListIn cli, Integer pageNo, Integer pageSize);
+	
+	/**
 	 * 私有单位客户列表查询
 	 * @param cin
 	 * @param pageSize
@@ -78,6 +88,15 @@ public interface CustomerService {
 	 * @return
 	 */
 	Pagination<CustomerListOut> listAllOrganizationCustomer(CustomerListIn cli, Integer pageNo, Integer pageSize);
+	
+	/**
+	 * 管理单位客户列表查询
+	 * @param cin
+	 * @param pageSize
+	 * @param pageNumber
+	 * @return
+	 */
+	Pagination<CustomerListOut> listAllManageOrganizationCustomer(CustomerListIn cli, Integer pageNo, Integer pageSize);
 
 	/**
 	 * 使用客户名检索客户
@@ -270,6 +289,13 @@ public interface CustomerService {
 	Pagination<BusinessListBo> listAllBusiness(BusinessListBo blo, Integer pageNo, Integer pageSize);
 	
 	/**
+	 * 业务管理列表
+	 * @param blo
+	 * @return
+	 */
+	Pagination<BusinessListBo> listManageBusiness(BusinessListBo blo,Integer pageNo,Integer pageSize);
+	
+	/**
 	 *  意向字典
 	 * @return
 	 */
@@ -366,4 +392,14 @@ public interface CustomerService {
 	 * @return
 	 */
 	int deleteOneContact(String ocbId);
+	
+	List<Admin> findAdminName();
+	
+	int updatePersonalCustomerz(CustomerPersonalDetailBo bo);
+	
+	Pagination<CustomerListOut> findEnteringAudit(CustomerListOut clo, Integer pageNo, Integer pageSize);
+	
+	Pagination<CustomerListOut> findEnteringAuditIsNo(CustomerListOut clo, Integer pageNo, Integer pageSize);
+	
+	int updateEnteringAudit(User bo);
 }

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

@@ -36,6 +36,7 @@ import com.goafanti.common.enums.MemberStatus;
 import com.goafanti.common.enums.UserLevel;
 import com.goafanti.common.enums.UserType;
 import com.goafanti.common.error.BusinessException;
+import com.goafanti.common.model.Admin;
 import com.goafanti.common.model.OrganizationContactBook;
 import com.goafanti.common.model.OrganizationIdentity;
 import com.goafanti.common.model.User;
@@ -96,7 +97,7 @@ public class CustomerServiceImpl  extends BaseMybatisDao<UserMapper> implements
 	@Override
 	public Pagination<CustomerListOut> listPublicPersonalCustomer(CustomerListIn cli, Integer pageNo,Integer pageSize) {
 		cli.setType(AFTConstants.USER_TYPE_PERSONAL);
-		cli.setAid(TokenManager.getAdminId());
+		/*cli.setAid(TokenManager.getAdminId());*/
 		cli.setShareType(String.valueOf(AFTConstants.USER_SHARE_PUBLIC));
 		Map<String,Object> params = disposeParams(cli);
 		@SuppressWarnings("unchecked")
@@ -108,10 +109,21 @@ public class CustomerServiceImpl  extends BaseMybatisDao<UserMapper> implements
 	public Pagination<CustomerListOut> listAllPersonalCustomer(CustomerListIn cli, Integer pageNo, Integer pageSize) {
 		cli.setType(AFTConstants.USER_TYPE_PERSONAL);
 		Map<String,Object> params = disposeParams(cli);
+		if(null!=cli.getExpertAudit())params.put("expertAudit", cli.getExpertAudit());
 		@SuppressWarnings("unchecked")
 		Pagination<CustomerListOut> list = (Pagination<CustomerListOut>) findPage("selectPersonalCustomerList","selectPersonalCustomerCount",params,pageNo,pageSize);
 		return list;
 	}
+	
+	@Override
+	public Pagination<CustomerListOut> listAllManagePersonalCustomer(CustomerListIn cli, Integer pageNo, Integer pageSize) {
+		cli.setType(AFTConstants.USER_TYPE_PERSONAL);
+		cli.setShareType(String.valueOf(AFTConstants.USER_SHARE_PRIVATE));
+		Map<String,Object> params = disposeParams(cli);
+		@SuppressWarnings("unchecked")
+		Pagination<CustomerListOut> list = (Pagination<CustomerListOut>) findPage("selectManagePersonalCustomerList","selectManagePersonalCustomerCount",params,pageNo,pageSize);
+		return list;
+	}
 
 	@Override
 	public Pagination<CustomerListOut> listPrivateOrganizationCustomer(CustomerListIn cli, Integer pageNo,Integer pageSize) {
@@ -127,7 +139,7 @@ public class CustomerServiceImpl  extends BaseMybatisDao<UserMapper> implements
 	@Override
 	public Pagination<CustomerListOut> listPublicOrganizationCustomer(CustomerListIn cli, Integer pageNo,Integer pageSize) {
 		cli.setType(AFTConstants.USER_TYPE_ORGANIZATION);
-		cli.setAid(TokenManager.getAdminId());
+		/*cli.setAid(TokenManager.getAdminId());*/
 		cli.setShareType(String.valueOf(AFTConstants.USER_SHARE_PUBLIC));
 		Map<String,Object> params = disposeParams(cli);
 		@SuppressWarnings("unchecked")
@@ -143,6 +155,16 @@ public class CustomerServiceImpl  extends BaseMybatisDao<UserMapper> implements
 		Pagination<CustomerListOut> list = (Pagination<CustomerListOut>) findPage("selectOrganizationCustomerList","selectOrganizationCustomerCount",params,pageNo,pageSize);
 		return list;
 	}
+	
+	@Override
+	public Pagination<CustomerListOut> listAllManageOrganizationCustomer(CustomerListIn cli, Integer pageNo,Integer pageSize) {
+		cli.setType(AFTConstants.USER_TYPE_ORGANIZATION);
+		cli.setShareType(String.valueOf(AFTConstants.USER_SHARE_PRIVATE));
+		Map<String,Object> params = disposeParams(cli);
+		@SuppressWarnings("unchecked")
+		Pagination<CustomerListOut> list = (Pagination<CustomerListOut>) findPage("selectManageOrganizationCustomerList","selectManageOrganizationCustomerCount",params,pageNo,pageSize);
+		return list;
+	}
 
 	private Map<String,Object> disposeParams(CustomerListIn cli){
 		Map<String,Object> params = new HashMap<String, Object>();
@@ -295,6 +317,7 @@ public class CustomerServiceImpl  extends BaseMybatisDao<UserMapper> implements
 			user.setIntroduction(bo.getIntroduction());
 			user.setUpdateTime(new Date());
 			user.setBusinessAudit(bo.getBusinessAudit());
+			if(null==bo.getExpertAudit()&&bo.getExpert()==1)ui.setExpertAudit(2);
 		} catch (InvocationTargetException | IllegalAccessException e) {
 			e.printStackTrace();
 		}
@@ -737,6 +760,13 @@ public class CustomerServiceImpl  extends BaseMybatisDao<UserMapper> implements
 		return (Pagination<BusinessListBo>) findPage("selectBusinessList", "selectBusinessCount", disposeParams(blo), pageNo, pageSize);
 	}
 	
+	@SuppressWarnings("unchecked")
+	@Override
+	public Pagination<BusinessListBo> listManageBusiness(BusinessListBo blo,Integer pageNo,Integer pageSize) {
+		blo.setAid(TokenManager.getAdminId());
+		return (Pagination<BusinessListBo>) findPage("selectBusinessManageList", "selectBusinessManageCount", disposeParams(blo), pageNo, pageSize);
+	}
+	
 	private Map<String,Object> disposeParams(BusinessListBo blo){
 		Map<String, Object> params = new HashMap<String, Object>();
 		if(StringUtils.isNotBlank(blo.getUid())) params.put("uid", blo.getUid());
@@ -919,5 +949,62 @@ public class CustomerServiceImpl  extends BaseMybatisDao<UserMapper> implements
 	public int deleteOneContact(String ocbId) {
 		return organizationContactBookMapper.deleteByPrimaryKey(ocbId);
 	}
+
+	@Override
+	public List<Admin> findAdminName() {
+		String aid=TokenManager.getAdminId();
+		return userMapper.findAdminName(aid);
+	}
+	
+	@Override
+	public int updatePersonalCustomerz(CustomerPersonalDetailBo bo) {
+		UserIdentity ui = new UserIdentity();
+		User user = new User();
+		try {
+			BeanUtilsExt.copyProperties(ui, bo);
+			user.setId(bo.getUid());
+			user.setSocietyTag(bo.getSocietyTag());
+			user.setHeadPortraitUrl(bo.getHeadPortraitUrl());
+			user.setIntroduction(bo.getIntroduction());
+			user.setUpdateTime(new Date());
+			user.setBusinessAudit(bo.getBusinessAudit());
+			if(!StringUtils.isBlank(bo.getAid())){
+				user.setAid(bo.getAid());
+				user.setShareType(0);
+			}
+		} catch (InvocationTargetException | IllegalAccessException e) {
+			e.printStackTrace();
+		}
+		userMapper.updateByPrimaryKeySelective(user);
+		return 1;
+	}
+
+	@Override
+	public Pagination<CustomerListOut> findEnteringAudit(CustomerListOut clo, Integer pageNo, Integer pageSize) {
+		Map<String,Object> params = disposeParams(clo);
+		if(!StringUtils.isBlank(clo.getAdminName()))params.put("adminName", clo.getAdminName());
+		@SuppressWarnings("unchecked")
+		Pagination<CustomerListOut> list = (Pagination<CustomerListOut>) findPage("findEnteringAuditList","findEnteringAuditCount",params,pageNo,pageSize);
+		return list;
+	}
+	
+	@Override
+	public Pagination<CustomerListOut> findEnteringAuditIsNo(CustomerListOut clo, Integer pageNo, Integer pageSize) {
+		clo.setAid(TokenManager.getAdminId());
+		Map<String,Object> params = disposeParams(clo);
+		if(!StringUtils.isBlank(clo.getAdminName()))params.put("adminName", clo.getAdminName());
+		@SuppressWarnings("unchecked")
+		Pagination<CustomerListOut> list = (Pagination<CustomerListOut>) findPage("findEnteringAuditIsNoList","findEnteringAuditIsNoCount",params,pageNo,pageSize);
+		return list;
+	}
+
+	@Override
+	public int updateEnteringAudit(User bo) {
+		String id=bo.getId();
+		Integer auditStatus=bo.getAuditStatus();
+		String auditOpinion=bo.getAuditOpinion();
+		return userMapper.updateEnteringAudit(id,auditStatus,auditOpinion);
+	}
+	
 	
 }

+ 1 - 2
src/main/java/com/goafanti/demand/bo/DemandListBo.java

@@ -224,7 +224,6 @@ public class DemandListBo {
 		this.status = status;
 	}
 
-	@JsonFormat(shape = Shape.STRING)
 	public Integer getReleaseStatus() {
 		return releaseStatus;
 	}
@@ -379,7 +378,7 @@ public class DemandListBo {
 		if (this.createTime == null) {
 			return null;
 		} else {
-			return DateFormatUtils.format(this.getCreateTime(), AFTConstants.YYYYMMDD);
+			return DateFormatUtils.format(this.getCreateTime(), AFTConstants.YYYYMMDDHHMMSS);
 		}
 	}
 

+ 13 - 0
src/main/java/com/goafanti/demand/bo/DemandManageListBo.java

@@ -35,6 +35,19 @@ public class DemandManageListBo extends DemandListBo {
 	 */
 	private String	techBrokerId;
 	
+	/**
+	 * 技术经纪人idd
+	 */
+	private String	techBrokerIdd;
+	
+	public String getTechBrokerIdd() {
+		return techBrokerIdd;
+	}
+
+	public void setTechBrokerIdd(String techBrokerIdd) {
+		this.techBrokerIdd = techBrokerIdd;
+	}
+
 	public String getTechBrokerId() {
 		return techBrokerId;
 	}

+ 65 - 9
src/main/java/com/goafanti/demand/controller/AdminDemandApiController.java

@@ -214,7 +214,7 @@ public class AdminDemandApiController extends CertifyApiController {
 	}
 
 	/**
-	 * 组织用户--需求列表
+	 * 组织用户--需求列表(个人组织合并)
 	 */
 	@RequestMapping(value = "/orgList", method = RequestMethod.GET)
 	public Result orgList(Integer dataCategory,String employerName, Integer auditStatus, Integer province, Integer serialNumber, String name, String keyword,
@@ -307,18 +307,23 @@ public class AdminDemandApiController extends CertifyApiController {
 	}
 
 	/**
-	 * 组织用户详情
+	 * 组织用户详情(个人组织合并)
 	 */
 	@RequestMapping(value = "/orgDemandDetail", method = RequestMethod.GET)
-	public Result orgDemandDetail(String id) {
+	public Result orgDemandDetail(String id,int dataCategory) {
 		Result res = new Result();
 
 		if (StringUtils.isBlank(id)) {
 			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "找不到需求ID", "需求ID"));
 			return res;
 		}
-
-		res.setData(demandService.selectOrgDemandDetail(id));
+		if(dataCategory==0){
+			res.setData(demandService.selectUserDemandDetail(id));
+			return res;
+		}else if(dataCategory==1){
+			res.setData(demandService.selectOrgDemandDetail(id));
+			return res;
+		}
 		return res;
 	}
 
@@ -483,7 +488,7 @@ public class AdminDemandApiController extends CertifyApiController {
 	 * 需求撤消发布(下架)
 	 */
 	@RequestMapping(value = "/offShelf", method = RequestMethod.POST)
-	public Result offShelf(String id) {
+	public Result offShelf(String id,Integer releaseStatus) {
 		Result res = new Result();
 		if (StringUtils.isBlank(id)) {
 			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "找不到需求ID", "需求ID"));
@@ -496,7 +501,7 @@ public class AdminDemandApiController extends CertifyApiController {
 			res.getError().add(buildError(ErrorConstants.PARAM_ERROR, "", "需求ID"));
 			return res;
 		}
-
+		d.setReleaseStatus(releaseStatus);
 		res.setData(demandService.updateReleaseStatus(d));
 		return res;
 	}
@@ -551,13 +556,16 @@ public class AdminDemandApiController extends CertifyApiController {
 			return res;
 		}
 
-		if (!DemandDataCategory.USERDEMAND.getCode().equals(demand.getDataCategory())
+		/*if (!DemandDataCategory.USERDEMAND.getCode().equals(demand.getDataCategory())
 				&& !DemandDataCategory.ORGDEMAND.getCode().equals(demand.getDataCategory())) {
 			res.getError().add(buildError(ErrorConstants.PARAM_ERROR, "", "数据类型"));
 			return res;
+		}*/
+		if (null == demand.getDataCategory()) {
+			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "找不到需求类型", "需求类别"));
+			return res;
 		}
 
-
 		if (StringUtils.isBlank(demand.getKeyword())) {
 			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "找不到关键词", "关键词"));
 			return res;
@@ -652,5 +660,53 @@ public class AdminDemandApiController extends CertifyApiController {
 		res.setData(data);
 		return res;
 	}
+	
+	/**
+	 * 我的需求列表
+	 */
+	@RequestMapping(value = "/myList", method = RequestMethod.GET)
+	public Result myList(Integer dataCategory,String employerName, Integer auditStatus, Integer province, Integer serialNumber, String name, String keyword,
+			Integer infoSources, Integer demandType, String validityPeriodStartDate, String validityPeriodEndDate,
+			String unitName, Integer status, Integer releaseStatus, String releaseDateStartDate,
+			String releaseDateEndDate,String createDateStartDate, String createDateEndDate, String pageNo, String pageSize,Integer boutique,Integer hot) {
+		Result res = new Result();
+		Integer pNo = 1;
+		Integer pSize = 10;
+		if (StringUtils.isNumeric(pageSize)) {
+			pSize = Integer.parseInt(pageSize);
+		}
+
+		if (StringUtils.isNumeric(pageNo)) {
+			pNo = Integer.parseInt(pageNo);
+		}
+		res.setData(demandService.selectMyDemandManageList(dataCategory,employerName, auditStatus, province, serialNumber, name, keyword,
+				infoSources, demandType, validityPeriodStartDate, validityPeriodEndDate, unitName, status,
+				releaseStatus, releaseDateStartDate, releaseDateEndDate, createDateStartDate,  createDateEndDate, pNo, pSize,boutique,hot,TokenManager.getAdminId()));
+		return res;
+	}
+	
+	/**
+	 * 科技需管理求列表
+	 */
+	@RequestMapping(value = "/manageList", method = RequestMethod.GET)
+	public Result manageList(Integer dataCategory,String employerName, Integer auditStatus, Integer province, Integer serialNumber, String name, String keyword,
+			Integer infoSources, Integer demandType, String validityPeriodStartDate, String validityPeriodEndDate,
+			String unitName, Integer status, Integer releaseStatus, String releaseDateStartDate,
+			String releaseDateEndDate,String createDateStartDate, String createDateEndDate, String pageNo, String pageSize,Integer boutique,Integer hot) {
+		Result res = new Result();
+		Integer pNo = 1;
+		Integer pSize = 10;
+		if (StringUtils.isNumeric(pageSize)) {
+			pSize = Integer.parseInt(pageSize);
+		}
+
+		if (StringUtils.isNumeric(pageNo)) {
+			pNo = Integer.parseInt(pageNo);
+		}
+		res.setData(demandService.selectManageDemandManageList(dataCategory,employerName, auditStatus, province, serialNumber, name, keyword,
+				infoSources, demandType, validityPeriodStartDate, validityPeriodEndDate, unitName, status,
+				releaseStatus, releaseDateStartDate, releaseDateEndDate, createDateStartDate,  createDateEndDate, pNo, pSize,boutique,hot,TokenManager.getAdminId()));
+		return res;
+	}
 
 }

+ 12 - 0
src/main/java/com/goafanti/demand/service/DemandService.java

@@ -94,5 +94,17 @@ public interface DemandService {
 
 	Pagination<DemandSearchListBo> listMyDemand(Integer pNo, Integer pSize);
 
+
+	int saveAppUserDemand(Demand d, String validityPeriodFormattedDate, String[] keywords);
+
+
+	Pagination<DemandManageListBo> selectMyDemandManageList(Integer dataCategory,String employerName, Integer auditStatus, Integer province, Integer serialNumber,
+			String name, String keyword, Integer infoSources, Integer demandType, String validityPeriodStartDate,
+			String validityPeriodEndDate, String username, Integer status, Integer releaseStatus,
+			String releaseDateStartDate, String releaseDateEndDate,String createDateStartDate, String createDateEndDate, Integer pNo, Integer pSize,Integer boutique,Integer hot,String techBrokerId);
 	
+	Pagination<DemandManageListBo> selectManageDemandManageList(Integer dataCategory,String employerName, Integer auditStatus, Integer province, Integer serialNumber,
+			String name, String keyword, Integer infoSources, Integer demandType, String validityPeriodStartDate,
+			String validityPeriodEndDate, String username, Integer status, Integer releaseStatus,
+			String releaseDateStartDate, String releaseDateEndDate,String createDateStartDate, String createDateEndDate, Integer pNo, Integer pSize,Integer boutique,Integer hot,String techBrokerId);
 }

+ 141 - 8
src/main/java/com/goafanti/demand/service/impl/DemandServiceImpl.java

@@ -197,9 +197,9 @@ public class DemandServiceImpl extends BaseMybatisDao<DemandMapper> implements D
 			params.put("dataCategory", dataCategory);
 		}
 
-		if (!TokenManager.hasRole(AFTConstants.SUPERADMIN) && !TokenManager.hasRole(AFTConstants.AUDITORADMIN)) {
+		/*if (!TokenManager.hasRole(AFTConstants.SUPERADMIN) && !TokenManager.hasRole(AFTConstants.AUDITORADMIN)) {
 			params.put("adminId", TokenManager.getAdminId());
-		}
+		}*/
 
 		if (StringUtils.isNotBlank(employerName)) {
 			params.put("employerName", employerName);
@@ -329,10 +329,15 @@ public class DemandServiceImpl extends BaseMybatisDao<DemandMapper> implements D
 
 	@Override
 	public int updateReleaseStatus(Demand d) {
-		d.setAuditStatus(DemandAuditStatus.CREATE.getCode());
-		d.setReleaseStatus(DemandReleaseStatus.UNRELEASE.getCode());
+		d.setAuditStatus(DemandAuditStatus.AUDITED.getCode());
+		if(d.getReleaseStatus()==1){
+			Calendar now = Calendar.getInstance();
+			now.set(Calendar.MILLISECOND, 0);
+			d.setReleaseDate(now.getTime());
+		}
 		d.setStatus(DemandStatus.UNRESOLVED.getCode());
-		demandMapper.updateByPrimaryKeySelective(d);
+		int i=0;
+		i=demandMapper.updateByPrimaryKeySelective(d);
 		demandKeywordMapper.batchDeleteByDemandId(d.getId());
 		achievementDemandMapper.deleteByDemandId(d.getId());
 		if (StringUtils.isNotBlank(d.getEmployerId())) {
@@ -345,7 +350,7 @@ public class DemandServiceImpl extends BaseMybatisDao<DemandMapper> implements D
 				achievementDemandCountMapper.updateByPrimaryKeySelective(adc);
 			}
 		}
-		return demandMapper.updateReleaseDate(d.getId());
+		return i;
 
 	}
 
@@ -356,7 +361,7 @@ public class DemandServiceImpl extends BaseMybatisDao<DemandMapper> implements D
 			Calendar now = Calendar.getInstance();
 			now.set(Calendar.MILLISECOND, 0);
 			d.setReleaseDate(now.getTime());
-			d.setReleaseStatus(DemandReleaseStatus.RELEASED.getCode());
+			d.setReleaseStatus(DemandReleaseStatus.UNRELEASE.getCode());
 			d.setTechBrokerId(techBroderId);
 
 			if (StringUtils.isNotBlank(d.getKeyword())) {
@@ -806,7 +811,7 @@ public class DemandServiceImpl extends BaseMybatisDao<DemandMapper> implements D
 		int i=demandMapper.countInterest(d.getId());
 		d.setCountInterest(String.valueOf(i));
 		String uid=TokenManager.getUserId();
-		if(StringUtils.isNotBlank(TokenManager.getUserId())&&demandInterestMapper.checkUidAndDid(uid,id)>0){
+		if(TokenManager.isLogin()&&demandInterestMapper.checkUidAndDid(uid,id)>0){
 			d.setInterest("1");//已关注
 		}else {
 			d.setInterest("0");//未关注
@@ -945,7 +950,135 @@ public class DemandServiceImpl extends BaseMybatisDao<DemandMapper> implements D
 		return (Pagination<DemandSearchListBo>) findPage("findAppMyDemandListByPage", "findAppMyDemandCount", params, pNo, pSize);
 	}
 
+
+	public int saveAppUserDemand(Demand d, String validityPeriodFormattedDate, String[] keywords) {
+		Date validityPeriod = null;
+		if (!StringUtils.isBlank(validityPeriodFormattedDate)) {
+			try {
+				validityPeriod = DateUtils.parseDate(validityPeriodFormattedDate, AFTConstants.YYYYMMDD);
+			} catch (ParseException e) {
+			}
+		}
+		d.setInfoSources(1);
+		if (null!=TokenManager.getUserId()) {
+			d.setEmployerId(TokenManager.getUserId());
+			User u=userMapper.selectByPrimaryKey(TokenManager.getUserId());
+			if (null!=u.getType()) {
+				d.setDataCategory(u.getType());
+			}
+			if (StringUtils.isNotBlank(u.getId())) {
+				d.setEmployerId(u.getId());
+			}
+			
+			if (StringUtils.isNotBlank(u.getMobile())) {
+				d.setEmployerContactsMobile(u.getMobile());
+			}
+		}
+		d.setValidityPeriod(validityPeriod);
+		
+		d.setId(UUID.randomUUID().toString());
+		d.setTechBrokerId(TokenManager.getAdminId());
+
+		d.setDeletedSign(DeleteStatus.UNDELETE.getCode());
+
+		Calendar now = Calendar.getInstance();
+		now.set(Calendar.MILLISECOND, 0);
+		d.setStatus(DemandStatus.UNRESOLVED.getCode());
+		d.setReleaseStatus(DemandReleaseStatus.UNRELEASE.getCode());
+		d.setPrincipalId(TokenManager.getAdminId());
+		d.setAuditStatus(DemandAuditStatus.INAUDIT.getCode());
+		createAuditorNotice(d);
+		if (null==d.getKeyword()) {
+			d.setKeyword("");
+		}
+		d.setCreateTime(now.getTime());
+		//disposeDemandKeyword(keywords, d, false);
+		return demandMapper.insert(d);
+	}
+
+
+	@SuppressWarnings("unchecked")
+	@Override
+	public Pagination<DemandManageListBo> selectMyDemandManageList(Integer dataCategory,String employerName, Integer auditStatus,
+			Integer province, Integer serialNumber, String name, String keyword, Integer infoSources,
+			Integer demandType, String validityPeriodStartDate, String validityPeriodEndDate, String username,
+			Integer status, Integer releaseStatus, String releaseDateStartDate, String releaseDateEndDate,String createDateStartDate, String createDateEndDate, Integer pNo,
+			Integer pSize, Integer boutique, Integer hot, String techBrokerId) {
+		Map<String, Object> params = disposeParams(auditStatus, province, serialNumber, name, keyword, infoSources,
+				demandType, validityPeriodStartDate, validityPeriodEndDate, username, status, releaseStatus,
+				releaseDateStartDate, releaseDateEndDate, createDateStartDate,  createDateEndDate, boutique, hot);
+
+		if (pNo == null || pNo < 0) {
+			pNo = 1;
+		}
+
+		if (pSize == null || pSize < 0 || pSize > 10) {
+			pSize = 10;
+		}
+		if (null != dataCategory) {
+			params.put("dataCategory", dataCategory);
+		}
+
+		if (!TokenManager.hasRole(AFTConstants.SUPERADMIN) && !TokenManager.hasRole(AFTConstants.AUDITORADMIN)) {
+			params.put("adminId", TokenManager.getAdminId());
+		}
+
+		if (StringUtils.isNotBlank(employerName)) {
+			params.put("employerName", employerName);
+		}
+
+		if (StringUtils.isNotBlank(username)) {
+			params.put("unitName", username);
+		}
+		if (null != techBrokerId) {
+			params.put("techBrokerId", techBrokerId);
+		}
+
+		return (Pagination<DemandManageListBo>) findPage("findMyDemandListByPage", "findMyDemandCount",
+				params, pNo, pSize);
+	}
+	
 	
+	@SuppressWarnings("unchecked")
+	@Override
+	public Pagination<DemandManageListBo> selectManageDemandManageList(Integer dataCategory,String employerName, Integer auditStatus,
+			Integer province, Integer serialNumber, String name, String keyword, Integer infoSources,
+			Integer demandType, String validityPeriodStartDate, String validityPeriodEndDate, String username,
+			Integer status, Integer releaseStatus, String releaseDateStartDate, String releaseDateEndDate,String createDateStartDate, String createDateEndDate, Integer pNo,
+			Integer pSize, Integer boutique, Integer hot, String techBrokerId) {
+		Map<String, Object> params = disposeParams(auditStatus, province, serialNumber, name, keyword, infoSources,
+				demandType, validityPeriodStartDate, validityPeriodEndDate, username, status, releaseStatus,
+				releaseDateStartDate, releaseDateEndDate, createDateStartDate,  createDateEndDate, boutique, hot);
+
+		if (pNo == null || pNo < 0) {
+			pNo = 1;
+		}
+
+		if (pSize == null || pSize < 0 || pSize > 10) {
+			pSize = 10;
+		}
+		if (null != dataCategory) {
+			params.put("dataCategory", dataCategory);
+		}
+
+		if (!TokenManager.hasRole(AFTConstants.SUPERADMIN) && !TokenManager.hasRole(AFTConstants.AUDITORADMIN)) {
+			params.put("adminId", TokenManager.getAdminId());
+		}
+
+		if (StringUtils.isNotBlank(employerName)) {
+			params.put("employerName", employerName);
+		}
+
+		if (StringUtils.isNotBlank(username)) {
+			params.put("unitName", username);
+		}
+		if (null != techBrokerId) {
+			params.put("techBrokerId", techBrokerId);
+		}
+
+		return (Pagination<DemandManageListBo>) findPage("findManageDemandListByPage", "findManagegDemandCount",
+				params, pNo, pSize);
+	}
 		
 	
 }

+ 1 - 1
src/main/java/com/goafanti/message/service/impl/MessageServiceImpl.java

@@ -356,7 +356,7 @@ public class MessageServiceImpl  extends BaseMybatisDao<MessageFromSystemMapper>
 		}else if(TokenManager.getToken()  instanceof User){
 			return messageFromSystemMapper.selectMessageWithGroup(TokenManager.getUserId());
 		}
-		return null;
+		return new IndexBo();
 	}
 
 	@SuppressWarnings("unchecked")

+ 26 - 0
src/main/java/com/goafanti/news/bo/InputNews.java

@@ -45,6 +45,32 @@ public class InputNews {
 	private Integer provinceId;
 	
 	private String	content;
+	
+	/**
+	 * 审核状态
+	 */
+	private Integer auditStatus;
+	
+	/**
+	 * 是否发布
+	 */
+	private Integer releaseStatus;
+
+	public Integer getAuditStatus() {
+		return auditStatus;
+	}
+
+	public void setAuditStatus(Integer auditStatus) {
+		this.auditStatus = auditStatus;
+	}
+
+	public Integer getReleaseStatus() {
+		return releaseStatus;
+	}
+
+	public void setReleaseStatus(Integer releaseStatus) {
+		this.releaseStatus = releaseStatus;
+	}
 
 	public Long getId() {
 		return id;

+ 26 - 0
src/main/java/com/goafanti/news/bo/NewsSummary.java

@@ -48,6 +48,16 @@ public class NewsSummary {
 	 * 来源
 	 */
 	private String	source;
+	
+	/**
+	 * 审核状态
+	 */
+	private Integer auditStatus;
+	
+	/**
+	 * 是否发布
+	 */
+	private Integer releaseStatus;
 
 	@JsonFormat(shape = Shape.STRING)
 	public Long getId() {
@@ -58,6 +68,22 @@ public class NewsSummary {
 		this.id = id;
 	}
 
+	public Integer getAuditStatus() {
+		return auditStatus;
+	}
+
+	public void setAuditStatus(Integer auditStatus) {
+		this.auditStatus = auditStatus;
+	}
+
+	public Integer getReleaseStatus() {
+		return releaseStatus;
+	}
+
+	public void setReleaseStatus(Integer releaseStatus) {
+		this.releaseStatus = releaseStatus;
+	}
+
 	public Date getCreateTime() {
 		return createTime;
 	}

+ 2 - 2
src/main/java/com/goafanti/news/controller/AdminNewsApiController.java

@@ -46,7 +46,7 @@ public class AdminNewsApiController extends BaseApiController {
 	 */
 	@RequestMapping(value = "/list", method = RequestMethod.GET)
 	public Result list(Integer type, String title, String author, String startCreateTime, String endCreateTime,
-			String source, Integer hot, String pageSize, String pageNo) {
+			String source, Integer hot, String pageSize, String pageNo,String auditStatus,String releaseStatus) {
 		Result res = new Result();
 		if (null == type) {
 			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "", "新闻类型"));
@@ -60,7 +60,7 @@ public class AdminNewsApiController extends BaseApiController {
 		if (StringUtils.isNumeric(pageNo)) {
 			pNo = Integer.parseInt(pageNo);
 		}
-		res.setData(newsService.listNews(type, title, author, startCreateTime, endCreateTime, source, hot, pNo, pSize));
+		res.setData(newsService.listNews(type, title, author, startCreateTime, endCreateTime, source, hot, pNo, pSize,auditStatus,releaseStatus));
 		return res;
 	}
 

+ 9 - 1
src/main/java/com/goafanti/news/service/NewsService.java

@@ -96,8 +96,16 @@ public class NewsService extends BaseMybatisDao<NewsMapper> {
 
 	@SuppressWarnings("unchecked")
 	public Pagination<News> listNews(Integer type, String title, String author, String startCreateTime,
-			String endCreateTime, String source, Integer hot, Integer pNo, Integer pSize) {
+			String endCreateTime, String source, Integer hot, Integer pNo, Integer pSize,String auditStatus,String releaseStatus) {
 		Map<String, Object> params = new HashMap<>();
+		if (null != auditStatus) {
+			params.put("auditStatus", auditStatus);
+		}
+		
+		if (null != releaseStatus) {
+			params.put("releaseStatus", releaseStatus);
+		}
+		
 		if (null != type) {
 			params.put("type", type);
 		}

+ 3 - 0
src/main/java/com/goafanti/portal/controller/PortalNewsController.java

@@ -158,6 +158,9 @@ public class PortalNewsController extends BaseController {
 	@RequestMapping(value = "/portal/news/appCognizance", method = RequestMethod.GET)
 	public ModelAndView appCognizance(HttpServletRequest request, ModelAndView modelview,String id) {
 		ProjectDetailBo bo = businessProjectService.orgProject(id);
+		bo.setIntroduce(bo.getIntroduce().replace("\n", "</br>"));
+		bo.setValueEffect(bo.getValueEffect().replace("\n", "</br>"));
+		bo.setClientSize(bo.getClientSize().replace("\n", "</br>"));
 		modelview.addObject("bo", bo);
 		modelview.setViewName("/portal/news/appCognizance");
 		return modelview;

+ 79 - 0
src/main/java/com/goafanti/portal/controller/PortalServicesController.java

@@ -0,0 +1,79 @@
+package com.goafanti.portal.controller;
+
+
+
+import javax.annotation.Resource;
+
+
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.bind.annotation.RestController;
+
+import com.goafanti.business.service.BusinessProjectService;
+import com.goafanti.business.service.BusinessVarietiesService;
+import com.goafanti.common.bo.Result;
+import com.goafanti.common.constant.ErrorConstants;
+import com.goafanti.common.controller.BaseController;
+import com.goafanti.common.utils.StringUtils;
+import com.goafanti.order.service.OrderService;
+import com.goafanti.user.service.UserIdentityService;
+
+@RestController
+@RequestMapping(value = "/portal/app/services")
+public class PortalServicesController extends BaseController {
+	@Resource
+	BusinessProjectService	businessProjectService;
+	@Resource
+	UserIdentityService	userIdentityService;
+	@Resource
+	BusinessVarietiesService	businessVarietiesService;
+	@Resource
+	OrderService	orderService;
+	
+	
+	
+	/**
+	 * 推荐列表
+	 */
+	@RequestMapping(value = "/recommend", method = RequestMethod.GET)
+	public Result recommendProjectList(Integer pNo,Integer pSize) {
+		Result res = new Result();
+		res.setData(businessProjectService.portalRecommendList( pNo, pSize));
+		return res;
+	}
+	
+	/**
+	 * 一对一
+	 */
+	@RequestMapping(value = "/consultant", method = RequestMethod.GET)
+	public Result consultantList(Integer pNo,Integer pSize) {
+		Result res = new Result();
+		res.setData(userIdentityService.portalConsultantList( pNo, pSize));
+		return res;
+	}
+	
+	/**
+	 * 获取初级品类
+	 */
+	@RequestMapping(value = "/portal/services/varieties", method = RequestMethod.GET)
+	public Result getVarieties() {
+		Result res = new Result();
+		res.setData(businessVarietiesService.portalVarieties());
+		return res;
+	}
+	
+	/**
+	 * 获取品类下的项目
+	 */
+	@RequestMapping(value = "/businessProject", method = RequestMethod.GET)
+	public Result getBusinessProject(String id,Integer pNo,Integer pSize) {
+		Result res = new Result();
+		if (StringUtils.isBlank(id)) {
+			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"品类必须指定","品类"));
+			return res;
+		}
+		res.setData(businessProjectService.portalBusinessProject(id,pNo, pSize));
+		return res;
+	}
+	
+}

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

@@ -17,7 +17,6 @@ import org.springframework.web.bind.annotation.RequestMethod;
 import org.springframework.web.bind.annotation.ResponseBody;
 
 import com.alibaba.fastjson.JSONObject;
-import com.aliyuncs.http.HttpRequest;
 import com.goafanti.admin.service.AdminService;
 import com.goafanti.common.bo.Result;
 import com.goafanti.common.constant.AFTConstants;
@@ -58,7 +57,7 @@ public class UserRegisterController extends BaseController {
 	 */
 	@RequestMapping(value = "/register", method = RequestMethod.POST)
 	@ResponseBody
-	public Result register(@Valid InputUser user, String mobileCode,BindingResult bindingResult,HttpRequest req) {
+	public Result register(@Valid InputUser user, String mobileCode,BindingResult bindingResult) {
 		Result res = new Result();
 		if (bindingResult.hasErrors()) {
 			res.getError().add(buildErrorByMsg(bindingResult.getFieldError().getDefaultMessage(),
@@ -127,7 +126,7 @@ public class UserRegisterController extends BaseController {
 	 */
 	@RequestMapping(value = "/mregister", method = RequestMethod.POST)
 	@ResponseBody
-	public Result mRegister(@Valid InputUser user, String mobileCode,String uuid,BindingResult bindingResult,HttpRequest req) {
+	public Result mRegister(@Valid InputUser user, String mobileCode,String uuid,BindingResult bindingResult) {
 		Result res = new Result();
 		if (bindingResult.hasErrors()) {
 			res.getError().add(buildErrorByMsg(bindingResult.getFieldError().getDefaultMessage(),

+ 5 - 0
src/main/java/com/goafanti/user/service/UserIdentityService.java

@@ -52,4 +52,9 @@ public interface UserIdentityService {
 	 consultantListBo consultantDetail(String id);
 	 
 	 List<AdvertisingBo> advertising();
+
+	 Pagination<consultantListBo> portalConsultantList(Integer pNo, Integer pSize);
+	
+	consultantListBo portalconsultantDetail(String id);
+	
 }

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

@@ -323,7 +323,7 @@ public class UserIdentityServiceImpl extends BaseMybatisDao<UserIdentityMapper>
 			u.setCountInterest(String.valueOf(userInterestMapper.countByToUid(u.getUid())));
 		}
 		String id=TokenManager.getUserId();
-		if(userInterestMapper.checkUidAndDid(uid,id)>0){
+		if(TokenManager.isLogin()&&userInterestMapper.checkUidAndDid(uid,id)>0){
 			u.setInterest("1");
 		}else {
 			u.setInterest("0");
@@ -395,7 +395,7 @@ public class UserIdentityServiceImpl extends BaseMybatisDao<UserIdentityMapper>
 	@Override
 	public consultantListBo consultantDetail(String id) {
 		consultantListBo c=userIdentityMapper.selectconsultantByUid(id);
-		if (StringUtils.isNotBlank(TokenManager.getUserId())&&userInterestMapper.checkUidAndDid(id, TokenManager.getUserId())>0) {
+		if (TokenManager.isLogin()&&userInterestMapper.checkUidAndDid(id, TokenManager.getUserId())>0) {
 			c.setInterest("1");
 		}else {
 			c.setInterest("0");
@@ -430,4 +430,31 @@ public class UserIdentityServiceImpl extends BaseMybatisDao<UserIdentityMapper>
 		return advertising;
 	}
 
+	@SuppressWarnings("unchecked")
+	@Override
+	public Pagination<consultantListBo> portalConsultantList(Integer pNo, Integer pSize) {
+		Pagination<consultantListBo> p=(Pagination<consultantListBo>) findPage("findConsultantListByPage",
+				"findConsultantCount", new HashMap<>(), pNo, pSize);
+		List<consultantListBo> list=(List<consultantListBo>) p.getList();
+		for (consultantListBo c : list) {
+			if (StringUtils.isNotBlank(TokenManager.getUserId())&&userInterestMapper.checkUidAndDid(c.getId(), TokenManager.getUserId())>0) {
+				c.setInterest("1");
+			}else {
+				c.setInterest("0");
+			}
+		}
+		return p;
+	}
+
+	@Override
+	public consultantListBo portalconsultantDetail(String id) {
+		consultantListBo c=userIdentityMapper.selectconsultantByUid(id);
+		if (StringUtils.isNotBlank(TokenManager.getUserId())&&userInterestMapper.checkUidAndDid(id, TokenManager.getUserId())>0) {
+			c.setInterest("1");
+		}else {
+			c.setInterest("0");
+		}
+		return c;
+	}
+
 }

+ 2 - 0
src/main/webapp/WEB-INF/views/admin/achievement.html

@@ -3,6 +3,7 @@
 	xmlns:th="http://www.thymeleaf.org">
 <head th:replace="common::header(~{::title},~{::link})">
 	<title>科技成果页</title>
+	<link th:href="${staticHost+'/dll/dll.css'}" rel="stylesheet">
 	<link th:href="${staticHost+'/admin/achievement.css'}" rel="stylesheet">
 </head>
 <body>
@@ -10,6 +11,7 @@
 	
 	<div th:replace="common::footer(~{::script})">
 		<script type="text/javascript" th:src="${staticHost+'/vendors.js'}"></script>
+		<script type="text/javascript" th:src="${staticHost+'/dll/dll.js'}"></script>
 		<script type="text/javascript" th:src="${staticHost+'/admin/achievement.js'}"></script>
 	</div>
 </body>

+ 2 - 0
src/main/webapp/WEB-INF/views/admin/customer.html

@@ -3,12 +3,14 @@
 	xmlns:th="http://www.thymeleaf.org">
 <head th:replace="common::header(~{::title},~{::link})">
 	<title>客户管理</title>
+	<link th:href="${staticHost+'/dll/dll.css'}" rel="stylesheet">
 	<link th:href="${staticHost+'/admin/customer.css'}" rel="stylesheet">
 </head>
 <body>
 	<div id="root"></div>
 	<div th:replace="common::footer(~{::script})">
 		<script type="text/javascript" th:src="${staticHost+'/vendors.js'}"></script>
+		<script type="text/javascript" th:src="${staticHost+'/dll/dll.js'}"></script>
 		<script type="text/javascript" th:src="${staticHost+'/admin/customer.js'}"></script>
 	</div>
 </body>

+ 2 - 0
src/main/webapp/WEB-INF/views/admin/demand.html

@@ -3,6 +3,7 @@
 	xmlns:th="http://www.thymeleaf.org">
 <head th:replace="common::header(~{::title},~{::link})">
 	<title>科技需求页</title>
+	<link th:href="${staticHost+'/dll/dll.css'}" rel="stylesheet">
 	<link th:href="${staticHost+'/admin/demand.css'}" rel="stylesheet">
 </head>
 <body>
@@ -10,6 +11,7 @@
 	
 	<div th:replace="common::footer(~{::script})">
 		<script type="text/javascript" th:src="${staticHost+'/vendors.js'}"></script>
+		<script type="text/javascript" th:src="${staticHost+'/dll/dll.js'}"></script>
 		<script type="text/javascript" th:src="${staticHost+'/admin/demand.js'}"></script>
 	</div>
 </body>

+ 2 - 0
src/main/webapp/WEB-INF/views/admin/idea.html

@@ -3,6 +3,7 @@
 	xmlns:th="http://www.thymeleaf.org">
 <head th:replace="common::header(~{::title},~{::link})">
 	<title>科技思想页</title>
+	<link th:href="${staticHost+'/dll/dll.css'}" rel="stylesheet">
 	<link th:href="${staticHost+'/admin/idea.css'}" rel="stylesheet">
 </head>
 <body>
@@ -10,6 +11,7 @@
 	
 	<div th:replace="common::footer(~{::script})">
 		<script type="text/javascript" th:src="${staticHost+'/vendors.js'}"></script>
+		<script type="text/javascript" th:src="${staticHost+'/dll/dll.js'}"></script>
 		<script type="text/javascript" th:src="${staticHost+'/admin/idea.js'}"></script>
 	</div>
 </body>

+ 2 - 0
src/main/webapp/WEB-INF/views/admin/index.html

@@ -3,6 +3,7 @@
 	xmlns:th="http://www.thymeleaf.org">
 <head th:replace="common::header(~{::title},~{::link})">
 	<title>管理中心首页</title>
+	<link th:href="${staticHost+'/dll/dll.css'}" rel="stylesheet">
 	<link th:href="${staticHost+'/admin/index.css'}" rel="stylesheet">
 </head>
 <body>
@@ -10,6 +11,7 @@
 	
 	<div th:replace="common::footer(~{::script})">
 		<script type="text/javascript" th:src="${staticHost+'/vendors.js'}"></script>
+		<script type="text/javascript" th:src="${staticHost+'/dll/dll.js'}"></script>
 		<script type="text/javascript" th:src="${staticHost+'/admin/index.js'}"></script>
 	</div>
 </body>

+ 2 - 0
src/main/webapp/WEB-INF/views/admin/login.html

@@ -3,6 +3,7 @@
 	xmlns:th="http://www.thymeleaf.org">
 <head th:replace="common::header(~{::title},~{::link})">
 	<title>登录页</title>
+	<link th:href="${staticHost+'/dll/dll.css'}" rel="stylesheet">
 	<link th:href="${staticHost+'/admin/login.css'}" rel="stylesheet">
 </head>
 <body>
@@ -10,6 +11,7 @@
 	
 	<div th:replace="common::footer(~{::script})">
 		<script type="text/javascript" th:src="${staticHost+'/vendors.js'}"></script>
+		<script type="text/javascript" th:src="${staticHost+'/dll/dll.js'}"></script>
 		<script type="text/javascript" th:src="${staticHost+'/admin/login.js'}"></script>
 	</div>
 </body>

+ 2 - 0
src/main/webapp/WEB-INF/views/admin/operate.html

@@ -3,12 +3,14 @@
 	xmlns:th="http://www.thymeleaf.org">
 <head th:replace="common::header(~{::title},~{::link})">
 	<title>平台管理</title>
+	<link th:href="${staticHost+'/dll/dll.css'}" rel="stylesheet">
 	<link th:href="${staticHost+'/admin/operate.css'}" rel="stylesheet">
 </head>
 <body>
 	<div id="root"></div>
 	<div th:replace="common::footer(~{::script})">
 		<script type="text/javascript" th:src="${staticHost+'/vendors.js'}"></script>
+		<script type="text/javascript" th:src="${staticHost+'/dll/dll.js'}"></script>
 		<script type="text/javascript" th:src="${staticHost+'/admin/operate.js'}"></script>
 	</div>
 </body>

+ 2 - 0
src/main/webapp/WEB-INF/views/admin/order.html

@@ -3,6 +3,7 @@
 	xmlns:th="http://www.thymeleaf.org">
 <head th:replace="common::header(~{::title},~{::link})">
 	<title>订单管理</title>
+	<link th:href="${staticHost+'/dll/dll.css'}" rel="stylesheet">
 	<link th:href="${staticHost+'/admin/order.css'}" rel="stylesheet">
 </head>
 <body>
@@ -10,6 +11,7 @@
 	
 	<div th:replace="common::footer(~{::script})">
 		<script type="text/javascript" th:src="${staticHost+'/vendors.js'}"></script>
+		<script type="text/javascript" th:src="${staticHost+'/dll/dll.js'}"></script>
 		<script type="text/javascript" th:src="${staticHost+'/admin/order.js'}"></script>
 	</div>
 </body>

+ 2 - 0
src/main/webapp/WEB-INF/views/admin/servicesManage/contract.html

@@ -3,6 +3,7 @@
 	xmlns:th="http://www.thymeleaf.org">
 <head th:replace="common::header(~{::title},~{::link})">
 	<title>合同管理页</title>
+	<link th:href="${staticHost+'/dll/dll.css'}" rel="stylesheet">
 	<link th:href="${staticHost+'/admin/servicesManage/contract.css'}" rel="stylesheet">
 </head>
 <body>
@@ -10,6 +11,7 @@
 	
 	<div th:replace="common::footer(~{::script})">
 		<script type="text/javascript" th:src="${staticHost+'/vendors.js'}"></script>
+		<script type="text/javascript" th:src="${staticHost+'/dll/dll.js'}"></script>
 		<script type="text/javascript" th:src="${staticHost+'/admin/servicesManage/contract.js'}"></script>
 	</div>
 </body>

+ 2 - 0
src/main/webapp/WEB-INF/views/admin/servicesManage/copyright.html

@@ -3,6 +3,7 @@
 	xmlns:th="http://www.thymeleaf.org">
 <head th:replace="common::header(~{::title},~{::link})">
 	<title>软件著作管理页</title>
+	<link th:href="${staticHost+'/dll/dll.css'}" rel="stylesheet">
 	<link th:href="${staticHost+'/admin/servicesManage/copyright.css'}" rel="stylesheet">
 </head>
 <body>
@@ -10,6 +11,7 @@
 	
 	<div th:replace="common::footer(~{::script})">
 		<script type="text/javascript" th:src="${staticHost+'/vendors.js'}"></script>
+		<script type="text/javascript" th:src="${staticHost+'/dll/dll.js'}"></script>
 		<script type="text/javascript" th:src="${staticHost+'/admin/servicesManage/copyright.js'}"></script>
 	</div>
 </body>

+ 2 - 0
src/main/webapp/WEB-INF/views/admin/servicesManage/highTech.html

@@ -3,6 +3,7 @@
 	xmlns:th="http://www.thymeleaf.org">
 <head th:replace="common::header(~{::title},~{::link})">
 	<title>高企认定管理页</title>
+	<link th:href="${staticHost+'/dll/dll.css'}" rel="stylesheet">
 	<link th:href="${staticHost+'/admin/servicesManage/highTech.css'}" rel="stylesheet">
 </head>
 <body>
@@ -10,6 +11,7 @@
 	
 	<div th:replace="common::footer(~{::script})">
 		<script type="text/javascript" th:src="${staticHost+'/vendors.js'}"></script>
+		<script type="text/javascript" th:src="${staticHost+'/dll/dll.js'}"></script>
 		<script type="text/javascript" th:src="${staticHost+'/admin/servicesManage/highTech.js'}"></script>
 	</div>
 </body>

+ 2 - 0
src/main/webapp/WEB-INF/views/admin/servicesManage/highTechInfo.html

@@ -3,6 +3,7 @@
 	xmlns:th="http://www.thymeleaf.org">
 <head th:replace="common::header(~{::title},~{::link})">
 	<title>高企信息汇总页</title>
+	<link th:href="${staticHost+'/dll/dll.css'}" rel="stylesheet">
 	<link th:href="${staticHost+'/admin/servicesManage/highTechInfo.css'}" rel="stylesheet">
 </head>
 <body>
@@ -10,6 +11,7 @@
 	
 	<div th:replace="common::footer(~{::script})">
 		<script type="text/javascript" th:src="${staticHost+'/vendors.js'}"></script>
+		<script type="text/javascript" th:src="${staticHost+'/dll/dll.js'}"></script>
 		<script type="text/javascript" th:src="${staticHost+'/admin/servicesManage/highTechInfo.js'}"></script>
 	</div>
 </body>

+ 2 - 0
src/main/webapp/WEB-INF/views/admin/servicesManage/patent.html

@@ -3,6 +3,7 @@
 	xmlns:th="http://www.thymeleaf.org">
 <head th:replace="common::header(~{::title},~{::link})">
 	<title>专利申请管理页</title>
+	<link th:href="${staticHost+'/dll/dll.css'}" rel="stylesheet">
 	<link th:href="${staticHost+'/admin/servicesManage/patent.css'}" rel="stylesheet">
 </head>
 <body>
@@ -10,6 +11,7 @@
 	
 	<div th:replace="common::footer(~{::script})">
 		<script type="text/javascript" th:src="${staticHost+'/vendors.js'}"></script>
+		<script type="text/javascript" th:src="${staticHost+'/dll/dll.js'}"></script>
 		<script type="text/javascript" th:src="${staticHost+'/admin/servicesManage/patent.js'}"></script>
 	</div>
 </body>

+ 2 - 0
src/main/webapp/WEB-INF/views/admin/servicesManage/projectOrder.html

@@ -3,6 +3,7 @@
 	xmlns:th="http://www.thymeleaf.org">
 <head th:replace="common::header(~{::title},~{::link})">
 	<title>项目单管理</title>
+	<link th:href="${staticHost+'/dll/dll.css'}" rel="stylesheet">
 	<link th:href="${staticHost+'/admin/servicesManage/projectOrder.css'}" rel="stylesheet">
 </head>
 <body>
@@ -10,6 +11,7 @@
 	
 	<div th:replace="common::footer(~{::script})">
 		<script type="text/javascript" th:src="${staticHost+'/vendors.js'}"></script>
+		<script type="text/javascript" th:src="${staticHost+'/dll/dll.js'}"></script>
 		<script type="text/javascript" th:src="${staticHost+'/admin/servicesManage/projectOrder.js'}"></script>
 	</div>
 </body>

+ 2 - 0
src/main/webapp/WEB-INF/views/admin/servicesManage/technology.html

@@ -3,6 +3,7 @@
 	xmlns:th="http://www.thymeleaf.org">
 <head th:replace="common::header(~{::title},~{::link})">
 	<title>科技项目申报管理页</title>
+	<link th:href="${staticHost+'/dll/dll.css'}" rel="stylesheet">
 	<link th:href="${staticHost+'/admin/servicesManage/technology.css'}" rel="stylesheet">
 </head>
 <body>
@@ -10,6 +11,7 @@
 	
 	<div th:replace="common::footer(~{::script})">
 		<script type="text/javascript" th:src="${staticHost+'/vendors.js'}"></script>
+		<script type="text/javascript" th:src="${staticHost+'/dll/dll.js'}"></script>
 		<script type="text/javascript" th:src="${staticHost+'/admin/servicesManage/technology.js'}"></script>
 	</div>
 </body>

+ 2 - 0
src/main/webapp/WEB-INF/views/admin/set.html

@@ -3,6 +3,7 @@
 	xmlns:th="http://www.thymeleaf.org">
 <head th:replace="common::header(~{::title},~{::link})">
 	<title>设置页</title>
+	<link th:href="${staticHost+'/dll/dll.css'}" rel="stylesheet">
 	<link th:href="${staticHost+'/admin/set.css'}" rel="stylesheet">
 </head>
 <body>
@@ -10,6 +11,7 @@
 	
 	<div th:replace="common::footer(~{::script})">
 		<script type="text/javascript" th:src="${staticHost+'/vendors.js'}"></script>
+		<script type="text/javascript" th:src="${staticHost+'/dll/dll.js'}"></script>
 		<script type="text/javascript" th:src="${staticHost+'/admin/set.js'}"></script>
 	</div>
 </body>

+ 2 - 0
src/main/webapp/WEB-INF/views/admin/userManage.html

@@ -3,6 +3,7 @@
 	xmlns:th="http://www.thymeleaf.org">
 <head th:replace="common::header(~{::title},~{::link})">
 	<title>用户管理页</title>
+	<link th:href="${staticHost+'/dll/dll.css'}" rel="stylesheet">
 	<link th:href="${staticHost+'/admin/userManage.css'}" rel="stylesheet">
 </head>
 <body>
@@ -10,6 +11,7 @@
 	
 	<div th:replace="common::footer(~{::script})">
 		<script type="text/javascript" th:src="${staticHost+'/vendors.js'}"></script>
+		<script type="text/javascript" th:src="${staticHost+'/dll/dll.js'}"></script>
 		<script type="text/javascript" th:src="${staticHost+'/admin/userManage.js'}"></script>
 	</div>
 </body>

+ 2 - 0
src/main/webapp/WEB-INF/views/admin/userOrder.html

@@ -3,6 +3,7 @@
 	xmlns:th="http://www.thymeleaf.org">
 <head th:replace="common::header(~{::title},~{::link})">
 	<title>科技思想页</title>
+	<link th:href="${staticHost+'/dll/dll.css'}" rel="stylesheet">
 	<link th:href="${staticHost+'/admin/userOrder.css'}" rel="stylesheet">
 </head>
 <body>
@@ -10,6 +11,7 @@
 	
 	<div th:replace="common::footer(~{::script})">
 		<script type="text/javascript" th:src="${staticHost+'/vendors.js'}"></script>
+		<script type="text/javascript" th:src="${staticHost+'/dll/dll.js'}"></script>
 		<script type="text/javascript" th:src="${staticHost+'/admin/userOrder.js'}"></script>
 	</div>
 </body>

+ 3 - 19
src/main/webapp/WEB-INF/views/common.html

@@ -58,6 +58,9 @@
 							<li><a
 								th:href="${basePath + '/portal/thinkTank/policyList.html'}">智政</a>
 							</li>
+							<li><a
+								th:href="${basePath + '/portal/thinkTank/index.html#zizone'}">智者</a>
+							</li>
 						</ol></li>
 					<!-- <li><a th:href="${basePath + '/portal/financial/index.html'}">科技金融</a>
 						<ol class="subnavigation">
@@ -79,7 +82,6 @@
 					th:src="${portalHost+'/img/index_resiter.png'}" alt="" />
 				</a> 
 				<a href="javascript:;" class="head_login">登录</a> 
-				<a th:href="${basePath + '/portal/aboutUs.html'}">关于公司</a>
 				<div></div>
 			</div>
 			<div class="nav_right" th:if="${isLogin}">
@@ -198,24 +200,6 @@
 						th:src="${portalHost+'/img/index_fix0.png'}" alt="" />
 						<p>实名认证</p>
 				</a></li>
-				<li th:if="${!isLogin}" class="head_login"><a href=""> <img
-						th:src="${portalHost+'/img/index_fix1.png'}" alt="" />
-						<p>发布需求</p>
-				</a></li>
-				<li th:if="${isLogin}"><a
-					th:href="${basePath + '/user/account/demand.html#techDemand'}">
-						<img th:src="${portalHost+'/img/index_fix1.png'}" alt="" />
-						<p>发布需求</p>
-				</a></li>
-				<li th:if="${!isLogin}" class="head_login"><a href=""> <img
-						th:src="${portalHost+'/img/index_fix2.png'}" alt="" />
-						<p>发布技术</p>
-				</a></li>
-				<li th:if="${isLogin}"><a
-					th:href="${basePath + '/user/account/achievement.html#techAchievement'}">
-						<img th:src="${portalHost+'/img/index_fix2.png'}" alt="" />
-						<p>发布技术</p>
-				</a></li>
 				<li><a onclick="_MEIQIA('showPanel')"> <img
 						th:src="${portalHost+'/img/index_fix3.png'}" alt="" />
 						<p>联系客服</p>

+ 0 - 0
src/main/webapp/WEB-INF/views/portal/aboutUs.html


Some files were not shown because too many files changed in this diff