Browse Source

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

Michael 8 years ago
parent
commit
b99000fe7d

+ 2 - 1
src/main/java/com/goafanti/achievement/bo/AchievementPartnerListBo.java

@@ -245,7 +245,8 @@ public class AchievementPartnerListBo {
 	
 
 	public String getCountInterest() {
-		return countInterest;
+	    
+		return String.valueOf(Integer.valueOf(countInterest)+128);
 	}
 
 	public void setCountInterest(String countInterest) {

+ 9 - 0
src/main/java/com/goafanti/app/bo/ProjectDetailBo.java

@@ -1,5 +1,7 @@
 package com.goafanti.app.bo;
 
+import java.util.List;
+
 public class ProjectDetailBo {
 	private String id;
 	private String name;
@@ -8,6 +10,7 @@ public class ProjectDetailBo {
 	private String clientSize;
 	private String interest;
 	private String maxLogo;
+	private List<String> projectSize;
 	public String getId() {
 		return id;
 	}
@@ -50,4 +53,10 @@ public class ProjectDetailBo {
 	public void setMaxLogo(String maxLogo) {
 		this.maxLogo = maxLogo;
 	}
+	public List<String> getProjectSize() {
+		return projectSize;
+	}
+	public void setProjectSize(List<String> projectSize) {
+		this.projectSize = projectSize;
+	}
 }

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

@@ -10,6 +10,7 @@ import javax.annotation.Resource;
 import javax.servlet.http.HttpServletRequest;
 
 import org.apache.commons.lang3.StringUtils;
+import org.apache.shiro.crypto.hash.SimpleHash;
 import org.springframework.http.HttpMethod;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RequestMethod;
@@ -361,4 +362,27 @@ public class AppUserController extends BaseApiController {
 		res.setData(demandService.selectDemandDetail( id));
 		return res;
 	}
+	
+
+	/**
+	 * 获取环信登录账号,如果未注册则先注册
+	 */
+	@RequestMapping(value = "/easemob", method = RequestMethod.GET)
+	public Result getEasemob() {
+		User u = TokenManager.getUserToken();
+		if (u != null) {
+			JSONObject res = easemobUtils.send(new EasemobInfo().uri("/users/" + u.getNumber()).method(HttpMethod.GET));
+			JSONObject resultObj = new JSONObject();
+			resultObj.put("easemobPass", new SimpleHash("md5", u.getId(), null, 1).toHex());
+			resultObj.put("easemobName", String.valueOf(u.getNumber()));
+			resultObj.put("nickname", StringUtils.isBlank(u.getNickname()) ? "技淘用户" + u.getNumber() : u.getNickname());
+			if (res == null || StringUtils.equals("service_resource_not_found", (CharSequence) res.get("error"))) {
+				easemobUtils.sendLater(
+						new EasemobInfo().uri("/users/").data(resultObj.toJSONString()).method(HttpMethod.POST));
+			}
+			return res().data(resultObj);
+		} else {
+			return res().error(buildError("user only", "必须是登录会员才能访问。"));
+		}
+	}
 }

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

@@ -5,6 +5,7 @@ import java.util.List;
 import java.util.Map;
 
 import com.goafanti.app.bo.ProjectBo;
+import com.goafanti.app.bo.ProjectDetailBo;
 import com.goafanti.business.bo.BusinessProjectBo;
 import com.goafanti.business.bo.ProjectSizeBo;
 import com.goafanti.common.model.BusinessProject;
@@ -22,7 +23,7 @@ public interface BusinessProjectService {
 	
 	int updateStopProject(String id);
 	
-	List<Object> orgProject(String id);
+	ProjectDetailBo orgProject(String id);
 	
 	BusinessProjectBo orgProjects(String id);
 	

+ 3 - 7
src/main/java/com/goafanti/business/service/impl/BusinessProjectServiceImpl.java

@@ -149,19 +149,15 @@ public class BusinessProjectServiceImpl extends BaseMybatisDao<BusinessProjectMa
 		return bpo;
 	}
 	@Override
-	public List<Object> orgProject(String id) {
+	public ProjectDetailBo orgProject(String id) {
 		ProjectDetailBo pd=businessProjectMapper.selectAppProjectDetail(id);
 		if (StringUtils.isNotBlank(TokenManager.getUserId())&&projectInterestMapper.checkUidAndDid(id,TokenManager.getUserId())>0) {
 			pd.setInterest("1");
 		}else {
 			pd.setInterest("0");
 		}
-		
-		List<Object> l=new ArrayList<>();
-		l.add(pd );
-		List<String> l2=projectSizeMapper.selectPidList(id);
-		l.add(l2);
-		return l;
+		pd.setProjectSize(projectSizeMapper.selectPidList(id));
+		return pd;
 	}
 	
 	@Override

+ 11 - 0
src/main/java/com/goafanti/common/controller/WebpageController.java

@@ -297,7 +297,18 @@ public class WebpageController extends BaseController {
 		return modelview;
 	}
 	
+	@RequestMapping(value = "/admin/order", method = RequestMethod.GET)
+	public ModelAndView adminOrder(HttpServletRequest request, ModelAndView modelview){
+		modelview.setViewName("/admin/order");
+		return modelview;
+	}
 
+	@RequestMapping(value = "/admin/operate", method = RequestMethod.GET)
+	public ModelAndView adminOperate(HttpServletRequest request, ModelAndView modelview){
+		modelview.setViewName("/admin/operate");
+		return modelview;
+	}
+	
 	/**
 	 * 首页
 	 */

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

@@ -1228,7 +1228,7 @@
 	</select>
   
   <select id="selectUserOwnerDetail" parameterType="java.lang.String" resultType="com.goafanti.achievement.bo.AchievementUserOwnerDetailBo">
-     select  
+     	select  
 		  	a.id, a.serial_number as serialNumber, a.data_category as dataCategory, 
 		  	a.name, a.keyword, a.category, 
 		  	a.summary, a.introduction, a.technical_picture_url as technicalPictureUrl, 
@@ -1249,12 +1249,14 @@
 			ifnull(t.x,0) as orderIntentionCount ,ifnull(t2.x,0) as orderCount
     from achievement a
     left join user_identity ui on a.owner_id = ui.uid
-    left join (select count(0) as x,commodity_id from t_order
+    left join (select count(0) as x,tl.commodity_id from t_order tr
+				left join t_order_detail tl on tl.order_no=tr.order_no
 				where order_status != 4
-				group by  commodity_id ) t on a.id=t.commodity_id 
-	left join (select count(0) as x,commodity_id from t_order
-				where order_status != 4 and order_status != 0
-				group by  commodity_id ) t2 on a.id=t2.commodity_id 
+				group by  tl.commodity_id ) t on a.id=t.commodity_id 
+	left join (select count(0) as x,tl.commodity_id from t_order tr
+				left join t_order_detail tl on tl.order_no=tr.order_no
+				where tr.order_status != 4 and tr.order_status != 0
+				group by  tl.commodity_id) t2 on a.id=t2.commodity_id 
     left join jpush_easemob_account j on a.owner_id=j.uid
     left join user u on u.id = a.owner_id
   where a.id =#{id,jdbcType=VARCHAR}

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

@@ -745,6 +745,7 @@
 				group by project_id) t on b.id=t.project_id
   		where b.delete_sign=0 
   		and b.status=0
+  		and boutique=1
   		order by b.boutique desc
   		<if test="page_sql!=null">
 			${page_sql}

+ 8 - 6
src/main/java/com/goafanti/common/mapper/DemandMapper.xml

@@ -60,7 +60,7 @@
     where id = #{id,jdbcType=VARCHAR}
   </select>
   <select id="selectAppByPrimaryKey" resultType="com.goafanti.demand.bo.DemandListBo" parameterType="java.lang.String" >
-     select 
+    	select 
     d.id, d.serial_number AS serialNumber, d.data_category AS dataCategory, d.name, d.keyword, d.info_sources AS infoSources, d.industry_category_a AS industryCategoryA, 
     d.industry_category_b AS industryCategoryB, d.industry_category_c AS industryCategoryC, d.demand_type AS demandType, d.problem_des AS problemDes, d.technical_requirements AS technicalRequirements, 
     d.picture_url AS pictureUrl, d.text_file_url AS textFileUrl, d.video_url AS videoUrl, d.fixed_budget AS fixedBudget, d.fixed_cycle AS fixedCycle, d.people_number AS peopleNumber, 
@@ -71,12 +71,14 @@
     ,ifnull(t.x,0) as orderIntentionCount,ifnull(t2.x,0) as orderCount,j.easemob_name as easemobName
     from demand d
     left join jpush_easemob_account j on d.employer_id=j.uid
-    left join (select count(0) as x,commodity_id from t_order
+    left join (select count(0) as x,tl.commodity_id from t_order tr
+				left join t_order_detail tl on tl.order_no=tr.order_no
 				where order_status != 4
-				group by  commodity_id ) t on d.id=t.commodity_id
-    left join (select count(0) as x,commodity_id from t_order
-				where order_status != 4 and order_status != 0
-				group by  commodity_id ) t2 on d.id=t2.commodity_id 
+				group by  tl.commodity_id) t on d.id=t.commodity_id
+    left join (select count(0) as x,tl.commodity_id from t_order tr
+				left join t_order_detail tl on tl.order_no=tr.order_no
+				where tr.order_status != 4 and tr.order_status != 0
+				group by  tl.commodity_id ) t2 on d.id=t2.commodity_id 
     where d.id =  #{id,jdbcType=VARCHAR}
 	</select>
   <delete id="deleteByPrimaryKey" parameterType="java.lang.String" >

+ 0 - 1
src/main/java/com/goafanti/demand/service/impl/DemandServiceImpl.java

@@ -871,7 +871,6 @@ public class DemandServiceImpl extends BaseMybatisDao<DemandMapper> implements D
 		if (StringUtils.isNotBlank(TokenManager.getUserId())) {
 			params.put("uid", TokenManager.getUserId());
 		}
-		params.put("uid", "904d1d5a-30f6-4813-b632-1ff07a1ad317");
 		if (type==InterestType.POLICY.getCode()) {
 			Pagination<ObjectInterestListBo> p=(Pagination<ObjectInterestListBo>) findPage("findAppNewsInterestByPage", "findAppNewsInterestCount", params, pNo, pSize);
 			List<ObjectInterestListBo> l=(List<ObjectInterestListBo>) p.getList();

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

@@ -862,26 +862,4 @@ public class UserApiController extends BaseApiController {
 		}
 		return res;
 	}
-
-	/**
-	 * 获取环信登录账号,如果未注册则先注册
-	 */
-	@RequestMapping(value = "/easemob", method = RequestMethod.GET)
-	public Result getEasemob() {
-		User u = TokenManager.getUserToken();
-		if (u != null) {
-			JSONObject res = easemobUtils.send(new EasemobInfo().uri("/users/" + u.getNumber()).method(HttpMethod.GET));
-			JSONObject resultObj = new JSONObject();
-			resultObj.put("easemobPass", new SimpleHash("md5", u.getId(), null, 1).toHex());
-			resultObj.put("easemobName", String.valueOf(u.getNumber()));
-			resultObj.put("nickname", StringUtils.isBlank(u.getNickname()) ? "技淘用户" + u.getNumber() : u.getNickname());
-			if (res == null || StringUtils.equals("service_resource_not_found", (CharSequence) res.get("error"))) {
-				easemobUtils.sendLater(
-						new EasemobInfo().uri("/users/").data(resultObj.toJSONString()).method(HttpMethod.POST));
-			}
-			return res().data(resultObj);
-		} else {
-			return res().error(buildError("user only", "必须是登录会员才能访问。"));
-		}
-	}
 }

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

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

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

@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+<html xmlns="http://www.w3.org/1999/xhtml"
+	xmlns:th="http://www.thymeleaf.org">
+<head th:replace="common::header(~{::title},~{::link})">
+	<title>订单管理</title>
+	<link th:href="${staticHost+'/admin/order.css'}" rel="stylesheet">
+</head>
+<body>
+	<div id="root"></div>
+	
+	<div th:replace="common::footer(~{::script})">
+		<script type="text/javascript" th:src="${staticHost+'/vendors.js'}"></script>
+		<script type="text/javascript" th:src="${staticHost+'/admin/order.js'}"></script>
+	</div>
+</body>
+</html>