| | |
| | | import com.xcong.excoin.modules.test.service.TestUserService; |
| | | import com.xcong.excoin.modules.test.vo.TestUserVo; |
| | | import com.xcong.excoin.utils.MessageSourceUtils; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import io.swagger.annotations.ApiResponse; |
| | | import io.swagger.annotations.ApiResponses; |
| | | import io.swagger.annotations.*; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.security.core.context.SecurityContextHolder; |
| | | import org.springframework.validation.annotation.Validated; |
| | |
| | | return Result.fail("fail"); |
| | | } |
| | | |
| | | @ApiOperation(value = "修改测试用户", notes = "该接口用户修改测试用户") |
| | | @PostMapping(value = "/modify") |
| | | public Result modify(@RequestBody @Validated TestUserDto testUserDto) { |
| | | TestUserEntity testUserEntity = TestUserEntityMapper.INSTANCE.dtoToEntity(testUserDto); |
| | | log.info("#-------->{}#", testUserEntity); |
| | | boolean flag = testUserService.updateById(testUserEntity); |
| | | if (flag) { |
| | | return Result.ok("success"); |
| | | } |
| | | return Result.fail("fail"); |
| | | } |
| | | |
| | | |
| | | @ApiOperation(value = "根据ID删除用户", notes = "根据ID删除用户") |
| | | @GetMapping(value = "/del/{id}") |
| | | public Result del(@PathVariable(value = "id") Long id) { |