Commit 9e0290c3 by 吕明尚

增加根据session获取门店信息

parent fc76bb6d
......@@ -4,6 +4,7 @@ import java.util.List;
import java.util.Map;
import javax.servlet.http.HttpServletResponse;
import com.dianping.openapi.sdk.api.customerauth.session.entity.CustomerKeyShopScopeResponseEntity;
import io.swagger.annotations.ApiOperation;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
......@@ -28,6 +29,7 @@ import share.system.domain.vo.SConsumerVo;
import share.system.service.ISStoreService;
import share.common.utils.poi.ExcelUtil;
import share.common.core.page.TableDataInfo;
import share.system.service.QPService;
import share.system.service.SConsumerService;
/**
......@@ -44,6 +46,8 @@ public class SStoreController extends BaseController
private ISStoreService sStoreService;
@Autowired
private SConsumerService sConsumerService;
@Autowired
private QPService qpService;
/**
* 查询门店列表
......@@ -182,4 +186,10 @@ public class SStoreController extends BaseController
}
@GetMapping("/scope")
public List<CustomerKeyShopScopeResponseEntity> scope() {
return qpService.scope();
}
}
......@@ -345,6 +345,10 @@ public class QPServiceImpl implements QPService {
@Override
public List<CustomerKeyShopScopeResponseEntity> scope() {
Boolean b = redisUtil.exists(ReceiptRdeisEnum.MT_SESSION_KEY.getValue());
if (Boolean.FALSE.equals(b)) {
throw new RuntimeException("请联系管理员");
}
DefaultOpenAPIClient openAPIClient = new DefaultOpenAPIClient();
String o = redisUtil.get(ReceiptRdeisEnum.MT_SESSION_KEY.getValue());
JSONObject sessionKey = new JSONObject(o);
......
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