package com.moral.api.pojo.vo.account;
|
|
import com.fasterxml.jackson.annotation.JsonInclude;
|
import com.moral.api.entity.ManageAccount;
|
import com.moral.api.pojo.dto.account.AccountDeleteDTO;
|
import lombok.Data;
|
import org.springframework.util.ObjectUtils;
|
|
/**
|
* @ClassName AccountDeleteVO
|
* @Description TODO
|
* @Author 陈凯裕
|
* @Date 2021/3/16 11:40
|
* @Version TODO
|
**/
|
@Data
|
@JsonInclude(JsonInclude.Include.NON_EMPTY)
|
|
public class AccountDeleteVO extends AccountVO {
|
|
/*
|
* 删除成功
|
* */
|
public final static String SUCCESS = "0";
|
|
/*
|
* 用户不存在
|
* */
|
public final static String ACCOUNT_NOT_EXIST = "-1";
|
|
public static AccountDeleteVO convert(AccountDeleteDTO dto) {
|
AccountDeleteVO vo = new AccountDeleteVO();
|
vo.setCode(dto.getCode());
|
if (!ObjectUtils.isEmpty(dto.getAccount())) {
|
ManageAccount account = dto.getAccount();
|
vo.setId(account.getId());
|
vo.setUserName(account.getUserName());
|
}
|
return vo;
|
}
|
}
|