|
@@ -11,13 +11,25 @@ import cn.rankin.data.api.user.dto.WhiteUserSearchDTO;
|
|
import cn.rankin.data.api.user.entity.WhiteUser;
|
|
import cn.rankin.data.api.user.entity.WhiteUser;
|
|
import cn.rankin.data.api.user.vo.WhiteUserVo;
|
|
import cn.rankin.data.api.user.vo.WhiteUserVo;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
+import org.springframework.beans.propertyeditors.CustomDateEditor;
|
|
|
|
+import org.springframework.web.bind.ServletRequestDataBinder;
|
|
import org.springframework.web.bind.annotation.*;
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
|
|
+import javax.servlet.http.HttpServletRequest;
|
|
|
|
+import java.text.SimpleDateFormat;
|
|
|
|
+import java.util.Date;
|
|
|
|
+
|
|
|
|
|
|
@RestController
|
|
@RestController
|
|
@RequestMapping(value = "/white/user")
|
|
@RequestMapping(value = "/white/user")
|
|
public class WhiteUserController {
|
|
public class WhiteUserController {
|
|
|
|
|
|
|
|
+ @InitBinder
|
|
|
|
+ protected void initBinder(HttpServletRequest request, ServletRequestDataBinder binder) throws Exception {
|
|
|
|
+ binder.registerCustomEditor(Date.class,
|
|
|
|
+ new CustomDateEditor(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"), true));
|
|
|
|
+ }
|
|
|
|
+
|
|
@Autowired
|
|
@Autowired
|
|
private WhiteUserService whiteUserService;
|
|
private WhiteUserService whiteUserService;
|
|
|
|
|