Browse Source

Merge branch 'test' of ssh://git@git.jishutao.com:55555/jishutao/jitao-server.git into test

limin 7 years ago
parent
commit
2fb8c4267a
29 changed files with 4022 additions and 2586 deletions
  1. 3 3
      .gitignore
  2. 14 14
      GeneratorConfig.xml
  3. 44 44
      src/main/java/com/goafanti/achievement/bo/AchievementListBo.java
  4. 34 0
      src/main/java/com/goafanti/app/bo/HomeImgBo.java
  5. 359 359
      src/main/java/com/goafanti/app/controller/AppOrderController.java
  6. 182 182
      src/main/java/com/goafanti/app/controller/OpenAppDiscoveryController.java
  7. 29 16
      src/main/java/com/goafanti/app/controller/OpenAppHomeController.java
  8. 1 1
      src/main/java/com/goafanti/business/controller/JtBusinessController.java
  9. 1 1
      src/main/java/com/goafanti/business/service/JtBusinessService.java
  10. 2 1
      src/main/java/com/goafanti/business/service/impl/JtBusinessServiceImpl.java
  11. 1 1
      src/main/java/com/goafanti/business/service/impl/JtTagServiceImpl.java
  12. 1190 0
      src/main/java/com/goafanti/common/controller/WebpageController.java
  13. 89 89
      src/main/java/com/goafanti/common/dao/JtBusinessProjectMapper.java
  14. 111 111
      src/main/java/com/goafanti/common/dao/UserIdentityMapper.java
  15. 61 61
      src/main/java/com/goafanti/common/enums/InterestType.java
  16. 1441 1441
      src/main/java/com/goafanti/common/mapper/AchievementMapper.xml
  17. 17 3
      src/main/java/com/goafanti/common/mapper/JtBusinessProjectMapper.xml
  18. 1 9
      src/main/java/com/goafanti/common/model/UserIdentity.java
  19. 13 13
      src/main/java/com/goafanti/order/service/JtConsultOrderService.java
  20. 2 7
      src/main/java/com/goafanti/user/bo/CustomerAuditListBo.java
  21. 40 40
      src/main/java/com/goafanti/user/bo/ExpertUserIdentity.java
  22. 14 15
      src/main/java/com/goafanti/user/bo/UserIdentityBo.java
  23. 2 2
      src/main/java/com/goafanti/user/controller/UserApiController.java
  24. 173 173
      src/main/java/com/goafanti/user/controller/UserRegisterController.java
  25. 25 0
      src/main/resources/shiro_base_auth.ini
  26. 170 0
      src/main/resources/spring/spring-shiro.xml
  27. 1 0
      src/main/webapp/WEB-INF/views/portal/continueHighApp.html
  28. 1 0
      src/main/webapp/WEB-INF/views/portal/militaryProjectApp.html
  29. 1 0
      src/main/webapp/WEB-INF/views/portal/practicalPatentApp.html

+ 3 - 3
.gitignore

@@ -1,3 +1,3 @@
-/target/
-/bin/
-/.classpath
+/target/
+/bin/
+/.classpath

+ 14 - 14
GeneratorConfig.xml

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

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

@@ -1,44 +1,44 @@
-package com.goafanti.achievement.bo;
-
-public class AchievementListBo extends InputAchievement{
-	private String countInterest;
-	
-	private String		field1;
-	
-	private String		field2;
-	
-	private String 		interested;
-
-	public String getCountInterest() {
-		return countInterest;
-	}
-
-	public void setCountInterest(String countInterest) {
-		this.countInterest = countInterest;
-	}
-
-	public String getField1() {
-		return field1;
-	}
-
-	public void setField1(String field1) {
-		this.field1 = field1;
-	}
-
-	public String getField2() {
-		return field2;
-	}
-
-	public void setField2(String field2) {
-		this.field2 = field2;
-	}
-
-	public String getInterested() {
-		return interested;
-	}
-
-	public void setInterested(String interested) {
-		this.interested = interested;
-	}
-	
-}
+package com.goafanti.achievement.bo;
+
+public class AchievementListBo extends InputAchievement{
+	private String countInterest;
+	
+	private String		field1;
+	
+	private String		field2;
+	
+	private String 		interested;
+
+	public String getCountInterest() {
+		return countInterest;
+	}
+
+	public void setCountInterest(String countInterest) {
+		this.countInterest = countInterest;
+	}
+
+	public String getField1() {
+		return field1;
+	}
+
+	public void setField1(String field1) {
+		this.field1 = field1;
+	}
+
+	public String getField2() {
+		return field2;
+	}
+
+	public void setField2(String field2) {
+		this.field2 = field2;
+	}
+
+	public String getInterested() {
+		return interested;
+	}
+
+	public void setInterested(String interested) {
+		this.interested = interested;
+	}
+	
+}

+ 34 - 0
src/main/java/com/goafanti/app/bo/HomeImgBo.java

@@ -1,3 +1,4 @@
+<<<<<<< HEAD
 package com.goafanti.app.bo;
 
 public class HomeImgBo {
@@ -33,3 +34,36 @@ public class HomeImgBo {
 	}
 	
 	}
+=======
+package com.goafanti.app.bo;
+
+public class HomeImgBo {
+	
+	/**轮播图片*/
+	private String imgUrl;
+	/**跳转地址*/
+	private String jumpUrl;
+	
+	 public HomeImgBo(String imgUrl,String jumpUrl){
+		this.imgUrl = imgUrl;
+		this.jumpUrl = jumpUrl;
+	}
+	
+	public String getImgUrl() {
+		return imgUrl;
+	}
+	public void setImgUrl(String imgUrl) {
+		this.imgUrl = imgUrl;
+	}
+
+	public String getJumpUrl() {
+		return jumpUrl;
+	}
+
+	public void setJumpUrl(String jumpUrl) {
+		this.jumpUrl = jumpUrl;
+	}
+
+	
+	}
+>>>>>>> refs/remotes/origin/patch

+ 359 - 359
src/main/java/com/goafanti/app/controller/AppOrderController.java

