Merge remote-tracking branch 'origin/cc_20250325_select' into cc_20250325_select

This commit is contained in:
shuo.wang
2025-04-16 13:12:50 +08:00
5 changed files with 12 additions and 4 deletions

View File

@@ -93,7 +93,7 @@ public interface ShopInfoMapper extends Mapper<ShopInfoDO> {
ShopInfoDO selectByStoreNum(@Param("storeNum") String storeNum);
ShopInfoDO selectByStoreCode(@Param("storeNum") String storeCode);
ShopInfoDO selectByStoreCode(@Param("storeCode") String storeCode);
/**
* @Auther: wangshuo
* @Date: 2024/5/3

View File

@@ -177,7 +177,7 @@
select
<include refid="allColumn"/>
from xfsg_shop_info
where store_code = #{storeCode}
where shop_code = #{storeCode}
</select>
<select id="selectShopListByRegionId" resultType="com.cool.store.entity.ShopInfoDO">
select

View File

@@ -181,6 +181,10 @@ public class PushServiceImpl implements PushService {
try {
Request request = buildRequest(requestBody, url, username, secret);
request.headers().names().forEach(x->{
log.info(x+": {}",request.header(x));
});
try (Response response = okHttpClient.newCall(request).execute()) {
// 2. 获取原始响应内容
String responseBody = response.body().string();

View File

@@ -48,7 +48,7 @@ public class OpenApiValidateFilter implements Filter {
MDC.put(CommonConstants.REQUEST_ID, UUIDUtils.get32UUID());
HttpServletRequest request = (HttpServletRequest) servletRequest;
String uri = request.getRequestURI();
if(!uri.startsWith("/zxjp/open")){
if(!uri.startsWith("/zxjp/open1")){
filterChain.doFilter(servletRequest, response);
return;
}
@@ -66,7 +66,7 @@ public class OpenApiValidateFilter implements Filter {
long currentTime = System.currentTimeMillis()/1000;
long timeDiff = Math.abs(currentTime - timestamp);
if (timeDiff > 300) {
if (timeDiff > 600) {
log.info("OpenApiValidateFilter==>{}","请求已过期,服务器时间:" + currentTime + " 请求时间:" + timestamp);
throw new ServiceException(ErrorCodeEnum.SIGN_FAIL);
}

View File

@@ -1,9 +1,11 @@
package com.cool.store.controller.webb;
import com.alibaba.fastjson.JSONObject;
import com.cool.store.dto.StatusRefreshDTO;
import com.cool.store.response.bigdata.ApiResponse;
import com.cool.store.service.OpenApiService;
import io.swagger.annotations.Api;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
@@ -16,6 +18,7 @@ import javax.annotation.Resource;
@RestController
@RequestMapping("/open/v1/")
@Api(tags = "对外接口")
@Slf4j
public class OpenApiController {
@Resource
@@ -23,6 +26,7 @@ public class OpenApiController {
@PostMapping("/statusRefresh")
public ApiResponse<Boolean> statusRefresh(@RequestBody StatusRefreshDTO statusRefreshDTO){
log.info("statusRefresh request{}", JSONObject.toJSONString(statusRefreshDTO));
return ApiResponse.success(openApiService.statusRefresh(statusRefreshDTO));
}