|
|
|
@ -20,6 +20,7 @@ import org.springframework.web.bind.annotation.*; |
|
|
|
|
|
|
|
|
|
import javax.annotation.Resource; |
|
|
|
|
import javax.servlet.http.HttpServletRequest; |
|
|
|
|
import java.text.SimpleDateFormat; |
|
|
|
|
import java.util.Date; |
|
|
|
|
import java.util.HashMap; |
|
|
|
|
import java.util.List; |
|
|
|
@ -45,8 +46,8 @@ public class HighUserController { |
|
|
|
|
@RequestParam(value = "name", required = false) String name, |
|
|
|
|
@RequestParam(value = "phone", required = false) String phone, |
|
|
|
|
@RequestParam(value = "status", required = false) Integer status, |
|
|
|
|
@RequestParam(value = "regTimeStart", required = false) Date regTimeStart, |
|
|
|
|
@RequestParam(value = "regTimeEnd", required = false) Date regTimeEnd, |
|
|
|
|
@RequestParam(value = "regTimeStart", required = false) Long regTimeStart, |
|
|
|
|
@RequestParam(value = "regTimeEnd", required = false) Long regTimeEnd, |
|
|
|
|
@RequestParam(name = "pageNum", required = true) Integer pageNum, |
|
|
|
|
@RequestParam(name = "pageSize", required = true) Integer pageSize |
|
|
|
|
) { |
|
|
|
@ -64,10 +65,10 @@ public class HighUserController { |
|
|
|
|
map.put("status", Integer.toString(status)); |
|
|
|
|
} |
|
|
|
|
if (regTimeStart != null) { |
|
|
|
|
map.put("regTimeStart", DateUtil.date2String(regTimeStart,DateUtil.ymd_HM)); |
|
|
|
|
map.put("regTimeStart", new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(regTimeStart)); |
|
|
|
|
} |
|
|
|
|
if (regTimeEnd != null) { |
|
|
|
|
map.put("regTimeEnd", DateUtil.date2String(regTimeEnd,DateUtil.ymd_HM)); |
|
|
|
|
map.put("regTimeEnd", new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(regTimeEnd)); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
PageHelper.startPage(pageNum, pageSize); |
|
|
|
@ -96,7 +97,7 @@ public class HighUserController { |
|
|
|
|
|
|
|
|
|
@RequestMapping(value = "/forbiddenUser", method = RequestMethod.GET) |
|
|
|
|
@ResponseBody |
|
|
|
|
@ApiOperation(value = "禁用账号") |
|
|
|
|
@ApiOperation(value = "禁用启用账号") |
|
|
|
|
public ResponseData forbiddenUser(@RequestParam(value = "userId" , required = true) Long userId) { |
|
|
|
|
try { |
|
|
|
|
|
|
|
|
@ -107,7 +108,11 @@ public class HighUserController { |
|
|
|
|
throw ErrorHelp.genException(SysCode.System, ErrorCode.NOT_FOUND_USER_ERROR, ""); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (highUser.getStatus() == 1) { |
|
|
|
|
highUser.setStatus(0); |
|
|
|
|
} else { |
|
|
|
|
highUser.setStatus(1); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
highUserService.updateUser(highUser); |
|
|
|
|
|
|
|
|
|