use of com.netsteadfast.greenstep.po.hbm.BbDegreeFeedbackProject in project bamboobsc by billchen198318.
the class DegreeFeedbackProjectServiceImpl method findByPublishFlag.
@Override
public DefaultResult<List<BbDegreeFeedbackProject>> findByPublishFlag(String publishFlag, String raterId) throws Exception {
if (StringUtils.isBlank(raterId) || StringUtils.isBlank(publishFlag)) {
throw new ServiceException(SysMessageUtil.get(GreenStepSysMsgConstants.PARAMS_BLANK));
}
if (!YesNo.YES.equals(publishFlag) && !YesNo.NO.equals(publishFlag)) {
throw new ServiceException(SysMessageUtil.get(GreenStepSysMsgConstants.PARAMS_INCORRECT));
}
DefaultResult<List<BbDegreeFeedbackProject>> result = new DefaultResult<List<BbDegreeFeedbackProject>>();
List<BbDegreeFeedbackProject> list = this.degreeFeedbackProjectDAO.findByPublishFlag(publishFlag, raterId);
if (null != list && list.size() > 0) {
result.setValue(list);
} else {
result.setSystemMessage(new SystemMessage(SysMessageUtil.get(GreenStepSysMsgConstants.SEARCH_NO_DATA)));
}
return result;
}
use of com.netsteadfast.greenstep.po.hbm.BbDegreeFeedbackProject in project bamboobsc by billchen198318.
the class DegreeFeedbackProjectServiceImpl method findByPublishFlag2ValueObject.
@Override
public DefaultResult<List<DegreeFeedbackProjectVO>> findByPublishFlag2ValueObject(String publishFlag, String raterId) throws Exception {
DefaultResult<List<BbDegreeFeedbackProject>> queryResult = this.findByPublishFlag(publishFlag, raterId);
DefaultResult<List<DegreeFeedbackProjectVO>> result = new DefaultResult<List<DegreeFeedbackProjectVO>>();
if (queryResult.getValue() == null) {
result.setSystemMessage(queryResult.getSystemMessage());
return result;
}
List<DegreeFeedbackProjectVO> datas = new ArrayList<DegreeFeedbackProjectVO>();
List<BbDegreeFeedbackProject> queryList = queryResult.getValue();
for (BbDegreeFeedbackProject entity : queryList) {
DegreeFeedbackProjectVO obj = new DegreeFeedbackProjectVO();
this.doMapper(entity, obj, this.getMapperIdPo2Vo());
datas.add(obj);
}
result.setValue(datas);
return result;
}
Aggregations