master
kira 7 years ago
parent faa2fcd7f8
commit b8d2dcf8c6

@ -1,15 +1,10 @@
package au.com.royalpay.payment.manage.citypartner.web; package au.com.royalpay.payment.manage.citypartner.web;
import au.com.royalpay.payment.manage.citypartner.beans.CityPartnerBean;
import au.com.royalpay.payment.manage.citypartner.core.CityPartnerRegisterService; import au.com.royalpay.payment.manage.citypartner.core.CityPartnerRegisterService;
import au.com.royalpay.payment.tools.http.HttpUtils;
import org.springframework.validation.Errors;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource; import javax.annotation.Resource;
import javax.validation.Valid;
/** /**
* Created by yixian on 2017-01-23. * Created by yixian on 2017-01-23.
@ -20,9 +15,9 @@ public class CityPartnerRegisterController {
@Resource @Resource
private CityPartnerRegisterService cityPartnerRegisterService; private CityPartnerRegisterService cityPartnerRegisterService;
@RequestMapping(method = RequestMethod.POST) // @RequestMapping(method = RequestMethod.POST)
public void register(@RequestBody @Valid CityPartnerBean partner, Errors errors) { // public void register(@RequestBody @Valid CityPartnerBean partner, Errors errors) {
HttpUtils.handleValidErrors(errors); // HttpUtils.handleValidErrors(errors);
cityPartnerRegisterService.saveRegistry(partner); // cityPartnerRegisterService.saveRegistry(partner);
} // }
} }

Loading…
Cancel
Save