15 changed files with 354 additions and 1 deletions
@ -0,0 +1,21 @@ |
|||
package com.epmet.dataaggre.dto.epmetuser.result; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* @Author zxc |
|||
* @DateTime 2021/3/30 上午11:04 |
|||
* @DESC |
|||
*/ |
|||
@Data |
|||
public class UserInfosResultDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 7129564173128153335L; |
|||
|
|||
private String userId; |
|||
private String userShowName; |
|||
private String headPhoto; |
|||
|
|||
} |
@ -0,0 +1,35 @@ |
|||
package com.epmet.dataaggre.dto.resigroup.form; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import javax.validation.constraints.NotBlank; |
|||
import javax.validation.constraints.NotNull; |
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* @Author zxc |
|||
* @DateTime 2021/3/30 上午9:34 |
|||
* @DESC |
|||
*/ |
|||
@Data |
|||
public class CandidateListFormDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 6184071611057671961L; |
|||
|
|||
public interface CandidateListForm{} |
|||
|
|||
/** |
|||
* 小组ID |
|||
*/ |
|||
@NotBlank(message = "小组ID不能为空",groups = CandidateListForm.class) |
|||
private String groupId; |
|||
|
|||
@NotNull(message = "pageNo不能为空",groups = CandidateListForm.class) |
|||
private Integer pageNo; |
|||
|
|||
@NotNull(message = "pageSize不能为空",groups = CandidateListForm.class) |
|||
private Integer pageSize; |
|||
|
|||
private String customerId; |
|||
|
|||
} |
@ -0,0 +1,57 @@ |
|||
package com.epmet.dataaggre.dto.resigroup.result; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.ArrayList; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @Author zxc |
|||
* @DateTime 2021/3/30 上午9:15 |
|||
* @DESC |
|||
*/ |
|||
@Data |
|||
public class CandidateListResultDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 4720936429310456924L; |
|||
|
|||
/** |
|||
* resi_group_member.id: 成员id |
|||
*/ |
|||
private String memberId; |
|||
|
|||
/** |
|||
* 组员的用户id |
|||
*/ |
|||
private String userId; |
|||
|
|||
/** |
|||
* 成员头像 |
|||
*/ |
|||
private String headPhoto; |
|||
|
|||
/** |
|||
* 成员的显示名称 |
|||
*/ |
|||
private String userShowName; |
|||
|
|||
/** |
|||
* 徽章Url集合 |
|||
*/ |
|||
private String leaderFlag; |
|||
|
|||
/** |
|||
* leader群主,member成员 |
|||
*/ |
|||
private List<String> badgeList; |
|||
|
|||
public CandidateListResultDTO() { |
|||
this.memberId = ""; |
|||
this.userId = ""; |
|||
this.headPhoto = ""; |
|||
this.userShowName = ""; |
|||
this.leaderFlag = ""; |
|||
this.badgeList = new ArrayList<>(); |
|||
} |
|||
} |
@ -0,0 +1,47 @@ |
|||
package com.epmet.dataaggre.redis; |
|||
|
|||
import com.epmet.commons.tools.redis.RedisUtils; |
|||
import com.epmet.dataaggre.constant.GroupConstant; |
|||
import lombok.extern.slf4j.Slf4j; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Component; |
|||
import org.springframework.util.CollectionUtils; |
|||
|
|||
import java.util.ArrayList; |
|||
import java.util.List; |
|||
import java.util.Map; |
|||
|
|||
/** |
|||
* @Author zxc |
|||
* @DateTime 2021/3/30 下午1:39 |
|||
* @DESC |
|||
*/ |
|||
@Component |
|||
@Slf4j |
|||
public class ResiGroupRedis { |
|||
|
|||
@Autowired |
|||
private RedisUtils redisUtils; |
|||
|
|||
/** |
|||
* @Description 获取用户徽章 |
|||
* @Param customerId |
|||
* @Param userId |
|||
* @author zxc |
|||
* @date 2021/3/30 下午3:33 |
|||
*/ |
|||
public List<String> getBadgeInfoByUserId(String customerId,String userId){ |
|||
String key = GroupConstant.BADGE_KEY+customerId+":"+userId; |
|||
List<Object> result = redisUtils.getListLrange(key); |
|||
if (!CollectionUtils.isEmpty(result)){ |
|||
List<String> icons = new ArrayList<>(); |
|||
for (Object o : result) { |
|||
Map<String,String> map = (Map<String, String>) o; |
|||
icons.add(map.get(GroupConstant.BADGE_ICON)); |
|||
} |
|||
return icons; |
|||
} |
|||
return new ArrayList<>(); |
|||
} |
|||
|
|||
} |
@ -1,8 +1,21 @@ |
|||
package com.epmet.dataaggre.service.epmetuser; |
|||
|
|||
import com.epmet.dataaggre.dto.epmetuser.result.UserInfosResultDTO; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @Author zxc |
|||
* @DateTime 2020/12/25 上午9:20 |
|||
*/ |
|||
public interface EpmetUserService { |
|||
|
|||
/** |
|||
* @Description 根据UserIds查询 |
|||
* @Param userIds |
|||
* @author zxc |
|||
* @date 2021/3/30 上午11:07 |
|||
*/ |
|||
List<UserInfosResultDTO> selectUserInfosByUserIds(List<String> userIds); |
|||
|
|||
} |
|||
|
Loading…
Reference in new issue