|
@@ -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.vo.WhiteUserVo;
|
|
|
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 javax.servlet.http.HttpServletRequest;
|
|
|
+import java.text.SimpleDateFormat;
|
|
|
+import java.util.Date;
|
|
|
+
|
|
|
|
|
|
@RestController
|
|
|
@RequestMapping(value = "/white/user")
|
|
|
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
|
|
|
private WhiteUserService whiteUserService;
|
|
|
|