|
@@ -32,7 +32,6 @@ import shop.alien.entity.store.vo.*;
|
|
|
import shop.alien.mapper.*;
|
|
|
import shop.alien.store.config.BaseRedisService;
|
|
|
import shop.alien.store.config.GaoDeMapUtil;
|
|
|
-import shop.alien.store.service.LifeUserOrderService;
|
|
|
import shop.alien.store.service.NearMeService;
|
|
|
import shop.alien.store.service.StoreInfoService;
|
|
|
import shop.alien.store.util.FileUploadUtil;
|
|
@@ -103,6 +102,8 @@ public class StoreInfoServiceImpl extends ServiceImpl<StoreInfoMapper, StoreInfo
|
|
|
|
|
|
private final StoreInfoDraftMapper storeInfoDraftMapper;
|
|
|
|
|
|
+ private final LifeNoticeMapper lifeNoticeMapper;
|
|
|
+
|
|
|
@Value("${spring.web.resources.excel-path}")
|
|
|
private String excelPath;
|
|
|
|
|
@@ -326,7 +327,11 @@ public class StoreInfoServiceImpl extends ServiceImpl<StoreInfoMapper, StoreInfo
|
|
|
long daysToExpire = ChronoUnit.DAYS.between(nowLocal, expDate);
|
|
|
record.setDaysToExpire(daysToExpire);
|
|
|
}
|
|
|
-
|
|
|
+ // 处理状态
|
|
|
+ if(record.getLogoutFlag() == 1){
|
|
|
+ record.setStoreStatusStr("已注销");
|
|
|
+ record.setStoreStatus(2);
|
|
|
+ }
|
|
|
// 根据八大类不同进行个性化操作
|
|
|
if (StringUtils.isNotEmpty(businessSection)) {
|
|
|
switch (businessSection) {
|
|
@@ -414,6 +419,9 @@ public class StoreInfoServiceImpl extends ServiceImpl<StoreInfoMapper, StoreInfo
|
|
|
return false;
|
|
|
}
|
|
|
store.setStorePosition(LonAndLat);
|
|
|
+ if(null == store.getCommissionRate()){
|
|
|
+ store.setCommissionRate("0.03");
|
|
|
+ }
|
|
|
this.save(store);
|
|
|
Set<String> fileNameSet = multipartRequest.getMultiFileMap().keySet();
|
|
|
if (!fileNameSet.isEmpty()) {
|
|
@@ -511,6 +519,9 @@ public class StoreInfoServiceImpl extends ServiceImpl<StoreInfoMapper, StoreInfo
|
|
|
EssentialCityCode essentialCityCode3 =
|
|
|
essentialCityCodeMapper.selectOne(new LambdaQueryWrapper<EssentialCityCode>().eq(EssentialCityCode::getAreaCode, storeInfo.getAdministrativeRegionDistrictAdcode()));
|
|
|
storeInfo.setAdministrativeRegionDistrictName(essentialCityCode3.getAreaName());
|
|
|
+ if(null == storeInfo.getCommissionRate()){
|
|
|
+ storeInfo.setCommissionRate("3");
|
|
|
+ }
|
|
|
storeInfoMapper.insert(storeInfo);
|
|
|
result.setId(storeInfo.getId());
|
|
|
nearMeService.inGeolocation(new Point(Double.parseDouble(storeInfoDto.getStorePositionLongitude()),
|
|
@@ -1011,9 +1022,25 @@ public class StoreInfoServiceImpl extends ServiceImpl<StoreInfoMapper, StoreInfo
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public void approveStoreInfo(String storeId, Integer approvalStatus) {
|
|
|
+ public void approveStoreInfo(String storeId, Integer approvalStatus, String reason) {
|
|
|
StoreInfo storeInfo = storeInfoMapper.selectById(storeId);
|
|
|
storeInfo.setStoreApplicationStatus(approvalStatus);
|
|
|
+ storeInfo.setReason(reason);
|
|
|
+ StoreUser storeUser = storeUserMapper.selectOne(new LambdaQueryWrapper<StoreUser>().eq(StoreUser::getStoreId, storeInfo.getId()).eq(StoreUser::getDeleteFlag,0));
|
|
|
+ // 发送审核通知
|
|
|
+ LifeNotice lifeNotice = new LifeNotice();
|
|
|
+ lifeNotice.setSenderId("system");
|
|
|
+ lifeNotice.setReceiverId("store_"+ storeUser.getPhone());
|
|
|
+ lifeNotice.setBusinessId(storeInfo.getId());
|
|
|
+ lifeNotice.setTitle("店铺审核通知");
|
|
|
+ if(2 == approvalStatus){
|
|
|
+ lifeNotice.setContext("您的店铺申请被驳回,原因为:"+reason);
|
|
|
+ } else {
|
|
|
+ lifeNotice.setContext("您的店铺申请已通过");
|
|
|
+ }
|
|
|
+ lifeNotice.setNoticeType(1); // 系统通知
|
|
|
+ lifeNotice.setIsRead(0);
|
|
|
+ lifeNoticeMapper.insert(lifeNotice);
|
|
|
storeInfoMapper.updateById(storeInfo);
|
|
|
}
|
|
|
|
|
@@ -1336,4 +1363,12 @@ public class StoreInfoServiceImpl extends ServiceImpl<StoreInfoMapper, StoreInfo
|
|
|
queryWrapper.eq(StoreInfo::getStoreTel, storeTel);
|
|
|
return storeInfoMapper.selectList(queryWrapper);
|
|
|
}
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public int editStoreCommissionRate(StoreInfoDto storeInfoDto) {
|
|
|
+ LambdaUpdateWrapper<StoreInfo> wrapper = new LambdaUpdateWrapper<>();
|
|
|
+ wrapper.eq(StoreInfo::getId, storeInfoDto.getId());
|
|
|
+ wrapper.set(StoreInfo::getCommissionRate, storeInfoDto.getCommissionRate());
|
|
|
+ return storeInfoMapper.update(null, wrapper);
|
|
|
+ }
|
|
|
}
|