| | |
| | | import com.example.jz.modle.entity.*; |
| | | import com.example.jz.service.*; |
| | | import com.example.jz.utils.Md5Utils; |
| | | import com.sun.org.apache.bcel.internal.generic.NEW; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | } |
| | | |
| | | |
| | | @GetMapping("/status") |
| | | @ApiOperation("禁用/启用用户") |
| | | public R updateStatus(Integer id,Integer status){ |
| | | int newStatus = 0; |
| | | if(status!=null){ |
| | | if(status==1){ |
| | | newStatus=0; |
| | | }else{ |
| | | newStatus=1; |
| | | } |
| | | } |
| | | userService.update(new UpdateWrapper<User>().set("status", newStatus).eq("id",id)); |
| | | return R.ok(); |
| | | } |
| | | |
| | | @PostMapping("/manager") |
| | | @ApiOperation("添加管理") |
| | | public R addManager(@RequestBody ManagerDto managerDto) { |