feat:团队

This commit is contained in:
苏竹红
2025-10-31 15:14:08 +08:00
parent c498a017ce
commit 18fb551a72
3 changed files with 27 additions and 0 deletions

View File

@@ -44,6 +44,13 @@ public interface DecorationHandleService {
*/
PageInfo<DecorationTeamDTO> listByCondition(PageBasicInfo pageBasicInfo );
/**
* openCityId
* @param openCityId
* @return
*/
Long getDecorationTeamIdByCityId(Long openCityId);

View File

@@ -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);