|
@@ -1,5 +1,7 @@
|
|
|
package com.zskk.service;
|
|
|
|
|
|
+import javax.sql.DataSource;
|
|
|
+
|
|
|
import com.aliyuncs.CommonRequest;
|
|
|
import com.aliyuncs.CommonResponse;
|
|
|
import com.aliyuncs.DefaultAcsClient;
|
|
@@ -8,9 +10,23 @@ import com.aliyuncs.exceptions.ClientException;
|
|
|
import com.aliyuncs.exceptions.ServerException;
|
|
|
import com.aliyuncs.http.MethodType;
|
|
|
import com.aliyuncs.profile.DefaultProfile;
|
|
|
+import com.jfinal.kit.PropKit;
|
|
|
+import com.jfinal.plugin.activerecord.ActiveRecordPlugin;
|
|
|
+import com.jfinal.plugin.druid.DruidPlugin;
|
|
|
+import com.zskk.model.Doctors;
|
|
|
+import com.zskk.model._MappingKit;
|
|
|
|
|
|
public class SmsService {
|
|
|
|
|
|
+ static {
|
|
|
+// PropKit.use("config.properties");
|
|
|
+ DruidPlugin druidPlugin = new DruidPlugin("jdbc:mysql://117.50.71.166:7001/pacsonline_pro?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull", "pacs_pro", "Zskk@2019~!@#");
|
|
|
+ ActiveRecordPlugin arp = new ActiveRecordPlugin(druidPlugin);
|
|
|
+ druidPlugin.start();
|
|
|
+ _MappingKit.mapping(arp);
|
|
|
+ arp.start();
|
|
|
+ }
|
|
|
+
|
|
|
public static void sendSmsCode(String phone) {
|
|
|
DefaultProfile profile = DefaultProfile.getProfile("cn-beijing", "LTAImzRGKfWaL7Vi", "GjWdd2cdHtbQkhhnhSxNbw0QChKD98");
|
|
|
IAcsClient client = new DefaultAcsClient(profile);
|
|
@@ -36,6 +52,9 @@ public class SmsService {
|
|
|
}
|
|
|
|
|
|
public static void main(String[] args) {
|
|
|
- sendSmsCode("");
|
|
|
+// sendSmsCode("");
|
|
|
+ Doctors doctors = Doctors.dao.findFirst("select * from doctors where phone=?", "15203224322");
|
|
|
+ System.out.println(doctors.toJson().toString());
|
|
|
+
|
|
|
}
|
|
|
}
|