瀏覽代碼

首先新增跳转、APP我的订单列表

anderx 7 年之前
父節點
當前提交
2a2db7a2b9

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

@@ -605,18 +605,18 @@ public class AppUserController extends BaseApiController {
 		VerifyCodeUtils.clearMobileCodeTime();
 	}
 	
-	/*APP订单列表
+	/*APP我的订单列表
 	 * 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) {
+	public Result getMyJtOrderList(Integer orderType,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.appSearchOrderList(orderType,orderNo, startCreateDate, endCreateDate, sellerName, buyerName, commodityName, userType, pageNo, pageSize)); 
+		result.setData(jtOrderService.appSearchOrderList(orderType, userType, pageNo, pageSize)); 
 		return result;
 	}
 	

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

@@ -432,6 +432,7 @@
   jto.order_time as createTime,
   jto.order_amount as orderAmount,
   jtod.commodity_name as commodityName,
+  jtod.commodity_id as commodityId,
   jto.seller_id as sellerId,
   jto.buyer_id as buyerId,
   seller.identify_name as sellerName,

+ 19 - 12
src/main/java/com/goafanti/order/bo/JtOrderResultDetail.java

@@ -4,18 +4,19 @@ import java.math.BigDecimal;
 import java.util.Date;
 
 public class JtOrderResultDetail {
-	String orderNo;
-	Integer commodityType;
-	Date createTime;
-	BigDecimal orderAmount;
-	String commodityName;
-	String sellerId;
-	String sellerName;
-	String sellerMobile;
-	String buyerId;
-	String buyerName;
-	String buyerMobile;
-	String commodityId;
+	private String orderNo;
+	private Integer commodityType;
+	private Date createTime;
+	private BigDecimal orderAmount;
+	private String commodityName;
+	private String sellerId;
+	private String sellerName;
+	private String sellerMobile;
+	private String buyerId;
+	private String buyerName;
+	private String buyerMobile;
+	private String commodityId;
+	private String ImgUrl;
 	
 	public String getCommodityId() {
 		return commodityId;
@@ -89,6 +90,12 @@ public class JtOrderResultDetail {
 	public void setBuyerMobile(String buyerMobile) {
 		this.buyerMobile = buyerMobile;
 	}
+	public String getImgUrl() {
+		return ImgUrl;
+	}
+	public void setImgUrl(String imgUrl) {
+		ImgUrl = imgUrl;
+	}
 	
 
 }

+ 1 - 3
src/main/java/com/goafanti/order/service/JtOrderService.java

@@ -12,8 +12,6 @@ public interface JtOrderService {
 	
 	Pagination<JtOrderResultDetail>searchOrderList(Integer orderType,String orderNo,String startCreateDate,String endCreateDate,String sellerName,String buyerName,String commodityName,Integer userType,Integer pageNo,Integer pageSize);
 
-	Pagination<JtOrderResultDetail> appSearchOrderList(Integer orderType, String orderNo, String startCreateDate, String endCreateDate,
-			String sellerName, String buyerName, String commodityName, Integer userType, Integer pageNo,
-			Integer pageSize);
+	Pagination<JtOrderResultDetail> appSearchOrderList(Integer orderType, Integer userType, Integer pageNo, Integer pageSize);
 
 }

+ 20 - 16
src/main/java/com/goafanti/order/service/impl/JtOrderServiceImpl.java

@@ -195,8 +195,7 @@ public class JtOrderServiceImpl extends BaseMybatisDao<JtOrderMapper> implements
 	 * */
 	@SuppressWarnings("unchecked")
 	@Override
-	public Pagination<JtOrderResultDetail> appSearchOrderList(Integer orderType ,String orderNo, String startCreateDate, String endCreateDate,
-			String sellerName, String buyerName, String commodityName, Integer userType,Integer pageNo,Integer pageSize) {
+	public Pagination<JtOrderResultDetail> appSearchOrderList(Integer orderType,Integer userType,Integer pageNo,Integer pageSize){
 		Map<String, Object>params=new HashMap<>();
 		if(pageNo==null ||pageNo<1)pageNo=1;
 		if(pageSize==null || pageSize<1)pageSize=10;
@@ -204,25 +203,30 @@ public class JtOrderServiceImpl extends BaseMybatisDao<JtOrderMapper> implements
 		String buyerId=null;
 		if(userType==0) {
 			//购买者 将买家姓名置空,购买id为当前id进行搜索
-			buyerName=null;
-			buyerId=TokenManager.getUserId();
-			params.put("buyerId", buyerId);
+			params.put("buyerId", TokenManager.getUserId());
 		}
 		else if(userType==1) {
 			//出售者  将卖家姓名置空,出售者id为当前id进行搜索
-			sellerName=null;
-			sellerId=TokenManager.getUserId();
-			params.put("sellerId", sellerId);
+			params.put("sellerId", TokenManager.getUserId());
 		}
-		
-		if(buyerName!=null)params.put("buyerName", buyerName);
-		if(sellerName!=null)params.put("sellerName", sellerName);
-		if(orderNo!=null)params.put("orderNo", orderNo);
-		if(startCreateDate!=null)params.put("startCreateDate", startCreateDate);
-		if(endCreateDate!=null)params.put("endCreateDate", endCreateDate);
-		if(commodityName!=null)params.put("commodityName", commodityName);
 		if(orderType!=null  && ((orderType>=0 && orderType<=3)|| orderType==10))params.put("orderType", orderType);
-			return (Pagination<JtOrderResultDetail>) findPage("searchJtOrderList", "searchJtOrderListCount", params, pageNo, pageSize);
+		Pagination<JtOrderResultDetail>p=(Pagination<JtOrderResultDetail>) findPage("SearchJtOrderList", "AearchJtOrderListCount", params, pageNo, pageSize);
+		List<JtOrderResultDetail> l=(List<JtOrderResultDetail>) p.getList();
+				for (JtOrderResultDetail j : l) {
+					if (null!=j.getCommodityType()) {
+						if (j.getCommodityType()==1||j.getCommodityType()==0) {
+							JtBusinessProject bp=JtBusinessProjectMapper.selectByPrimaryKey(j.getCommodityId());
+							j.setImgUrl(bp.getMinImgUrl());
+						}else if (j.getCommodityType()==2) {
+							Achievement a=achievementMapper.selectByPrimaryKey(j.getCommodityId());
+							j.setImgUrl(a.getTechnicalPictureUrl());
+						}else if (j.getCommodityType()==3) {
+							Demand d=demandMapper.selectByPrimaryKey(j.getCommodityId());
+							j.setImgUrl(d.getPictureUrl());
+						}
+					}
+				}
+		return p;
 	}
 	
 

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


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


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


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