|
@@ -49,13 +49,13 @@ import java.util.Date;
|
|
|
@RestController
|
|
@RestController
|
|
|
@RequestMapping(value = "/open")
|
|
@RequestMapping(value = "/open")
|
|
|
public class PublicApiController extends BaseController {
|
|
public class PublicApiController extends BaseController {
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
@Resource
|
|
@Resource
|
|
|
private LinkesService linkesService;
|
|
private LinkesService linkesService;
|
|
|
@Resource
|
|
@Resource
|
|
|
private NewsService newsService;
|
|
private NewsService newsService;
|
|
|
@Resource
|
|
@Resource
|
|
|
- private CustomerCaseService customerCaseService;
|
|
|
|
|
|
|
+ private CustomerCaseService customerCaseService;
|
|
|
@Resource
|
|
@Resource
|
|
|
private OrganizationService organizationService;
|
|
private OrganizationService organizationService;
|
|
|
@Resource
|
|
@Resource
|
|
@@ -75,7 +75,7 @@ public class PublicApiController extends BaseController {
|
|
|
|
|
|
|
|
@Value(value = "${upload.path}")
|
|
@Value(value = "${upload.path}")
|
|
|
public String uploadPath = "";
|
|
public String uploadPath = "";
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
/**
|
|
/**
|
|
|
* 微信支付,通知--- 成功结果
|
|
* 微信支付,通知--- 成功结果
|
|
|
*/
|
|
*/
|
|
@@ -84,7 +84,7 @@ public class PublicApiController extends BaseController {
|
|
|
* 微信支付,通知--- 失败结果
|
|
* 微信支付,通知--- 失败结果
|
|
|
*/
|
|
*/
|
|
|
public static String NOTIFY_FAIL = "<xml><return_code><![CDATA[FAIL]]></return_code><return_msg><![CDATA[报文为空]]></return_msg></xml>";
|
|
public static String NOTIFY_FAIL = "<xml><return_code><![CDATA[FAIL]]></return_code><return_msg><![CDATA[报文为空]]></return_msg></xml>";
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
@RequestMapping(value = "/listNews", method = RequestMethod.GET)
|
|
@RequestMapping(value = "/listNews", method = RequestMethod.GET)
|
|
|
public Result listNews(InputNews in,Integer pageSize,Integer pageNo) {
|
|
public Result listNews(InputNews in,Integer pageSize,Integer pageNo) {
|
|
|
Result res =new Result();
|
|
Result res =new Result();
|
|
@@ -92,7 +92,16 @@ public class PublicApiController extends BaseController {
|
|
|
res.data(newsService.listnewsDetails(in,pageSize,pageNo));
|
|
res.data(newsService.listnewsDetails(in,pageSize,pageNo));
|
|
|
return res;
|
|
return res;
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
|
|
+ @RequestMapping(value = "/listHotNews", method = RequestMethod.GET)
|
|
|
|
|
+ public Result listHotNews(InputNews in,Integer pageSize) {
|
|
|
|
|
+ Result res =new Result();
|
|
|
|
|
+ in.setReleaseStatus(1);
|
|
|
|
|
+ in.setHot(1l);
|
|
|
|
|
+ res.data(newsService.listnewsDetails(in,pageSize,1));
|
|
|
|
|
+ return res;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
@RequestMapping(value = "/listRecruitment", method = RequestMethod.GET)
|
|
@RequestMapping(value = "/listRecruitment", method = RequestMethod.GET)
|
|
|
public Result listRecruitment(InputRecruitment ir,Integer pageSize,Integer pageNo) {
|
|
public Result listRecruitment(InputRecruitment ir,Integer pageSize,Integer pageNo) {
|
|
|
Result res =new Result();
|
|
Result res =new Result();
|
|
@@ -100,7 +109,7 @@ public class PublicApiController extends BaseController {
|
|
|
res.data(recruitmentService.listRecruitment(ir,pageSize,pageNo));
|
|
res.data(recruitmentService.listRecruitment(ir,pageSize,pageNo));
|
|
|
return res;
|
|
return res;
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
@RequestMapping(value = "/listOrganization", method = RequestMethod.GET)
|
|
@RequestMapping(value = "/listOrganization", method = RequestMethod.GET)
|
|
|
public Result listOrganization(InputOrganization io,Integer pageSize,Integer pageNo) {
|
|
public Result listOrganization(InputOrganization io,Integer pageSize,Integer pageNo) {
|
|
|
Result res =new Result();
|
|
Result res =new Result();
|
|
@@ -108,7 +117,7 @@ public class PublicApiController extends BaseController {
|
|
|
res.data(organizationService.listOrganization(io,pageSize,pageNo));
|
|
res.data(organizationService.listOrganization(io,pageSize,pageNo));
|
|
|
return res;
|
|
return res;
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
@RequestMapping(value = "/listCustomerCase", method = RequestMethod.GET)
|
|
@RequestMapping(value = "/listCustomerCase", method = RequestMethod.GET)
|
|
|
public Result listCustomerCase(InputCustomerCase ic,Integer pageSize,Integer pageNo) {
|
|
public Result listCustomerCase(InputCustomerCase ic,Integer pageSize,Integer pageNo) {
|
|
|
Result res =new Result();
|
|
Result res =new Result();
|
|
@@ -116,7 +125,7 @@ public class PublicApiController extends BaseController {
|
|
|
res.data(customerCaseService.listCustomerCase(ic,pageSize,pageNo));
|
|
res.data(customerCaseService.listCustomerCase(ic,pageSize,pageNo));
|
|
|
return res;
|
|
return res;
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
@RequestMapping(value = "/addVisitingCustomers", method = RequestMethod.POST)
|
|
@RequestMapping(value = "/addVisitingCustomers", method = RequestMethod.POST)
|
|
|
public Result addVisitingCustomers(VisitingCustomers vc) {
|
|
public Result addVisitingCustomers(VisitingCustomers vc) {
|
|
|
Result res =new Result();
|
|
Result res =new Result();
|
|
@@ -137,24 +146,24 @@ public class PublicApiController extends BaseController {
|
|
|
res.data(activityService.listDetails(in,pageSize,pageNo));
|
|
res.data(activityService.listDetails(in,pageSize,pageNo));
|
|
|
return res;
|
|
return res;
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
@RequestMapping(value = "/projectTypeList", method = RequestMethod.GET)
|
|
@RequestMapping(value = "/projectTypeList", method = RequestMethod.GET)
|
|
|
public Result projectTypeList(String name) {
|
|
public Result projectTypeList(String name) {
|
|
|
Result res =new Result();
|
|
Result res =new Result();
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
res.data(projectTypeService.list(name));
|
|
res.data(projectTypeService.list(name));
|
|
|
return res;
|
|
return res;
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
@RequestMapping(value = "/projectList", method = RequestMethod.GET)
|
|
@RequestMapping(value = "/projectList", method = RequestMethod.GET)
|
|
|
public Result projectList(String name, String startTime, String endTime,Integer pageNo,Integer pageSize) {
|
|
public Result projectList(String name, String startTime, String endTime,Integer pageNo,Integer pageSize) {
|
|
|
Result res =new Result();
|
|
Result res =new Result();
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
res.data(projectService.list( name, startTime, endTime, 1,1,pageNo, pageSize));
|
|
res.data(projectService.list( name, startTime, endTime, 1,1,pageNo, pageSize));
|
|
|
return res;
|
|
return res;
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
@RequestMapping(value = "/selectProject", method = RequestMethod.GET)
|
|
@RequestMapping(value = "/selectProject", method = RequestMethod.GET)
|
|
|
@CrossOrigin(origins="*",allowCredentials="true")
|
|
@CrossOrigin(origins="*",allowCredentials="true")
|
|
|
public Result selectProject(Integer id) {
|
|
public Result selectProject(Integer id) {
|
|
@@ -165,23 +174,23 @@ public class PublicApiController extends BaseController {
|
|
|
res.data(projectService.getProject( id));
|
|
res.data(projectService.getProject( id));
|
|
|
return res;
|
|
return res;
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
@RequestMapping(value = "/payCallBack", method = RequestMethod.POST)
|
|
@RequestMapping(value = "/payCallBack", method = RequestMethod.POST)
|
|
|
public String wxPayCallBack(HttpServletRequest req, HttpServletResponse response) {
|
|
public String wxPayCallBack(HttpServletRequest req, HttpServletResponse response) {
|
|
|
LoggerUtils.debug(getClass(), "===============微信支付回调==========================");
|
|
LoggerUtils.debug(getClass(), "===============微信支付回调==========================");
|
|
|
wxService.wxPayCallBack(req);
|
|
wxService.wxPayCallBack(req);
|
|
|
return NOTIFY_SUCCESS;
|
|
return NOTIFY_SUCCESS;
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
@RequestMapping(value = "/nativePay",method = RequestMethod.POST)
|
|
@RequestMapping(value = "/nativePay",method = RequestMethod.POST)
|
|
|
@CrossOrigin(origins="*",allowCredentials="true")
|
|
@CrossOrigin(origins="*",allowCredentials="true")
|
|
|
public Result wxNativePay(Project p) {
|
|
public Result wxNativePay(Project p) {
|
|
|
LoggerUtils.debug(getClass(), "===============微信nativePay==========================");
|
|
LoggerUtils.debug(getClass(), "===============微信nativePay==========================");
|
|
|
Result res=new Result();
|
|
Result res=new Result();
|
|
|
p=projectService.get(p.getId());
|
|
p=projectService.get(p.getId());
|
|
|
- if (p==null) {
|
|
|
|
|
|
|
+ if (p==null) {
|
|
|
res.getError().add(buildError("","项目不存在"));
|
|
res.getError().add(buildError("","项目不存在"));
|
|
|
return res;
|
|
return res;
|
|
|
}
|
|
}
|
|
@@ -193,16 +202,16 @@ public class PublicApiController extends BaseController {
|
|
|
}
|
|
}
|
|
|
return res.data(wxService.pushNativePay(p,"NATIVE"));
|
|
return res.data(wxService.pushNativePay(p,"NATIVE"));
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
@RequestMapping(value = "/H5Pay",method = RequestMethod.POST)
|
|
@RequestMapping(value = "/H5Pay",method = RequestMethod.POST)
|
|
|
@CrossOrigin(origins="*",allowCredentials="true")
|
|
@CrossOrigin(origins="*",allowCredentials="true")
|
|
|
public Result H5Pay(Project p) {
|
|
public Result H5Pay(Project p) {
|
|
|
LoggerUtils.debug(getClass(), "===============微信nativePay==========================");
|
|
LoggerUtils.debug(getClass(), "===============微信nativePay==========================");
|
|
|
Result res=new Result();
|
|
Result res=new Result();
|
|
|
p=projectService.get(p.getId());
|
|
p=projectService.get(p.getId());
|
|
|
- if (p==null) {
|
|
|
|
|
|
|
+ if (p==null) {
|
|
|
res.getError().add(buildError("","项目不存在"));
|
|
res.getError().add(buildError("","项目不存在"));
|
|
|
return res;
|
|
return res;
|
|
|
}
|
|
}
|
|
@@ -214,11 +223,11 @@ public class PublicApiController extends BaseController {
|
|
|
}
|
|
}
|
|
|
return res.data(wxService.pushNativePay(p,"MWEB"));
|
|
return res.data(wxService.pushNativePay(p,"MWEB"));
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
@RequestMapping(value = "/weChatDetails", method = RequestMethod.GET)
|
|
@RequestMapping(value = "/weChatDetails", method = RequestMethod.GET)
|
|
|
public Result weChatDetails(Integer type,Integer pid) {
|
|
public Result weChatDetails(Integer type,Integer pid) {
|
|
|
Result res=new Result();
|
|
Result res=new Result();
|
|
|
- if (type==null&&pid==null) {
|
|
|
|
|
|
|
+ if (type==null&&pid==null) {
|
|
|
res.getError().add(buildError(ErrorConstants.PARAM_ERROR,"编号","编号"));
|
|
res.getError().add(buildError(ErrorConstants.PARAM_ERROR,"编号","编号"));
|
|
|
return res;
|
|
return res;
|
|
|
}
|
|
}
|