From efcfe8b64cba9f1e6026b1224f29dc2c48962be0 Mon Sep 17 00:00:00 2001 From: cuibaocheng Date: Thu, 23 Dec 2021 10:37:23 +0800 Subject: [PATCH] =?UTF-8?q?=E6=95=B0=E6=8D=AE=E6=95=B4=E5=90=88(=E9=A1=B9?= =?UTF-8?q?=E7=9B=AE=20-=20etl=E4=B8=AD=E9=97=B4=E4=BB=B6)=20=E6=95=B4?= =?UTF-8?q?=E5=90=88=E8=A1=A8=E5=8D=95=E7=AE=A1=E7=90=86=20/=20=E6=95=B4?= =?UTF-8?q?=E5=90=88=E8=AE=B0=E5=BD=95=20=E6=95=B0=E6=8D=AE=E5=90=8C?= =?UTF-8?q?=E6=AD=A5(etl=20-=20=E5=A4=A7=E6=95=B0=E6=8D=AE=E5=B1=80)=20?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E6=BA=90=E7=AE=A1=E7=90=86=20/=20=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E8=A1=A8=E7=AE=A1=E7=90=86(=E5=BE=85=E5=86=99)=20/=20?= =?UTF-8?q?=E5=90=8C=E6=AD=A5=E6=96=B9=E5=BC=8F=E9=85=8D=E7=BD=AE(?= =?UTF-8?q?=E5=BE=85=E5=86=99)=20/=20=E5=90=8C=E6=AD=A5=E8=AE=B0=E5=BD=95(?= =?UTF-8?q?=E5=BE=85=E5=86=99)=20=E6=95=B0=E6=8D=AE=E6=9F=A5=E8=AF=A2=20?= =?UTF-8?q?=E9=A2=84=E8=AE=BESQL=E6=9F=A5=E8=AF=A2=E9=85=8D=E7=BD=AE?= =?UTF-8?q?=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/BigdataTemplateServiceImpl.java | 5 + .../com/tenlion/bigdata/util/WeatherUtil.java | 37 ++- .../save-picturestemplatearea.html | 2 +- .../ConfigColumnSetAppController.java | 17 +- .../impl/ConfigColumnServiceImpl.java | 24 +- .../IConfigColumnSetService.java | 27 ++ .../impl/ConfigColumnSetServiceImpl.java | 60 ++++ .../config-column-set-mapper.xml | 20 +- .../TemplateRecordController.java | 14 +- .../TemplateRecordAppController.java | 7 + .../templaterecord/ITemplateRecordDao.java | 1 + .../impl/TemplateConfigServiceImpl.java | 1 - .../ITemplateRecordService.java | 2 + .../impl/TemplateRecordServiceImpl.java | 26 +- .../com/tenlion/freemarker/util/StopPage.java | 299 ++++++++++++++++++ .../freemarker/util/TemplateBuilderUtil.java | 11 +- .../freemarker/util/TemplateCreateData.java | 26 ++ .../templateconfig/templateconfig-mapper.xml | 2 +- .../templaterecord/templaterecord-mapper.xml | 30 +- .../templaterecord/list-templaterecord.html | 25 +- .../dtos/configcolumn/ConfigColumnDTO.java | 12 +- .../configcolumnset/ConfigColumnSetDTO.java | 12 +- .../ConfigColumnSetDisplayVO.java | 2 +- .../ConfigColumnSetIconVO.java | 2 +- .../ConfigColumnSetNameVO.java | 2 +- .../ConfigColumnSetOrderVO.java | 2 +- .../templaterecord/TemplateRecordDTO.java | 10 + .../vos/templaterecord/TemplateRecordVO.java | 9 + pom.xml | 2 + 29 files changed, 658 insertions(+), 31 deletions(-) create mode 100644 module-freemarker/src/main/java/cn/com/tenlion/freemarker/util/StopPage.java diff --git a/module-bigdata/src/main/java/cn/com/tenlion/bigdata/service/bigdatatemplate/impl/BigdataTemplateServiceImpl.java b/module-bigdata/src/main/java/cn/com/tenlion/bigdata/service/bigdatatemplate/impl/BigdataTemplateServiceImpl.java index 7c9c11d..9eb4334 100644 --- a/module-bigdata/src/main/java/cn/com/tenlion/bigdata/service/bigdatatemplate/impl/BigdataTemplateServiceImpl.java +++ b/module-bigdata/src/main/java/cn/com/tenlion/bigdata/service/bigdatatemplate/impl/BigdataTemplateServiceImpl.java @@ -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.util.BigDataResult; 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.TemplateCreateData; import com.github.pagehelper.PageHelper; @@ -64,6 +65,9 @@ public class BigdataTemplateServiceImpl extends DefaultBaseService implements IB @Autowired private IDataService iDataService; + @Autowired + private ITemplateRecordService iTemplateRecordService; + @Override public SuccessResult saveBigdataTemplate(BigdataTemplateVO bigdataTemplateVO) throws Exception { saveBigdataTemplateInfo(null, bigdataTemplateVO); @@ -450,6 +454,7 @@ public class BigdataTemplateServiceImpl extends DefaultBaseService implements IB params.put("bigdataTemplatePublishStatus", bigdataTemplatePublishStatus ? "1" : "0"); params.put("bigdataTemplatePublishTime", DateUtil.getTime()); setUpdateInfo(params); + iTemplateRecordService.updateStatus(bigdataTemplateId, bigdataTemplatePublishStatus); bigdataTemplateDao.updateBigdataTemplatePublishStatus(params); return new SuccessResult(); } diff --git a/module-bigdata/src/main/java/cn/com/tenlion/bigdata/util/WeatherUtil.java b/module-bigdata/src/main/java/cn/com/tenlion/bigdata/util/WeatherUtil.java index 06f20a8..131b315 100644 --- a/module-bigdata/src/main/java/cn/com/tenlion/bigdata/util/WeatherUtil.java +++ b/module-bigdata/src/main/java/cn/com/tenlion/bigdata/util/WeatherUtil.java @@ -2,6 +2,7 @@ package cn.com.tenlion.bigdata.util; import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONObject; +import org.joda.time.DateTime; import java.text.SimpleDateFormat; import java.util.Date; @@ -48,8 +49,42 @@ public class WeatherUtil { return resultMap; } + public static Map getWeather(Date queryDate, String id) throws Exception { + String date = sdfTime.format(queryDate); + if (weather.get(id + "_" + date) != null) { + return weather.get(id + "_" + date); + } + Map params = new HashMap(); + 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 resultMap = new HashMap(); + 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 { - WeatherUtil.getWeather("WRR2Q2Z7CXWM"); + for(int i = 1 ; i < 10 ; i++) { + WeatherUtil.getWeather(DateTime.now().plusDays(i).toDate(), "榆林市"); + } + } } diff --git a/module-building-pictures/src/main/resources/templates/picturestemplate/save-picturestemplatearea.html b/module-building-pictures/src/main/resources/templates/picturestemplate/save-picturestemplatearea.html index 7fab3d4..1941b97 100644 --- a/module-building-pictures/src/main/resources/templates/picturestemplate/save-picturestemplatearea.html +++ b/module-building-pictures/src/main/resources/templates/picturestemplate/save-picturestemplatearea.html @@ -121,7 +121,7 @@ left : pageX > 0 ? pageX : (pos.left > 0 ? 0 : pos.left * -1 + 30) }).appendTo("#canvas"); /** - * 键盘控制位置移动 2021年6月22日16:33:34 由CBC新增 + * 键盘控制位置移动 2021年6月22日16:33:34 由CBC新增 tabindex="1" * */ $(document).on('keydown', '#' + dataId, function(e){ if(lock == true){ diff --git a/module-config-column/src/main/java/cn/com/tenlion/configcolumn/controller/app/api/configcolumnset/ConfigColumnSetAppController.java b/module-config-column/src/main/java/cn/com/tenlion/configcolumn/controller/app/api/configcolumnset/ConfigColumnSetAppController.java index 1c11dea..569a263 100644 --- a/module-config-column/src/main/java/cn/com/tenlion/configcolumn/controller/app/api/configcolumnset/ConfigColumnSetAppController.java +++ b/module-config-column/src/main/java/cn/com/tenlion/configcolumn/controller/app/api/configcolumnset/ConfigColumnSetAppController.java @@ -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.configcolumngroup.ConfigColumnGroupDTO; -import cn.com.tenlion.configcolumn.pojo.vos.configcolumnset.ConfigColumnSetDisplayVO; -import cn.com.tenlion.configcolumn.pojo.vos.configcolumnset.ConfigColumnSetNameVO; -import cn.com.tenlion.configcolumn.pojo.vos.configcolumnset.ConfigColumnSetOrderVO; +import cn.com.tenlion.configcolumn.pojo.vos.configcolumnset.*; import ink.wgink.annotation.CheckRequestBodyAnnotation; import ink.wgink.common.base.DefaultBaseController; 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.SuccessResultList; 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 io.swagger.annotations.*; import org.springframework.beans.factory.annotation.Autowired; @@ -39,6 +36,18 @@ public class ConfigColumnSetAppController extends DefaultBaseController { @Autowired 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 = "用户自定义栏目排序接口") @ApiImplicitParams({ @ApiImplicitParam(name = "token", value = "token", paramType = "header") diff --git a/module-config-column/src/main/java/cn/com/tenlion/configcolumn/service/configcolumn/impl/ConfigColumnServiceImpl.java b/module-config-column/src/main/java/cn/com/tenlion/configcolumn/service/configcolumn/impl/ConfigColumnServiceImpl.java index 958db08..b9bffdd 100644 --- a/module-config-column/src/main/java/cn/com/tenlion/configcolumn/service/configcolumn/impl/ConfigColumnServiceImpl.java +++ b/module-config-column/src/main/java/cn/com/tenlion/configcolumn/service/configcolumn/impl/ConfigColumnServiceImpl.java @@ -12,6 +12,8 @@ import ink.wgink.common.base.DefaultBaseService; import ink.wgink.exceptions.SaveException; import ink.wgink.exceptions.SearchException; 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.SuccessResultList; import ink.wgink.util.map.HashMapUtil; @@ -309,6 +311,21 @@ public class ConfigColumnServiceImpl extends DefaultBaseService implements IConf 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 public List listApp(String token, Map params) { params.put("configColumnStatus", "1"); @@ -318,7 +335,7 @@ public class ConfigColumnServiceImpl extends DefaultBaseService implements IConf */ List resultList = new ArrayList(); // 首页是加载名片创建者userId下配置的所有栏目, 个人中心加载的是token下配置的所有栏目 - String userIdOrToken = getAppTokenUser(token).getId(); + String userIdOrToken = getUserId(token); if(params.get("creator") != null) { userIdOrToken = params.get("creator").toString(); } @@ -326,6 +343,7 @@ public class ConfigColumnServiceImpl extends DefaultBaseService implements IConf ConfigColumnSetDTO setDisplayDTO = iConfigColumnSetService.getSetDisplayByUserId(userIdOrToken, dto.getConfigColumnId()); ConfigColumnSetDTO setNameDTO = iConfigColumnSetService.getSetNameByUserId(userIdOrToken, dto.getConfigColumnId()); ConfigColumnSetDTO setOrderDTO = iConfigColumnSetService.getSetOrderByUserId(userIdOrToken, dto.getConfigColumnId()); + ConfigColumnSetDTO setTopDTO = iConfigColumnSetService.getSetTopByUserId(userIdOrToken, dto.getConfigColumnId()); ConfigTableDTO tableDTO = iConfigTableOperationService.getTable(dto.getConfigTableId()); if (tableDTO != null) { dto.setConfigTableMode(tableDTO.getConfigTableMode()); @@ -339,6 +357,10 @@ public class ConfigColumnServiceImpl extends DefaultBaseService implements IConf dto.setConfigColumnSetName(setNameDTO.getConfigColumnName()); dto.setConfigColumnName(setNameDTO.getConfigColumnName()); } + // 封装自定义是否首页置顶 + if (setTopDTO != null) { + dto.setConfigColumnSetTop("1"); + } // 封装自定义是否显示 if (setDisplayDTO == null) { dto.setConfigColumnSet("1"); diff --git a/module-config-column/src/main/java/cn/com/tenlion/configcolumn/service/configcolumnset/IConfigColumnSetService.java b/module-config-column/src/main/java/cn/com/tenlion/configcolumn/service/configcolumnset/IConfigColumnSetService.java index e45a3ec..df29ec6 100644 --- a/module-config-column/src/main/java/cn/com/tenlion/configcolumn/service/configcolumnset/IConfigColumnSetService.java +++ b/module-config-column/src/main/java/cn/com/tenlion/configcolumn/service/configcolumnset/IConfigColumnSetService.java @@ -188,6 +188,13 @@ public interface IConfigColumnSetService { */ void saveIcon(String token, ConfigColumnSetIconVO configColumnSetIconVO); + /** + * 修改栏目的自定义首页显示 + * @param token + * @param configColumnSetTopVO + */ + void saveTop(String token, ConfigColumnSetTopVO configColumnSetTopVO); + /** * 查询栏目的自定义名称 * @param token @@ -195,6 +202,26 @@ public interface IConfigColumnSetService { */ ConfigColumnSetDTO getSetName(String token, String configColumnId); + /** + * 查询栏目的自定义隐藏 + * @param token + * @param configColumnId + */ + ConfigColumnSetDTO getSetTop(String token, String configColumnId); + + /** + * 查询栏目的自定义隐藏 + * @param userId + */ + List getSetTopByUserId(String userId); + + /** + * 查询栏目的自定义隐藏 + * @param token + * @param configColumnId + */ + ConfigColumnSetDTO getSetTopByUserId(String token, String configColumnId); + /** * 查询栏目的自定义隐藏 * @param token diff --git a/module-config-column/src/main/java/cn/com/tenlion/configcolumn/service/configcolumnset/impl/ConfigColumnSetServiceImpl.java b/module-config-column/src/main/java/cn/com/tenlion/configcolumn/service/configcolumnset/impl/ConfigColumnSetServiceImpl.java index 17fd0c4..0f6a07a 100644 --- a/module-config-column/src/main/java/cn/com/tenlion/configcolumn/service/configcolumnset/impl/ConfigColumnSetServiceImpl.java +++ b/module-config-column/src/main/java/cn/com/tenlion/configcolumn/service/configcolumnset/impl/ConfigColumnSetServiceImpl.java @@ -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 params = HashMapUtil.beanToMap(setDTO); + if (StringUtils.isBlank(token)) { + setUpdateInfo(params); + } else { + setAppUpdateInfo(token, params); + } + configColumnSetDao.update(params); + }else { + // 执行新增 + String configColumnSetId = UUIDUtil.getUUID(); + Map params = HashMapUtil.beanToMap(configColumnSetTopVO); + params.put("configColumnSetId", configColumnSetId); + if (StringUtils.isBlank(token)) { + setSaveInfo(params); + } else { + setAppSaveInfo(token, params); + } + configColumnSetDao.save(params); + } + } + @Override public void saveOrder(String token, ConfigColumnSetOrderVO configColumnSetOrderVO) { Map configColumnOrderParams = configColumnSetOrderVO.getConfigColumnOrder(); @@ -182,6 +210,15 @@ public class ConfigColumnSetServiceImpl extends DefaultBaseService implements IC return get(params); } + @Override + public List getSetTopByUserId(String userId) { + Map params = getHashMap(3); + params.put("userId", userId); + params.put("configColumnSetMode", "5"); + return list(params); + } + + @Override public ConfigColumnSetDTO getSetIcon(String token, String configColumnId) { Map params = getHashMap(3); @@ -200,6 +237,15 @@ public class ConfigColumnSetServiceImpl extends DefaultBaseService implements IC return get(params); } + @Override + public ConfigColumnSetDTO getSetTop(String token, String configColumnId) { + Map params = getHashMap(3); + params.put("userId", getUserId(token)); + params.put("configColumnId", configColumnId); + params.put("configColumnSetMode", "5"); + return get(params); + } + @Override public ConfigColumnSetDTO getSetDisplay(String token, String configColumnId) { Map params = getHashMap(3); @@ -302,6 +348,7 @@ public class ConfigColumnSetServiceImpl extends DefaultBaseService implements IC ConfigColumnSetDTO setDisplayDTO = getSetDisplay(token, dto.getConfigColumnId()); ConfigColumnSetDTO setNameDTO = getSetName(token, dto.getConfigColumnId()); ConfigColumnSetDTO setOrderDTO = getSetOrder(token, dto.getConfigColumnId()); + ConfigColumnSetDTO setTopDTO = getSetTop(token, dto.getConfigColumnId()); // 封装自定义排序 if (setOrderDTO != null) { dto.setConfigColumnSetOrder(setOrderDTO.getConfigColumnOrder()); @@ -318,6 +365,10 @@ public class ConfigColumnSetServiceImpl extends DefaultBaseService implements IC }else{ dto.setConfigColumnSet("0"); } + // 封装自定义是否首页置顶 + if (setTopDTO != null) { + dto.setConfigColumnSetTop("1"); + } configColumnList.add(dto); } } @@ -398,4 +449,13 @@ public class ConfigColumnSetServiceImpl extends DefaultBaseService implements IC return get(params); } + @Override + public ConfigColumnSetDTO getSetTopByUserId(String userId, String configColumnId) { + Map params = getHashMap(3); + params.put("userId", userId); + params.put("configColumnId", configColumnId); + params.put("configColumnSetMode", "5"); + return get(params); + } + } \ No newline at end of file diff --git a/module-config-column/src/main/resources/mybatis/mapper/configcolumnset/config-column-set-mapper.xml b/module-config-column/src/main/resources/mybatis/mapper/configcolumnset/config-column-set-mapper.xml index 84a343d..d9c3712 100644 --- a/module-config-column/src/main/resources/mybatis/mapper/configcolumnset/config-column-set-mapper.xml +++ b/module-config-column/src/main/resources/mybatis/mapper/configcolumnset/config-column-set-mapper.xml @@ -10,6 +10,7 @@ + @@ -51,6 +52,7 @@ config_column_set_mode, config_column_order, config_column_icon, + config_column_top, creator, gmt_create, modifier, @@ -63,6 +65,7 @@ #{configColumnSetMode}, #{configColumnOrder}, #{configColumnIcon}, + #{configColumnTop}, #{creator}, #{gmtCreate}, #{modifier}, @@ -116,6 +119,9 @@ config_column_set_mode = #{configColumnSetMode}, + + + config_column_top = #{configColumnTop}, gmt_modified = #{gmtModified}, modifier = #{modifier}, @@ -132,7 +138,8 @@ t1.config_column_set_mode, t1.config_column_set_id, t1.config_column_order, - t1.config_column_icon + t1.config_column_icon, + t1.config_column_top FROM m_config_column_set t1 WHERE @@ -216,7 +223,8 @@ t1.gmt_modified, t1.is_delete, t1.config_column_order, - t1.config_column_icon + t1.config_column_icon, + t1.config_column_top FROM m_config_column_set t1 WHERE @@ -227,6 +235,14 @@ t1.id LIKE CONCAT('%', #{keywords}, '%') ) + + AND + t1.config_column_set_mode = #{configColumnSetMode} + + + AND + t1.creator = #{userId} + AND LEFT(t1.gmt_create, 10) = ]]> #{startTime} diff --git a/module-freemarker/src/main/java/cn/com/tenlion/freemarker/controller/apis/templaterecord/TemplateRecordController.java b/module-freemarker/src/main/java/cn/com/tenlion/freemarker/controller/apis/templaterecord/TemplateRecordController.java index 942e076..0506dd4 100644 --- a/module-freemarker/src/main/java/cn/com/tenlion/freemarker/controller/apis/templaterecord/TemplateRecordController.java +++ b/module-freemarker/src/main/java/cn/com/tenlion/freemarker/controller/apis/templaterecord/TemplateRecordController.java @@ -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.vos.templaterecord.TemplateRecordVO; import cn.com.tenlion.freemarker.service.templaterecord.ITemplateRecordService; +import cn.com.tenlion.freemarker.util.StopPage; import ink.wgink.annotation.CheckRequestBodyAnnotation; import ink.wgink.common.base.DefaultBaseController; import ink.wgink.common.component.SecurityComponent; @@ -51,6 +52,14 @@ public class TemplateRecordController extends DefaultBaseController { @Autowired 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 = "模板构建文件获取") @ApiImplicitParams({ @ApiImplicitParam(name = "templateFileType", value = "文件类型", paramType = "path"), @@ -94,6 +103,9 @@ public class TemplateRecordController extends DefaultBaseController { @GetMapping(value = "get/html/{templateRecordId}", produces = "text/html") public String getHtmlById(@PathVariable("templateRecordId") String templateRecordId) throws Exception { TemplateRecordDTO dto = templateRecordService.getTemplateRecordById(templateRecordId); + if(!"1".equals(dto.getTemplateRecordStatus())) { + return StopPage.stopPage; + } File file = new File(dto.getTemplateRecordPath()); StringBuilder logContent = new StringBuilder(); try { @@ -131,8 +143,6 @@ public class TemplateRecordController extends DefaultBaseController { return dto; } - - @ApiOperation(value = "新增模板构建记录", notes = "新增模板构建记录接口") @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) @PostMapping("savetemplaterecord") diff --git a/module-freemarker/src/main/java/cn/com/tenlion/freemarker/controller/app/apis/templaterecord/TemplateRecordAppController.java b/module-freemarker/src/main/java/cn/com/tenlion/freemarker/controller/app/apis/templaterecord/TemplateRecordAppController.java index a81f417..ec6a2f9 100644 --- a/module-freemarker/src/main/java/cn/com/tenlion/freemarker/controller/app/apis/templaterecord/TemplateRecordAppController.java +++ b/module-freemarker/src/main/java/cn/com/tenlion/freemarker/controller/app/apis/templaterecord/TemplateRecordAppController.java @@ -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.service.templaterecord.ITemplateRecordService; +import cn.com.tenlion.freemarker.util.StopPage; import ink.wgink.common.base.DefaultBaseController; import ink.wgink.common.component.SecurityComponent; import ink.wgink.exceptions.SearchException; @@ -81,6 +82,9 @@ public class TemplateRecordAppController extends DefaultBaseController { @GetMapping(value = "get/html/{templateRecordId}", produces = "text/html") public String getHtmlById(@RequestHeader("token") String token, @PathVariable("templateRecordId") String templateRecordId) throws Exception { TemplateRecordDTO dto = templateRecordService.getTemplateRecordById(templateRecordId); + if(!"1".equals(dto.getTemplateRecordStatus())) { + return StopPage.stopPage; + } File file = new File(dto.getTemplateRecordPath()); StringBuilder logContent = new StringBuilder(); try { @@ -138,6 +142,9 @@ public class TemplateRecordAppController extends DefaultBaseController { @GetMapping(value = "get" + ISystemConstant.RELEASE_SUFFIX + "/html/{templateRecordId}", produces = "text/html") public String getHtmlByIdRelease(@PathVariable("templateRecordId") String templateRecordId) throws Exception { TemplateRecordDTO dto = templateRecordService.getTemplateRecordById(templateRecordId); + if(!"1".equals(dto.getTemplateRecordStatus())) { + return StopPage.stopPage; + } File file = new File(dto.getTemplateRecordPath()); StringBuilder logContent = new StringBuilder(); try { diff --git a/module-freemarker/src/main/java/cn/com/tenlion/freemarker/dao/templaterecord/ITemplateRecordDao.java b/module-freemarker/src/main/java/cn/com/tenlion/freemarker/dao/templaterecord/ITemplateRecordDao.java index 864e396..8325b59 100644 --- a/module-freemarker/src/main/java/cn/com/tenlion/freemarker/dao/templaterecord/ITemplateRecordDao.java +++ b/module-freemarker/src/main/java/cn/com/tenlion/freemarker/dao/templaterecord/ITemplateRecordDao.java @@ -63,4 +63,5 @@ public interface ITemplateRecordDao { List getTemplateRecordByTemplateId(Map params) throws UpdateException; + void updateStatus(Map params) throws UpdateException; } diff --git a/module-freemarker/src/main/java/cn/com/tenlion/freemarker/service/templateconfig/impl/TemplateConfigServiceImpl.java b/module-freemarker/src/main/java/cn/com/tenlion/freemarker/service/templateconfig/impl/TemplateConfigServiceImpl.java index 098d414..cecf90f 100644 --- a/module-freemarker/src/main/java/cn/com/tenlion/freemarker/service/templateconfig/impl/TemplateConfigServiceImpl.java +++ b/module-freemarker/src/main/java/cn/com/tenlion/freemarker/service/templateconfig/impl/TemplateConfigServiceImpl.java @@ -10,7 +10,6 @@ import cn.com.tenlion.freemarker.util.TemplateBuilderUtil; import cn.com.tenlion.freemarker.util.TemplateCreateData; import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageInfo; -import com.google.common.util.concurrent.AbstractService; import ink.wgink.common.base.DefaultBaseService; import ink.wgink.exceptions.RemoveException; import ink.wgink.exceptions.SaveException; diff --git a/module-freemarker/src/main/java/cn/com/tenlion/freemarker/service/templaterecord/ITemplateRecordService.java b/module-freemarker/src/main/java/cn/com/tenlion/freemarker/service/templaterecord/ITemplateRecordService.java index 2df9f7c..adf5406 100644 --- a/module-freemarker/src/main/java/cn/com/tenlion/freemarker/service/templaterecord/ITemplateRecordService.java +++ b/module-freemarker/src/main/java/cn/com/tenlion/freemarker/service/templaterecord/ITemplateRecordService.java @@ -4,6 +4,7 @@ import cn.com.tenlion.freemarker.pojo.dtos.templaterecord.TemplateRecordDTO; import cn.com.tenlion.freemarker.pojo.vos.templaterecord.TemplateRecordVO; import ink.wgink.exceptions.RemoveException; import ink.wgink.exceptions.SearchException; +import ink.wgink.exceptions.UpdateException; import ink.wgink.pojo.ListPage; import ink.wgink.pojo.result.SuccessResult; import ink.wgink.pojo.result.SuccessResultList; @@ -108,4 +109,5 @@ public interface ITemplateRecordService { List getTemplateRecordByTemplateId(String templateId) throws SearchException; + SuccessResult updateStatus(String templateRecordId, Boolean templateRecordStatus) throws UpdateException; } diff --git a/module-freemarker/src/main/java/cn/com/tenlion/freemarker/service/templaterecord/impl/TemplateRecordServiceImpl.java b/module-freemarker/src/main/java/cn/com/tenlion/freemarker/service/templaterecord/impl/TemplateRecordServiceImpl.java index 85bce95..8fff97f 100644 --- a/module-freemarker/src/main/java/cn/com/tenlion/freemarker/service/templaterecord/impl/TemplateRecordServiceImpl.java +++ b/module-freemarker/src/main/java/cn/com/tenlion/freemarker/service/templaterecord/impl/TemplateRecordServiceImpl.java @@ -10,6 +10,7 @@ import com.github.pagehelper.PageInfo; import ink.wgink.common.base.DefaultBaseService; import ink.wgink.exceptions.RemoveException; import ink.wgink.exceptions.SearchException; +import ink.wgink.exceptions.UpdateException; import ink.wgink.pojo.ListPage; import ink.wgink.pojo.result.SuccessResult; import ink.wgink.pojo.result.SuccessResultList; @@ -17,6 +18,8 @@ import ink.wgink.util.map.HashMapUtil; import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; + +import java.io.File; import java.util.Arrays; import java.util.List; import java.util.Map; @@ -94,13 +97,24 @@ public class TemplateRecordServiceImpl extends DefaultBaseService implements ITe */ private void removeTemplateRecordInfo(String token, String ids) { Map params = getHashMap(3); - params.put("templateRecordIds", Arrays.asList(ids.split("_"))); + List idsArray = Arrays.asList(ids.split("_")); + params.put("templateRecordIds", idsArray); if (StringUtils.isBlank(token)) { setUpdateInfo(params); } else { setAppUpdateInfo(token, params); } + List templateRecordDTOList = listTemplateRecord(params); templateRecordDao.removeTemplateRecord(params); + /** + * 删除实际的文件 + */ + for(TemplateRecordDTO dto : templateRecordDTOList) { + File file = new File(dto.getTemplateRecordPath()); + if(file.exists()) { + file.delete(); + } + } } @Override @@ -161,4 +175,14 @@ public class TemplateRecordServiceImpl extends DefaultBaseService implements ITe return templateRecordDao.getTemplateRecordByTemplateId(params); } + @Override + public SuccessResult updateStatus(String templateRecordId, Boolean templateRecordStatus) throws UpdateException { + Map params = HashMapUtil.beanToMap(3); + params.put("templateRecordId", templateRecordId); + params.put("templateRecordStatus", templateRecordStatus ? "1" : "0"); + setUpdateInfo(params); + templateRecordDao.updateStatus(params); + return new SuccessResult(); + } + } diff --git a/module-freemarker/src/main/java/cn/com/tenlion/freemarker/util/StopPage.java b/module-freemarker/src/main/java/cn/com/tenlion/freemarker/util/StopPage.java new file mode 100644 index 0000000..a4cb6c9 --- /dev/null +++ b/module-freemarker/src/main/java/cn/com/tenlion/freemarker/util/StopPage.java @@ -0,0 +1,299 @@ +package cn.com.tenlion.freemarker.util; + +public class StopPage { + + final public static String stopPage = "\n" + + "\n" + + "\t\n" + + "\t\t\n" + + "\t\t停止访问\n" + + "\t\t\n" + + "\t\t\n" + + "\t\t\n" + + "\t\n" + + "\t\n" + + "\t\t
\n" + + "\t\t\t

\n" + + "\t\t
\n" + + "\t\t
\n" + + "\t\t\t
\n" + + "\t\t\t\t
\n" + + "\t\t\t\t\t
\n" + + "\t\t\t\t\t\t
\n" + + "\t\t\t\t\t\t\t
\n" + + "\t\t\t\t\t\t\t\t
\n" + + "\t\t\t\t\t\t\t\t
\n" + + "\t\t\t\t\t\t\t
\n" + + "\t\t\t\t\t\t\t
\n" + + "\t\t\t\t\t\t\t\t
\n" + + "\t\t\t\t\t\t\t\t
\n" + + "\t\t\t\t\t\t\t
\n" + + "\t\t\t\t\t\t
\n" + + "\t\t\t\t\t
\n" + + "\t\t\t\t
\n" + + "\t\t\t\t
\n" + + "\t\t\t\t
\n" + + "\t\t\t\t\t\n" + + "\t\t\t\t
\n" + + "\t\t\t
\n" + + "\t\t\t

停止访问

\n" + + "\t\t
\n" + + "\t\t\n" + + "\n" + + "\n"; +} diff --git a/module-freemarker/src/main/java/cn/com/tenlion/freemarker/util/TemplateBuilderUtil.java b/module-freemarker/src/main/java/cn/com/tenlion/freemarker/util/TemplateBuilderUtil.java index 6016b32..66ed946 100644 --- a/module-freemarker/src/main/java/cn/com/tenlion/freemarker/util/TemplateBuilderUtil.java +++ b/module-freemarker/src/main/java/cn/com/tenlion/freemarker/util/TemplateBuilderUtil.java @@ -97,6 +97,14 @@ public class TemplateBuilderUtil { templateMap.put(templateCode, templateConfigDTO); } + /** + * 静态模板文件删除 + * @throws Exception + */ + public void removeFile(String businessId) { + iTemplateRecordStaticService.removeTemplateRecord(businessId); + } + /** * 静态模板文件生成 * @throws Exception @@ -180,6 +188,7 @@ public class TemplateBuilderUtil { * 做生成模板记录 */ TemplateRecordVO recordVo = new TemplateRecordVO(); + recordVo.setTemplateRecordStatus(templateCreateData.getPublishStatus() ? "1" : "0"); recordVo.setBusinessContent(templateCreateData.getBusinessContent()); recordVo.setTemplateRecordId(templateCreateData.getBusinessId()); recordVo.setTemplateId(templateConfigDTO.getTemplateConfigId()); @@ -195,7 +204,7 @@ public class TemplateBuilderUtil { recordUrlNginx = recordUrlNginx + outFilePath.replaceAll(Matcher.quoteReplacement(File.separator), "/") + outFileName; } recordVo.setTemplateRecordUrlNginx(recordUrlNginx); - iTemplateRecordStaticService.saveTemplateRecord(recordVo); + iTemplateRecordStaticService.saveTemplateRecordByToken(templateCreateData.getToken(), recordVo); return recordVo; } diff --git a/module-freemarker/src/main/java/cn/com/tenlion/freemarker/util/TemplateCreateData.java b/module-freemarker/src/main/java/cn/com/tenlion/freemarker/util/TemplateCreateData.java index daf84ca..05ab759 100644 --- a/module-freemarker/src/main/java/cn/com/tenlion/freemarker/util/TemplateCreateData.java +++ b/module-freemarker/src/main/java/cn/com/tenlion/freemarker/util/TemplateCreateData.java @@ -8,6 +8,16 @@ import java.util.Map; */ public class TemplateCreateData { + /** + * 移动端用户的token, 后台调用不需要传入 + */ + private String token = ""; + + /** + * 是否发布 + */ + private Boolean publishStatus = false; + /** * 不能为空 模板编码 */ @@ -43,6 +53,22 @@ public class TemplateCreateData { */ 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() { return templateCode == null ? "" : templateCode; } diff --git a/module-freemarker/src/main/resources/mybatis/mapper/templateconfig/templateconfig-mapper.xml b/module-freemarker/src/main/resources/mybatis/mapper/templateconfig/templateconfig-mapper.xml index c61ba17..7c12ab3 100644 --- a/module-freemarker/src/main/resources/mybatis/mapper/templateconfig/templateconfig-mapper.xml +++ b/module-freemarker/src/main/resources/mybatis/mapper/templateconfig/templateconfig-mapper.xml @@ -214,7 +214,7 @@
ORDER BY - t1.template_order + t1.template_order, t1.template_code \ No newline at end of file diff --git a/module-freemarker/src/main/resources/mybatis/mapper/templaterecord/templaterecord-mapper.xml b/module-freemarker/src/main/resources/mybatis/mapper/templaterecord/templaterecord-mapper.xml index 176f070..dda1208 100644 --- a/module-freemarker/src/main/resources/mybatis/mapper/templaterecord/templaterecord-mapper.xml +++ b/module-freemarker/src/main/resources/mybatis/mapper/templaterecord/templaterecord-mapper.xml @@ -10,10 +10,20 @@ + + + UPDATE + m_template_record + SET + template_record_status = #{templateRecordStatus} + WHERE + template_record_id = #{templateRecordId} + + '; + } + }, {field:'templateRecordUrlNginx', width:120, title: '内容预览', fixed: 'right', align:'center', templet: function(row) { return ''; @@ -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) { table.reload('dataTable', { diff --git a/pojo-config-column/src/main/java/cn/com/tenlion/configcolumn/pojo/dtos/configcolumn/ConfigColumnDTO.java b/pojo-config-column/src/main/java/cn/com/tenlion/configcolumn/pojo/dtos/configcolumn/ConfigColumnDTO.java index 7a997a1..da8fbdd 100644 --- a/pojo-config-column/src/main/java/cn/com/tenlion/configcolumn/pojo/dtos/configcolumn/ConfigColumnDTO.java +++ b/pojo-config-column/src/main/java/cn/com/tenlion/configcolumn/pojo/dtos/configcolumn/ConfigColumnDTO.java @@ -71,10 +71,12 @@ public class ConfigColumnDTO implements Serializable { private Integer isDelete; @ApiModelProperty(name = "configColumnSet", value = "个人自定义的隐藏状态,1:显示,0:隐藏") private String configColumnSet = "0"; - @ApiModelProperty(name = "configColumnName", value = "个人自定义的栏目名称,为空则未设置") + @ApiModelProperty(name = "configColumnSetName", value = "个人自定义的栏目名称,为空则未设置") private String configColumnSetName; @ApiModelProperty(name = "configColumnSetOrder", value = "个人自定义的栏目排序,为空则未设置") private Integer configColumnSetOrder; + @ApiModelProperty(name = "configColumnSetTop", value = "企业自定义的首页置顶,为空则未设置") + private String configColumnSetTop; @ApiModelProperty(name = "configColumnComment", value = "评论开关") private String configColumnComment; @ApiModelProperty(name = "configColumnDispatch", value = "转发开关") @@ -88,6 +90,14 @@ public class ConfigColumnDTO implements Serializable { @ApiModelProperty(name = "configColumnRole", value = "适用角色") private String configColumnRole; + public String getConfigColumnSetTop() { + return configColumnSetTop == null ? "" : configColumnSetTop; + } + + public void setConfigColumnSetTop(String configColumnSetTop) { + this.configColumnSetTop = configColumnSetTop; + } + public String getConfigColumnRole() { return configColumnRole == null ? "" : configColumnRole; } diff --git a/pojo-config-column/src/main/java/cn/com/tenlion/configcolumn/pojo/dtos/configcolumnset/ConfigColumnSetDTO.java b/pojo-config-column/src/main/java/cn/com/tenlion/configcolumn/pojo/dtos/configcolumnset/ConfigColumnSetDTO.java index 514abc8..fe5b9cb 100644 --- a/pojo-config-column/src/main/java/cn/com/tenlion/configcolumn/pojo/dtos/configcolumnset/ConfigColumnSetDTO.java +++ b/pojo-config-column/src/main/java/cn/com/tenlion/configcolumn/pojo/dtos/configcolumnset/ConfigColumnSetDTO.java @@ -26,7 +26,9 @@ public class ConfigColumnSetDTO implements Serializable { private Integer configColumnOrder; @ApiModelProperty(name = "configColumnIcon", value = "图标") 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; @ApiModelProperty(name = "creator", value = "") private String creator; @@ -39,6 +41,14 @@ public class ConfigColumnSetDTO implements Serializable { @ApiModelProperty(name = "isDelete", value = "") private Integer isDelete; + public String getConfigColumnTop() { + return configColumnTop == null ? "" : configColumnTop; + } + + public void setConfigColumnTop(String configColumnTop) { + this.configColumnTop = configColumnTop; + } + public Integer getConfigColumnOrder() { return configColumnOrder; } diff --git a/pojo-config-column/src/main/java/cn/com/tenlion/configcolumn/pojo/vos/configcolumnset/ConfigColumnSetDisplayVO.java b/pojo-config-column/src/main/java/cn/com/tenlion/configcolumn/pojo/vos/configcolumnset/ConfigColumnSetDisplayVO.java index ed8fd22..956402e 100644 --- a/pojo-config-column/src/main/java/cn/com/tenlion/configcolumn/pojo/vos/configcolumnset/ConfigColumnSetDisplayVO.java +++ b/pojo-config-column/src/main/java/cn/com/tenlion/configcolumn/pojo/vos/configcolumnset/ConfigColumnSetDisplayVO.java @@ -18,7 +18,7 @@ public class ConfigColumnSetDisplayVO { @ApiModelProperty(name = "configColumnId", value = "栏目ID") @CheckEmptyAnnotation(name = "栏目ID") private String configColumnId; - @ApiModelProperty(name = "configColumnSetMode", value = "设置模式1:隐藏,2:更名,3:排序,4:图标(前端无需传入)") + @ApiModelProperty(name = "configColumnSetMode", value = "设置模式1:隐藏,2:更名,3:排序,4:图标,5:首页置顶(前端无需传入)") private String configColumnSetMode = "1"; public String getConfigColumnId() { diff --git a/pojo-config-column/src/main/java/cn/com/tenlion/configcolumn/pojo/vos/configcolumnset/ConfigColumnSetIconVO.java b/pojo-config-column/src/main/java/cn/com/tenlion/configcolumn/pojo/vos/configcolumnset/ConfigColumnSetIconVO.java index b0ea834..bd8a438 100644 --- a/pojo-config-column/src/main/java/cn/com/tenlion/configcolumn/pojo/vos/configcolumnset/ConfigColumnSetIconVO.java +++ b/pojo-config-column/src/main/java/cn/com/tenlion/configcolumn/pojo/vos/configcolumnset/ConfigColumnSetIconVO.java @@ -18,7 +18,7 @@ public class ConfigColumnSetIconVO { @ApiModelProperty(name = "configColumnId", value = "栏目ID") @CheckEmptyAnnotation(name = "栏目ID") private String configColumnId; - @ApiModelProperty(name = "configColumnSetMode", value = "设置模式1:隐藏,2:更名,3:排序,4:图标(前端无需传入)") + @ApiModelProperty(name = "configColumnSetMode", value = "设置模式1:隐藏,2:更名,3:排序,4:图标,5:首页置顶(前端无需传入)") private String configColumnSetMode = "3"; @ApiModelProperty(name = "configColumnIcon", value = "更改的图标") @CheckEmptyAnnotation(name = "更改的图标") diff --git a/pojo-config-column/src/main/java/cn/com/tenlion/configcolumn/pojo/vos/configcolumnset/ConfigColumnSetNameVO.java b/pojo-config-column/src/main/java/cn/com/tenlion/configcolumn/pojo/vos/configcolumnset/ConfigColumnSetNameVO.java index b9f10b9..948483f 100644 --- a/pojo-config-column/src/main/java/cn/com/tenlion/configcolumn/pojo/vos/configcolumnset/ConfigColumnSetNameVO.java +++ b/pojo-config-column/src/main/java/cn/com/tenlion/configcolumn/pojo/vos/configcolumnset/ConfigColumnSetNameVO.java @@ -21,7 +21,7 @@ public class ConfigColumnSetNameVO { @ApiModelProperty(name = "configColumnName", value = "更名") @CheckEmptyAnnotation(name = "更改的名字") private String configColumnName; - @ApiModelProperty(name = "configColumnSetMode", value = "设置模式1:隐藏,2:更名,3:排序,4:图标(前端无需传入)") + @ApiModelProperty(name = "configColumnSetMode", value = "设置模式1:隐藏,2:更名,3:排序,4:图标,5:首页置顶(前端无需传入)") private String configColumnSetMode = "2"; public String getConfigColumnId() { diff --git a/pojo-config-column/src/main/java/cn/com/tenlion/configcolumn/pojo/vos/configcolumnset/ConfigColumnSetOrderVO.java b/pojo-config-column/src/main/java/cn/com/tenlion/configcolumn/pojo/vos/configcolumnset/ConfigColumnSetOrderVO.java index 9a9b5ab..86eb95c 100644 --- a/pojo-config-column/src/main/java/cn/com/tenlion/configcolumn/pojo/vos/configcolumnset/ConfigColumnSetOrderVO.java +++ b/pojo-config-column/src/main/java/cn/com/tenlion/configcolumn/pojo/vos/configcolumnset/ConfigColumnSetOrderVO.java @@ -22,7 +22,7 @@ public class ConfigColumnSetOrderVO { @ApiModelProperty(name = "configColumnId", value = "栏目ID") private String configColumnId; - @ApiModelProperty(name = "configColumnSetMode", value = "设置模式1:隐藏,2:更名,3:排序,4:图标(前端无需传入)") + @ApiModelProperty(name = "configColumnSetMode", value = "设置模式1:隐藏,2:更名,3:排序,4:图标,5:首页置顶(前端无需传入)") private String configColumnSetMode = "3"; @ApiModelProperty(name = "configColumnOrder", value = "更改的排序") private Map configColumnOrder = new HashMap(); diff --git a/pojo-freemarker/src/main/java/cn/com/tenlion/freemarker/pojo/dtos/templaterecord/TemplateRecordDTO.java b/pojo-freemarker/src/main/java/cn/com/tenlion/freemarker/pojo/dtos/templaterecord/TemplateRecordDTO.java index 57574ba..c6729da 100644 --- a/pojo-freemarker/src/main/java/cn/com/tenlion/freemarker/pojo/dtos/templaterecord/TemplateRecordDTO.java +++ b/pojo-freemarker/src/main/java/cn/com/tenlion/freemarker/pojo/dtos/templaterecord/TemplateRecordDTO.java @@ -36,6 +36,16 @@ public class TemplateRecordDTO { private String templateContentText; @ApiModelProperty(name = "gmtCreate", value = "创建时间") 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() { return gmtCreate == null ? "" : gmtCreate; diff --git a/pojo-freemarker/src/main/java/cn/com/tenlion/freemarker/pojo/vos/templaterecord/TemplateRecordVO.java b/pojo-freemarker/src/main/java/cn/com/tenlion/freemarker/pojo/vos/templaterecord/TemplateRecordVO.java index 095225d..b9bf4a2 100644 --- a/pojo-freemarker/src/main/java/cn/com/tenlion/freemarker/pojo/vos/templaterecord/TemplateRecordVO.java +++ b/pojo-freemarker/src/main/java/cn/com/tenlion/freemarker/pojo/vos/templaterecord/TemplateRecordVO.java @@ -33,7 +33,16 @@ public class TemplateRecordVO { private String templateRecordUrl; @ApiModelProperty(name = "templateRecordUrlNginx", value = "模板访问全路径") 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() { return templateRecordUrlNginx == null ? "" : templateRecordUrlNginx; } diff --git a/pom.xml b/pom.xml index cac86dc..79fc8b4 100644 --- a/pom.xml +++ b/pom.xml @@ -48,9 +48,11 @@ module-config-content interface-config-content pojo-config-content + interface-project-config pojo-project-config module-project-config + interface-news module-news pojo-news