|
@@ -1,8 +1,6 @@
|
|
|
package com.zskk.service;
|
|
|
|
|
|
-import java.util.Date;
|
|
|
import java.util.Random;
|
|
|
-
|
|
|
import com.alibaba.fastjson.JSON;
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
import com.aliyuncs.CommonRequest;
|
|
@@ -14,16 +12,12 @@ import com.aliyuncs.exceptions.ServerException;
|
|
|
import com.aliyuncs.http.MethodType;
|
|
|
import com.aliyuncs.profile.DefaultProfile;
|
|
|
import com.jfinal.kit.StrKit;
|
|
|
-import com.jfinal.plugin.activerecord.ActiveRecordPlugin;
|
|
|
-import com.jfinal.plugin.druid.DruidPlugin;
|
|
|
import com.jfinal.plugin.redis.Redis;
|
|
|
import com.zskk.controller.bean.DoctorBean;
|
|
|
import com.zskk.controller.bean.LoginBean;
|
|
|
import com.zskk.model.Doctors;
|
|
|
import com.zskk.model.DoctorsWechat;
|
|
|
import com.zskk.model.Institution;
|
|
|
-import com.zskk.model._MappingKit;
|
|
|
-import com.zskk.util.ErrorConstant;
|
|
|
|
|
|
public class SmsService {
|
|
|
//
|
|
@@ -115,36 +109,4 @@ public class SmsService {
|
|
|
sb.append(strNum);
|
|
|
return sb.toString();
|
|
|
}
|
|
|
- public static void main(String[] args) {
|
|
|
- DoctorsWechat doctorsWechat = new DoctorsWechat();
|
|
|
- doctorsWechat.setWxaOpenid("d");
|
|
|
-
|
|
|
- doctorsWechat.setCreateAt(new Date());
|
|
|
- doctorsWechat.setUpdateAt(new Date());
|
|
|
- doctorsWechat.setDoctorId(null);
|
|
|
-
|
|
|
-// doctorsWechat.save();
|
|
|
-// System.out.println(doctorsWechat.getDoctorId()==null?"2":"1");
|
|
|
-// String doctirIdStr = doctorsWechat.getDoctorId();
|
|
|
-
|
|
|
- if (doctorsWechat != null) {
|
|
|
-
|
|
|
- System.out.println(doctorsWechat.getDoctorId()==null?"3":"1");
|
|
|
-
|
|
|
- Doctors doctors = new Doctors();
|
|
|
- doctors.setId(doctorsWechat.getDoctorId());
|
|
|
- doctors.setPassword("");
|
|
|
- DoctorBean doctorBean = JSON.parseObject(doctors.toJson(), DoctorBean.class);
|
|
|
-// Institution institution = Institution.dao.findById(doctorBean.getInstitution_id());
|
|
|
- doctorBean.setInstitution("ss");
|
|
|
- StringBuilder sb = new StringBuilder(doctorBean.getPhone());
|
|
|
- sb.replace(3, 7, "****");
|
|
|
- doctorBean.setPhone(sb.toString());
|
|
|
- String tokenKey = "TOKEN_WXA_" + StrKit.getRandomUUID();
|
|
|
-// Redis.use("pc").setex("think" + tokenKey, 7200, doctors.toJson());
|
|
|
-// loginBean.setDoctorBean(doctorBean);
|
|
|
-// loginBean.setToken(tokenKey);
|
|
|
- }
|
|
|
-
|
|
|
- }
|
|
|
}
|