[RoyalPay]商户雷同信息检测

master
liuxinxin 6 years ago
parent b53b11a1a1
commit 02f4cb1675

@ -30,6 +30,12 @@ public interface ClientMapper {
List<JSONObject> listGreenChannel(JSONObject params);
JSONObject findSamePhone(@Param("contact_phone") String contactPhone);
JSONObject findSameEmail(@Param("contact_email") String contactEmail);
JSONObject findSameAddress(@Param("address") String address);
@AutoSql(type = SqlType.SELECT)
JSONObject findClientIgnoreInvalid(int clientId);

@ -344,6 +344,26 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
if (manager != null) {
checkClientOrg(manager, client);
}
String same_phone = clientMapper.findSamePhone(client.getString("contact_phone")).getString("a");
if(same_phone!=null&& client.getString("contact_phone")!= null&&same_phone.contains(" ") ) {
same_phone = same_phone.replace(client.getString("client_moniker"),"");
client.put("same_phone","(雷同商户:"+same_phone+")" );
}
String same_email = clientMapper.findSameEmail(client.getString("contact_email")).getString("a");
if(same_email!=null&& client.getString("contact_email")!= null&&same_email.contains(" ") ) {
same_email = same_email.replace(client.getString("client_moniker"),"");
client.put("same_email","(雷同商户:"+same_email+")" );
}
String same_address = clientMapper.findSameAddress(client.getString("address")).getString("a");
if(same_address!=null&& client.getString("address")!= null&&same_address.contains(" ") ) {
same_address = same_address.replace(client.getString("client_moniker"),"");
client.put("same_address","(雷同商户:"+same_address+")" );
}
client.putAll(clientConfigService.find(client.getIntValue("client_id")));
client.put("unsubscribe", mailUnsubMapper.findOneByClientMoniker(clientMoniker) == null ? false : true);
client.put("show_all_permission", true);

@ -701,4 +701,40 @@
AND is_valid = 1
) b
</select>
<select id="findSamePhone" resultType="com.alibaba.fastjson.JSONObject">
SELECT
contact_phone,
GROUP_CONCAT(client_moniker separator ' ') a
FROM
sys_clients
WHERE contact_phone= #{contact_phone}
GROUP BY
contact_phone
</select>
<select id="findSameEmail" resultType="com.alibaba.fastjson.JSONObject">
SELECT
contact_email,
GROUP_CONCAT(client_moniker separator ' ') a
FROM
sys_clients
WHERE contact_email= #{contact_email}
GROUP BY
contact_email
</select>
<select id="findSameAddress" resultType="com.alibaba.fastjson.JSONObject">
SELECT
address,
GROUP_CONCAT(client_moniker separator ' ') a
FROM
sys_clients
WHERE address= #{address}
GROUP BY
address
</select>
</mapper>

@ -703,6 +703,7 @@
<div class="col-sm-8">
<p class="form-control-static" ng-bind="partner.contact_phone"></p>
<p class="description-text text-red" ng-bind="partner.same_phone"></p>
</div>
</div>
<div class="form-group col-sm-6">
@ -723,6 +724,7 @@
ng-if="partner.unsubscribe" class="fa fa-star-o text-yellow"></i>
</span>
</p>
<p class="description-text text-red" ng-bind="partner.same_email"></p>
</div>
</div>
</div>
@ -739,6 +741,7 @@
<div class="col-sm-8">
<p class="form-control-static" ng-bind="partner.address"></p>
<p class="description-text text-red" ng-bind="partner.same_address"></p>
</div>
</div>
<div class="form-group col-sm-6">

Loading…
Cancel
Save