交易流水时间查询bug

master
liuxinxin 5 years ago
parent ca27ab3cf7
commit 4eced16988

@ -24,6 +24,9 @@ public interface ClientApplyMapper {
@AutoSql(type = SqlType.SELECT) @AutoSql(type = SqlType.SELECT)
JSONObject findClientApplicationById(@Param("client_apply_id") String client_apply_id); JSONObject findClientApplicationById(@Param("client_apply_id") String client_apply_id);
@AutoSql(type = SqlType.SELECT)
JSONObject findClientApplicationByClientMoniker(@Param("client_moniker") String client_moniker);
PageList<JSONObject> listPartnerApplications(JSONObject params, PageBounds pageBounds); PageList<JSONObject> listPartnerApplications(JSONObject params, PageBounds pageBounds);
@AutoSql(type = SqlType.COUNT) @AutoSql(type = SqlType.COUNT)

@ -218,8 +218,36 @@ public class ClientApplyImpl implements ClientApply, ApplicationEventPublisherAw
partner.put("bd_user", manager.getString("manager_id")); partner.put("bd_user", manager.getString("manager_id"));
partner.put("bd_user_name", manager.getString("display_name")); partner.put("bd_user_name", manager.getString("display_name"));
if (clientMapper.findClientByMoniker(info.getClientMoniker()) != null) { JSONObject client;
throw new BadRequestException("error.partner.valid.dumplicate_client_moniker");
if ((client = clientMapper.findClientByMoniker(info.getClientMoniker())) != null) {
if( manager.getString("manager_id").equals(client.getString("creator")) )
{
if(clientApplyMapper.findClientApplicationByClientMoniker(info.getClientMoniker()) != null)
{
throw new BadRequestException("无效,已关联商户");
}
JSONObject client_bd = new JSONObject();
client_bd.put("client_id", partner.getIntValue("client_id"));
client_bd.put("bd_id", manager.getString("manager_id"));
client_bd.put("bd_name", manager.getString("display_name"));
client_bd.put("create_time", new Date());
client_bd.put("create_id", manager.getString("manager_id"));
client_bd.put("start_date", new Date());
client_bd.put("proportion", 1);
clientBDMapper.saveBD(client_bd);
apply.put("client_apply_id", client_apply_id);
apply.put("client_id", partner.getIntValue("client_id"));
apply.put("client_moniker", info.getClientMoniker());
apply.put("apply_approve_result", 2);
apply.put("apply_approve_time", new Date());
clientApplyMapper.updatePartnerApplication(apply);
return partner;
}
throw new BadRequestException("您只能关联自己创建的商户");
//throw new BadRequestException("error.partner.valid.dumplicate_client_moniker");
} }
partner.put("source", 2);//自主申请 partner.put("source", 2);//自主申请
partner.put("country", "AUS");//自主申请 partner.put("country", "AUS");//自主申请

Loading…
Cancel
Save