From 18fb551a728f2b590a932ea11faaf9698944a6a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8B=8F=E7=AB=B9=E7=BA=A2?= Date: Fri, 31 Oct 2025 15:14:08 +0800 Subject: [PATCH] =?UTF-8?q?feat:=E5=9B=A2=E9=98=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../store/dao/decoration/TeamAreaMappingDAO.java | 5 +++++ .../store/service/DecorationHandleService.java | 7 +++++++ .../service/impl/DecorationHandleServiceImpl.java | 15 +++++++++++++++ 3 files changed, 27 insertions(+) diff --git a/coolstore-partner-dao/src/main/java/com/cool/store/dao/decoration/TeamAreaMappingDAO.java b/coolstore-partner-dao/src/main/java/com/cool/store/dao/decoration/TeamAreaMappingDAO.java index e92e5e2af..3a6313a9b 100644 --- a/coolstore-partner-dao/src/main/java/com/cool/store/dao/decoration/TeamAreaMappingDAO.java +++ b/coolstore-partner-dao/src/main/java/com/cool/store/dao/decoration/TeamAreaMappingDAO.java @@ -5,6 +5,7 @@ import com.cool.store.dto.decoration.TeamAreaMappingDTO; import com.cool.store.entity.decoration.TeamAreaMappingDO; import com.cool.store.mapper.decoration.TeamAreaMappingMapper; import org.apache.commons.collections4.CollectionUtils; +import org.apache.ibatis.annotations.Param; import org.springframework.stereotype.Repository; import javax.annotation.Resource; @@ -52,6 +53,10 @@ public class TeamAreaMappingDAO { return teamAreaMappingMapper.deletedIds(ids); } + public TeamAreaMappingDO getByCityId(Long cityId){ + return teamAreaMappingMapper.getByCityId(cityId); + } + public Map> listByTeamIdList(List teamIdList){ if (CollectionUtils.isEmpty(teamIdList)){ diff --git a/coolstore-partner-service/src/main/java/com/cool/store/service/DecorationHandleService.java b/coolstore-partner-service/src/main/java/com/cool/store/service/DecorationHandleService.java index 578017d5f..5207a464a 100644 --- a/coolstore-partner-service/src/main/java/com/cool/store/service/DecorationHandleService.java +++ b/coolstore-partner-service/src/main/java/com/cool/store/service/DecorationHandleService.java @@ -44,6 +44,13 @@ public interface DecorationHandleService { */ PageInfo listByCondition(PageBasicInfo pageBasicInfo ); + /** + * openCityId + * @param openCityId + * @return + */ + Long getDecorationTeamIdByCityId(Long openCityId); + diff --git a/coolstore-partner-service/src/main/java/com/cool/store/service/impl/DecorationHandleServiceImpl.java b/coolstore-partner-service/src/main/java/com/cool/store/service/impl/DecorationHandleServiceImpl.java index 3eaba3aba..8a4a81594 100644 --- a/coolstore-partner-service/src/main/java/com/cool/store/service/impl/DecorationHandleServiceImpl.java +++ b/coolstore-partner-service/src/main/java/com/cool/store/service/impl/DecorationHandleServiceImpl.java @@ -6,6 +6,8 @@ import com.cool.store.dao.decoration.TeamAreaMappingDAO; import com.cool.store.dto.decoration.DecorationTeamDTO; import com.cool.store.dto.decoration.TeamAreaMappingDTO; import com.cool.store.entity.decoration.DecorationTeamConfigDO; +import com.cool.store.entity.decoration.TeamAreaMappingDO; +import com.cool.store.enums.Decoration.DecorationUseSystemEnum; import com.cool.store.enums.ErrorCodeEnum; import com.cool.store.exception.ServiceException; import com.cool.store.request.decoration.AddTeamRequest; @@ -105,6 +107,19 @@ public class DecorationHandleServiceImpl implements DecorationHandleService { return result; } + @Override + public Long getDecorationTeamIdByCityId(Long openCityId) { + if (openCityId==null){ + throw new ServiceException(ErrorCodeEnum.PARAMS_REQUIRED); + } + TeamAreaMappingDO cityInfo = teamAreaMappingDAO.getByCityId(openCityId); + if (Objects.isNull(cityInfo)){ + return null; + } + DecorationTeamConfigDO teamInfo = decorationTeamConfigDAO.getById(cityInfo.getTeamId()); + return teamInfo.getId(); + } + public String getNextNumber() { Long current = redisUtilPool.incrby("counter_key", 1);