From beb6e85c9b054e8edced241c3367814a0a19d70c Mon Sep 17 00:00:00 2001 From: xiaoyong931011 <15274802129@163.com> Date: Wed, 07 Apr 2021 11:42:38 +0800 Subject: [PATCH] Merge branch 'score_shop' of http://120.27.238.55:7000/r/beauty-erp into score_shop --- zq-erp/src/main/java/com/matrix/system/shopXcx/quartz/ShopCouponQuartz.java | 10 -- zq-erp/src/main/java/com/matrix/config/TaskScheduleConfig.java | 10 ++ zq-erp/src/main/java/com/matrix/system/shopXcx/quartz/ShopAutomaticReceiveQuartz.java | 7 - zq-erp/src/main/java/com/matrix/system/job/ServiceOvertimeNoticeJob.java | 9 -- zq-erp/src/main/java/com/matrix/system/app/action/ApiSettingAction.java | 47 +++++++++++++++ zq-erp/src/main/java/com/matrix/config/MvcCoreConfig.java | 2 zq-erp/src/main/resources/config/application.properties | 2 zq-erp/src/main/java/com/matrix/system/job/InvalidTimeJob.java | 2 zq-erp/src/main/java/com/matrix/system/app/action/ApiCommonAction.java | 14 ---- zq-erp/src/main/java/com/matrix/ZqErpApplication.java | 1 zq-erp/src/main/java/com/matrix/system/shopXcx/quartz/ShopActivityPayTimeOutQuartz.java | 7 - zq-erp/src/main/resources/templates/views/admin/fenxiao/fenxiao-user.html | 46 +++++++++++++++ zq-erp/src/main/java/com/matrix/system/shopXcx/quartz/ShopActivityGroupJoinTimeOutQuartz.java | 6 - zq-erp/src/main/java/com/matrix/system/shopXcx/quartz/ShopActivityTimeOutQuartz.java | 7 - 14 files changed, 115 insertions(+), 55 deletions(-) diff --git a/zq-erp/src/main/java/com/matrix/ZqErpApplication.java b/zq-erp/src/main/java/com/matrix/ZqErpApplication.java index ff662ff..4502fc0 100644 --- a/zq-erp/src/main/java/com/matrix/ZqErpApplication.java +++ b/zq-erp/src/main/java/com/matrix/ZqErpApplication.java @@ -3,7 +3,6 @@ import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.context.annotation.ComponentScan; -import org.springframework.scheduling.annotation.EnableAsync; /** * spring boot入口 diff --git a/zq-erp/src/main/java/com/matrix/config/MvcCoreConfig.java b/zq-erp/src/main/java/com/matrix/config/MvcCoreConfig.java index 8520ba6..3c91072 100644 --- a/zq-erp/src/main/java/com/matrix/config/MvcCoreConfig.java +++ b/zq-erp/src/main/java/com/matrix/config/MvcCoreConfig.java @@ -20,7 +20,7 @@ * @description 容器添加组件 * @date 2019-06-14 15:50 */ -@Configuration +@Configuration() @PropertySource("classpath:config/system.properties") public class MvcCoreConfig implements WebMvcConfigurer { diff --git a/zq-erp/src/main/java/com/matrix/config/TaskScheduleConfig.java b/zq-erp/src/main/java/com/matrix/config/TaskScheduleConfig.java index 100f3f6..1d09724 100644 --- a/zq-erp/src/main/java/com/matrix/config/TaskScheduleConfig.java +++ b/zq-erp/src/main/java/com/matrix/config/TaskScheduleConfig.java @@ -1,10 +1,16 @@ package com.matrix.config; -import org.springframework.context.annotation.Configuration; +import com.matrix.core.tools.LogUtil; +import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; import org.springframework.scheduling.annotation.EnableScheduling; +import org.springframework.stereotype.Component; -@Configuration +@Component @EnableScheduling +@ConditionalOnProperty(name = "scheduling.enabled", havingValue= "true") public class TaskScheduleConfig { + public TaskScheduleConfig(){ + LogUtil.debug("**********定时任务启动**********"); + } } diff --git a/zq-erp/src/main/java/com/matrix/system/app/action/ApiCommonAction.java b/zq-erp/src/main/java/com/matrix/system/app/action/ApiCommonAction.java index 6a882aa..2b580f6 100644 --- a/zq-erp/src/main/java/com/matrix/system/app/action/ApiCommonAction.java +++ b/zq-erp/src/main/java/com/matrix/system/app/action/ApiCommonAction.java @@ -2,7 +2,6 @@ import com.alibaba.fastjson.JSONObject; import com.matrix.component.redis.RedisClient; -import com.matrix.core.constance.MatrixConstance; import com.matrix.core.pojo.AjaxResult; import com.matrix.core.tools.*; import com.matrix.system.app.authority.AppAuthorityManager; @@ -15,7 +14,6 @@ import com.matrix.system.common.authority.strategy.AccountPasswordLogin; import com.matrix.system.common.authority.strategy.LoginStrategy; import com.matrix.system.common.bean.SysUsers; -import com.matrix.system.common.constance.AppConstance; import com.matrix.system.common.dao.BusParameterSettingsDao; import com.matrix.system.common.service.SysUsersService; import com.matrix.system.common.tools.PasswordUtil; @@ -228,17 +226,7 @@ - @ApiOperation(value = "获取app配置", notes = "获取app配置") - @ApiResponses({ - @ApiResponse(code = 200, message = "ok", response = AppVersion.class) - }) - @GetMapping(value = "/findAppSettings") - public AjaxResult findAppSettings() { - SysUsers user = WebUtil.getSessionAttribute(MatrixConstance.LOGIN_KEY); - AjaxResult result = AjaxResult.buildSuccessInstance("查询成功"); - result.putInMap(AppConstance.APP_BANNER_GL, busParameterSettingsDao.selectCompanyParamByCode(AppConstance.APP_BANNER_GL,user.getCompanyId())); - return result; - } + diff --git a/zq-erp/src/main/java/com/matrix/system/app/action/ApiSettingAction.java b/zq-erp/src/main/java/com/matrix/system/app/action/ApiSettingAction.java new file mode 100644 index 0000000..312228d --- /dev/null +++ b/zq-erp/src/main/java/com/matrix/system/app/action/ApiSettingAction.java @@ -0,0 +1,47 @@ +package com.matrix.system.app.action; + +import com.matrix.core.constance.MatrixConstance; +import com.matrix.core.pojo.AjaxResult; +import com.matrix.core.tools.WebUtil; +import com.matrix.system.common.bean.SysUsers; +import com.matrix.system.common.constance.AppConstance; +import com.matrix.system.common.dao.BusParameterSettingsDao; +import com.matrix.system.hive.bean.AppVersion; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import io.swagger.annotations.ApiResponse; +import io.swagger.annotations.ApiResponses; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.CrossOrigin; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +/** + * @author jyy + * @date 2020-12-21 + **/ +@CrossOrigin(origins = "*") +@Api(value = "ApiSettingAction", tags = "配置查询类") +@RestController +@RequestMapping(value = "/api/setting") +public class ApiSettingAction { + + + @Autowired + private BusParameterSettingsDao busParameterSettingsDao; + + + @ApiOperation(value = "获取app配置", notes = "获取app配置") + @ApiResponses({ + @ApiResponse(code = 200, message = "ok", response = AppVersion.class) + }) + @GetMapping(value = "/findAppSettings") + public AjaxResult findAppSettings() { + SysUsers user = WebUtil.getSessionAttribute(MatrixConstance.LOGIN_KEY); + AjaxResult result = AjaxResult.buildSuccessInstance("查询成功"); + result.putInMap(AppConstance.APP_BANNER_GL, busParameterSettingsDao.selectCompanyParamByCode(AppConstance.APP_BANNER_GL,user.getCompanyId())); + return result; + } + +} diff --git a/zq-erp/src/main/java/com/matrix/system/job/InvalidTimeJob.java b/zq-erp/src/main/java/com/matrix/system/job/InvalidTimeJob.java index 2cd048a..ae6680e 100644 --- a/zq-erp/src/main/java/com/matrix/system/job/InvalidTimeJob.java +++ b/zq-erp/src/main/java/com/matrix/system/job/InvalidTimeJob.java @@ -1,5 +1,6 @@ package com.matrix.system.job; +import com.matrix.core.tools.LogUtil; import com.matrix.system.constance.Dictionary; import com.matrix.system.hive.bean.MoneyCardUse; import com.matrix.system.hive.bean.SysProjUse; @@ -27,6 +28,7 @@ @Scheduled(cron = "0 0 0 * * ?") public void setProjUseToInvalid() { + LogUtil.info("#项目,套餐失效任务处理#"); List<SysProjUse> sysProjUses = sysProjUseDao.selectHasValidProjUse(); List<MoneyCardUse> moneyCardUses = moneyCardUseDao.selectHasValidMoneyCardUse(); diff --git a/zq-erp/src/main/java/com/matrix/system/job/ServiceOvertimeNoticeJob.java b/zq-erp/src/main/java/com/matrix/system/job/ServiceOvertimeNoticeJob.java index 87889ad..72e4f56 100644 --- a/zq-erp/src/main/java/com/matrix/system/job/ServiceOvertimeNoticeJob.java +++ b/zq-erp/src/main/java/com/matrix/system/job/ServiceOvertimeNoticeJob.java @@ -2,14 +2,8 @@ import com.matrix.component.rabbitmq.RabiitMqTemplate; import com.matrix.core.tools.LogUtil; -import com.matrix.system.common.bean.SysUsers; -import com.matrix.system.constance.Dictionary; -import com.matrix.system.hive.bean.MoneyCardUse; import com.matrix.system.hive.bean.SysProjServices; -import com.matrix.system.hive.bean.SysProjUse; -import com.matrix.system.hive.dao.MoneyCardUseDao; import com.matrix.system.hive.dao.SysProjServicesDao; -import com.matrix.system.hive.dao.SysProjUseDao; import com.matrix.system.hive.plugin.util.CollectionUtils; import com.matrix.system.shopXcx.mqTask.MQTaskRouting; import com.matrix.system.wechart.templateMsg.UniformMsgParam; @@ -18,7 +12,6 @@ import org.springframework.scheduling.annotation.Scheduled; import org.springframework.stereotype.Component; -import java.util.ArrayList; import java.util.List; import java.util.stream.Collectors; @@ -41,7 +34,7 @@ /** * 每分钟执行一次 */ - @Scheduled(cron = "0 0/1 * * * ?") + @Scheduled(cron = "0/30 * * * * ?") public void serviceOvertimeNotice() { List<SysProjServices> needNoticeService=projServicesDao.selectNeedNoticeService(); diff --git a/zq-erp/src/main/java/com/matrix/system/shopXcx/quartz/ShopActivityGroupJoinTimeOutQuartz.java b/zq-erp/src/main/java/com/matrix/system/shopXcx/quartz/ShopActivityGroupJoinTimeOutQuartz.java index 4c1efc7..fd0d99e 100644 --- a/zq-erp/src/main/java/com/matrix/system/shopXcx/quartz/ShopActivityGroupJoinTimeOutQuartz.java +++ b/zq-erp/src/main/java/com/matrix/system/shopXcx/quartz/ShopActivityGroupJoinTimeOutQuartz.java @@ -8,7 +8,6 @@ import com.matrix.system.shopXcx.dao.ShopActivitiesDao; import com.matrix.system.shopXcx.dao.ShopActivitiesGroupJoinDao; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.beans.factory.annotation.Value; import org.springframework.context.annotation.Configuration; import org.springframework.scheduling.annotation.Scheduled; @@ -28,13 +27,11 @@ @Autowired private ShopActivitiesDao shopActivitiesDao ; - @Value("${scheduling.enabled}") - private boolean taskSwitch; + @Scheduled(cron = "0 */1 * * * ?") public boolean executeExt() { - if (taskSwitch) { LogUtil.info("#开团时间超时任务处理#"); List<ShopActivitiesGroupJoin> groupJoins = shopActivitiesGroupJoinDao.selectGroupJoinWithEnd(); ShopActivityTimeOutQuartz timeOutQuartz = new ShopActivityTimeOutQuartz(); @@ -48,7 +45,6 @@ timeOutQuartz.doUnVirtualGroup(groupJoin); } } - } } return true; } diff --git a/zq-erp/src/main/java/com/matrix/system/shopXcx/quartz/ShopActivityPayTimeOutQuartz.java b/zq-erp/src/main/java/com/matrix/system/shopXcx/quartz/ShopActivityPayTimeOutQuartz.java index 8a2d9b3..3f85cd5 100644 --- a/zq-erp/src/main/java/com/matrix/system/shopXcx/quartz/ShopActivityPayTimeOutQuartz.java +++ b/zq-erp/src/main/java/com/matrix/system/shopXcx/quartz/ShopActivityPayTimeOutQuartz.java @@ -9,7 +9,6 @@ import com.matrix.system.shopXcx.dao.ShopActivitiesGroupJoinUserDao; import com.matrix.system.shopXcx.dao.ShopOrderDao; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.beans.factory.annotation.Value; import org.springframework.context.annotation.Configuration; import org.springframework.scheduling.annotation.Scheduled; @@ -32,13 +31,11 @@ @Autowired private ShopActivitiesGroupJoinDao shopActivitiesGroupJoinDao; - @Value("${scheduling.enabled}") - private boolean taskSwitch; @Scheduled(cron = "0 */1 * * * ?") public void executeExt() { - if (taskSwitch) { + LogUtil.info("#拼团支付超时处理任务#"); List<ShopActivitiesGroupJoinUser> joinUserList = shopActivitiesGroupJoinUserDao.selectGroupJoinUserEnd(); if (CollectionUtils.isNotEmpty(joinUserList)) { @@ -59,7 +56,7 @@ shopOrder.setOrderStatus(ShopOrder.ORDER_STATUS_CANCEL); shopOrderDao.updateByModel(shopOrder); } - } + } } } diff --git a/zq-erp/src/main/java/com/matrix/system/shopXcx/quartz/ShopActivityTimeOutQuartz.java b/zq-erp/src/main/java/com/matrix/system/shopXcx/quartz/ShopActivityTimeOutQuartz.java index 10e754d..1075d98 100644 --- a/zq-erp/src/main/java/com/matrix/system/shopXcx/quartz/ShopActivityTimeOutQuartz.java +++ b/zq-erp/src/main/java/com/matrix/system/shopXcx/quartz/ShopActivityTimeOutQuartz.java @@ -9,7 +9,6 @@ import com.matrix.system.shopXcx.bean.*; import com.matrix.system.shopXcx.dao.*; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.beans.factory.annotation.Value; import org.springframework.context.annotation.Configuration; import org.springframework.scheduling.annotation.Scheduled; @@ -38,13 +37,11 @@ @Autowired private ShopActivitiesGroupJoinUserDao shopActivitiesGroupJoinUserDao; - @Value("${scheduling.enabled}") - private boolean taskSwitch; @Scheduled(cron = "0 */1 * * * ?") public void executeExt() { - if (taskSwitch) { + LogUtil.info("#拼团活动自动结束任务#"); List<ShopActivities> actList = shopActivitiesDao.selectShopActivitiesHasEnd(); if (CollectionUtils.isNotEmpty(actList)) { @@ -63,7 +60,7 @@ } } } - } + } /** diff --git a/zq-erp/src/main/java/com/matrix/system/shopXcx/quartz/ShopAutomaticReceiveQuartz.java b/zq-erp/src/main/java/com/matrix/system/shopXcx/quartz/ShopAutomaticReceiveQuartz.java index 10df6db..a842add 100644 --- a/zq-erp/src/main/java/com/matrix/system/shopXcx/quartz/ShopAutomaticReceiveQuartz.java +++ b/zq-erp/src/main/java/com/matrix/system/shopXcx/quartz/ShopAutomaticReceiveQuartz.java @@ -23,9 +23,6 @@ @Configuration public class ShopAutomaticReceiveQuartz { - @Value("${scheduling.enabled}") - private boolean taskSwitch; - @Autowired private ShopDeliveryInfoDao shopDeliveryInfoDao; @@ -37,9 +34,9 @@ @Scheduled(cron = "0/30 * * * * ?") public void executeExt() { - if(taskSwitch) { + LogUtil.info("#15天自动收货任务处理#"); List<ShopDeliveryInfo> shopDeliveryInfos = shopDeliveryInfoDao.selectAutomaticReceive(); int flag = 0; @@ -55,7 +52,7 @@ } } LogUtil.info("自动确认收货更新条数:" + flag); - } + } } diff --git a/zq-erp/src/main/java/com/matrix/system/shopXcx/quartz/ShopCouponQuartz.java b/zq-erp/src/main/java/com/matrix/system/shopXcx/quartz/ShopCouponQuartz.java index 4a1ddf1..22dac6b 100644 --- a/zq-erp/src/main/java/com/matrix/system/shopXcx/quartz/ShopCouponQuartz.java +++ b/zq-erp/src/main/java/com/matrix/system/shopXcx/quartz/ShopCouponQuartz.java @@ -3,7 +3,6 @@ import com.matrix.core.tools.LogUtil; import com.matrix.system.shopXcx.dao.ShopCouponDao; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.beans.factory.annotation.Value; import org.springframework.context.annotation.Configuration; import org.springframework.scheduling.annotation.Scheduled; @@ -16,19 +15,14 @@ - @Value("${scheduling.enabled}") - private boolean taskSwitch; @Autowired private ShopCouponDao shopCouponDao; @Scheduled(cron = "0 */1 * * * ?") public void executeExt() { - if(taskSwitch){ - int i = shopCouponDao.updateAllCouponStatus(); - LogUtil.info("优惠券状态更新条数:" + i); - } - + int i = shopCouponDao.updateAllCouponStatus(); + LogUtil.info("优惠券状态更新条数:" + i); } diff --git a/zq-erp/src/main/resources/config/application.properties b/zq-erp/src/main/resources/config/application.properties index fa3a268..2a2ae62 100644 --- a/zq-erp/src/main/resources/config/application.properties +++ b/zq-erp/src/main/resources/config/application.properties @@ -55,7 +55,7 @@ groupBuy.pay.timeLimit=30 #定时任务 -scheduling.enabled=false +scheduling.enabled=true swagger.enable=true swagger.security.username=admin diff --git a/zq-erp/src/main/resources/templates/views/admin/fenxiao/fenxiao-user.html b/zq-erp/src/main/resources/templates/views/admin/fenxiao/fenxiao-user.html index b71fa3c..2e975b3 100644 --- a/zq-erp/src/main/resources/templates/views/admin/fenxiao/fenxiao-user.html +++ b/zq-erp/src/main/resources/templates/views/admin/fenxiao/fenxiao-user.html @@ -345,7 +345,51 @@ this.loadInfo(); window.addEventListener("keydown", this.keydown); //初始化编辑器 - ue = UE.getEditor('description'); + ue = UE.getEditor('description', { + toolbars: [ + [ + 'anchor', + 'bold', //加粗 + 'indent', //首行缩进 + 'italic', //斜体 + 'underline', //下划线 + 'strikethrough', //删除线 + 'subscript', //下标 + 'fontborder', //字符边框 + 'superscript', //上标 + 'formatmatch', //格式刷 + 'pasteplain', //纯文本粘贴模式 + 'selectall', //全选 + 'horizontal', //分隔线 + 'removeformat', //清除格式 + 'unlink', //取消链接 + 'inserttitle', //插入标题 + 'cleardoc', //清空文档 + 'fontfamily', //字体 + 'fontsize', //字号 + 'paragraph', //段落格式 + 'simpleupload', //单图上传 + 'insertimage', //多图上传 + 'link', //超链接 + 'emotion', //表情 + 'justifyleft', //居左对齐 + 'justifyright', //居右对齐 + 'justifycenter', //居中对齐 + 'justifyjustify', //两端对齐 + 'forecolor', //字体颜色 + 'backcolor', //背景色 + 'insertorderedlist', //有序列表 + 'insertunorderedlist', //无序列表 + 'fullscreen', //全屏 + 'rowspacingtop', //段前距 + 'rowspacingbottom', //段后距 + 'imagecenter', //居中 + 'lineheight', //行间距 + 'customstyle', //自定义标题 + 'autotypeset', //自动排版 + 'background', //背景 + ] + ]}); }, mounted: function () { }, -- Gitblit v1.9.1