kaiyu
2021-04-23 726b056fc2d3b51acdeb0b5fbaf74c8886acc2ac
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
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.AccountDTO;
import com.moral.constant.ResponseCodeEnum;
import lombok.Data;
 
/**
 * @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 static AccountDeleteVO convert(AccountDTO dto) {
        if (dto.getCode() != ResponseCodeEnum.SUCCESS.getCode())
            return null;
        AccountDeleteVO vo = new AccountDeleteVO();
        ManageAccount account = dto.getAccount();
        vo.setId(account.getId());
        vo.setUserName(account.getUserName());
        return vo;
    }
}