old mode 100644
new mode 100755
| | |
| | | package com.java110.user.bmo.questionAnswerTitle.impl; |
| | | |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.java110.core.annotation.Java110Transactional; |
| | | import com.java110.core.factory.GenerateCodeFactory; |
| | | import com.java110.dto.questionAnswerTitle.QuestionAnswerTitleDto; |
| | | import com.java110.dto.questionAnswer.QuestionAnswerTitleDto; |
| | | import com.java110.intf.user.IQuestionAnswerInnerServiceSMO; |
| | | import com.java110.intf.user.IQuestionAnswerTitleInnerServiceSMO; |
| | | import com.java110.intf.user.IQuestionAnswerTitleValueInnerServiceSMO; |
| | | import com.java110.po.questionAnswerTitle.QuestionAnswerTitlePo; |
| | | import com.java110.po.questionAnswerTitleValue.QuestionAnswerTitleValuePo; |
| | | import com.java110.po.questionAnswer.QuestionAnswerTitlePo; |
| | | import com.java110.po.questionAnswer.QuestionAnswerTitleValuePo; |
| | | import com.java110.user.bmo.questionAnswerTitle.ISaveQuestionAnswerTitleBMO; |
| | | import com.java110.vo.ResultVo; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | return ResultVo.createResponseEntity(ResultVo.CODE_OK, "保存成功"); |
| | | } |
| | | QuestionAnswerTitleValuePo questionAnswerTitleValuePo = null; |
| | | JSONObject value = null; |
| | | for (int titleValueIndex = 0; titleValueIndex < titleValues.size(); titleValueIndex++) { |
| | | questionAnswerTitleValuePo = new QuestionAnswerTitleValuePo(); |
| | | value = titleValues.getJSONObject(titleValueIndex); |
| | | questionAnswerTitleValuePo.setQaValue(titleValues.getJSONObject(titleValueIndex).getString("qaValue")); |
| | | questionAnswerTitleValuePo.setSeq(titleValues.getJSONObject(titleValueIndex).getString("seq")); |
| | | questionAnswerTitleValuePo.setTitleId(questionAnswerTitlePo.getTitleId()); |
| | | questionAnswerTitleValuePo.setValueId(GenerateCodeFactory.getGeneratorId(GenerateCodeFactory.CODE_PREFIX_valueId)); |
| | | questionAnswerTitleValuePo.setObjId(questionAnswerTitlePo.getObjId()); |
| | | questionAnswerTitleValuePo.setObjType(questionAnswerTitlePo.getObjType()); |
| | | if(value.containsKey("valueId") && !value.getString("valueId").startsWith("-")){ |
| | | questionAnswerTitleValuePo.setValueId(value.getString("valueId")); |
| | | questionAnswerTitleValueInnerServiceSMOImpl.updateQuestionAnswerTitleValue(questionAnswerTitleValuePo); |
| | | }else{ |
| | | questionAnswerTitleValuePo.setValueId(GenerateCodeFactory.getGeneratorId(GenerateCodeFactory.CODE_PREFIX_valueId)); |
| | | questionAnswerTitleValueInnerServiceSMOImpl.saveQuestionAnswerTitleValue(questionAnswerTitleValuePo); |
| | | } |
| | | questionAnswerTitleValueInnerServiceSMOImpl.saveQuestionAnswerTitleValue(questionAnswerTitleValuePo); |
| | | } |
| | | |
| | | return ResultVo.createResponseEntity(ResultVo.CODE_OK, "保存成功"); |
| | | |
| | | |
| | | } |
| | | |
| | | } |