| | |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | |
| | | |
| | | /** |
| | | * 类表述:查询 |
| | | * 服务编码:questionTitle.listQuestionTitle |
| | |
| | | public class ListQuestionTitleCmd extends Cmd { |
| | | |
| | | private static Logger logger = LoggerFactory.getLogger(ListQuestionTitleCmd.class); |
| | | |
| | | @Autowired |
| | | private IQuestionTitleV1InnerServiceSMO questionTitleV1InnerServiceSMOImpl; |
| | | |
| | |
| | | public void validate(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) { |
| | | super.validatePageInfo(reqJson); |
| | | Assert.hasKeyAndValue(reqJson, "communityId", "communityId不能为空"); |
| | | |
| | | } |
| | | |
| | | @Override |
| | | public void doCmd(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) throws CmdException { |
| | | |
| | | QuestionTitleDto questionTitleDto = BeanConvertUtil.covertBean(reqJson, QuestionTitleDto.class); |
| | | |
| | | int count = questionTitleV1InnerServiceSMOImpl.queryQuestionTitlesCount(questionTitleDto); |
| | |
| | | |
| | | if (count > 0) { |
| | | questionTitleDtos = questionTitleV1InnerServiceSMOImpl.queryQuestionTitles(questionTitleDto); |
| | | |
| | | refreshTitileValues(questionTitleDtos); |
| | | } else { |
| | | questionTitleDtos = new ArrayList<>(); |
| | |
| | | } |
| | | |
| | | private void refreshTitileValues(List<QuestionTitleDto> questionTitleDtos) { |
| | | |
| | | if (questionTitleDtos == null || questionTitleDtos.size() < 1) { |
| | | return; |
| | | } |
| | |
| | | } |
| | | questionTitle.setTitleValues(tmpQuestionTitleValueDtos); |
| | | } |
| | | |
| | | |
| | | } |
| | | } |