Commit 6618e1e8 by 徐高华

企微托管

parent 87ae9fa7
......@@ -69,6 +69,8 @@ public interface OpenStaffApiService {
*/
public ServiceResponse<Void> logout(String uuid) ;
public ServiceResponse<Void> logout(Long openStaffId) ;
/**
* 校验验证码
* @param openStaffId
......
......@@ -46,6 +46,10 @@ public class OpenStaffApiServiceImpl implements OpenStaffApiService {
@Override
public ServiceResponse<Void> delete(Long id) {
TabOpenStaff staff = this.openStaffMapper.getById(id) ;
if(null != staff){
this.openStaffService.logout(staff.getUuid(),"删除",0,null) ;
}
this.openStaffMapper.deleteByPrimaryKey(id) ;
return ServiceResponse.success();
}
......@@ -133,7 +137,14 @@ public class OpenStaffApiServiceImpl implements OpenStaffApiService {
@Override
public ServiceResponse<Void> logout(String uuid) {
this.openStaffService.logout(uuid,null,0 , "手机端结束登录");
this.openStaffService.logout(uuid,"手机端结束登录",0 , "手机端结束登录");
return ServiceResponse.success();
}
@Override
public ServiceResponse<Void> logout(Long openStaffId) {
TabOpenStaff staff = this.openStaffMapper.getById(openStaffId) ;
this.openStaffService.logout(staff.getUuid(),"取消授权",0 , null);
return ServiceResponse.success();
}
......
......@@ -107,9 +107,12 @@ public class QywxOpenController {
user.setUserId(loginUser.getClerkId());
user.setEnterpriseId(loginUser.getEnterpriseId());
user.setRealName(loginUser.getClerkName());
String fileName = "好办托管企微号" ;
Date startDate = new Date();
Date endDate = new Date() ;
String fileName = "好办托管企微号"+ "-" + DateUtil.formatString(startDate,"yyyy-MM-dd") + "到" + DateUtil.formatString(endDate,"yyyy-MM-dd");
if(null != startDate && null != endDate) {
fileName = "好办托管企微号" + "-" + DateUtil.formatString(startDate, "yyyy-MM-dd") + "到" + DateUtil.formatString(endDate, "yyyy-MM-dd");
}
// 1.组装数据查询条件
DownloadTask task = new DownloadTask();
task.setTaskTypeEnum(TaskTypeEnum.HAOBAN_OPEN_STAFF_LIST);
......@@ -237,6 +240,32 @@ public class QywxOpenController {
return RestResponse.successResult(resp.getResult());
}
/**
* 删除托管
* @return
*/
@RequestMapping("del-open-staff")
public RestResponse<Void> delOpenStaff(Long openStaffId) {
ServiceResponse<Void> resp = this.openStaffApiService.delete(openStaffId) ;
if(!resp.isSuccess()) {
return RestResponse.failure("9999",resp.getMessage()) ;
}
return RestResponse.successResult();
}
/**
* 取消授权
* @return
*/
@RequestMapping("cancel-open-staff")
public RestResponse<Void> cancelOpenStaff(Long openStaffId) {
ServiceResponse<Void> resp = this.openStaffApiService.logout(openStaffId) ;
if(!resp.isSuccess()) {
return RestResponse.failure("9999",resp.getMessage()) ;
}
return RestResponse.successResult();
}
private String check(String wxEnterpriseId , String enterpriseId) {
return null ;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment