关注JEECG发展历程 关注最新动态和版本, 记录JEECG成长点滴 更新日志 - 技术支持 - 招聘英才

JEECG最新版本下载 JEECG智能开发平台 - 显著提高开发效率 常见问题 - 入门视频 - 参与开源团队

商务QQ: 69893005、3102411850 商务热线(5*8小时): 010-64808099 官方邮箱: jeecgos@163.com

查看: 9812|回复: 2

[系统权限] 定时任务发送邮件不成功

[复制链接]
发表于 2018-5-2 16:07:57 | 显示全部楼层 |阅读模式
定时任务发送邮件显示 认证失败的用户名或者密码,应该怎么解决?


public void execute(JobExecutionContext arg0) throws JobExecutionException {
                run();
        }

        public void run() {
                List<LfzMaterialsAlertEntity> listAlert = getAlertList();
                for (LfzMaterialsAlertEntity alertEntity : listAlert) {
                        if (alertEntity.getAlertStatus() != null && alertEntity.getAlertStatus().equals(AlertStaus.ON)) {
                                LfzFMaterialsEntity materials = getMaterialsList(alertEntity.getMerchandiseNo(),
                                                alertEntity.getCompanyId());
                                if (materials != null) {
                                        double productSum = materials.getProductSum();
                                        double min = alertEntity.getMaterialsMin();
                                        if (productSum <= min) {
                                                sendMessage(materials);
                                        }
                                }
                        }
                }
        }

        /**
         * 发送消息
         */
        public void sendMessage(LfzFMaterialsEntity materials) {
                List<TSUser> list = getUserList(materials.getCompanyId());
                for (TSUser user : list) {
                        if ( /*(user.getUserType().equals(RoleType.Master) || user.getUserType().equals(RoleType.WarehouseMng))&&*/ user.getDepartid().equals(materials.getCompanyId())
                                         ) {
                                Map<String, Object> map = new HashMap<String, Object>();
                                map.put("id", materials.getId());
                                TuiSongMsgUtil.sendMessage(materials.getProduct(), "2", "KCTX", map, "516281013@qq.com");
                                tSSmsService.send();
                                user = null;
                        }
                }
        }
       

发表于 2018-5-2 18:25:21 | 显示全部楼层
配置文件改了吗,默认的邮箱账号
 楼主| 发表于 2018-5-3 08:40:34 | 显示全部楼层
admin 发表于 2018-5-2 18:25
配置文件改了吗,默认的邮箱账号

有修改配置的文档么?是哪个配置文件?
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

快速回复 返回顶部 返回列表