Commit 099aaf2e by 徐高华

参数校验

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