模板管理 后台功能完成
parent
19a8189b05
commit
ae08c3ef76
@ -0,0 +1,35 @@
|
||||
package cn.estsh.i3plus.pojo.model.report;
|
||||
|
||||
import cn.estsh.i3plus.pojo.report.bean.BrPojoAttr;
|
||||
import cn.estsh.i3plus.pojo.report.bean.BrTemplateCustomHql;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import io.swagger.annotations.ApiParam;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description ://TODO 提交注意修改 临时使用 带改动
|
||||
* @Reference :
|
||||
* @Author : Adair Peng
|
||||
* @CreateDate : 2019-01-25 18:19
|
||||
* @Modify:
|
||||
**/
|
||||
@Data
|
||||
public class BeanBrPojoAttrModel {
|
||||
|
||||
@ApiParam(value = "表单模板ID")
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long templateId;
|
||||
|
||||
@ApiParam(value = "数据类型")
|
||||
private Integer dataType;
|
||||
|
||||
@ApiParam(value = "对象属性")
|
||||
private List<BrPojoAttr> attrList;
|
||||
|
||||
@ApiParam(value = "自定义HQL")
|
||||
private BrTemplateCustomHql customHql;
|
||||
|
||||
}
|
@ -1,422 +0,0 @@
|
||||
package cn.estsh.i3plus.pojo.report.sqlpack;
|
||||
|
||||
import cn.estsh.i3plus.pojo.base.bean.BaseResultBean;
|
||||
import cn.estsh.i3plus.pojo.base.enumutil.BlockReportEnumUtil;
|
||||
import cn.estsh.i3plus.pojo.base.enumutil.ResourceEnumUtil;
|
||||
import cn.estsh.i3plus.pojo.model.report.TemplateModel;
|
||||
import cn.estsh.i3plus.pojo.report.bean.BrPojoAttr;
|
||||
import cn.estsh.i3plus.pojo.report.bean.BrRefServerPojo;
|
||||
import cn.estsh.i3plus.pojo.report.bean.BrTemplateCustomHql;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* @Description : 报表对象封装
|
||||
* @Reference :
|
||||
* @Author : wei peng
|
||||
* @CreateDate : 2019-01-17 15:41
|
||||
* @Modify:
|
||||
**/
|
||||
public class TemplateHqlPack {
|
||||
|
||||
private static final Logger LOGGER = LoggerFactory.getLogger(TemplateHqlPack.class);
|
||||
|
||||
/**
|
||||
* 拼接查询字段
|
||||
*
|
||||
* @param attrs
|
||||
* @return
|
||||
*/
|
||||
public static String getSelectHqlColumn(List<BrPojoAttr> attrs) {
|
||||
StringBuffer result = new StringBuffer();
|
||||
BlockReportEnumUtil.HQL_AGGREGATION aggr = null;
|
||||
if (attrs != null && attrs.size() > 0) {
|
||||
for (BrPojoAttr attr : attrs) {
|
||||
aggr = BlockReportEnumUtil.HQL_AGGREGATION.valueOf(attr.getAggregationType());
|
||||
|
||||
// 聚合函数控制
|
||||
if (aggr == null) {
|
||||
result.append("," + attr.getPojoNameAlias() + "." + attr.getAttrName());
|
||||
} else {
|
||||
result.append(", " + aggr.getName() + "(" + attr.getPojoNameAlias() + "." + attr.getAttrName() + ")");
|
||||
}
|
||||
|
||||
// 添加别名
|
||||
if (StringUtils.isNotBlank(attr.getAttrNameAlias())) {
|
||||
result.append(" AS " + attr.getAttrNameAlias());
|
||||
} else {
|
||||
result.append(" AS " + attr.getPojoNameAlias() + "_" + attr.getAttrName());
|
||||
}
|
||||
}
|
||||
return result.substring(result.indexOf(",") + 1, result.length());
|
||||
}
|
||||
return result.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* 拼接分组字段
|
||||
*
|
||||
* @param attrs
|
||||
* @return
|
||||
*/
|
||||
public static String getSelectHqlGroupColumn(List<BrPojoAttr> attrs) {
|
||||
StringBuffer result = new StringBuffer();
|
||||
BlockReportEnumUtil.HQL_AGGREGATION aggr = null;
|
||||
if (attrs != null && attrs.size() > 0) {
|
||||
for (BrPojoAttr attr : attrs) {
|
||||
result.append("," + attr.getPojoNameAlias() + "." + attr.getAttrName());
|
||||
}
|
||||
}
|
||||
return result.toString();
|
||||
}
|
||||
|
||||
public static StringBuffer getSelectHqlJoin(List<BrRefServerPojo> list) {
|
||||
StringBuffer hqlJoin = new StringBuffer();
|
||||
if (list != null && list.size() > 0) {
|
||||
BrRefServerPojo masterPojo = list.get(0);
|
||||
BrRefServerPojo pojo;
|
||||
BlockReportEnumUtil.HQL_REF refType;
|
||||
BlockReportEnumUtil.HQL_WHERE whereType;// 对象连接封装
|
||||
hqlJoin.append(" " + masterPojo.getMasterPojoName() + " AS " + masterPojo.getMasterPojoNameAlias());
|
||||
for (int i = 1; i < list.size(); i++) {
|
||||
pojo = list.get(i);
|
||||
refType = BlockReportEnumUtil.HQL_REF.valueOf(pojo.getPojoRefType());
|
||||
whereType = BlockReportEnumUtil.HQL_WHERE.valueOf(pojo.getPojoWhereType());
|
||||
if (refType != null && whereType != null) {
|
||||
hqlJoin.append(" " + refType.getName());
|
||||
hqlJoin.append(" " + pojo.getMasterPojoName() + " AS " + pojo.getMasterPojoNameAlias());
|
||||
hqlJoin.append(" ON " + pojo.getMasterPojoNameAlias() + "." + pojo.getMasterPojoAttrName());
|
||||
hqlJoin.append(" " + whereType.getName() + " " + pojo.getSecondaryPojoNameAlias() + "." + pojo.getSecondaryPojoAttrName());
|
||||
} else {
|
||||
LOGGER.info("");
|
||||
}
|
||||
}
|
||||
}
|
||||
return hqlJoin;
|
||||
}
|
||||
|
||||
public static String getSelectHqlWhere(List<BrPojoAttr> attrs, Map<String, Object> map) {
|
||||
StringBuffer hqlWhere = new StringBuffer();
|
||||
if (attrs != null && attrs.size() > 0) {
|
||||
BlockReportEnumUtil.HQL_WHERE whereType = null;
|
||||
for (BrPojoAttr attr : attrs) {
|
||||
whereType = BlockReportEnumUtil.HQL_WHERE.valueOf(attr.getAttrRefType());
|
||||
if (whereType != null) {
|
||||
hqlWhere.append(" AND " + attr.getPojoNameAlias() + "." + attr.getAttrName());
|
||||
if (BlockReportEnumUtil.HQL_WHERE.LIKE.equals(whereType)) { // like %%
|
||||
hqlWhere.append(" " + whereType.getName() + " :" + attr.getPojoNameAlias() + "_" + attr.getAttrName());
|
||||
map.put(attr.getPojoNameAlias() + "_" + attr.getAttrName(), "%" + attr.getAttrDefaultValue() + "%");
|
||||
} else if (BlockReportEnumUtil.HQL_WHERE.LIKE_LEFT.equals(whereType)) {
|
||||
hqlWhere.append(" " + whereType.getName() + " :" + attr.getPojoNameAlias() + "_" + attr.getAttrName());
|
||||
map.put(attr.getPojoNameAlias() + "_" + attr.getAttrName(), "%" + attr.getAttrDefaultValue());
|
||||
} else if (BlockReportEnumUtil.HQL_WHERE.LIKE_RIGHT.equals(whereType)) {
|
||||
hqlWhere.append(" " + whereType.getName() + " :" + attr.getPojoNameAlias() + "_" + attr.getAttrName());
|
||||
map.put(attr.getPojoNameAlias() + "_" + attr.getAttrName(), attr.getAttrDefaultValue() + "%");
|
||||
}
|
||||
} else {
|
||||
LOGGER.info("");
|
||||
}
|
||||
}
|
||||
}
|
||||
return hqlWhere.toString();
|
||||
}
|
||||
|
||||
public static String getSelectHqlWhereCustomHql(List<BrTemplateCustomHql> customList) {
|
||||
StringBuffer hqlWhere = new StringBuffer();
|
||||
if (customList != null && customList.size() > 0) {
|
||||
for (BrTemplateCustomHql hql : customList) {
|
||||
if(hql.getDataType().intValue() == BlockReportEnumUtil.HQL_ATTR_DATA_TYPE.WHERE.getValue()){
|
||||
hqlWhere.append(" " + hql.getCustomContent());
|
||||
}
|
||||
}
|
||||
}
|
||||
return hqlWhere.toString();
|
||||
}
|
||||
|
||||
public static String getSelectHqlWhereGroup(List<BrPojoAttr> customList) {
|
||||
StringBuffer hql = new StringBuffer();
|
||||
if (customList != null && customList.size() > 0) {
|
||||
hql.append(" GROUP BY ");
|
||||
for (BrPojoAttr attr : customList) {
|
||||
hql.append(" " + attr.getPojoNameAlias() + "." + attr.getAttrName());
|
||||
}
|
||||
}
|
||||
return hql.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* 拼接查询语句
|
||||
*
|
||||
* @param list
|
||||
* @return
|
||||
*/
|
||||
public static TemplateModel getTemplateModel(List<BrRefServerPojo> list,BrTemplateCustomHql hqlList) {
|
||||
if (list != null && list.size() > 0) {
|
||||
TemplateModel model = new TemplateModel();
|
||||
StringBuffer result = new StringBuffer(); // 查询语句主体
|
||||
List<BrPojoAttr> attrShowList = new ArrayList<>(); // 查询列的属性
|
||||
List<BrPojoAttr> attrWhereList = new ArrayList<>(); // 查询列的属性
|
||||
List<BrPojoAttr> attrGroupList = new ArrayList<>(); // 查询列的属性
|
||||
Map<String, Object> paramMap = new HashMap<>();
|
||||
List<BrPojoAttr> tmpList = null;
|
||||
|
||||
// list 先排序下
|
||||
list.sort(Comparator.comparing(BrRefServerPojo::getPojoSort));
|
||||
|
||||
// 对象属性封装
|
||||
for (BrRefServerPojo refServerPojo : list) {
|
||||
tmpList = refServerPojo.getPojoAttrList();
|
||||
if (tmpList != null && tmpList.size() > 0) {
|
||||
for (BrPojoAttr attr : tmpList) {
|
||||
if (BlockReportEnumUtil.HQL_ATTR_DATA_TYPE.SHOW.getValue() == attr.getDataType().intValue()
|
||||
|| BlockReportEnumUtil.HQL_ATTR_DATA_TYPE.AGGREGATION.getValue() == attr.getDataType().intValue()) {
|
||||
attrShowList.add(attr);
|
||||
} else if (BlockReportEnumUtil.HQL_ATTR_DATA_TYPE.WHERE.getValue() == attr.getDataType().intValue()) {
|
||||
attrWhereList.add(attr);
|
||||
} else if (BlockReportEnumUtil.HQL_ATTR_DATA_TYPE.GROUP.getValue() == attr.getDataType().intValue()) {
|
||||
attrGroupList.add(attr);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
attrShowList.sort(Comparator.comparing(BrPojoAttr::getAttrSort));
|
||||
attrGroupList.sort(Comparator.comparing(BrPojoAttr::getAttrSort));
|
||||
attrWhereList.sort(Comparator.comparing(BrPojoAttr::getAttrSort));
|
||||
// HQL 拼接
|
||||
|
||||
result.append(" SELECT ");
|
||||
result.append(getSelectHqlColumn(attrShowList));
|
||||
result.append(" FROM ");
|
||||
result.append(getSelectHqlJoin(list));
|
||||
result.append(" WHERE 1=1 ");
|
||||
result.append(getSelectHqlWhere(attrWhereList, paramMap));
|
||||
result.append(getSelectHqlWhereGroup(attrGroupList));
|
||||
if(hqlList != null){
|
||||
result.append(getSelectHqlWhereCustomHql(Arrays.asList(hqlList)));
|
||||
}
|
||||
|
||||
model.setHql(result.toString());
|
||||
model.setParamName(paramMap.keySet().stream().toArray(String[]::new));
|
||||
model.setParamValue(paramMap.values().stream().toArray(Object[]::new));
|
||||
|
||||
return model;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public static List<Map<String, Object>> getResultListTable(BaseResultBean bean,TemplateModel model) {
|
||||
List<Map<String, Object>> result = new ArrayList<>();
|
||||
Map<String, Object> line = null;
|
||||
if (bean != null && bean.isSuccess() && model != null) {
|
||||
List<List> list = bean.getResultList();
|
||||
if (list != null && list.size() > 0) {
|
||||
List<String> columnList = getSelectHqlColumnAs(model.getHql());
|
||||
if (columnList != null && columnList.size() > 0) {
|
||||
if(columnList.size() == 1){
|
||||
for (Object value : list) {
|
||||
line = new HashMap<>();
|
||||
line.put(columnList.get(0), value);
|
||||
result.add(line);
|
||||
}
|
||||
}else {
|
||||
for (List rows : list) {
|
||||
line = new HashMap<>();
|
||||
for (int i = 0; i < rows.size(); i++) {
|
||||
line.put(columnList.get(i), rows.get(i));
|
||||
}
|
||||
result.add(line);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
LOGGER.info("无法解析HQL 列属性");
|
||||
}
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
public static List<String> getSelectHqlColumnAs(String hql) {
|
||||
List<String> result = new ArrayList<>();
|
||||
// hql 中必须包含 select 和 from
|
||||
if (StringUtils.isNotBlank(hql) &&
|
||||
hql.indexOf("SELECT") != -1 && hql.indexOf("FROM") != -1) {
|
||||
|
||||
hql = hql.substring(hql.indexOf("SELECT") + 1, hql.indexOf("FROM"));
|
||||
if (StringUtils.isNotBlank(hql)) {
|
||||
String[] columnArray = hql.split(",");
|
||||
if (columnArray != null && columnArray.length > 0) {
|
||||
for (String column : columnArray) {
|
||||
result.add(column.substring(column.indexOf("AS") + 2, column.length()).trim());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
public static Map<String,Object> getResultMap(BaseResultBean<Object> bean,TemplateModel model){
|
||||
Map<String,Object> result = new HashMap<>();
|
||||
if(bean != null && model != null){
|
||||
if (ResourceEnumUtil.MESSAGE.SUCCESS.getCode().equals(bean.getCode())) {
|
||||
if(StringUtils.isNotBlank(model.getHql())){ // 有HQL
|
||||
String hql = model.getHql().substring(0,model.getHql().indexOf("FROM"));
|
||||
System.out.println(hql);
|
||||
}
|
||||
}else {
|
||||
LOGGER.info("请求处理失败");
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
public static void main(String[] args) {
|
||||
List<BrPojoAttr> suList = new ArrayList<>();
|
||||
List<BrPojoAttr> suiList = new ArrayList<>();
|
||||
List<BrPojoAttr> surList = new ArrayList<>();
|
||||
List<BrRefServerPojo> pojoList = new ArrayList<>();
|
||||
|
||||
// ------------------------------------ SysUser Attr ------------------------------------
|
||||
BrPojoAttr suAttr = new BrPojoAttr();
|
||||
suAttr.setAttrSort(0);
|
||||
suAttr.setPojoNameAlias("su");
|
||||
suAttr.setAttrName("userInfoId");
|
||||
suAttr.setAttrNameAlias("德玛西亚");
|
||||
suAttr.setDataType(BlockReportEnumUtil.HQL_ATTR_DATA_TYPE.SHOW.getValue());
|
||||
|
||||
BrPojoAttr suAttr1 = new BrPojoAttr();
|
||||
suAttr1.setAttrSort(1);
|
||||
suAttr1.setPojoNameAlias("su");
|
||||
suAttr1.setAttrName("userName");
|
||||
suAttr1.setDataType(BlockReportEnumUtil.HQL_ATTR_DATA_TYPE.SHOW.getValue());
|
||||
|
||||
BrPojoAttr suAttr2 = new BrPojoAttr();
|
||||
suAttr2.setAttrSort(2);
|
||||
suAttr2.setPojoNameAlias("su");
|
||||
suAttr2.setAttrName("userLoginName");
|
||||
suAttr2.setDataType(BlockReportEnumUtil.HQL_ATTR_DATA_TYPE.SHOW.getValue());
|
||||
|
||||
BrPojoAttr suAttr3 = new BrPojoAttr();
|
||||
suAttr3.setAttrSort(3);
|
||||
suAttr3.setPojoNameAlias("su");
|
||||
suAttr3.setAttrName("userEmpNo");
|
||||
suAttr3.setDataType(BlockReportEnumUtil.HQL_ATTR_DATA_TYPE.SHOW.getValue());
|
||||
|
||||
suList.add(suAttr);
|
||||
suList.add(suAttr1);
|
||||
suList.add(suAttr2);
|
||||
suList.add(suAttr3);
|
||||
// ------------------------------------ SysUserInfo Attr ------------------------------------
|
||||
|
||||
BrPojoAttr suiAttr = new BrPojoAttr();
|
||||
suiAttr.setAttrSort(0);
|
||||
suiAttr.setPojoNameAlias("sui");
|
||||
suiAttr.setAttrName("name");
|
||||
suiAttr.setDataType(BlockReportEnumUtil.HQL_ATTR_DATA_TYPE.SHOW.getValue());
|
||||
|
||||
BrPojoAttr suiAttr1 = new BrPojoAttr();
|
||||
suiAttr1.setAttrSort(1);
|
||||
suiAttr1.setPojoNameAlias("sui");
|
||||
suiAttr1.setAttrName("userEmployeeType");
|
||||
suiAttr1.setDataType(BlockReportEnumUtil.HQL_ATTR_DATA_TYPE.SHOW.getValue());
|
||||
|
||||
|
||||
BrPojoAttr suiAttr2 = new BrPojoAttr();
|
||||
suiAttr2.setAttrSort(2);
|
||||
suiAttr2.setPojoNameAlias("sui");
|
||||
suiAttr2.setAttrName("userBornDate");
|
||||
suiAttr2.setDataType(BlockReportEnumUtil.HQL_ATTR_DATA_TYPE.SHOW.getValue());
|
||||
|
||||
|
||||
BrPojoAttr suiAttr3 = new BrPojoAttr();
|
||||
suiAttr3.setAttrSort(3);
|
||||
suiAttr3.setPojoNameAlias("sui");
|
||||
suiAttr3.setAttrName("userSchool");
|
||||
suiAttr3.setDataType(BlockReportEnumUtil.HQL_ATTR_DATA_TYPE.SHOW.getValue());
|
||||
|
||||
BrPojoAttr suiAttr4 = new BrPojoAttr();
|
||||
suiAttr4.setAttrSort(4);
|
||||
suiAttr4.setPojoNameAlias("sui");
|
||||
suiAttr4.setAttrName("userEmpNo");
|
||||
suiAttr4.setAttrNameAlias("userEmpNo");
|
||||
suiAttr4.setAttrDefaultValue("英雄联盟");
|
||||
suiAttr4.setAttrRefType(BlockReportEnumUtil.HQL_WHERE.LIKE.getValue());
|
||||
suiAttr4.setDataType(BlockReportEnumUtil.HQL_ATTR_DATA_TYPE.WHERE.getValue());
|
||||
|
||||
suiList.add(suiAttr);
|
||||
suiList.add(suiAttr1);
|
||||
suiList.add(suiAttr2);
|
||||
suiList.add(suiAttr3);
|
||||
suiList.add(suiAttr4);
|
||||
// ------------------------------------ SysRefUserRole Attr ------------------------------------
|
||||
BrPojoAttr surAttr = new BrPojoAttr();
|
||||
surAttr.setAttrSort(1);
|
||||
surAttr.setPojoNameAlias("sur");
|
||||
surAttr.setAttrName("id");
|
||||
surAttr.setAggregationType(BlockReportEnumUtil.HQL_AGGREGATION.COUNT.getValue());
|
||||
surAttr.setDataType(BlockReportEnumUtil.HQL_ATTR_DATA_TYPE.AGGREGATION.getValue());
|
||||
surAttr.setDataType(BlockReportEnumUtil.HQL_ATTR_DATA_TYPE.SHOW.getValue());
|
||||
|
||||
surList.add(surAttr);
|
||||
|
||||
// ------------------------------------ Pojo SysUserInfo ------------------------------------
|
||||
|
||||
BrRefServerPojo suiPojo = new BrRefServerPojo();
|
||||
suiPojo.setMasterPojoName("SysUserInfo");
|
||||
suiPojo.setMasterPojoNameAlias("sui");
|
||||
suiPojo.setPojoSort(1);
|
||||
suiPojo.setPojoAttrList(suiList);
|
||||
|
||||
// ------------------------------------ Pojo SysUser ------------------------------------
|
||||
BrRefServerPojo suPojo = new BrRefServerPojo();
|
||||
suPojo.setMasterPojoName("SysUser");
|
||||
suPojo.setMasterPojoNameAlias("su");
|
||||
suPojo.setMasterPojoAttrName("userInfoId");
|
||||
|
||||
suPojo.setSecondaryPojoName("SysUserInfo");
|
||||
suPojo.setSecondaryPojoNameAlias("sui");
|
||||
suPojo.setSecondaryPojoAttrName("id");
|
||||
|
||||
suPojo.setPojoRefType(BlockReportEnumUtil.HQL_REF.LEFT_JOIN.getValue());
|
||||
suPojo.setPojoWhereType(BlockReportEnumUtil.HQL_WHERE.EQUAL.getValue());
|
||||
suPojo.setPojoSort(2);
|
||||
suPojo.setPojoAttrList(suList);
|
||||
|
||||
// ------------------------------------ Pojo SysRefUserRole ------------------------------------
|
||||
BrRefServerPojo surPojo = new BrRefServerPojo();
|
||||
surPojo.setMasterPojoName("SysRefUserRole");
|
||||
surPojo.setMasterPojoNameAlias("sur");
|
||||
surPojo.setMasterPojoAttrName("userId");
|
||||
|
||||
surPojo.setSecondaryPojoName("SysUser");
|
||||
surPojo.setSecondaryPojoNameAlias("su");
|
||||
surPojo.setSecondaryPojoAttrName("id");
|
||||
|
||||
surPojo.setPojoRefType(BlockReportEnumUtil.HQL_REF.LEFT_JOIN.getValue());
|
||||
surPojo.setPojoWhereType(BlockReportEnumUtil.HQL_WHERE.EQUAL.getValue());
|
||||
surPojo.setPojoSort(3);
|
||||
surPojo.setPojoAttrList(surList);
|
||||
|
||||
pojoList.add(suiPojo);
|
||||
pojoList.add(suPojo);
|
||||
pojoList.add(surPojo);
|
||||
|
||||
// System.out.println(getSelectHqlColumn(suList));
|
||||
// System.out.println(JSON.toJSONString(getTemplateModel(pojoList)));
|
||||
|
||||
// String json = "{\"code\":\"20001\",\"msg\":\"select sui.name as sui_name,su.userInfoId as 德玛西亚,sui.userEmployeeType as sui_userEmployeeType,su.userName as su_userName, count(sur.id) as sur_id,sui.userBornDate as sui_userBornDate,su.userLoginName as su_userLoginName,sui.userSchool as sui_userSchool,su.userEmpNo as su_userEmpNo from SysUserInfo as sui left join SysUser as su on su.userInfoId = sui.id left join SysRefUserRole as sur on sur.userId = su.id\",\"resultList\":[[\"管理员\",1077896159978196992,1,\"管理员\",2,\"1993-06-30\",\"admin\",\"复旦大学\",\"10001\"]],\"success\":true,\"totalCount\":0}";
|
||||
// BaseResultBean resultBean = JSON.parseObject(json,BaseResultBean.class);
|
||||
//
|
||||
// System.out.println(getSelectHqlColumnAs(resultBean.getMsg()));;
|
||||
//
|
||||
// System.out.println(resultBean.getMsg());
|
||||
// List<Map<String, Object>> table = getResultListTable(resultBean);
|
||||
// System.out.println(JSON.toJSONString(table));
|
||||
}
|
||||
|
||||
|
||||
}
|
Loading…
Reference in New Issue