Commit d2388056 authored by Vu Duy Anh's avatar Vu Duy Anh

anhvd commit CampaignRepoImpl

parent dc1821a0
......@@ -61,12 +61,12 @@ public class CampaignRepositoryImpl implements CampaignRepositoryCustom {
@Override
public ResultDTO search(CampaignRequestDTO requestDto) {
ResultDTO result = new ResultDTO();
try {
SessionFactory sessionFactory = HibernateUtil.getSessionFactory();
SessionFactory sessionFactory = HibernateUtil.getSessionFactory();
Session session = sessionFactory.openSession();
session.beginTransaction();
Session session = sessionFactory.openSession();
session.beginTransaction();
try {
StringBuilder sqlStr = new StringBuilder();
sqlStr.append(SQLBuilder.getSqlQueryById(SQLBuilder.SQL_MODULE_CAMPAIGN_MNG, "search-campaign-by-params"));
if (!DataUtil.isNullOrEmpty(requestDto.getCampaignCode())) {
......@@ -174,7 +174,7 @@ public class CampaignRepositoryImpl implements CampaignRepositoryCustom {
session.close();
return result;
} catch (Exception ex) {
session.close();
}
result.setErrorCode(Constants.ApiErrorCode.ERROR);
result.setDescription(Constants.ApiErrorDesc.ERROR);
......
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