Commit 12311e1f authored by Quxl's avatar Quxl

x

parent 43e655ad
...@@ -441,9 +441,14 @@ public class UserServiceImpl implements UserService { ...@@ -441,9 +441,14 @@ public class UserServiceImpl implements UserService {
Object[] args = new Object[] {shopNo, certifTypeID, certifNO, new Date(System.currentTimeMillis() + (1000L*60*60*24*365*100))}; Object[] args = new Object[] {shopNo, certifTypeID, certifNO, new Date(System.currentTimeMillis() + (1000L*60*60*24*365*100))};
jdbcTemplate.update(sqlInsert, args); jdbcTemplate.update(sqlInsert, args);
} }
Integer itemId = jdbcTemplate.queryForInt("select max(nItem) from tShopCertifPic where sShopNO = ? and sCertifTypeID = ? and sCertifNO = ?", shopNo, certifTypeID, certifNO); Integer itemId;
try {
itemId = jdbcTemplate.queryForInt("select max(nItem) from tShopCertifPic where sShopNO = ? and sCertifTypeID = ? and sCertifNO = ?", shopNo, certifTypeID, certifNO);
} catch (NullPointerException e) {
itemId = 0;
}
String insertPicSql = "insert into tShopCertifPic (sShopNO, sCertifTypeID, sCertifNO, nItem, sPicDesc, sURL, sCreateUser, dCreateDate, dLastUpdateTime) values (?, ?, ?, ?, '', ?, '', getdate(), getdate())"; String insertPicSql = "insert into tShopCertifPic (sShopNO, sCertifTypeID, sCertifNO, nItem, sPicDesc, sURL, sCreateUser, dCreateDate, dLastUpdateTime) values (?, ?, ?, ?, '', ?, '', getdate(), getdate())";
Object[] insertPicArgs = new Object[] {shopNo, certifTypeID, certifNO, (itemId == null ? 1 : ++itemId), certifPicUrl}; Object[] insertPicArgs = new Object[] {shopNo, certifTypeID, certifNO, ++itemId, certifPicUrl};
jdbcTemplate.update(insertPicSql, insertPicArgs); jdbcTemplate.update(insertPicSql, insertPicArgs);
int countBankCard = jdbcTemplate.queryForInt("select count(*) from tCustBank where sCustNO = ? and sBankAccountNO = ?", custNo, bankCardNO); int countBankCard = jdbcTemplate.queryForInt("select count(*) from tCustBank where sCustNO = ? and sBankAccountNO = ?", custNo, bankCardNO);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment