From 74e563da7fa6886449fd2be5933e2d4ca5c85f48 Mon Sep 17 00:00:00 2001 From: jack <jack.su@pollex.com.tw> Date: 星期二, 12 九月 2023 11:25:52 +0800 Subject: [PATCH] [UPDATE] 解決弱點Se: Incorrect definition of Serializable class [UPDATE] 解決弱點Information exposure to log file [UPDATE] 解決弱點Use of hard-coded password --- pamapi/src/main/java/com/pollex/pam/web/rest/SatisfactionResource.java | 24 +++++++++++------------- 1 files changed, 11 insertions(+), 13 deletions(-) diff --git a/pamapi/src/main/java/com/pollex/pam/web/rest/SatisfactionResource.java b/pamapi/src/main/java/com/pollex/pam/web/rest/SatisfactionResource.java index b4dbfdc..d1af1d5 100644 --- a/pamapi/src/main/java/com/pollex/pam/web/rest/SatisfactionResource.java +++ b/pamapi/src/main/java/com/pollex/pam/web/rest/SatisfactionResource.java @@ -2,8 +2,9 @@ import java.util.List; -import com.pollex.pam.enums.SatisfactionTypeEnum; -import com.pollex.pam.service.dto.SatisfactionSystemScoreDTO; +import com.pollex.pam.business.aop.logging.audit.AuditLoggingInject; +import com.pollex.pam.business.aop.logging.audit.AuditLoggingType; +import com.pollex.pam.business.enums.SatisfactionTypeEnum; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; @@ -14,11 +15,11 @@ import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; -import com.pollex.pam.domain.Satisfaction; -import com.pollex.pam.security.SecurityUtils; -import com.pollex.pam.service.SatisfactionService; -import com.pollex.pam.service.dto.SatisfactionCustomerScoreDTO; -import com.pollex.pam.service.dto.SatisfactionDTO; +import com.pollex.pam.business.domain.Satisfaction; +import com.pollex.pam.business.security.SecurityUtils; +import com.pollex.pam.business.service.SatisfactionService; +import com.pollex.pam.business.service.dto.SatisfactionCustomerScoreDTO; +import com.pollex.pam.business.service.dto.SatisfactionDTO; @RestController @RequestMapping("/api/satisfaction") @@ -30,12 +31,14 @@ @Autowired SatisfactionService satisfactionService; + @AuditLoggingInject(type = AuditLoggingType.CUSTOMER_FILL_SATISFACTION) @PostMapping("/score") public Satisfaction scorefaction(@RequestBody SatisfactionCustomerScoreDTO scoreDTO) { return satisfactionService.scorefaction(scoreDTO); } - @PostMapping("/score/all") + @AuditLoggingInject(type = AuditLoggingType.CUSTOMER_FILL_SATISFACTION) + @PostMapping("/score/all") public List<Satisfaction> scoreAllfaction(@RequestBody List<SatisfactionCustomerScoreDTO> scoreDTO) { return satisfactionService.scoreAllfaction(scoreDTO); } @@ -50,9 +53,4 @@ log.error("Not has agent code and customer id"); throw new IllegalArgumentException("Not has agent code and customer id"); } - - @PostMapping("/system/score") - public Satisfaction createSystemSatisfaction(@RequestBody SatisfactionSystemScoreDTO scoreDTO) { - return satisfactionService.fillSystemSatisfaction(scoreDTO); - } } -- Gitblit v1.8.0