数据整合(项目 - etl中间件)
整合表单管理 / 整合记录 数据同步(etl - 大数据局) 数据源管理 / 数据表管理(待写) / 同步方式配置(待写) / 同步记录(待写) 数据查询 预设SQL查询配置功能
This commit is contained in:
parent
13ff86882b
commit
efcfe8b64c
@ -12,6 +12,7 @@ import cn.com.tenlion.bigdata.service.bigdatatemplate.IBigdataTemplateService;
|
|||||||
import cn.com.tenlion.bigdata.service.bigdatatemplatearea.IBigdataTemplateAreaService;
|
import cn.com.tenlion.bigdata.service.bigdatatemplatearea.IBigdataTemplateAreaService;
|
||||||
import cn.com.tenlion.bigdata.util.BigDataResult;
|
import cn.com.tenlion.bigdata.util.BigDataResult;
|
||||||
import cn.com.tenlion.freemarker.pojo.vos.templaterecord.TemplateRecordVO;
|
import cn.com.tenlion.freemarker.pojo.vos.templaterecord.TemplateRecordVO;
|
||||||
|
import cn.com.tenlion.freemarker.service.templaterecord.ITemplateRecordService;
|
||||||
import cn.com.tenlion.freemarker.util.TemplateBuilderUtil;
|
import cn.com.tenlion.freemarker.util.TemplateBuilderUtil;
|
||||||
import cn.com.tenlion.freemarker.util.TemplateCreateData;
|
import cn.com.tenlion.freemarker.util.TemplateCreateData;
|
||||||
import com.github.pagehelper.PageHelper;
|
import com.github.pagehelper.PageHelper;
|
||||||
@ -64,6 +65,9 @@ public class BigdataTemplateServiceImpl extends DefaultBaseService implements IB
|
|||||||
@Autowired
|
@Autowired
|
||||||
private IDataService iDataService;
|
private IDataService iDataService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private ITemplateRecordService iTemplateRecordService;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public SuccessResult saveBigdataTemplate(BigdataTemplateVO bigdataTemplateVO) throws Exception {
|
public SuccessResult saveBigdataTemplate(BigdataTemplateVO bigdataTemplateVO) throws Exception {
|
||||||
saveBigdataTemplateInfo(null, bigdataTemplateVO);
|
saveBigdataTemplateInfo(null, bigdataTemplateVO);
|
||||||
@ -450,6 +454,7 @@ public class BigdataTemplateServiceImpl extends DefaultBaseService implements IB
|
|||||||
params.put("bigdataTemplatePublishStatus", bigdataTemplatePublishStatus ? "1" : "0");
|
params.put("bigdataTemplatePublishStatus", bigdataTemplatePublishStatus ? "1" : "0");
|
||||||
params.put("bigdataTemplatePublishTime", DateUtil.getTime());
|
params.put("bigdataTemplatePublishTime", DateUtil.getTime());
|
||||||
setUpdateInfo(params);
|
setUpdateInfo(params);
|
||||||
|
iTemplateRecordService.updateStatus(bigdataTemplateId, bigdataTemplatePublishStatus);
|
||||||
bigdataTemplateDao.updateBigdataTemplatePublishStatus(params);
|
bigdataTemplateDao.updateBigdataTemplatePublishStatus(params);
|
||||||
return new SuccessResult();
|
return new SuccessResult();
|
||||||
}
|
}
|
||||||
|
@ -2,6 +2,7 @@ package cn.com.tenlion.bigdata.util;
|
|||||||
|
|
||||||
import com.alibaba.fastjson.JSONArray;
|
import com.alibaba.fastjson.JSONArray;
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import org.joda.time.DateTime;
|
||||||
|
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
@ -48,8 +49,42 @@ public class WeatherUtil {
|
|||||||
return resultMap;
|
return resultMap;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static Map<String, Object> getWeather(Date queryDate, String id) throws Exception {
|
||||||
|
String date = sdfTime.format(queryDate);
|
||||||
|
if (weather.get(id + "_" + date) != null) {
|
||||||
|
return weather.get(id + "_" + date);
|
||||||
|
}
|
||||||
|
Map<String, Object> params = new HashMap<String, Object>();
|
||||||
|
params.put("key", "Sk1Gt66B1Z-ZsEJP5");
|
||||||
|
params.put("location", id);
|
||||||
|
params.put("language", "zh-Hans");
|
||||||
|
params.put("unit", "c");
|
||||||
|
String result = HttpUtil.doGet(url, params);
|
||||||
|
System.out.println("天气预报返回 : " + result);
|
||||||
|
JSONObject jsonObject = JSONObject.parseObject(result);
|
||||||
|
JSONArray array = jsonObject.getJSONArray("results");
|
||||||
|
Map<String, Object> resultMap = new HashMap<String, Object>();
|
||||||
|
if(array.size() > 0) {
|
||||||
|
JSONObject object = array.getJSONObject(0).getJSONObject("now");
|
||||||
|
JSONObject location = array.getJSONObject(0).getJSONObject("location");
|
||||||
|
String text = object.getString("text");
|
||||||
|
String temperature = object.getString("temperature");
|
||||||
|
String code = object.getString("code");
|
||||||
|
resultMap.put("text", text);
|
||||||
|
resultMap.put("temperature", temperature);
|
||||||
|
resultMap.put("code", code);
|
||||||
|
resultMap.put("city", location.getString("name"));
|
||||||
|
weather.put(id + "_" + date, resultMap);
|
||||||
|
System.out.println(resultMap.toString());
|
||||||
|
}
|
||||||
|
return resultMap;
|
||||||
|
}
|
||||||
|
|
||||||
public static void main(String[] args) throws Exception {
|
public static void main(String[] args) throws Exception {
|
||||||
WeatherUtil.getWeather("WRR2Q2Z7CXWM");
|
for(int i = 1 ; i < 10 ; i++) {
|
||||||
|
WeatherUtil.getWeather(DateTime.now().plusDays(i).toDate(), "榆林市");
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -121,7 +121,7 @@
|
|||||||
left : pageX > 0 ? pageX : (pos.left > 0 ? 0 : pos.left * -1 + 30)
|
left : pageX > 0 ? pageX : (pos.left > 0 ? 0 : pos.left * -1 + 30)
|
||||||
}).appendTo("#canvas");
|
}).appendTo("#canvas");
|
||||||
/**
|
/**
|
||||||
* 键盘控制位置移动 2021年6月22日16:33:34 由CBC新增
|
* 键盘控制位置移动 2021年6月22日16:33:34 由CBC新增 tabindex="1"
|
||||||
* */
|
* */
|
||||||
$(document).on('keydown', '#' + dataId, function(e){
|
$(document).on('keydown', '#' + dataId, function(e){
|
||||||
if(lock == true){
|
if(lock == true){
|
||||||
|
@ -2,9 +2,7 @@ package cn.com.tenlion.configcolumn.controller.app.api.configcolumnset;
|
|||||||
|
|
||||||
import cn.com.tenlion.configcolumn.pojo.dtos.configcolumn.ConfigColumnDTO;
|
import cn.com.tenlion.configcolumn.pojo.dtos.configcolumn.ConfigColumnDTO;
|
||||||
import cn.com.tenlion.configcolumn.pojo.dtos.configcolumngroup.ConfigColumnGroupDTO;
|
import cn.com.tenlion.configcolumn.pojo.dtos.configcolumngroup.ConfigColumnGroupDTO;
|
||||||
import cn.com.tenlion.configcolumn.pojo.vos.configcolumnset.ConfigColumnSetDisplayVO;
|
import cn.com.tenlion.configcolumn.pojo.vos.configcolumnset.*;
|
||||||
import cn.com.tenlion.configcolumn.pojo.vos.configcolumnset.ConfigColumnSetNameVO;
|
|
||||||
import cn.com.tenlion.configcolumn.pojo.vos.configcolumnset.ConfigColumnSetOrderVO;
|
|
||||||
import ink.wgink.annotation.CheckRequestBodyAnnotation;
|
import ink.wgink.annotation.CheckRequestBodyAnnotation;
|
||||||
import ink.wgink.common.base.DefaultBaseController;
|
import ink.wgink.common.base.DefaultBaseController;
|
||||||
import ink.wgink.interfaces.consts.ISystemConstant;
|
import ink.wgink.interfaces.consts.ISystemConstant;
|
||||||
@ -14,7 +12,6 @@ import ink.wgink.pojo.result.SuccessResult;
|
|||||||
import ink.wgink.pojo.result.SuccessResultData;
|
import ink.wgink.pojo.result.SuccessResultData;
|
||||||
import ink.wgink.pojo.result.SuccessResultList;
|
import ink.wgink.pojo.result.SuccessResultList;
|
||||||
import cn.com.tenlion.configcolumn.pojo.dtos.configcolumnset.ConfigColumnSetDTO;
|
import cn.com.tenlion.configcolumn.pojo.dtos.configcolumnset.ConfigColumnSetDTO;
|
||||||
import cn.com.tenlion.configcolumn.pojo.vos.configcolumnset.ConfigColumnSetVO;
|
|
||||||
import cn.com.tenlion.configcolumn.service.configcolumnset.IConfigColumnSetService;
|
import cn.com.tenlion.configcolumn.service.configcolumnset.IConfigColumnSetService;
|
||||||
import io.swagger.annotations.*;
|
import io.swagger.annotations.*;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
@ -39,6 +36,18 @@ public class ConfigColumnSetAppController extends DefaultBaseController {
|
|||||||
@Autowired
|
@Autowired
|
||||||
private IConfigColumnSetService configColumnSetService;
|
private IConfigColumnSetService configColumnSetService;
|
||||||
|
|
||||||
|
@ApiOperation(value = "用户自定义栏目首页置顶", notes = "用户自定义栏目首页置顶接口")
|
||||||
|
@ApiImplicitParams({
|
||||||
|
@ApiImplicitParam(name = "token", value = "token", paramType = "header")
|
||||||
|
})
|
||||||
|
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||||
|
@PostMapping("savetop")
|
||||||
|
@CheckRequestBodyAnnotation
|
||||||
|
public SuccessResult saveTop(@RequestHeader("token") String token, @RequestBody ConfigColumnSetTopVO configColumnSetTopVO) {
|
||||||
|
configColumnSetService.saveTop(token, configColumnSetTopVO);
|
||||||
|
return new SuccessResult();
|
||||||
|
}
|
||||||
|
|
||||||
@ApiOperation(value = "用户自定义栏目排序", notes = "用户自定义栏目排序接口")
|
@ApiOperation(value = "用户自定义栏目排序", notes = "用户自定义栏目排序接口")
|
||||||
@ApiImplicitParams({
|
@ApiImplicitParams({
|
||||||
@ApiImplicitParam(name = "token", value = "token", paramType = "header")
|
@ApiImplicitParam(name = "token", value = "token", paramType = "header")
|
||||||
|
@ -12,6 +12,8 @@ import ink.wgink.common.base.DefaultBaseService;
|
|||||||
import ink.wgink.exceptions.SaveException;
|
import ink.wgink.exceptions.SaveException;
|
||||||
import ink.wgink.exceptions.SearchException;
|
import ink.wgink.exceptions.SearchException;
|
||||||
import ink.wgink.pojo.ListPage;
|
import ink.wgink.pojo.ListPage;
|
||||||
|
import ink.wgink.pojo.app.AppTokenUser;
|
||||||
|
import ink.wgink.pojo.bos.UserInfoBO;
|
||||||
import ink.wgink.pojo.result.SuccessResult;
|
import ink.wgink.pojo.result.SuccessResult;
|
||||||
import ink.wgink.pojo.result.SuccessResultList;
|
import ink.wgink.pojo.result.SuccessResultList;
|
||||||
import ink.wgink.util.map.HashMapUtil;
|
import ink.wgink.util.map.HashMapUtil;
|
||||||
@ -309,6 +311,21 @@ public class ConfigColumnServiceImpl extends DefaultBaseService implements IConf
|
|||||||
return listData(token, configColumnDTO.getConfigColumnId(), params);
|
return listData(token, configColumnDTO.getConfigColumnId(), params);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private String getUserId(String token) {
|
||||||
|
String userId = "notUserId";
|
||||||
|
try{
|
||||||
|
if (StringUtils.isBlank(token)) {
|
||||||
|
UserInfoBO userInfoBO = this.securityComponent.getCurrentUser();
|
||||||
|
userId = userInfoBO.getUserId();
|
||||||
|
} else {
|
||||||
|
AppTokenUser appTokenUser = this.getAppTokenUser(token);
|
||||||
|
userId = appTokenUser.getId();
|
||||||
|
}
|
||||||
|
}catch(Exception e) {
|
||||||
|
}
|
||||||
|
return userId;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<ConfigColumnDTO> listApp(String token, Map<String, Object> params) {
|
public List<ConfigColumnDTO> listApp(String token, Map<String, Object> params) {
|
||||||
params.put("configColumnStatus", "1");
|
params.put("configColumnStatus", "1");
|
||||||
@ -318,7 +335,7 @@ public class ConfigColumnServiceImpl extends DefaultBaseService implements IConf
|
|||||||
*/
|
*/
|
||||||
List<ConfigColumnDTO> resultList = new ArrayList<ConfigColumnDTO>();
|
List<ConfigColumnDTO> resultList = new ArrayList<ConfigColumnDTO>();
|
||||||
// 首页是加载名片创建者userId下配置的所有栏目, 个人中心加载的是token下配置的所有栏目
|
// 首页是加载名片创建者userId下配置的所有栏目, 个人中心加载的是token下配置的所有栏目
|
||||||
String userIdOrToken = getAppTokenUser(token).getId();
|
String userIdOrToken = getUserId(token);
|
||||||
if(params.get("creator") != null) {
|
if(params.get("creator") != null) {
|
||||||
userIdOrToken = params.get("creator").toString();
|
userIdOrToken = params.get("creator").toString();
|
||||||
}
|
}
|
||||||
@ -326,6 +343,7 @@ public class ConfigColumnServiceImpl extends DefaultBaseService implements IConf
|
|||||||
ConfigColumnSetDTO setDisplayDTO = iConfigColumnSetService.getSetDisplayByUserId(userIdOrToken, dto.getConfigColumnId());
|
ConfigColumnSetDTO setDisplayDTO = iConfigColumnSetService.getSetDisplayByUserId(userIdOrToken, dto.getConfigColumnId());
|
||||||
ConfigColumnSetDTO setNameDTO = iConfigColumnSetService.getSetNameByUserId(userIdOrToken, dto.getConfigColumnId());
|
ConfigColumnSetDTO setNameDTO = iConfigColumnSetService.getSetNameByUserId(userIdOrToken, dto.getConfigColumnId());
|
||||||
ConfigColumnSetDTO setOrderDTO = iConfigColumnSetService.getSetOrderByUserId(userIdOrToken, dto.getConfigColumnId());
|
ConfigColumnSetDTO setOrderDTO = iConfigColumnSetService.getSetOrderByUserId(userIdOrToken, dto.getConfigColumnId());
|
||||||
|
ConfigColumnSetDTO setTopDTO = iConfigColumnSetService.getSetTopByUserId(userIdOrToken, dto.getConfigColumnId());
|
||||||
ConfigTableDTO tableDTO = iConfigTableOperationService.getTable(dto.getConfigTableId());
|
ConfigTableDTO tableDTO = iConfigTableOperationService.getTable(dto.getConfigTableId());
|
||||||
if (tableDTO != null) {
|
if (tableDTO != null) {
|
||||||
dto.setConfigTableMode(tableDTO.getConfigTableMode());
|
dto.setConfigTableMode(tableDTO.getConfigTableMode());
|
||||||
@ -339,6 +357,10 @@ public class ConfigColumnServiceImpl extends DefaultBaseService implements IConf
|
|||||||
dto.setConfigColumnSetName(setNameDTO.getConfigColumnName());
|
dto.setConfigColumnSetName(setNameDTO.getConfigColumnName());
|
||||||
dto.setConfigColumnName(setNameDTO.getConfigColumnName());
|
dto.setConfigColumnName(setNameDTO.getConfigColumnName());
|
||||||
}
|
}
|
||||||
|
// 封装自定义是否首页置顶
|
||||||
|
if (setTopDTO != null) {
|
||||||
|
dto.setConfigColumnSetTop("1");
|
||||||
|
}
|
||||||
// 封装自定义是否显示
|
// 封装自定义是否显示
|
||||||
if (setDisplayDTO == null) {
|
if (setDisplayDTO == null) {
|
||||||
dto.setConfigColumnSet("1");
|
dto.setConfigColumnSet("1");
|
||||||
|
@ -188,6 +188,13 @@ public interface IConfigColumnSetService {
|
|||||||
*/
|
*/
|
||||||
void saveIcon(String token, ConfigColumnSetIconVO configColumnSetIconVO);
|
void saveIcon(String token, ConfigColumnSetIconVO configColumnSetIconVO);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改栏目的自定义首页显示
|
||||||
|
* @param token
|
||||||
|
* @param configColumnSetTopVO
|
||||||
|
*/
|
||||||
|
void saveTop(String token, ConfigColumnSetTopVO configColumnSetTopVO);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询栏目的自定义名称
|
* 查询栏目的自定义名称
|
||||||
* @param token
|
* @param token
|
||||||
@ -195,6 +202,26 @@ public interface IConfigColumnSetService {
|
|||||||
*/
|
*/
|
||||||
ConfigColumnSetDTO getSetName(String token, String configColumnId);
|
ConfigColumnSetDTO getSetName(String token, String configColumnId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询栏目的自定义隐藏
|
||||||
|
* @param token
|
||||||
|
* @param configColumnId
|
||||||
|
*/
|
||||||
|
ConfigColumnSetDTO getSetTop(String token, String configColumnId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询栏目的自定义隐藏
|
||||||
|
* @param userId
|
||||||
|
*/
|
||||||
|
List<ConfigColumnSetDTO> getSetTopByUserId(String userId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询栏目的自定义隐藏
|
||||||
|
* @param token
|
||||||
|
* @param configColumnId
|
||||||
|
*/
|
||||||
|
ConfigColumnSetDTO getSetTopByUserId(String token, String configColumnId);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询栏目的自定义隐藏
|
* 查询栏目的自定义隐藏
|
||||||
* @param token
|
* @param token
|
||||||
|
@ -139,6 +139,34 @@ public class ConfigColumnSetServiceImpl extends DefaultBaseService implements IC
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void saveTop(String token, ConfigColumnSetTopVO configColumnSetTopVO) {
|
||||||
|
String configColumnId = configColumnSetTopVO.getConfigColumnId();
|
||||||
|
ConfigColumnSetDTO setDTO = getSetTop(token, configColumnId);
|
||||||
|
if (setDTO != null) {
|
||||||
|
// 执行修改
|
||||||
|
setDTO.setConfigColumnTop(configColumnSetTopVO.getConfigColumnTop());
|
||||||
|
Map<String, Object> params = HashMapUtil.beanToMap(setDTO);
|
||||||
|
if (StringUtils.isBlank(token)) {
|
||||||
|
setUpdateInfo(params);
|
||||||
|
} else {
|
||||||
|
setAppUpdateInfo(token, params);
|
||||||
|
}
|
||||||
|
configColumnSetDao.update(params);
|
||||||
|
}else {
|
||||||
|
// 执行新增
|
||||||
|
String configColumnSetId = UUIDUtil.getUUID();
|
||||||
|
Map<String, Object> params = HashMapUtil.beanToMap(configColumnSetTopVO);
|
||||||
|
params.put("configColumnSetId", configColumnSetId);
|
||||||
|
if (StringUtils.isBlank(token)) {
|
||||||
|
setSaveInfo(params);
|
||||||
|
} else {
|
||||||
|
setAppSaveInfo(token, params);
|
||||||
|
}
|
||||||
|
configColumnSetDao.save(params);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void saveOrder(String token, ConfigColumnSetOrderVO configColumnSetOrderVO) {
|
public void saveOrder(String token, ConfigColumnSetOrderVO configColumnSetOrderVO) {
|
||||||
Map<String, Integer> configColumnOrderParams = configColumnSetOrderVO.getConfigColumnOrder();
|
Map<String, Integer> configColumnOrderParams = configColumnSetOrderVO.getConfigColumnOrder();
|
||||||
@ -182,6 +210,15 @@ public class ConfigColumnSetServiceImpl extends DefaultBaseService implements IC
|
|||||||
return get(params);
|
return get(params);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<ConfigColumnSetDTO> getSetTopByUserId(String userId) {
|
||||||
|
Map<String, Object> params = getHashMap(3);
|
||||||
|
params.put("userId", userId);
|
||||||
|
params.put("configColumnSetMode", "5");
|
||||||
|
return list(params);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ConfigColumnSetDTO getSetIcon(String token, String configColumnId) {
|
public ConfigColumnSetDTO getSetIcon(String token, String configColumnId) {
|
||||||
Map<String, Object> params = getHashMap(3);
|
Map<String, Object> params = getHashMap(3);
|
||||||
@ -200,6 +237,15 @@ public class ConfigColumnSetServiceImpl extends DefaultBaseService implements IC
|
|||||||
return get(params);
|
return get(params);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ConfigColumnSetDTO getSetTop(String token, String configColumnId) {
|
||||||
|
Map<String, Object> params = getHashMap(3);
|
||||||
|
params.put("userId", getUserId(token));
|
||||||
|
params.put("configColumnId", configColumnId);
|
||||||
|
params.put("configColumnSetMode", "5");
|
||||||
|
return get(params);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ConfigColumnSetDTO getSetDisplay(String token, String configColumnId) {
|
public ConfigColumnSetDTO getSetDisplay(String token, String configColumnId) {
|
||||||
Map<String, Object> params = getHashMap(3);
|
Map<String, Object> params = getHashMap(3);
|
||||||
@ -302,6 +348,7 @@ public class ConfigColumnSetServiceImpl extends DefaultBaseService implements IC
|
|||||||
ConfigColumnSetDTO setDisplayDTO = getSetDisplay(token, dto.getConfigColumnId());
|
ConfigColumnSetDTO setDisplayDTO = getSetDisplay(token, dto.getConfigColumnId());
|
||||||
ConfigColumnSetDTO setNameDTO = getSetName(token, dto.getConfigColumnId());
|
ConfigColumnSetDTO setNameDTO = getSetName(token, dto.getConfigColumnId());
|
||||||
ConfigColumnSetDTO setOrderDTO = getSetOrder(token, dto.getConfigColumnId());
|
ConfigColumnSetDTO setOrderDTO = getSetOrder(token, dto.getConfigColumnId());
|
||||||
|
ConfigColumnSetDTO setTopDTO = getSetTop(token, dto.getConfigColumnId());
|
||||||
// 封装自定义排序
|
// 封装自定义排序
|
||||||
if (setOrderDTO != null) {
|
if (setOrderDTO != null) {
|
||||||
dto.setConfigColumnSetOrder(setOrderDTO.getConfigColumnOrder());
|
dto.setConfigColumnSetOrder(setOrderDTO.getConfigColumnOrder());
|
||||||
@ -318,6 +365,10 @@ public class ConfigColumnSetServiceImpl extends DefaultBaseService implements IC
|
|||||||
}else{
|
}else{
|
||||||
dto.setConfigColumnSet("0");
|
dto.setConfigColumnSet("0");
|
||||||
}
|
}
|
||||||
|
// 封装自定义是否首页置顶
|
||||||
|
if (setTopDTO != null) {
|
||||||
|
dto.setConfigColumnSetTop("1");
|
||||||
|
}
|
||||||
configColumnList.add(dto);
|
configColumnList.add(dto);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -398,4 +449,13 @@ public class ConfigColumnSetServiceImpl extends DefaultBaseService implements IC
|
|||||||
return get(params);
|
return get(params);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ConfigColumnSetDTO getSetTopByUserId(String userId, String configColumnId) {
|
||||||
|
Map<String, Object> params = getHashMap(3);
|
||||||
|
params.put("userId", userId);
|
||||||
|
params.put("configColumnId", configColumnId);
|
||||||
|
params.put("configColumnSetMode", "5");
|
||||||
|
return get(params);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
@ -10,6 +10,7 @@
|
|||||||
<result column="config_column_name" property="configColumnName"/>
|
<result column="config_column_name" property="configColumnName"/>
|
||||||
<result column="config_column_order" property="configColumnOrder"/>
|
<result column="config_column_order" property="configColumnOrder"/>
|
||||||
<result column="config_column_icon" property="configColumnIcon"/>
|
<result column="config_column_icon" property="configColumnIcon"/>
|
||||||
|
<result column="config_column_top" property="configColumnTop"/>
|
||||||
<result column="config_column_set_mode" property="configColumnSetMode"/>
|
<result column="config_column_set_mode" property="configColumnSetMode"/>
|
||||||
<result column="creator" property="creator"/>
|
<result column="creator" property="creator"/>
|
||||||
<result column="gmt_create" property="gmtCreate"/>
|
<result column="gmt_create" property="gmtCreate"/>
|
||||||
@ -51,6 +52,7 @@
|
|||||||
config_column_set_mode,
|
config_column_set_mode,
|
||||||
config_column_order,
|
config_column_order,
|
||||||
config_column_icon,
|
config_column_icon,
|
||||||
|
config_column_top,
|
||||||
creator,
|
creator,
|
||||||
gmt_create,
|
gmt_create,
|
||||||
modifier,
|
modifier,
|
||||||
@ -63,6 +65,7 @@
|
|||||||
#{configColumnSetMode},
|
#{configColumnSetMode},
|
||||||
#{configColumnOrder},
|
#{configColumnOrder},
|
||||||
#{configColumnIcon},
|
#{configColumnIcon},
|
||||||
|
#{configColumnTop},
|
||||||
#{creator},
|
#{creator},
|
||||||
#{gmtCreate},
|
#{gmtCreate},
|
||||||
#{modifier},
|
#{modifier},
|
||||||
@ -116,6 +119,9 @@
|
|||||||
</if>
|
</if>
|
||||||
<if test="configColumnSetMode != null and configColumnSetMode != ''">
|
<if test="configColumnSetMode != null and configColumnSetMode != ''">
|
||||||
config_column_set_mode = #{configColumnSetMode},
|
config_column_set_mode = #{configColumnSetMode},
|
||||||
|
</if>
|
||||||
|
<if test="configColumnTop != null and configColumnTop != ''">
|
||||||
|
config_column_top = #{configColumnTop},
|
||||||
</if>
|
</if>
|
||||||
gmt_modified = #{gmtModified},
|
gmt_modified = #{gmtModified},
|
||||||
modifier = #{modifier},
|
modifier = #{modifier},
|
||||||
@ -132,7 +138,8 @@
|
|||||||
t1.config_column_set_mode,
|
t1.config_column_set_mode,
|
||||||
t1.config_column_set_id,
|
t1.config_column_set_id,
|
||||||
t1.config_column_order,
|
t1.config_column_order,
|
||||||
t1.config_column_icon
|
t1.config_column_icon,
|
||||||
|
t1.config_column_top
|
||||||
FROM
|
FROM
|
||||||
m_config_column_set t1
|
m_config_column_set t1
|
||||||
WHERE
|
WHERE
|
||||||
@ -216,7 +223,8 @@
|
|||||||
t1.gmt_modified,
|
t1.gmt_modified,
|
||||||
t1.is_delete,
|
t1.is_delete,
|
||||||
t1.config_column_order,
|
t1.config_column_order,
|
||||||
t1.config_column_icon
|
t1.config_column_icon,
|
||||||
|
t1.config_column_top
|
||||||
FROM
|
FROM
|
||||||
m_config_column_set t1
|
m_config_column_set t1
|
||||||
WHERE
|
WHERE
|
||||||
@ -227,6 +235,14 @@
|
|||||||
t1.id LIKE CONCAT('%', #{keywords}, '%')
|
t1.id LIKE CONCAT('%', #{keywords}, '%')
|
||||||
)
|
)
|
||||||
</if>
|
</if>
|
||||||
|
<if test="configColumnSetMode != null and configColumnSetMode != ''">
|
||||||
|
AND
|
||||||
|
t1.config_column_set_mode = #{configColumnSetMode}
|
||||||
|
</if>
|
||||||
|
<if test="userId != null and userId != ''">
|
||||||
|
AND
|
||||||
|
t1.creator = #{userId}
|
||||||
|
</if>
|
||||||
<if test="startTime != null and startTime != ''">
|
<if test="startTime != null and startTime != ''">
|
||||||
AND
|
AND
|
||||||
LEFT(t1.gmt_create, 10) <![CDATA[ >= ]]> #{startTime}
|
LEFT(t1.gmt_create, 10) <![CDATA[ >= ]]> #{startTime}
|
||||||
|
@ -3,6 +3,7 @@ package cn.com.tenlion.freemarker.controller.apis.templaterecord;
|
|||||||
import cn.com.tenlion.freemarker.pojo.dtos.templaterecord.TemplateRecordDTO;
|
import cn.com.tenlion.freemarker.pojo.dtos.templaterecord.TemplateRecordDTO;
|
||||||
import cn.com.tenlion.freemarker.pojo.vos.templaterecord.TemplateRecordVO;
|
import cn.com.tenlion.freemarker.pojo.vos.templaterecord.TemplateRecordVO;
|
||||||
import cn.com.tenlion.freemarker.service.templaterecord.ITemplateRecordService;
|
import cn.com.tenlion.freemarker.service.templaterecord.ITemplateRecordService;
|
||||||
|
import cn.com.tenlion.freemarker.util.StopPage;
|
||||||
import ink.wgink.annotation.CheckRequestBodyAnnotation;
|
import ink.wgink.annotation.CheckRequestBodyAnnotation;
|
||||||
import ink.wgink.common.base.DefaultBaseController;
|
import ink.wgink.common.base.DefaultBaseController;
|
||||||
import ink.wgink.common.component.SecurityComponent;
|
import ink.wgink.common.component.SecurityComponent;
|
||||||
@ -51,6 +52,14 @@ public class TemplateRecordController extends DefaultBaseController {
|
|||||||
@Autowired
|
@Autowired
|
||||||
private SecurityComponent securityComponent;
|
private SecurityComponent securityComponent;
|
||||||
|
|
||||||
|
@ApiOperation(value = "更改显示方式", notes = "更改显示方式")
|
||||||
|
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||||
|
@PutMapping("updatestatus/{templateRecordId}/{templateRecordStatus}")
|
||||||
|
@CheckRequestBodyAnnotation
|
||||||
|
public SuccessResult updateDirectoriesView(@PathVariable("templateRecordId") String templateRecordId, @PathVariable("templateRecordStatus") Boolean templateRecordStatus) throws Exception {
|
||||||
|
return templateRecordService.updateStatus(templateRecordId, templateRecordStatus);
|
||||||
|
}
|
||||||
|
|
||||||
@ApiOperation(value = "模板构建文件获取", notes = "模板构建文件获取")
|
@ApiOperation(value = "模板构建文件获取", notes = "模板构建文件获取")
|
||||||
@ApiImplicitParams({
|
@ApiImplicitParams({
|
||||||
@ApiImplicitParam(name = "templateFileType", value = "文件类型", paramType = "path"),
|
@ApiImplicitParam(name = "templateFileType", value = "文件类型", paramType = "path"),
|
||||||
@ -94,6 +103,9 @@ public class TemplateRecordController extends DefaultBaseController {
|
|||||||
@GetMapping(value = "get/html/{templateRecordId}", produces = "text/html")
|
@GetMapping(value = "get/html/{templateRecordId}", produces = "text/html")
|
||||||
public String getHtmlById(@PathVariable("templateRecordId") String templateRecordId) throws Exception {
|
public String getHtmlById(@PathVariable("templateRecordId") String templateRecordId) throws Exception {
|
||||||
TemplateRecordDTO dto = templateRecordService.getTemplateRecordById(templateRecordId);
|
TemplateRecordDTO dto = templateRecordService.getTemplateRecordById(templateRecordId);
|
||||||
|
if(!"1".equals(dto.getTemplateRecordStatus())) {
|
||||||
|
return StopPage.stopPage;
|
||||||
|
}
|
||||||
File file = new File(dto.getTemplateRecordPath());
|
File file = new File(dto.getTemplateRecordPath());
|
||||||
StringBuilder logContent = new StringBuilder();
|
StringBuilder logContent = new StringBuilder();
|
||||||
try {
|
try {
|
||||||
@ -131,8 +143,6 @@ public class TemplateRecordController extends DefaultBaseController {
|
|||||||
return dto;
|
return dto;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ApiOperation(value = "新增模板构建记录", notes = "新增模板构建记录接口")
|
@ApiOperation(value = "新增模板构建记录", notes = "新增模板构建记录接口")
|
||||||
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||||
@PostMapping("savetemplaterecord")
|
@PostMapping("savetemplaterecord")
|
||||||
|
@ -2,6 +2,7 @@ package cn.com.tenlion.freemarker.controller.app.apis.templaterecord;
|
|||||||
|
|
||||||
import cn.com.tenlion.freemarker.pojo.dtos.templaterecord.TemplateRecordDTO;
|
import cn.com.tenlion.freemarker.pojo.dtos.templaterecord.TemplateRecordDTO;
|
||||||
import cn.com.tenlion.freemarker.service.templaterecord.ITemplateRecordService;
|
import cn.com.tenlion.freemarker.service.templaterecord.ITemplateRecordService;
|
||||||
|
import cn.com.tenlion.freemarker.util.StopPage;
|
||||||
import ink.wgink.common.base.DefaultBaseController;
|
import ink.wgink.common.base.DefaultBaseController;
|
||||||
import ink.wgink.common.component.SecurityComponent;
|
import ink.wgink.common.component.SecurityComponent;
|
||||||
import ink.wgink.exceptions.SearchException;
|
import ink.wgink.exceptions.SearchException;
|
||||||
@ -81,6 +82,9 @@ public class TemplateRecordAppController extends DefaultBaseController {
|
|||||||
@GetMapping(value = "get/html/{templateRecordId}", produces = "text/html")
|
@GetMapping(value = "get/html/{templateRecordId}", produces = "text/html")
|
||||||
public String getHtmlById(@RequestHeader("token") String token, @PathVariable("templateRecordId") String templateRecordId) throws Exception {
|
public String getHtmlById(@RequestHeader("token") String token, @PathVariable("templateRecordId") String templateRecordId) throws Exception {
|
||||||
TemplateRecordDTO dto = templateRecordService.getTemplateRecordById(templateRecordId);
|
TemplateRecordDTO dto = templateRecordService.getTemplateRecordById(templateRecordId);
|
||||||
|
if(!"1".equals(dto.getTemplateRecordStatus())) {
|
||||||
|
return StopPage.stopPage;
|
||||||
|
}
|
||||||
File file = new File(dto.getTemplateRecordPath());
|
File file = new File(dto.getTemplateRecordPath());
|
||||||
StringBuilder logContent = new StringBuilder();
|
StringBuilder logContent = new StringBuilder();
|
||||||
try {
|
try {
|
||||||
@ -138,6 +142,9 @@ public class TemplateRecordAppController extends DefaultBaseController {
|
|||||||
@GetMapping(value = "get" + ISystemConstant.RELEASE_SUFFIX + "/html/{templateRecordId}", produces = "text/html")
|
@GetMapping(value = "get" + ISystemConstant.RELEASE_SUFFIX + "/html/{templateRecordId}", produces = "text/html")
|
||||||
public String getHtmlByIdRelease(@PathVariable("templateRecordId") String templateRecordId) throws Exception {
|
public String getHtmlByIdRelease(@PathVariable("templateRecordId") String templateRecordId) throws Exception {
|
||||||
TemplateRecordDTO dto = templateRecordService.getTemplateRecordById(templateRecordId);
|
TemplateRecordDTO dto = templateRecordService.getTemplateRecordById(templateRecordId);
|
||||||
|
if(!"1".equals(dto.getTemplateRecordStatus())) {
|
||||||
|
return StopPage.stopPage;
|
||||||
|
}
|
||||||
File file = new File(dto.getTemplateRecordPath());
|
File file = new File(dto.getTemplateRecordPath());
|
||||||
StringBuilder logContent = new StringBuilder();
|
StringBuilder logContent = new StringBuilder();
|
||||||
try {
|
try {
|
||||||
|
@ -63,4 +63,5 @@ public interface ITemplateRecordDao {
|
|||||||
|
|
||||||
List<TemplateRecordDTO> getTemplateRecordByTemplateId(Map<String, Object> params) throws UpdateException;
|
List<TemplateRecordDTO> getTemplateRecordByTemplateId(Map<String, Object> params) throws UpdateException;
|
||||||
|
|
||||||
|
void updateStatus(Map<String, Object> params) throws UpdateException;
|
||||||
}
|
}
|
||||||
|
@ -10,7 +10,6 @@ import cn.com.tenlion.freemarker.util.TemplateBuilderUtil;
|
|||||||
import cn.com.tenlion.freemarker.util.TemplateCreateData;
|
import cn.com.tenlion.freemarker.util.TemplateCreateData;
|
||||||
import com.github.pagehelper.PageHelper;
|
import com.github.pagehelper.PageHelper;
|
||||||
import com.github.pagehelper.PageInfo;
|
import com.github.pagehelper.PageInfo;
|
||||||
import com.google.common.util.concurrent.AbstractService;
|
|
||||||
import ink.wgink.common.base.DefaultBaseService;
|
import ink.wgink.common.base.DefaultBaseService;
|
||||||
import ink.wgink.exceptions.RemoveException;
|
import ink.wgink.exceptions.RemoveException;
|
||||||
import ink.wgink.exceptions.SaveException;
|
import ink.wgink.exceptions.SaveException;
|
||||||
|
@ -4,6 +4,7 @@ import cn.com.tenlion.freemarker.pojo.dtos.templaterecord.TemplateRecordDTO;
|
|||||||
import cn.com.tenlion.freemarker.pojo.vos.templaterecord.TemplateRecordVO;
|
import cn.com.tenlion.freemarker.pojo.vos.templaterecord.TemplateRecordVO;
|
||||||
import ink.wgink.exceptions.RemoveException;
|
import ink.wgink.exceptions.RemoveException;
|
||||||
import ink.wgink.exceptions.SearchException;
|
import ink.wgink.exceptions.SearchException;
|
||||||
|
import ink.wgink.exceptions.UpdateException;
|
||||||
import ink.wgink.pojo.ListPage;
|
import ink.wgink.pojo.ListPage;
|
||||||
import ink.wgink.pojo.result.SuccessResult;
|
import ink.wgink.pojo.result.SuccessResult;
|
||||||
import ink.wgink.pojo.result.SuccessResultList;
|
import ink.wgink.pojo.result.SuccessResultList;
|
||||||
@ -108,4 +109,5 @@ public interface ITemplateRecordService {
|
|||||||
|
|
||||||
List<TemplateRecordDTO> getTemplateRecordByTemplateId(String templateId) throws SearchException;
|
List<TemplateRecordDTO> getTemplateRecordByTemplateId(String templateId) throws SearchException;
|
||||||
|
|
||||||
|
SuccessResult updateStatus(String templateRecordId, Boolean templateRecordStatus) throws UpdateException;
|
||||||
}
|
}
|
||||||
|
@ -10,6 +10,7 @@ import com.github.pagehelper.PageInfo;
|
|||||||
import ink.wgink.common.base.DefaultBaseService;
|
import ink.wgink.common.base.DefaultBaseService;
|
||||||
import ink.wgink.exceptions.RemoveException;
|
import ink.wgink.exceptions.RemoveException;
|
||||||
import ink.wgink.exceptions.SearchException;
|
import ink.wgink.exceptions.SearchException;
|
||||||
|
import ink.wgink.exceptions.UpdateException;
|
||||||
import ink.wgink.pojo.ListPage;
|
import ink.wgink.pojo.ListPage;
|
||||||
import ink.wgink.pojo.result.SuccessResult;
|
import ink.wgink.pojo.result.SuccessResult;
|
||||||
import ink.wgink.pojo.result.SuccessResultList;
|
import ink.wgink.pojo.result.SuccessResultList;
|
||||||
@ -17,6 +18,8 @@ import ink.wgink.util.map.HashMapUtil;
|
|||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.io.File;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
@ -94,13 +97,24 @@ public class TemplateRecordServiceImpl extends DefaultBaseService implements ITe
|
|||||||
*/
|
*/
|
||||||
private void removeTemplateRecordInfo(String token, String ids) {
|
private void removeTemplateRecordInfo(String token, String ids) {
|
||||||
Map<String, Object> params = getHashMap(3);
|
Map<String, Object> params = getHashMap(3);
|
||||||
params.put("templateRecordIds", Arrays.asList(ids.split("_")));
|
List<String> idsArray = Arrays.asList(ids.split("_"));
|
||||||
|
params.put("templateRecordIds", idsArray);
|
||||||
if (StringUtils.isBlank(token)) {
|
if (StringUtils.isBlank(token)) {
|
||||||
setUpdateInfo(params);
|
setUpdateInfo(params);
|
||||||
} else {
|
} else {
|
||||||
setAppUpdateInfo(token, params);
|
setAppUpdateInfo(token, params);
|
||||||
}
|
}
|
||||||
|
List<TemplateRecordDTO> templateRecordDTOList = listTemplateRecord(params);
|
||||||
templateRecordDao.removeTemplateRecord(params);
|
templateRecordDao.removeTemplateRecord(params);
|
||||||
|
/**
|
||||||
|
* 删除实际的文件
|
||||||
|
*/
|
||||||
|
for(TemplateRecordDTO dto : templateRecordDTOList) {
|
||||||
|
File file = new File(dto.getTemplateRecordPath());
|
||||||
|
if(file.exists()) {
|
||||||
|
file.delete();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -161,4 +175,14 @@ public class TemplateRecordServiceImpl extends DefaultBaseService implements ITe
|
|||||||
return templateRecordDao.getTemplateRecordByTemplateId(params);
|
return templateRecordDao.getTemplateRecordByTemplateId(params);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public SuccessResult updateStatus(String templateRecordId, Boolean templateRecordStatus) throws UpdateException {
|
||||||
|
Map<String, Object> params = HashMapUtil.beanToMap(3);
|
||||||
|
params.put("templateRecordId", templateRecordId);
|
||||||
|
params.put("templateRecordStatus", templateRecordStatus ? "1" : "0");
|
||||||
|
setUpdateInfo(params);
|
||||||
|
templateRecordDao.updateStatus(params);
|
||||||
|
return new SuccessResult();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
File diff suppressed because one or more lines are too long
@ -97,6 +97,14 @@ public class TemplateBuilderUtil {
|
|||||||
templateMap.put(templateCode, templateConfigDTO);
|
templateMap.put(templateCode, templateConfigDTO);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 静态模板文件删除
|
||||||
|
* @throws Exception
|
||||||
|
*/
|
||||||
|
public void removeFile(String businessId) {
|
||||||
|
iTemplateRecordStaticService.removeTemplateRecord(businessId);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 静态模板文件生成
|
* 静态模板文件生成
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
@ -180,6 +188,7 @@ public class TemplateBuilderUtil {
|
|||||||
* 做生成模板记录
|
* 做生成模板记录
|
||||||
*/
|
*/
|
||||||
TemplateRecordVO recordVo = new TemplateRecordVO();
|
TemplateRecordVO recordVo = new TemplateRecordVO();
|
||||||
|
recordVo.setTemplateRecordStatus(templateCreateData.getPublishStatus() ? "1" : "0");
|
||||||
recordVo.setBusinessContent(templateCreateData.getBusinessContent());
|
recordVo.setBusinessContent(templateCreateData.getBusinessContent());
|
||||||
recordVo.setTemplateRecordId(templateCreateData.getBusinessId());
|
recordVo.setTemplateRecordId(templateCreateData.getBusinessId());
|
||||||
recordVo.setTemplateId(templateConfigDTO.getTemplateConfigId());
|
recordVo.setTemplateId(templateConfigDTO.getTemplateConfigId());
|
||||||
@ -195,7 +204,7 @@ public class TemplateBuilderUtil {
|
|||||||
recordUrlNginx = recordUrlNginx + outFilePath.replaceAll(Matcher.quoteReplacement(File.separator), "/") + outFileName;
|
recordUrlNginx = recordUrlNginx + outFilePath.replaceAll(Matcher.quoteReplacement(File.separator), "/") + outFileName;
|
||||||
}
|
}
|
||||||
recordVo.setTemplateRecordUrlNginx(recordUrlNginx);
|
recordVo.setTemplateRecordUrlNginx(recordUrlNginx);
|
||||||
iTemplateRecordStaticService.saveTemplateRecord(recordVo);
|
iTemplateRecordStaticService.saveTemplateRecordByToken(templateCreateData.getToken(), recordVo);
|
||||||
return recordVo;
|
return recordVo;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -8,6 +8,16 @@ import java.util.Map;
|
|||||||
*/
|
*/
|
||||||
public class TemplateCreateData<T> {
|
public class TemplateCreateData<T> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 移动端用户的token, 后台调用不需要传入
|
||||||
|
*/
|
||||||
|
private String token = "";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否发布
|
||||||
|
*/
|
||||||
|
private Boolean publishStatus = false;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 不能为空 模板编码
|
* 不能为空 模板编码
|
||||||
*/
|
*/
|
||||||
@ -43,6 +53,22 @@ public class TemplateCreateData<T> {
|
|||||||
*/
|
*/
|
||||||
private String businessContent;
|
private String businessContent;
|
||||||
|
|
||||||
|
public String getToken() {
|
||||||
|
return token == null ? "" : token;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setToken(String token) {
|
||||||
|
this.token = token;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Boolean getPublishStatus() {
|
||||||
|
return publishStatus;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPublishStatus(Boolean publishStatus) {
|
||||||
|
this.publishStatus = publishStatus;
|
||||||
|
}
|
||||||
|
|
||||||
public String getTemplateCode() {
|
public String getTemplateCode() {
|
||||||
return templateCode == null ? "" : templateCode;
|
return templateCode == null ? "" : templateCode;
|
||||||
}
|
}
|
||||||
|
@ -214,7 +214,7 @@
|
|||||||
</foreach>
|
</foreach>
|
||||||
</if>
|
</if>
|
||||||
ORDER BY
|
ORDER BY
|
||||||
t1.template_order
|
t1.template_order, t1.template_code
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
@ -10,10 +10,20 @@
|
|||||||
<result column="template_record_path" property="templateRecordPath"/>
|
<result column="template_record_path" property="templateRecordPath"/>
|
||||||
<result column="template_record_url" property="templateRecordUrl"/>
|
<result column="template_record_url" property="templateRecordUrl"/>
|
||||||
<result column="template_record_url_nginx" property="templateRecordUrlNginx"/>
|
<result column="template_record_url_nginx" property="templateRecordUrlNginx"/>
|
||||||
|
<result column="template_record_status" property="templateRecordStatus"/>
|
||||||
<result column="template_name" property="templateName"/>
|
<result column="template_name" property="templateName"/>
|
||||||
<result column="gmt_create" property="gmtCreate"/>
|
<result column="gmt_create" property="gmtCreate"/>
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
|
<update id="updateStatus" parameterType="map">
|
||||||
|
UPDATE
|
||||||
|
m_template_record
|
||||||
|
SET
|
||||||
|
template_record_status = #{templateRecordStatus}
|
||||||
|
WHERE
|
||||||
|
template_record_id = #{templateRecordId}
|
||||||
|
</update>
|
||||||
|
|
||||||
<select id="getTemplateRecordByTemplateId" parameterType="map" resultMap="templateRecordDTO">
|
<select id="getTemplateRecordByTemplateId" parameterType="map" resultMap="templateRecordDTO">
|
||||||
SELECT
|
SELECT
|
||||||
t1.template_id,
|
t1.template_id,
|
||||||
@ -22,7 +32,8 @@
|
|||||||
t1.template_record_path,
|
t1.template_record_path,
|
||||||
t1.template_record_url,
|
t1.template_record_url,
|
||||||
t1.template_record_id,
|
t1.template_record_id,
|
||||||
t1.template_record_url_nginx
|
t1.template_record_url_nginx,
|
||||||
|
t1.template_record_status
|
||||||
FROM
|
FROM
|
||||||
m_template_record t1
|
m_template_record t1
|
||||||
WHERE
|
WHERE
|
||||||
@ -40,6 +51,7 @@
|
|||||||
template_record_path,
|
template_record_path,
|
||||||
template_record_url,
|
template_record_url,
|
||||||
template_record_url_nginx,
|
template_record_url_nginx,
|
||||||
|
template_record_status,
|
||||||
creator,
|
creator,
|
||||||
gmt_create,
|
gmt_create,
|
||||||
modifier,
|
modifier,
|
||||||
@ -53,6 +65,7 @@
|
|||||||
#{templateRecordPath},
|
#{templateRecordPath},
|
||||||
#{templateRecordUrl},
|
#{templateRecordUrl},
|
||||||
#{templateRecordUrlNginx},
|
#{templateRecordUrlNginx},
|
||||||
|
#{templateRecordStatus},
|
||||||
#{creator},
|
#{creator},
|
||||||
#{gmtCreate},
|
#{gmtCreate},
|
||||||
#{modifier},
|
#{modifier},
|
||||||
@ -62,12 +75,8 @@
|
|||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
<update id="removeTemplateRecord" parameterType="map">
|
<update id="removeTemplateRecord" parameterType="map">
|
||||||
UPDATE
|
DELETE FROM
|
||||||
m_template_record
|
m_template_record
|
||||||
SET
|
|
||||||
is_delete = 1,
|
|
||||||
modifier = #{modifier},
|
|
||||||
gmt_modified = #{gmtModified}
|
|
||||||
WHERE
|
WHERE
|
||||||
template_record_id IN
|
template_record_id IN
|
||||||
<foreach collection="templateRecordIds" index="index" open="(" separator="," close=")">
|
<foreach collection="templateRecordIds" index="index" open="(" separator="," close=")">
|
||||||
@ -96,6 +105,9 @@
|
|||||||
</if>
|
</if>
|
||||||
<if test="templateRecordUrlNginx != null and templateRecordUrlNginx != ''">
|
<if test="templateRecordUrlNginx != null and templateRecordUrlNginx != ''">
|
||||||
template_record_url_nginx = #{templateRecordUrlNginx},
|
template_record_url_nginx = #{templateRecordUrlNginx},
|
||||||
|
</if>
|
||||||
|
<if test="templateRecordStatus != null and templateRecordStatus != ''">
|
||||||
|
template_record_status = #{templateRecordStatus},
|
||||||
</if>
|
</if>
|
||||||
modifier = #{modifier},
|
modifier = #{modifier},
|
||||||
gmt_modified = #{gmtModified}
|
gmt_modified = #{gmtModified}
|
||||||
@ -112,7 +124,8 @@
|
|||||||
t1.template_record_url,
|
t1.template_record_url,
|
||||||
t1.template_record_id,
|
t1.template_record_id,
|
||||||
t1.template_record_url_nginx,
|
t1.template_record_url_nginx,
|
||||||
t1.gmt_create
|
t1.gmt_create,
|
||||||
|
t1.template_record_status
|
||||||
FROM
|
FROM
|
||||||
m_template_record t1
|
m_template_record t1
|
||||||
WHERE
|
WHERE
|
||||||
@ -134,7 +147,8 @@
|
|||||||
t1.template_record_id,
|
t1.template_record_id,
|
||||||
t1.template_record_url_nginx,
|
t1.template_record_url_nginx,
|
||||||
t2.template_name,
|
t2.template_name,
|
||||||
t1.gmt_create
|
t1.gmt_create,
|
||||||
|
t1.template_record_status
|
||||||
FROM
|
FROM
|
||||||
m_template_record t1
|
m_template_record t1
|
||||||
LEFT JOIN
|
LEFT JOIN
|
||||||
|
@ -66,12 +66,13 @@
|
|||||||
base: 'assets/layuiadmin/'
|
base: 'assets/layuiadmin/'
|
||||||
}).extend({
|
}).extend({
|
||||||
index: 'lib/index'
|
index: 'lib/index'
|
||||||
}).use(['index', 'table', 'laydate', 'common'], function() {
|
}).use(['index', 'table', 'laydate', 'common', 'form'], function() {
|
||||||
var $ = layui.$;
|
var $ = layui.$;
|
||||||
var $win = $(window);
|
var $win = $(window);
|
||||||
var table = layui.table;
|
var table = layui.table;
|
||||||
var admin = layui.admin;
|
var admin = layui.admin;
|
||||||
var laydate = layui.laydate;
|
var laydate = layui.laydate;
|
||||||
|
var form = layui.form;
|
||||||
var common = layui.common;
|
var common = layui.common;
|
||||||
var resizeTimeout = null;
|
var resizeTimeout = null;
|
||||||
var tableUrl = 'api/templaterecord/listpagetemplaterecord';
|
var tableUrl = 'api/templaterecord/listpagetemplaterecord';
|
||||||
@ -126,7 +127,7 @@
|
|||||||
return rowData;
|
return rowData;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{field: 'businessContent', width: 350, title: '业务内容', align:'center',
|
{field: 'businessContent', width: 300, title: '业务内容', align:'center',
|
||||||
templet: function(row) {
|
templet: function(row) {
|
||||||
var rowData = row[this.field];
|
var rowData = row[this.field];
|
||||||
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
||||||
@ -171,6 +172,12 @@
|
|||||||
return '<a href="' + rowData + '" download="' + templateRecordId + '" target="_blank">右键目标另存为</a>';
|
return '<a href="' + rowData + '" download="' + templateRecordId + '" target="_blank">右键目标另存为</a>';
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{field: 'templateRecordStatus', width: 150, fixed: 'right', title: '发布开关', align:'center',
|
||||||
|
templet: function(row) {
|
||||||
|
var rowData = row[this.field];
|
||||||
|
return '<input type="checkbox" value="' + rowData + '" '+ ( rowData == 1 ? "checked" : "") + ' templateRecordId="'+ row.templateRecordId +'" lay-filter="templateRecordStatusEvent" name="templateRecordStatus" lay-skin="switch" lay-text="发布|关闭">';
|
||||||
|
}
|
||||||
|
},
|
||||||
{field:'templateRecordUrlNginx', width:120, title: '内容预览', fixed: 'right', align:'center',
|
{field:'templateRecordUrlNginx', width:120, title: '内容预览', fixed: 'right', align:'center',
|
||||||
templet: function(row) {
|
templet: function(row) {
|
||||||
return '<button lay-event="templateRecordUrlNginxViewEvent" type="button" class="layui-btn layui-btn-xs layui-btn-radius">内容预览</button>';
|
return '<button lay-event="templateRecordUrlNginxViewEvent" type="button" class="layui-btn layui-btn-xs layui-btn-radius">内容预览</button>';
|
||||||
@ -190,6 +197,20 @@
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 审核开关
|
||||||
|
form.on('switch(templateRecordStatusEvent)', function () {
|
||||||
|
var loadLayerIndex;
|
||||||
|
var obj = {};
|
||||||
|
top.restAjax.put(top.restAjax.path('api/templaterecord/updatestatus/{templateRecordId}/{templateRecordStatus}', [$(this).attr("templateRecordId"), this.checked]), obj, null, function(code, data) {
|
||||||
|
}, function(code, data) {
|
||||||
|
top.dialog.msg(data.msg);
|
||||||
|
}, function() {
|
||||||
|
loadLayerIndex = top.dialog.msg(top.dataMessage.committing, {icon: 16, time: 0, shade: 0.3});
|
||||||
|
}, function() {
|
||||||
|
top.dialog.close(loadLayerIndex);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
// 重载表格
|
// 重载表格
|
||||||
function reloadTable(currentPage) {
|
function reloadTable(currentPage) {
|
||||||
table.reload('dataTable', {
|
table.reload('dataTable', {
|
||||||
|
@ -71,10 +71,12 @@ public class ConfigColumnDTO implements Serializable {
|
|||||||
private Integer isDelete;
|
private Integer isDelete;
|
||||||
@ApiModelProperty(name = "configColumnSet", value = "个人自定义的隐藏状态,1:显示,0:隐藏")
|
@ApiModelProperty(name = "configColumnSet", value = "个人自定义的隐藏状态,1:显示,0:隐藏")
|
||||||
private String configColumnSet = "0";
|
private String configColumnSet = "0";
|
||||||
@ApiModelProperty(name = "configColumnName", value = "个人自定义的栏目名称,为空则未设置")
|
@ApiModelProperty(name = "configColumnSetName", value = "个人自定义的栏目名称,为空则未设置")
|
||||||
private String configColumnSetName;
|
private String configColumnSetName;
|
||||||
@ApiModelProperty(name = "configColumnSetOrder", value = "个人自定义的栏目排序,为空则未设置")
|
@ApiModelProperty(name = "configColumnSetOrder", value = "个人自定义的栏目排序,为空则未设置")
|
||||||
private Integer configColumnSetOrder;
|
private Integer configColumnSetOrder;
|
||||||
|
@ApiModelProperty(name = "configColumnSetTop", value = "企业自定义的首页置顶,为空则未设置")
|
||||||
|
private String configColumnSetTop;
|
||||||
@ApiModelProperty(name = "configColumnComment", value = "评论开关")
|
@ApiModelProperty(name = "configColumnComment", value = "评论开关")
|
||||||
private String configColumnComment;
|
private String configColumnComment;
|
||||||
@ApiModelProperty(name = "configColumnDispatch", value = "转发开关")
|
@ApiModelProperty(name = "configColumnDispatch", value = "转发开关")
|
||||||
@ -88,6 +90,14 @@ public class ConfigColumnDTO implements Serializable {
|
|||||||
@ApiModelProperty(name = "configColumnRole", value = "适用角色")
|
@ApiModelProperty(name = "configColumnRole", value = "适用角色")
|
||||||
private String configColumnRole;
|
private String configColumnRole;
|
||||||
|
|
||||||
|
public String getConfigColumnSetTop() {
|
||||||
|
return configColumnSetTop == null ? "" : configColumnSetTop;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setConfigColumnSetTop(String configColumnSetTop) {
|
||||||
|
this.configColumnSetTop = configColumnSetTop;
|
||||||
|
}
|
||||||
|
|
||||||
public String getConfigColumnRole() {
|
public String getConfigColumnRole() {
|
||||||
return configColumnRole == null ? "" : configColumnRole;
|
return configColumnRole == null ? "" : configColumnRole;
|
||||||
}
|
}
|
||||||
|
@ -26,7 +26,9 @@ public class ConfigColumnSetDTO implements Serializable {
|
|||||||
private Integer configColumnOrder;
|
private Integer configColumnOrder;
|
||||||
@ApiModelProperty(name = "configColumnIcon", value = "图标")
|
@ApiModelProperty(name = "configColumnIcon", value = "图标")
|
||||||
private String configColumnIcon;
|
private String configColumnIcon;
|
||||||
@ApiModelProperty(name = "configColumnSetMode", value = "设置模式1:隐藏,2:更名,3:排序,4:图标")
|
@ApiModelProperty(name = "configColumnTop", value = "首页置顶")
|
||||||
|
private String configColumnTop;
|
||||||
|
@ApiModelProperty(name = "configColumnSetMode", value = "设置模式1:隐藏,2:更名,3:排序,4:图标,5:首页置顶")
|
||||||
private String configColumnSetMode;
|
private String configColumnSetMode;
|
||||||
@ApiModelProperty(name = "creator", value = "")
|
@ApiModelProperty(name = "creator", value = "")
|
||||||
private String creator;
|
private String creator;
|
||||||
@ -39,6 +41,14 @@ public class ConfigColumnSetDTO implements Serializable {
|
|||||||
@ApiModelProperty(name = "isDelete", value = "")
|
@ApiModelProperty(name = "isDelete", value = "")
|
||||||
private Integer isDelete;
|
private Integer isDelete;
|
||||||
|
|
||||||
|
public String getConfigColumnTop() {
|
||||||
|
return configColumnTop == null ? "" : configColumnTop;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setConfigColumnTop(String configColumnTop) {
|
||||||
|
this.configColumnTop = configColumnTop;
|
||||||
|
}
|
||||||
|
|
||||||
public Integer getConfigColumnOrder() {
|
public Integer getConfigColumnOrder() {
|
||||||
return configColumnOrder;
|
return configColumnOrder;
|
||||||
}
|
}
|
||||||
|
@ -18,7 +18,7 @@ public class ConfigColumnSetDisplayVO {
|
|||||||
@ApiModelProperty(name = "configColumnId", value = "栏目ID")
|
@ApiModelProperty(name = "configColumnId", value = "栏目ID")
|
||||||
@CheckEmptyAnnotation(name = "栏目ID")
|
@CheckEmptyAnnotation(name = "栏目ID")
|
||||||
private String configColumnId;
|
private String configColumnId;
|
||||||
@ApiModelProperty(name = "configColumnSetMode", value = "设置模式1:隐藏,2:更名,3:排序,4:图标(前端无需传入)")
|
@ApiModelProperty(name = "configColumnSetMode", value = "设置模式1:隐藏,2:更名,3:排序,4:图标,5:首页置顶(前端无需传入)")
|
||||||
private String configColumnSetMode = "1";
|
private String configColumnSetMode = "1";
|
||||||
|
|
||||||
public String getConfigColumnId() {
|
public String getConfigColumnId() {
|
||||||
|
@ -18,7 +18,7 @@ public class ConfigColumnSetIconVO {
|
|||||||
@ApiModelProperty(name = "configColumnId", value = "栏目ID")
|
@ApiModelProperty(name = "configColumnId", value = "栏目ID")
|
||||||
@CheckEmptyAnnotation(name = "栏目ID")
|
@CheckEmptyAnnotation(name = "栏目ID")
|
||||||
private String configColumnId;
|
private String configColumnId;
|
||||||
@ApiModelProperty(name = "configColumnSetMode", value = "设置模式1:隐藏,2:更名,3:排序,4:图标(前端无需传入)")
|
@ApiModelProperty(name = "configColumnSetMode", value = "设置模式1:隐藏,2:更名,3:排序,4:图标,5:首页置顶(前端无需传入)")
|
||||||
private String configColumnSetMode = "3";
|
private String configColumnSetMode = "3";
|
||||||
@ApiModelProperty(name = "configColumnIcon", value = "更改的图标")
|
@ApiModelProperty(name = "configColumnIcon", value = "更改的图标")
|
||||||
@CheckEmptyAnnotation(name = "更改的图标")
|
@CheckEmptyAnnotation(name = "更改的图标")
|
||||||
|
@ -21,7 +21,7 @@ public class ConfigColumnSetNameVO {
|
|||||||
@ApiModelProperty(name = "configColumnName", value = "更名")
|
@ApiModelProperty(name = "configColumnName", value = "更名")
|
||||||
@CheckEmptyAnnotation(name = "更改的名字")
|
@CheckEmptyAnnotation(name = "更改的名字")
|
||||||
private String configColumnName;
|
private String configColumnName;
|
||||||
@ApiModelProperty(name = "configColumnSetMode", value = "设置模式1:隐藏,2:更名,3:排序,4:图标(前端无需传入)")
|
@ApiModelProperty(name = "configColumnSetMode", value = "设置模式1:隐藏,2:更名,3:排序,4:图标,5:首页置顶(前端无需传入)")
|
||||||
private String configColumnSetMode = "2";
|
private String configColumnSetMode = "2";
|
||||||
|
|
||||||
public String getConfigColumnId() {
|
public String getConfigColumnId() {
|
||||||
|
@ -22,7 +22,7 @@ public class ConfigColumnSetOrderVO {
|
|||||||
|
|
||||||
@ApiModelProperty(name = "configColumnId", value = "栏目ID")
|
@ApiModelProperty(name = "configColumnId", value = "栏目ID")
|
||||||
private String configColumnId;
|
private String configColumnId;
|
||||||
@ApiModelProperty(name = "configColumnSetMode", value = "设置模式1:隐藏,2:更名,3:排序,4:图标(前端无需传入)")
|
@ApiModelProperty(name = "configColumnSetMode", value = "设置模式1:隐藏,2:更名,3:排序,4:图标,5:首页置顶(前端无需传入)")
|
||||||
private String configColumnSetMode = "3";
|
private String configColumnSetMode = "3";
|
||||||
@ApiModelProperty(name = "configColumnOrder", value = "更改的排序")
|
@ApiModelProperty(name = "configColumnOrder", value = "更改的排序")
|
||||||
private Map<String, Integer> configColumnOrder = new HashMap<String, Integer>();
|
private Map<String, Integer> configColumnOrder = new HashMap<String, Integer>();
|
||||||
|
@ -36,6 +36,16 @@ public class TemplateRecordDTO {
|
|||||||
private String templateContentText;
|
private String templateContentText;
|
||||||
@ApiModelProperty(name = "gmtCreate", value = "创建时间")
|
@ApiModelProperty(name = "gmtCreate", value = "创建时间")
|
||||||
private String gmtCreate;
|
private String gmtCreate;
|
||||||
|
@ApiModelProperty(name = "templateRecordStatus", value = "发布状态1:发布,0:不发布")
|
||||||
|
private String templateRecordStatus;
|
||||||
|
|
||||||
|
public String getTemplateRecordStatus() {
|
||||||
|
return templateRecordStatus == null ? "" : templateRecordStatus;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTemplateRecordStatus(String templateRecordStatus) {
|
||||||
|
this.templateRecordStatus = templateRecordStatus;
|
||||||
|
}
|
||||||
|
|
||||||
public String getGmtCreate() {
|
public String getGmtCreate() {
|
||||||
return gmtCreate == null ? "" : gmtCreate;
|
return gmtCreate == null ? "" : gmtCreate;
|
||||||
|
@ -33,7 +33,16 @@ public class TemplateRecordVO {
|
|||||||
private String templateRecordUrl;
|
private String templateRecordUrl;
|
||||||
@ApiModelProperty(name = "templateRecordUrlNginx", value = "模板访问全路径")
|
@ApiModelProperty(name = "templateRecordUrlNginx", value = "模板访问全路径")
|
||||||
private String templateRecordUrlNginx;
|
private String templateRecordUrlNginx;
|
||||||
|
@ApiModelProperty(name = "templateRecordStatus", value = "发布状态1:发布,0:不发布")
|
||||||
|
private String templateRecordStatus;
|
||||||
|
|
||||||
|
public String getTemplateRecordStatus() {
|
||||||
|
return templateRecordStatus == null ? "" : templateRecordStatus;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTemplateRecordStatus(String templateRecordStatus) {
|
||||||
|
this.templateRecordStatus = templateRecordStatus;
|
||||||
|
}
|
||||||
public String getTemplateRecordUrlNginx() {
|
public String getTemplateRecordUrlNginx() {
|
||||||
return templateRecordUrlNginx == null ? "" : templateRecordUrlNginx;
|
return templateRecordUrlNginx == null ? "" : templateRecordUrlNginx;
|
||||||
}
|
}
|
||||||
|
2
pom.xml
2
pom.xml
@ -48,9 +48,11 @@
|
|||||||
<module>module-config-content</module>
|
<module>module-config-content</module>
|
||||||
<module>interface-config-content</module>
|
<module>interface-config-content</module>
|
||||||
<module>pojo-config-content</module>
|
<module>pojo-config-content</module>
|
||||||
|
|
||||||
<module>interface-project-config</module>
|
<module>interface-project-config</module>
|
||||||
<module>pojo-project-config</module>
|
<module>pojo-project-config</module>
|
||||||
<module>module-project-config</module>
|
<module>module-project-config</module>
|
||||||
|
|
||||||
<module>interface-news</module>
|
<module>interface-news</module>
|
||||||
<module>module-news</module>
|
<module>module-news</module>
|
||||||
<module>pojo-news</module>
|
<module>pojo-news</module>
|
||||||
|
Loading…
Reference in New Issue
Block a user