| | |
| | | } |
| | | |
| | | /** |
| | | * 定时自动完成 7 天未确认收货的物流发货订单 |
| | | * 每 10 分钟执行一次 |
| | | */ |
| | | @Scheduled(fixedDelay = 1000L * 60 * 10L ) |
| | | public void autoCompleteOrder(){ |
| | | if (timing) { |
| | | System.out.println("开始执行订单自动完成任务--------Begin------"); |
| | | try { |
| | | goodsorderService.autoCompleteOrder(); |
| | | System.out.println("订单自动完成任务执行成功--------End------"); |
| | | } catch (Exception e) { |
| | | System.out.println("订单自动完成任务执行失败:" + e.getMessage()); |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 定时完成售后单状态 |
| | | */ |
| | | // @Scheduled(fixedDelay = 1000L * 10L ) |
| | |
| | | # application: |
| | | # name: doumeemes |
| | | profiles: |
| | | active: dev |
| | | active: pro |
| | | |
| | | # JSON返回配置 |
| | | jackson: |
| | |
| | | @Slf4j |
| | | public class GeneratePicUtil { |
| | | |
| | | static String bg="https://shoeslxkj.oss-cn-beijing.aliyuncs.com/file/20230404/SysBaseBackGround/D56231512C0B4A4C9D06B02F9566B0B0.png"; |
| | | static String bg="https://dynometacn.oss-cn-shanghai.aliyuncs.com/goods/20260319/feccd954-32f7-47e2-96fb-be102b643f1f.png"; |
| | | |
| | | static String headUrl = "https://shoeslxkj.oss-cn-beijing.aliyuncs.com/file/20230404/SysBaseBackGround/B802B64FE31447DCB030F13ECC7CA9F9.png"; |
| | | |
| | |
| | | g2.fillRect(0, 0, width, height); |
| | | |
| | | //背景图片 |
| | | // BufferedImage titles = ImageIO.read(new URL(bg)); |
| | | // g2.drawImage(titles, 1, 1, 894, 1305, null); |
| | | // g2.drawRect(0, 0, width - 1, height - 1); |
| | | BufferedImage titles = ImageIO.read(new URL(bg)); |
| | | g2.drawImage(titles, 1, 1, 894, 1305, null); |
| | | g2.drawRect(0, 0, width - 1, height - 1); |
| | | //头部图片 |
| | | BufferedImage headBg = ImageIO.read(new URL(headImg)); |
| | | // BufferedImage headBg = getImgIO(imgurl); |
| | | g2.drawImage(headBg, 1, 1, 894, 1080, null); |
| | | g2.drawRect(0, 0, width - 1, height - 1); |
| | | |
| | | g2.setColor(Color.black); |
| | | g2.setFont(new Font("黑体", Font.PLAIN, 40)); |
| | | g2.drawString("长按识别小程序", 46, 1180); |
| | | |
| | | g2.setColor(Color.gray); |
| | | g2.setFont(new Font("黑体", Font.PLAIN, 32)); |
| | | g2.drawString("查看更多精彩内容", 48, 1230); |
| | | // g2.setColor(Color.black); |
| | | // g2.setFont(new Font("黑体", Font.PLAIN, 40)); |
| | | // g2.drawString("长按识别小程序", 46, 1180); |
| | | // |
| | | // g2.setColor(Color.gray); |
| | | // g2.setFont(new Font("黑体", Font.PLAIN, 32)); |
| | | // g2.drawString("查看更多精彩内容", 48, 1230); |
| | | |
| | | //设置二维码图片 |
| | | // BufferedImage barcodeCode = ImageIO.read(new URL(wxQrCodeImg)); |
| | |
| | | |
| | | void autoCancelOrder(); |
| | | |
| | | void autoCompleteOrder(); |
| | | |
| | | } |
| | |
| | | this.cancel(goodsorder,null,"订单未支付超时自动取消"); |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * 自动完成 7 天未确认收货的物流发货订单 |
| | | */ |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public void autoCompleteOrder(){ |
| | | //查询发货后 7 天未确认收货的订单数据(仅处理快递配送订单) |
| | | List<Goodsorder> goodsOrderList = goodsorderMapper.selectList( |
| | | new QueryWrapper<Goodsorder>() |
| | | .eq("STATUS", Constants.OrderStatus.WAIT_RECEIVE.getKey()) |
| | | .eq("RECEIVE_TYPE", Constants.ZERO) // 仅处理快递配送订单 |
| | | .isNotNull("KD_CODE") // 有物流单号 |
| | | .ne("KD_CODE", "") // 物流单号不为空 |
| | | .apply(" KD_DATE IS NOT NULL ") // 有发货时间 |
| | | .apply(" NOW() >= DATE_SUB(KD_DATE, INTERVAL -7 DAY) ") // 发货后 7 天 |
| | | ); |
| | | |
| | | if (!goodsOrderList.isEmpty()) { |
| | | for (Goodsorder order : goodsOrderList) { |
| | | try { |
| | | Goodsorder updateOrder = new Goodsorder(); |
| | | updateOrder.setId(order.getId()); |
| | | updateOrder.setStatus(Constants.OrderStatus.DONE.getKey()); |
| | | updateOrder.setDoneDate(new Date()); |
| | | updateOrder.setDoneInfo("发货 7 天后系统自动确认收货"); |
| | | goodsorderMapper.updateById(updateOrder); |
| | | |
| | | //存在现金支付 赠送 积分 |
| | | if(Constants.equalsInteger(updateOrder.getPayMethod(),Constants.ZERO)){ |
| | | //赠送消费者积分 |
| | | this.orderAddMemberIntegral(order); |
| | | //下单完成 根据信息确认是否需要赠送邀请者优惠券 |
| | | this.orderDoneRewardInviteCoupon(order); |
| | | //经销商 添加赠送积分 |
| | | this.orderAddShopIntegral(order); |
| | | //经销商 结算金额 |
| | | this.orderAddShopCash(order); |
| | | } |
| | | |
| | | |
| | | System.out.println("订单自动完成:订单 ID=" + order.getId() + ", 订单编号=" + order.getCode()); |
| | | } catch (Exception e) { |
| | | System.out.println("订单自动完成失败:订单 ID=" + order.getId() + ", 错误:" + e.getMessage()); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | loginLog.setOsInfo(Utils.User_Client.getOS(request)); |
| | | loginLog.setServerIp(Utils.Server.getIP()); |
| | | // 校验验证码 |
| | | /* try { |
| | | try { |
| | | captchaService.check(dto.getUuid(), dto.getCode()); |
| | | } catch (Exception e) { |
| | | log.error(e.getMessage(), e); |
| | |
| | | loginLog.setSuccess(Boolean.FALSE); |
| | | systemLoginLogService.create(loginLog); |
| | | throw e; |
| | | }*/ |
| | | } |
| | | // 校验用户名和密码 |
| | | Subject subject = SecurityUtils.getSubject(); |
| | | UsernamePasswordToken token = new UsernamePasswordToken(dto.getUsername(), dto.getPassword()); |
| | |
| | | |
| | | |
| | | ########################定时开启配置######################## |
| | | timing: true |
| | | timing: false |
| | |
| | | wx: |
| | | pay: |
| | | appId: wx0115b948d647e9b2 |
| | | appSecret: 4b5b97d6770f1fc6b09a7019804739a7 #3462fa186da7cb06c544df8d8664b63a |
| | | appSecret: 4b5b97d6770f1fc6b09a7019804739a7 |
| | | mchId: 1739990831 |
| | | mchKey: u4TSNtv0wFP7WRfnxBgijYOtRhS9FvlM |
| | | notifyUrl: https://dynj.ahapp.net/dmmall_interface/web/api/wxPayNotify #mall.myshopify.com |
| | | notifyUrl: https://mall.dynometacn.com/dmmall_web_api/web/api/wxPayNotify |
| | | keyPath: /usr/local/jars/apiclient_cert.p12 |
| | | # appId: wxcd2b89fd2ff065f8 |
| | | # appSecret: 3462fa186da7cb06c544df8d8664b63a |
| | | # mchId: 1229817002 |
| | | # mchKey: u4TSNtv0wFP7WRfnxBgijYOtRhS9FvlM |
| | | # notifyUrl: https://mall.dynometacn.com/dmmall_web_api/web/api/wxPayNotify |
| | | # keyPath: /usr/local/jars/dm_apiclient_cert.p12 |
| | | |
| | | tencent: |
| | | map: |
| | |
| | | |
| | | |
| | | ########################定时开启配置######################## |
| | | timing: true |
| | | timing: false |
| | |
| | | public ApiResponse<List<Areas>> treeList (@RequestBody AreasDto pageWrap) { |
| | | Areas a = new Areas(); |
| | | BeanUtils.copyProperties(pageWrap,a); |
| | | areasService.cacheData(); |
| | | return ApiResponse.success(areasService.findList(a)); |
| | | } |
| | | |