|
@ -1,5 +1,10 @@ |
|
|
package com.epmet.modules.badege.service.impl; |
|
|
package com.epmet.modules.badege.service.impl; |
|
|
|
|
|
|
|
|
|
|
|
import com.epmet.commons.tools.exception.RenException; |
|
|
|
|
|
import com.epmet.commons.tools.utils.ConvertUtils; |
|
|
|
|
|
import com.epmet.commons.tools.utils.Result; |
|
|
|
|
|
import com.epmet.dto.form.UserBadgeListFormDTO; |
|
|
|
|
|
import com.epmet.dto.result.UserBadgeListResultDTO; |
|
|
import com.epmet.feign.EpmetUserOpenFeignClient; |
|
|
import com.epmet.feign.EpmetUserOpenFeignClient; |
|
|
import com.epmet.modules.badege.service.BadgeService; |
|
|
import com.epmet.modules.badege.service.BadgeService; |
|
|
import com.epmet.resi.mine.dto.from.BadgeListFormDTO; |
|
|
import com.epmet.resi.mine.dto.from.BadgeListFormDTO; |
|
@ -8,6 +13,7 @@ import lombok.extern.slf4j.Slf4j; |
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
import org.springframework.stereotype.Service; |
|
|
import org.springframework.stereotype.Service; |
|
|
|
|
|
|
|
|
|
|
|
import java.util.ArrayList; |
|
|
import java.util.List; |
|
|
import java.util.List; |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
@ -23,6 +29,15 @@ public class BadgeServiceImpl implements BadgeService { |
|
|
|
|
|
|
|
|
@Override |
|
|
@Override |
|
|
public List<BadgeListResultDTO> getBadgeList(BadgeListFormDTO badgeListFormDTO) { |
|
|
public List<BadgeListResultDTO> getBadgeList(BadgeListFormDTO badgeListFormDTO) { |
|
|
return null; |
|
|
UserBadgeListFormDTO form = ConvertUtils.sourceToTarget(badgeListFormDTO, UserBadgeListFormDTO.class); |
|
|
|
|
|
Result<List<UserBadgeListResultDTO>> listResult = epmetUserOpenFeignClient.selectBadgeList(form); |
|
|
|
|
|
if (!listResult.success()){ |
|
|
|
|
|
throw new RenException("获取徽章点亮列表失败......"); |
|
|
|
|
|
} |
|
|
|
|
|
if (null == listResult.getData()){ |
|
|
|
|
|
return new ArrayList<>(); |
|
|
|
|
|
} |
|
|
|
|
|
List<BadgeListResultDTO> result = ConvertUtils.sourceToTarget(listResult.getData(), BadgeListResultDTO.class); |
|
|
|
|
|
return result; |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|