kaiyu
2021-03-17 8fa47457bcda1c05b7df2c04a1d4c31eec51272c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
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;
    }
}