com.labbol.cocoon.controller.BaseCocoonController Maven / Gradle / Ivy
/**
*
*/
package com.labbol.cocoon.controller;
import java.text.FieldPosition;
import java.text.NumberFormat;
import java.text.ParsePosition;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.annotation.Resource;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.propertyeditors.CustomDateEditor;
import org.springframework.beans.propertyeditors.CustomNumberEditor;
import org.springframework.util.NumberUtils;
import org.springframework.web.bind.WebDataBinder;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.InitBinder;
import org.yelong.core.model.ModelNullProperty;
import org.yelong.core.model.service.ModelService;
import com.github.pagehelper.PageInfo;
import com.google.gson.Gson;
import com.labbol.core.controller.BaseCoreController;
import com.labbol.core.model.BaseModel;
import com.labbol.core.queryinfo.QueryInfo;
import com.labbol.core.queryinfo.filter.QueryFilterInfo;
import com.labbol.core.service.LabbolModelService;
/**
* @author pengfei
* @date 2019年11月13日上午8:52:56
* @version 1.2
*/
@CrossOrigin
//@LogRecord//Cocoon下的默认全部记录日志
public abstract class BaseCocoonController extends BaseCoreController{
@Resource(name = "modelService")
protected LabbolModelService modelService;
/**
* 设置model的排序信息。根据sort请求参数
* @date 2019年11月13日上午10:20:48
* @param model
* @see #getSortFieldMap()
*/
@SuppressWarnings("unchecked")
@Deprecated
protected void setSortMap(M model) {
String sortInfoJson = getRequest().getParameter("sort");
if( StringUtils.isEmpty(sortInfoJson) ) {
return;
}
Gson gson = new Gson();
ArrayList
© 2015 - 2025 Weber Informatics LLC | Privacy Policy