|
@@ -1,5 +1,6 @@
|
|
package com.fdkankan.tk.controller;
|
|
package com.fdkankan.tk.controller;
|
|
|
|
|
|
|
|
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
import com.fdkankan.redis.util.RedisUtil;
|
|
import com.fdkankan.redis.util.RedisUtil;
|
|
import com.fdkankan.tk.common.ResultCode;
|
|
import com.fdkankan.tk.common.ResultCode;
|
|
import com.fdkankan.tk.common.ResultData;
|
|
import com.fdkankan.tk.common.ResultData;
|
|
@@ -13,6 +14,7 @@ import com.fdkankan.tk.response.WxUserVo;
|
|
import com.fdkankan.tk.service.IWxConfigService;
|
|
import com.fdkankan.tk.service.IWxConfigService;
|
|
import com.fdkankan.tk.service.IWxService;
|
|
import com.fdkankan.tk.service.IWxService;
|
|
import com.fdkankan.tk.service.IWxUserService;
|
|
import com.fdkankan.tk.service.IWxUserService;
|
|
|
|
+import org.apache.commons.lang3.StringUtils;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.web.bind.annotation.*;
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
@@ -63,9 +65,16 @@ public class WxApiController extends BaseController{
|
|
* 全部房间列表
|
|
* 全部房间列表
|
|
*/
|
|
*/
|
|
@GetMapping("/delUser")
|
|
@GetMapping("/delUser")
|
|
- public ResultData delUser(@RequestParam(required = false) String wxUserId){
|
|
|
|
-
|
|
|
|
- wxUserService.removeById(wxUserId);
|
|
|
|
|
|
+ public ResultData delUser(@RequestParam(required = false) String wxUserId,
|
|
|
|
+ @RequestParam(required = false) String phone){
|
|
|
|
+ if(StringUtils.isNotBlank(wxUserId)){
|
|
|
|
+ wxUserService.removeById(wxUserId);
|
|
|
|
+ }
|
|
|
|
+ if(StringUtils.isNotBlank(phone)){
|
|
|
|
+ LambdaQueryWrapper<WxUser> wrapper = new LambdaQueryWrapper<>();
|
|
|
|
+ wrapper.eq(WxUser::getPhoneNumber,phone);
|
|
|
|
+ wxUserService.remove(wrapper);
|
|
|
|
+ }
|
|
return ResultData.ok();
|
|
return ResultData.ok();
|
|
}
|
|
}
|
|
|
|
|