|
@@ -29,7 +29,6 @@ import javax.annotation.Resource;
|
|
|
import java.util.Date;
|
|
import java.util.Date;
|
|
|
import java.util.List;
|
|
import java.util.List;
|
|
|
import java.util.Map;
|
|
import java.util.Map;
|
|
|
-import java.util.UUID;
|
|
|
|
|
import java.util.concurrent.TimeUnit;
|
|
import java.util.concurrent.TimeUnit;
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -77,8 +76,9 @@ public class UserService {
|
|
|
public StudentDataReport getReportDetail(Integer id){
|
|
public StudentDataReport getReportDetail(Integer id){
|
|
|
return studentDataReportMapper.selectByPrimaryKey(id);
|
|
return studentDataReportMapper.selectByPrimaryKey(id);
|
|
|
}
|
|
}
|
|
|
- public boolean unBind(BindRequest bindRequest){
|
|
|
|
|
- WechatBind wechatBind = wechatBindMapper.selectOneByOpenid(bindRequest.getOpenId());
|
|
|
|
|
|
|
+
|
|
|
|
|
+ public boolean unBind(String openId){
|
|
|
|
|
+ WechatBind wechatBind = wechatBindMapper.selectOneByOpenid(openId);
|
|
|
if(null == wechatBind){
|
|
if(null == wechatBind){
|
|
|
return true;
|
|
return true;
|
|
|
}
|
|
}
|
|
@@ -97,6 +97,7 @@ public class UserService {
|
|
|
}
|
|
}
|
|
|
WechatBind wechatBind = wechatBindMapper.selectOneByOpenid(bindRequest.getOpenId());
|
|
WechatBind wechatBind = wechatBindMapper.selectOneByOpenid(bindRequest.getOpenId());
|
|
|
if(null == wechatBind){
|
|
if(null == wechatBind){
|
|
|
|
|
+ wechatBind = new WechatBind();
|
|
|
wechatBind.setStudentid(student.getId());
|
|
wechatBind.setStudentid(student.getId());
|
|
|
wechatBind.setStudentname(student.getName());
|
|
wechatBind.setStudentname(student.getName());
|
|
|
wechatBind.setPhone(bindRequest.getPhone());
|
|
wechatBind.setPhone(bindRequest.getPhone());
|
|
@@ -105,6 +106,9 @@ public class UserService {
|
|
|
wechatBindMapper.insertSelective(wechatBind);
|
|
wechatBindMapper.insertSelective(wechatBind);
|
|
|
}
|
|
}
|
|
|
BindRequest bindResponse = BeanConvertUtil.safeConvert(bindRequest, BindRequest.class, BindRequest.class);
|
|
BindRequest bindResponse = BeanConvertUtil.safeConvert(bindRequest, BindRequest.class, BindRequest.class);
|
|
|
|
|
+ if(null == bindResponse){
|
|
|
|
|
+ return null;
|
|
|
|
|
+ }
|
|
|
bindResponse.setStudentId(student.getId());
|
|
bindResponse.setStudentId(student.getId());
|
|
|
bindResponse.setStudentName(wechatBind.getStudentname());
|
|
bindResponse.setStudentName(wechatBind.getStudentname());
|
|
|
return bindResponse;
|
|
return bindResponse;
|