com.creditcloud.investmentfund.model.lion.response.BaseResponse.java Source code

Java tutorial

Introduction

Here is the source code for com.creditcloud.investmentfund.model.lion.response.BaseResponse.java

Source

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package com.creditcloud.investmentfund.model.lion.response;

import com.creditcloud.investmentfund.constant.FundConstant;
import com.creditcloud.investmentfund.model.FundObject;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.apache.commons.lang3.StringUtils;

/**
 *  ??
 * @author suetming <suetming.ma at creditcloud.com>
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
public abstract class BaseResponse extends FundObject {

    /**
     * ?
     */
    private String returncode;

    /**
     * ???200
     */
    private String returnmsg;

    /**
     * MD5
     */
    private String token;

    /**
     * long
     */
    private long stamp;

    /**
     * ??
     * 
     * @return 
     */
    public boolean success() {
        if (StringUtils.isNotEmpty(returncode)) {
            return returncode.contentEquals(FundConstant.SUCCESS_CODE);
        } else {
            return false;
        }
    }
}