|  |  | @ -390,7 +390,7 @@ public class IndexApiServiceImpl implements IndexApiService { | 
			
		
	
		
			
				
					|  |  |  | case "4": areaId = "1835296680814776322"; | 
			
		
	
		
			
				
					|  |  |  | break; | 
			
		
	
		
			
				
					|  |  |  | default: | 
			
		
	
		
			
				
					|  |  |  | return Result.OK("所属区域参数输入错误,请重新输入:areaId:0-瓷都镇区 1-湖田片区 2-高岭片区 3-瑶里片区 4-蛟潭片区"); | 
			
		
	
		
			
				
					|  |  |  | areaId = null; | 
			
		
	
		
			
				
					|  |  |  | } | 
			
		
	
		
			
				
					|  |  |  | } | 
			
		
	
		
			
				
					|  |  |  |  | 
			
		
	
	
		
			
				
					|  |  | @ -822,6 +822,7 @@ public class IndexApiServiceImpl implements IndexApiService { | 
			
		
	
		
			
				
					|  |  |  | } | 
			
		
	
		
			
				
					|  |  |  |  | 
			
		
	
		
			
				
					|  |  |  | //分页显示 | 
			
		
	
		
			
				
					|  |  |  | List<Object> pageList = new ArrayList<>(); | 
			
		
	
		
			
				
					|  |  |  | //页码 | 
			
		
	
		
			
				
					|  |  |  | int pageNo = pageBean.getPageNo(); | 
			
		
	
		
			
				
					|  |  |  | //每一页展示数量 | 
			
		
	
	
		
			
				
					|  |  | @ -829,7 +830,7 @@ public class IndexApiServiceImpl implements IndexApiService { | 
			
		
	
		
			
				
					|  |  |  | //数据总量 | 
			
		
	
		
			
				
					|  |  |  | int listCount = cellectionList.size(); | 
			
		
	
		
			
				
					|  |  |  | if(listCount < 1){ | 
			
		
	
		
			
				
					|  |  |  | return Result.OK("没有收藏"); | 
			
		
	
		
			
				
					|  |  |  | return Result.OK("没有收藏项目,请先去收藏!", pageList); | 
			
		
	
		
			
				
					|  |  |  | } | 
			
		
	
		
			
				
					|  |  |  | //总页数 | 
			
		
	
		
			
				
					|  |  |  | int pageCount = listCount%pageSize==0?listCount/pageSize:listCount/pageSize+1; | 
			
		
	
	
		
			
				
					|  |  | @ -848,7 +849,7 @@ public class IndexApiServiceImpl implements IndexApiService { | 
			
		
	
		
			
				
					|  |  |  | endIndex = listCount; | 
			
		
	
		
			
				
					|  |  |  | } | 
			
		
	
		
			
				
					|  |  |  |  | 
			
		
	
		
			
				
					|  |  |  | List<Object> pageList = cellectionList.subList(startIndex,endIndex); | 
			
		
	
		
			
				
					|  |  |  | pageList = cellectionList.subList(startIndex,endIndex); | 
			
		
	
		
			
				
					|  |  |  |  | 
			
		
	
		
			
				
					|  |  |  | return Result.OK("我的收藏列表", pageList); | 
			
		
	
		
			
				
					|  |  |  | } | 
			
		
	
	
		
			
				
					|  |  | @ -1133,14 +1134,41 @@ public class IndexApiServiceImpl implements IndexApiService { | 
			
		
	
		
			
				
					|  |  |  |  | 
			
		
	
		
			
				
					|  |  |  | //根据Id获取文创好物详情 | 
			
		
	
		
			
				
					|  |  |  | @Override | 
			
		
	
		
			
				
					|  |  |  | public Result<?> queryWaresById(String waresId) { | 
			
		
	
		
			
				
					|  |  |  | public Result<?> queryWaresById(String token, String waresId) { | 
			
		
	
		
			
				
					|  |  |  |  | 
			
		
	
		
			
				
					|  |  |  | TravelWares one = travelWaresService | 
			
		
	
		
			
				
					|  |  |  | TravelWares wares = travelWaresService | 
			
		
	
		
			
				
					|  |  |  | .lambdaQuery() | 
			
		
	
		
			
				
					|  |  |  | .eq(TravelWares::getId, waresId) | 
			
		
	
		
			
				
					|  |  |  | .one(); | 
			
		
	
		
			
				
					|  |  |  |  | 
			
		
	
		
			
				
					|  |  |  | return Result.OK("文创好物详情", one); | 
			
		
	
		
			
				
					|  |  |  |  | 
			
		
	
		
			
				
					|  |  |  | //如果用户是登录状态,查询该用户的收藏列表 | 
			
		
	
		
			
				
					|  |  |  | List<TravelCollection> collectionList = null; | 
			
		
	
		
			
				
					|  |  |  | if(null != token){ | 
			
		
	
		
			
				
					|  |  |  | HanHaiMember hanHaiMember = shiroRealm.checkUserTokenIsEffectHanHaiOpenId(token); | 
			
		
	
		
			
				
					|  |  |  | collectionList = travelCollectionService | 
			
		
	
		
			
				
					|  |  |  | .lambdaQuery() | 
			
		
	
		
			
				
					|  |  |  | .eq(TravelCollection::getUserId, hanHaiMember.getId()) | 
			
		
	
		
			
				
					|  |  |  | .list(); | 
			
		
	
		
			
				
					|  |  |  | } | 
			
		
	
		
			
				
					|  |  |  |  | 
			
		
	
		
			
				
					|  |  |  | //判断该项目是否被用户收藏 | 
			
		
	
		
			
				
					|  |  |  | boolean collectionFlag = false; | 
			
		
	
		
			
				
					|  |  |  | if(null != collectionList){ | 
			
		
	
		
			
				
					|  |  |  | for (TravelCollection collection : collectionList) { | 
			
		
	
		
			
				
					|  |  |  | if(wares.getId() .equals(collection.getItemId())){ | 
			
		
	
		
			
				
					|  |  |  | collectionFlag = true; | 
			
		
	
		
			
				
					|  |  |  | break; | 
			
		
	
		
			
				
					|  |  |  | } | 
			
		
	
		
			
				
					|  |  |  | } | 
			
		
	
		
			
				
					|  |  |  | } | 
			
		
	
		
			
				
					|  |  |  |  | 
			
		
	
		
			
				
					|  |  |  | WaresApiBean waresApiBean = new WaresApiBean(); | 
			
		
	
		
			
				
					|  |  |  | waresApiBean.setCollectonFlag(collectionFlag); | 
			
		
	
		
			
				
					|  |  |  | waresApiBean.setTravelWares(wares); | 
			
		
	
		
			
				
					|  |  |  |  | 
			
		
	
		
			
				
					|  |  |  |  | 
			
		
	
		
			
				
					|  |  |  | return Result.OK("文创好物详情", waresApiBean); | 
			
		
	
		
			
				
					|  |  |  | } | 
			
		
	
		
			
				
					|  |  |  |  | 
			
		
	
		
			
				
					|  |  |  | //获取文创好物订单列表 | 
			
		
	
	
		
			
				
					|  |  | @ -1190,6 +1218,7 @@ public class IndexApiServiceImpl implements IndexApiService { | 
			
		
	
		
			
				
					|  |  |  | } | 
			
		
	
		
			
				
					|  |  |  |  | 
			
		
	
		
			
				
					|  |  |  | //分页查询 | 
			
		
	
		
			
				
					|  |  |  | List<WaresOrderApiBean> pageList = new ArrayList<>(); | 
			
		
	
		
			
				
					|  |  |  | //页码 | 
			
		
	
		
			
				
					|  |  |  | int pageNo = pageBean.getPageNo(); | 
			
		
	
		
			
				
					|  |  |  | //每一页展示数量 | 
			
		
	
	
		
			
				
					|  |  | @ -1198,7 +1227,7 @@ public class IndexApiServiceImpl implements IndexApiService { | 
			
		
	
		
			
				
					|  |  |  | int listCount = waresOrderApiBeans.size(); | 
			
		
	
		
			
				
					|  |  |  | if(listCount < 1){ | 
			
		
	
		
			
				
					|  |  |  | //没有数据 | 
			
		
	
		
			
				
					|  |  |  | Result.OK("没有订单,请先去创建订单!"); | 
			
		
	
		
			
				
					|  |  |  | Result.OK("没有订单,请先去创建订单!", pageList); | 
			
		
	
		
			
				
					|  |  |  | } | 
			
		
	
		
			
				
					|  |  |  | //总页数 | 
			
		
	
		
			
				
					|  |  |  | int pageCount = listCount%pageSize==0?listCount/pageSize:listCount/pageSize+1; | 
			
		
	
	
		
			
				
					|  |  | @ -1217,11 +1246,24 @@ public class IndexApiServiceImpl implements IndexApiService { | 
			
		
	
		
			
				
					|  |  |  | endIndex = listCount; | 
			
		
	
		
			
				
					|  |  |  | } | 
			
		
	
		
			
				
					|  |  |  |  | 
			
		
	
		
			
				
					|  |  |  | List<WaresOrderApiBean> pageList = waresOrderApiBeans.subList(startIndex,endIndex); | 
			
		
	
		
			
				
					|  |  |  | pageList = waresOrderApiBeans.subList(startIndex,endIndex); | 
			
		
	
		
			
				
					|  |  |  |  | 
			
		
	
		
			
				
					|  |  |  | return Result.OK("文创好物订单列表", pageList); | 
			
		
	
		
			
				
					|  |  |  | } | 
			
		
	
		
			
				
					|  |  |  |  | 
			
		
	
		
			
				
					|  |  |  | //根据Id获取文创好物订单详情 | 
			
		
	
		
			
				
					|  |  |  | @Override | 
			
		
	
		
			
				
					|  |  |  | public Result<?> queryWaresOrderById(String token, String waresOrderId) { | 
			
		
	
		
			
				
					|  |  |  | HanHaiMember hanHaiMember = shiroRealm.checkUserTokenIsEffectHanHaiOpenId(token); | 
			
		
	
		
			
				
					|  |  |  |  | 
			
		
	
		
			
				
					|  |  |  | TravelWares one = travelWaresService | 
			
		
	
		
			
				
					|  |  |  | .lambdaQuery() | 
			
		
	
		
			
				
					|  |  |  | .eq(TravelWares::getId, waresOrderId) | 
			
		
	
		
			
				
					|  |  |  | .one(); | 
			
		
	
		
			
				
					|  |  |  |  | 
			
		
	
		
			
				
					|  |  |  | return Result.OK("文创好物详情", one); | 
			
		
	
		
			
				
					|  |  |  | } | 
			
		
	
		
			
				
					|  |  |  |  | 
			
		
	
		
			
				
					|  |  |  | //创建文创好物订单 | 
			
		
	
		
			
				
					|  |  |  | @Override | 
			
		
	
		
			
				
					|  |  |  | public Result<?> addWaresOrder(String token, TravelWaresOrder travelWaresOrder) { | 
			
		
	
	
		
			
				
					|  |  | @ -1328,6 +1370,7 @@ public class IndexApiServiceImpl implements IndexApiService { | 
			
		
	
		
			
				
					|  |  |  | } | 
			
		
	
		
			
				
					|  |  |  |  | 
			
		
	
		
			
				
					|  |  |  | //分页查询 | 
			
		
	
		
			
				
					|  |  |  | List<ShopcarApiBean> pageList = new ArrayList<>(); | 
			
		
	
		
			
				
					|  |  |  | //页码 | 
			
		
	
		
			
				
					|  |  |  | int pageNo = pageBean.getPageNo(); | 
			
		
	
		
			
				
					|  |  |  | //每一页展示数量 | 
			
		
	
	
		
			
				
					|  |  | @ -1336,7 +1379,7 @@ public class IndexApiServiceImpl implements IndexApiService { | 
			
		
	
		
			
				
					|  |  |  | int listCount = shopcarApiBeanList.size(); | 
			
		
	
		
			
				
					|  |  |  | if(listCount < 1){ | 
			
		
	
		
			
				
					|  |  |  | //没有数据 | 
			
		
	
		
			
				
					|  |  |  | return null; | 
			
		
	
		
			
				
					|  |  |  | Result.OK("购物车列表没有数据,请先去添加购物车!", pageList); | 
			
		
	
		
			
				
					|  |  |  | } | 
			
		
	
		
			
				
					|  |  |  | //总页数 | 
			
		
	
		
			
				
					|  |  |  | int pageCount = listCount%pageSize==0?listCount/pageSize:listCount/pageSize+1; | 
			
		
	
	
		
			
				
					|  |  | @ -1355,7 +1398,7 @@ public class IndexApiServiceImpl implements IndexApiService { | 
			
		
	
		
			
				
					|  |  |  | endIndex = listCount; | 
			
		
	
		
			
				
					|  |  |  | } | 
			
		
	
		
			
				
					|  |  |  |  | 
			
		
	
		
			
				
					|  |  |  | List<ShopcarApiBean> pageList = shopcarApiBeanList.subList(startIndex,endIndex); | 
			
		
	
		
			
				
					|  |  |  | pageList = shopcarApiBeanList.subList(startIndex,endIndex); | 
			
		
	
		
			
				
					|  |  |  |  | 
			
		
	
		
			
				
					|  |  |  | return Result.OK("购物车列表", pageList); | 
			
		
	
		
			
				
					|  |  |  | } | 
			
		
	
	
		
			
				
					|  |  | 
 |