@@ -1,360 +1,360 @@
-package com.goafanti.app.controller;
-
-import java.math.BigDecimal;
-import java.text.ParseException;
-import java.util.ArrayList;
-import java.util.List;
-import javax.annotation.Resource;
-import javax.servlet.http.HttpServletRequest;
-import org.apache.commons.lang3.StringUtils;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RequestMethod;
-import org.springframework.web.bind.annotation.RestController;
-import com.goafanti.comment.bo.CommentInput;
-import com.goafanti.comment.controller.UserCommentController;
-import com.goafanti.comment.service.CommentService;
-import com.goafanti.common.bo.Result;
-import com.goafanti.common.constant.ErrorConstants;
-import com.goafanti.common.controller.CertifyApiController;
-import com.goafanti.common.model.JtConsultOrder;
-import com.goafanti.order.bo.JtOrderInput.JtSingleOrder;
-import com.goafanti.order.enums.CommodityType;
-import com.goafanti.order.service.JtConsultOrderService;
-import com.goafanti.order.service.JtOrderService;
-import com.goafanti.order.service.OrderService;
-import com.google.gson.Gson;
-import com.google.gson.reflect.TypeToken;
-
-@RestController
-@RequestMapping(value = "/app/order")
-public class AppOrderController extends CertifyApiController{
-	
-	@Resource
-	private OrderService orderServiceImpl;
-	@Resource
-	private CommentService	commentService;
-	@Resource
-	private JtOrderService	jtOrderService;
-	@Resource 
-	private JtConsultOrderService jtConsultOrderService;
-	/**
-	 * 进入添加意向订单
-	 * @param commodityId 商品编号
-	 * @param commodityType 订单类型
-	 * @return
-	 */
-	@RequestMapping(value = "/toAddIntention" , method = RequestMethod.GET)
-	public Result toAddIntention(String commodityId,Integer commodityType){
-		Result res = new Result();
-		if(StringUtils.isBlank(commodityId) || null == commodityType){
-			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"","商品编号和商品类型"));
-			return res;
-		}
-		if(!CommodityType.containsType(commodityType)){
-			res.getError().add(buildError(ErrorConstants.PARAM_ERROR,"","订单类型错误"));
-			return res;
-		}
-		res.setData(orderServiceImpl.selectCommodityDetail(commodityId, commodityType));
-		return res;
-	}
-	
-	/**
-	 * 添加意向订单
-	 * @param orderNo 订单编号
-	 * @param commodityId 商品id
-	 * @param commodityMode 商品规格
-	 * @param createTime 创建时间
-	 * @param commodityQuantity 商品数量
-	 * @param commodityType 商品类型
-	 * @return 
-	 * @throws ParseException 
-	 * @throws NumberFormatException 
-	 */
-	@RequestMapping(value = "/addIntention" , method = RequestMethod.POST)
-	public Result addIntention(String orderNo,String commodityId,String commodityMode,Integer commodityQuantity,Integer commodityType,
-			String createTime,String remarks) throws NumberFormatException, ParseException {
-		Result res = new Result();
-		if(StringUtils.isBlank(orderNo)){
-			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"","订单编号"));
-			return res;
-		}
-		if(StringUtils.isBlank(commodityId)){
-			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"","商品id"));
-			return res;
-		}
-		if(StringUtils.isBlank(createTime)){
-			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"","订单时间"));
-			return res;
-		}
-		if(commodityQuantity == null){
-			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"","订单数量"));
-			return res;
-		}
-		if(commodityType == null){
-			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"","订单类型"));
-			return res;
-		}
-		if(!CommodityType.containsType(commodityType)){
-			res.getError().add(buildError(ErrorConstants.PARAM_ERROR,"","订单类型"));
-			return res;
-		}
-		orderServiceImpl.addIntention(orderNo,commodityId,commodityMode,commodityQuantity,commodityType,createTime,remarks);
-		return res;
-	}
-	
-	/**
-	 * 查看订单列表
-	 * @param confirm  我的意向-false 我的订单 - true
-	 * @return
-	 */
-	@RequestMapping(value = "/orderList", method = RequestMethod.POST)
-	public Result orderList(boolean confirm,Integer pageNo,Integer pageSize) {
-		Result res = new Result();
-		res.setData(orderServiceImpl.selectOrderList(confirm,pageNo,pageSize));
-		return res;
-	}
-	
-	/**
-	 * 查看订单详情
-	 * @return
-	 */
-	@RequestMapping(value ="/orderDetails", method = RequestMethod.GET)
-	public Result orderDetails(String orderNo) {
-		Result res = new Result();
-		if(StringUtils.isBlank(orderNo)){
-			res.getError().add(buildError(ErrorConstants.PARAM_ERROR,"","订单编号"));
-			return res;
-		}
-		res.setData(orderServiceImpl.selectOrderDetail(orderNo));
-		return res;
-	}
-	
-	/**
-	 * 订单支付(首付)
-	 * @param orderNo 订单编号
-	 * @param fundAmount 支付金额
-	 * @return 备注
-	 */
-	@RequestMapping(value = "/payForFirst", method = RequestMethod.POST)
-	public Result payForFirst(String orderNo,String fundAmount,String remarks) {
-		Result res = new Result();
-		if(StringUtils.isBlank(orderNo)){
-			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"","订单编号"));
-			return res;
-		}
-		if(StringUtils.isBlank(fundAmount)){
-			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"","支付金额"));
-			return res;
-		}
-		orderServiceImpl.updatePayForFirst(orderNo,new BigDecimal(fundAmount),remarks);
-		return res;
-	}
-	
-	/**
-	 * 支付尾款
-	 * @param orderNo 订单编号
-	 * @param fundAmount 支付金额
-	 * @param remarks 备注
-	 * @return
-	 */
-	@RequestMapping(value = "/payForLast", method = RequestMethod.POST)
-	public Result payForLast(String orderNo,String fundAmount,String remarks){
-		Result res = new Result();
-		if(StringUtils.isBlank(orderNo)){
-			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"","订单编号"));
-			return res;
-		}
-		if(StringUtils.isBlank(fundAmount)){
-			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"","支付金额"));
-			return res;
-		}
-		orderServiceImpl.updatePayForLast(orderNo,new BigDecimal(fundAmount),remarks);
-		return res;
-	}
-	
-	/**
-	 * 查询支付流水列表
-	 * @param orderNo
-	 * @return
-	 */
-	@RequestMapping(value = "/fundingHistory", method = RequestMethod.POST)
-	public Result fundingHistory(String orderNo,Integer pageNo,Integer pageSize) {
-		Result res = new Result();
-		if(StringUtils.isNotBlank(orderNo))
-			res.setData(orderServiceImpl.selectOrderBillList(orderNo,pageNo,pageSize));
-		else
-			res.setData(orderServiceImpl.selectOrderBillList(null,pageNo,pageSize));
-		return res;
-	}
-	
-	/**
-	 * 订单提现
-	 * @param orderNo
-	 * @return
-	 */
-	@RequestMapping(value = "/applyForWithdraw", method = RequestMethod.POST)
-	public Result applyForWithdraw(String orderNo,String remarks){
-		Result res = new Result();
-		if(StringUtils.isBlank(orderNo)){
-			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"","订单编号"));
-			return res;
-		}
-		orderServiceImpl.updateApplyForWithdraw(orderNo,remarks);
-		return res;
-	}
-	
-	/**
-	 * 取消订单
-	 * @param orderNo
-	 * @return
-	 */
-	@RequestMapping(value = "/applyForCancel", method = RequestMethod.POST)
-	public Result applyForCancel(String orderNo){
-		Result res = new Result();
-		if(StringUtils.isBlank(orderNo)){
-			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"","订单编号"));
-			return res;
-		}
-		orderServiceImpl.updateApplyForCancel(orderNo);
-		return res;
-	}
-	
-	/**
-	 * 确认意向
-	 * @param orderNo
-	 * @param confirm
-	 * @return
-	 */
-	@RequestMapping(value="/confirmIntention", method = RequestMethod.POST)
-	public Result confirmIntention(String orderNo,boolean confirm){
-		Result res = new Result();
-		if(StringUtils.isBlank(orderNo)){
-			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"","订单编号"));
-			return res;
-		}
-		orderServiceImpl.updateConfirmIntention(orderNo,confirm);
-		return res;
-	}
-	
-	/**
-	 * 申请退款
-	 * @param orderNo
-	 * @return
-	 */
-	@RequestMapping(value = "/applyForRefund",method = RequestMethod.POST)
-	public Result applyForRefund(String orderNo){
-		Result res = new Result();
-		if(StringUtils.isBlank(orderNo)){
-			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"","订单编号"));
-			return res;
-		}
-		orderServiceImpl.updateApplyForRefund(orderNo);
-		return res;
-	}
-	
-	/**
-	 * 确认退款
-	 * @param orderNo
-	 * @param confirm
-	 * @return
-	 */
-	@RequestMapping(value = "/confirmRefund", method = RequestMethod.POST)
-	public Result confirmRefund(String orderNo,boolean confirm){
-		Result res = new Result();
-		if(StringUtils.isBlank(orderNo)){
-			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"","订单编号"));
-			return res;
-		}
-		orderServiceImpl.updateConfirmRefund(orderNo,confirm);
-		return res;
-	}
-	/*
-	 * userType-----0-购买者   1-出售者  2-管理员
-	 * 
-	 * */
-	@RequestMapping(value="/list",method = RequestMethod.GET)
-	public Result getMyJtOrderList(Integer orderType,String orderNo,String startCreateDate,String endCreateDate,String sellerName,String buyerName,String commodityName,Integer userType,Integer pageNo,Integer pageSize) {
-		Result result=new Result();
-		if(userType==null || userType>1 || userType<0) { 
-			result.getError().add(buildError(ErrorConstants.PARAM_ERROR,"","用户类型错误"));
-			return result;
-		}
-		
-		result.setData(jtOrderService.searchOrderList(orderType,orderNo, startCreateDate, endCreateDate, sellerName, buyerName, commodityName, userType, pageNo, pageSize)); 
-		return result;
-	}
-	/**
-	 * 新增评价
-	 */
-	@RequestMapping(value = "/applyComment", method = RequestMethod.POST)
-	public Result addNewComment(HttpServletRequest request,CommentInput commentInput) {
-		Result result=new Result();
-		String ip=UserCommentController.getClientIp(request);
-		if(StringUtils.isBlank(commentInput.getCommodityId())) {
-			result.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"商品id为空","商品id"));return result;
-		}
-		if(commentInput.getStar()==null || commentInput.getStar()<0 || commentInput.getStar()>5) {
-			result.getError().add(buildError(ErrorConstants.PARAM_ERROR,"","评分"));return result;
-		}
-		if(StringUtils.isBlank(commentInput.getOrderNo())) {
-			result.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"","订单编号"));return result;
-		}
-		if(StringUtils.isBlank(commentInput.getContent()) || commentInput.getContent().length()>512) {
-			result.getError().add(buildError(ErrorConstants.PARAM_ERROR,"","内容限制1-512字符"));return result;
-		}
-		
-			int res=commentService.addNewComment(commentInput,ip);
-		if(res ==-1) {
-			result.getError().add(buildError(ErrorConstants.PARAM_ERROR,"","提交失败"));return result;
-		}
-		result.setData(res);
-		
-		return result;
-	}
-	/**
-	 * 提交订单
-	 * @param orderList
-	 * @return
-	 */
-	@RequestMapping(value="/submitOrder",method = RequestMethod.POST)
-	public Result submitOrder(String orderList) {
-		Result result=new Result();
-		Gson gson=new Gson();
-		List<JtSingleOrder>orders=gson.fromJson(orderList,new TypeToken<ArrayList<JtSingleOrder>>() {}.getType());
-		if(orders==null || orders.size()<=0) {result.getError().add(buildError(ErrorConstants.PARAM_ERROR,"","列表不符合规范,")); return result;}
-		int addRes=jtOrderService.addOrder(orders);
-		if(addRes>=0) {result.setData(orders);return result;}
-		else if(addRes==-1) {
-			result.getError().add(buildError(ErrorConstants.PARAM_ERROR,"","商品id,")); return result;
-		}
-		else if(addRes==-2) {
-			result.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"","商品类别,")); return result;
-		}
-		else if(addRes==-3) {
-			result.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"","提交渠道,")); return result;
-		}
-		result.setData(orders);
-		return result;
-	} 
-	/**
-	 * 提交订单
-	 * @param orderList
-	 * @return
-	 */
-	@RequestMapping(value="/submitConsultOrder",method = RequestMethod.POST)
-	public Result submitConsultOrder(String orderList) {
-		Result result=new Result();
-		Gson gson=new Gson();
-		List<JtConsultOrder>orders=gson.fromJson(orderList,new TypeToken<ArrayList<JtConsultOrder>>() {}.getType());
-		if(orders==null || orders.size()<=0) {result.getError().add(buildError(ErrorConstants.PARAM_ERROR,"","列表不符合规范,")); return result;}
-		int addRes=jtConsultOrderService.addConsultOrder(orders);
-		if(addRes==-2) {
-			result.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"","商品类别,")); return result;
-		}
-		else if(addRes==-3) {
-			result.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"","提交渠道,")); return result;
-		}
-		result.setData(orders);
-		return result;
-	}  
+package com.goafanti.app.controller;
+
+import java.math.BigDecimal;
+import java.text.ParseException;
+import java.util.ArrayList;
+import java.util.List;
+import javax.annotation.Resource;
+import javax.servlet.http.HttpServletRequest;
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.bind.annotation.RestController;
+import com.goafanti.comment.bo.CommentInput;
+import com.goafanti.comment.controller.UserCommentController;
+import com.goafanti.comment.service.CommentService;
+import com.goafanti.common.bo.Result;
+import com.goafanti.common.constant.ErrorConstants;
+import com.goafanti.common.controller.CertifyApiController;
+import com.goafanti.common.model.JtConsultOrder;
+import com.goafanti.order.bo.JtOrderInput.JtSingleOrder;
+import com.goafanti.order.enums.CommodityType;
+import com.goafanti.order.service.JtConsultOrderService;
+import com.goafanti.order.service.JtOrderService;
+import com.goafanti.order.service.OrderService;
+import com.google.gson.Gson;
+import com.google.gson.reflect.TypeToken;
+
+@RestController
+@RequestMapping(value = "/app/order")
+public class AppOrderController extends CertifyApiController{
+	
+	@Resource
+	private OrderService orderServiceImpl;
+	@Resource
+	private CommentService	commentService;
+	@Resource
+	private JtOrderService	jtOrderService;
+	@Resource 
+	private JtConsultOrderService jtConsultOrderService;
+	/**
+	 * 进入添加意向订单
+	 * @param commodityId 商品编号
+	 * @param commodityType 订单类型
+	 * @return
+	 */
+	@RequestMapping(value = "/toAddIntention" , method = RequestMethod.GET)
+	public Result toAddIntention(String commodityId,Integer commodityType){
+		Result res = new Result();
+		if(StringUtils.isBlank(commodityId) || null == commodityType){
+			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"","商品编号和商品类型"));
+			return res;
+		}
+		if(!CommodityType.containsType(commodityType)){
+			res.getError().add(buildError(ErrorConstants.PARAM_ERROR,"","订单类型错误"));
+			return res;
+		}
+		res.setData(orderServiceImpl.selectCommodityDetail(commodityId, commodityType));
+		return res;
+	}
+	
+	/**
+	 * 添加意向订单
+	 * @param orderNo 订单编号
+	 * @param commodityId 商品id
+	 * @param commodityMode 商品规格
+	 * @param createTime 创建时间
+	 * @param commodityQuantity 商品数量
+	 * @param commodityType 商品类型
+	 * @return 
+	 * @throws ParseException 
+	 * @throws NumberFormatException 
+	 */
+	@RequestMapping(value = "/addIntention" , method = RequestMethod.POST)
+	public Result addIntention(String orderNo,String commodityId,String commodityMode,Integer commodityQuantity,Integer commodityType,
+			String createTime,String remarks) throws NumberFormatException, ParseException {
+		Result res = new Result();
+		if(StringUtils.isBlank(orderNo)){
+			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"","订单编号"));
+			return res;
+		}
+		if(StringUtils.isBlank(commodityId)){
+			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"","商品id"));
+			return res;
+		}
+		if(StringUtils.isBlank(createTime)){
+			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"","订单时间"));
+			return res;
+		}
+		if(commodityQuantity == null){
+			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"","订单数量"));
+			return res;
+		}
+		if(commodityType == null){
+			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"","订单类型"));
+			return res;
+		}
+		if(!CommodityType.containsType(commodityType)){
+			res.getError().add(buildError(ErrorConstants.PARAM_ERROR,"","订单类型"));
+			return res;
+		}
+		orderServiceImpl.addIntention(orderNo,commodityId,commodityMode,commodityQuantity,commodityType,createTime,remarks);
+		return res;
+	}
+	
+	/**
+	 * 查看订单列表
+	 * @param confirm  我的意向-false 我的订单 - true
+	 * @return
+	 */
+	@RequestMapping(value = "/orderList", method = RequestMethod.POST)
+	public Result orderList(boolean confirm,Integer pageNo,Integer pageSize) {
+		Result res = new Result();
+		res.setData(orderServiceImpl.selectOrderList(confirm,pageNo,pageSize));
+		return res;
+	}
+	
+	/**
+	 * 查看订单详情
+	 * @return
+	 */
+	@RequestMapping(value ="/orderDetails", method = RequestMethod.GET)
+	public Result orderDetails(String orderNo) {
+		Result res = new Result();
+		if(StringUtils.isBlank(orderNo)){
+			res.getError().add(buildError(ErrorConstants.PARAM_ERROR,"","订单编号"));
+			return res;
+		}
+		res.setData(orderServiceImpl.selectOrderDetail(orderNo));
+		return res;
+	}
+	
+	/**
+	 * 订单支付(首付)
+	 * @param orderNo 订单编号
+	 * @param fundAmount 支付金额
+	 * @return 备注
+	 */
+	@RequestMapping(value = "/payForFirst", method = RequestMethod.POST)
+	public Result payForFirst(String orderNo,String fundAmount,String remarks) {
+		Result res = new Result();
+		if(StringUtils.isBlank(orderNo)){
+			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"","订单编号"));
+			return res;
+		}
+		if(StringUtils.isBlank(fundAmount)){
+			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"","支付金额"));
+			return res;
+		}
+		orderServiceImpl.updatePayForFirst(orderNo,new BigDecimal(fundAmount),remarks);
+		return res;
+	}
+	
+	/**
+	 * 支付尾款
+	 * @param orderNo 订单编号
+	 * @param fundAmount 支付金额
+	 * @param remarks 备注
+	 * @return
+	 */
+	@RequestMapping(value = "/payForLast", method = RequestMethod.POST)
+	public Result payForLast(String orderNo,String fundAmount,String remarks){
+		Result res = new Result();
+		if(StringUtils.isBlank(orderNo)){
+			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"","订单编号"));
+			return res;
+		}
+		if(StringUtils.isBlank(fundAmount)){
+			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"","支付金额"));
+			return res;
+		}
+		orderServiceImpl.updatePayForLast(orderNo,new BigDecimal(fundAmount),remarks);
+		return res;
+	}
+	
+	/**
+	 * 查询支付流水列表
+	 * @param orderNo
+	 * @return
+	 */
+	@RequestMapping(value = "/fundingHistory", method = RequestMethod.POST)
+	public Result fundingHistory(String orderNo,Integer pageNo,Integer pageSize) {
+		Result res = new Result();
+		if(StringUtils.isNotBlank(orderNo))
+			res.setData(orderServiceImpl.selectOrderBillList(orderNo,pageNo,pageSize));
+		else
+			res.setData(orderServiceImpl.selectOrderBillList(null,pageNo,pageSize));
+		return res;
+	}
+	
+	/**
+	 * 订单提现
+	 * @param orderNo
+	 * @return
+	 */
+	@RequestMapping(value = "/applyForWithdraw", method = RequestMethod.POST)
+	public Result applyForWithdraw(String orderNo,String remarks){
+		Result res = new Result();
+		if(StringUtils.isBlank(orderNo)){
+			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"","订单编号"));
+			return res;
+		}
+		orderServiceImpl.updateApplyForWithdraw(orderNo,remarks);
+		return res;
+	}
+	
+	/**
+	 * 取消订单
+	 * @param orderNo
+	 * @return
+	 */
+	@RequestMapping(value = "/applyForCancel", method = RequestMethod.POST)
+	public Result applyForCancel(String orderNo){
+		Result res = new Result();
+		if(StringUtils.isBlank(orderNo)){
+			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"","订单编号"));
+			return res;
+		}
+		orderServiceImpl.updateApplyForCancel(orderNo);
+		return res;
+	}
+	
+	/**
+	 * 确认意向
+	 * @param orderNo
+	 * @param confirm
+	 * @return
+	 */
+	@RequestMapping(value="/confirmIntention", method = RequestMethod.POST)
+	public Result confirmIntention(String orderNo,boolean confirm){
+		Result res = new Result();
+		if(StringUtils.isBlank(orderNo)){
+			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"","订单编号"));
+			return res;
+		}
+		orderServiceImpl.updateConfirmIntention(orderNo,confirm);
+		return res;
+	}
+	
+	/**
+	 * 申请退款
+	 * @param orderNo
+	 * @return
+	 */
+	@RequestMapping(value = "/applyForRefund",method = RequestMethod.POST)
+	public Result applyForRefund(String orderNo){
+		Result res = new Result();
+		if(StringUtils.isBlank(orderNo)){
+			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"","订单编号"));
+			return res;
+		}
+		orderServiceImpl.updateApplyForRefund(orderNo);
+		return res;
+	}
+	
+	/**
+	 * 确认退款
+	 * @param orderNo
+	 * @param confirm
+	 * @return
+	 */
+	@RequestMapping(value = "/confirmRefund", method = RequestMethod.POST)
+	public Result confirmRefund(String orderNo,boolean confirm){
+		Result res = new Result();
+		if(StringUtils.isBlank(orderNo)){
+			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"","订单编号"));
+			return res;
+		}
+		orderServiceImpl.updateConfirmRefund(orderNo,confirm);
+		return res;
+	}
+	/*
+	 * userType-----0-购买者   1-出售者  2-管理员
+	 * 
+	 * */
+	@RequestMapping(value="/list",method = RequestMethod.GET)
+	public Result getMyJtOrderList(Integer orderType,String orderNo,String startCreateDate,String endCreateDate,String sellerName,String buyerName,String commodityName,Integer userType,Integer pageNo,Integer pageSize) {
+		Result result=new Result();
+		if(userType==null || userType>1 || userType<0) { 
+			result.getError().add(buildError(ErrorConstants.PARAM_ERROR,"","用户类型错误"));
+			return result;
+		}
+		
+		result.setData(jtOrderService.searchOrderList(orderType,orderNo, startCreateDate, endCreateDate, sellerName, buyerName, commodityName, userType, pageNo, pageSize)); 
+		return result;
+	}
+	/**
+	 * 新增评价
+	 */
+	@RequestMapping(value = "/applyComment", method = RequestMethod.POST)
+	public Result addNewComment(HttpServletRequest request,CommentInput commentInput) {
+		Result result=new Result();
+		String ip=UserCommentController.getClientIp(request);
+		if(StringUtils.isBlank(commentInput.getCommodityId())) {
+			result.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"商品id为空","商品id"));return result;
+		}
+		if(commentInput.getStar()==null || commentInput.getStar()<0 || commentInput.getStar()>5) {
+			result.getError().add(buildError(ErrorConstants.PARAM_ERROR,"","评分"));return result;
+		}
+		if(StringUtils.isBlank(commentInput.getOrderNo())) {
+			result.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"","订单编号"));return result;
+		}
+		if(StringUtils.isBlank(commentInput.getContent()) || commentInput.getContent().length()>512) {
+			result.getError().add(buildError(ErrorConstants.PARAM_ERROR,"","内容限制1-512字符"));return result;
+		}
+		
+			int res=commentService.addNewComment(commentInput,ip);
+		if(res ==-1) {
+			result.getError().add(buildError(ErrorConstants.PARAM_ERROR,"","提交失败"));return result;
+		}
+		result.setData(res);
+		
+		return result;
+	}
+	/**
+	 * 提交订单
+	 * @param orderList
+	 * @return
+	 */
+	@RequestMapping(value="/submitOrder",method = RequestMethod.POST)
+	public Result submitOrder(String orderList) {
+		Result result=new Result();
+		Gson gson=new Gson();
+		List<JtSingleOrder>orders=gson.fromJson(orderList,new TypeToken<ArrayList<JtSingleOrder>>() {}.getType());
+		if(orders==null || orders.size()<=0) {result.getError().add(buildError(ErrorConstants.PARAM_ERROR,"","列表不符合规范,")); return result;}
+		int addRes=jtOrderService.addOrder(orders);
+		if(addRes>=0) {result.setData(orders);return result;}
+		else if(addRes==-1) {
+			result.getError().add(buildError(ErrorConstants.PARAM_ERROR,"","商品id,")); return result;
+		}
+		else if(addRes==-2) {
+			result.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"","商品类别,")); return result;
+		}
+		else if(addRes==-3) {
+			result.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"","提交渠道,")); return result;
+		}
+		result.setData(orders);
+		return result;
+	} 
+	/**
+	 * 提交订单
+	 * @param orderList
+	 * @return
+	 */
+	@RequestMapping(value="/submitConsultOrder",method = RequestMethod.POST)
+	public Result submitConsultOrder(String orderList) {
+		Result result=new Result();
+		Gson gson=new Gson();
+		List<JtConsultOrder>orders=gson.fromJson(orderList,new TypeToken<ArrayList<JtConsultOrder>>() {}.getType());
+		if(orders==null || orders.size()<=0) {result.getError().add(buildError(ErrorConstants.PARAM_ERROR,"","列表不符合规范,")); return result;}
+		int addRes=jtConsultOrderService.addConsultOrder(orders);
+		if(addRes==-2) {
+			result.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"","商品类别,")); return result;
+		}
+		else if(addRes==-3) {
+			result.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"","提交渠道,")); return result;
+		}
+		result.setData(orders);
+		return result;
+	}  
 }

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

