Merge branch 'hotfix2' into develop

master
kira 6 years ago
commit 833352386f

@ -1,10 +1,17 @@
package au.com.royalpay.payment.manage.citypartner.web; package au.com.royalpay.payment.manage.citypartner.web;
import au.com.royalpay.payment.manage.citypartner.core.CityPartnerRegisterService;
import au.com.royalpay.payment.manage.citypartner.beans.CityPartnerBean;
import au.com.royalpay.payment.manage.citypartner.core.CityPartnerRegisterService;
import au.com.royalpay.payment.tools.exceptions.ForbiddenException;
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.
@ -15,9 +22,12 @@ 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); if (true) {
// } throw new ForbiddenException();
}
cityPartnerRegisterService.saveRegistry(partner);
}
} }

@ -57,7 +57,7 @@ public class CustomServiceImpl implements CustomService {
} }
CustomReport customReport = new CustomReport(addCustomVO.getOrder_id(), addCustomVO.getMch_custom_id(), addCustomVO.getMch_custom_name(), CustomReport customReport = new CustomReport(addCustomVO.getOrder_id(), addCustomVO.getMch_custom_id(), addCustomVO.getMch_custom_name(),
addCustomVO.getCustom()); addCustomVO.getCustom());
customReport.addExtMchCustom(addCustomVO.getMch_custom_id(), addCustomVO.getMch_custom_name()); customReport.addExtMchCustom(addCustomVO.getMch_ext_custom_id(), addCustomVO.getMch_ext_custom_name());
if (!CollectionUtils.isEmpty(addCustomVO.getSubOrders())) { if (!CollectionUtils.isEmpty(addCustomVO.getSubOrders())) {
addCustomVO.getSubOrders().forEach(p -> { addCustomVO.getSubOrders().forEach(p -> {
customReport.addSubOrder(p.getBigDecimal("order_fee"), p.getBigDecimal("order_fee").subtract(p.getBigDecimal("transport_fee"))); customReport.addSubOrder(p.getBigDecimal("order_fee"), p.getBigDecimal("order_fee").subtract(p.getBigDecimal("transport_fee")));

Loading…
Cancel
Save