| | |
| | | import com.dg.core.annotation.Authorization; |
| | | import com.dg.core.db.gen.entity.SysUser; |
| | | import com.dg.core.manager.TokenManager; |
| | | import com.dg.core.util.SmsUtil; |
| | | import com.dg.core.util.TableDataInfo; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.data.redis.core.RedisTemplate; |
| | | import org.springframework.data.repository.query.Param; |
| | | import org.springframework.util.Assert; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import java.time.LocalDateTime; |
| | | import java.util.HashMap; |
| | |
| | | @Autowired |
| | | com.dg.core.service.ISysUserService IUserService; |
| | | |
| | | @Autowired |
| | | SmsUtil smsUtil; |
| | | |
| | | @Autowired |
| | | TokenManager tokenManager; |
| | |
| | | return ResultData.success(map); |
| | | } |
| | | |
| | | @ApiOperation("发送登录短信验证码") |
| | | @PostMapping(value = "/sendSms", consumes = "application/json") |
| | | public ResultData smsSend(@RequestBody SysUser user) { |
| | | return IUserService.smsSend(user); |
| | | } |
| | | |
| | | @ApiOperation("账号密码验证登录") |
| | | @GetMapping(value = "/loginByAccount") |
| | | public ResultData loginByAccount(@RequestParam String phonenumber,@RequestParam String code) { |
| | | return IUserService.loginByAccount(phonenumber,code); |
| | | } |
| | | |
| | | /** |
| | | * 查询列表 |
| | | * |
| | |
| | | */ |
| | | @ApiOperation("用户列表接口") |
| | | @GetMapping("/getlist") |
| | | @Authorization |
| | | public TableDataInfo selectConfigList(@RequestParam(value = "pageNum",required = false) Integer pageNum, |
| | | @RequestParam(value = "pageSize",required = false) Integer pageSize) |
| | | { |
| | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | } |