|
@@ -34,10 +34,7 @@ import shop.alien.mapper.*;
|
|
|
import shop.alien.store.config.BaseRedisService;
|
|
import shop.alien.store.config.BaseRedisService;
|
|
|
import shop.alien.store.config.GaoDeMapUtil;
|
|
import shop.alien.store.config.GaoDeMapUtil;
|
|
|
import shop.alien.store.config.WebSocketProcess;
|
|
import shop.alien.store.config.WebSocketProcess;
|
|
|
-import shop.alien.store.service.NearMeService;
|
|
|
|
|
-import shop.alien.store.service.StoreClockInService;
|
|
|
|
|
-import shop.alien.store.service.StoreCommentService;
|
|
|
|
|
-import shop.alien.store.service.StoreInfoService;
|
|
|
|
|
|
|
+import shop.alien.store.service.*;
|
|
|
import shop.alien.store.util.CommonConstant;
|
|
import shop.alien.store.util.CommonConstant;
|
|
|
import shop.alien.store.util.FileUploadUtil;
|
|
import shop.alien.store.util.FileUploadUtil;
|
|
|
import shop.alien.store.util.GroupConstant;
|
|
import shop.alien.store.util.GroupConstant;
|
|
@@ -46,7 +43,7 @@ import shop.alien.util.common.DistanceUtil;
|
|
|
import shop.alien.util.common.constant.CouponStatusEnum;
|
|
import shop.alien.util.common.constant.CouponStatusEnum;
|
|
|
import shop.alien.util.common.constant.CouponTypeEnum;
|
|
import shop.alien.util.common.constant.CouponTypeEnum;
|
|
|
import shop.alien.util.common.constant.OrderStatusEnum;
|
|
import shop.alien.util.common.constant.OrderStatusEnum;
|
|
|
-
|
|
|
|
|
|
|
+import javax.annotation.Resource;
|
|
|
import java.io.File;
|
|
import java.io.File;
|
|
|
import java.io.IOException;
|
|
import java.io.IOException;
|
|
|
import java.net.URLEncoder;
|
|
import java.net.URLEncoder;
|
|
@@ -92,6 +89,8 @@ public class StoreInfoServiceImpl extends ServiceImpl<StoreInfoMapper, StoreInfo
|
|
|
|
|
|
|
|
private final BaseRedisService baseRedisService;
|
|
private final BaseRedisService baseRedisService;
|
|
|
|
|
|
|
|
|
|
+ private final TagStoreRelationMapper tagStoreRelationMapper;
|
|
|
|
|
+
|
|
|
private final NearMeService nearMeService;
|
|
private final NearMeService nearMeService;
|
|
|
|
|
|
|
|
private final WebAuditMapper webAuditMapper;
|
|
private final WebAuditMapper webAuditMapper;
|
|
@@ -127,6 +126,9 @@ public class StoreInfoServiceImpl extends ServiceImpl<StoreInfoMapper, StoreInfo
|
|
|
private final AliOSSUtil aliOSSUtil;
|
|
private final AliOSSUtil aliOSSUtil;
|
|
|
|
|
|
|
|
private final WebSocketProcess webSocketProcess;
|
|
private final WebSocketProcess webSocketProcess;
|
|
|
|
|
+ @Resource
|
|
|
|
|
+ private StoreIncomeDetailsRecordService storeIncomeDetailsRecordService;
|
|
|
|
|
+
|
|
|
|
|
|
|
|
@Value("${spring.web.resources.excel-path}")
|
|
@Value("${spring.web.resources.excel-path}")
|
|
|
private String excelPath;
|
|
private String excelPath;
|
|
@@ -644,6 +646,19 @@ public class StoreInfoServiceImpl extends ServiceImpl<StoreInfoMapper, StoreInfo
|
|
|
storeImgMapper.insert(storeImg);
|
|
storeImgMapper.insert(storeImg);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ //初始化标签数据
|
|
|
|
|
+ LambdaQueryWrapper<TagStoreRelation> tagStoreRelationLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
|
|
|
|
+ tagStoreRelationLambdaQueryWrapper.eq(TagStoreRelation::getStoreId, storeInfo.getId());
|
|
|
|
|
+ tagStoreRelationLambdaQueryWrapper.eq(TagStoreRelation::getDeleteFlag, 0);
|
|
|
|
|
+ int tagStoreCount = tagStoreRelationMapper.selectCount(tagStoreRelationLambdaQueryWrapper);
|
|
|
|
|
+ if(tagStoreCount == 0){
|
|
|
|
|
+ TagStoreRelation tagStoreRelation = new TagStoreRelation();
|
|
|
|
|
+ tagStoreRelation.setStoreId(storeInfo.getId());
|
|
|
|
|
+ tagStoreRelation.setDeleteFlag(0);
|
|
|
|
|
+ tagStoreRelationMapper.insert(tagStoreRelation);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
// 发送通知
|
|
// 发送通知
|
|
|
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
|
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
|
|
String commonDate = simpleDateFormat.format(new Date());
|
|
String commonDate = simpleDateFormat.format(new Date());
|
|
@@ -1047,8 +1062,8 @@ public class StoreInfoServiceImpl extends ServiceImpl<StoreInfoMapper, StoreInfo
|
|
|
// 当前登录用户是否收藏
|
|
// 当前登录用户是否收藏
|
|
|
LambdaUpdateWrapper<LifeCollect> shouCangWrapper = new LambdaUpdateWrapper<>();
|
|
LambdaUpdateWrapper<LifeCollect> shouCangWrapper = new LambdaUpdateWrapper<>();
|
|
|
shouCangWrapper.eq(LifeCollect::getUserId, userId).eq(LifeCollect::getStoreId, storeId);
|
|
shouCangWrapper.eq(LifeCollect::getUserId, userId).eq(LifeCollect::getStoreId, storeId);
|
|
|
- LifeCollect shouCang = lifeCollectMapper.selectOne(shouCangWrapper);
|
|
|
|
|
- if (null == shouCang) {
|
|
|
|
|
|
|
+ List<LifeCollect> shouCangList = lifeCollectMapper.selectList(shouCangWrapper);
|
|
|
|
|
+ if (null == shouCangList || shouCangList.isEmpty()) {
|
|
|
result.setCollection(0);
|
|
result.setCollection(0);
|
|
|
} else {
|
|
} else {
|
|
|
result.setCollection(1);
|
|
result.setCollection(1);
|
|
@@ -1917,10 +1932,21 @@ public class StoreInfoServiceImpl extends ServiceImpl<StoreInfoMapper, StoreInfo
|
|
|
LambdaQueryWrapper<StoreInfo> queryWrapper = new LambdaQueryWrapper<>();
|
|
LambdaQueryWrapper<StoreInfo> queryWrapper = new LambdaQueryWrapper<>();
|
|
|
queryWrapper.eq(StoreInfo::getId, id);
|
|
queryWrapper.eq(StoreInfo::getId, id);
|
|
|
StoreInfo storeInfo = storeInfoMapper.selectOne(queryWrapper);
|
|
StoreInfo storeInfo = storeInfoMapper.selectOne(queryWrapper);
|
|
|
|
|
+// 当前时间 string类型的当前时间
|
|
|
|
|
+ SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
|
|
|
|
+ Date date = new Date();
|
|
|
|
|
+ String formattedDate = sdf.format(date);
|
|
|
|
|
+ Calendar calendar = Calendar.getInstance();
|
|
|
|
|
+ calendar.setTime(date);
|
|
|
|
|
+ calendar.add(Calendar.DAY_OF_YEAR, -4);
|
|
|
|
|
+ Date startDay = calendar.getTime();
|
|
|
|
|
+ String startDayS = sdf.format(startDay);
|
|
|
|
|
+ JSONObject jsonObject =storeIncomeDetailsRecordService.noYetPayment(id, 0, 0,startDayS,formattedDate, 1, 10);
|
|
|
|
|
+ String moneyNew = jsonObject.getString("money");
|
|
|
if (storeInfo != null) {
|
|
if (storeInfo != null) {
|
|
|
//判断店铺存在未体现金额 0:未通过 1:通过
|
|
//判断店铺存在未体现金额 0:未通过 1:通过
|
|
|
StoreUser storeUser = storeUserMapper.selectOne(new LambdaQueryWrapper<StoreUser>().eq(StoreUser::getStoreId, id));
|
|
StoreUser storeUser = storeUserMapper.selectOne(new LambdaQueryWrapper<StoreUser>().eq(StoreUser::getStoreId, id));
|
|
|
- if (storeUser.getMoney() != null && storeUser.getMoney() > 0) {
|
|
|
|
|
|
|
+ if (storeUser.getMoney() != null && storeUser.getMoney() > 0 && !"0.00".equals(moneyNew)) {
|
|
|
storeInfoMap.put("storeMoneyStatus", "0");
|
|
storeInfoMap.put("storeMoneyStatus", "0");
|
|
|
} else {
|
|
} else {
|
|
|
storeInfoMap.put("storeMoneyStatus", "1");
|
|
storeInfoMap.put("storeMoneyStatus", "1");
|
|
@@ -1932,14 +1958,20 @@ public class StoreInfoServiceImpl extends ServiceImpl<StoreInfoMapper, StoreInfo
|
|
|
} else {
|
|
} else {
|
|
|
storeInfoMap.put("storeOrderStatus", "1");
|
|
storeInfoMap.put("storeOrderStatus", "1");
|
|
|
}
|
|
}
|
|
|
- //判断店铺存在正在售卖的商品 0:未通过 1:通过
|
|
|
|
|
|
|
+ //判断店铺存在正在售卖的商品 0:未通过 1:通过 storeGoodsStatus 代金券 storeGroupStatus 团购
|
|
|
List<LifeGroupBuyMain> lifeGroupBuyMainList = lifeGroupBuyMainMapper.selectList(new LambdaQueryWrapper<LifeGroupBuyMain>().eq(LifeGroupBuyMain::getStoreId, id).eq(LifeGroupBuyMain::getStatus, 5).eq(LifeGroupBuyMain::getDeleteFlag, 0));
|
|
List<LifeGroupBuyMain> lifeGroupBuyMainList = lifeGroupBuyMainMapper.selectList(new LambdaQueryWrapper<LifeGroupBuyMain>().eq(LifeGroupBuyMain::getStoreId, id).eq(LifeGroupBuyMain::getStatus, 5).eq(LifeGroupBuyMain::getDeleteFlag, 0));
|
|
|
List<LifeCoupon> lifeCoupons = lifeCouponMapper.selectList(new LambdaQueryWrapper<LifeCoupon>().in(LifeCoupon::getStatus, 5).and(qw -> qw.gt(LifeCoupon::getSingleQty, 0)).eq(LifeCoupon::getStoreId, id).eq(LifeCoupon::getType, 1).eq(LifeCoupon::getDeleteFlag, 0));
|
|
List<LifeCoupon> lifeCoupons = lifeCouponMapper.selectList(new LambdaQueryWrapper<LifeCoupon>().in(LifeCoupon::getStatus, 5).and(qw -> qw.gt(LifeCoupon::getSingleQty, 0)).eq(LifeCoupon::getStoreId, id).eq(LifeCoupon::getType, 1).eq(LifeCoupon::getDeleteFlag, 0));
|
|
|
- if (!CollectionUtils.isEmpty(lifeCoupons) || !CollectionUtils.isEmpty(lifeGroupBuyMainList)) {
|
|
|
|
|
|
|
+ if (!CollectionUtils.isEmpty(lifeCoupons) ) {
|
|
|
storeInfoMap.put("storeGoodsStatus", "0");
|
|
storeInfoMap.put("storeGoodsStatus", "0");
|
|
|
} else {
|
|
} else {
|
|
|
storeInfoMap.put("storeGoodsStatus", "1");
|
|
storeInfoMap.put("storeGoodsStatus", "1");
|
|
|
}
|
|
}
|
|
|
|
|
+ if (!CollectionUtils.isEmpty(lifeGroupBuyMainList)) {
|
|
|
|
|
+ storeInfoMap.put("storeGroupStatus", "0");
|
|
|
|
|
+ } else {
|
|
|
|
|
+ storeInfoMap.put("storeGroupStatus", "1");
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
}
|
|
}
|
|
|
return storeInfoMap;
|
|
return storeInfoMap;
|
|
|
}
|
|
}
|