|
@@ -83,51 +83,61 @@ public class TpShopServicelmpl implements TpShopServicel {
|
83
|
83
|
// 当前线下商铺是否展示
|
84
|
84
|
String shopSetting= tpShopMapper.shopSetting(userElement.getCommunityId());
|
85
|
85
|
List<TpShop> tpShopList = null;
|
86
|
|
- List<TpShopType> tpShopType =null;
|
87
|
|
- if (null != shopSetting){
|
88
|
|
- tpShopList= tpShopMapper.selectShopCommunity(userElement.getCommunityId());
|
89
|
|
- for (TpShop tpShop:tpShopList){
|
|
86
|
+ List<TpShopType> tpShopTypeList =null;
|
|
87
|
+ if (null != shopSetting) {
|
|
88
|
+ tpShopList = tpShopMapper.selectShopCommunity(userElement.getCommunityId());
|
|
89
|
+ for (TpShop tpShop : tpShopList) {
|
90
|
90
|
// 1 表示查询当前首页图片
|
91
|
|
- List<TpShopImg> tpShopImgList= tpShopImgMapper.selectShopIdCommunity(userElement.getCommunityId(),tpShop.getId(),1);
|
|
91
|
+ List<TpShopImg> tpShopImgList = tpShopImgMapper.selectShopIdCommunity(userElement.getCommunityId(), tpShop.getId(), 1);
|
92
|
92
|
tpShop.setTpShopImgList(tpShopImgList);
|
93
|
93
|
}
|
94
|
94
|
// 查询当前商铺类型
|
95
|
|
- tpShopType= tpShopTypeMapper.selectCommunityIdShop(userElement.getCommunityId());
|
96
|
|
- }
|
97
|
|
- //购物
|
98
|
|
- List<String> tpShopTypeImgShop= new ArrayList<>();
|
99
|
|
- //购物车3x
|
100
|
|
- tpShopTypeImgShop.add("http://jingcheng-h5temp.oss-cn-shanghai.aliyuncs.com/1557816503894.png?Expires=1559643891&OSSAccessKeyId=LTAIkc75dpkJw8Lb");
|
101
|
|
- //购物车2x
|
102
|
|
- tpShopTypeImgShop.add("http://jingcheng-h5temp.oss-cn-shanghai.aliyuncs.com/1557816639291.png?Expires=1559644026&OSSAccessKeyId=LTAIkc75dpkJw8Lb");
|
103
|
|
-
|
104
|
|
- //美食图片
|
105
|
|
- List<String> tpShopTypeImgCate= new ArrayList<>();
|
106
|
|
- // 美食图片3x
|
107
|
|
- tpShopTypeImgCate.add("http://jingcheng-h5temp.oss-cn-shanghai.aliyuncs.com/1557816913843.png?Expires=1559644301&OSSAccessKeyId=LTAIkc75dpkJw8Lb");
|
108
|
|
- // 美食图片2x
|
109
|
|
- tpShopTypeImgCate.add("http://jingcheng-h5temp.oss-cn-shanghai.aliyuncs.com/1557816963921.png?Expires=1559644351&OSSAccessKeyId=LTAIkc75dpkJw8Lb");
|
|
95
|
+ tpShopTypeList = tpShopTypeMapper.selectCommunityIdShop(userElement.getCommunityId());
|
|
96
|
+ for (TpShopType tpShopType:tpShopTypeList){
|
|
97
|
+ int a=tpShopType.getId().intValue();
|
|
98
|
+ if (a == 1){
|
|
99
|
+ //美食图片
|
|
100
|
+ List<String> tpShopTypeImg = new ArrayList<>();
|
|
101
|
+ // 美食图片3x
|
|
102
|
+ tpShopTypeImg.add("http://jingcheng-h5temp.oss-cn-shanghai.aliyuncs.com/1557816913843.png?Expires=1559644301&OSSAccessKeyId=LTAIkc75dpkJw8Lb");
|
|
103
|
+ // 美食图片2x
|
|
104
|
+ tpShopTypeImg.add("http://jingcheng-h5temp.oss-cn-shanghai.aliyuncs.com/1557816963921.png?Expires=1559644351&OSSAccessKeyId=LTAIkc75dpkJw8Lb");
|
|
105
|
+ tpShopType.setImg(tpShopTypeImg);
|
|
106
|
+ }
|
|
107
|
+ if (a == 2){
|
|
108
|
+ //购物
|
|
109
|
+ List<String> tpShopTypeImg = new ArrayList<>();
|
|
110
|
+ //购物车3x
|
|
111
|
+ tpShopTypeImg.add("http://jingcheng-h5temp.oss-cn-shanghai.aliyuncs.com/1557816503894.png?Expires=1559643891&OSSAccessKeyId=LTAIkc75dpkJw8Lb");
|
|
112
|
+ //购物车2x
|
|
113
|
+ tpShopTypeImg.add("http://jingcheng-h5temp.oss-cn-shanghai.aliyuncs.com/1557816639291.png?Expires=1559644026&OSSAccessKeyId=LTAIkc75dpkJw8Lb");
|
|
114
|
+ tpShopType.setImg(tpShopTypeImg);
|
|
115
|
+ }
|
|
116
|
+ if (a == 3){
|
|
117
|
+ //休闲
|
|
118
|
+ List<String> tpShopTypeImg = new ArrayList<>();
|
|
119
|
+ // 休闲3x
|
|
120
|
+ tpShopTypeImg.add("http://jingcheng-h5temp.oss-cn-shanghai.aliyuncs.com/1557817084664.png?Expires=1559644472&OSSAccessKeyId=LTAIkc75dpkJw8Lb");
|
|
121
|
+ // 休闲2x
|
|
122
|
+ tpShopTypeImg.add("http://jingcheng-h5temp.oss-cn-shanghai.aliyuncs.com/1557817102003.png?Expires=1559644489&OSSAccessKeyId=LTAIkc75dpkJw8Lb");
|
|
123
|
+ tpShopType.setImg(tpShopTypeImg);
|
|
124
|
+ }
|
|
125
|
+ if (a == 4){
|
|
126
|
+ // 运动图片
|
|
127
|
+ List<String> tpShopTypeImg = new ArrayList<>();
|
|
128
|
+ // 运动图片3x
|
|
129
|
+ tpShopTypeImg.add("http://jingcheng-h5temp.oss-cn-shanghai.aliyuncs.com/1557817239384.png?Expires=1559644626&OSSAccessKeyId=LTAIkc75dpkJw8Lb");
|
|
130
|
+ // 运动图片2x
|
|
131
|
+ tpShopTypeImg.add("http://jingcheng-h5temp.oss-cn-shanghai.aliyuncs.com/1557817273156.png?Expires=1559644660&OSSAccessKeyId=LTAIkc75dpkJw8Lb");
|
|
132
|
+ tpShopType.setImg(tpShopTypeImg);
|
|
133
|
+ }
|
110
|
134
|
|
111
|
|
- //休闲
|
112
|
|
- List<String> tpShopTypeImgRecreation= new ArrayList<>();
|
113
|
|
- // 休闲3x
|
114
|
|
- tpShopTypeImgRecreation.add("http://jingcheng-h5temp.oss-cn-shanghai.aliyuncs.com/1557817084664.png?Expires=1559644472&OSSAccessKeyId=LTAIkc75dpkJw8Lb");
|
115
|
|
- // 休闲2x
|
116
|
|
- tpShopTypeImgRecreation.add("http://jingcheng-h5temp.oss-cn-shanghai.aliyuncs.com/1557817102003.png?Expires=1559644489&OSSAccessKeyId=LTAIkc75dpkJw8Lb");
|
|
135
|
+ }
|
117
|
136
|
|
118
|
|
- // 运动图片
|
119
|
|
- List<String> tpShopTypeImgExercise= new ArrayList<>();
|
120
|
|
- // 运动图片3x
|
121
|
|
- tpShopTypeImgExercise.add("http://jingcheng-h5temp.oss-cn-shanghai.aliyuncs.com/1557817239384.png?Expires=1559644626&OSSAccessKeyId=LTAIkc75dpkJw8Lb");
|
122
|
|
- // 运动图片2x
|
123
|
|
- tpShopTypeImgExercise.add("http://jingcheng-h5temp.oss-cn-shanghai.aliyuncs.com/1557817273156.png?Expires=1559644660&OSSAccessKeyId=LTAIkc75dpkJw8Lb");
|
|
137
|
+ }
|
124
|
138
|
Map<String,Object> hashMap= new HashMap<>();
|
125
|
|
- hashMap.put("tpShopType",tpShopType);
|
|
139
|
+ hashMap.put("tpShopType",tpShopTypeList);
|
126
|
140
|
hashMap.put("tpShopList",tpShopList);
|
127
|
|
- hashMap.put("tpShopTypeImgShop",tpShopTypeImgShop);
|
128
|
|
- hashMap.put("tpShopTypeImgCate",tpShopTypeImgCate);
|
129
|
|
- hashMap.put("tpShopTypeImgRecreation",tpShopTypeImgRecreation);
|
130
|
|
- hashMap.put("tpShopTypeImgExercise",tpShopTypeImgExercise);
|
131
|
141
|
response.addSuccess(hashMap);
|
132
|
142
|
return response;
|
133
|
143
|
|