Commit 73c4bffb by 王祖波

参数缺失校验

parent 04329382
...@@ -793,7 +793,7 @@ public class WxEnterpriseInfoController extends WebBaseController { ...@@ -793,7 +793,7 @@ public class WxEnterpriseInfoController extends WebBaseController {
*/ */
@RequestMapping(path = "/enterprise/use-permission") @RequestMapping(path = "/enterprise/use-permission")
public RestResponse<List<EnterpriseUsingPermissionVO>> selectUsingEnterprisePermission(String enterpriseId) { public RestResponse<List<EnterpriseUsingPermissionVO>> selectUsingEnterprisePermission(String enterpriseId) {
if (StringUtils.isBlank(enterpriseId)) { if (StringUtils.isBlank(enterpriseId) || Objects.equals(enterpriseId, "-1")) {
return RestResponse.failure("-701", "参数缺失"); return RestResponse.failure("-701", "参数缺失");
} }
List<EnterpriseUsingPermissionDto> list = enterpriseUseForbidService.selectEnterprisePermissionByEnterpriseId(enterpriseId); List<EnterpriseUsingPermissionDto> list = enterpriseUseForbidService.selectEnterprisePermissionByEnterpriseId(enterpriseId);
......
...@@ -70,6 +70,9 @@ public class PotentialDataController { ...@@ -70,6 +70,9 @@ public class PotentialDataController {
*/ */
@RequestMapping(path = "/contact/page-order") @RequestMapping(path = "/contact/page-order")
public RestResponse<Page<ContactOrderDetailDTO>> pageOrder(@RequestBody ContactOrderPageQO contactOrderPageQO) { public RestResponse<Page<ContactOrderDetailDTO>> pageOrder(@RequestBody ContactOrderPageQO contactOrderPageQO) {
if (StringUtils.isBlank(contactOrderPageQO.getEnterpriseId()) || Objects.equals(contactOrderPageQO.getEnterpriseId(), "-1")) {
return RestResponse.successResult(new Page<>());
}
String enterpriseId = contactOrderPageQO.getEnterpriseId(); String enterpriseId = contactOrderPageQO.getEnterpriseId();
String clerkId = contactOrderPageQO.getClerkId(); String clerkId = contactOrderPageQO.getClerkId();
String storeId = contactOrderPageQO.getStoreId(); String storeId = contactOrderPageQO.getStoreId();
...@@ -114,6 +117,9 @@ public class PotentialDataController { ...@@ -114,6 +117,9 @@ public class PotentialDataController {
*/ */
@RequestMapping(path = "/potential/overview") @RequestMapping(path = "/potential/overview")
public RestResponse<PotentialOverviewVO> queryPotentialOverviewReport(@RequestBody PotentialBusiOverviewQO potentialOverviewQO) { public RestResponse<PotentialOverviewVO> queryPotentialOverviewReport(@RequestBody PotentialBusiOverviewQO potentialOverviewQO) {
if (StringUtils.isBlank(potentialOverviewQO.getEnterpriseId()) || Objects.equals(potentialOverviewQO.getEnterpriseId(), "-1")) {
return RestResponse.failure("-1","参数缺失");
}
String clerkId = potentialOverviewQO.getClerkId(); String clerkId = potentialOverviewQO.getClerkId();
Pair<Integer, List<String>> pair = getStoreIds(potentialOverviewQO); Pair<Integer, List<String>> pair = getStoreIds(potentialOverviewQO);
Integer clerkType = pair.getKey(); Integer clerkType = pair.getKey();
...@@ -163,6 +169,9 @@ public class PotentialDataController { ...@@ -163,6 +169,9 @@ public class PotentialDataController {
*/ */
@RequestMapping(path = "/potential/conv-member") @RequestMapping(path = "/potential/conv-member")
public RestResponse<Page<PotentialMemberConvVO>> queryPotentialConvMember(@RequestBody PotentialConvMemberQO potentialOverviewQO) { public RestResponse<Page<PotentialMemberConvVO>> queryPotentialConvMember(@RequestBody PotentialConvMemberQO potentialOverviewQO) {
if (StringUtils.isBlank(potentialOverviewQO.getEnterpriseId()) || Objects.equals(potentialOverviewQO.getEnterpriseId(), "-1")) {
return RestResponse.failure("-1","参数缺失");
}
List<String> storeIds = getStoreIds(potentialOverviewQO).getValue(); List<String> storeIds = getStoreIds(potentialOverviewQO).getValue();
Page<PotentialMemberConvVO> page = potentialDataAdaptor.pagePotentialConvMember(potentialOverviewQO, storeIds); Page<PotentialMemberConvVO> page = potentialDataAdaptor.pagePotentialConvMember(potentialOverviewQO, storeIds);
List<PotentialMemberConvVO> result = page.getResult(); List<PotentialMemberConvVO> result = page.getResult();
...@@ -179,6 +188,9 @@ public class PotentialDataController { ...@@ -179,6 +188,9 @@ public class PotentialDataController {
*/ */
@RequestMapping(path = "/potential/contact-detail") @RequestMapping(path = "/potential/contact-detail")
public RestResponse<Page<PotentialContactDetailOverviewVO>> queryPotentialContactReport(@RequestBody PotentialContactOverviewQO potentialOverviewQO) { public RestResponse<Page<PotentialContactDetailOverviewVO>> queryPotentialContactReport(@RequestBody PotentialContactOverviewQO potentialOverviewQO) {
if (StringUtils.isBlank(potentialOverviewQO.getEnterpriseId()) || Objects.equals(potentialOverviewQO.getEnterpriseId(), "-1")) {
return RestResponse.failure("-1","参数缺失");
}
String enterpriseId = potentialOverviewQO.getEnterpriseId(); String enterpriseId = potentialOverviewQO.getEnterpriseId();
String wxEnterpriseId = potentialOverviewQO.getWxEnterpriseId(); String wxEnterpriseId = potentialOverviewQO.getWxEnterpriseId();
ServiceResponse<PlatformPotentialCustomerOutDTO> potentialResponse = platformPotentialCustomerApiService.getPotentialCustomerOutRule(enterpriseId); ServiceResponse<PlatformPotentialCustomerOutDTO> potentialResponse = platformPotentialCustomerApiService.getPotentialCustomerOutRule(enterpriseId);
...@@ -276,6 +288,9 @@ public class PotentialDataController { ...@@ -276,6 +288,9 @@ public class PotentialDataController {
*/ */
@RequestMapping(path = "/potential/conv-detail") @RequestMapping(path = "/potential/conv-detail")
public RestResponse<Page<PotentialConvDetailOverviewVO>> queryPotentialConvReport(@RequestBody PotentialConvOverviewQO potentialOverviewQO) { public RestResponse<Page<PotentialConvDetailOverviewVO>> queryPotentialConvReport(@RequestBody PotentialConvOverviewQO potentialOverviewQO) {
if (StringUtils.isBlank(potentialOverviewQO.getEnterpriseId()) || Objects.equals(potentialOverviewQO.getEnterpriseId(), "-1")) {
return RestResponse.failure("-1","参数缺失");
}
List<String> storeIds = getStoreIds(potentialOverviewQO).getValue(); List<String> storeIds = getStoreIds(potentialOverviewQO).getValue();
Page<PotentialConvOverviewVO> page = potentialDataAdaptor.pagePotentialConvOverview(potentialOverviewQO, storeIds); Page<PotentialConvOverviewVO> page = potentialDataAdaptor.pagePotentialConvOverview(potentialOverviewQO, storeIds);
List<PotentialConvOverviewVO> result = page.getResult(); List<PotentialConvOverviewVO> result = page.getResult();
...@@ -310,6 +325,9 @@ public class PotentialDataController { ...@@ -310,6 +325,9 @@ public class PotentialDataController {
*/ */
@RequestMapping(path = "/recommend/overview") @RequestMapping(path = "/recommend/overview")
public RestResponse<RecommendOverviewVO> queryRecommendOverviewReport(@RequestBody RecommendBusiOverviewQO potentialOverviewQO) { public RestResponse<RecommendOverviewVO> queryRecommendOverviewReport(@RequestBody RecommendBusiOverviewQO potentialOverviewQO) {
if (StringUtils.isBlank(potentialOverviewQO.getEnterpriseId()) || Objects.equals(potentialOverviewQO.getEnterpriseId(), "-1")) {
return RestResponse.failure("-1","参数缺失");
}
List<String> storeIds = getStoreIds(potentialOverviewQO).getValue(); List<String> storeIds = getStoreIds(potentialOverviewQO).getValue();
// 使用数据 // 使用数据
RecommendUsedOverviewVO usedOverviewVO = null; RecommendUsedOverviewVO usedOverviewVO = null;
...@@ -338,6 +356,9 @@ public class PotentialDataController { ...@@ -338,6 +356,9 @@ public class PotentialDataController {
*/ */
@RequestMapping(path = "/recommend/used-detail") @RequestMapping(path = "/recommend/used-detail")
public RestResponse<Page<RecommendUsedDetailOverviewVO>> queryRecommendUsedReport(@RequestBody RecommendUsedOverviewQO potentialOverviewQO) { public RestResponse<Page<RecommendUsedDetailOverviewVO>> queryRecommendUsedReport(@RequestBody RecommendUsedOverviewQO potentialOverviewQO) {
if (StringUtils.isBlank(potentialOverviewQO.getEnterpriseId()) || Objects.equals(potentialOverviewQO.getEnterpriseId(), "-1")) {
return RestResponse.failure("-1","参数缺失");
}
List<String> storeIds = getStoreIds(potentialOverviewQO).getValue(); List<String> storeIds = getStoreIds(potentialOverviewQO).getValue();
Page<RecommendUsedOverviewVO> page = potentialDataAdaptor.pageRecommendUsedOverview(potentialOverviewQO, storeIds); Page<RecommendUsedOverviewVO> page = potentialDataAdaptor.pageRecommendUsedOverview(potentialOverviewQO, storeIds);
List<RecommendUsedOverviewVO> result = page.getResult(); List<RecommendUsedOverviewVO> result = page.getResult();
...@@ -372,6 +393,9 @@ public class PotentialDataController { ...@@ -372,6 +393,9 @@ public class PotentialDataController {
*/ */
@RequestMapping(path = "/recommend/conv-detail") @RequestMapping(path = "/recommend/conv-detail")
public RestResponse<Page<RecommendConvDetailOverviewVO>> queryRecommendConvReport(@RequestBody RecommendConvOverviewQO potentialOverviewQO) { public RestResponse<Page<RecommendConvDetailOverviewVO>> queryRecommendConvReport(@RequestBody RecommendConvOverviewQO potentialOverviewQO) {
if (StringUtils.isBlank(potentialOverviewQO.getEnterpriseId()) || Objects.equals(potentialOverviewQO.getEnterpriseId(), "-1")) {
return RestResponse.failure("-1","参数缺失");
}
List<String> storeIds = getStoreIds(potentialOverviewQO).getValue(); List<String> storeIds = getStoreIds(potentialOverviewQO).getValue();
Page<RecommendConvOverviewVO> page = potentialDataAdaptor.pageRecommendConvOverview(potentialOverviewQO, storeIds); Page<RecommendConvOverviewVO> page = potentialDataAdaptor.pageRecommendConvOverview(potentialOverviewQO, storeIds);
List<RecommendConvOverviewVO> result = page.getResult(); List<RecommendConvOverviewVO> result = page.getResult();
...@@ -406,6 +430,9 @@ public class PotentialDataController { ...@@ -406,6 +430,9 @@ public class PotentialDataController {
*/ */
@RequestMapping(path = "/recommend/used-trend") @RequestMapping(path = "/recommend/used-trend")
public RestResponse<Page<RecommendUsedTrendVO>> queryRecommendUsedTrend(@RequestBody RecommendUsedTrendQO potentialOverviewQO) { public RestResponse<Page<RecommendUsedTrendVO>> queryRecommendUsedTrend(@RequestBody RecommendUsedTrendQO potentialOverviewQO) {
if (StringUtils.isBlank(potentialOverviewQO.getEnterpriseId()) || Objects.equals(potentialOverviewQO.getEnterpriseId(), "-1")) {
return RestResponse.failure("-1","参数缺失");
}
List<String> storeIds = getStoreIds(potentialOverviewQO).getValue(); List<String> storeIds = getStoreIds(potentialOverviewQO).getValue();
Page<RecommendUsedTrendVO> page = potentialDataAdaptor.pageRecommendUsedTrend(potentialOverviewQO, storeIds); Page<RecommendUsedTrendVO> page = potentialDataAdaptor.pageRecommendUsedTrend(potentialOverviewQO, storeIds);
return RestResponse.successResult(page); return RestResponse.successResult(page);
...@@ -418,6 +445,9 @@ public class PotentialDataController { ...@@ -418,6 +445,9 @@ public class PotentialDataController {
*/ */
@RequestMapping(path = "/recommend/conv-trend") @RequestMapping(path = "/recommend/conv-trend")
public RestResponse<Page<RecommendConvTrendVO>> queryRecommendConvTrend(@RequestBody RecommendConvTrendQO potentialOverviewQO) { public RestResponse<Page<RecommendConvTrendVO>> queryRecommendConvTrend(@RequestBody RecommendConvTrendQO potentialOverviewQO) {
if (StringUtils.isBlank(potentialOverviewQO.getEnterpriseId()) || Objects.equals(potentialOverviewQO.getEnterpriseId(), "-1")) {
return RestResponse.failure("-1","参数缺失");
}
List<String> storeIds = getStoreIds(potentialOverviewQO).getValue(); List<String> storeIds = getStoreIds(potentialOverviewQO).getValue();
Page<RecommendConvTrendVO> page = potentialDataAdaptor.pageRecommendConvTrend(potentialOverviewQO, storeIds); Page<RecommendConvTrendVO> page = potentialDataAdaptor.pageRecommendConvTrend(potentialOverviewQO, storeIds);
return RestResponse.successResult(page); return RestResponse.successResult(page);
......
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