|
|
|
@ -108,10 +108,16 @@ public class RiskBusinessServiceImpl implements RiskBusinessService, ManagerTodo
|
|
|
|
|
@Override
|
|
|
|
|
public JSONObject getRiskEventsByPage(JSONObject params, JSONObject manager) {
|
|
|
|
|
|
|
|
|
|
// TODO: 2018/10/19 BD看到的result_type应该是1或者4,后续改进
|
|
|
|
|
// 如果登录的角色是BD,添加查询条件result_type为1或者4,order_type为1或者2
|
|
|
|
|
if (ManagerRole.BD_USER.hasRole(manager.getIntValue("role"))) {
|
|
|
|
|
params.put("bd_id", manager.getString("manager_id"));
|
|
|
|
|
params.put("result_type", RiskResultTypeEnum.SEND_EMAIL_TO_BD.getResultType());
|
|
|
|
|
List<Integer> orderTypes = Arrays.asList(RiskOrderTypeEnum.WECHAT_ORDER.getOrderType(),
|
|
|
|
|
RiskOrderTypeEnum.ALIPAY_ORDER.getOrderType());
|
|
|
|
|
params.put("order_types", orderTypes);
|
|
|
|
|
|
|
|
|
|
List<Integer> resultTypes = Arrays.asList(RiskResultTypeEnum.SEND_EMAIL_TO_BD.getResultType(),
|
|
|
|
|
RiskResultTypeEnum.MATERIAL_NOT_PASS.getResultType());
|
|
|
|
|
params.put("result_types", resultTypes);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
PageList<JSONObject> riskEvents = riskEventMapper.listRisksByPage(params, new PageBounds(params.getInteger("page"), 10, Order.formString("create_time.desc")));
|
|
|
|
@ -574,7 +580,6 @@ public class RiskBusinessServiceImpl implements RiskBusinessService, ManagerTodo
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public void checkTodo(JSONObject manager, List<TodoNotice> notices) {
|
|
|
|
|
// TODO: 2018/10/19 后面把if判断里面的权限改一下
|
|
|
|
|
if (ManagerRole.BD_USER.hasRole(manager.getIntValue("role"))) {
|
|
|
|
|
JSONObject params = new JSONObject();
|
|
|
|
|
params.put("bd_id", manager.getString("manager_id"));
|
|
|
|
@ -586,7 +591,10 @@ public class RiskBusinessServiceImpl implements RiskBusinessService, ManagerTodo
|
|
|
|
|
params.put("client_moniker", client.getString("client_moniker"));
|
|
|
|
|
List<JSONObject> riskEventList = riskEventMapper.findAll(params);
|
|
|
|
|
for (JSONObject event : riskEventList) {
|
|
|
|
|
if (event.getIntValue("result_type") == 1) {
|
|
|
|
|
Integer resultType = event.getIntValue("result_type");
|
|
|
|
|
Integer orderType = event.getIntValue("order_type");
|
|
|
|
|
// Integer是对象,所以用equals方法比较
|
|
|
|
|
if ((resultType.equals(RiskResultTypeEnum.SEND_EMAIL_TO_BD.getResultType()) || resultType.equals(RiskResultTypeEnum.MATERIAL_NOT_PASS.getResultType())) && (orderType.equals(RiskOrderTypeEnum.WECHAT_ORDER.getOrderType()) || orderType.equals(RiskOrderTypeEnum.ALIPAY_ORDER.getOrderType()))) {
|
|
|
|
|
noticeFlag = true;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|