|
@@ -1,6 +1,5 @@
|
|
|
package com.goafanti.business.controller;
|
|
package com.goafanti.business.controller;
|
|
|
|
|
|
|
|
-
|
|
|
|
|
import javax.annotation.Resource;
|
|
import javax.annotation.Resource;
|
|
|
import javax.servlet.http.HttpServletRequest;
|
|
import javax.servlet.http.HttpServletRequest;
|
|
|
|
|
|
|
@@ -24,24 +23,28 @@ import com.goafanti.common.utils.StringUtils;
|
|
|
public class AdminBusinessProjectController extends CertifyApiController{
|
|
public class AdminBusinessProjectController extends CertifyApiController{
|
|
|
|
|
|
|
|
@Resource
|
|
@Resource
|
|
|
- BusinessProjectService businessProjectService;
|
|
|
|
|
|
|
+ BusinessProjectService businessprojectService;
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
* 新增项目
|
|
* 新增项目
|
|
|
*/
|
|
*/
|
|
|
@RequestMapping(value = "/addProject" , method = RequestMethod.POST)
|
|
@RequestMapping(value = "/addProject" , method = RequestMethod.POST)
|
|
|
- public Result addProject(String bname,String cid,String country,String province,String city,String district) {
|
|
|
|
|
|
|
+ public Result addProject(String bname,String cid,String country,String province,String city,String district,String boutique) {
|
|
|
Result res=new Result();
|
|
Result res=new Result();
|
|
|
if (StringUtils.isBlank(bname)) {
|
|
if (StringUtils.isBlank(bname)) {
|
|
|
res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "项目名称名称为空", "项目名称"));
|
|
res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "项目名称名称为空", "项目名称"));
|
|
|
return res;
|
|
return res;
|
|
|
}
|
|
}
|
|
|
|
|
+ if (StringUtils.isBlank(boutique)) {
|
|
|
|
|
+ res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "是否精品为空", "是否精品"));
|
|
|
|
|
+ return res;
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
if (StringUtils.isBlank(cid)) {
|
|
if (StringUtils.isBlank(cid)) {
|
|
|
res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "所属品类为空", "所属品类"));
|
|
res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "所属品类为空", "所属品类"));
|
|
|
return res;
|
|
return res;
|
|
|
}
|
|
}
|
|
|
- if (businessProjectService.getBnamecount(bname)>0) {
|
|
|
|
|
|
|
+ if (businessprojectService.getBnamecount(bname)>0) {
|
|
|
res.getError().add(buildError(ErrorConstants.PARAM_BEING_ERROR, "项目名称已存在", "项目名称"));
|
|
res.getError().add(buildError(ErrorConstants.PARAM_BEING_ERROR, "项目名称已存在", "项目名称"));
|
|
|
return res;
|
|
return res;
|
|
|
}
|
|
}
|
|
@@ -51,7 +54,7 @@ public class AdminBusinessProjectController extends CertifyApiController{
|
|
|
return res;
|
|
return res;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
- res.setData(businessProjectService.insert(bname, cid, country,province,city,district));
|
|
|
|
|
|
|
+ res.setData(businessprojectService.insert(bname, cid, country,province,city,district,boutique));
|
|
|
return res;
|
|
return res;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -68,7 +71,7 @@ public class AdminBusinessProjectController extends CertifyApiController{
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- res.setData(businessProjectService.listProject( bname, cid, country,province, city, district ,activityFlag, status, pageNo,pageSize ));
|
|
|
|
|
|
|
+ res.setData(businessprojectService.listProject( bname, cid, country,province, city, district ,activityFlag, status, pageNo,pageSize ));
|
|
|
return res;
|
|
return res;
|
|
|
}
|
|
}
|
|
|
/**
|
|
/**
|
|
@@ -94,7 +97,7 @@ public class AdminBusinessProjectController extends CertifyApiController{
|
|
|
@RequestMapping(value = "/orgProject", method = RequestMethod.GET)
|
|
@RequestMapping(value = "/orgProject", method = RequestMethod.GET)
|
|
|
public Result orgProject(String id){
|
|
public Result orgProject(String id){
|
|
|
Result res=new Result();
|
|
Result res=new Result();
|
|
|
- res.setData(businessProjectService.orgProjects(id));
|
|
|
|
|
|
|
+ res.setData(businessprojectService.orgProjects(id));
|
|
|
return res;
|
|
return res;
|
|
|
}
|
|
}
|
|
|
/**
|
|
/**
|
|
@@ -103,7 +106,7 @@ public class AdminBusinessProjectController extends CertifyApiController{
|
|
|
@RequestMapping(value = "/deleteProject", method = RequestMethod.GET)
|
|
@RequestMapping(value = "/deleteProject", method = RequestMethod.GET)
|
|
|
public Result deleteProject(String id){
|
|
public Result deleteProject(String id){
|
|
|
Result res=new Result();
|
|
Result res=new Result();
|
|
|
- res.setData(businessProjectService.deleteProject(id));
|
|
|
|
|
|
|
+ res.setData(businessprojectService.deleteProject(id));
|
|
|
return res;
|
|
return res;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -113,7 +116,7 @@ public class AdminBusinessProjectController extends CertifyApiController{
|
|
|
@RequestMapping(value = "/stopProject", method = RequestMethod.GET)
|
|
@RequestMapping(value = "/stopProject", method = RequestMethod.GET)
|
|
|
public Result stopProject(String id){
|
|
public Result stopProject(String id){
|
|
|
Result res=new Result();
|
|
Result res=new Result();
|
|
|
- res.setData(businessProjectService.updateStopProject(id));
|
|
|
|
|
|
|
+ res.setData(businessprojectService.updateStopProject(id));
|
|
|
return res;
|
|
return res;
|
|
|
}
|
|
}
|
|
|
/**
|
|
/**
|
|
@@ -122,7 +125,7 @@ public class AdminBusinessProjectController extends CertifyApiController{
|
|
|
@RequestMapping(value = "/getAllCname", method = RequestMethod.GET)
|
|
@RequestMapping(value = "/getAllCname", method = RequestMethod.GET)
|
|
|
public Result getAllCname(Integer flag){
|
|
public Result getAllCname(Integer flag){
|
|
|
Result res=new Result();
|
|
Result res=new Result();
|
|
|
- res.setData(businessProjectService.getAllCnames(flag));
|
|
|
|
|
|
|
+ res.setData(businessprojectService.getAllCnames(flag));
|
|
|
return res;
|
|
return res;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -141,7 +144,7 @@ public class AdminBusinessProjectController extends CertifyApiController{
|
|
|
res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "所属品类为空", "所属品类"));
|
|
res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "所属品类为空", "所属品类"));
|
|
|
return res;
|
|
return res;
|
|
|
}
|
|
}
|
|
|
- if (businessProjectService.judgeBeing(s)) {
|
|
|
|
|
|
|
+ if (businessprojectService.judgeBeing(s)) {
|
|
|
res.getError().add(buildError(ErrorConstants.PARAM_BEING_ERROR, "项目名称已存在", "项目名称"));
|
|
res.getError().add(buildError(ErrorConstants.PARAM_BEING_ERROR, "项目名称已存在", "项目名称"));
|
|
|
return res;
|
|
return res;
|
|
|
}
|
|
}
|
|
@@ -151,7 +154,7 @@ public class AdminBusinessProjectController extends CertifyApiController{
|
|
|
return res;
|
|
return res;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
- res.setData(businessProjectService.updateProject(s));
|
|
|
|
|
|
|
+ res.setData(businessprojectService.updateProject(s));
|
|
|
return res;
|
|
return res;
|
|
|
}
|
|
}
|
|
|
/**
|
|
/**
|
|
@@ -160,16 +163,16 @@ public class AdminBusinessProjectController extends CertifyApiController{
|
|
|
@RequestMapping(value = "/addProjectSize", method = RequestMethod.POST)
|
|
@RequestMapping(value = "/addProjectSize", method = RequestMethod.POST)
|
|
|
public Result addProjectSize(ProjectSize ps){
|
|
public Result addProjectSize(ProjectSize ps){
|
|
|
Result res=new Result();
|
|
Result res=new Result();
|
|
|
- if (businessProjectService.WhetherRepeat(ps)) {
|
|
|
|
|
|
|
+ if (businessprojectService.WhetherRepeat(ps)) {
|
|
|
res.getError().add(buildError(ErrorConstants.PARAM_BEING_ERROR, "规格名称已存在", "规格名称"));
|
|
res.getError().add(buildError(ErrorConstants.PARAM_BEING_ERROR, "规格名称已存在", "规格名称"));
|
|
|
return res;
|
|
return res;
|
|
|
}
|
|
}
|
|
|
- if (businessProjectService.judgeStatus(ps)) {
|
|
|
|
|
|
|
+ if (businessprojectService.judgeStatus(ps)) {
|
|
|
res.getError().add(buildError( "项目已停用", "项目已停用"));
|
|
res.getError().add(buildError( "项目已停用", "项目已停用"));
|
|
|
return res;
|
|
return res;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- res.setData(businessProjectService.addProjectSize(ps));
|
|
|
|
|
|
|
+ res.setData(businessprojectService.addProjectSize(ps));
|
|
|
return res;
|
|
return res;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -179,7 +182,7 @@ public class AdminBusinessProjectController extends CertifyApiController{
|
|
|
@RequestMapping(value = "/orgProjectSize", method = RequestMethod.POST)
|
|
@RequestMapping(value = "/orgProjectSize", method = RequestMethod.POST)
|
|
|
public Result orgProjectSize(ProjectSize ps){
|
|
public Result orgProjectSize(ProjectSize ps){
|
|
|
Result res=new Result();
|
|
Result res=new Result();
|
|
|
- res.setData(businessProjectService.updateOrgProjectSize(ps));
|
|
|
|
|
|
|
+ res.setData(businessprojectService.updateOrgProjectSize(ps));
|
|
|
return res;
|
|
return res;
|
|
|
}
|
|
}
|
|
|
/**
|
|
/**
|
|
@@ -192,7 +195,7 @@ public class AdminBusinessProjectController extends CertifyApiController{
|
|
|
res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "项目名称名称为空", "项目"));
|
|
res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "项目名称名称为空", "项目"));
|
|
|
return res;
|
|
return res;
|
|
|
}
|
|
}
|
|
|
- res.setData(businessProjectService.listProjectSize(pid,pNo, Psize));
|
|
|
|
|
|
|
+ res.setData(businessprojectService.listProjectSize(pid,pNo, Psize));
|
|
|
return res;
|
|
return res;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -202,7 +205,7 @@ public class AdminBusinessProjectController extends CertifyApiController{
|
|
|
@RequestMapping(value = "/getProjectSize", method = RequestMethod.GET)
|
|
@RequestMapping(value = "/getProjectSize", method = RequestMethod.GET)
|
|
|
public Result getProjectSize(String id){
|
|
public Result getProjectSize(String id){
|
|
|
Result res=new Result();
|
|
Result res=new Result();
|
|
|
- res.setData(businessProjectService.getProjectSize(id));
|
|
|
|
|
|
|
+ res.setData(businessprojectService.getProjectSize(id));
|
|
|
return res;
|
|
return res;
|
|
|
}
|
|
}
|
|
|
/**
|
|
/**
|
|
@@ -211,7 +214,7 @@ public class AdminBusinessProjectController extends CertifyApiController{
|
|
|
@RequestMapping(value = "/deleteProjectSize", method = RequestMethod.GET)
|
|
@RequestMapping(value = "/deleteProjectSize", method = RequestMethod.GET)
|
|
|
public Result deleteProjectSize(String id){
|
|
public Result deleteProjectSize(String id){
|
|
|
Result res=new Result();
|
|
Result res=new Result();
|
|
|
- res.setData(businessProjectService.deleteProjectSize(id));
|
|
|
|
|
|
|
+ res.setData(businessprojectService.deleteProjectSize(id));
|
|
|
return res;
|
|
return res;
|
|
|
}
|
|
}
|
|
|
/**
|
|
/**
|
|
@@ -220,7 +223,7 @@ public class AdminBusinessProjectController extends CertifyApiController{
|
|
|
@RequestMapping(value = "/stopProjectSize", method = RequestMethod.GET)
|
|
@RequestMapping(value = "/stopProjectSize", method = RequestMethod.GET)
|
|
|
public Result stopProjectSize(String id){
|
|
public Result stopProjectSize(String id){
|
|
|
Result res=new Result();
|
|
Result res=new Result();
|
|
|
- res.setData(businessProjectService.updateSotpProjectSize(id));
|
|
|
|
|
|
|
+ res.setData(businessprojectService.updateSotpProjectSize(id));
|
|
|
return res;
|
|
return res;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|