sq语句l同时修改国地税密码

   String password;
    String nsrsbh;
    String username;
    String djxh;
    String gssql ="";
    String dssql ="";
    for (int i = 0; i < pwdList.size(); i++)
    {
     JSONObject pwdJo = JSONObject.fromObject(pwdList.get(i));
     password = PasswordUtil.encryptPasswordMD5(pwdJo.getString("password"));
     nsrsbh = pwdJo.getString("nsrsbh");
     username = pwdJo.getString("userName");
     djxh = pwdJo.getString("djxh");
String ds="10126";//国税
     String gs="10116";//地税
     logger.info(djxh.substring(0, 5));
    if(djxh.substring(0, 5).equals(ds)){
     gssql= "update nd_dj_wbzcxx set pwd='"+password+"' where djxh=(select t.djxh_gs from nd_dj_gdsnsrdz t where t.djxh_ds like '"+djxh+"') and username='"+username+"'";  

     dssql= "update nd_dj_wbzcxx set pwd='"+password+"' where djxh='"+djxh+"' and username='"+username+"'"; 
       }else {
        dssql= "update nd_dj_wbzcxx set pwd='"+password+"' where djxh=(select t.djxh_ds from nd_dj_gdsnsrdz t where t.djxh_gs like '"+djxh+"') and username='"+username+"'"; 
        gssql= "update nd_dj_wbzcxx set pwd='"+password+"' where djxh='"+djxh+"' and username='"+username+"'";
    }
     logger.info("========gssql000==========="+gssql);
     logger.info("========dssql001========="+dssql);
     pdao.execute(gssql, null, tx);
     pdao.execute(dssql, null, tx);
    
    }
    tx.commit();
    
    map.put("success", true);
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值