初始化
This commit is contained in:
73
src/main/java/org/chenyon/fallback/FallbackController.java
Normal file
73
src/main/java/org/chenyon/fallback/FallbackController.java
Normal file
@@ -0,0 +1,73 @@
|
||||
package org.chenyon.fallback;
|
||||
|
||||
import org.chenyon.discharge.DisChargeApplyQueryCondition;
|
||||
import org.chenyon.discharge.DisChargeApplyVo;
|
||||
import org.chenyon.oa.OaFallBackService;
|
||||
import org.chenyon.user.LoginCheck;
|
||||
import org.chenyon.user.UserContext;
|
||||
import org.rcy.framework.api.entity.PageResult;
|
||||
import org.rcy.framework.api.entity.ResultMessage;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/fallback")
|
||||
public class FallbackController {
|
||||
|
||||
private static final Logger log = LoggerFactory.getLogger(FallbackController.class);
|
||||
@Autowired
|
||||
private OaFallBackService fallbackServcie;
|
||||
|
||||
@PostMapping("/queryPage")
|
||||
@LoginCheck
|
||||
public ResultMessage queryPage(@RequestBody FallbackQueryCondition condition) {
|
||||
try {
|
||||
UserContext userContext = UserContext.get();
|
||||
if(userContext == null || userContext.getCusNo() == null) {
|
||||
return ResultMessage.success(new PageResult());
|
||||
}
|
||||
condition.setCusNo(userContext.getCusNo());
|
||||
return ResultMessage.success(fallbackServcie.pageQuery(condition));
|
||||
}catch (Exception e) {
|
||||
log.error(e.getMessage(),e);
|
||||
}
|
||||
return ResultMessage.success(new PageResult());
|
||||
}
|
||||
|
||||
@GetMapping("/detail")
|
||||
@LoginCheck
|
||||
public ResultMessage detail(@RequestParam("id") String id) {
|
||||
try {
|
||||
UserContext userContext = UserContext.get();
|
||||
if(userContext == null ) {
|
||||
return ResultMessage.success();
|
||||
}
|
||||
return ResultMessage.success(fallbackServcie.detail(id));
|
||||
}catch (Exception e) {
|
||||
log.error(e.getMessage(),e);
|
||||
}
|
||||
return ResultMessage.error("查询留言详情失败");
|
||||
}
|
||||
|
||||
@PostMapping("/submit")
|
||||
@LoginCheck
|
||||
public ResultMessage submit(@RequestBody FallbackSubmitVo submitVo) {
|
||||
try {
|
||||
UserContext userContext = UserContext.get();
|
||||
if(userContext == null || userContext.getCusNo() == null) {
|
||||
return ResultMessage.success("您还未实名");
|
||||
}
|
||||
submitVo.setCusNo(userContext.getCusNo());
|
||||
submitVo.setTenantType(userContext.getUserType().equals("0") ? "个人" : "单位");
|
||||
submitVo.setTenantName(userContext.getUsername());
|
||||
submitVo.setTenantPhone(userContext.getPhone());
|
||||
fallbackServcie.submit(submitVo);
|
||||
return ResultMessage.success();
|
||||
}catch (Exception e){
|
||||
log.error(e.getMessage(),e);
|
||||
}
|
||||
return ResultMessage.error("提交失败");
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
package org.chenyon.fallback;
|
||||
|
||||
import org.rcy.framework.api.entity.PageQueryRequest;
|
||||
|
||||
public class FallbackQueryCondition extends PageQueryRequest {
|
||||
private String cusNo;
|
||||
private String id;
|
||||
|
||||
public String getCusNo() {
|
||||
return cusNo;
|
||||
}
|
||||
|
||||
public void setCusNo(String cusNo) {
|
||||
this.cusNo = cusNo;
|
||||
}
|
||||
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
}
|
||||
67
src/main/java/org/chenyon/fallback/FallbackSubmitVo.java
Normal file
67
src/main/java/org/chenyon/fallback/FallbackSubmitVo.java
Normal file
@@ -0,0 +1,67 @@
|
||||
package org.chenyon.fallback;
|
||||
|
||||
public class FallbackSubmitVo {
|
||||
private String cusNo;
|
||||
private String content;
|
||||
private String status;
|
||||
private String comment;
|
||||
private String tenantName;
|
||||
private String tenantType;
|
||||
private String tenantPhone;
|
||||
|
||||
public String getCusNo() {
|
||||
return cusNo;
|
||||
}
|
||||
|
||||
public void setCusNo(String cusNo) {
|
||||
this.cusNo = cusNo;
|
||||
}
|
||||
|
||||
public String getContent() {
|
||||
return content;
|
||||
}
|
||||
|
||||
public void setContent(String content) {
|
||||
this.content = content;
|
||||
}
|
||||
|
||||
public String getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setStatus(String status) {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public String getComment() {
|
||||
return comment;
|
||||
}
|
||||
|
||||
public void setComment(String comment) {
|
||||
this.comment = comment;
|
||||
}
|
||||
|
||||
public String getTenantName() {
|
||||
return tenantName;
|
||||
}
|
||||
|
||||
public void setTenantName(String tenantName) {
|
||||
this.tenantName = tenantName;
|
||||
}
|
||||
|
||||
public String getTenantType() {
|
||||
return tenantType;
|
||||
}
|
||||
|
||||
public void setTenantType(String tenantType) {
|
||||
this.tenantType = tenantType;
|
||||
}
|
||||
|
||||
public String getTenantPhone() {
|
||||
return tenantPhone;
|
||||
}
|
||||
|
||||
public void setTenantPhone(String tenantPhone) {
|
||||
this.tenantPhone = tenantPhone;
|
||||
}
|
||||
}
|
||||
58
src/main/java/org/chenyon/fallback/FallbackVo.java
Normal file
58
src/main/java/org/chenyon/fallback/FallbackVo.java
Normal file
@@ -0,0 +1,58 @@
|
||||
package org.chenyon.fallback;
|
||||
|
||||
public class FallbackVo {
|
||||
private String id;
|
||||
private String content;
|
||||
private String status;
|
||||
private String comment;
|
||||
private String summitDate;
|
||||
private String handleDate;
|
||||
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getContent() {
|
||||
return content;
|
||||
}
|
||||
|
||||
public void setContent(String content) {
|
||||
this.content = content;
|
||||
}
|
||||
|
||||
public String getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setStatus(String status) {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public String getComment() {
|
||||
return comment;
|
||||
}
|
||||
|
||||
public void setComment(String comment) {
|
||||
this.comment = comment;
|
||||
}
|
||||
|
||||
public String getSummitDate() {
|
||||
return summitDate;
|
||||
}
|
||||
|
||||
public void setSummitDate(String summitDate) {
|
||||
this.summitDate = summitDate;
|
||||
}
|
||||
|
||||
public String getHandleDate() {
|
||||
return handleDate;
|
||||
}
|
||||
|
||||
public void setHandleDate(String handleDate) {
|
||||
this.handleDate = handleDate;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user