| | |
| | | import com.java110.report.bmo.reportInfoSettingTitle.IUpdateReportInfoSettingTitleBMO; |
| | | import com.java110.utils.util.Assert; |
| | | import com.java110.utils.util.BeanConvertUtil; |
| | | import com.java110.utils.util.StringUtil; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.http.ResponseEntity; |
| | | import org.springframework.web.bind.annotation.*; |
| | |
| | | |
| | | /** |
| | | * 微信保存消息模板 |
| | | * @serviceCode /reportInfoSettingTitle/saveReportInfoSettingTitle |
| | | * @path /app/reportInfoSettingTitle/saveReportInfoSettingTitle |
| | | * |
| | | * @param reqJson |
| | | * @return |
| | | * @serviceCode /reportInfoSettingTitle/saveReportInfoSettingTitle |
| | | * @path /app/reportInfoSettingTitle/saveReportInfoSettingTitle |
| | | */ |
| | | @RequestMapping(value = "/saveReportInfoSettingTitle", method = RequestMethod.POST) |
| | | public ResponseEntity<String> saveReportInfoSettingTitle(@RequestBody JSONObject reqJson) { |
| | |
| | | JSONArray titleValues = null; |
| | | if (!ReportInfoSettingTitleDto.TITLE_TYPE_QUESTIONS.equals(reqJson.getString("titleType"))) { |
| | | titleValues = reqJson.getJSONArray("titleValues"); |
| | | |
| | | if (titleValues.size() < 1) { |
| | | throw new IllegalArgumentException("未包含选项"); |
| | | } |
| | | for (int index = 0; index < titleValues.size(); index++) { |
| | | JSONObject param = titleValues.getJSONObject(index); |
| | | if (StringUtil.isEmpty(param.getString("qaValue"))) { |
| | | throw new IllegalArgumentException("题目选项不能为空"); |
| | | } |
| | | } |
| | | } |
| | | |
| | |
| | | |
| | | /** |
| | | * 微信修改消息模板 |
| | | * @serviceCode /reportInfoSettingTitle/updateSettingTitle |
| | | * @path /app/reportInfoSettingTitle/updateReportInfoSettingTitle |
| | | * |
| | | * @param reqJson |
| | | * @return |
| | | * @serviceCode /reportInfoSettingTitle/updateSettingTitle |
| | | * @path /app/reportInfoSettingTitle/updateSettingTitle |
| | | */ |
| | | @RequestMapping(value = "/updateSettingTitle", method = RequestMethod.POST) |
| | | public ResponseEntity<String> updateReportInfoSettingTitle(@RequestBody JSONObject reqJson) { |
| | | |
| | | Assert.hasKeyAndValue(reqJson, "titleId", "请求报文中未包含titleId"); |
| | | Assert.hasKeyAndValue(reqJson, "settingId", "请求报文中未包含settingId"); |
| | | Assert.hasKeyAndValue(reqJson, "title", "请求报文中未包含title"); |
| | |
| | | JSONArray titleValues = null; |
| | | if (!ReportInfoSettingTitleDto.TITLE_TYPE_QUESTIONS.equals(reqJson.getString("titleType"))) { |
| | | titleValues = reqJson.getJSONArray("titleValues"); |
| | | |
| | | if (titleValues.size() < 1) { |
| | | throw new IllegalArgumentException("未包含选项"); |
| | | } |
| | | for (int index = 0; index < titleValues.size(); index++) { |
| | | JSONObject param = titleValues.getJSONObject(index); |
| | | if (StringUtil.isEmpty(param.getString("qaValue"))) { |
| | | throw new IllegalArgumentException("题目选项不能为空"); |
| | | } |
| | | } |
| | | } |
| | | |
| | |
| | | |
| | | /** |
| | | * 微信删除消息模板 |
| | | * @serviceCode /reportInfoSettingTitle/deleteSettingTitle |
| | | * @path /app/reportInfoSettingTitle/deleteReportInfoSettingTitle |
| | | * |
| | | * @param reqJson |
| | | * @return |
| | | * @serviceCode /reportInfoSettingTitle/deleteSettingTitle |
| | | * @path /app/reportInfoSettingTitle/deleteReportInfoSettingTitle |
| | | */ |
| | | @RequestMapping(value = "/deleteSettingTitle", method = RequestMethod.POST) |
| | | public ResponseEntity<String> deleteReportInfoSettingTitle(@RequestBody JSONObject reqJson) { |
| | |
| | | |
| | | /** |
| | | * 微信删除消息模板 |
| | | * @serviceCode /reportInfoSettingTitle/querySettingTitle |
| | | * @path /app/reportInfoSettingTitle/queryReportInfoSettingTitle |
| | | * |
| | | * @param communityId 小区ID |
| | | * @return |
| | | * @serviceCode /reportInfoSettingTitle/querySettingTitle |
| | | * @path /app/reportInfoSettingTitle/queryReportInfoSettingTitle |
| | | */ |
| | | @RequestMapping(value = "/querySettingTitle", method = RequestMethod.GET) |
| | | public ResponseEntity<String> queryReportInfoSettingTitle(@RequestParam(value = "communityId") String communityId, |