@@ -1,182 +1,182 @@
-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.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.utils.StringUtils;
-import com.goafanti.demand.service.DemandService;
-import com.goafanti.news.service.NewsService;
-import com.goafanti.news.service.PolicyService;
-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;
-	@Resource
-	private NewsService newsService;
-	@Resource
-	private PolicyService	policyService;
-	
-	/**
-	 * 成果列表
-	 */
-	@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 = "/domainList", method = RequestMethod.GET)
-	public Result domainList() {
-		Result res = new Result();
-		res.setData(userIdentityService.domainList());
-		return res;
-	}
-	/**
-	 * 专家列表
-	 */
-	@RequestMapping(value = "/expertsList", method = RequestMethod.GET)
-	public Result expertsList(String name,String industry, Integer sortType,Integer pageNo, Integer pageSize) {
-		Result res = new Result();
-		res.setData(userIdentityService.appExpertsList(name,industry,sortType,pageNo,pageSize));
-		return res;
-	}
-	/**
-	 * 顾问列表
-	 */
-	@RequestMapping(value = "/consultantList", method = RequestMethod.GET)
-	public Result consultantList(String name,Integer sortType, Integer consultantType, Integer province,Integer city,
-			 Integer area, Integer pageNo, Integer pageSize) {
-		Result res = new Result();
-		res.setData(userIdentityService.appConsultantList( name, sortType,  consultantType,  province, city,
-				  area,  pageNo,  pageSize));
-		return res;
-	}
-	
-	/**
-	 * 发现页面广告
-	 */
-	@RequestMapping(value = "/advertising", method = RequestMethod.GET)
-	public Result advertising() {
-		Result res = new Result();
-		res.setData(userIdentityService.advertising());
-		return res;
-	}
-	/**
-	 * 政策列表
-	 */
-	@RequestMapping(value = "/listPolicy", method = RequestMethod.GET)
-	public Result ListPolicy(Integer pageNo,Integer pageSize) {
-		Result res = new Result();
-		res.setData(policyService.appListPolicy(pageNo, pageSize));
-		return res;
-		
-	}
-	
-	/**
-	 * 政策详情
-	 */
-	@RequestMapping(value = "/policyDetail", method = RequestMethod.GET)
-	public Result policyDetail(String id) {
-		Result res = new Result();
-		res.setData(policyService.policyDetail(id));
-		return res;
-	}
-	/**
-	 * 科技资讯列表
-	 */
-	@RequestMapping(value = "/listInformation", method = RequestMethod.GET)
-	public Result listInformation(Integer pageNo,Integer pageSize) {
-		Result res = new Result();
-		res.setData(newsService.appListinformation( pageNo, pageSize));
-		return res;
-	}
-	/**
-	 * 科技资讯详情
-	 */
-	@RequestMapping(value = "/informationDetail", method = RequestMethod.GET)
-	public Result informationDetail(String id) {
-		Result res = new Result();
-		res.setData(newsService.informationDetail(id));
-		return res;
-	}
-	/**
-	 * 资产百科列表
-	 */
-	@RequestMapping(value = "/listEncyclopedia", method = RequestMethod.GET)
-	public Result listEncyclopedia(Integer pageNo,Integer pageSize) {
-		Result res = new Result();
-		res.setData(newsService.listEncyclopedia( pageNo, pageSize));
-		return res;
-	}
-	
-	
-}
+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.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.utils.StringUtils;
+import com.goafanti.demand.service.DemandService;
+import com.goafanti.news.service.NewsService;
+import com.goafanti.news.service.PolicyService;
+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;
+	@Resource
+	private NewsService newsService;
+	@Resource
+	private PolicyService	policyService;
+	
+	/**
+	 * 成果列表
+	 */
+	@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 = "/domainList", method = RequestMethod.GET)
+	public Result domainList() {
+		Result res = new Result();
+		res.setData(userIdentityService.domainList());
+		return res;
+	}
+	/**
+	 * 专家列表
+	 */
+	@RequestMapping(value = "/expertsList", method = RequestMethod.GET)
+	public Result expertsList(String name,String industry, Integer sortType,Integer pageNo, Integer pageSize) {
+		Result res = new Result();
+		res.setData(userIdentityService.appExpertsList(name,industry,sortType,pageNo,pageSize));
+		return res;
+	}
+	/**
+	 * 顾问列表
+	 */
+	@RequestMapping(value = "/consultantList", method = RequestMethod.GET)
+	public Result consultantList(String name,Integer sortType, Integer consultantType, Integer province,Integer city,
+			 Integer area, Integer pageNo, Integer pageSize) {
+		Result res = new Result();
+		res.setData(userIdentityService.appConsultantList( name, sortType,  consultantType,  province, city,
+				  area,  pageNo,  pageSize));
+		return res;
+	}
+	
+	/**
+	 * 发现页面广告
+	 */
+	@RequestMapping(value = "/advertising", method = RequestMethod.GET)
+	public Result advertising() {
+		Result res = new Result();
+		res.setData(userIdentityService.advertising());
+		return res;
+	}
+	/**
+	 * 政策列表
+	 */
+	@RequestMapping(value = "/listPolicy", method = RequestMethod.GET)
+	public Result ListPolicy(Integer pageNo,Integer pageSize) {
+		Result res = new Result();
+		res.setData(policyService.appListPolicy(pageNo, pageSize));
+		return res;
+		
+	}
+	
+	/**
+	 * 政策详情
+	 */
+	@RequestMapping(value = "/policyDetail", method = RequestMethod.GET)
+	public Result policyDetail(String id) {
+		Result res = new Result();
+		res.setData(policyService.policyDetail(id));
+		return res;
+	}
+	/**
+	 * 科技资讯列表
+	 */
+	@RequestMapping(value = "/listInformation", method = RequestMethod.GET)
+	public Result listInformation(Integer pageNo,Integer pageSize) {
+		Result res = new Result();
+		res.setData(newsService.appListinformation( pageNo, pageSize));
+		return res;
+	}
+	/**
+	 * 科技资讯详情
+	 */
+	@RequestMapping(value = "/informationDetail", method = RequestMethod.GET)
+	public Result informationDetail(String id) {
+		Result res = new Result();
+		res.setData(newsService.informationDetail(id));
+		return res;
+	}
+	/**
+	 * 资产百科列表
+	 */
+	@RequestMapping(value = "/listEncyclopedia", method = RequestMethod.GET)
+	public Result listEncyclopedia(Integer pageNo,Integer pageSize) {
+		Result res = new Result();
+		res.setData(newsService.listEncyclopedia( pageNo, pageSize));
+		return res;
+	}
+	
+	
+}

