|
@@ -20,6 +20,7 @@ import org.apache.commons.lang3.StringUtils;
|
|
|
import org.slf4j.Logger;
|
|
|
import org.slf4j.LoggerFactory;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.transaction.annotation.Transactional;
|
|
|
import org.springframework.web.bind.annotation.PostMapping;
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
import org.springframework.web.bind.annotation.ResponseBody;
|
|
@@ -55,6 +56,7 @@ public class OfficeOpinionApiController {
|
|
|
|
|
|
@ApiOperation(value="添加反馈信息")
|
|
|
@PostMapping("add")
|
|
|
+ @Transactional(rollbackFor = Exception.class)
|
|
|
@ApiImplicitParams({
|
|
|
@ApiImplicitParam(name="connect", value="联系人", required=true, paramType="query"),
|
|
|
@ApiImplicitParam(name="connectPhone", value="联系电话", required=true, paramType="query"),
|
|
@@ -74,6 +76,10 @@ public class OfficeOpinionApiController {
|
|
|
officeOpinion.setOfficeId(officeId);
|
|
|
if("0".equals(isSatisfied)) {
|
|
|
officeOpinion.setIsSatisfied(false);
|
|
|
+
|
|
|
+ String MessageContent = "【双优督办】干部监督评议有一条投诉,请查收。";
|
|
|
+ String UserNumber = "13677200818,13647155484,13607214498";
|
|
|
+ SMSUtil.sendSMS(MessageContent, UserNumber, null);
|
|
|
}
|
|
|
else{
|
|
|
officeOpinion.setIsSatisfied(true);
|
|
@@ -84,16 +90,10 @@ public class OfficeOpinionApiController {
|
|
|
officeOpinion.setCreateTime(new Date());
|
|
|
officeOpinion.setOpinionStatus(false);
|
|
|
officeOpinion.setConfirmStatus(false);
|
|
|
-
|
|
|
- int affectCount = officeOpinionService.insert(officeOpinion);
|
|
|
-
|
|
|
- if (affectCount > 0) {
|
|
|
- msgResult.setResult(true);
|
|
|
- msgResult.setData(officeOpinion);
|
|
|
- } else {
|
|
|
- msgResult.setResult(false);
|
|
|
- msgResult.setMessage("数据库添加失败");
|
|
|
- }
|
|
|
+ officeOpinionService.insert(officeOpinion);
|
|
|
+
|
|
|
+ msgResult.setResult(true);
|
|
|
+ msgResult.setData(officeOpinion);
|
|
|
}
|
|
|
catch(Exception ex){
|
|
|
logger.error(ex.getMessage(),ex);
|