| | |
| | | package com.ruoyi.web.controller.user; |
| | | |
| | | import cn.hutool.core.util.ObjectUtil; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.ruoyi.common.core.controller.BaseController; |
| | | import com.ruoyi.common.core.domain.AjaxResult; |
| | | import com.ruoyi.common.core.domain.entity.SysUser; |
| | | import com.ruoyi.common.core.page.TableDataInfo; |
| | | import com.ruoyi.common.utils.StringUtils; |
| | | import com.ruoyi.system.domain.UserAccount; |
| | | import com.ruoyi.system.domain.vo.UserAccountUpdateVo; |
| | | import com.ruoyi.system.domain.vo.UserAccountVo; |
| | | import com.ruoyi.system.service.UserAccountService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import java.util.List; |
| | | import java.util.Objects; |
| | | |
| | | @RestController |
| | | @RequestMapping("/im/user") |
| | |
| | | UserAccountService userAccountService; |
| | | |
| | | /** |
| | | * 获取用户列表 |
| | | * 获取会员列表 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('im:user:list')") |
| | | @GetMapping("/list") |
| | |
| | | { |
| | | startPage(); |
| | | List<UserAccount> list = userAccountService.list(new LambdaQueryWrapper<UserAccount>() |
| | | .eq(UserAccount::getId, vo.getId()) |
| | | .eq(UserAccount::getId, vo.getKeyword()) |
| | | .or() |
| | | .eq(UserAccount::getPhoneNumber, vo.getPhoneNumber()) |
| | | .eq(UserAccount::getPhoneNumber, vo.getKeyword()) |
| | | .or() |
| | | .eq(UserAccount::getAccount, vo.getAccount()) |
| | | .eq(UserAccount::getAccount, vo.getKeyword()) |
| | | .or() |
| | | .eq(UserAccount::getNickname, vo.getNickname()) |
| | | .eq(UserAccount::getNickname, vo.getKeyword()) |
| | | .eq(ObjectUtil.isNotEmpty(vo.getAccountType()),UserAccount::getAccountType,vo.getAccountType()) |
| | | .eq(ObjectUtil.isNotEmpty(vo.getStatus()),UserAccount::getStatus,vo.getStatus()) |
| | | .between(UserAccount::getCreateTime,vo.getStartTime(),vo.getEndTime()) |
| | | ); |
| | | return getDataTable(list); |
| | | } |
| | | |
| | | /** |
| | | * 修改会员 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('im:user:updateUserAccount')") |
| | | @GetMapping("/updateUserAccount") |
| | | public AjaxResult updateUserAccount(UserAccountUpdateVo vo) { |
| | | |
| | | try { |
| | | UserAccount userAccount = userAccountService.getById(vo.getId()); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | logger.error("修改会员失败!"); |
| | | } |
| | | return AjaxResult.success(); |
| | | } |
| | | |
| | | } |