+ 29 - 16
src/main/java/com/goafanti/app/controller/OpenAppHomeController.java

@@ -1,5 +1,10 @@
 package com.goafanti.app.controller;
 
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
 import javax.annotation.Resource;
 import javax.servlet.http.HttpServletRequest;
 
@@ -8,8 +13,9 @@ import org.springframework.web.bind.annotation.RequestMethod;
 import org.springframework.web.bind.annotation.ResponseBody;
 import org.springframework.web.bind.annotation.RestController;
 
-import com.goafanti.app.service.AppHomePageService;
+import com.goafanti.app.bo.HomeImgBo;
 import com.goafanti.business.service.JtBusinessService;
+import com.goafanti.business.service.JtTagService;
 import com.goafanti.comment.bo.CommentResult;
 import com.goafanti.comment.service.CommentService;
 import com.goafanti.common.bo.Result;
@@ -21,23 +27,17 @@ import com.goafanti.common.utils.StringUtils;
 @RestController
 @RequestMapping(path = "/open/app/home")
 public class OpenAppHomeController extends BaseApiController{
-	@Resource
-	private AppHomePageService	appHomePageService;
+	
 	@Resource
 	private JtBusinessService	jtBusinessService;
 	@Resource
 	private CommentService	commentService;
+	@Resource
+	private JtTagService	jtTagService;
 	
 	
-	/**App首页轮播图、导航、知产*/
-	@RequestMapping(value = "/getHomePageData", method = RequestMethod.GET)
-	public Result getHomePageData(HttpServletRequest  request){
-		Result res = new Result();
-		res.setData(appHomePageService.getAppHomePage(request));
-		return res;
-	}
 	
-	/**技淘推荐*/
+	/**技淘推荐*//*
 	@RequestMapping(value = "/getHomeRecommended", method = RequestMethod.GET)
 	public Result getHomeRecommended(Integer type){
 		Result res = new Result();
@@ -47,7 +47,8 @@ public class OpenAppHomeController extends BaseApiController{
 		}
 		res.setData(appHomePageService.getHomeRecommended(type));
 		return res;
-	}
+	}*/
+	
 	/**
 	 * 项目列表
 	 * @param topId
@@ -65,9 +66,9 @@ public class OpenAppHomeController extends BaseApiController{
 	 * @return
 	 */
 	@RequestMapping(value="/projectList", method=RequestMethod.GET)
-	public Result getProjectList(String topId,String secondId,String name,Integer pageSize,Integer pageNo,Integer privateProject,Integer auditStatus,Integer module,Integer isHot,Integer orderType,Integer orderSort,String ownerId) {
+	public Result getProjectList(String tag,String topId,String secondId,String name,Integer pageSize,Integer pageNo,Integer privateProject,Integer auditStatus,Integer module,Integer isHot,Integer orderType,Integer orderSort,String ownerId) {
 		Result result=new Result();
-		result.setData(jtBusinessService.getProjects(topId,secondId,name,pageSize,pageNo,privateProject,auditStatus,module,isHot,orderType,orderSort,ownerId));
+		result.setData(jtBusinessService.getProjects(tag,topId,secondId,name,pageSize,pageNo,privateProject,auditStatus,module,isHot,orderType,orderSort,ownerId));
 		return result;
 	}
 	
@@ -135,8 +136,11 @@ public class OpenAppHomeController extends BaseApiController{
 		Result result=new Result();
 		if (null==pageNo)pageNo=1;
 		if (null==pageSize)pageSize=3;
+		Map<String, Object> map=new HashMap<>();
 		//1 赚钱数据    2首页数据
-		result.setData(jtBusinessService.recommendedApplication(1,pageNo,pageSize));
+		map.put("recommended", jtBusinessService.recommendedApplication(1,pageNo,pageSize));
+		map.put("tag", jtTagService.selectListJtTag(null, pageNo, pageSize));
+		result.setData(map);
 		return result;
 	}
 	/**
@@ -148,9 +152,18 @@ public class OpenAppHomeController extends BaseApiController{
 		Result result=new Result();
 		if (null==pageNo)pageNo=1;
 		if (null==pageSize)pageSize=3;
-		result.setData(jtBusinessService.recommendedApplication(2,pageNo,pageSize));
+		Map<String, Object> map=new HashMap<>();
+		//1 赚钱数据    2首页数据
+		map.put("recommended", jtBusinessService.recommendedApplication(1,pageNo,pageSize));
+		List<HomeImgBo> l=new ArrayList<>();
+		l.add(new HomeImgBo("1","1"));
+		l.add(new HomeImgBo("2","2"));
+		l.add(new HomeImgBo("3","3"));
+		map.put("homeImg", l);
+		result.setData(map);
 		return result;
 	}
+
 	
 	
 	

+ 1 - 1
src/main/java/com/goafanti/business/controller/JtBusinessController.java

@@ -33,7 +33,7 @@ public class JtBusinessController extends CertifyApiController {
 	@RequestMapping(value="/jtProject/list", method=RequestMethod.GET)
 	public Result getProjectList(String topId,String secondId,String name,Integer pageSize,Integer pageNo,Integer privateProject,Integer auditStatus,Integer module,Integer isHot,Integer orderType,Integer orderSort,String ownerId) {
 		Result result=new Result();
-		result.setData(jtBusinessService.getProjects(topId,secondId,name,pageSize,pageNo,privateProject,auditStatus,module,isHot,orderType,orderSort,ownerId));
+		result.setData(jtBusinessService.getProjects(null,topId,secondId,name,pageSize,pageNo,privateProject,auditStatus,module,isHot,orderType,orderSort,ownerId));
 		return result;
 	}
 	

+ 1 - 1
src/main/java/com/goafanti/business/service/JtBusinessService.java

@@ -19,7 +19,7 @@ public interface JtBusinessService {
 	JtBusinessProjectResult getBusinessProjectDetail(String id);
 	JtBusinessCategoryTree getCategoryTree(String id);
 	List<JtBusinessCategoryBo>getCategoryBoList(Integer module);
-	Pagination<JtBusinessProjectResult>getProjects(String topId,String secondId,String name,Integer pageSize,Integer pageNo,Integer privateProject,Integer auditStatus,Integer module,Integer isHot,Integer orderType,Integer orderSort,String ownerId); 
+	Pagination<JtBusinessProjectResult>getProjects(String tag,String topId,String secondId,String name, Integer pageSize,Integer pageNo,Integer privateProject,Integer auditStatus,Integer module,Integer isHot,Integer orderType,Integer orderSort,String ownerId); 
 	int insertCategory(JtBusinessCategory jtBusinessCategory);
 	int deleteCategoryById(String id);
 	JtBusinessCategory getCategoryById(String id);

+ 2 - 1
src/main/java/com/goafanti/business/service/impl/JtBusinessServiceImpl.java

@@ -91,7 +91,7 @@ public class JtBusinessServiceImpl  extends BaseMybatisDao<JtBusinessProjectMapp
 	 * */
 	@SuppressWarnings("unchecked")
 	@Override
-	public Pagination<JtBusinessProjectResult> getProjects(String topId, String secondId, String name, Integer pageSize,
+	public Pagination<JtBusinessProjectResult> getProjects(String tag,String topId, String secondId, String name, Integer pageSize,
 			Integer pageNo,Integer privateProject,Integer auditStatus,Integer module,Integer isHot,Integer orderType,Integer orderSort,String ownerId) {
 		if(orderType==null)orderType=0;
 		if(orderSort==null)orderSort=0;
@@ -115,6 +115,7 @@ public class JtBusinessServiceImpl  extends BaseMybatisDao<JtBusinessProjectMapp
 		if(isHot!=null)params.put("isHot", isHot);
 		if(orderType!=null)params.put("orderType", orderType);
 		if(orderSort!=null)params.put("orderSort", orderSort);
+		if(StringUtils.isNotBlank(tag))params.put("tag", tag);
 		return (Pagination<JtBusinessProjectResult>)findPage("findJtBusinessProjectByPage","findJtBusinessCountByPage",params,pageNo,pageSize);
 	}
 	

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

@@ -44,7 +44,7 @@ public class JtTagServiceImpl   extends BaseMybatisDao<JtTagMapper> implements J
 		Map<String, Object> params = new HashMap<>();
 		if(pageNo==null ||pageNo<1)pageNo=1;
 		if(pageSize==null ||pageSize<1)pageSize=10;
-		if(StringUtils.isNotBlank(a.getName()))params.put("name", a.getName());
+		if(null!=null&&StringUtils.isNotBlank(a.getName()))params.put("name", a.getName());
 		return (Pagination<JtTagBo>)findPage("selectJtTagList", "selectJtTagCount", params, pageNo, pageSize);
 	}
 

File diff suppressed because it is too large
+ 1190 - 0
src/main/java/com/goafanti/common/controller/WebpageController.java


+ 89 - 89
src/main/java/com/goafanti/common/dao/JtBusinessProjectMapper.java

@@ -1,90 +1,90 @@
-package com.goafanti.common.dao;
-
-import com.goafanti.business.bo.JtBusinessProjectResult;
-import com.goafanti.common.model.JtBusinessProject;
-import com.goafanti.common.model.JtBusinessProjectExample;
-import com.goafanti.core.mybatis.page.Pagination;
-
-import java.util.List;
-import org.apache.ibatis.annotations.Param;
-
-public interface JtBusinessProjectMapper {
-    /**
-	 * This method was generated by MyBatis Generator. This method corresponds to the database table jt_business_project
-	 * @mbg.generated  Wed Aug 01 10:34:40 CST 2018
-	 */
-	long countByExample(JtBusinessProjectExample example);
-
-	/**
-	 * This method was generated by MyBatis Generator. This method corresponds to the database table jt_business_project
-	 * @mbg.generated  Wed Aug 01 10:34:40 CST 2018
-	 */
-	int deleteByExample(JtBusinessProjectExample example);
-
-	/**
-	 * This method was generated by MyBatis Generator. This method corresponds to the database table jt_business_project
-	 * @mbg.generated  Wed Aug 01 10:34:40 CST 2018
-	 */
-	int deleteByPrimaryKey(String id);
-
-	/**
-	 * This method was generated by MyBatis Generator. This method corresponds to the database table jt_business_project
-	 * @mbg.generated  Wed Aug 01 10:34:40 CST 2018
-	 */
-	int insert(JtBusinessProject record);
-
-	/**
-	 * This method was generated by MyBatis Generator. This method corresponds to the database table jt_business_project
-	 * @mbg.generated  Wed Aug 01 10:34:40 CST 2018
-	 */
-	int insertSelective(JtBusinessProject record);
-
-	/**
-	 * This method was generated by MyBatis Generator. This method corresponds to the database table jt_business_project
-	 * @mbg.generated  Wed Aug 01 10:34:40 CST 2018
-	 */
-	List<JtBusinessProject> selectByExample(JtBusinessProjectExample example);
-
-	/**
-	 * This method was generated by MyBatis Generator. This method corresponds to the database table jt_business_project
-	 * @mbg.generated  Wed Aug 01 10:34:40 CST 2018
-	 */
-	JtBusinessProject selectByPrimaryKey(String id);
-
-	/**
-	 * This method was generated by MyBatis Generator. This method corresponds to the database table jt_business_project
-	 * @mbg.generated  Wed Aug 01 10:34:40 CST 2018
-	 */
-	int updateByExampleSelective(@Param("record") JtBusinessProject record,
-			@Param("example") JtBusinessProjectExample example);
-
-	/**
-	 * This method was generated by MyBatis Generator. This method corresponds to the database table jt_business_project
-	 * @mbg.generated  Wed Aug 01 10:34:40 CST 2018
-	 */
-	int updateByExample(@Param("record") JtBusinessProject record, @Param("example") JtBusinessProjectExample example);
-
-	/**
-	 * This method was generated by MyBatis Generator. This method corresponds to the database table jt_business_project
-	 * @mbg.generated  Wed Aug 01 10:34:40 CST 2018
-	 */
-	int updateByPrimaryKeySelective(JtBusinessProject record);
-
-	/**
-	 * This method was generated by MyBatis Generator. This method corresponds to the database table jt_business_project
-	 * @mbg.generated  Wed Aug 01 10:34:40 CST 2018
-	 */
-	int updateByPrimaryKey(JtBusinessProject record);
-
-	List<JtBusinessProject> getBusinessProjectByCategoryId(@Param("id")String id,@Param("size")Integer size,@Param("isHot")Integer isHot);
-     
-  List<JtBusinessProject> findProjectOrderByNumber();
-  
-  int deleteByIdAndUid(String id,String uid);
-  
-	JtBusinessProjectResult selectByPrimaryKeyWithModule(@Param("id")String id,@Param("uid")String uid);
-  
-
-     
-  
+package com.goafanti.common.dao;
+
+import com.goafanti.business.bo.JtBusinessProjectResult;
+import com.goafanti.common.model.JtBusinessProject;
+import com.goafanti.common.model.JtBusinessProjectExample;
+import com.goafanti.core.mybatis.page.Pagination;
+
+import java.util.List;
+import org.apache.ibatis.annotations.Param;
+
+public interface JtBusinessProjectMapper {
+    /**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table jt_business_project
+	 * @mbg.generated  Wed Aug 01 10:34:40 CST 2018
+	 */
+	long countByExample(JtBusinessProjectExample example);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table jt_business_project
+	 * @mbg.generated  Wed Aug 01 10:34:40 CST 2018
+	 */
+	int deleteByExample(JtBusinessProjectExample example);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table jt_business_project
+	 * @mbg.generated  Wed Aug 01 10:34:40 CST 2018
+	 */
+	int deleteByPrimaryKey(String id);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table jt_business_project
+	 * @mbg.generated  Wed Aug 01 10:34:40 CST 2018
+	 */
+	int insert(JtBusinessProject record);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table jt_business_project
+	 * @mbg.generated  Wed Aug 01 10:34:40 CST 2018
+	 */
+	int insertSelective(JtBusinessProject record);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table jt_business_project
+	 * @mbg.generated  Wed Aug 01 10:34:40 CST 2018
+	 */
+	List<JtBusinessProject> selectByExample(JtBusinessProjectExample example);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table jt_business_project
+	 * @mbg.generated  Wed Aug 01 10:34:40 CST 2018
+	 */
+	JtBusinessProject selectByPrimaryKey(String id);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table jt_business_project
+	 * @mbg.generated  Wed Aug 01 10:34:40 CST 2018
+	 */
+	int updateByExampleSelective(@Param("record") JtBusinessProject record,
+			@Param("example") JtBusinessProjectExample example);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table jt_business_project
+	 * @mbg.generated  Wed Aug 01 10:34:40 CST 2018
+	 */
+	int updateByExample(@Param("record") JtBusinessProject record, @Param("example") JtBusinessProjectExample example);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table jt_business_project
+	 * @mbg.generated  Wed Aug 01 10:34:40 CST 2018
+	 */
+	int updateByPrimaryKeySelective(JtBusinessProject record);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table jt_business_project
+	 * @mbg.generated  Wed Aug 01 10:34:40 CST 2018
+	 */
+	int updateByPrimaryKey(JtBusinessProject record);
+
+	List<JtBusinessProject> getBusinessProjectByCategoryId(@Param("id")String id,@Param("size")Integer size,@Param("isHot")Integer isHot);
+     
+  List<JtBusinessProject> findProjectOrderByNumber();
+  
+  int deleteByIdAndUid(String id,String uid);
+  
+	JtBusinessProjectResult selectByPrimaryKeyWithModule(@Param("id")String id,@Param("uid")String uid);
+  
+
+     
+  
 }

+ 111 - 111
src/main/java/com/goafanti/common/dao/UserIdentityMapper.java

@@ -1,112 +1,112 @@
-package com.goafanti.common.dao;
-
-import com.goafanti.app.bo.ExpertsListBo;
-import com.goafanti.app.bo.consultantListBo;
-import com.goafanti.common.model.UserIdentity;
-import com.goafanti.common.model.UserIdentityExample;
-import com.goafanti.core.mybatis.page.Pagination;
-import com.goafanti.user.bo.AuditorUserIdentityDetailBo;
-
-import com.goafanti.user.bo.UserIdentityBo;
-import com.goafanti.user.bo.UserIdentityRecommended;
-import com.goafanti.user.bo.UserNames;
-
-import java.util.List;
-import org.apache.ibatis.annotations.Param;
-
-public interface UserIdentityMapper {
-    /**
-	 * This method was generated by MyBatis Generator. This method corresponds to the database table user_identity
-	 * @mbg.generated  Fri Dec 29 09:20:50 CST 2017
-	 */
-	long countByExample(UserIdentityExample example);
-
-	/**
-	 * This method was generated by MyBatis Generator. This method corresponds to the database table user_identity
-	 * @mbg.generated  Fri Dec 29 09:20:50 CST 2017
-	 */
-	int deleteByExample(UserIdentityExample example);
-
-	/**
-	 * This method was generated by MyBatis Generator. This method corresponds to the database table user_identity
-	 * @mbg.generated  Fri Dec 29 09:20:50 CST 2017
-	 */
-	int deleteByPrimaryKey(String id);
-
-	/**
-	 * This method was generated by MyBatis Generator. This method corresponds to the database table user_identity
-	 * @mbg.generated  Fri Dec 29 09:20:50 CST 2017
-	 */
-	int insert(UserIdentity record);
-
-	/**
-	 * This method was generated by MyBatis Generator. This method corresponds to the database table user_identity
-	 * @mbg.generated  Fri Dec 29 09:20:50 CST 2017
-	 */
-	int insertSelective(UserIdentity record);
-
-	/**
-	 * This method was generated by MyBatis Generator. This method corresponds to the database table user_identity
-	 * @mbg.generated  Fri Dec 29 09:20:50 CST 2017
-	 */
-	List<UserIdentity> selectByExample(UserIdentityExample example);
-
-	/**
-	 * This method was generated by MyBatis Generator. This method corresponds to the database table user_identity
-	 * @mbg.generated  Fri Dec 29 09:20:50 CST 2017
-	 */
-	UserIdentity selectByPrimaryKey(String id);
-
-	/**
-	 * This method was generated by MyBatis Generator. This method corresponds to the database table user_identity
-	 * @mbg.generated  Fri Dec 29 09:20:50 CST 2017
-	 */
-	int updateByExampleSelective(@Param("record") UserIdentity record, @Param("example") UserIdentityExample example);
-
-	/**
-	 * This method was generated by MyBatis Generator. This method corresponds to the database table user_identity
-	 * @mbg.generated  Fri Dec 29 09:20:50 CST 2017
-	 */
-	int updateByExample(@Param("record") UserIdentity record, @Param("example") UserIdentityExample example);
-
-	/**
-	 * This method was generated by MyBatis Generator. This method corresponds to the database table user_identity
-	 * @mbg.generated  Fri Dec 29 09:20:50 CST 2017
-	 */
-	int updateByPrimaryKeySelective(UserIdentity record);
-
-	/**
-	 * This method was generated by MyBatis Generator. This method corresponds to the database table user_identity
-	 * @mbg.generated  Fri Dec 29 09:20:50 CST 2017
-	 */
-	int updateByPrimaryKey(UserIdentity record);
-
-	UserIdentity selectUserIdentityByUserId(String uid);
-
-	UserIdentityBo selectUserIdentityBoByUserId(String uid);
-	
-	AuditorUserIdentityDetailBo selectAuditorUserIdentityByUserId(String uid);
-	
-    List<UserNames> selectManagerUserNames(String aid);
-    
-    List<UserNames> selectAllUserNames(String aid);
-    
-    List<UserNames> selectManagerAchievementUserOwner(@Param("aid")String aid, @Param("name")String name);
-
-	List<UserNames> selectAchievementUserOwner(@Param("aid")String aid, @Param("name")String name);
-
-	Pagination<UserIdentityBo> expertsList(String industry, Integer pNo, Integer pSize);
-
-	UserIdentityBo selectUserIdentityByUid(String uid);
-
-	consultantListBo selectconsultantByUid(String id);
-
-	List<UserIdentityRecommended> getAppHomeRecommended();
-	
-	List<consultantListBo> getConsultantList(Integer size);
-	
-	List<UserIdentityBo>getExperts(Integer size);
-
-	ExpertsListBo selectAppExpertsDetail(@Param("id")String id, @Param("uid")String uid);
-    
+package com.goafanti.common.dao;
+
+import com.goafanti.app.bo.ExpertsListBo;
+import com.goafanti.app.bo.consultantListBo;
+import com.goafanti.common.model.UserIdentity;
+import com.goafanti.common.model.UserIdentityExample;
+import com.goafanti.core.mybatis.page.Pagination;
+import com.goafanti.user.bo.AuditorUserIdentityDetailBo;
+
+import com.goafanti.user.bo.UserIdentityBo;
+import com.goafanti.user.bo.UserIdentityRecommended;
+import com.goafanti.user.bo.UserNames;
+
+import java.util.List;
+import org.apache.ibatis.annotations.Param;
+
+public interface UserIdentityMapper {
+    /**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table user_identity
+	 * @mbg.generated  Fri Dec 29 09:20:50 CST 2017
+	 */
+	long countByExample(UserIdentityExample example);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table user_identity
+	 * @mbg.generated  Fri Dec 29 09:20:50 CST 2017
+	 */
+	int deleteByExample(UserIdentityExample example);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table user_identity
+	 * @mbg.generated  Fri Dec 29 09:20:50 CST 2017
+	 */
+	int deleteByPrimaryKey(String id);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table user_identity
+	 * @mbg.generated  Fri Dec 29 09:20:50 CST 2017
+	 */
+	int insert(UserIdentity record);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table user_identity
+	 * @mbg.generated  Fri Dec 29 09:20:50 CST 2017
+	 */
+	int insertSelective(UserIdentity record);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table user_identity
+	 * @mbg.generated  Fri Dec 29 09:20:50 CST 2017
+	 */
+	List<UserIdentity> selectByExample(UserIdentityExample example);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table user_identity
+	 * @mbg.generated  Fri Dec 29 09:20:50 CST 2017
+	 */
+	UserIdentity selectByPrimaryKey(String id);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table user_identity
+	 * @mbg.generated  Fri Dec 29 09:20:50 CST 2017
+	 */
+	int updateByExampleSelective(@Param("record") UserIdentity record, @Param("example") UserIdentityExample example);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table user_identity
+	 * @mbg.generated  Fri Dec 29 09:20:50 CST 2017
+	 */
+	int updateByExample(@Param("record") UserIdentity record, @Param("example") UserIdentityExample example);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table user_identity
+	 * @mbg.generated  Fri Dec 29 09:20:50 CST 2017
+	 */
+	int updateByPrimaryKeySelective(UserIdentity record);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table user_identity
+	 * @mbg.generated  Fri Dec 29 09:20:50 CST 2017
+	 */
+	int updateByPrimaryKey(UserIdentity record);
+
+	UserIdentity selectUserIdentityByUserId(String uid);
+
+	UserIdentityBo selectUserIdentityBoByUserId(String uid);
+	
+	AuditorUserIdentityDetailBo selectAuditorUserIdentityByUserId(String uid);
+	
+    List<UserNames> selectManagerUserNames(String aid);
+    
+    List<UserNames> selectAllUserNames(String aid);
+    
+    List<UserNames> selectManagerAchievementUserOwner(@Param("aid")String aid, @Param("name")String name);
+
+	List<UserNames> selectAchievementUserOwner(@Param("aid")String aid, @Param("name")String name);
+
+	Pagination<UserIdentityBo> expertsList(String industry, Integer pNo, Integer pSize);
+
+	UserIdentityBo selectUserIdentityByUid(String uid);
+
+	consultantListBo selectconsultantByUid(String id);
+
+	List<UserIdentityRecommended> getAppHomeRecommended();
+	
+	List<consultantListBo> getConsultantList(Integer size);
+	
+	List<UserIdentityBo>getExperts(Integer size);
+
+	ExpertsListBo selectAppExpertsDetail(@Param("id")String id, @Param("uid")String uid);
+    
 }

+ 61 - 61
src/main/java/com/goafanti/common/enums/InterestType.java

@@ -1,61 +1,61 @@
-package com.goafanti.common.enums;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import org.apache.commons.lang3.StringUtils;
-
-public enum InterestType {
-	ACHIEVEMENT(0, "成果"),
-	DEMAND(1, "需求"),
-	EXPERTS(2, "专家"),
-	PROJECT(3,"项目"),
-	UNAUDITED(4,"活动"),
-	POLICY(5,"政策"),
-	OTHER(6, "其他"),
-	COUNSELOR(7,"咨询师");
-
-	private InterestType(Integer code, String desc) {
-		this.code = code;
-		this.desc = desc;
-	}
-
-	private static Map<Integer, InterestType> status = new HashMap<Integer, InterestType>();
-
-	static {
-		for (InterestType value : InterestType.values()) {
-			status.put(value.getCode(), value);
-		}
-	}
-
-	public static InterestType getStatus(Integer code) {
-		if (containsType(code)) {
-			return status.get(code);
-		}
-		return OTHER;
-	}
-
-	public static InterestType getStatus(String code) {
-		if (StringUtils.isNumeric(code)) {
-			return getStatus(Integer.parseInt(code));
-		}
-		return OTHER;
-	}
-
-	public static boolean containsType(Integer code) {
-		return status.containsKey(code);
-	}
-
-	private Integer	code;
-	private String	desc;
-
-	public Integer getCode() {
-		return code;
-	}
-
-	public String getDesc() {
-		return desc;
-	}
-
-}
-
+package com.goafanti.common.enums;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.apache.commons.lang3.StringUtils;
+
+public enum InterestType {
+	ACHIEVEMENT(0, "成果"),
+	DEMAND(1, "需求"),
+	EXPERTS(2, "专家"),
+	PROJECT(3,"项目"),
+	UNAUDITED(4,"活动"),
+	POLICY(5,"政策"),
+	OTHER(6, "其他"),
+	COUNSELOR(7,"咨询师");
+
+	private InterestType(Integer code, String desc) {
+		this.code = code;
+		this.desc = desc;
+	}
+
+	private static Map<Integer, InterestType> status = new HashMap<Integer, InterestType>();
+
+	static {
+		for (InterestType value : InterestType.values()) {
+			status.put(value.getCode(), value);
+		}
+	}
+
+	public static InterestType getStatus(Integer code) {
+		if (containsType(code)) {
+			return status.get(code);
+		}
+		return OTHER;
+	}
+
+	public static InterestType getStatus(String code) {
+		if (StringUtils.isNumeric(code)) {
+			return getStatus(Integer.parseInt(code));
+		}
+		return OTHER;
+	}
+
+	public static boolean containsType(Integer code) {
+		return status.containsKey(code);
+	}
+
+	private Integer	code;
+	private String	desc;
+
+	public Integer getCode() {
+		return code;
+	}
+
+	public String getDesc() {
+		return desc;
+	}
+
+}
+

File diff suppressed because it is too large
+ 1441 - 1441
src/main/java/com/goafanti/common/mapper/AchievementMapper.xml


+ 17 - 3
src/main/java/com/goafanti/common/mapper/JtBusinessProjectMapper.xml

@@ -625,14 +625,21 @@
 	  u.identify_name as companyName,u.id as companyId
   from jt_business_project jtbp
   left join user u on u.id=jtbp.owner_id
+  left join (select sum(commodity_quantity) as dealCount ,commodity_id from jt_order_detail group by commodity_id) dct on jtbp.id=dct.commodity_id
   <if test="topId!=null">
   left join jt_business_category jtbc on jtbc.super_id =#{topId,jdbcType=VARCHAR}
   </if>
   <if test="module!=null">
   left join jt_business_category jtbc1 on jtbc1.id = jtbp.category_id
   </if>
-  left join (select sum(commodity_quantity) as dealCount ,commodity_id from jt_order_detail group by commodity_id) dct on jtbp.id=dct.commodity_id
+  <if test="tag != null">
+  left join jt_business_project_tag x on x.project_id=jtbp.id
+  left join jt_tag y on x.tag_id=y.id
+  </if>
   where 1=1
+  <if test="tag != null">
+  and y.id= #{tag,jdbcType=VARCHAR}
+  </if>
   <if test="module == 0">
   and jtbc1.module !=1
   </if>
@@ -680,8 +687,15 @@
 	    <if test="module!=null">
   left join jt_business_category jtbc1 on jtbc1.id = jtbp.category_id
   </if>
-	  where 1=1
-	    <if test="module !=null">
+	<if test="tag != null">
+  left join jt_business_project_tag x on x.project_id=jtbp.id
+  left join jt_tag y on x.tag_id=y.id
+  </if>
+  where 1=1
+  <if test="tag != null">
+  and y.id= #{tag,jdbcType=VARCHAR}
+  </if> 
+  <if test="module !=null">
   and jtbc1.module=#{module,jdbcType=INTEGER}
   </if>
 	  <if test="secondId!=null">

+ 1 - 9
src/main/java/com/goafanti/common/model/UserIdentity.java

@@ -215,21 +215,13 @@ public class UserIdentity {
 	 */
 	private BigDecimal consultationPrice;
 	
-	private Integer expertAudit;
-	
 	private Integer releaseStatus;
 	
 	private Integer consultantType;
 	
 	private String consultantCertificateUrl;
 
-	public Integer getExpertAudit() {
-		return expertAudit;
-	}
-
-	public void setExpertAudit(Integer expertAudit) {
-		this.expertAudit = expertAudit;
-	}
+	
 
 	public Integer getReleaseStatus() {
 		return releaseStatus;

+ 13 - 13
src/main/java/com/goafanti/order/service/JtConsultOrderService.java

@@ -1,13 +1,13 @@
-package com.goafanti.order.service;
-
-import java.util.List;
-
-import org.springframework.stereotype.Service;
-
-import com.goafanti.common.model.JtConsultOrder;
-
-public interface JtConsultOrderService {
-
-	int addConsultOrder(List<JtConsultOrder> orderList);
-	
-}
+package com.goafanti.order.service;
+
+import java.util.List;
+
+import org.springframework.stereotype.Service;
+
+import com.goafanti.common.model.JtConsultOrder;
+
+public interface JtConsultOrderService {
+
+	int addConsultOrder(List<JtConsultOrder> orderList);
+	
+}

+ 2 - 7
src/main/java/com/goafanti/user/bo/CustomerAuditListBo.java

@@ -6,7 +6,7 @@ public class CustomerAuditListBo {
 	private String username;
 	private String industryName;
 	private String expert;
-	private String expertAudit;
+	
 	public String getUid() {
 		return uid;
 	}
@@ -31,12 +31,7 @@ public class CustomerAuditListBo {
 	public void setExpert(String expert) {
 		this.expert = expert;
 	}
-	public String getExpertAudit() {
-		return expertAudit;
-	}
-	public void setExpertAudit(String expertAudit) {
-		this.expertAudit = expertAudit;
-	}
+	
 	public String getId() {
 		return id;
 	}

+ 40 - 40
src/main/java/com/goafanti/user/bo/ExpertUserIdentity.java

@@ -1,40 +1,40 @@
-package com.goafanti.user.bo;
-
-public class ExpertUserIdentity extends InputUserIdentity {
-String graduateSchool;
-String majorCategory;
-String qualification;
-String professionalTitle;
-private Integer AuthenticationType;
-public String getGraduateSchool() {
-	return graduateSchool;
-}
-public void setGraduateSchool(String graduateSchool) {
-	this.graduateSchool = graduateSchool;
-}
-public String getMajorCategory() {
-	return majorCategory;
-}
-public void setMajorCategory(String majorCategory) {
-	this.majorCategory = majorCategory;
-}
-public String getQualification() {
-	return qualification;
-}
-public void setQualification(String qualification) {
-	this.qualification = qualification;
-}
-public String getProfessionalTitle() {
-	return professionalTitle;
-}
-public void setProfessionalTitle(String professionalTitle) {
-	this.professionalTitle = professionalTitle;
-}
-public Integer getAuthenticationType() {
-	return AuthenticationType;
-}
-public void setAuthenticationType(Integer authenticationType) {
-	AuthenticationType = authenticationType;
-}
-
-}
+package com.goafanti.user.bo;
+
+public class ExpertUserIdentity extends InputUserIdentity {
+String graduateSchool;
+String majorCategory;
+String qualification;
+String professionalTitle;
+private Integer AuthenticationType;
+public String getGraduateSchool() {
+	return graduateSchool;
+}
+public void setGraduateSchool(String graduateSchool) {
+	this.graduateSchool = graduateSchool;
+}
+public String getMajorCategory() {
+	return majorCategory;
+}
+public void setMajorCategory(String majorCategory) {
+	this.majorCategory = majorCategory;
+}
+public String getQualification() {
+	return qualification;
+}
+public void setQualification(String qualification) {
+	this.qualification = qualification;
+}
+public String getProfessionalTitle() {
+	return professionalTitle;
+}
+public void setProfessionalTitle(String professionalTitle) {
+	this.professionalTitle = professionalTitle;
+}
+public Integer getAuthenticationType() {
+	return AuthenticationType;
+}
+public void setAuthenticationType(Integer authenticationType) {
+	AuthenticationType = authenticationType;
+}
+
+}

+ 14 - 15
src/main/java/com/goafanti/user/bo/UserIdentityBo.java

@@ -1,13 +1,21 @@
 package com.goafanti.user.bo;
 
 public class UserIdentityBo extends InputUserIdentity {
-	String reservationCount;
-	String graduateSchool;
-	String majorCategory;
-	String qualification;
-	String professionalTitle;
-	Integer expertAudit;
+	private String reservationCount;
+	private String graduateSchool;
+	private String majorCategory;
+	private String qualification;
+	private String professionalTitle;
+	private Integer auditStatus;
 	
+	public Integer getAuditStatus() {
+		return auditStatus;
+	}
+
+	public void setAuditStatus(Integer auditStatus) {
+		this.auditStatus = auditStatus;
+	}
+
 	public String getGraduateSchool() {
 		return graduateSchool;
 	}
@@ -40,14 +48,6 @@ public class UserIdentityBo extends InputUserIdentity {
 		this.professionalTitle = professionalTitle;
 	}
 
-	public Integer getExpertAudit() {
-		return expertAudit;
-	}
-
-	public void setExpertAudit(Integer expertAudit) {
-		this.expertAudit = expertAudit;
-	}
-
 	public String getReservationCount() {
 		return reservationCount;
 	}
@@ -58,7 +58,6 @@ public class UserIdentityBo extends InputUserIdentity {
 	
 	@Override
 	public String getHeadPortraitUrl() {
-		// TODO Auto-generated method stub
 		if(super.getHeadPortraitUrl()!= null && !super.getHeadPortraitUrl().contains("."))return null;
 		return super.getHeadPortraitUrl();
 	}

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

@@ -490,13 +490,13 @@ public class UserApiController extends BaseApiController {
 			if (null == u&&userIdentity.getAuthenticationType()==0) {
 				ui.setId(UUID.randomUUID().toString());
 				ui.setExpert(1);//直接变为专家
-				ui.setExpertAudit(1);//提交审核
+				ui.setAuditStatus(1);//提交审核
 				ui.setUid(TokenManager.getUserId());
 				userIdentityService.insert(ui);
 			}else if (null == u&&userIdentity.getAuthenticationType()==1) {
 				ui.setId(UUID.randomUUID().toString());
 				ui.setExpert(2);//直接变为专家
-				ui.setExpertAudit(1);//提交审核
+				ui.setAuditStatus(1);//提交审核
 				ui.setUid(TokenManager.getUserId());
 				userIdentityService.insert(ui);
 			} else {

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

@@ -1,173 +1,173 @@
-package com.goafanti.user.controller;
-
-import java.util.Calendar;
-import java.util.UUID;
-
-import javax.annotation.Resource;
-import javax.validation.Valid;
-
-import org.apache.commons.lang3.StringUtils;
-import org.apache.log4j.Logger;
-import org.apache.shiro.crypto.hash.SimpleHash;
-import org.springframework.http.HttpMethod;
-import org.springframework.stereotype.Controller;
-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.ResponseBody;
-
-import com.alibaba.fastjson.JSONObject;
-import com.goafanti.admin.service.AdminService;
-import com.goafanti.common.bo.Result;
-import com.goafanti.common.constant.AFTConstants;
-import com.goafanti.common.constant.ErrorConstants;
-import com.goafanti.common.controller.BaseController;
-import com.goafanti.common.enums.UserAuthentication;
-import com.goafanti.common.enums.UserFields;
-import com.goafanti.common.enums.UserLevel;
-import com.goafanti.common.model.User;
-import com.goafanti.common.utils.PasswordUtil;
-import com.goafanti.common.utils.TimeUtils;
-import com.goafanti.common.utils.VerifyCodeUtils;
-import com.goafanti.core.shiro.token.TokenManager;
-import com.goafanti.easemob.EasemobUtils;
-import com.goafanti.easemob.bo.EasemobInfo;
-import com.goafanti.message.service.MessageService;
-import com.goafanti.user.bo.InputUser;
-import com.goafanti.user.service.UserService;
-
-@Controller
-public class UserRegisterController extends BaseController {
-	@Resource
-	private UserService		userService;
-	@Resource(name = "passwordUtil")
-	private PasswordUtil	passwordUtil;
-	@Resource
-	private AdminService	adminService;
-	@Resource
-	private MessageService messageService;
-	@Resource
-	private EasemobUtils   easemobUtils;
-	Logger					logger	= Logger.getLogger(UserRegisterController.class);
-	
-	/**
-	 * 网站用户注册
-	 * 
-	 * @param user
-	 * @return
-	 */
-	@RequestMapping(value = "/register", method = RequestMethod.POST)
-	@ResponseBody
-	public Result register(@Valid InputUser user, String mobileCode,BindingResult bindingResult) {
-		Result res = new Result();
-		if (bindingResult.hasErrors()) {
-			res.getError().add(buildErrorByMsg(bindingResult.getFieldError().getDefaultMessage(),
-					UserFields.getFieldDesc(bindingResult.getFieldError().getField())));
-			return res;
-		}
-		User u = userService.selectByNameAndType(user.getUsername().trim(), null);
-		if (null != u) {
-			res.getError().add(buildError(ErrorConstants.USER_ALREADY_EXIST, "用户已存在"));
-		}
-		// 验证码15分钟有效
-		if (TimeUtils.checkOverTime("register")) {
-			res.getError().add(buildError(ErrorConstants.MCODE_OVERTIME_ERROR, "手机验证码超时失效"));
-			return res;
-		}
-		if (!TokenManager.getSession().getAttribute(VerifyCodeUtils.M_CODE).equals(mobileCode.toLowerCase())) {
-			res.getError().add(buildError(ErrorConstants.MCODE_ERROR, "手机验证码错误"));
-			return res;
-		}
-		if (res.getError().isEmpty()) {
-			User us = new User();
-			us.setId(UUID.randomUUID().toString());
-			us.setUsername(user.getUsername().trim());
-			us.setMobile(user.getMobile().trim());
-			us.setPassword(user.getPassword());
-			Calendar now = Calendar.getInstance();
-			now.set(Calendar.MILLISECOND, 0);
-			us.setCreateTime(now.getTime());
-			us.setUpdateTime(now.getTime());
-			us.setPassword(passwordUtil.getEncryptPwd(us));
-			us.setLvl(0);
-			us.setNickname(user.getUsername());
-			us.setSource(AFTConstants.USER_SOURCE_REGISTER);
-			us.setStatus(AFTConstants.USER_STATUS_NORMAL);
-			us.setShareType(AFTConstants.USER_SHARE_PUBLIC);
-			us.setIdentifyName(StringUtils.isBlank(user.getUnitName())?"":user.getUnitName());
-			us.setLvl(UserLevel.GENERAL.getCode());
-			us.setAuthentication(UserAuthentication.UN_AUTHENTICATION.getCode());
-			us.setTransferTime(now.getTime());
-			userService.insertRegister(us,user.getUnitName(),user.getUsername());
-		}
-		return res;
-	}
-	
-	
-	/**
-	 * APP用户注册
-	 * 
-	 * @param user
-	 * @return
-	 */
-	@RequestMapping(value = "/mregister", method = RequestMethod.POST)
-	@ResponseBody
-	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(),
-					UserFields.getFieldDesc(bindingResult.getFieldError().getField())));
-			return res;
-		}
-		User u = userService.selectByNameAndType(user.getUsername().trim(), null);
-		if (null != u) {
-			res.getError().add(buildError(ErrorConstants.USER_ALREADY_EXIST, "用户已存在"));
-		}
-		// 验证码15分钟有效
-		if (TimeUtils.checkOverTime("register")) {
-			res.getError().add(buildError(ErrorConstants.MCODE_OVERTIME_ERROR, "手机验证码超时失效"));
-			return res;
-		}
-		if (!TokenManager.getSession().getAttribute(VerifyCodeUtils.M_CODE).equals(mobileCode.toLowerCase())) {
-			res.getError().add(buildError(ErrorConstants.MCODE_ERROR, "手机验证码错误"));
-			return res;
-		}
-		if (res.getError().isEmpty()) {
-			User us = new User();
-			us.setId(UUID.randomUUID().toString());
-			us.setUsername(user.getUsername().trim());
-			us.setMobile(user.getMobile().trim());
-			us.setPassword(user.getPassword());
-			Calendar now = Calendar.getInstance();
-			now.set(Calendar.MILLISECOND, 0);
-			us.setCreateTime(now.getTime());
-			us.setUpdateTime(now.getTime());
-			us.setPassword(passwordUtil.getEncryptPwd(us));
-			us.setLvl(0);
-			us.setType(0);
-			us.setNickname(user.getUsername());
-			us.setSource(AFTConstants.USER_SOURCE_REGISTER);
-			us.setStatus(AFTConstants.USER_STATUS_NORMAL);
-			us.setShareType(AFTConstants.USER_SHARE_PUBLIC);
-			us.setIdentifyName(StringUtils.isBlank(user.getUnitName())?"":user.getUnitName());
-			us.setLvl(UserLevel.GENERAL.getCode());
-			us.setAuthentication(UserAuthentication.UN_AUTHENTICATION.getCode());
-			us.setTransferTime(now.getTime());
-			userService.insertRegister(us,user.getUnitName(),user.getUsername());
-		}
-		return res;
-	}
-	
-	/*private void registerEasemobAfterRegister(String uuid,User u){
-			JSONObject resultObj = new JSONObject();
-			String easemobName =  String.valueOf(u.getNumber());
-			String easemobPass = new SimpleHash("md5", u.getId(), null, 1).toHex();
-			resultObj.put("password", easemobPass);
-			resultObj.put("username", easemobName);
-			resultObj.put("nickname", StringUtils.isBlank(u.getNickname()) ? "技淘用户" + u.getNumber() : u.getNickname());
-			easemobUtils.send(
-					new EasemobInfo().uri("/users/").data(resultObj.toJSONString()).method(HttpMethod.POST));
-			//绑定账号
-			messageService.addJpushEasemobAccount(uuid,u.getId(),easemobName,easemobPass);		
-	}*/
-}
+package com.goafanti.user.controller;
+
+import java.util.Calendar;
+import java.util.UUID;
+
+import javax.annotation.Resource;
+import javax.validation.Valid;
+
+import org.apache.commons.lang3.StringUtils;
+import org.apache.log4j.Logger;
+import org.apache.shiro.crypto.hash.SimpleHash;
+import org.springframework.http.HttpMethod;
+import org.springframework.stereotype.Controller;
+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.ResponseBody;
+
+import com.alibaba.fastjson.JSONObject;
+import com.goafanti.admin.service.AdminService;
+import com.goafanti.common.bo.Result;
+import com.goafanti.common.constant.AFTConstants;
+import com.goafanti.common.constant.ErrorConstants;
+import com.goafanti.common.controller.BaseController;
+import com.goafanti.common.enums.UserAuthentication;
+import com.goafanti.common.enums.UserFields;
+import com.goafanti.common.enums.UserLevel;
+import com.goafanti.common.model.User;
+import com.goafanti.common.utils.PasswordUtil;
+import com.goafanti.common.utils.TimeUtils;
+import com.goafanti.common.utils.VerifyCodeUtils;
+import com.goafanti.core.shiro.token.TokenManager;
+import com.goafanti.easemob.EasemobUtils;
+import com.goafanti.easemob.bo.EasemobInfo;
+import com.goafanti.message.service.MessageService;
+import com.goafanti.user.bo.InputUser;
+import com.goafanti.user.service.UserService;
+
+@Controller
+public class UserRegisterController extends BaseController {
+	@Resource
+	private UserService		userService;
+	@Resource(name = "passwordUtil")
+	private PasswordUtil	passwordUtil;
+	@Resource
+	private AdminService	adminService;
+	@Resource
+	private MessageService messageService;
+	@Resource
+	private EasemobUtils   easemobUtils;
+	Logger					logger	= Logger.getLogger(UserRegisterController.class);
+	
+	/**
+	 * 网站用户注册
+	 * 
+	 * @param user
+	 * @return
+	 */
+	@RequestMapping(value = "/register", method = RequestMethod.POST)
+	@ResponseBody
+	public Result register(@Valid InputUser user, String mobileCode,BindingResult bindingResult) {
+		Result res = new Result();
+		if (bindingResult.hasErrors()) {
+			res.getError().add(buildErrorByMsg(bindingResult.getFieldError().getDefaultMessage(),
+					UserFields.getFieldDesc(bindingResult.getFieldError().getField())));
+			return res;
+		}
+		User u = userService.selectByNameAndType(user.getUsername().trim(), null);
+		if (null != u) {
+			res.getError().add(buildError(ErrorConstants.USER_ALREADY_EXIST, "用户已存在"));
+		}
+		// 验证码15分钟有效
+		if (TimeUtils.checkOverTime("register")) {
+			res.getError().add(buildError(ErrorConstants.MCODE_OVERTIME_ERROR, "手机验证码超时失效"));
+			return res;
+		}
+		if (!TokenManager.getSession().getAttribute(VerifyCodeUtils.M_CODE).equals(mobileCode.toLowerCase())) {
+			res.getError().add(buildError(ErrorConstants.MCODE_ERROR, "手机验证码错误"));
+			return res;
+		}
+		if (res.getError().isEmpty()) {
+			User us = new User();
+			us.setId(UUID.randomUUID().toString());
+			us.setUsername(user.getUsername().trim());
+			us.setMobile(user.getMobile().trim());
+			us.setPassword(user.getPassword());
+			Calendar now = Calendar.getInstance();
+			now.set(Calendar.MILLISECOND, 0);
+			us.setCreateTime(now.getTime());
+			us.setUpdateTime(now.getTime());
+			us.setPassword(passwordUtil.getEncryptPwd(us));
+			us.setLvl(0);
+			us.setNickname(user.getUsername());
+			us.setSource(AFTConstants.USER_SOURCE_REGISTER);
+			us.setStatus(AFTConstants.USER_STATUS_NORMAL);
+			us.setShareType(AFTConstants.USER_SHARE_PUBLIC);
+			us.setIdentifyName(StringUtils.isBlank(user.getUnitName())?"":user.getUnitName());
+			us.setLvl(UserLevel.GENERAL.getCode());
+			us.setAuthentication(UserAuthentication.UN_AUTHENTICATION.getCode());
+			us.setTransferTime(now.getTime());
+			userService.insertRegister(us,user.getUnitName(),user.getUsername());
+		}
+		return res;
+	}
+	
+	
+	/**
+	 * APP用户注册
+	 * 
+	 * @param user
+	 * @return
+	 */
+	@RequestMapping(value = "/mregister", method = RequestMethod.POST)
+	@ResponseBody
+	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(),
+					UserFields.getFieldDesc(bindingResult.getFieldError().getField())));
+			return res;
+		}
+		User u = userService.selectByNameAndType(user.getUsername().trim(), null);
+		if (null != u) {
+			res.getError().add(buildError(ErrorConstants.USER_ALREADY_EXIST, "用户已存在"));
+		}
+		// 验证码15分钟有效
+		if (TimeUtils.checkOverTime("register")) {
+			res.getError().add(buildError(ErrorConstants.MCODE_OVERTIME_ERROR, "手机验证码超时失效"));
+			return res;
+		}
+		if (!TokenManager.getSession().getAttribute(VerifyCodeUtils.M_CODE).equals(mobileCode.toLowerCase())) {
+			res.getError().add(buildError(ErrorConstants.MCODE_ERROR, "手机验证码错误"));
+			return res;
+		}
+		if (res.getError().isEmpty()) {
+			User us = new User();
+			us.setId(UUID.randomUUID().toString());
+			us.setUsername(user.getUsername().trim());
+			us.setMobile(user.getMobile().trim());
+			us.setPassword(user.getPassword());
+			Calendar now = Calendar.getInstance();
+			now.set(Calendar.MILLISECOND, 0);
+			us.setCreateTime(now.getTime());
+			us.setUpdateTime(now.getTime());
+			us.setPassword(passwordUtil.getEncryptPwd(us));
+			us.setLvl(0);
+			us.setType(0);
+			us.setNickname(user.getUsername());
+			us.setSource(AFTConstants.USER_SOURCE_REGISTER);
+			us.setStatus(AFTConstants.USER_STATUS_NORMAL);
+			us.setShareType(AFTConstants.USER_SHARE_PUBLIC);
+			us.setIdentifyName(StringUtils.isBlank(user.getUnitName())?"":user.getUnitName());
+			us.setLvl(UserLevel.GENERAL.getCode());
+			us.setAuthentication(UserAuthentication.UN_AUTHENTICATION.getCode());
+			us.setTransferTime(now.getTime());
+			userService.insertRegister(us,user.getUnitName(),user.getUsername());
+		}
+		return res;
+	}
+	
+	/*private void registerEasemobAfterRegister(String uuid,User u){
+			JSONObject resultObj = new JSONObject();
+			String easemobName =  String.valueOf(u.getNumber());
+			String easemobPass = new SimpleHash("md5", u.getId(), null, 1).toHex();
+			resultObj.put("password", easemobPass);
+			resultObj.put("username", easemobName);
+			resultObj.put("nickname", StringUtils.isBlank(u.getNickname()) ? "技淘用户" + u.getNumber() : u.getNickname());
+			easemobUtils.send(
+					new EasemobInfo().uri("/users/").data(resultObj.toJSONString()).method(HttpMethod.POST));
+			//绑定账号
+			messageService.addJpushEasemobAccount(uuid,u.getId(),easemobName,easemobPass);		
+	}*/
+}

+ 25 - 0
src/main/resources/shiro_base_auth.ini

@@ -23,4 +23,29 @@
 /admin/**=admin
 /role/**=admin,permission
 /permission/**=admin,permission
+[base_auth]
+/=anon
+/index=anon
+/login=anon
+/user/login.html=anon
+/user/login=anon
+/user/signIn.html=anon
+/user/signIn=anon
+/admin/login=anon
+/admin/login.html=anon
+/mlogin=anon
+/signin=anon
+/managesignin=anon
+/register=anon
+/mregister=anon
+/open/**=anon
+/favicon.ico=anon
+/static/**=anon
+/portal/**=anon
+/api/portal/**=anon
+/api/admin/**=admin
+/api/user/**=login
+/admin/**=admin
+/role/**=admin,permission
+/permission/**=admin,permission
 /**=login

+ 170 - 0
src/main/resources/spring/spring-shiro.xml

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

File diff suppressed because it is too large
+ 1 - 0
src/main/webapp/WEB-INF/views/portal/continueHighApp.html


File diff suppressed because it is too large
+ 1 - 0
src/main/webapp/WEB-INF/views/portal/militaryProjectApp.html


File diff suppressed because it is too large
+ 1 - 0
src/main/webapp/WEB-INF/views/portal/practicalPatentApp.html