[RoyalPay]新增Company name重复检测

master
liuxinxin 5 years ago
parent dcdd13da89
commit cd171f5bc2

@ -32,6 +32,8 @@ public interface ClientMapper {
JSONObject findSamePhone(@Param("contact_phone") String contactPhone); JSONObject findSamePhone(@Param("contact_phone") String contactPhone);
JSONObject findSameCompanyName(@Param("company_name") String contactPhone);
JSONObject findSameEmail(@Param("contact_email") String contactEmail); JSONObject findSameEmail(@Param("contact_email") String contactEmail);
JSONObject findSameAddress(@Param("address") String address); JSONObject findSameAddress(@Param("address") String address);

@ -351,6 +351,12 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
client.put("same_phone","(雷同商户:"+same_phone+")" ); client.put("same_phone","(雷同商户:"+same_phone+")" );
} }
String same_company_name = clientMapper.findSameCompanyName(client.getString("company_name")).getString("a");
if(same_company_name!=null&& client.getString("company_name")!= null&&same_company_name.contains(" ") ) {
same_company_name = same_company_name.replace(client.getString("client_moniker"),"");
client.put("same_company_name","(雷同商户:"+same_company_name+")" );
}
String same_email = clientMapper.findSameEmail(client.getString("contact_email")).getString("a"); String same_email = clientMapper.findSameEmail(client.getString("contact_email")).getString("a");
if(same_email!=null&& client.getString("contact_email")!= null&&same_email.contains(" ") ) { if(same_email!=null&& client.getString("contact_email")!= null&&same_email.contains(" ") ) {
same_email = same_email.replace(client.getString("client_moniker"),""); same_email = same_email.replace(client.getString("client_moniker"),"");

@ -714,6 +714,18 @@
</select> </select>
<select id="findSameCompanyName" resultType="com.alibaba.fastjson.JSONObject">
SELECT
company_name,
GROUP_CONCAT(client_moniker separator ' ') a
FROM
sys_clients
WHERE company_name= #{company_name}
GROUP BY
company_name
</select>
<select id="findSameEmail" resultType="com.alibaba.fastjson.JSONObject"> <select id="findSameEmail" resultType="com.alibaba.fastjson.JSONObject">
SELECT SELECT
contact_email, contact_email,

@ -332,11 +332,14 @@
<label class="control-label col-sm-2">Company Name</label> <label class="control-label col-sm-2">Company Name</label>
<div class="col-sm-10"> <div class="col-sm-10">
<p class="form-control-static pull-left" ng-bind="partner.company_name"></p> <p class="form-control-static">
<p class="form-control-static pull-left" <span ng-bind="partner.company_name"></span>
<span
ng-if="isComplianceOfCompanyName && partner.open_status" ng-if="isComplianceOfCompanyName && partner.open_status"
style="margin-left: 10px;font-weight: 700;color: red;"> style="margin-left: 10px;font-weight: 700;color: red;">
注意:(微信渠道可能不合规) 注意:(微信渠道可能不合规)
</span>
<span class="description-text text-red" ng-bind="partner.same_company_name"></span>
</p> </p>
</div> </div>
</div> </div>

Loading…
Cancel
Save