|  |  |  | 
|---|
|  |  |  | package com.doumee.cloud.admin; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import com.doumee.api.BaseController; | 
|---|
|  |  |  | import com.doumee.biz.system.SystemUserBiz; | 
|---|
|  |  |  | import com.doumee.config.DataSyncConfig; | 
|---|
|  |  |  | import com.doumee.config.annotation.CloudRequiredPermission; | 
|---|
|  |  |  | import com.doumee.config.annotation.LoginNoRequired; | 
|---|
|  |  |  | import com.doumee.core.annotation.excel.ExcelExporter; | 
|---|
|  |  |  | import com.doumee.core.annotation.pr.PreventRepeat; | 
|---|
|  |  |  | import com.doumee.core.annotation.trace.Trace; | 
|---|
|  |  |  | import com.doumee.core.model.ApiResponse; | 
|---|
|  |  |  | import com.doumee.core.model.PageData; | 
|---|
|  |  |  | import com.doumee.core.model.PageWrap; | 
|---|
|  |  |  | 
|---|
|  |  |  | import com.doumee.dao.business.dto.ResetPasswordDTO; | 
|---|
|  |  |  | import com.doumee.dao.business.model.Member; | 
|---|
|  |  |  | import com.doumee.dao.business.model.MemberRole; | 
|---|
|  |  |  | import com.doumee.dao.system.dto.UpdatePwdDto; | 
|---|
|  |  |  | import com.doumee.service.business.MemberService; | 
|---|
|  |  |  | import com.doumee.service.business.ext.ERPSyncService; | 
|---|
|  |  |  | import com.doumee.service.business.impl.hksync.fhk.HkSyncOrgUserFromHKServiceImpl; | 
|---|
|  |  |  | import io.swagger.annotations.*; | 
|---|
|  |  |  | import org.apache.shiro.authz.annotation.RequiresPermissions; | 
|---|
|  |  |  | import org.springframework.beans.factory.annotation.Autowired; | 
|---|
|  |  |  | import org.springframework.validation.annotation.Validated; | 
|---|
|  |  |  | import org.springframework.web.bind.annotation.*; | 
|---|
|  |  |  | import org.springframework.web.multipart.MultipartFile; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 
|---|
|  |  |  | @Autowired | 
|---|
|  |  |  | private MemberService memberService; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Autowired | 
|---|
|  |  |  | private SystemUserBiz systemUserBiz; | 
|---|
|  |  |  | @PreventRepeat | 
|---|
|  |  |  | @ApiOperation("新建") | 
|---|
|  |  |  | @PostMapping("/create") | 
|---|
|  |  |  | 
|---|
|  |  |  | @ApiOperation("查询全部") | 
|---|
|  |  |  | @PostMapping("/list") | 
|---|
|  |  |  | @CloudRequiredPermission("business:member:query") | 
|---|
|  |  |  | public ApiResponse<List<Member>> findPage (@RequestBody Member model,@RequestHeader(Constants.HEADER_USER_TOKEN) String token){ | 
|---|
|  |  |  | public ApiResponse<List<Member>> list (@RequestBody Member model,@RequestHeader(Constants.HEADER_USER_TOKEN) String token){ | 
|---|
|  |  |  | return ApiResponse.success(memberService.findList(model)); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | @ApiOperation("查询全部司机") | 
|---|
|  |  |  | @PostMapping("/driveList") | 
|---|
|  |  |  | @CloudRequiredPermission("business:member:query") | 
|---|
|  |  |  | public ApiResponse<List<Member>> findDriveList (@RequestBody Member model,@RequestHeader(Constants.HEADER_USER_TOKEN) String token){ | 
|---|
|  |  |  | return ApiResponse.success(memberService.findDriveList(model)); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Trace(withRequestParameters = false) | 
|---|
|  |  |  | @ApiOperation("修改当前用户密码") | 
|---|
|  |  |  | @PostMapping("/updatePwd") | 
|---|
|  |  |  | public ApiResponse updatePwd (@RequestHeader(Constants.HEADER_USER_TOKEN) String token, @Validated @RequestBody UpdatePwdDto dto) { | 
|---|
|  |  |  | dto.setUserId(this.getLoginUser(token).getId()); | 
|---|
|  |  |  | systemUserBiz.updatePwd(dto); | 
|---|
|  |  |  | return ApiResponse.success(null); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | } | 
|---|