diff --git a/students/1398524980/README.md b/students/1398524980/README.md
new file mode 100644
index 000000000..a652ad5ec
--- /dev/null
+++ b/students/1398524980/README.md
@@ -0,0 +1 @@
+作业
\ No newline at end of file
diff --git a/students/1398524980/second phase/once/README.md b/students/1398524980/second phase/once/README.md
new file mode 100644
index 000000000..4a2bb84fe
--- /dev/null
+++ b/students/1398524980/second phase/once/README.md
@@ -0,0 +1 @@
+面向对象设计
\ No newline at end of file
diff --git a/students/1398524980/second phase/once/ood_assignment/pom.xml b/students/1398524980/second phase/once/ood_assignment/pom.xml
new file mode 100644
index 000000000..cac49a532
--- /dev/null
+++ b/students/1398524980/second phase/once/ood_assignment/pom.xml
@@ -0,0 +1,32 @@
+
+ 4.0.0
+
+ com.coderising
+ ood-assignment
+ 0.0.1-SNAPSHOT
+ jar
+
+ ood-assignment
+ http://maven.apache.org
+
+
+ UTF-8
+
+
+
+
+
+ junit
+ junit
+ 4.12
+
+
+
+
+
+ aliyunmaven
+ http://maven.aliyun.com/nexus/content/groups/public/
+
+
+
diff --git a/students/1398524980/second phase/once/ood_assignment/src/main/java/com/coderising/ood/srp/Configuration.java b/students/1398524980/second phase/once/ood_assignment/src/main/java/com/coderising/ood/srp/Configuration.java
new file mode 100644
index 000000000..0fb3dcfa7
--- /dev/null
+++ b/students/1398524980/second phase/once/ood_assignment/src/main/java/com/coderising/ood/srp/Configuration.java
@@ -0,0 +1,34 @@
+package main.java.com.coderising.ood.srp;
+
+import java.util.HashMap;
+import java.util.Map;
+
+public class Configuration {
+
+ private static Configuration config;
+
+ static Map configurations = new HashMap<>();
+ static {
+ configurations.put(ConfigurationKeys.SMTP_SERVER, "smtp.163.com");
+ configurations.put(ConfigurationKeys.ALT_SMTP_SERVER, "smtp1.163.com");
+ configurations.put(ConfigurationKeys.EMAIL_ADMIN, "admin@company.com");
+ }
+
+ private Configuration() {
+ }
+
+ protected static Configuration getConfig() {
+ return config;
+ }
+
+ /**
+ *
+ * @param key
+ * @return
+ */
+ public String getProperty(String key) {
+
+ return configurations.get(key);
+ }
+
+}
diff --git a/students/1398524980/second phase/once/ood_assignment/src/main/java/com/coderising/ood/srp/ConfigurationKeys.java b/students/1398524980/second phase/once/ood_assignment/src/main/java/com/coderising/ood/srp/ConfigurationKeys.java
new file mode 100644
index 000000000..e63eb922a
--- /dev/null
+++ b/students/1398524980/second phase/once/ood_assignment/src/main/java/com/coderising/ood/srp/ConfigurationKeys.java
@@ -0,0 +1,9 @@
+package main.java.com.coderising.ood.srp;
+
+public class ConfigurationKeys {
+
+ public static final String SMTP_SERVER = "smtp.server";
+ public static final String ALT_SMTP_SERVER = "alt.smtp.server";
+ public static final String EMAIL_ADMIN = "email.admin";
+
+}
diff --git a/students/1398524980/second phase/once/ood_assignment/src/main/java/com/coderising/ood/srp/DBUtil.java b/students/1398524980/second phase/once/ood_assignment/src/main/java/com/coderising/ood/srp/DBUtil.java
new file mode 100644
index 000000000..1a88f401f
--- /dev/null
+++ b/students/1398524980/second phase/once/ood_assignment/src/main/java/com/coderising/ood/srp/DBUtil.java
@@ -0,0 +1,24 @@
+package main.java.com.coderising.ood.srp;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+
+public class DBUtil {
+
+ /**
+ * @param sql
+ * @return
+ */
+ public static List> query(String sql){
+
+ List> userList = new ArrayList>();
+ for (int i = 1; i <= 3; i++) {
+ HashMap userInfo = new HashMap();
+ userInfo.put("NAME", "User" + i);
+ userInfo.put("EMAIL", "aa@bb.com");
+ userList.add(userInfo);
+ }
+
+ return userList;
+ }
+}
diff --git a/students/1398524980/second phase/once/ood_assignment/src/main/java/com/coderising/ood/srp/FromAddress.java b/students/1398524980/second phase/once/ood_assignment/src/main/java/com/coderising/ood/srp/FromAddress.java
new file mode 100644
index 000000000..1a71da260
--- /dev/null
+++ b/students/1398524980/second phase/once/ood_assignment/src/main/java/com/coderising/ood/srp/FromAddress.java
@@ -0,0 +1,15 @@
+package main.java.com.coderising.ood.srp;
+
+public class FromAddress {
+
+ private String fromAddress = null;
+
+ protected void setFromAddress() {
+ fromAddress = Configuration.getConfig().getProperty(ConfigurationKeys.EMAIL_ADMIN);
+ }
+
+ public String getFromAddress() {
+ return fromAddress;
+ }
+
+}
diff --git a/students/1398524980/second phase/once/ood_assignment/src/main/java/com/coderising/ood/srp/LoadInformation.java b/students/1398524980/second phase/once/ood_assignment/src/main/java/com/coderising/ood/srp/LoadInformation.java
new file mode 100644
index 000000000..1eac48983
--- /dev/null
+++ b/students/1398524980/second phase/once/ood_assignment/src/main/java/com/coderising/ood/srp/LoadInformation.java
@@ -0,0 +1,22 @@
+package main.java.com.coderising.ood.srp;
+
+import java.util.List;
+
+public class LoadInformation {
+
+ private String productID = new ProductInfo().getproductID();
+
+ private String sendMailQuery = null;
+
+ protected List> loadMailingList() throws Exception {
+ return DBUtil.query(this.sendMailQuery);
+ }
+
+ protected void setLoadQuery() throws Exception {
+
+ sendMailQuery = "Select name from subscriptions " + "where product_id= '" + productID + "' " + "and send_mail=1 ";
+
+ System.out.println("loadQuery set");
+ }
+
+}
diff --git a/students/1398524980/second phase/once/ood_assignment/src/main/java/com/coderising/ood/srp/MailUtil.java b/students/1398524980/second phase/once/ood_assignment/src/main/java/com/coderising/ood/srp/MailUtil.java
new file mode 100644
index 000000000..84dbffa75
--- /dev/null
+++ b/students/1398524980/second phase/once/ood_assignment/src/main/java/com/coderising/ood/srp/MailUtil.java
@@ -0,0 +1,16 @@
+package main.java.com.coderising.ood.srp;
+
+public class MailUtil {
+
+ public static void sendEmail(String toAddress, String fromAddress, String subject, String message, String smtpHost,
+ boolean debug) {
+ StringBuilder buffer = new StringBuilder();
+ buffer.append("From:").append(fromAddress).append("\n");
+ buffer.append("To:").append(toAddress).append("\n");
+ buffer.append("Subject:").append(subject).append("\n");
+ buffer.append("Content:").append(message).append("\n");
+ System.out.println(buffer.toString());
+
+ }
+
+}
diff --git a/students/1398524980/second phase/once/ood_assignment/src/main/java/com/coderising/ood/srp/ProductInfo.java b/students/1398524980/second phase/once/ood_assignment/src/main/java/com/coderising/ood/srp/ProductInfo.java
new file mode 100644
index 000000000..a678d2987
--- /dev/null
+++ b/students/1398524980/second phase/once/ood_assignment/src/main/java/com/coderising/ood/srp/ProductInfo.java
@@ -0,0 +1,52 @@
+package main.java.com.coderising.ood.srp;
+
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.FileReader;
+import java.io.IOException;
+
+public class ProductInfo {
+
+ private String productID = null;
+ private String productDesc = null;
+
+ /**
+ *
+ * @throws IOException
+ */
+ public void readProductInfo(String pomotionInfoAddress) throws IOException {
+
+ File f = new File(pomotionInfoAddress);
+
+ readFile(f);
+ }
+
+ private void readFile(File file) throws IOException {
+ BufferedReader br = null;
+ try {
+ br = new BufferedReader(new FileReader(file));
+ String temp = br.readLine();
+ String[] data = temp.split(" ");
+
+ productID = data[0];
+ productDesc = data[1];
+
+ System.out.println("ƷID = " + productID + "\n");
+ System.out.println("Ʒ = " + productDesc + "\n");
+
+ } catch (IOException e) {
+ throw new IOException(e.getMessage());
+ } finally {
+ br.close();
+ }
+ }
+
+ protected String getproductID() {
+ return productID;
+ }
+
+ protected String getProductDesc() {
+ return productDesc;
+ }
+
+}
diff --git a/students/1398524980/second phase/once/ood_assignment/src/main/java/com/coderising/ood/srp/PromotionMail.java b/students/1398524980/second phase/once/ood_assignment/src/main/java/com/coderising/ood/srp/PromotionMail.java
new file mode 100644
index 000000000..c94ac5a08
--- /dev/null
+++ b/students/1398524980/second phase/once/ood_assignment/src/main/java/com/coderising/ood/srp/PromotionMail.java
@@ -0,0 +1,36 @@
+package main.java.com.coderising.ood.srp;
+
+public class PromotionMail {
+
+ private static ProductInfo productInfo = new ProductInfo();
+ private static SetProtocol setprotocol = new SetProtocol();
+ private static LoadInformation loadInformation = new LoadInformation();
+ private static FromAddress fromAddress = new FromAddress();
+ private static SendEMails sendEmails = new SendEMails();
+
+ public static void main(String[] args) throws Exception {
+
+ boolean emailDebug = false;
+ new PromotionMail(emailDebug,
+ "C:\\Users\\123\\Documents\\workspace\\ood_assignment\\src\\com\\coderising\\ood\\srp\\product_promotion.txt");
+ }
+
+ PromotionMail(boolean emailDebug, String pomotionInfoAddress) throws Exception {
+
+ // ȡƷϢ
+ productInfo.readProductInfo(pomotionInfoAddress);
+
+ // ÷ͷЭ
+ setprotocol.setProtocol();
+
+ // öȡϢ
+ loadInformation.setLoadQuery();
+
+ // ÷͵ַ
+ fromAddress.setFromAddress();
+
+ // ʼ ʼ
+ sendEmails.sendEMails(emailDebug);
+ }
+
+}
\ No newline at end of file
diff --git a/students/1398524980/second phase/once/ood_assignment/src/main/java/com/coderising/ood/srp/SendEMails.java b/students/1398524980/second phase/once/ood_assignment/src/main/java/com/coderising/ood/srp/SendEMails.java
new file mode 100644
index 000000000..29bb0f136
--- /dev/null
+++ b/students/1398524980/second phase/once/ood_assignment/src/main/java/com/coderising/ood/srp/SendEMails.java
@@ -0,0 +1,51 @@
+package main.java.com.coderising.ood.srp;
+
+import java.util.HashMap;
+import java.util.Iterator;
+
+public class SendEMails {
+
+ private ToAddressAndMessage message = new ToAddressAndMessage();
+
+ private String smtpHost = new SetProtocol().getSMTPHost();
+ private String altSmtpHost = new SetProtocol().getAltSMTPHost();
+
+ private LoadInformation load = new LoadInformation();
+
+ /**
+ *
+ * @param debug
+ * @param mailingList
+ * @throws Exception
+ */
+ protected void sendEMails(boolean debug) throws Exception {
+
+ System.out.println("开始发送邮件");
+
+ if (load.loadMailingList() != null) {
+ Iterator> iter = load.loadMailingList().iterator();
+ while (iter.hasNext()) {
+ message.configureEMail((HashMap, ?>) iter.next());
+ try {
+ if (message.toAddress.length() > 0) {
+ message.sendSMTPHostWay(smtpHost, debug);
+ }
+ } catch (Exception e) {
+ try {
+ message.sendAltSMTPHostWay(altSmtpHost, debug);
+ } catch (Exception e2) {
+ System.out.println("通过备用 SMTP服务器发送邮件失败: " + e2.getMessage());
+ }
+ }
+ }
+
+ }
+
+ else {
+ System.out.println("没有邮件发送");
+
+ }
+
+ }
+
+}
diff --git a/students/1398524980/second phase/once/ood_assignment/src/main/java/com/coderising/ood/srp/SetProtocol.java b/students/1398524980/second phase/once/ood_assignment/src/main/java/com/coderising/ood/srp/SetProtocol.java
new file mode 100644
index 000000000..98e0151fb
--- /dev/null
+++ b/students/1398524980/second phase/once/ood_assignment/src/main/java/com/coderising/ood/srp/SetProtocol.java
@@ -0,0 +1,32 @@
+package main.java.com.coderising.ood.srp;
+
+public class SetProtocol {
+
+ private String smtpHost = null;
+ private String altSmtpHost = null;
+
+ private Configuration config;
+
+ protected void setProtocol() {
+ config = Configuration.getConfig();
+ setSMTPHost();
+ setAltSMTPHost();
+ }
+
+ private void setSMTPHost() {
+ smtpHost = config.getProperty(ConfigurationKeys.SMTP_SERVER);
+ }
+
+ private void setAltSMTPHost() {
+ altSmtpHost = config.getProperty(ConfigurationKeys.ALT_SMTP_SERVER);
+ }
+
+ protected String getSMTPHost() {
+ return smtpHost;
+ }
+
+ protected String getAltSMTPHost() {
+ return altSmtpHost;
+ }
+
+}
diff --git a/students/1398524980/second phase/once/ood_assignment/src/main/java/com/coderising/ood/srp/ToAddressAndMessage.java b/students/1398524980/second phase/once/ood_assignment/src/main/java/com/coderising/ood/srp/ToAddressAndMessage.java
new file mode 100644
index 000000000..c99bbc683
--- /dev/null
+++ b/students/1398524980/second phase/once/ood_assignment/src/main/java/com/coderising/ood/srp/ToAddressAndMessage.java
@@ -0,0 +1,52 @@
+package main.java.com.coderising.ood.srp;
+
+import java.io.IOException;
+import java.util.HashMap;
+
+public class ToAddressAndMessage {
+
+ private String productDesc = new ProductInfo().getProductDesc();
+
+ protected String toAddress = null;
+ private String fromAddress = new FromAddress().getFromAddress();
+
+ private String subject = null;
+ private String message = null;
+
+ private static final String EMAIL_KEY = "EMAIL";
+ private static final String NAME_KEY = "NAME";
+
+ /**
+ *
+ * @param userInfo
+ * @throws IOException
+ */
+ protected void addressAndMessage(HashMap, ?> userInfo) throws IOException {
+ configureEMail(userInfo);
+ setMessage(userInfo);
+ }
+
+ protected void configureEMail(HashMap, ?> userInfo) throws IOException {
+
+ toAddress = (String) userInfo.get(EMAIL_KEY);
+ if (toAddress.length() > 0)
+ setMessage(userInfo);
+ }
+
+ protected void setMessage(HashMap, ?> userInfo) throws IOException {
+
+ String name = (String) userInfo.get(NAME_KEY);
+
+ subject = "您关注的产品降价了";
+ message = "尊敬的 " + name + ", 您关注的产品 " + productDesc + " 降价了,欢迎购买!";
+ }
+
+ protected void sendSMTPHostWay(String smtpHost, boolean debug) {
+ MailUtil.sendEmail(toAddress, fromAddress, subject, message, smtpHost, debug);
+ }
+
+ protected void sendAltSMTPHostWay(String altSmtpHost, boolean debug) {
+ MailUtil.sendEmail(toAddress, fromAddress, subject, message, altSmtpHost, debug);
+ }
+
+}
diff --git a/students/1398524980/second phase/once/ood_assignment/src/main/java/com/coderising/ood/srp/product_promotion.txt b/students/1398524980/second phase/once/ood_assignment/src/main/java/com/coderising/ood/srp/product_promotion.txt
new file mode 100644
index 000000000..b7a974adb
--- /dev/null
+++ b/students/1398524980/second phase/once/ood_assignment/src/main/java/com/coderising/ood/srp/product_promotion.txt
@@ -0,0 +1,4 @@
+P8756 iPhone8
+P3946 XiaoMi10
+P8904 Oppo_R15
+P4955 Vivo_X20
\ No newline at end of file