StringcaseWhen="(sm.sBankTypeID is not null and sm.sBankTypeID != '' and sm.sBankAccount is not null and sm.sBankAccount != '' and sm.sBankAccountNO is not null and sm.sBankAccountNO != '')";
Stringsql=""
Stringsql=""
+"select "
+"select "
+"top 1 "
+"top 1 "
...
@@ -781,10 +782,10 @@ public class UserServiceImpl implements UserService {
...
@@ -781,10 +782,10 @@ public class UserServiceImpl implements UserService {
+"sm.sOpenID, "
+"sm.sOpenID, "
+"sm.sBindOpenID, "
+"sm.sBindOpenID, "
+"sm.sPlugid, "
+"sm.sPlugid, "
+"case when (sm.sBankTypeID is not null and sm.sBankTypeID != '' and sm.sBankAccount is not null and sm.sBankAccount != '' and sm.sBankAccountNO is not null and sm.sBankAccountNO != '') then sm.sBankTypeID else o.sBankTypeID end sBankTypeID, "
+"case when "+caseWhen+" then sm.sBankTypeID else o.sBankTypeID end sBankTypeID, "
+"case when (sm.sBankTypeID is not null and sm.sBankTypeID != '' and sm.sBankAccount is not null and sm.sBankAccount != '' and sm.sBankAccountNO is not null and sm.sBankAccountNO != '') then sm.sBankType else o.sBankType end sBankType, "
+"case when "+caseWhen+" then sm.sBankType else o.sBankType end sBankType, "
+"case when (sm.sBankTypeID is not null and sm.sBankTypeID != '' and sm.sBankAccount is not null and sm.sBankAccount != '' and sm.sBankAccountNO is not null and sm.sBankAccountNO != '') then sm.sBankAccountNO else o.sBankAccountNO end sBankAccountNO, "
+"case when "+caseWhen+" then sm.sBankAccountNO else o.sBankAccountNO end sBankAccountNO, "
+"case when (sm.sBankTypeID is not null and sm.sBankTypeID != '' and sm.sBankAccount is not null and sm.sBankAccount != '' and sm.sBankAccountNO is not null and sm.sBankAccountNO != '') then sm.sBankAccount else o.sBankAccount end sBankAccount "
+"case when "+caseWhen+" then sm.sBankAccount else o.sBankAccount end sBankAccount "