|
@@ -2725,7 +2725,7 @@ public class CustomerServiceImpl extends BaseMybatisDao<UserMapper> implements C
|
|
|
@Override
|
|
@Override
|
|
|
public boolean checkChannel(List<String> uids) {
|
|
public boolean checkChannel(List<String> uids) {
|
|
|
for (String uid : uids) {
|
|
for (String uid : uids) {
|
|
|
- List<UserFollow> list = userFollowMapper.selectbyUid(uid, TokenManager.getAdminId());
|
|
|
|
|
|
|
+ List<UserFollow> list = userFollowMapper.selectByUidAndUid(uid, TokenManager.getAdminId());
|
|
|
if (!list.isEmpty()) {
|
|
if (!list.isEmpty()) {
|
|
|
return true;
|
|
return true;
|
|
|
}
|
|
}
|
|
@@ -3192,8 +3192,30 @@ public class CustomerServiceImpl extends BaseMybatisDao<UserMapper> implements C
|
|
|
|
|
|
|
|
@Override
|
|
@Override
|
|
|
public Object selectMyUserDetails(String id) {
|
|
public Object selectMyUserDetails(String id) {
|
|
|
-// publicReleaseLogMapper
|
|
|
|
|
- return null;
|
|
|
|
|
|
|
+ Map<String, Object> params = new LinkedHashMap<>();
|
|
|
|
|
+ List<MyUserDetailsBo> publicReleases = publicReleaseMapper.selectByUid(id);
|
|
|
|
|
+ MyUserDetailsBo maxPr = new MyUserDetailsBo();
|
|
|
|
|
+ MyUserDetailsBo minPr = new MyUserDetailsBo();
|
|
|
|
|
+ for (MyUserDetailsBo e : publicReleases) {
|
|
|
|
|
+ if (maxPr.getReleaseStart()==null)maxPr=e;
|
|
|
|
|
+ if (maxPr.getReleaseStart().before(e.getReleaseStart()))maxPr=e;
|
|
|
|
|
+ if (minPr.getReleaseStart()==null)minPr=e;
|
|
|
|
|
+ if (minPr.getReleaseStart().after(e.getReleaseStart()))minPr=e;
|
|
|
|
|
+ }
|
|
|
|
|
+ List<UserFollow> userFollows = userFollowMapper.selectByUidAndUid(id, null);
|
|
|
|
|
+ Optional<UserFollow> latestFollow = userFollows.stream()
|
|
|
|
|
+ .max(Comparator.comparing(UserFollow::getCreateTime));
|
|
|
|
|
+ params.put("count",publicReleases.size());
|
|
|
|
|
+ params.put("minPublicRelease",minPr);
|
|
|
|
|
+ params.put("maxPublicRelease",maxPr);
|
|
|
|
|
+ latestFollow.ifPresent(userFollow -> {
|
|
|
|
|
+ Map<String, Object> map = new LinkedHashMap<>();
|
|
|
|
|
+ map.put("id",userFollow.getId());
|
|
|
|
|
+ map.put("followTime",DateUtils.formatDate(userFollow.getCreateTime(),AFTConstants.YYYYMMDD));
|
|
|
|
|
+ map.put("followName",userFollow.getFollowName());
|
|
|
|
|
+ params.put("latestFollow",map);
|
|
|
|
|
+ });
|
|
|
|
|
+ return params;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
}
|
|
}
|