项目初始化
This commit is contained in:
@@ -8,11 +8,10 @@ import java.io.Serializable;
|
||||
public class ChartConfig implements Serializable {
|
||||
|
||||
private Integer sort;
|
||||
private Integer oldSort;
|
||||
private String chartId;
|
||||
private String oldChartId;
|
||||
private String chartName;
|
||||
|
||||
private String chartCode;
|
||||
private Integer oldSort;
|
||||
private String color;
|
||||
}
|
||||
|
||||
@@ -60,7 +60,7 @@ public class MyChartInfo extends DataEntity<MyChartInfo> implements Serializable
|
||||
private String chartId; // 唯一标识
|
||||
private String chartName; // 图表名称
|
||||
private String chartCode; // 图表编号
|
||||
private Long sort; // 序号
|
||||
private Integer sort; // 序号
|
||||
private String vueName; // 组件名称
|
||||
private String grid; // 间距
|
||||
private String ustatus; // 状态
|
||||
|
||||
@@ -10,10 +10,7 @@ import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.Model;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.ModelAttribute;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import com.jeesite.common.config.Global;
|
||||
import com.jeesite.common.collect.ListUtils;
|
||||
@@ -163,7 +160,14 @@ public class MyChartInfoController extends BaseController {
|
||||
@ResponseBody
|
||||
public String setting(List<ChartConfig> configs) {
|
||||
for (ChartConfig config : configs) {
|
||||
System.out.println(config);
|
||||
MyChartInfo oldChartInfo = myChartInfoService.get(config.getOldChartId());
|
||||
oldChartInfo.setSort(-1);
|
||||
myChartInfoService.save(oldChartInfo);
|
||||
}
|
||||
for (ChartConfig config : configs) {
|
||||
MyChartInfo newChartInfo = myChartInfoService.get(config.getChartId());
|
||||
newChartInfo.setSort(config.getSort());
|
||||
myChartInfoService.save(newChartInfo);
|
||||
}
|
||||
return renderResult(Global.TRUE, text("配置图表成功!"));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user