2 信息
This commit is contained in:
@@ -101,7 +101,21 @@ public class MyUserController {
|
||||
wrapper.eq(UserVip::getState,0);
|
||||
}
|
||||
}
|
||||
wrapper.leftJoin(UserMigration.class,UserMigration::getUserId,MyUserEntity::getId);
|
||||
wrapper.selectAll(MyUserEntity.class);
|
||||
wrapper.selectAs(UserMigration::getCreateTime,"migrationTime");
|
||||
if(p.getSortKey().equals("")||(p.getSortKey().equals("createTime") && p.getSortValue().equals("descending"))){
|
||||
wrapper.orderByDesc(MyUserEntity::getCreateTime);
|
||||
}else if (p.getSortKey().equals("createTime") && p.getSortValue().equals("ascending")){
|
||||
wrapper.orderByAsc(MyUserEntity::getCreateTime);
|
||||
}else if (p.getSortKey().equals("migrationTime") && p.getSortValue().equals("ascending")){
|
||||
wrapper.orderByAsc(UserMigration::getCreateTime);
|
||||
}else if (p.getSortKey().equals("migrationTime") && p.getSortValue().equals("descending")){
|
||||
wrapper.orderByDesc(UserMigration::getCreateTime);
|
||||
}else{
|
||||
wrapper.orderByDesc(MyUserEntity::getCreateTime);
|
||||
}
|
||||
|
||||
Page<MyUserEntity> myUserEntityPage = userService.getBaseMapper().selectPage(new Page<MyUserEntity>(p.getPage(), p.getLimit()), wrapper);
|
||||
for (MyUserEntity myUserEntity : myUserEntityPage.getRecords()) {
|
||||
myUserEntity.setUserVips(userVipService.list(new LambdaQueryWrapper<UserVip>()
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
package com.peanut.modules.book.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.peanut.modules.common.entity.UserMigration;
|
||||
|
||||
public interface UserMigrationService extends IService<UserMigration> {
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
package com.peanut.modules.book.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.peanut.modules.book.service.UserMigrationService;
|
||||
import com.peanut.modules.common.dao.UserMigrationDao;
|
||||
import com.peanut.modules.common.entity.UserMigration;
|
||||
|
||||
public class UserMigrationServiceImpl extends ServiceImpl<UserMigrationDao, UserMigration> implements UserMigrationService {
|
||||
}
|
||||
@@ -16,4 +16,8 @@ public class PageIdDto implements Serializable {
|
||||
private Integer limit;
|
||||
|
||||
private Integer page;
|
||||
|
||||
private String sortKey;
|
||||
|
||||
private String sortValue;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
package com.peanut.modules.common.dao;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.peanut.modules.common.entity.MyUserEntity;
|
||||
import com.peanut.modules.common.entity.UserMigration;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @author yl
|
||||
* @email yl328572838@163.com
|
||||
* @date 2022-08-10 14:20:12
|
||||
*/
|
||||
@Mapper
|
||||
public interface UserMigrationDao extends BaseMapper<UserMigration> {
|
||||
|
||||
|
||||
}
|
||||
@@ -158,5 +158,7 @@ public class MyUserEntity implements Serializable {
|
||||
private List<UserVip> userVips;
|
||||
@TableField(exist = false)
|
||||
private String contributionScore;
|
||||
@TableField(exist = false)
|
||||
private String migrationTime;
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
package com.peanut.modules.common.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
@TableName("user_migration")
|
||||
public class UserMigration {
|
||||
@TableId
|
||||
private Integer id;
|
||||
private Integer userId;
|
||||
private Integer wumenUserId;
|
||||
private Integer newWumenUserId;
|
||||
private String type;
|
||||
private Date createTime;
|
||||
@TableLogic
|
||||
private Integer delFlag;
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user