版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
@(apcs:@main("包机服务管理平台",header())<divclass="container-fluid"style="padding-top:<div<divclass="col-xs-10col-xs-offset-1<h3>机场代码信息<divclass="table-<tableclass="tabletable-<th>机场代码<th>城市<th>机场<th>操作@for(apc<-href="/del-airport-code/@apc.code?page=@page"class="btnbtn-danger}页页
<ulclass="pager">@if(page==0){<li><ahref="/apc-list?page=1">}<li><ahref="/apc-list?page=@(1)"><li><ahref="/apc-list?page=@(1)"><li><ahref="/apc-list?page=@(page+1)"}
}@(flight:models.flight.FlightInfo,fpics:List[models.flight.Flight_Pic],openid:String)@importutils.StringUtils@main("航班预定",header_m("<script$(varmobile_reg=/1[3-var_reg=/\w@@\w*\.\w/;varcompany=$("#company").val();varrealname=$("#realname").val();varmobile=$("#mobile").val();var=$("#").val();if(company==null||company==""){returnfalse;}elseif(realnamenull||realnamealert("请填写");return}elseif(mobilenull||mobilereturn}elseif(!mobile_reg.test(mobile)){returnfalse;}elseif(==null||==""){return}elseif(!_reg.test()){return
<divclass="container-fluid"style="padding-top:<div<divclass="col-xs-12col-sm- col-md-6col-lg-<h4>航班信息<div<tableclass="tabletable-hover"style="table-layout:fixed;word-break:break-<!--<td>航班类型<td>@if(flight.flight_type=="1")内}else{国际
</tr>--><tdclass="col-xs-3col-sm-2">机型}<tdclass="col-xs-3col-sm-2">出发日期@flight.start_date.substring(0,4)年@flight.start_date.substring(4,6)月@flight.start_date.substring(6,8<tdclass="col-xs-3col-sm-2">时间范围}<tdclass="col-xs-3col-sm-2">出发地<tdclass="col-xs-3col-sm-2">目的地<tdclass="col-xs-3col-sm-2">最大人数<tdclass="col-xs-3col-sm-2">价格}<tdclass="col-xs-3col-sm-2">描述<tdstyle="word-break:break-all;}<div<divclass="col-xs-12col-sm- col-md-6col-lg-<h4>航班信息@for(pic<-<divclass="col-xs-12 col-lg-8col-lg-offset-2"><imgclass="img-responsive"}}<div<divclass="col-xs- col-sm- col-md-6col-lg-<h4>预定信息<formclass="form-horizontalcol-xs-12 col-lg-12"method="post"<inputtype="hidden"
<inputtype="hidden"<divclass="form-<labelclass="control-labelcol-xs-for="company">公司<divclass="col-xs-<inputplaceholder="id="company"class="form-control"name="company"type="text"><pclass="help-<divclass="form-<labelclass="control-labelcol-xs-3"<divclass="col-xs-<inputplaceholder=""id="realname"class="form-control"name="realname"type="text"><pclass="help-<divclass="form-<labelclass="control-labelcol-xs-3<divclass="col-xs-<inputplaceholder="号"id="mobile"class="form-control"name="mobile"type="text"><pclass="help-<divclass="form-<labelclass="control-labelcol-xs-3for="">邮箱<divclass="col-xs-<inputplaceholder="邮箱"id=""class="form-control"name=""type="text"><pclass="help-<divclass="form-<labelclass="control-labelcol-xs-3for="mutil">联程
<divclass="col-xs-<inputplaceholder="联程航班"class="form-control"name="mutil"<divclass="form-<!--Button--<divclass="col-xs-6col-xs-offset-<buttonclass="btnbtn-success"预定type="reset">重填
<buttonclass="btnbtn-}@(flights:@main("包机服务管理平台",header())<divclass="container-fluid"style="padding-top:<div<divclass="col-xs-10col-xs-offset-1<h3>航班信息<divclass="table-<tableclass="tabletable-<!--<th>航班类型</th><th>机型<th>出发地 <th>出发地机场</th><th>目的地<!--<th>目的地机场</th><th>出发日期<th>时间范围<th>人数<!--<th>市场价</th><th>价<th>是否商务<th>是否特价<th>操作@for(flight<-"1"){国内}else{国际}</td>
<!--<td>@if(flight.flight_type<!--<td>@flight.sairport</td>--<!--<td>@flight.airport</td>--<!- <td>@flight.marketPrice</td>--<td>@if(flight.offen){是}else{否<td>@if(flight.sale){是}else{否href="/flight/del/@flight.code?page=@page"class="btnbtn-danger}一页一页
<ulclass="pager">@if(page==0){<li><ahref="/flight-list?page=1"}<li><ahref="/flight-list?page=@(1)"><li><ahref="/flight-list?page=@(1)"><li><ahref="/flight-list?page=@(page+1)"}
}<divclass="navbarnavbar-<divclass="navbar-<buttontype="button"class="navbar-toggle"data-target=".navbar-responsive-<spanclass="icon-<spanclass="icon-<spanclass="icon-<aclass="navbar-brand"href="#">包机服务管理平台<divclass="navbar-collapsecollapsenavbar-responsive-<ulclass="navnavbar-<liclass=""><ahref="/order-list">订单管理<li<ahref="#"class="dropdown-data-toggle="dropdown">包机服务<b<ulclass="dropdown-<li><ahref="/input-flight">录入航班<li><ahref="/flight-list">航班信息<li<ahref="#"class="dropdown-data-toggle="dropdown">机场代码<b<ulclass="dropdown-<li><ahref="/input-apc">录入机场<li><ahref="/apc-list">查看机场代码<liclass=""><ahref="/flight-config">设置</a></li><li<ahref="#"class="dropdown-data-toggle="dropdown">你好,管理员<b<ulclass="dropdown-<li><ahref="/logout">退出}<divclass="navbarnavbar-<divclass="navbar-<buttontype="button"class="navbar-toggle"data-target=".navbar-responsive-<spanclass="icon-<spanclass="icon-<spanclass="icon-<aclass="navbar-brand"</div>@(message:@main("包机服务管理平台",header())<script$(varuser=varpassword=if(usernull||userreturnfalse;}elseif(passwordnull||passwordreturn
<divclass="container-<div<divclass="col-xs-<divclass="col-xs-10col-xs-offset-1col-lg-4col-lg-offset-4well <formclass="form-horizontal"
<legend>用户登录<divclass="form-<labelclass="col-xs-4col-lg-2control-label">用户名<divclass="col-xs-8col-lg-<inputclass="form-control"id="user"name="user"placeholder="用户名"type="text"><divclass="form-<labelfor="inputPassword"class="col-xs-4col-lg-2control-label"></label><divclass="col-xs-8col-lg-<inputclass="form-control"id="password"name="password"placeholder=""type="password"><divclass="form-col-lg-6col-lg-offset-
<divclass="col-xs-10col-xs-offset-<buttontype="submit"class="btnbtn-lgbtn-primary">登陆<buttontype="reset"btn-lgbtn-default">重置}@(message:@main("包机服务管理平台",header())<script$(varcity=$("#city").val();varairport=$("#airport").val();varcode=$("#code").val();if(code==null||code==""){returnfalse;}elseif(citynull||cityreturn}elseif(airportnull||airportreturn}<divclass="container-fluid"style="padding-top:<div<divclass="col-xs-8col-xs-offset-2border-padding<formclass="form-horizontalcol-xs-8col-xs-offset-2"method="post"action="/airport-code"><divid="legend"<legend>录入机场代码<divclass="form-<labelclass="control-labelcol-sm-2"<divclass="col-sm-<inputplaceholder="id="code"class="form-control"name="code"type="text"><pclass="help-<divclass="form-for="city">城市
<labelclass="control-labelcol-sm-<divclass="col-sm-<inputplaceholder="id="city"class="form-control"name="city"<pclass="help-<divclass="form-<labelclass="control-labelcol-sm-2"<divclass="col-sm-<inputplaceholder="id="airport"class="form-control"name="airport"type="text"><pclass="help-
<inputtype="hidden" o" <divclass="form-<!--Button--<divclass="col-sm-4col-sm-offset-<buttonclass="btnbtn-id="input_btn">保存type="reset">重填
<buttonclass="btnbtn-}@(message:@main("包机服务管理平台",header())<script$(varair_type=varstart_addr=$("#start_addr").val();vardestination=$("#destination").val();varairport=$("#airport").val();varsairport=$("#sairport").val();varstart_date=$("#start_date").val();vartime_scope=$("#time_scope").val();varmaxPeople=$("#maxPeople").val();varmarketPrice=$("#marketPrice").val();varprice=$("#price").val();vardesc=$("#desc").val();varreg=/^\d+$/;if(air_typenull||air_typereturn}elseif(start_addrnull||start_addrreturn}elseif(destinationnull||destinationreturn}elseif(start_datenull||start_datereturn}elseif(time_scopenull||time_scopereturn}elseif(time_scope.indexOf("-")==-1){return}elseif(maxPeoplenull||maxPeoplereturn}elseif(!reg.test(price)){returnfalse;}elseif(pricenull||pricereturn}elseif(descnull||descreturn}varobj=.geementById("pic1");}varobj=.geementById("pic2");}varobj=.ge }varobj=.geementById("pic4");}varstart_addr=$("#start_addr").val();varsairport=$("#sairport").val();if(result!="no"){
vardestination=$("#destination").val();varairport=$("#airport").val();if(result!="no"){
}
<divclass="container-fluid"style="padding-top:<div<divclass="col-xs-8col-xs-offset-2border-padding<formclass="form-horizontalcol-xs-8col-xs-offset-2"method="post"action="/flight"enctype="multipart/form-data"><divid="legend"<legend>录入航班信息<!--<divclass="form-
<divclass="col-sm-8">InlineRadios<labelclass="radio<inputchecked="checked"name="flight_type"
<labelclass="radio<inputvalue="0"</div>--<divclass="form-<labelclass="control-labelcol-sm-2"<divclass="col-sm-<inputplaceholder="飞机机型"id="air_type"class="form-control"name="air_type"type="text"><pclass="help-<divclass="form-<labelclass="control-labelcol-sm-2"<divclass="col-sm-<inputplaceholder="出发地"id="start_addr"class="form-control"name="start_addr"type="text"><pclass="help-<!- <divclass="form-<labelclass="control-labelcol-sm-2"<divclass="col-sm-<inputplaceholder="出发地机场"id="sairport"class="form-control"name="sairport"type="text"><pclass="help-</div>--<divclass="form-<labelclass="control-labelcol-sm-2"<divclass="col-sm-<inputplaceholder="目的地"id="destination"class="form-control"name="destination"type="text"><pclass="help-<!--<divclass="form-<labelclass="control-labelcol-sm-2"<divclass="col-sm-<inputplaceholder="目的地机场"id="airport"class="form-control"name="airport"type="text"><pclass="help-</div>--<divclass="form-<labelclass="control-labelcol-sm-2"<divclass="col-sm-<inputplaceholder="出发日期:20140101"id="start_date"class="form-control"name="start_date"<pclass="help-<divclass="form-<labelclass="control-labelcol-sm-2"<divclass="col-sm-<inputplaceholder="时间范围:0915-1830"id="time_scope"class="form-control"name="time_scope"<pclass="help-<divclass="form-<labelclass="control-labelcol-sm-2"<divclass="col-sm-<inputplaceholder="最大人数"id="maxPeople"class="form-control"name="maxPeople"type="text"><pclass="help-<!- <divclass="form-<labelclass="control-labelcol-sm-2"<divclass="col-sm-<inputplaceholder="市场价"id="marketPrice"class="form-control"name="marketPrice"type="text"><pclass="help-</div>--<divclass="form-<labelclass="control-labelcol-sm-2"<divclass="col-sm-<inputplaceholder="价"id="price"class="form-control"name="price"type="text"><pclass="help-<divclass="form-<divclass="col-sm-3col-sm-offset-<labelclass="checkbox班<divclass="form-<divclass="col-sm-3col-sm-offset-<labelclass="checkbox<inputname="sale"type="checkbox"班<divclass="form-<labelclass="control-labelcol-sm-2"<divclass="col-sm-<textareaclass="form-control"id="desc"rows="5"name="desc"></textarea><pclass="help-<divclass="form-
<labelclass="control-labelcol-sm-<divclass="col-sm-<input class="form-control"id="pic1"name="pic1"<pclass="help-block">请至少上传一张,否则无法完成录入<aclass="btnbtn-xsbtn-dangerpull-right"<divclass="form-
<labelclass="control-labelcol-sm-<divclass="col-sm-<input class="form-control"id="pic2"name="pic2"<pclass="help-block">请至少上传一张,否则无法完成录入<aclass="btnbtn-xsbtn-dangerpull-right"<divclass="form-
<labelclass="control-labelcol-sm-<divclass="col-sm-<input class="form-control"id="pic3"name="pic3"<pclass="help-block">请至少上传一张,否则无法完成录入<aclass="btnbtn-xsbtn-dangerpull-right"<divclass="form-
<labelclass="control-labelcol-sm-<divclass="col-sm-<inputplaceholder="4"class="form-control"id="pic4"name="pic4"<pclass="help-block">请至少上传一张,否则无法完成录入<aclass="btnbtn-xsbtn-dangerpull-right"
<inputtype="hidden" o" <divclass="form-<!--Button--<divclass="col-sm-4col-sm-offset-<buttonclass="btnbtn-id="input_btn">保存type="reset">重填
<buttonclass="btnbtn-}@main("包机服务管理平台",header())<divclass="container-fluid"style="padding-top:<div<divclass="col-xs-8col-xs-offset-2border-padding<formclass="form-horizontalcol-xs-8col-xs-offset-2"method="post"action="/flight-config"><divid="legend"<legend>设置<divclass="form-<labelclass="control-labelcol-sm-3" <divclass="col-sm-<inputplaceholder=" id="wxtoken"class="form-control"name="wxtoken"type="text"<pclass="help-<divclass="form-<labelclass="control-labelcol-sm-3" <divclass="col-sm-<inputplaceholder=" id="wxappsecret"class="form-control"name="wxappsecret"type="text"<pclass="help-<divclass="form-<labelclass="control-labelcol-sm-3" <divclass="col-sm-<inputplaceholder=" id="wxappid"class="form-control"name="wxappid"type="text"<pclass="help-<divclass="form-<labelclass="control-labelcol-sm-3"<divclass="col-sm-<inputplaceholder="七牛AK"id="qn_AK"class="form-control"name="qn_AK"type="text"<pclass="help-<divclass="form-<labelclass="control-labelcol-sm-3"<divclass="col-sm-<inputplaceholder="七牛SK"id="qn_SK"class="form-control"name="qn_SK"type="text"<pclass="help-<divclass="form-<labelclass="control-labelcol-sm-3"<divclass="col-sm-<inputplaceholder="七牛bucket"id="qn_bucket"class="form-control"name="qn_bucket"type="text"<pclass="help-<divclass="form-<labelclass="control-labelcol-sm-3"<divclass="col-sm-<inputplaceholder="七牛"id="qn_"class="form-control"name="qn_"type="text"<pclass="help-<divclass="form-<labelclass="control-labelcol-sm-3"<divclass="col-sm-<inputplaceholder="使用方法介绍"id="wx_charter_flight"class="form-control"name="wx_charter_flight"type="text"<pclass="help-<divclass="form-<labelclass="control-labelcol-sm-for="website"><divclass="col-sm-class="form-control"name="website"type="text"<pclass="help-<divclass="form-<labelclass="control-labelcol-sm-3"<divclass="col-sm-<inputplaceholder=" id="service_"class="form-control"name="service_ "type="text"<pclass="help-<divclass="form-<labelclass="control-labelcol-sm-3"<divclass="col-sm-<inputplaceholder="关于我们"id="about_me"class="form-control"name="about_me"type="text"<pclass="help-<divclass="form-<labelclass="control-labelcol-sm-3"<divclass="col-sm-<inputplaceholder="玩转包机"id="introduce"class="form-control"name="introduce"type="text"<pclass="help-<divclass="form-<labelclass="control-labelcol-sm-3"for="pic_title">标题</label><divclass="col-sm-<inputplaceholder="标题"id="pic_title"class="form-control"name="pic_title"type="text"<pclass="help-<divclass="form-<labelclass="control-labelcol-sm-3"<divclass="col-sm-<inputplaceholder="id="username"class="form-control"name="username"type="text"<pclass="help-<divclass="form-<labelclass="control-labelcol-sm-3"<divclass="col-sm-<inputplaceholder=""id="password"class="form-control"name="password"type="text"<pclass="help-<divclass="form-<!--Button--<divclass="col-sm-4col-sm-offset-<buttonclass="btnbtn-id="input_btn">保存type="reset">重填
<buttonclass="btnbtn-}@(title:String,head:Html)(content:<!DOCTYPE<metacharset="utf-<metaname="viewport"content="width=device-width,<metaname="description"<metaname="author"<linkrel="stylesheet"media="screen"<linkrel="shortcuticon"type="image/png"<linkrel="stylesheet"media="screen"<divid="wrap"><div<div<div<pclass="text-muted">制作单位:福将文化发展有公司
@(flights:List[models.flight.FlightInfo],page:Int,openid:String)@importutils.StringUtils@main("商务航班",header_m("<divclass="container-fluid"style="padding-top:<div<divclass="col-xs-<divclass="table-responsive"><tableclass="tabletable-<th>机型<th>出发日期<th>人数<th>价<th>操作@for(flight<-class="btnbtn-dangerbtn-sm">预定</a>}}<ulclass="pager">@if(page==0){}}}
@(orders:List[models.flight.MyOrder],page:@main("订单",header_m("订单"))<divclass="container-fluid"style="padding-top:<div<divclass="col-xs-<divclass="table-<tableclass="tabletable-<th>订单号<th>出发日期<th>@for(order<-class="btnbtn-smbtn-primary">查看</a></td>}<ulclass="pager">@if(page==href="/myorder-m?page=1&openid=@orders.get(0).openid">下一页}href="/myorder-m?page=@(1)&openid=@orders.get(0).openid"href="/myorder-m?page=@(1)&openid=@orders.get(0).openid"href="/myorder-m?page=@(page+1)&openid=@orders.get(0).openid"}}}@(order:@main("订单",header_m("订单"))<divclass="container-fluid"style="padding-top:<div<divclass="col-xs-<div<tableclass="tabletable-hover"style="table-layout:fixed;word-break:break-<td>订单号<td>预定日期<td>机型<td>出发日期和时间<td>出发时间<td>出发地<td>目的地<td>人数<td>价格<td>公司 <td><td>号<td>邮箱<td>@order.<td>联程航班<tdstyle="word-break:break-all;<td>状态<td>@if(order.status=="0"){未确认}else{认
}@(orders:List[models.flight.MyOrder],page:@main("包机服务管理平台",header())<scriptfunctionvarstart_time=$("#start_time").val();if(start_time==null||start_time==""){returnfalse;}varair_type=$("#air_type").val();varprice=$("#price").val();if(air_typenull||air_typereturn}if(pricenull||pricereturn}}<divclass="container-fluid"style="padding-top:<div<divclass="col-xs-12border"style="padding-top:-<h3>订单信息<divclass="table-<tableclass="tabletable-<th>订单号<th>预定日期<th>机型<th>出发日期<th>出发时间<th>出发地<th>目的地<th>人数<th>价格<th>公司 号<th>邮箱<th>联程航班<th>状态<th>操作@for(order<-<formid="@order.orderno"method="post"action="/order/ok/@order.orderno?page=@page"onsubmit="return@if(order.status==<inputtype="text"style="width:60px;"id="air_type"name="air_type"value="@order.air_type">}@if(order.status==<inputtype="text"style="width:60px;"id="start_time"name="start_time">}@if(order.status==<inputtype="text"style="width:60px;"id="price"name="price"value="@order.price"> <td>@order.@if(order.status==<inputtype="text"style="width:60px;"id="mutil"name="mutil"value="@order.mutil"><td>@if(order.status=="0"){未确认}else{确认
@if(order.status==<button btn-successbtn-sm">确认}href="/order/del/@order.orderno?page=@page"class="btnbtn-danger}<ulclass="pager">@if(page==0){<li><ahref="/order-list?page=1">下一页
<li><ahref="/order-list?page=@(1)"><li><ahref="/order-list?page=@(1)"><li><ahref="/order-list?page=@(page+1)"}}}packageimportjava.io.UnsupportedEncodingException;importjava.util.Date;importjava.util.Properties;importjavax.mail.Address;importjavax.mail.Authenticator;importjavax.mail.Message;importjavax.mail.MessagingException;importjavax.mail.PasswordAuthentication;importjavax.mail.Session;importernet.InternetAddress;importernet.MimeMessage;importcom.fanaifan.util.ConfigUtil;publicclassSendTool{privateStringprivateStringprivateStringprivateStringmail_head_name="thisisheadofthismail";privateStringmail_head_value="thisisheadofthismail";privateStringmail_to;privateStringprivateStringmail_body="thisisth_bodyofthistestmail";privateString alName="";publicSendTool()}publicSendTool(Stringhost,Stringusername,Stringpassword,Stringmailto,Stringsubject,Stringtext,Stringname,Stringhead_name,Stringhead_value){this.host=host;this.username=username;this.mail_from=username;this.password=password;this.mail_to=mailto;this.mail_subject=subject;this.mail_body=text;this.alName=name;this.mail_head_name=head_name;this.mail_head_value=head_value;}*@throws@throws@throwspublicvoidsend()throwsMessagingException,UnsupportedEncodingException{Propertiesprops=newAuthenticatorauth=new_Autherticator();//进行邮件props.put("mail.smtp.host",host);props.put("mail.smtp.auth","true");Sessionsession=Session.getDefaultInstance(props,//设置session,MimeMessagemessage=newmessage.setContent("foobar,"application/x-foobar");message.setSubject(mail_subject);//设置邮件message.setText(mail_body);//设置邮件正文message.setHeader(mail_head_name,mail_head_value);message.setDate(newDate());//设置邮件发送日Addressaddress=newInternetAddress(mail_from,message.setFrom(address);AddresstoAddressnewInternetAddress(mail_to);message.addRecipient(Message.RecipientType.TO,toAddress);Transpord(message);//发送邮件}publicclass _AutherticatorextendsAuthenticator{ _Autherticator(){}public_Autherticator(Stringuser,Stringpwd){username=user;password=pwd;}publicPasswordAuthenticationgetPasswordAuthentication(){return sswordAuthentication(username,}}publicStringgetHost(){returnhost;}publicvoidsetHost(Stringhost){this.host=host;}publicStringgetUsername(){returnusername;}publicvoidsetUsername(Stringusername){this.username=username;}publicStringgetPassword(){returnpassword;}publicvoidsetPassword(Stringpassword){this.password=password;}publicStringgetMail_head_name(){returnmail_head_name;}publicvoidsetMail_head_name(Stringmail_head_name){this.mail_head_name=mail_head_name;}publicStringgetMail_head_value(){returnmail_head_value;}publicvoidsetMail_head_value(Stringmail_head_value){this.mail_head_value=mail_head_value;}publicStringgetMail_to(){returnmail_to;}publicvoidsetMail_to(Stringmail_to){this.mail_to=mail_to;}publicStringgetMail_from(){returnmail_from;}publicvoidsetMail_from(Stringmail_from){this.mail_from=mail_from;}publicStringgetMail_subject(){returnmail_subject;}publicvoidsetMail_subject(Stringmail_subject){this.mail_subject=mail_subject;}publicStringgetMail_body(){returnmail_body;}publicvoidsetMail_body(Stringmail_body){this.mail_body=mail_body;}publicStringget alName(){ }publicvoidset alName){ alName= }publicstaticvoidsendMail(Stringmailto,Stringsubject,Stringcontent){SendToolsend=newConfigUtil.readValue("mail.password"),mailto,subject,content,try{}catch(Exceptionex){}}packagepublicclassAstroprivateStringzongHe;privateStringaiQing;privateStringgongZuo;privateStringliCai;privateStringjianKang;privateStringshangTan;privateStringxingYan;privateStringxingShu;privateStringsuPei;privateStringYu;publicStringgetZongHe(){returnzongHe;}publicvoidsetZongHe(StringzongHe){this.zongHe=zongHe;}publicStringgetAiQing(){returnaiQing;}publicvoidsetAiQing(StringaiQing){this.aiQing=aiQing;}publicStringgetGongZuo(){returngongZuo;}publicvoidsetGongZuo(StringgongZuo){this.gongZuo=gongZuo;}publicStringgetLiCai(){returnliCai;}publicvoidsetLiCai(StringliCai){this.liCai=liCai;}publicStringgetJianKang(){returnjianKang;}publicvoidsetJianKang(StringjianKang)this.jianKang=}publicStringgetShangTan(){returnshangTan;}publicvoidsetShangTan(StringshangTan){this.shangTan=shangTan;}publicStringgetXingYan(){returnxingYan;}publicvoidsetXingYan(StringxingYan){this.xingYan=xingYan;}publicStringgetXingShu(){returnxingShu;}publicvoidsetXingShu(StringxingShu){this.xingShu=xingShu;}publicStringgetSuPei(){returnsuPei;}publicvoidsetSuPei(StringsuPei){this.suPei=suPei;}publicStringgetYu(){ }publicvoidset Yu(StringYu){ Yu= }}packageimportjavax.xml.bind.annotation.XmlAccessType;importjavax.xml.bind.annotation.XmlAccessorType;importjavax.xml.bind.annotation.XmlElement;importjavax.xml.bind.annotation.XmlRoo @XmlRoo@XmlAccessorType(XmlAccessType.FIELD)publicclassProfile{*privateStringprivateStringprivateStringprivateStringpublicStringgetName(){returnname;}publicvoidsetName(Stringname){=name;}publicStringgetGender(){returngender;}publicvoidsetGender(Stringgender){this.gender=gender;}publicStringgetBirth(){returnbirth;}publicvoidsetBirth(Stringbirth){this.birth=birth;}publicStringgetMobile(){returnmobile;}publicvoidsetMobile(Stringmobile){this.mobile=mobile;}}packageimportimportimportjavax.xml.bind.annotation.XmlAccessorType;importjavax.xml.bind.annotation.XmlElement;importjavax.xml.bind.annotation.XmlRooement;@XmlAccessorType(XmlAccessType.FIELD)publicclassProfiles{privaist<Profile>profile=null;publicList<Profile>getProfile(){returnprofile;}publicvoidsetProfile(List<Profile>profile){file=profile;}}packageimportjava.io.IOException;importorg.jsoup.Jsoup;importorg.jsoup.nodes. import importcom.fanaifan.model.Astro;importcom.fanaifan.util.ConfigUtil;importcom.fanaifan.util.ConspublicclassAstroServicepublicstaticAstrogetUrlAstroInfo(StringbirthDay){Stringurl=Astroastro=newAstro();try{doc=Elementscontent=doc.geementsByClass("lotstars");ElementsastroInfos=content.get(0).geastro.setZongHe(astroInfos.get(0).geastro.setAiQing(astroInfos.get(1).geastro.setGongZuo(astroInfos.get(2).geastro.setLiCai(astroInfos.get(3).geastro.setJianKang(astroInfos.get(4).geastro.setShangTan(astroInfos.get(5).geastro.setXingYan(astroInfos.get(6).ge;astro.setXingShu(astroInfos.get(7).ge;astro.setSuPei(astroInfos.get(8).geastro.set }catch(IOExceptione){}return}publicstaticStringgetAstroInfo(StringAstroastro=AstroService.getUrlAstroInfo(birthDay);StringBuffersb=newStringBuffer();sb.append("astro.getZongHe()sb.append("astro.getAiQing()\n");sb.append("astro.getGongZuo()sb.append("投资:"+astro.getLiCai()+"星\n");sb.append("健康指数:"+astro.getJianKang()+",");sb.append("astro.getShangTan()\n");sb.append("幸运颜色:"+astro.getXingYan()+",");sb.append("幸运数字:"+astro.getXingShu()+"\n");sb.append("速配星座:"+astro.getSuPei()+"\n");sb.append("星座评语:"+astro.getYu());return}}packageimportjava.text.ParseException;importjava.text.SimpleDateFormat;importjava.util.Date;importjava.util.Timer;importjava.util.TimerTask;importimportcom.fanaifan.mail.SendTool;importcom.fanaifan.model.Profile;importcom.fanaifan.util.BirthDaysUtil;importcom.fanaifan.util.ConfigUtil;publicclassProcessprivatestaticLoggerlog=Logger.getLogger(Process.class);publicvoidexecute(){Timertimer=newtryDatedate=newSimpleDateFormat("yyyy-MM-ddtimer.schedule(newExecuteTask(),date,}catch(ParseExceptione){("timeconvterfailure");}}classExecuteTaskextendsTimerTask{publicvoidrun(){for(Profileprofile: 人",morning(profile));("已问候"+profile.getName()+"发送至"+profile.getMobile()+" }}}publicstaticStringmorning(Profileprofile){StringBuffersb=newStringBuffer();sb.append("profile.getName()\n");returnsb.toString();}}packageimportimportjava.io.ByteArrayOutputStream;importjava.io.File;importjavax.xml.bind.JAXBContext;importjavax.xml.bind.JAXBException;importjavax.xml.bind.Marshaller;importjavax.xml.bind.Unmarshaller;importcom.fanaifan.model.Profiles;publicclassXMLConvter{publicstaticObjectXmlToJava(Filexml,Class<?>clazz)throwsJAXBException{JAXBContextcontext=JAXBContext.newInstance(clazz);Unmarshallerunmarshaller=context.createUnmarshaller();returnunmarshaller.unmarshal(xml);}publicstaticByteArrayInputStreamJavaToXml(Objectobj,Class<?>clazz)throwsJAXBException{
JAXBContextcontext=JAXBContext.newInstance(clazz);ByteArrayOutputStreambaos=newByteArrayOutputStream();Marshallermarshaller=context.createMarshaller();marshaller.marshal(obj,baos);ByteArrayInputStreamin=newreturnin;}publicstaticProfilesgetProfiles(){try{return(Profiles)XmlToJava(newile.xml").getFile()),Profiles.class);}catch(JAXBExceptione){}returnnew}}packageimportjavax.servlet.ServletContextEvent;importjavax.servlet.ServletContextListener;importpublicclassOnStartLoadimplementsServletContextListenerpublicLoggerlog=Logger.getLogger(OnStartLoad.class);publicvoidcontextDestroyed(ServletContextEventarg0){}publicvoidcontextInitialized(ServletContextEventarg0) ("morningsystemreadconfigthreadisrunning");}}zhangpengtekiMacBook-Air
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 机械投泥手课程设计
- 七年级体育 体育与健康教育第10课教案 人教新课标版
- 九年级体育 考核立定跳远教案 人教新课标版
- 低空经济市场趋势与投资前景分析报告
- 机械加工 课程设计
- 城市更新路径解析:多元实施模式的探讨
- 机械制造技术课程设计
- 机械制图详细课程设计
- 2024年35kv架空线路施工合同质量控制
- 机械专业有多少课程设计
- 中考数学复习专题课件:瓜豆原理之直线型
- GB 18384-2020 电动汽车安全要求
- 腹股沟斜疝护理查房ppt
- 精品堆垛机安装指导书
- PMC生产计划与物料控制实务课件
- 鸡的饲养管理-优质课件
- 人工湿地设计规范标准[详]
- 提灌站项目施工组织设计
- 无损检测英语
- 化学微生物学第7章 微生物转化
- 《少年正是读书时》-完整版PPT课件
评论
0/150
提交评论