id 수량 확인

This commit is contained in:
gbsa-iten 2024-03-11 02:35:08 +09:00
parent 9cc4630a5f
commit 3ce84199c1

View File

@ -2596,7 +2596,16 @@ public class MjonMsgDataServiceImpl extends EgovAbstractServiceImpl implements M
* 신규 IDgen 생성해주기
*
* */
String subUserId = mjonMsgVO.getUserId().substring(0, 5).toUpperCase();
String subUserId = "";
if(mjonMsgVO.getUserId().length() < 5) {
int a = 5 - mjonMsgVO.getUserId().length();
subUserId = mjonMsgVO.getUserId();
for(int i=0; i < a; i++) {
subUserId += "0";
}
}else {
subUserId = mjonMsgVO.getUserId().substring(0, 5).toUpperCase();
}
mjonMsgVO.setSearchKeyword(subUserId);
System.out.println("+++++++++++ subUserId ::: "+subUserId);