会员中心修改

main
tamguo 7 years ago
parent e9ab99c12a
commit 501330a1f6

@ -65,9 +65,6 @@ public class SystemConstant {
/** 短信找回密码前缀*/
public static final String ALIYUN_MOBILE_SMS_PREFIX = "MOBILE_SMS_PREKEY_";
/** 邮箱找回密码前缀*/
public static final String ALIYUN_MAIL_FIND_PASSWORD_PREFIX = "EMAIL_FIND_PASSWORD_";
/** 默认会员头像*/
public static final String DEFAULT_MEMBER_AVATAR = "/images/avatar.png";
@ -85,4 +82,22 @@ public class SystemConstant {
/** 所有地区*/
public static final String AREA_ALL_TREE = "AREAALL:";
/** ALIYUN*/
public static final String ALIYUN_SMTP_HOST_NAME = "smtp.aliyun.com";
/** ALIYUN*/
public static final int ALIYUN_SMTP_HOST_PORT = 465;
/** ALIYUN*/
public static final String ALIYUN_MAIL_ACCOUNT = "candy.tam@aliyun.com";
/** ALIYUN*/
public static final String ALIYUN_MAIL_PASSWORD = "tanguo520pig";
/** 邮件主题*/
public static final String ALIYUN_MAIL_SUBJECT_FINDPASSWORD = "探果网找回密码";
/** 邮箱找回密码前缀*/
public static final String ALIYUN_MAIL_FIND_PASSWORD_PREFIX = "EMAIL_FIND_PASSWORD_";
}

@ -34,13 +34,13 @@ public class PaperCrawler {
// 140000 山西 | 350000 福建 | 340000 安徽 | 220000 吉林 | 150000 内蒙古 | 640000 宁夏 | 650000 新疆 | 广西 450000 | 210000 辽宁
// 230000 黑龙江 | 610000 陕西 | 360000 江西 | 440000 广东 | 430000 湖南 | 460000 海南 | 530000 云南 | 510000 四川 | 630000 青海
// 620000 甘肃 | 130000 河北 | 540000 西藏 | 贵州 520000
private final String AREA_ID = "450000";
private final String AREA_ID = "230000";
// 年份
private final String YEAR = "2017";
private final String YEAR = "2016";
// 真题试卷 类型(1:真题试卷,2:模拟试卷,3:押题预测,4:名校精品)
private final String PAPER_TYPE = "2";
private final String PAPER_TYPE = "4";
// 开始采集的URL
private final String START_URL = "https://tiku.baidu.com/tikupc/paperlist/1bfd700abb68a98271fefa04-20-4-2017-1111-1-download";
private final String START_URL = "https://tiku.baidu.com/tikupc/paperlist/1bfd700abb68a98271fefa04-20-7-2016-1247-1-download";
private RunData runData;

@ -0,0 +1,16 @@
package com.tamguo.web;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.servlet.ModelAndView;
@Controller
public class AccountController {
@RequestMapping(value = {"account.html"}, method = RequestMethod.GET)
public ModelAndView list(ModelAndView model) {
model.setViewName("account");
return model;
}
}

@ -0,0 +1,34 @@
package com.tamguo.web;
import org.apache.commons.mail.EmailException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import com.tamguo.common.utils.Result;
import com.tamguo.common.utils.SystemConstant;
import com.tamguo.modules.sys.service.IEmailService;
@Controller
public class EmailController {
@Autowired
private IEmailService iEmailService;
@RequestMapping(value = {"sendFindPasswordEmail"}, method = RequestMethod.GET)
@ResponseBody
public Result sendFindPasswordEmail(String email){
try {
Integer result = iEmailService.sendFindPasswordEmail(email , SystemConstant.ALIYUN_MAIL_SUBJECT_FINDPASSWORD);
if(result == 0){
return Result.result(200, null, "服务器异常");
}
} catch (EmailException e) {
e.printStackTrace();
}
return Result.result(500, null, "服务器异常");
}
}

@ -0,0 +1,106 @@
@charset "utf-8";
body { font-family: "Microsoft Yahei"; color: #333;background:#f5f5f6}
em, i { font-style: normal; }
.start{color: red}
.hide-text{ overflow: hidden;white-space: nowrap;text-overflow: ellipsis;}
.well{height: 10px;background: #f5f5f6;width: 340px;position: relative;left: -10px;}
.cnav { height: 98px; width: 100%; background: url(../../images/project-cnavbj.jpg) no-repeat; background-size: cover; }
.cnav_b { position: relative; }
.cnav_left { float: left; width: 162px; height: 54px; margin: 22px 0 0 46px; font-size: 18px; color: #fff; line-height: 54px; background: url(../../images/test-paper/top-kaos.png) no-repeat; padding-left: 55px; }
.cnav_right { float: left; width:728px; height: 5px; background: url(../../images/project-cnav.png) repeat-x; margin: 47px 0 0 0; }
.cnav_right ul { position: absolute; top: 30px; left: 230px; }
.cnav_right ul li { width: 120px; height: 50px; float: left; font-size: 14px; color: #fff; text-align: center; line-height: 12px; margin-left: 32px; }
.cnav_right ul li span { font-size: 12px; font-weight: bold; width: 27px; height: 27px; color: #29bdb9; display: block; margin: 5px auto 5px auto; text-align: center; line-height: 27px; background: url(../../images/project-candidate.png) no-repeat -26px 0; }
.cnavX { background: url(../../images/project-candidate.png) no-repeat -61px -39px; width: 17px; height: 17px; position: absolute; top: 12px; left: 1082px; cursor: pointer; }
.cnav_right ul li .Cnav_t { background: url(../../images/project-candidate.png) no-repeat -54px 0; width: 37px; height: 37px; line-height: 37px; margin: 0 auto; }
.contentBox{margin-top: 20px;font-size: 14px;overflow: hidden;}
.acphoto {
display: inline-block;
position: relative;
/*padding: 0 2em;*/
border: none;
border-radius: 80px;
height: 80px;
width: 80px;
background: #eee;
color: #fff;
font-size: 14px;
line-height: 28px;
text-decoration: none;
cursor: pointer;
float: left;
}
.up_photo{
display: inline-block;
position: relative;
padding: 0 2em;
/*border: none;*/
border: 1px solid #29bdb9;
border-radius: 0px;
background: #29bdb9;
color: #fff;
font-size: 14px;
line-height: 28px;
text-decoration: none;
cursor: pointer;
margin-top: 15px;
}
.mybtn{
float: left;
margin-left: 10px;
padding-top: 10px;
}
.contentBox{margin-top: 20px;font-size: 14px;overflow: hidden;}
.contentBox .navLeft{float: left;display: inline-block;width: 16.4%;background:rgb(41,186,185);}
.contentBox .navLeft dl{}
.contentBox .navLeft dl dt{height: 40px;line-height: 40px;background:rgb(37,172,169);padding-left: 10px;font-size: 14px;color:white;cursor: pointer; }
.icon-w{float: right;position: relative;top: 50%;transform: translateY(-50%);margin-right: 10px;}
.icon-f{margin-right: 10px;}
.contentBox .navLeft dl dd{text-align: center;;color: white;height: 40px;line-height: 40px;cursor: pointer; }
.contentBox .navLeft dl dd a{color: white}
.contentBox .newsRight{float: left;display: inline-block;width:83%;background:white;min-height: 279px;}
.user_list{padding: 0px;}
.info-cnt{padding-top:0px;background: #f5f5f6; }
.photoBox{display: none;}
.navLeft dl dd i {width: 17px;height: 14px;display: inline-block;background: url(../../images/icon-erro.png) no-repeat;margin: 0px 4px;position: relative;top: 1px;margin-left: 0px;
}
.icon-h {
font-size: 14px;
position: relative;
margin-right: 10px;
}
.acm-container{/*position: relative;top: -20px;*/padding-bottom: 200px;}
.info-cnt {
padding-top:0px;
padding-bottom:0px;
}
.footer{margin-top: 0px!important;}
.headlogotable{float: right;}
.info-rBox{padding-bottom: 40px!important;}
.navLeft .list a dd:hover{background:#52cdc8}
.contentBox .navLeft dl dt:hover{background:#52cdc8 }
.head .logo {
padding-top: 0px;
float: left;
display: -webkit-box;
line-height: 59px;
}
.head .logo a{
max-width: 120px;
height: 55px;
line-height: 55px;
text-align: center;
display: block;
}
.head .logo img{
float: none;
max-width: 100%;
max-height: 100%
}
.head .logo p {
float: none;
line-height: 59px;
padding-left: 12px;
}
.weixinPng:hover img:nth-child(2){display: block}

@ -31,7 +31,7 @@ $(function(){
// 发送短信
$.ajax({
type : "get",
url : mainHttp + "sms/sendFindPasswordSms.html",
url : mainHttp + "sendFindPasswordSms",
async : false,
data:{mobile:$("input[name='mobile']").val()},
dataType : "json",
@ -43,7 +43,7 @@ $(function(){
// 发送邮件
$.ajax({
type : "get",
url : mainHttp + "email/sendFindPasswordEmail.html",
url : mainHttp + "sendFindPasswordEmail",
async : false,
data:{email:$("input[name='email']").val()},
dataType : "json",

@ -0,0 +1,97 @@
<!DOCTYPE html>
<html lang="Zh-hans" xmlns:th="http://www.thymeleaf.org">
<head>
<meta charset="UTF-8">
<title>个人信息 - 探果网</title>
<link rel="stylesheet" th:href="${domainName + 'static/css/reset.css' }" />
<link rel="stylesheet" th:href="${domainName + 'static/css/member/booklist.css' }" />
<link rel="stylesheet" th:href="${domainName + 'static/css/member/memberMain.css'}" />
<link rel="stylesheet" th:href="${domainName + 'static/css/amazeui/css/amazeui.css'}">
<link type="favicon" rel="shortcut icon" th:href="${domainName + 'static/images/favicon.png'}" />
<!-- 引入样式 -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/element-ui@2.4.2/lib/theme-chalk/index.css">
<style>
.avatar-uploader .el-upload {
border: 1px dashed #d9d9d9;
border-radius: 6px;
cursor: pointer;
position: relative;
overflow: hidden;
}
.avatar-uploader .el-upload:hover {
border-color: #409EFF;
}
.avatar-uploader-icon {
font-size: 28px;
color: #8c939d;
width: 178px;
height: 178px;
line-height: 178px;
text-align: center;
}
.avatar {
width: 178px;
height: 178px;
display: block;
}
</style>
</head>
<body>
<!-- 头部-->
<div class="head" th:fragment="memberHeader">
<div class="head-bar public">
<div class="logo">
<a th:href="${tamguoDomainName}">
<img th:src="${domainName + 'static/images/logo_731bc32.png'}">
</a>
<p><span>考试中心</span></p>
</div>
<ul class="nav">
<li><a th:href="${domainName + 'index.html'}">首页</a></li>
<li class="active"><a th:href="${domainName + 'booklist.html'}">书籍</a></li>
<li><a th:href="${domainName + 'account.html'}">帐号</a></li>
</ul>
<div class="mguser">
<div class="mguser-box">
<span th:text="${session.currMember.username}">tamguo</span>
<a th:href="${domainName + 'logout.html'}">退出</a>
</div>
</div>
</div>
</div>
<div class="banner_list">
<div class="cnav">
<div class="public cnav_b">
<div class="cnav_left">
探果五步曲
</div>
<div class="cnav_right">
<ul>
<li><span class="Cnav_t">1</span><b>新建书籍</b></li>
<li><span>2</span>添加章节</li>
<li><span>3</span>添加内容</li>
<li><span>4</span>发布试卷</li>
<li><span>5</span>等待收益</li>
</ul>
</div>
</div>
</div>
</div>
<div id="container" class="plist test_public prof_t ng-scope">
</div>
<!-- 尾部-->
<div th:replace="include/footer :: footer"></div>
</body>
<!-- 引入组件库 -->
<script src="https://cdn.jsdelivr.net/npm/vue@2.5.16"></script>
<script src="https://cdn.jsdelivr.net/npm/axios@0.18.0/dist/axios.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/element-ui@2.4.2/lib/index.js"></script>
<script type="text/javascript" th:inline="javascript">
var mainHttp = [[${domainName}]];
var bookDomainName = [[${bookDomainName}]];
</script>
</html>

@ -162,7 +162,7 @@
<div class="form-group">
<label class="col-sm-2 control-label">文档名称 <span class="error-message">*</span></label>
<div class="col-sm-10">
<input type="text" name="name" id="documentName" placeholder="文档名称" class="form-control" maxlength="50">
<input type="text" name="name" id="documentName" placeholder="文档名称" class="form-control" maxlength="200">
</div>
</div>
<div class="form-group">
@ -362,7 +362,7 @@
<div class="form-group">
<label class="col-sm-2 control-label">模板名称 <span class="error-message">*</span></label>
<div class="col-sm-10">
<input type="text" name="template_name" id="templateName" placeholder="模板名称" class="form-control" maxlength="50">
<input type="text" name="template_name" id="templateName" placeholder="模板名称" class="form-control" maxlength="200">
</div>
</div>

@ -5,23 +5,23 @@
<title>找回密码_探果网</title>
<meta name="description" content="探果网携手高校名师为考生提供高效的智能备考服务,涵括领域有高考、财会类、建筑工程、职业资格、医卫类、计算机类和学历类等热门考试题库。拥有高校名师丰富的经验,优质的学习资料和备考全阶段的高效服务,助您丰富自我,不断前行!"/>
<meta name="keyword" content="探果网,高校名师,名师专访,名师教案,名师课堂试题库,试卷库,智能题库,历年真题,模拟试题,押题,预测试题,高考,会计证,会计从业,会计师,经济师,施工员,建造师,建筑师,造价师,职业资格,证券资格,考研,计算机考试,建筑考试,财会类,医卫类,护士资格,公务员,知识点,试题,试卷"/>
<link rel="stylesheet" th:href="${setting.domain + 'static/css/reset.css'}" />
<link rel="stylesheet" th:href="${setting.domain + 'static/css/password/resetPassword.css'}" />
<link type="favicon" rel="shortcut icon" th:href="${setting.domain + 'static/images/favicon.png'}" />
<link rel="stylesheet" th:href="${domainName + 'static/css/reset.css'}" />
<link rel="stylesheet" th:href="${domainName + 'static/css/password/resetPassword.css'}" />
<link type="favicon" rel="shortcut icon" th:href="${domainName + 'static/images/favicon.png'}" />
</head>
<body>
<div id="wrapper" class="">
<div id="head">
<div class="mod-header">
<a th:href="${setting.domain + 'login.html'}"><img th:src="${setting.domain + 'static/images/logo_731bc32.png'}" alt="logo"></a>
<a th:href="${domainName + 'login.html'}"><img th:src="${domainName + 'static/images/logo_731bc32.png'}" alt="logo"></a>
</div>
<ul class="mod-userbar">
<li>
<a id="mod-userbar-login" th:href="${setting.domain + 'login.html'}">登录</a>
<a id="mod-userbar-login" th:href="${domainName + 'login.html'}">登录</a>
</li>
<li>|</li>
<li>
<a th:href="${setting.domain + 'register.html'}">注册</a>
<a th:href="${domainName + 'register.html'}">注册</a>
</li>
</ul>
</div>
@ -41,7 +41,7 @@
</ul>
<div class="mod-step-detail">
<p class="step-form-tip m_l80">您正在找回的帐号是:喜欢吃鱼的果果</p>
<form th:action="${setting.domain + 'password/resetPassword.html'}" method="post" id="form-resetpwd">
<form th:action="${domainName + 'password/resetPassword.html'}" method="post" id="form-resetpwd">
<div class="pass-input-container clearfix">
<label class="pass-input-title l-h40" for="password">新密码</label>
<input type="password" class="pass-input pass-input-forgot left" name="password" id="password" value="" autocomplete="off">
@ -85,6 +85,6 @@
</div>
</body>
<script type="text/javascript" th:src="${setting.domain + 'static/js/jquery-1.8.3.min.js'}"></script>
<script type="text/javascript" th:src="${setting.domain + 'static/js/password/resetPassword.js'}"></script>
<script type="text/javascript" th:src="${domainName + 'static/js/jquery-1.8.3.min.js'}"></script>
<script type="text/javascript" th:src="${domainName + 'static/js/password/resetPassword.js'}"></script>
</html>

@ -5,23 +5,23 @@
<title>修改密码_探果网</title>
<meta name="description" content="探果网携手高校名师为考生提供高效的智能备考服务,涵括领域有高考、财会类、建筑工程、职业资格、医卫类、计算机类和学历类等热门考试题库。拥有高校名师丰富的经验,优质的学习资料和备考全阶段的高效服务,助您丰富自我,不断前行!"/>
<meta name="keyword" content="探果网,高校名师,名师专访,名师教案,名师课堂试题库,试卷库,智能题库,历年真题,模拟试题,押题,预测试题,高考,会计证,会计从业,会计师,经济师,施工员,建造师,建筑师,造价师,职业资格,证券资格,考研,计算机考试,建筑考试,财会类,医卫类,护士资格,公务员,知识点,试题,试卷"/>
<link rel="stylesheet" th:href="${setting.domain + 'static/css/reset.css'}" />
<link rel="stylesheet" th:href="${setting.domain + 'static/css/password/resetPwSuccess.css'}" />
<link type="favicon" rel="shortcut icon" th:href="${setting.domain + 'static/images/favicon.png'}" />
<link rel="stylesheet" th:href="${domainName + 'static/css/reset.css'}" />
<link rel="stylesheet" th:href="${domainName + 'static/css/password/resetPwSuccess.css'}" />
<link type="favicon" rel="shortcut icon" th:href="${domainName + 'static/images/favicon.png'}" />
</head>
<body>
<div id="wrapper" class="">
<div id="head">
<div class="mod-header">
<a th:href="${setting.domain + 'login.html'}"><img th:src="${setting.domain + 'static/images/logo_731bc32.png'}" alt="logo"></a>
<a th:href="${domainName + 'login.html'}"><img th:src="${domainName + 'static/images/logo_731bc32.png'}" alt="logo"></a>
</div>
<ul class="mod-userbar">
<li>
<a id="mod-userbar-login" th:href="${setting.domain + 'login.html'}">登录</a>
<a id="mod-userbar-login" th:href="${domainName + 'login.html'}">登录</a>
</li>
<li>|</li>
<li>
<a th:href="${setting.domain + 'register.html'}">注册</a>
<a th:href="${domainName + 'register.html'}">注册</a>
</li>
</ul>
</div>
@ -42,9 +42,9 @@
<div class="mod-step-detail">
<div class="result-info">
<div class="result-message">
<img th:src="${setting.domain + 'static/images/password/success_icon.png'}">
<img th:src="${domainName + 'static/images/password/success_icon.png'}">
<span>恭喜,探果帐号喜欢吃鱼的果果重置密码成功</span>
<a class="button result-title-btn" th:href="${setting.domain + 'login.html'}">直接登录</a>
<a class="button result-title-btn" th:href="${domainName + 'login.html'}">直接登录</a>
</div>
<div class="result-list-content">
<span class="result-content-msg">以下为您最近2次的操作记录请仔细检查手机及邮箱如非本人所有可通过帐号申诉更换。</span>

@ -62,6 +62,11 @@
<artifactId>shiro-ehcache</artifactId>
<version>1.2.5</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-email</artifactId>
<version>1.5</version>
</dependency>
</dependencies>
<build>

@ -210,12 +210,11 @@ public class MemberService extends ServiceImpl<MemberMapper, MemberEntity> imple
return memberMapper.selectById(uid);
}
@SuppressWarnings("unchecked")
@Transactional(readOnly=true)
@Override
public MemberEntity findByUsername(String username) {
MemberEntity condition = new MemberEntity();
condition.setUsername(username);
return memberMapper.selectOne(condition);
return this.selectOne(Condition.create().eq("username", username).or().eq("mobile", username).or().eq("email", username));
}
@Transactional(readOnly=false)

@ -0,0 +1,9 @@
package com.tamguo.modules.sys.service;
import org.apache.commons.mail.EmailException;
public interface IEmailService {
public Integer sendFindPasswordEmail(String email , String subject) throws EmailException;
}

@ -0,0 +1,37 @@
package com.tamguo.modules.sys.service.impl;
import org.apache.commons.mail.EmailException;
import org.apache.commons.mail.HtmlEmail;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.tamguo.common.utils.SystemConstant;
import com.tamguo.config.redis.CacheService;
import com.tamguo.modules.sys.service.IEmailService;
@Service
public class EmailService implements IEmailService{
@Autowired
private CacheService cacheService;
@Override
public Integer sendFindPasswordEmail(String email , String subject) throws EmailException {
HtmlEmail mail = new HtmlEmail();
mail.setHostName(SystemConstant.ALIYUN_SMTP_HOST_NAME);
mail.setSmtpPort(SystemConstant.ALIYUN_SMTP_HOST_PORT);
mail.setAuthentication(SystemConstant.ALIYUN_MAIL_ACCOUNT, SystemConstant.ALIYUN_MAIL_PASSWORD);
mail.setSSLOnConnect(true);
mail.setFrom(SystemConstant.ALIYUN_MAIL_ACCOUNT, "探果网");
mail.addTo(email);
mail.setSubject(subject);
mail.setCharset("UTF-8");
Integer vcode = (int) ((Math.random()*9+1)*100000);
mail.setHtmlMsg("探果网找回密码验证码:"+vcode);
mail.send();
cacheService.setObject(SystemConstant.ALIYUN_MAIL_FIND_PASSWORD_PREFIX + email , vcode.toString() , 3 * 60);
return 0;
}
}

@ -27,7 +27,7 @@
and u.login_code = #{loginCode}
</if>
<if test="userName != null and userName != ''">
and u.user_name = #{userName}
and u.username = #{userName}
</if>
<if test="email != null and email != ''">
and u.email = #{email}

Loading…
Cancel
Save