From: kaixiang.xia Date: Thu, 3 Dec 2020 09:33:36 +0000 (+0800) Subject: 市民卡查询状态优化 X-Git-Tag: 1.0.29^2~1 X-Git-Url: https://source.supwisdom.com/gerrit/gitweb?a=commitdiff_plain;h=b5e44a745f0fc01f97e9f3ebbc744b7d63f733e2;p=epayment%2Ffood_payapi.git 市民卡查询状态优化 --- diff --git a/payapi/src/main/java/com/supwisdom/dlpay/system/service/impl/UserDataServiceImpl.java b/payapi/src/main/java/com/supwisdom/dlpay/system/service/impl/UserDataServiceImpl.java index 5a661b63..33d8df20 100644 --- a/payapi/src/main/java/com/supwisdom/dlpay/system/service/impl/UserDataServiceImpl.java +++ b/payapi/src/main/java/com/supwisdom/dlpay/system/service/impl/UserDataServiceImpl.java @@ -196,7 +196,9 @@ public class UserDataServiceImpl implements UserDataService { @Override public PageResult getUserCitizenCardPage(CitizenCardSearchBean param, int pageNo, int pageSize) { - StringBuffer querySql = new StringBuffer("select t.id as cid,t.cardno,t.cardtype,t.cardphyid,case when t.status='closed' then 'closed' else t.trans_status end as status,t.expiredate,a.id as bkid,a.cardno as bankcardno,a.signed,t.lastsaved,t.userid,p.name as username,p.idtype,p.idno,p.mobile,p.email,p.sex,t.bus_card_type as buscardtype \n" + + StringBuffer querySql = new StringBuffer("select t.id as cid,t.cardno,t.cardtype,t.cardphyid, \n" + + "case when t.status='closed' or a.status='closed' then 'closed' when t.status='normal' and a.status='normal' and t.trans_status='normal' and a.trans_status='normal' then 'normal' when t.trans_status='normal' then a.trans_status else t.trans_status end as status, \n" + + "t.expiredate,a.id as bkid,a.cardno as bankcardno,a.signed,t.lastsaved,t.userid,p.name as username,p.idtype,p.idno,p.mobile,p.email,p.sex,t.bus_card_type as buscardtype \n" + "from tb_card t left join tb_card a on a.cardtype='bankcard' and a.cardphyid=t.cardphyid and a.userid=t.userid left join tb_person p on p.userid=t.userid \n" + "where t.cardtype='citizencard' "); StringBuffer countSql = new StringBuffer("select count(t.id) as cnt \n" +