From e8f0b3422d307c686b3a81269f9e9e4fb34a846e Mon Sep 17 00:00:00 2001 From: wjli <591616088@qq.com> Date: 星期五, 12 四月 2024 10:49:46 +0800 Subject: [PATCH] 指纹登陆返回客户端加密信息 --- xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/schedulings/HistoryOrder.java | 31 +++++++++++++++++++++++-------- 1 files changed, 23 insertions(+), 8 deletions(-) diff --git a/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/schedulings/HistoryOrder.java b/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/schedulings/HistoryOrder.java index 6422c2f..cf847d8 100644 --- a/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/schedulings/HistoryOrder.java +++ b/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/schedulings/HistoryOrder.java @@ -4,6 +4,7 @@ import cn.exrick.xboot.your.entity.*; import cn.exrick.xboot.your.service.*; import cn.hutool.core.bean.BeanUtil; +import cn.hutool.core.util.StrUtil; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.scheduling.annotation.Scheduled; @@ -31,7 +32,12 @@ @Autowired private ICustomerService iCustomerService; - @Scheduled(cron="0 30 21 * * ?")//姣忔櫄涓嬪崍9鐐瑰崐鐐规墽琛� + /** + * 姣忓ぉ21鐐�31鍒嗘墽琛� + * 灏嗛厤閫佹棩鏈熶负浠婂ぉ鐨勮鍗曟暟鎹�(t_order_task)瀛樺叆鍘嗗彶璁㈠崟鏁版嵁琛紙t_order_task2锛� + */ + + @Scheduled(cron="0 31 21 * * ?")//姣忔櫄涓嬪崍9鐐瑰崐鐐规墽琛� public void execute(){ String day = getDay(0); QueryWrapper<OrderTask> wrapper = new QueryWrapper<>(); @@ -44,25 +50,34 @@ BeanUtil.copyProperties(orderTask,orderTask2); orderTask2.setUserName(getUser(orderTask.getUserId())); - orderTask2.setCustomerName(getCustomer(orderTask.getCustomerId())); + //orderTask2.setCustomerName(getCustomer(orderTask.getCustomerId())); + //orderTask2.setCustomerName(orderTask.getCustomerName()); list2.add(orderTask2); } iOrderTask2Service.saveBatch(list2); } private String getUser(String id){ - User user = userService.get(id); - if(user!=null){ - return user.getNickname(); + if(StrUtil.isNotEmpty(id)){ + User user = userService.get(id); + if(user!=null){ + return user.getNickname(); + }else{ + return null; + } }else{ return null; } } private String getCustomer(String id){ - Customer customer = iCustomerService.getById(id); - if(customer!=null){ - return customer.getName(); + if(StrUtil.isNotEmpty(id)){ + Customer customer = iCustomerService.getById(id); + if(customer!=null){ + return customer.getName(); + }else{ + return null; + } }else{ return null; } -- Gitblit v1.9.1