feat:团队
This commit is contained in:
@@ -5,6 +5,7 @@ import com.cool.store.dto.decoration.TeamAreaMappingDTO;
|
|||||||
import com.cool.store.entity.decoration.TeamAreaMappingDO;
|
import com.cool.store.entity.decoration.TeamAreaMappingDO;
|
||||||
import com.cool.store.mapper.decoration.TeamAreaMappingMapper;
|
import com.cool.store.mapper.decoration.TeamAreaMappingMapper;
|
||||||
import org.apache.commons.collections4.CollectionUtils;
|
import org.apache.commons.collections4.CollectionUtils;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
import org.springframework.stereotype.Repository;
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
@@ -52,6 +53,10 @@ public class TeamAreaMappingDAO {
|
|||||||
return teamAreaMappingMapper.deletedIds(ids);
|
return teamAreaMappingMapper.deletedIds(ids);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public TeamAreaMappingDO getByCityId(Long cityId){
|
||||||
|
return teamAreaMappingMapper.getByCityId(cityId);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
public Map<Long, List<TeamAreaMappingDTO>> listByTeamIdList(List<Long> teamIdList){
|
public Map<Long, List<TeamAreaMappingDTO>> listByTeamIdList(List<Long> teamIdList){
|
||||||
if (CollectionUtils.isEmpty(teamIdList)){
|
if (CollectionUtils.isEmpty(teamIdList)){
|
||||||
|
|||||||
@@ -44,6 +44,13 @@ public interface DecorationHandleService {
|
|||||||
*/
|
*/
|
||||||
PageInfo<DecorationTeamDTO> listByCondition(PageBasicInfo pageBasicInfo );
|
PageInfo<DecorationTeamDTO> listByCondition(PageBasicInfo pageBasicInfo );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* openCityId
|
||||||
|
* @param openCityId
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
Long getDecorationTeamIdByCityId(Long openCityId);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -6,6 +6,8 @@ import com.cool.store.dao.decoration.TeamAreaMappingDAO;
|
|||||||
import com.cool.store.dto.decoration.DecorationTeamDTO;
|
import com.cool.store.dto.decoration.DecorationTeamDTO;
|
||||||
import com.cool.store.dto.decoration.TeamAreaMappingDTO;
|
import com.cool.store.dto.decoration.TeamAreaMappingDTO;
|
||||||
import com.cool.store.entity.decoration.DecorationTeamConfigDO;
|
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.enums.ErrorCodeEnum;
|
||||||
import com.cool.store.exception.ServiceException;
|
import com.cool.store.exception.ServiceException;
|
||||||
import com.cool.store.request.decoration.AddTeamRequest;
|
import com.cool.store.request.decoration.AddTeamRequest;
|
||||||
@@ -105,6 +107,19 @@ public class DecorationHandleServiceImpl implements DecorationHandleService {
|
|||||||
return result;
|
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() {
|
public String getNextNumber() {
|
||||||
Long current = redisUtilPool.incrby("counter_key", 1);
|
Long current = redisUtilPool.incrby("counter_key", 1);
|
||||||
|
|||||||
Reference in New Issue
Block a user