Commit c7196569 authored by neo's avatar neo

[LOG] add log info for api vimapping

parent 0fb98139
package pwc.taxtech.atms.controller;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
......@@ -19,6 +21,7 @@ import java.util.UUID;
@RequestMapping(value = "api/v1/vimapping")
@RestController
public class VoucherInvoiceMappingController {
private static Logger logger = LoggerFactory.getLogger(VoucherInvoiceMappingController.class);
@Autowired
private VoucherInvoiceMappingServiceImpl voucherInvoiceMappingService;
@Autowired
......@@ -40,6 +43,7 @@ public class VoucherInvoiceMappingController {
produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
public ResponseEntity SaveVourcherMappings(@RequestBody List<VoucherMappingDto> list, @PathVariable int period
, @PathVariable int IsAddition) {
logger.info("savevmappings/{period}/{IsAddition}");
list.forEach(m -> {
m.ID = UUID.randomUUID().toString();
m.CreatorID = identityService.getIdentityUser().getID();
......@@ -50,11 +54,12 @@ public class VoucherInvoiceMappingController {
@RequestMapping(value = "saveimappings/{period}/{IsAddition}", method = RequestMethod.POST,
produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
public ResponseEntity SaveInvoiceMappings(@RequestBody List<InvoiceMappingDto> list, @PathVariable int period
, @PathVariable int isAddition) {
, @PathVariable int IsAddition) {
logger.info("savevmappings/{period}/{IsAddition}");
list.forEach(m -> {
m.ID = UUID.randomUUID().toString();
m.CreatorID = identityService.getIdentityUser().getID();
});
return ResponseEntity.ok().body(voucherInvoiceMappingService.SaveInvoiceMappings(list, period, isAddition == 2));
return ResponseEntity.ok().body(voucherInvoiceMappingService.SaveInvoiceMappings(list, period, IsAddition == 2));
}
}
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