package com.philisense.www.controller;

import java.text.SimpleDateFormat;

import com.philisense.www.utils.StringUtils;

public class BaseUtilController {
    public SimpleDateFormat sdf_time =new SimpleDateFormat("yyyy_MM_dd" );
    public SimpleDateFormat sdf_day =new SimpleDateFormat("yyyy-MM-dd HH:mm:ss" );

    public final boolean  SUCCESSFLAG = true;
    public final boolean  ERRORFLAG = false;
    public final String  DATATABLEDRAW = "draw";
    public final String  DATATABLETOTAL = "recordsTotal";
    public final String  DATATABLEFILTER = "recordsFiltered";

    public final String  DATALIST_VUE = "data";
    public final String  PAGESIZE_VUE = "pageSize";
    public final String  DATATOTAL_VUE = "totalCount";
    public final String  DATACURRENT_VUE = "pageNo";
    
    public final String  DATALIST = "list";
    public final String  PAGESIZE = "pageSize";
    public final String  DATATOTAL = "total";
    public final String  DATACURRENT = "currentPage";
    
    
    public final String  PAGESTART = "pageStart";
    public final String  PAGEEND = "pageEnd";
    
   
    public final String  PAGINATION = "pagination";
    public final String  DATARECORD = "datarecord";
    public final String  DATARESULT = "result";
    public final String  DATASUCCESS = "success";
    public final String  DATASTATUS = "status";
    public final String  DATAMESSAGE = "message";
    public final String  DELETE_SUCCESS_MSG = "数据删除成功！";
    public final String  DELETE_FAIL_MSG = "数据删除失败！";
    public final String  INSERT_SUCCESS_MSG = "数据插入成功！";
    public final String  INSERT_FAIL_MSG = "数据插入失败！";
    public final String  UPDATE_SUCCESS_MSG = "数据更新成功！";
    public final String  UPDATE_FAIL_MSG = "数据更新失败！";
    public final String  QUERY_SUCCESS_MSG = "数据查询成功！";
    public final String  QUERY_FAIL_MSG = "数据查询失败！";
    public final String  UPLOAD_SUCCESS_MSG = "上传成功！";
    public final String  UPLOAD_FAIL_MSG = "上传失败！";
    public final String  IMPORT_SUCCESS_MSG = "导入成功！";
    public final String  IMPORT_FAIL_MSG = "导入失败！";
    public final String  EXPORT_SUCCESS_MSG = "导出成功！";
    public final String  EXPORT_FAIL_MSG = "导出失败！";

    /**
     * 页面跳转
     */
    public String redirect(String url)
    {
        return StringUtils.format("redirect:{}", url);
    }

}
