parent
d7519b6019
commit
ffeb866b91
@ -0,0 +1,34 @@
|
||||
package cn.iocoder.mall.admin.application.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@ApiModel("管理员分页 VO")
|
||||
public class AdminPageVO {
|
||||
|
||||
@ApiModelProperty(value = "管理员数组")
|
||||
private List<AdminVO> admins;
|
||||
@ApiModelProperty(value = "管理员总数")
|
||||
private Integer count;
|
||||
|
||||
public List<AdminVO> getAdmins() {
|
||||
return admins;
|
||||
}
|
||||
|
||||
public AdminPageVO setAdmins(List<AdminVO> admins) {
|
||||
this.admins = admins;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Integer getCount() {
|
||||
return count;
|
||||
}
|
||||
|
||||
public AdminPageVO setCount(Integer count) {
|
||||
this.count = count;
|
||||
return this;
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,67 @@
|
||||
package cn.iocoder.mall.admin.application.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
@ApiModel("管理员 VO")
|
||||
public class AdminVO {
|
||||
|
||||
@ApiModelProperty(value = "管理员编号", required = true, example = "1")
|
||||
private Integer id;
|
||||
@ApiModelProperty(value = "登陆账号", required = true, example = "15601691300")
|
||||
private String username;
|
||||
@ApiModelProperty(value = "昵称", required = true, example = "小王")
|
||||
private String nickname;
|
||||
@ApiModelProperty(value = "账号状态", required = true, example = "1")
|
||||
private Integer status;
|
||||
@ApiModelProperty(value = "创建时间", required = true, example = "时间戳格式")
|
||||
private Date createTime;
|
||||
|
||||
public Integer getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public AdminVO setId(Integer id) {
|
||||
this.id = id;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getUsername() {
|
||||
return username;
|
||||
}
|
||||
|
||||
public AdminVO setUsername(String username) {
|
||||
this.username = username;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getNickname() {
|
||||
return nickname;
|
||||
}
|
||||
|
||||
public AdminVO setNickname(String nickname) {
|
||||
this.nickname = nickname;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Integer getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public AdminVO setStatus(Integer status) {
|
||||
this.status = status;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Date getCreateTime() {
|
||||
return createTime;
|
||||
}
|
||||
|
||||
public AdminVO setCreateTime(Date createTime) {
|
||||
this.createTime = createTime;
|
||||
return this;
|
||||
}
|
||||
|
||||
}
|
||||
@ -1,16 +1,11 @@
|
||||
package cn.iocoder.mall.admin.api;
|
||||
|
||||
import cn.iocoder.common.framework.vo.CommonResult;
|
||||
import cn.iocoder.mall.admin.api.bo.AdminPageBO;
|
||||
import cn.iocoder.mall.admin.api.dto.AdminPageDTO;
|
||||
|
||||
public interface AdminService {
|
||||
|
||||
// /**
|
||||
// * 创建用户。一般在用户注册时,调用该方法
|
||||
// *
|
||||
// * TODO 芋艿,此处要传递一些用户注册时的相关信息,例如说 ip、ua、客户端来源等等。用于数据分析、风控等等。
|
||||
// *
|
||||
// * @param mobile 手机号
|
||||
// * @param code 手机验证码
|
||||
// * @return 用户
|
||||
// */
|
||||
// UserBO createUser(String mobile, String code) throws ServiceException;
|
||||
CommonResult<AdminPageBO> getAdminPage(AdminPageDTO adminPageDTO);
|
||||
|
||||
}
|
||||
@ -0,0 +1,72 @@
|
||||
package cn.iocoder.mall.admin.api.bo;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
public class AdminBO {
|
||||
|
||||
/**
|
||||
* 管理员编号
|
||||
*/
|
||||
private Integer id;
|
||||
/**
|
||||
* 登陆账号
|
||||
*/
|
||||
private String username;
|
||||
/**
|
||||
* 昵称
|
||||
*/
|
||||
private String nickname;
|
||||
/**
|
||||
* 账号状态
|
||||
*/
|
||||
private Integer status;
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private Date createTime;
|
||||
|
||||
public Integer getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public AdminBO setId(Integer id) {
|
||||
this.id = id;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getUsername() {
|
||||
return username;
|
||||
}
|
||||
|
||||
public AdminBO setUsername(String username) {
|
||||
this.username = username;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getNickname() {
|
||||
return nickname;
|
||||
}
|
||||
|
||||
public AdminBO setNickname(String nickname) {
|
||||
this.nickname = nickname;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Integer getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public AdminBO setStatus(Integer status) {
|
||||
this.status = status;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Date getCreateTime() {
|
||||
return createTime;
|
||||
}
|
||||
|
||||
public AdminBO setCreateTime(Date createTime) {
|
||||
this.createTime = createTime;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,34 @@
|
||||
package cn.iocoder.mall.admin.api.bo;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class AdminPageBO {
|
||||
|
||||
/**
|
||||
* 管理员数组
|
||||
*/
|
||||
private List<AdminBO> admins;
|
||||
/**
|
||||
* 总量
|
||||
*/
|
||||
private Integer count;
|
||||
|
||||
public List<AdminBO> getAdmins() {
|
||||
return admins;
|
||||
}
|
||||
|
||||
public AdminPageBO setAdmins(List<AdminBO> admins) {
|
||||
this.admins = admins;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Integer getCount() {
|
||||
return count;
|
||||
}
|
||||
|
||||
public AdminPageBO setCount(Integer count) {
|
||||
this.count = count;
|
||||
return this;
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,37 @@
|
||||
package cn.iocoder.mall.admin.api.dto;
|
||||
|
||||
public class AdminPageDTO {
|
||||
|
||||
private String nickname;
|
||||
|
||||
private Integer pageNo;
|
||||
private Integer pageSize;
|
||||
|
||||
public Integer getPageNo() {
|
||||
return pageNo;
|
||||
}
|
||||
|
||||
public AdminPageDTO setPageNo(Integer pageNo) {
|
||||
this.pageNo = pageNo;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Integer getPageSize() {
|
||||
return pageSize;
|
||||
}
|
||||
|
||||
public AdminPageDTO setPageSize(Integer pageSize) {
|
||||
this.pageSize = pageSize;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getNickname() {
|
||||
return nickname;
|
||||
}
|
||||
|
||||
public AdminPageDTO setNickname(String nickname) {
|
||||
this.nickname = nickname;
|
||||
return this;
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,22 @@
|
||||
package cn.iocoder.mall.admin.convert;
|
||||
|
||||
import cn.iocoder.mall.admin.api.bo.AdminBO;
|
||||
import cn.iocoder.mall.admin.dataobject.AdminDO;
|
||||
import org.mapstruct.Mapper;
|
||||
import org.mapstruct.Mappings;
|
||||
import org.mapstruct.factory.Mappers;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Mapper
|
||||
public interface AdminConvert {
|
||||
|
||||
AdminConvert INSTANCE = Mappers.getMapper(AdminConvert.class);
|
||||
|
||||
@Mappings({})
|
||||
AdminBO convert(AdminDO adminDO);
|
||||
|
||||
@Mappings({})
|
||||
List<AdminBO> convert(List<AdminDO> adminBOs);
|
||||
|
||||
}
|
||||
Loading…
Reference in new issue