Commit c7196569 authored by neo's avatar neo

[LOG] add log info for api vimapping

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