Commit 099aaf2e by 徐高华

参数校验

parent 7304ad19
...@@ -40,7 +40,6 @@ import com.gic.haoban.app.customer.service.api.service.QywxTagSyncApiService; ...@@ -40,7 +40,6 @@ import com.gic.haoban.app.customer.service.api.service.QywxTagSyncApiService;
import com.gic.haoban.base.api.common.BasePageInfo; import com.gic.haoban.base.api.common.BasePageInfo;
import com.gic.haoban.base.api.common.PageResult; import com.gic.haoban.base.api.common.PageResult;
import com.gic.haoban.base.api.common.ServiceResponse; import com.gic.haoban.base.api.common.ServiceResponse;
import com.gic.haoban.base.api.common.pojo.dto.WebLoginDTO;
import com.gic.haoban.common.utils.AuthWebRequestUtil; import com.gic.haoban.common.utils.AuthWebRequestUtil;
import com.gic.haoban.common.utils.EntityUtil; import com.gic.haoban.common.utils.EntityUtil;
import com.gic.haoban.common.utils.HaobanResponse; import com.gic.haoban.common.utils.HaobanResponse;
...@@ -497,9 +496,7 @@ public class EnterpriseController extends WebBaseController { ...@@ -497,9 +496,7 @@ public class EnterpriseController extends WebBaseController {
// 绑定门店列表 // 绑定门店列表
@RequestMapping("bind-store-list") @RequestMapping("bind-store-list")
public HaobanResponse bindStoreList(String enterpriseId, String search, BasePageInfo basePageInfo) { public HaobanResponse bindStoreList(String wxEnterpriseId,String enterpriseId, String search, BasePageInfo basePageInfo) {
WebLoginDTO login = AuthWebRequestUtil.getLoginUser();
String wxEnterpriseId = login.getWxEnterpriseId();
Page<BindStoreInfoDTO> retPage = wxEnterpriseRelatedApiService.pageBindStoreByEnterpriseId(wxEnterpriseId, enterpriseId, search, basePageInfo); Page<BindStoreInfoDTO> retPage = wxEnterpriseRelatedApiService.pageBindStoreByEnterpriseId(wxEnterpriseId, enterpriseId, search, basePageInfo);
return resultResponse(HaoBanErrCode.ERR_1, retPage); return resultResponse(HaoBanErrCode.ERR_1, retPage);
} }
...@@ -538,9 +535,10 @@ public class EnterpriseController extends WebBaseController { ...@@ -538,9 +535,10 @@ public class EnterpriseController extends WebBaseController {
} }
@RequestMapping("gic-store-group-list") @RequestMapping("gic-store-group-list")
public HaobanResponse storeGroupList(String enterpriseId, String keyWord) { public HaobanResponse storeGroupList(String wxEnterpriseId,String enterpriseId, String keyWord) {
WebLoginDTO loginUser = AuthWebRequestUtil.getLoginUser(); if(org.apache.commons.lang3.StringUtils.isAnyBlank(wxEnterpriseId,enterpriseId)) {
String wxEnterpriseId = loginUser.getWxEnterpriseId(); return resultResponse(HaoBanErrCode.ERR_2);
}
List<PowerStoreGroupDTO> departmentList = storeGroupService.getStoreGroupList(enterpriseId, keyWord); List<PowerStoreGroupDTO> departmentList = storeGroupService.getStoreGroupList(enterpriseId, keyWord);
List<StoreRangeInfoDTO> rangeInfoDTOList = wxEnterpriseRelatedApiService.listAllBindStoreOrGroup(enterpriseId); List<StoreRangeInfoDTO> rangeInfoDTOList = wxEnterpriseRelatedApiService.listAllBindStoreOrGroup(enterpriseId);
Map<String, StoreRangeInfoDTO> storeRangeMap = new HashMap<>(); Map<String, StoreRangeInfoDTO> storeRangeMap = new HashMap<>();
...@@ -607,6 +605,9 @@ public class EnterpriseController extends WebBaseController { ...@@ -607,6 +605,9 @@ public class EnterpriseController extends WebBaseController {
//授权企业列表 filteRight 是否过滤无登录权限的列表 //授权企业列表 filteRight 是否过滤无登录权限的列表
@RequestMapping("gic-enterprise-list") @RequestMapping("gic-enterprise-list")
public HaobanResponse wxaEnterpriseList(String wxEnterpriseId) { public HaobanResponse wxaEnterpriseList(String wxEnterpriseId) {
if(org.apache.commons.lang3.StringUtils.isAnyBlank(wxEnterpriseId)) {
return resultResponse(HaoBanErrCode.ERR_2);
}
List<EnterpriseDetailDTO> list = wxEnterpriseRelatedApiService.listEnterpriseByWxEnterpriseId(wxEnterpriseId,null,false); List<EnterpriseDetailDTO> list = wxEnterpriseRelatedApiService.listEnterpriseByWxEnterpriseId(wxEnterpriseId,null,false);
return resultResponse(HaoBanErrCode.ERR_1, list); return resultResponse(HaoBanErrCode.ERR_1, list);
} }
...@@ -618,10 +619,11 @@ public class EnterpriseController extends WebBaseController { ...@@ -618,10 +619,11 @@ public class EnterpriseController extends WebBaseController {
* @return * @return
*/ */
@RequestMapping("flush-bind-store-list") @RequestMapping("flush-bind-store-list")
public HaobanResponse flushBindStoreList(String enterpriseId) { public HaobanResponse flushBindStoreList(String wxEnterpriseId,String enterpriseId) {
WebLoginDTO login = AuthWebRequestUtil.getLoginUser(); if(org.apache.commons.lang3.StringUtils.isAnyBlank(wxEnterpriseId,enterpriseId)) {
String wxEnterpriseId = login.getWxEnterpriseId(); return resultResponse(HaoBanErrCode.ERR_2);
ServiceResponse response = wxEnterpriseRelatedApiService.flushBindStoreByEnterpriseId(enterpriseId, wxEnterpriseId, login.getStaffId(), ChannelCodeEnum.SYNC_UNBIND.getCode()); }
ServiceResponse response = wxEnterpriseRelatedApiService.flushBindStoreByEnterpriseId(enterpriseId, wxEnterpriseId, null, ChannelCodeEnum.SYNC_UNBIND.getCode());
logger.info("返回信息:{}", JSONObject.toJSONString(response)); logger.info("返回信息:{}", JSONObject.toJSONString(response));
if (response.getCode() != 1) { if (response.getCode() != 1) {
HaoBanErrCode.ERR_DEFINE.setMsg(response.getMessage()); HaoBanErrCode.ERR_DEFINE.setMsg(response.getMessage());
...@@ -637,15 +639,11 @@ public class EnterpriseController extends WebBaseController { ...@@ -637,15 +639,11 @@ public class EnterpriseController extends WebBaseController {
* @return * @return
*/ */
@RequestMapping("wx-enterprise-bind-detail") @RequestMapping("wx-enterprise-bind-detail")
public HaobanResponse wxEnterpriseBindDetail(String enterpriseId) { public HaobanResponse wxEnterpriseBindDetail(String wxEnterpriseId , String enterpriseId) {
if (StringUtils.isBlank(enterpriseId)) { if(org.apache.commons.lang3.StringUtils.isAnyBlank(wxEnterpriseId,enterpriseId)) {
return resultResponse(HaoBanErrCode.ERR_2); return resultResponse(HaoBanErrCode.ERR_2);
} }
WebLoginDTO login = AuthWebRequestUtil.getLoginUser();
String wxEnterpriseId = login.getWxEnterpriseId();
WxEnterpriseRelationDetailDTO bindInfo = wxEnterpriseRelatedApiService.getEnterpriseBindInfo(wxEnterpriseId, enterpriseId); WxEnterpriseRelationDetailDTO bindInfo = wxEnterpriseRelatedApiService.getEnterpriseBindInfo(wxEnterpriseId, enterpriseId);
return resultResponse(HaoBanErrCode.ERR_1, bindInfo); return resultResponse(HaoBanErrCode.ERR_1, bindInfo);
} }
} }
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