Commit fa0dfce1 by Kim Gyeongeun

#56952 設問設定機能追加

#56951 性別の選択肢を追加
#56954 メールアドレスの種別変更
parent 7d46402a
......@@ -142,7 +142,7 @@ public class MemberEditAction extends AbstractAction {
}
// メールアドレス登録チェック
if(StringUtil.isBlank(memberEditForm.mainPcEmail) && StringUtil.isBlank(memberEditForm.subPcEmail)) {
if(StringUtil.isBlank(memberEditForm.mainPcEmail)) {
ActionMessages messages = (ActionMessages)request.getAttribute(Globals.ERROR_KEY);
......@@ -156,32 +156,21 @@ public class MemberEditAction extends AbstractAction {
}
//携帯メールチェック
if (!StringUtil.isBlank(memberEditForm.subPcEmail)) {
if (!SinaburoUtil.mobileAddressCheck(memberEditForm.subPcEmail)) {
ActionMessages messages = (ActionMessages)request.getAttribute(Globals.ERROR_KEY);
if (messages == null) {
messages = new ActionMessages();
}
messages.add("subPcEmail", new ActionMessage(SinaburoViewUtil.getMessage("errors.email",SinaburoViewUtil.getMessage("labels.mbMail"))));
request.setAttribute(Globals.ERROR_KEY, messages);
return "/admin/member/memberEdit.html";
}
}
// if (!StringUtil.isBlank(memberEditForm.subPcEmail)) {
// if (!SinaburoUtil.mobileAddressCheck(memberEditForm.subPcEmail)) {
// ActionMessages messages = (ActionMessages)request.getAttribute(Globals.ERROR_KEY);
// if (messages == null) {
// messages = new ActionMessages();
// }
// messages.add("subPcEmail", new ActionMessage(SinaburoViewUtil.getMessage("errors.email",SinaburoViewUtil.getMessage("labels.mbMail"))));
// request.setAttribute(Globals.ERROR_KEY, messages);
// return "/admin/member/memberEdit.html";
// }
// }
//メールアドレス重複チェックPCメール
if (!memberEditForm.mainPcEmail.trim().equals(memberEditForm.mainPcEmailBefore)) {
if (!StringUtil.isBlank(memberEditForm.mainPcEmail)) {
if (SinaburoUtil.mobileAddressCheck(memberEditForm.mainPcEmail)) {
ActionMessages messages = (ActionMessages)request.getAttribute(Globals.ERROR_KEY);
if (messages == null) {
messages = new ActionMessages();
}
messages.add("mainPcEmail", new ActionMessage(SinaburoViewUtil.getMessage("errors.email",SinaburoViewUtil.getMessage("labels.pcMail"))));
request.setAttribute(Globals.ERROR_KEY, messages);
return "/admin/member/memberEdit.html";
}
memberInfo = memberService.findByMainPcEmail(memberEditForm.mainPcEmail);
if (memberInfo != null) {
ActionMessages messages = (ActionMessages)request.getAttribute(Globals.ERROR_KEY);
......
......@@ -51,13 +51,13 @@ public class MemberEditForm {
public String lastNameKana;
//@Required(msg=@Msg(key="errors.required"), arg0=@Arg(key="labels.pcMail"))
@Maxlength(maxlength=64, msg=@Msg(key="errors.maxlength"), arg0=@Arg(key="labels.pcMail"))
@Mask(mask = "^[!-~]+@[!-~]+$", msg = @Msg(key = "errors.email"),arg0=@Arg(key="labels.pcMail"))
@Maxlength(maxlength=64, msg=@Msg(key="errors.maxlength"), arg0=@Arg(key="labels.mainPcEmail"))
@Mask(mask = "^[!-~]+@[!-~]+$", msg = @Msg(key = "errors.email"),arg0=@Arg(key="labels.mainPcEmail"))
public String mainPcEmail;
//@Required(msg=@Msg(key="errors.required"), arg0=@Arg(key="labels.mbMail"))
@Maxlength(maxlength=64, msg=@Msg(key="errors.maxlength"), arg0=@Arg(key="labels.mbMail"))
@Mask(mask = "^[!-~]+@[!-~]+$",msg = @Msg(key = "errors.email"),arg0=@Arg(key="labels.mbMail"))
@Maxlength(maxlength=64, msg=@Msg(key="errors.maxlength"), arg0=@Arg(key="labels.subPcEmail"))
@Mask(mask = "^[!-~]+@[!-~]+$",msg = @Msg(key = "errors.email"),arg0=@Arg(key="labels.subPcEmail"))
public String subPcEmail;
@Mask(mask = "^[0-9]{7}$",msg=@Msg(key="errors.invalid"), arg0=@Arg(key="labels.zipCode"))
......
......@@ -41,13 +41,13 @@ public class UserEditForm {
public String lastNameKana;
//@Required(msg=@Msg(key="errors.required"), arg0=@Arg(key="labels.pcMail"))
@Maxlength(maxlength=64, msg=@Msg(key="errors.maxlength"), arg0=@Arg(key="labels.mainPcMail"))
@Mask(mask = "^[!-~]+@[!-~]+$",msg = @Msg(key = "errors.email"), arg0=@Arg(key="labels.mainPcMail"))
@Maxlength(maxlength=64, msg=@Msg(key="errors.maxlength"), arg0=@Arg(key="labels.mainPcEmail"))
@Mask(mask = "^[!-~]+@[!-~]+$",msg = @Msg(key = "errors.email"), arg0=@Arg(key="labels.mainPcEmail"))
public String mainPcEmail;
//@Required(msg=@Msg(key="errors.required"), arg0=@Arg(key="labels.mbMail"))
@Maxlength(maxlength=64, msg=@Msg(key="errors.maxlength"), arg0=@Arg(key="labels.subPcMail"))
@Mask(mask = "^[!-~]+@[!-~]+$",msg = @Msg(key = "errors.email"), arg0=@Arg(key="labels.subPcMail"))
@Maxlength(maxlength=64, msg=@Msg(key="errors.maxlength"), arg0=@Arg(key="labels.subPcEmail"))
@Mask(mask = "^[!-~]+@[!-~]+$",msg = @Msg(key = "errors.email"), arg0=@Arg(key="labels.subPcEmail"))
public String subPcEmail;
@Maxlength(maxlength=64, msg=@Msg(key="errors.maxlength"), arg0=@Arg(key="labels.email"))
......
......@@ -278,16 +278,14 @@ public class MemberService extends AbstractService<Member> {
values.add("%"+memberSearchForm.lastNameKana.trim().replace("%", "\\%")+"%");
flg = true;
}
if (!StringUtil.isBlank(memberSearchForm.mainPcEmail)) {
// E-mail(メイン)又はE-mail(サブ)検索
if (!StringUtil.isBlank(memberSearchForm.searchPcEmail)) {
if (flg) sql.append(" and ");
sql.append("main_pc_email like ? ");
values.add("%"+memberSearchForm.mainPcEmail.trim().replace("%", "\\%")+"%");
flg = true;
}
if (!StringUtil.isBlank(memberSearchForm.subPcEmail)) {
if (flg) sql.append(" and ");
sql.append("sub_pc_email like ? ");
values.add("%"+memberSearchForm.subPcEmail.trim().replace("%", "\\%")+"%");
sql.append("(main_pc_email like ? ");
values.add("%"+memberSearchForm.searchPcEmail.trim().replace("%", "\\%")+"%");
sql.append(" or sub_pc_email like ? ");
values.add("%"+memberSearchForm.searchPcEmail.trim().replace("%", "\\%")+"%");
sql.append(")");
flg = true;
}
if (!StringUtil.isBlank(memberSearchForm.telNo)) {
......
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