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