From 91ed0c1884db746e0f0921935f4674f3011f5827 Mon Sep 17 00:00:00 2001 From: mg <maokecheng@163.com> Date: 星期一, 17 十月 2022 15:05:43 +0800 Subject: [PATCH] 驳回流程处理。 --- ycl-platform/src/main/java/com/ycl/controller/region/SccgRegionController.java | 51 ++++++++ ycl-platform/src/main/java/com/ycl/service/region/ISccgRegionService.java | 2 ycl-platform/src/main/java/com/ycl/service/message/factory/InnerSender.java | 5 ycl-platform/src/main/java/com/ycl/service/message/impl/MessageScheduleServiceImpl.java | 37 ++++++ ycl-platform/src/main/java/com/ycl/common/constant/CheckResult.java | 32 +++++ ycl-platform/src/main/java/com/ycl/entity/message/Message.java | 7 + ycl-platform/src/main/java/com/ycl/service/caseHandler/impl/CheckHandleServiceImpl.java | 48 ++++++- ycl-platform/src/main/java/com/ycl/dto/message/MessageParam.java | 5 ycl-platform/src/main/java/com/ycl/scheduling/SchedulingConfiguration.java | 85 ++++++++++++++ ycl-platform/src/main/java/com/ycl/service/message/MessageScheduleService.java | 13 ++ ycl-platform/src/main/java/com/ycl/entity/region/SccgRegion.java | 10 + ycl-platform/src/main/java/com/ycl/service/region/impl/SccgRegionServiceImpl.java | 9 + 12 files changed, 290 insertions(+), 14 deletions(-) diff --git a/ycl-platform/src/main/java/com/ycl/common/constant/CheckResult.java b/ycl-platform/src/main/java/com/ycl/common/constant/CheckResult.java new file mode 100644 index 0000000..8d971ba --- /dev/null +++ b/ycl-platform/src/main/java/com/ycl/common/constant/CheckResult.java @@ -0,0 +1,32 @@ +package com.ycl.common.constant; + +/** + * <p> + * 瀹℃牳缁撴灉 + * </p> + * + * @author mg + * @since 2022-10-17 + */ +public enum CheckResult { + + PASS("01", "閫氳繃"), + REJECT("02", "椹冲洖"); + + + private String code; + private String name; + + CheckResult(String code, String name) { + this.code = code; + this.name = name; + } + + public String getCode() { + return code; + } + + public String getName() { + return name; + } +} diff --git a/ycl-platform/src/main/java/com/ycl/controller/region/SccgRegionController.java b/ycl-platform/src/main/java/com/ycl/controller/region/SccgRegionController.java index 3a22e82..b4d892f 100644 --- a/ycl-platform/src/main/java/com/ycl/controller/region/SccgRegionController.java +++ b/ycl-platform/src/main/java/com/ycl/controller/region/SccgRegionController.java @@ -1,15 +1,15 @@ package com.ycl.controller.region; +import com.baomidou.mybatisplus.core.metadata.IPage; import com.ycl.api.CommonResult; import com.ycl.controller.BaseController; import com.ycl.entity.region.SccgRegion; import com.ycl.service.region.ISccgRegionService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; import javax.annotation.Resource; import java.util.List; @@ -36,4 +36,49 @@ List<SccgRegion> treeList = iSccgRegionService.getTree(); return CommonResult.success(treeList); } + + @ApiOperation(value = "娣诲姞琛屾斂鍖哄煙") + @RequestMapping(value = "/addRegion", method = RequestMethod.POST) + @ResponseBody + public CommonResult addRegion(@Validated @RequestBody SccgRegion sccgRegion) { + return CommonResult.success(iSccgRegionService.save(sccgRegion)); + } + @ApiOperation(value = "鑾峰彇琛屾斂鍖哄煙鍒嗛〉鏌ヨ") + @RequestMapping(value = "/list", method = RequestMethod.POST) + @ResponseBody + public CommonResult<IPage<SccgRegion>> list(@Validated @RequestBody SccgRegion sccgRegion) { + return CommonResult.success(iSccgRegionService.list(sccgRegion)); + } + + + @ApiOperation("鑾峰彇鎸囧畾琛屾斂鍖哄煙") + @RequestMapping(value = "/getRegion/{id}", method = RequestMethod.GET) + @ResponseBody + public CommonResult<SccgRegion> getMessage(@PathVariable Long id) { + SccgRegion sccgRegion = iSccgRegionService.getById(id); + return CommonResult.success(sccgRegion); + } + + @ApiOperation("淇敼鎸囧畾琛屾斂鍖哄煙") + @RequestMapping(value = "/update/{id}", method = RequestMethod.POST) + @ResponseBody + public CommonResult update(@PathVariable Long id, @RequestBody SccgRegion sccgRegion) { + sccgRegion.setId(id); + boolean success = iSccgRegionService.updateById(sccgRegion); + if (success) { + return CommonResult.success(null); + } + return CommonResult.failed(); + } + + @ApiOperation("鎵归噺鍒犻櫎琛屾斂鍖哄煙") + @RequestMapping(value = "/delete", method = RequestMethod.POST) + @ResponseBody + public CommonResult delete(@RequestParam("ids") List<Long> ids) { + boolean success = iSccgRegionService.removeBatchByIds(ids); + if (success) { + return CommonResult.success(null); + } + return CommonResult.failed(); + } } diff --git a/ycl-platform/src/main/java/com/ycl/dto/message/MessageParam.java b/ycl-platform/src/main/java/com/ycl/dto/message/MessageParam.java index 806cc20..b1f84a4 100644 --- a/ycl-platform/src/main/java/com/ycl/dto/message/MessageParam.java +++ b/ycl-platform/src/main/java/com/ycl/dto/message/MessageParam.java @@ -82,4 +82,9 @@ */ @ApiModelProperty(value = "鍒涘缓浜�") private Long createUser; + /** + * 鏄惁鎵弿0-鏈壂鎻�1-宸叉壂鎻� + */ + @ApiModelProperty(value = "鏄惁鎵弿0-鏈壂鎻�1-宸叉壂鎻�") + private Integer isScan; } \ No newline at end of file diff --git a/ycl-platform/src/main/java/com/ycl/entity/message/Message.java b/ycl-platform/src/main/java/com/ycl/entity/message/Message.java index dcd5edc..1171542 100644 --- a/ycl-platform/src/main/java/com/ycl/entity/message/Message.java +++ b/ycl-platform/src/main/java/com/ycl/entity/message/Message.java @@ -119,6 +119,13 @@ @ApiModelProperty(value = "鐘舵��0-鏈彂甯�1-宸插彂甯�") private Integer status; /** + * 鏄惁鎵弿0-鏈壂鎻�1-宸叉壂鎻� + */ + @TableField("is_scan") + @ApiModelProperty(value = "鏄惁鎵弿0-鏈壂鎻�1-宸叉壂鎻�") + private Integer isScan; + + /** * 鏄惁鏌ョ湅0-鏈煡鐪�1-宸叉煡鐪� */ @TableField("is_view") diff --git a/ycl-platform/src/main/java/com/ycl/entity/region/SccgRegion.java b/ycl-platform/src/main/java/com/ycl/entity/region/SccgRegion.java index 2800a93..8b9f4fc 100644 --- a/ycl-platform/src/main/java/com/ycl/entity/region/SccgRegion.java +++ b/ycl-platform/src/main/java/com/ycl/entity/region/SccgRegion.java @@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; +import io.swagger.annotations.ApiModelProperty; import lombok.Data; import lombok.EqualsAndHashCode; @@ -35,14 +36,23 @@ * 鍦板煙鍚� */ @TableField("region_name") + @ApiModelProperty(value = "鍦板煙鍚�") private String regionName; /** * 榛樿0 */ @TableField("parent_id") + @ApiModelProperty(value = "榛樿0") private Long parentId; + /** + * 绫诲瀷1-琛楅亾2-绀惧尯3-涔�4-闀� + */ + @TableField("type") + @ApiModelProperty(value = "绫诲瀷0-甯�1-鍘�2-琛楅亾3-绀惧尯4-涔�5-闀�") + private Integer type; + @TableField(exist = false) private List<SccgRegion> children; } diff --git a/ycl-platform/src/main/java/com/ycl/scheduling/SchedulingConfiguration.java b/ycl-platform/src/main/java/com/ycl/scheduling/SchedulingConfiguration.java new file mode 100644 index 0000000..d6fb5bf --- /dev/null +++ b/ycl-platform/src/main/java/com/ycl/scheduling/SchedulingConfiguration.java @@ -0,0 +1,85 @@ +package com.ycl.scheduling; + +import com.ycl.service.message.MessageScheduleService; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.context.annotation.Configuration; +import org.springframework.scheduling.annotation.EnableScheduling; +import org.springframework.scheduling.annotation.Scheduled; + +@Configuration +@EnableScheduling +public class SchedulingConfiguration { + + private Logger logger = LoggerFactory.getLogger(getClass()); + + // + //鍏朵腑姣忎釜鍏冪礌鍙互鏄竴涓��(濡�6),涓�涓繛缁尯闂�(9-12),涓�涓棿闅旀椂闂�(8-18/4)(/琛ㄧず姣忛殧4灏忔椂),涓�涓垪琛�(1,3,5),閫氶厤绗︺�傜敱浜�"鏈堜唤涓殑鏃ユ湡"鍜�"鏄熸湡涓殑鏃ユ湡"杩欎袱涓厓绱犱簰鏂ョ殑,蹇呴』瑕佸鍏朵腑涓�涓缃�?. + //0 0 10,14,16 * * ? 姣忓ぉ涓婂崍10鐐癸紝涓嬪崍2鐐癸紝4鐐� + //0 0/30 9-17 * * ? 鏈濅節鏅氫簲宸ヤ綔鏃堕棿鍐呮瘡鍗婂皬鏃� + //0 0 12 ? * WED 琛ㄧず姣忎釜鏄熸湡涓変腑鍗�12鐐� + //"0 0 12 * * ?" 姣忓ぉ涓崍12鐐硅Е鍙� + //"0 15 10 ? * *" 姣忓ぉ涓婂崍10:15瑙﹀彂 + //"0 15 10 * * ?" 姣忓ぉ涓婂崍10:15瑙﹀彂 + //"0 15 10 * * ? *" 姣忓ぉ涓婂崍10:15瑙﹀彂 + //"0 15 10 * * ? 2005" 2005骞寸殑姣忓ぉ涓婂崍10:15瑙﹀彂 + //"0 * 14 * * ?" 鍦ㄦ瘡澶╀笅鍗�2鐐瑰埌涓嬪崍2:59鏈熼棿鐨勬瘡1鍒嗛挓瑙﹀彂 + //"0 0/5 14 * * ?" 鍦ㄦ瘡澶╀笅鍗�2鐐瑰埌涓嬪崍2:55鏈熼棿鐨勬瘡5鍒嗛挓瑙﹀彂 + //"0 0/5 14,18 * * ?" 鍦ㄦ瘡澶╀笅鍗�2鐐瑰埌2:55鏈熼棿鍜屼笅鍗�6鐐瑰埌6:55鏈熼棿鐨勬瘡5鍒嗛挓瑙﹀彂 + //"0 0-5 14 * * ?" 鍦ㄦ瘡澶╀笅鍗�2鐐瑰埌涓嬪崍2:05鏈熼棿鐨勬瘡1鍒嗛挓瑙﹀彂 + //"0 10,44 14 ? 3 WED" 姣忓勾涓夋湀鐨勬槦鏈熶笁鐨勪笅鍗�2:10鍜�2:44瑙﹀彂 + //"0 15 10 ? * MON-FRI" 鍛ㄤ竴鑷冲懆浜旂殑涓婂崍10:15瑙﹀彂 + //"0 15 10 15 * ?" 姣忔湀15鏃ヤ笂鍗�10:15瑙﹀彂 + //"0 15 10 L * ?" 姣忔湀鏈�鍚庝竴鏃ョ殑涓婂崍10:15瑙﹀彂 + //"0 15 10 ? * 6L" 姣忔湀鐨勬渶鍚庝竴涓槦鏈熶簲涓婂崍10:15瑙﹀彂 + //"0 15 10 ? * 6L 2002-2005" 2002骞磋嚦2005骞寸殑姣忔湀鐨勬渶鍚庝竴涓槦鏈熶簲涓婂崍10:15瑙﹀彂 + //"0 15 10 ? * 6#3" 姣忔湀鐨勭涓変釜鏄熸湡浜斾笂鍗�10:15瑙﹀彂 + //鏈変簺瀛愯〃杈惧紡鑳藉寘鍚竴浜涜寖鍥存垨鍒楄〃 + //渚嬪锛氬瓙琛ㄨ揪寮忥紙澶╋紙鏄熸湡锛夛級鍙互涓� 鈥淢ON-FRI鈥濓紝鈥淢ON锛學ED锛孎RI鈥濓紝鈥淢ON-WED,SAT鈥� + //鈥�*鈥濆瓧绗︿唬琛ㄦ墍鏈夊彲鑳界殑鍊� + //鍥犳锛屸��*鈥濆湪瀛愯〃杈惧紡锛堟湀锛夐噷琛ㄧず姣忎釜鏈堢殑鍚箟锛屸��*鈥濆湪瀛愯〃杈惧紡锛堝ぉ锛堟槦鏈燂級锛夎〃绀烘槦鏈熺殑姣忎竴澶� + // + //鈥�/鈥濆瓧绗︾敤鏉ユ寚瀹氭暟鍊肩殑澧為噺 + //渚嬪锛氬湪瀛愯〃杈惧紡锛堝垎閽燂級閲岀殑鈥�0/15鈥濊〃绀轰粠绗�0鍒嗛挓寮�濮嬶紝姣�15鍒嗛挓 + // 鍦ㄥ瓙琛ㄨ揪寮忥紙鍒嗛挓锛夐噷鐨勨��3/20鈥濊〃绀轰粠绗�3鍒嗛挓寮�濮嬶紝姣�20鍒嗛挓锛堝畠鍜屸��3锛�23锛�43鈥濓級鐨勫惈涔変竴鏍� + // + //鈥滐紵鈥濆瓧绗︿粎琚敤浜庡ぉ锛堟湀锛夊拰澶╋紙鏄熸湡锛変袱涓瓙琛ㄨ揪寮忥紝琛ㄧず涓嶆寚瀹氬�� + //褰�2涓瓙琛ㄨ揪寮忓叾涓箣涓�琚寚瀹氫簡鍊间互鍚庯紝涓轰簡閬垮厤鍐茬獊锛岄渶瑕佸皢鍙︿竴涓瓙琛ㄨ揪寮忕殑鍊艰涓衡�滐紵鈥� + // + //鈥淟鈥� 瀛楃浠呰鐢ㄤ簬澶╋紙鏈堬級鍜屽ぉ锛堟槦鏈燂級涓や釜瀛愯〃杈惧紡锛屽畠鏄崟璇嶁�渓ast鈥濈殑缂╁啓 + //浣嗘槸瀹冨湪涓や釜瀛愯〃杈惧紡閲岀殑鍚箟鏄笉鍚岀殑銆� + //鍦ㄥぉ锛堟湀锛夊瓙琛ㄨ揪寮忎腑锛屸�淟鈥濊〃绀轰竴涓湀鐨勬渶鍚庝竴澶� + //鍦ㄥぉ锛堟槦鏈燂級鑷〃杈惧紡涓紝鈥淟鈥濊〃绀轰竴涓槦鏈熺殑鏈�鍚庝竴澶╋紝涔熷氨鏄疭AT + //濡傛灉鍦ㄢ�淟鈥濆墠鏈夊叿浣撶殑鍐呭锛屽畠灏卞叿鏈夊叾浠栫殑鍚箟浜� + //渚嬪锛氣��6L鈥濊〃绀鸿繖涓湀鐨勫�掓暟绗紪澶╋紝鈥滐鸡锛诧缉锛�濊〃绀鸿繖涓湀鐨勬渶涓�涓槦鏈熶簲 + //娉ㄦ剰锛氬湪浣跨敤鈥淟鈥濆弬鏁版椂锛屼笉瑕佹寚瀹氬垪琛ㄦ垨鑼冨洿锛屽洜涓鸿繖浼氬鑷撮棶棰� + // + // + //瀛楁 鍏佽鍊� 鍏佽鐨勭壒娈婂瓧绗� + //绉� 0-59 , - * / + //鍒� 0-59 , - * / + //灏忔椂 0-23 , - * / + //鏃ユ湡 1-31 , - * ? / L W C + //鏈堜唤 1-12 鎴栬�� JAN-DEC , - * / + //鏄熸湡 1-7 鎴栬�� SUN-SAT , - * ? / L C # + //骞达紙鍙�夛級 鐣欑┖, 1970-2099 , - + + //鎸夐『搴忎緷娆′负 + //绉掞紙0~59锛� + //鍒嗛挓锛�0~59锛� + //灏忔椂锛�0~23锛� + //澶╋紙鏈堬級锛�0~31锛屼絾鏄綘闇�瑕佽�冭檻浣犳湀鐨勫ぉ鏁帮級 + //鏈堬紙0~11锛� + //澶╋紙鏄熸湡锛夛紙1~7 1=SUN 鎴� SUN锛孧ON锛孴UE锛學ED锛孴HU锛孎RI锛孲AT锛� + //7.骞翠唤锛�1970锛�2099锛� + @Autowired + private MessageScheduleService messageScheduleService; + + @Scheduled(cron = "0/50 * * * * ?") // 姣�50绉掓墽琛屼竴娆� + public void scheduler() { + //瀹氭椂鎵弿鍙戦�佺煭淇� + messageScheduleService.sendSmsSchedule(); + } +} + diff --git a/ycl-platform/src/main/java/com/ycl/service/caseHandler/impl/CheckHandleServiceImpl.java b/ycl-platform/src/main/java/com/ycl/service/caseHandler/impl/CheckHandleServiceImpl.java index ccf530a..1a4d0c4 100644 --- a/ycl-platform/src/main/java/com/ycl/service/caseHandler/impl/CheckHandleServiceImpl.java +++ b/ycl-platform/src/main/java/com/ycl/service/caseHandler/impl/CheckHandleServiceImpl.java @@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.ycl.common.constant.BaseCaseStatus; +import com.ycl.common.constant.CheckResult; import com.ycl.common.constant.StepName; import com.ycl.dto.caseHandler.ChechParam; import com.ycl.entity.caseHandler.BaseCase; @@ -42,17 +43,50 @@ @Override public Boolean check(ChechParam chechParam) { - //淇敼妗堜欢鐘舵�佷负瀹℃牳 - BaseCase baseCase = new BaseCase(); - baseCase.setId(chechParam.getBaseCaseId()); - baseCase.setState(BaseCaseStatus.CHECK); - baseCase.setAuditOpinion(chechParam.getCheckOpinion()); - baseCaseMapper.updateById(baseCase); QueryWrapper<WorkflowConfigStep> stepQurey = new QueryWrapper<>(); stepQurey.eq("name", StepName.CHECK.getName()); WorkflowConfigStep workflowConfigStep = workflowConfigStepMapper.selectOne(stepQurey); + //淇敼妗堜欢鐘舵�佷负瀹℃牳 + BaseCase baseCase = new BaseCase(); + baseCase.setId(chechParam.getBaseCaseId()); + baseCase.setAuditOpinion(chechParam.getCheckOpinion()); + //淇敼鏍告煡璁板綍 + DisposeRecord disposeRecord = new DisposeRecord(); + //椹冲洖澶勭悊 + if (CheckResult.REJECT.getName().equals(chechParam.getResult())) { + QueryWrapper<WorkflowConfigStep> lastNextqurey = new QueryWrapper<>(); + lastNextqurey.eq("workflow_config_id", workflowConfigStep.getWorkflowConfigId()); + lastNextqurey.eq("seq", workflowConfigStep.getSeq()-1); + WorkflowConfigStep lastStep = workflowConfigStepMapper.selectOne(lastNextqurey); + //鍒犻櫎涓婁竴姝ユ暟鎹� + UpdateWrapper<DisposeRecord> deleteWrapper = new UpdateWrapper<>(); + deleteWrapper.eq("base_case_id", chechParam.getBaseCaseId()).eq("workflow_config_step_id",lastStep.getId()); + disposeRecordMapper.delete(deleteWrapper); + //淇敼鐘舵�佷负涓婁笂涓�姝ョ姸鎬� + QueryWrapper<WorkflowConfigStep> lastLastNextqurey = new QueryWrapper<>(); + lastLastNextqurey.eq("workflow_config_id", workflowConfigStep.getWorkflowConfigId()); + lastLastNextqurey.eq("seq", workflowConfigStep.getSeq()-2); + WorkflowConfigStep lastLastStep = workflowConfigStepMapper.selectOne(lastLastNextqurey); + + UpdateWrapper<DisposeRecord> updateWrapper = new UpdateWrapper<>(); + updateWrapper.eq("base_case_id", chechParam.getBaseCaseId()).eq("workflow_config_step_id",lastLastStep.getId()); + + disposeRecord.setHandlerId(chechParam.getCurrentUser()); + //鏍告煡宸茬粨鏉� + disposeRecord.setState(0); + disposeRecord.setEndTime(LocalDateTime.now()); + disposeRecordMapper.update(disposeRecord, updateWrapper); + //璋冨害 + baseCase.setState(BaseCaseStatus.DISPATCH); + baseCaseMapper.updateById(baseCase); + return true; + } + //鏍告煡 + baseCase.setState(BaseCaseStatus.CHECK); + baseCaseMapper.updateById(baseCase); + if (workflowConfigStep == null) { throw new ApiException("鏈煡璇㈠埌璇ユ祦绋嬬幆鑺�"); @@ -61,8 +95,6 @@ UpdateWrapper<DisposeRecord> updateWrapper = new UpdateWrapper<>(); updateWrapper.eq("base_case_id", baseCase.getId()).eq("workflow_config_step_id",workflowConfigStep.getId()); - //淇敼鏍告煡璁板綍 - DisposeRecord disposeRecord = new DisposeRecord(); disposeRecord.setHandlerId(chechParam.getCurrentUser()); //鏍告煡宸茬粨鏉� disposeRecord.setState(1); diff --git a/ycl-platform/src/main/java/com/ycl/service/message/MessageScheduleService.java b/ycl-platform/src/main/java/com/ycl/service/message/MessageScheduleService.java new file mode 100644 index 0000000..0e14643 --- /dev/null +++ b/ycl-platform/src/main/java/com/ycl/service/message/MessageScheduleService.java @@ -0,0 +1,13 @@ +package com.ycl.service.message; + +/** + * <p> + * 绫昏鏄� + * </p> + * + * @author mg + * @since 2022-10-17 + */ +public interface MessageScheduleService { + void sendSmsSchedule(); +} diff --git a/ycl-platform/src/main/java/com/ycl/service/message/factory/InnerSender.java b/ycl-platform/src/main/java/com/ycl/service/message/factory/InnerSender.java index 76639dc..2da8edd 100644 --- a/ycl-platform/src/main/java/com/ycl/service/message/factory/InnerSender.java +++ b/ycl-platform/src/main/java/com/ycl/service/message/factory/InnerSender.java @@ -46,7 +46,9 @@ //鐢熸垚8浣嶉殢鏈烘暟娑堟伅缂栫爜 messageAdd.setMessageNumber(messageNumber); //鍙戦�佹椂闂� - messageAdd.setSendTime(new Date()); + if (messageAdd.getSendTime() == null) { + messageAdd.setSendTime(new Date()); + } //鐢熸垚榛樿鍙傛暟 messageAdd.setCreateTime(new Date()); messageAdd.setUpdateTime(new Date()); @@ -54,6 +56,7 @@ messageAdd.setUpdateUser(messageParam.getCreateUser()); messageAdd.setIsView(0); messageAdd.setVersion(0); + messageAdd.setIsScan(1); messages.add(messageAdd); } BeanUtils.copyProperties(messageParam, message); diff --git a/ycl-platform/src/main/java/com/ycl/service/message/impl/MessageScheduleServiceImpl.java b/ycl-platform/src/main/java/com/ycl/service/message/impl/MessageScheduleServiceImpl.java new file mode 100644 index 0000000..fb2d4b4 --- /dev/null +++ b/ycl-platform/src/main/java/com/ycl/service/message/impl/MessageScheduleServiceImpl.java @@ -0,0 +1,37 @@ +package com.ycl.service.message.impl; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.ycl.entity.message.Message; +import com.ycl.mapper.message.MessageMapper; +import com.ycl.service.message.MessageScheduleService; +import org.springframework.stereotype.Service; + +import javax.annotation.Resource; +import java.util.Date; +import java.util.List; + +/** + * <p> + * 绫昏鏄� + * </p> + * + * @author mg + * @since 2022-10-17 + */ +@Service +public class MessageScheduleServiceImpl implements MessageScheduleService { + + + @Resource + MessageMapper messageMapper; + + @Override + public void sendSmsSchedule() { + QueryWrapper<Message> wrapper = new QueryWrapper<>(); + wrapper.lambda().eq(Message::getIsScan, 0).le(Message::getSendTime,new Date()); + List<Message> messages = messageMapper.selectList(wrapper); + for (Message message : messages) { + System.out.println("--------------------寮�濮嬫壂鎻忕煭淇′俊鎭�-------------------"); + } + } +} diff --git a/ycl-platform/src/main/java/com/ycl/service/region/ISccgRegionService.java b/ycl-platform/src/main/java/com/ycl/service/region/ISccgRegionService.java index 98aff41..7ba1682 100644 --- a/ycl-platform/src/main/java/com/ycl/service/region/ISccgRegionService.java +++ b/ycl-platform/src/main/java/com/ycl/service/region/ISccgRegionService.java @@ -1,5 +1,6 @@ package com.ycl.service.region; +import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.service.IService; import com.ycl.entity.region.SccgRegion; @@ -19,4 +20,5 @@ * @return */ List<SccgRegion> getTree(); + IPage<SccgRegion> list(SccgRegion sccgRegion); } diff --git a/ycl-platform/src/main/java/com/ycl/service/region/impl/SccgRegionServiceImpl.java b/ycl-platform/src/main/java/com/ycl/service/region/impl/SccgRegionServiceImpl.java index b0ddd36..e077eec 100644 --- a/ycl-platform/src/main/java/com/ycl/service/region/impl/SccgRegionServiceImpl.java +++ b/ycl-platform/src/main/java/com/ycl/service/region/impl/SccgRegionServiceImpl.java @@ -1,12 +1,12 @@ package com.ycl.service.region.impl; import com.alibaba.fastjson.JSON; +import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import com.ycl.entity.depart.UmsDepart; import com.ycl.entity.region.SccgRegion; import com.ycl.mapper.region.SccgRegionMapper; -import com.ycl.service.region.ISccgRegionService; import com.ycl.service.redis.RedisService; +import com.ycl.service.region.ISccgRegionService; import com.ycl.utils.common.LiveTimeMillisecond; import com.ycl.utils.redis.RedisKey; import org.apache.commons.lang3.StringUtils; @@ -84,4 +84,9 @@ } return e; } + + @Override + public IPage<SccgRegion> list(SccgRegion sccgRegion) { + return null; + } } -- Gitblit v1.8.0