diff --git a/src/main/java/au/com/royalpay/payment/manage/mappers/system/ClientBDMapper.java b/src/main/java/au/com/royalpay/payment/manage/mappers/system/ClientBDMapper.java index 09bc51de0..b8e390f0b 100644 --- a/src/main/java/au/com/royalpay/payment/manage/mappers/system/ClientBDMapper.java +++ b/src/main/java/au/com/royalpay/payment/manage/mappers/system/ClientBDMapper.java @@ -25,6 +25,8 @@ public interface ClientBDMapper { List listClientBDInfoAvailable(@Param("client_id") int clientId, @Param("date") Date date); + List listBDClientInfo(JSONObject param); + void updateClientDB(JSONObject jsonObject); @AutoSql(type = SqlType.UPDATE) diff --git a/src/main/java/au/com/royalpay/payment/manage/riskbusiness/core/RiskBusinessService.java b/src/main/java/au/com/royalpay/payment/manage/riskbusiness/core/RiskBusinessService.java index e5b695785..94ac8396b 100644 --- a/src/main/java/au/com/royalpay/payment/manage/riskbusiness/core/RiskBusinessService.java +++ b/src/main/java/au/com/royalpay/payment/manage/riskbusiness/core/RiskBusinessService.java @@ -25,7 +25,7 @@ public interface RiskBusinessService { * @param params * @return */ - JSONObject getRiskEventsByPage(JSONObject params); + JSONObject getRiskEventsByPage(JSONObject params, JSONObject manager); /** * 风险事件详情 diff --git a/src/main/java/au/com/royalpay/payment/manage/riskbusiness/web/RiskBusinessController.java b/src/main/java/au/com/royalpay/payment/manage/riskbusiness/web/RiskBusinessController.java index 1b635203e..ba33b0ab9 100644 --- a/src/main/java/au/com/royalpay/payment/manage/riskbusiness/web/RiskBusinessController.java +++ b/src/main/java/au/com/royalpay/payment/manage/riskbusiness/web/RiskBusinessController.java @@ -29,7 +29,7 @@ import java.util.List; * @Date 2018/10/10 1:12 */ @RestController -@ManagerMapping(value = "/risk/business/", role = {ManagerRole.OPERATOR, ManagerRole.ADMIN}) +@ManagerMapping(value = "/risk/business/", role = {ManagerRole.OPERATOR, ManagerRole.ADMIN, ManagerRole.BD_USER, ManagerRole.RISK_MANAGER}) public class RiskBusinessController { @Autowired @@ -39,9 +39,9 @@ public class RiskBusinessController { private ClientManager clientManager; @GetMapping(value = "events") - public JSONObject getRiskEvents(RiskEventQuery riskEventQuery) { + public JSONObject getRiskEvents(RiskEventQuery riskEventQuery, @ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) { JSONObject params = riskEventQuery.toJSON(); - return riskBusinessService.getRiskEventsByPage(params); + return riskBusinessService.getRiskEventsByPage(params, manager); } @GetMapping(value = "events/{risk_id}") diff --git a/src/main/java/au/com/royalpay/payment/manage/riskbusiness/web/RiskFileUploadController.java b/src/main/java/au/com/royalpay/payment/manage/riskbusiness/web/RiskFileUploadController.java index 87099d74a..50a7c8500 100644 --- a/src/main/java/au/com/royalpay/payment/manage/riskbusiness/web/RiskFileUploadController.java +++ b/src/main/java/au/com/royalpay/payment/manage/riskbusiness/web/RiskFileUploadController.java @@ -45,4 +45,5 @@ public class RiskFileUploadController { riskUploadService.submitMaterial(material); riskUploadService.deleteUploadMailKey(codeKey); } + } diff --git a/src/main/resources/au/com/royalpay/payment/manage/mappers/riskbusiness/RiskEventMapper.xml b/src/main/resources/au/com/royalpay/payment/manage/mappers/riskbusiness/RiskEventMapper.xml index b1d3109a3..e0c574170 100644 --- a/src/main/resources/au/com/royalpay/payment/manage/mappers/riskbusiness/RiskEventMapper.xml +++ b/src/main/resources/au/com/royalpay/payment/manage/mappers/riskbusiness/RiskEventMapper.xml @@ -50,6 +50,10 @@ on re.risk_id = temp.risk_id + + LEFT JOIN sys_client_bd scb + ON sc.client_id = scb.client_id + AND re.risk_id = #{risk_id} @@ -78,6 +82,9 @@ AND re.reply_email_date = #{reply_email_date} + + AND scb.bd_id = #{bd_id} + diff --git a/src/main/resources/au/com/royalpay/payment/manage/mappers/system/ClientBDMapper.xml b/src/main/resources/au/com/royalpay/payment/manage/mappers/system/ClientBDMapper.xml index d525812a4..a80c8423e 100644 --- a/src/main/resources/au/com/royalpay/payment/manage/mappers/system/ClientBDMapper.xml +++ b/src/main/resources/au/com/royalpay/payment/manage/mappers/system/ClientBDMapper.xml @@ -41,11 +41,29 @@ #{date} OR end_date IS NULL) AND - b.is_valid = 1 + INNER JOIN sys_client_bd b + ON b.bd_id = m.manager_id + WHERE client_id = #{client_id} + AND start_date <= #{date} + AND (end_date > #{date} OR end_date IS NULL) + AND b.is_valid = 1 + ]]> + + + + + + + + + + + + +
+ Submit +
+ + \ No newline at end of file diff --git a/src/main/ui/static/analysis/templates/riskEvent_detail.html b/src/main/ui/static/analysis/templates/riskEvent_detail.html index bda8cddc8..78c510c4b 100644 --- a/src/main/ui/static/analysis/templates/riskEvent_detail.html +++ b/src/main/ui/static/analysis/templates/riskEvent_detail.html @@ -1,8 +1,4 @@