Commit 6937ec8b by guojuxing

短信模板

parent 62abfc56
package com.gic.operation.web.controller;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;
......@@ -7,6 +9,9 @@ import org.apache.commons.collections.CollectionUtils;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.propertyeditors.CustomDateEditor;
import org.springframework.web.bind.WebDataBinder;
import org.springframework.web.bind.annotation.InitBinder;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
......@@ -46,6 +51,13 @@ public class EnterpriseSmsController {
@Autowired
private EnterpriseApiService enterpriseApiService;
@InitBinder
public void initBinder(WebDataBinder binder) {
DateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");
dateFormat.setLenient(true);
binder.registerCustomEditor(Date.class, new CustomDateEditor(dateFormat, true));
}
@RequestMapping("/save-app")
public RestResponse saveApp(Integer enterpriseId, String appid, String appkey) {
return ResultControllerUtils.commonResult(smsOuterApiService.saveEnterpriseSmsApp(enterpriseId, appid, appkey));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment