kaiyu
2021-03-15 7f56cfa5ec12682d53809e0f4d77a8f3277d36a0
screen-manage/src/main/java/com/moral/api/pojo/vo/account/AccountInsertVO.java
File was renamed from screen-manage/src/main/java/com/moral/api/pojo/vo/AccountVO.java
@@ -1,8 +1,8 @@
package com.moral.api.pojo.vo;
package com.moral.api.pojo.vo.account;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.moral.api.entity.ManageRole;
import com.moral.api.pojo.dto.AccountDTO;
import com.moral.api.pojo.dto.account.AccountInsertDTO;
import lombok.Data;
import java.util.ArrayList;
@@ -17,7 +17,7 @@
 **/
@Data
@JsonInclude(JsonInclude.Include.NON_EMPTY)
public class AccountVO {
public class AccountInsertVO extends AccountVO {
    /*
     * 添加成功
     * */
@@ -60,31 +60,17 @@
    private String code;
    private Integer id;
    private String userName;
    private String password;
    private String email;
    private String mobile;
    private String wechat;
    private String createTime;
    private String updateTime;
    private String isDelete;
    private List<String> roleNames;
    private List<ManageRole> roles;
    public static AccountVO convertToInsertPage(AccountDTO dto){
        AccountVO vo = new AccountVO();
        if(dto.getCode()==AccountDTO.SUCCESS){
    /**
    * @Description: 用于插入账户返回数据使用
            * @Param: [dto]
            * @return: com.moral.api.pojo.vo.account.AccountVO
            * @Author: 陈凯裕
            * @Date: 2021/3/15
            */
    public static AccountInsertVO convert(AccountInsertDTO dto){
        AccountInsertVO vo = new AccountInsertVO();
        if(dto.getCode()== AccountInsertDTO.SUCCESS){
            Integer id = dto.getAccount().getId();
            String userName = dto.getAccount().getUserName();
            String email = dto.getAccount().getEmail();