Commit dddda3fd by java-lixy

前端提交举报验证report_source参数

parent a83eed6f
...@@ -2,10 +2,13 @@ package com.ejweb.modules.front.report.api; ...@@ -2,10 +2,13 @@ package com.ejweb.modules.front.report.api;
import com.ejweb.conf.ErrorCode; import com.ejweb.conf.ErrorCode;
import com.ejweb.core.api.ResponseBean; import com.ejweb.core.api.ResponseBean;
import com.ejweb.core.utils.StringUtils;
import com.ejweb.modules.front.report.bean.FrontReportBean; import com.ejweb.modules.front.report.bean.FrontReportBean;
import com.ejweb.modules.front.report.entity.Captcha; import com.ejweb.modules.front.report.entity.Captcha;
import com.ejweb.modules.front.report.service.FrontReportService; import com.ejweb.modules.front.report.service.FrontReportService;
import com.ejweb.modules.front.report.utils.CaptchaUtil; import com.ejweb.modules.front.report.utils.CaptchaUtil;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
...@@ -21,6 +24,7 @@ public class FrontReportController { ...@@ -21,6 +24,7 @@ public class FrontReportController {
@Autowired @Autowired
private FrontReportService frontReportService; private FrontReportService frontReportService;
/** /**
* 获取验证码的code值 * 获取验证码的code值
* @return * @return
...@@ -48,7 +52,13 @@ public class FrontReportController { ...@@ -48,7 +52,13 @@ public class FrontReportController {
responseBean.setMessage("captcha is incorrect"); responseBean.setMessage("captcha is incorrect");
return responseBean; return responseBean;
} }
return frontReportService.addReport(bean); if (StringUtils.isNotBlank(bean.getReportSource())){
responseBean.setStatus(ErrorCode.STATUS_CODE_4002);
responseBean.setMessage("report_source为空");
return responseBean;
}else {
return frontReportService.addReport(bean);
}
} }
responseBean.setStatus(ErrorCode.STATUS_CODE_4001); responseBean.setStatus(ErrorCode.STATUS_CODE_4001);
responseBean.setMessage("接收参数失败"); responseBean.setMessage("接收参数失败");
......
...@@ -95,7 +95,7 @@ file.image.thumb.width=640 ...@@ -95,7 +95,7 @@ file.image.thumb.width=640
file.image.thumb.height=640 file.image.thumb.height=640
# The Prefix Url # The Prefix Url
#file.prefix.url=http://123.56.146.81:8808/ #file.prefix.url=http://123.56.146.81:8808/
file.prefix.url=http://192.168.3.232:8081/ file.prefix.url=http://192.168.7.210:8081/
# The Prefix separator # The Prefix separator
file.upload.path.separator = / file.upload.path.separator = /
......
...@@ -165,8 +165,8 @@ ...@@ -165,8 +165,8 @@
<div class="control-group"> <div class="control-group">
<label class="control-label">内容:</label> <label class="control-label">内容:</label>
<div class="controls"> <div class="controls">
<form:textarea id="reportContent" htmlEscape="true" path="reportContent" rows="4" maxlength="500" <form:textarea id="reportContent" htmlEscape="true" path="reportContent" rows="4" maxlength="3000"
class="input-xxlarge" placeholder="最多输入500个字符"/> class="input-xxlarge" placeholder="最多输入3000个字符"/>
<span class="help-inline"><font color="red">*</font> </span> <span class="help-inline"><font color="red">*</font> </span>
</div> </div>
</div> </div>
......
...@@ -9,6 +9,9 @@ ...@@ -9,6 +9,9 @@
$(document).ready(function () { $(document).ready(function () {
$("#inputForm").validate({ $("#inputForm").validate({
submitHandler: function (form) { submitHandler: function (form) {
messages: {
supplementContent: {maxlength: "最多输入{0}个字符"}
}
if ($("#supplementType").val() == " "){ if ($("#supplementType").val() == " "){
top.$.jBox.tip('请选择业务类型', 'warning'); top.$.jBox.tip('请选择业务类型', 'warning');
}else if ($("#supplementArea").val() == " "){ }else if ($("#supplementArea").val() == " "){
...@@ -259,7 +262,8 @@ ...@@ -259,7 +262,8 @@
<div class="control-group"> <div class="control-group">
<label class="control-label">内容:</label> <label class="control-label">内容:</label>
<div class="controls"> <div class="controls">
<form:textarea id="supplementContent" htmlEscape="true" path="supplementContent" rows="4" maxlength="500" class="input-xxlarge"/> <form:textarea id="supplementContent" htmlEscape="true" path="supplementContent" rows="4"
maxlength="500" class="input-xxlarge" placeholder="最多输入3000个字符"/>
</div> </div>
</div> </div>
<div class="control-group"> <div class="control-group">
...@@ -353,7 +357,7 @@ ...@@ -353,7 +357,7 @@
$("input:radio").attr("checked",false); $("input:radio").attr("checked",false);
$("#chooseItem").empty(); $("#chooseItem").empty();
$(this).attr("checked",true); $(this).attr("checked",true);
$("#chooseItem").html("已选择 " + $("input:radio:checked").parent().next().next().next().html()+"<span onclick='remove();'><font size='5'> ×</font></span>"); $("#chooseItem").html("已选择 " + b.parent().next().next().next().html()+"<span onclick='remove();'><font size='5'> ×</font></span>");
}); });
}); });
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment