|
|
@ -18,6 +18,9 @@ |
|
|
|
package com.epmet.controller; |
|
|
|
|
|
|
|
import com.epmet.commons.tools.annotation.LoginUser; |
|
|
|
import com.epmet.commons.tools.constant.AppClientConstant; |
|
|
|
import com.epmet.commons.tools.exception.EpmetErrorCode; |
|
|
|
import com.epmet.commons.tools.exception.EpmetException; |
|
|
|
import com.epmet.commons.tools.page.PageData; |
|
|
|
import com.epmet.commons.tools.security.dto.TokenDto; |
|
|
|
import com.epmet.commons.tools.utils.ConvertUtils; |
|
|
@ -29,9 +32,11 @@ import com.epmet.commons.tools.validator.group.AddGroup; |
|
|
|
import com.epmet.commons.tools.validator.group.DefaultGroup; |
|
|
|
import com.epmet.commons.tools.validator.group.UpdateGroup; |
|
|
|
import com.epmet.dto.OperUserDTO; |
|
|
|
import com.epmet.dto.PasswordDTO; |
|
|
|
import com.epmet.dto.result.QueryOperUserResultDto; |
|
|
|
import com.epmet.excel.OperUserExcel; |
|
|
|
import com.epmet.service.OperUserService; |
|
|
|
import org.apache.commons.lang3.StringUtils; |
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
import org.springframework.web.bind.annotation.*; |
|
|
|
|
|
|
@ -82,6 +87,22 @@ public class OperUserController { |
|
|
|
return new Result(); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* desc:修改运营端用户 密码 |
|
|
|
* @param tokenDto |
|
|
|
* @param dto |
|
|
|
* @return |
|
|
|
*/ |
|
|
|
@PostMapping(value = "updatePwd") |
|
|
|
public Result updatePwd(@LoginUser TokenDto tokenDto,@RequestBody PasswordDTO dto) { |
|
|
|
if (StringUtils.isBlank(dto.getNewPassword()) && AppClientConstant.APP_OPER.equals(tokenDto.getClient())){ |
|
|
|
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(),"参数错误","参数错误"); |
|
|
|
} |
|
|
|
operUserService.updatePwd(tokenDto.getUserId(),dto); |
|
|
|
return new Result(); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@DeleteMapping |
|
|
|
public Result delete(@RequestBody String[] ids) { |
|
|
|
//效验数据
|
|
|
|