Commit 16e32420 by Kim Gyeongeun

#56954 メールアドレスの種別変更

parent fa0dfce1
......@@ -11,6 +11,7 @@ import java.util.List;
import javax.mail.MessagingException;
import org.apache.commons.collections.CollectionUtils;
import org.apache.log4j.Logger;
import org.apache.struts.Globals;
import org.apache.struts.action.ActionMessage;
......@@ -134,6 +135,7 @@ public class MemberEditAction extends AbstractAction {
public String confirm() {
Member memberInfo = null;
List<Member> memberList = null;
if (memberEditForm.withDrawFlg != null) {
memberEditForm.withDrawFlg = "1";
......@@ -155,6 +157,18 @@ public class MemberEditAction extends AbstractAction {
return "/admin/member/memberEdit.html";
}
if (StringUtil.isNotBlank(memberEditForm.subPcEmail) && memberEditForm.mainPcEmail.equals(memberEditForm.subPcEmail)) {
ActionMessages messages = (ActionMessages)request.getAttribute(Globals.ERROR_KEY);
if (messages == null) {
messages = new ActionMessages();
}
messages.add("dupEmail", new ActionMessage(SinaburoViewUtil.getMessage("errors.E071")));
request.setAttribute(Globals.ERROR_KEY, messages);
return "/user/userEdit/uEdit.html";
}
//携帯メールチェック
// if (!StringUtil.isBlank(memberEditForm.subPcEmail)) {
// if (!SinaburoUtil.mobileAddressCheck(memberEditForm.subPcEmail)) {
......@@ -171,8 +185,8 @@ public class MemberEditAction extends AbstractAction {
//メールアドレス重複チェックPCメール
if (!memberEditForm.mainPcEmail.trim().equals(memberEditForm.mainPcEmailBefore)) {
if (!StringUtil.isBlank(memberEditForm.mainPcEmail)) {
memberInfo = memberService.findByMainPcEmail(memberEditForm.mainPcEmail);
if (memberInfo != null) {
memberList = memberService.findByEmail(memberEditForm.mainPcEmail);
if (CollectionUtils.isNotEmpty(memberList)) {
ActionMessages messages = (ActionMessages)request.getAttribute(Globals.ERROR_KEY);
if (messages == null) {
messages = new ActionMessages();
......@@ -189,8 +203,8 @@ public class MemberEditAction extends AbstractAction {
if (memberEditForm.withDrawFlgBefore.equals(SinaburoConstant.MemberDelFlg.DEL) && memberEditForm.withDrawFlg.equals(SinaburoConstant.MemberDelFlg.NOT_DEL)) {
if (!StringUtil.isBlank(memberEditForm.mainPcEmail)) {
memberInfo = memberService.findByMainPcEmail(memberEditForm.mainPcEmail);
if (memberInfo != null) {
memberList = memberService.findByEmail(memberEditForm.mainPcEmail);
if (CollectionUtils.isNotEmpty(memberList)) {
ActionMessages messages = (ActionMessages)request.getAttribute(Globals.ERROR_KEY);
if (messages == null) {
messages = new ActionMessages();
......@@ -208,14 +222,14 @@ public class MemberEditAction extends AbstractAction {
if (!memberEditForm.subPcEmail.trim().equals(memberEditForm.subPcEmailBefore)) {
if (!StringUtil.isBlank(memberEditForm.subPcEmail)) {
memberInfo = memberService.findBySubPcEmail(memberEditForm.subPcEmail);
if (memberInfo != null) {
memberList = memberService.findByEmail(memberEditForm.subPcEmail);
if (CollectionUtils.isNotEmpty(memberList)) {
ActionMessages messages = (ActionMessages)request.getAttribute(Globals.ERROR_KEY);
if (messages == null) {
messages = new ActionMessages();
}
messages.add("subPcEmail", new ActionMessage(SinaburoViewUtil.getMessage("errors.E015")));
messages.add("subPcEmail", new ActionMessage(SinaburoViewUtil.getMessage("errors.E014")));
request.setAttribute(Globals.ERROR_KEY, messages);
return "/admin/member/memberEdit.html";
}
......@@ -224,13 +238,13 @@ public class MemberEditAction extends AbstractAction {
if (memberEditForm.withDrawFlgBefore.equals(SinaburoConstant.MemberDelFlg.DEL) && memberEditForm.withDrawFlg.equals(SinaburoConstant.MemberDelFlg.NOT_DEL)) {
if (!StringUtil.isBlank(memberEditForm.subPcEmail)) {
memberInfo = memberService.findBySubPcEmail(memberEditForm.subPcEmail.trim());
if (memberInfo != null) {
memberList = memberService.findByEmail(memberEditForm.subPcEmail.trim());
if (CollectionUtils.isNotEmpty(memberList)) {
ActionMessages messages = (ActionMessages)request.getAttribute(Globals.ERROR_KEY);
if (messages == null) {
messages = new ActionMessages();
}
messages.add("subPcEmail", new ActionMessage(SinaburoViewUtil.getMessage("errors.E015")+SinaburoViewUtil.getMessage("errors.E049")));
messages.add("subPcEmail", new ActionMessage(SinaburoViewUtil.getMessage("errors.E014")+SinaburoViewUtil.getMessage("errors.E049")));
request.setAttribute(Globals.ERROR_KEY, messages);
return "/admin/member/memberEdit.html";
......@@ -271,8 +285,8 @@ public class MemberEditAction extends AbstractAction {
}
if (!StringUtil.isBlank(memberEditForm.mainPcEmail)) {
memberInfo = memberService.findByMainPcEmail(memberEditForm.mainPcEmail);
if (memberInfo != null) {
memberList = memberService.findByEmail(memberEditForm.mainPcEmail);
if (CollectionUtils.isNotEmpty(memberList)) {
ActionMessages messages = (ActionMessages)request.getAttribute(Globals.ERROR_KEY);
if (messages == null) {
messages = new ActionMessages();
......@@ -284,13 +298,13 @@ public class MemberEditAction extends AbstractAction {
}
}
if (!StringUtil.isBlank(memberEditForm.subPcEmail)) {
memberInfo = memberService.findBySubPcEmail(memberEditForm.subPcEmail);
if (memberInfo != null) {
memberList = memberService.findByEmail(memberEditForm.subPcEmail);
if (CollectionUtils.isNotEmpty(memberList)) {
ActionMessages messages = (ActionMessages)request.getAttribute(Globals.ERROR_KEY);
if (messages == null) {
messages = new ActionMessages();
}
messages.add("subPcEmail", new ActionMessage(SinaburoViewUtil.getMessage("errors.E015")+SinaburoViewUtil.getMessage("errors.E049")));
messages.add("subPcEmail", new ActionMessage(SinaburoViewUtil.getMessage("errors.E014")+SinaburoViewUtil.getMessage("errors.E049")));
request.setAttribute(Globals.ERROR_KEY, messages);
err = true;
//return "/admin/member/memberEdit.html";
......
......@@ -5,6 +5,7 @@ import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.List;
import org.apache.commons.collections.CollectionUtils;
import org.apache.log4j.Logger;
import org.apache.struts.Globals;
import org.apache.struts.action.ActionMessage;
......@@ -167,6 +168,7 @@ public class UserEditAction extends AbstractAction {
Member memberInfoSession = getMember();
Member memberInfo = null;
List<Member> memberList = null;
// メールアドレス登録チェック
if(StringUtil.isBlank(userEditForm.mainPcEmail)) {
......@@ -181,6 +183,18 @@ public class UserEditAction extends AbstractAction {
return "/user/userEdit/uEdit.html";
}
if (StringUtil.isNotBlank(userEditForm.subPcEmail) && userEditForm.mainPcEmail.equals(userEditForm.subPcEmail)) {
ActionMessages messages = (ActionMessages)request.getAttribute(Globals.ERROR_KEY);
if (messages == null) {
messages = new ActionMessages();
}
messages.add("dupEmail", new ActionMessage(SinaburoViewUtil.getMessage("errors.E071")));
request.setAttribute(Globals.ERROR_KEY, messages);
return "/user/userEdit/uEdit.html";
}
//携帯メールチェック
// if (!StringUtil.isBlank(userEditForm.subPcEmail)) {
......@@ -197,8 +211,8 @@ public class UserEditAction extends AbstractAction {
//メールアドレス重複チェックPCメール
if (!userEditForm.mainPcEmail.trim().equals(memberInfoSession.mainPcEmail)) {
memberInfo = memberService.findByMainPcEmail(userEditForm.mainPcEmail);
if (memberInfo != null) {
memberList = memberService.findByEmail(userEditForm.mainPcEmail);
if (CollectionUtils.isNotEmpty(memberList)) {
ActionMessages messages = (ActionMessages)request.getAttribute(Globals.ERROR_KEY);
if (messages == null) {
messages = new ActionMessages();
......@@ -213,14 +227,14 @@ public class UserEditAction extends AbstractAction {
//メールアドレス重複チェック携帯メール
if (!userEditForm.subPcEmail.trim().equals(memberInfoSession.subPcEmail)) {
if (!StringUtil.isBlank(userEditForm.subPcEmail)) {
memberInfo = memberService.findBySubPcEmail(userEditForm.subPcEmail);
if (memberInfo != null) {
memberList = memberService.findByEmail(userEditForm.subPcEmail);
if (CollectionUtils.isNotEmpty(memberList)) {
ActionMessages messages = (ActionMessages)request.getAttribute(Globals.ERROR_KEY);
if (messages == null) {
messages = new ActionMessages();
}
messages.add("subPcEmail", new ActionMessage(SinaburoViewUtil.getMessage("errors.E015")));
messages.add("subPcEmail", new ActionMessage(SinaburoViewUtil.getMessage("errors.E014")));
request.setAttribute(Globals.ERROR_KEY, messages);
return "/user/userEdit/uEdit.html";
}
......
......@@ -53,7 +53,7 @@ errors.E010=E-mail(\u30e1\u30a4\u30f3)\u306f\u5fc5\u9808\u3067\u3059\u3002
errors.E011=\u30d1\u30b9\u30ef\u30fc\u30c9\u304c\u4e00\u81f4\u3057\u307e\u305b\u3093\u3002
errors.E012=\u30ed\u30b0\u30a4\u30f3ID\u3082\u3057\u304f\u306f\u30d1\u30b9\u30ef\u30fc\u30c9\u304c\u4e0d\u6b63\u3067\u3059\u3002
errors.E013=\u73fe\u5728\u306e\u30dd\u30a4\u30f3\u30c8\u6570\u3088\u308a\u30dd\u30a4\u30f3\u30c8\u6d88\u8cbb\u6570\u304c\u5927\u304d\u3044\u3067\u3059\u3002
errors.E014=\u65e2\u306b\u767b\u9332\u6e08\u307f\u306e\u30d1\u30bd\u30b3\u30f3E-mail\u3067\u3059\u3002
errors.E014=\u65e2\u306b\u767b\u9332\u6e08\u307f\u306eE-mail\u3067\u3059\u3002
errors.E015=\u65e2\u306b\u767b\u9332\u6e08\u307f\u306e\u643a\u5e2f\u96fb\u8a71E-mail\u3067\u3059\u3002
errors.E016=\u65e2\u306b\u767b\u9332\u6e08\u307f\u306e\u30ed\u30b0\u30a4\u30f3ID\u3067\u3059\u3002
errors.E017=\u65e5\u5225\u306e\u691c\u7d22\u306f\u671f\u9593(from)\u3092\u5165\u529b\u3057\u3066\u304f\u3060\u3055\u3044\u3002
......@@ -112,6 +112,7 @@ errors.E067=ICHICO\u30dd\u30a4\u30f3\u30c8\u4f1a\u54e1\u756a\u53f7\u3092\u5165\u
errors.E068=ICHICO\u30dd\u30a4\u30f3\u30c8\u4f1a\u54e1\u756a\u53f7\u306f\u534a\u89d2\u6570\u5b57\u3067\u5165\u529b\u3057\u3066\u304f\u3060\u3055\u3044\u3002
errors.E069=ICHICO\u30dd\u30a4\u30f3\u30c8\u4f1a\u54e1\u756a\u53f7\u306f8\u6841\u3067\u5165\u529b\u3057\u3066\u304f\u3060\u3055\u3044\u3002
errors.E070=\u5f53\u6708\u306f\u65e2\u306b\u7533\u8acb\u6e08\u307f\u3067\u3059\u3002
errors.E071=E-mail(\u30e1\u30a4\u30f3)\u3068E-mail(\u30b5\u30d6)\u304c\u91cd\u8907\u3067\u3059\u3002
#\u30b7\u30b9\u30c6\u30e0
errors.S000=\u30b7\u30b9\u30c6\u30e0\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u307e\u3057\u305f\u3002
......
......@@ -120,6 +120,7 @@
<td class="listmenu"> E-mail(サブ)</td>
<td class="listcts">
<input type="text" size="40" name="subPcEmail" maxlength="128" value="$!escape.html($!{userEditForm.subPcEmail})">
<TABLE border="0" cellspacing="0" cellpadding="0"><TR><Td>$!tools.getMsg("subPcEmail")</Td></TR></TABLE>
</td>
</tr>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment