Merge branch 'cc_2250513_api' into 'master'
Cc 2250513 api See merge request hangzhou/java/custom_zxjp!89
This commit is contained in:
@@ -0,0 +1,59 @@
|
|||||||
|
package com.cool.store.enums;
|
||||||
|
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author suzhuhong
|
||||||
|
* @Date 2025/5/13 9:57
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
public enum ExtendFieldTypeEnum {
|
||||||
|
|
||||||
|
TEST_STORE_MANAGER_MOBILE("extend_field_1746670633436","店长手机号"),
|
||||||
|
TEST_SIGNATORY_NAME_1("extend_field_1746670645231","签约人1名称"),
|
||||||
|
TEST_SIGNATORY_MOBILE_1("extend_field_1746670652805","签约人2手机号"),
|
||||||
|
TEST_SIGNATORY_NAME_2("extend_field_1746670671614","签约人2名称"),
|
||||||
|
TEST_SIGNATORY_MOBILE_2("extend_field_1746670686307","签约人2手机号"),
|
||||||
|
TEST_ORDER_NAME("extend_field_1747103227333","订单小程序名称"),
|
||||||
|
ONLINE_STORE_MANAGER_MOBILE("extend_field_1746598536903","店长手机号"),
|
||||||
|
ONLINE_SIGNATORY_NAME_1("extend_field_1746598562255","签约人1名称"),
|
||||||
|
ONLINE_SIGNATORY_MOBILE_1("extend_field_1746598570479","签约人2手机号"),
|
||||||
|
ONLINE_SIGNATORY_NAME_2("extend_field_1746598584139","签约人2名称"),
|
||||||
|
ONLINE_SIGNATORY_MOBILE_2("extend_field_1746598594140","签约人2手机号"),
|
||||||
|
ONLINE_ORDER_NAME("extend_field_1746599049206","订单小程序名称"),;
|
||||||
|
|
||||||
|
private String key;
|
||||||
|
|
||||||
|
private String msg;
|
||||||
|
|
||||||
|
ExtendFieldTypeEnum(String key,String msg){
|
||||||
|
this.key = key;
|
||||||
|
this.msg = msg;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static Map<String, ExtendFieldTypeEnum> configMap(){
|
||||||
|
return Arrays.stream(ExtendFieldTypeEnum.values())
|
||||||
|
.collect(Collectors.toMap(
|
||||||
|
ExtendFieldTypeEnum::getKey,
|
||||||
|
e -> e
|
||||||
|
));
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getKey() {
|
||||||
|
return key;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setKey(String key) {
|
||||||
|
this.key = key;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getMsg() {
|
||||||
|
return msg;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMsg(String msg) {
|
||||||
|
this.msg = msg;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,14 +1,17 @@
|
|||||||
package com.cool.store.utils;
|
package com.cool.store.utils;
|
||||||
|
|
||||||
|
import cn.hutool.core.util.RandomUtil;
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import com.google.gson.JsonObject;
|
import com.google.gson.JsonObject;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import okhttp3.internal.http.HttpMethod;
|
||||||
|
|
||||||
import javax.crypto.Mac;
|
import javax.crypto.Mac;
|
||||||
import javax.crypto.spec.SecretKeySpec;
|
import javax.crypto.spec.SecretKeySpec;
|
||||||
import java.nio.charset.StandardCharsets;
|
import java.nio.charset.StandardCharsets;
|
||||||
import java.security.InvalidKeyException;
|
import java.security.*;
|
||||||
import java.security.NoSuchAlgorithmException;
|
import java.security.spec.InvalidKeySpecException;
|
||||||
|
import java.security.spec.PKCS8EncodedKeySpec;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -18,6 +21,9 @@ import java.util.*;
|
|||||||
*/
|
*/
|
||||||
@Slf4j
|
@Slf4j
|
||||||
public class SignatureUtils {
|
public class SignatureUtils {
|
||||||
|
|
||||||
|
|
||||||
|
private static final String privateKey = "MIIEvAIBADANBgkqhkiG9w0BAQEFAASCBKYwggSiAgEAAoIBAQCML5dEU4e6BAopiSjxeA2ZNs3VeIXoWe8HpHHGhZP1xE+4vbPv3L4Z7XexeoPMiBcluyGKSRl5jwuvYvcF9A2nGPhxVugYOxpC+TuGVu3TE7a2E/+1iMFfdNCYgqMxfnTe2Svo+X5anc5AcpKar2+AYcdZ4emMQLwrJkEB9endpWPruqC7dCUmAwxByMi525fdipFEDsAIf9ozkBuqwyQa0/RwQ+fyOT87pJ58z7gLXcZxW8YaXNAS5hmdA6/0GqZQQyDTXxZ/nDPpeIIk8PC8VNrgllCxwDtyDMWfUg8+yTlHAjsCX7MGRM3Gd3QcfqrvlIK/Lvn/9qAWcY3KOU1JAgMBAAECggEADwvnokmN6qEW3yTt7FcMrJqFhslgJBONFKapoJuDSVCIFwXji5YHoHxMydOi1F/yDhZzD+bvMU0xfaJzbaPnmD0Vo4KmuD0VwUUDhtSLQ8ncpVfprRgv2zlMT2ZMMlqGnEm2jRPEZGEGO4QgqLI2V1MHZOYa3XcwSzhYp2d38dZvPxWnF9mDt26BbM5Eb3D4oAb+J8rOVsbXEbVTdVTsJmhLOUEK84r2fUCLqHALAOc/za28ToupYD/QRWT6K5nWKDclDWn2tnz3MQJrEYMVvGDVCryqltljd2XB4MXnBZxEYDZyonxxI5M1Avb9mHUyy2wMYSeTUocSnVjgCZPnFQKBgQC34xs/Q0lDTpRdS0a8odzey4jew/nfo8TqzAa2/vomRHkOAoXyqci71tCos5836hxprkhvj1KMauB/rFzCZYfr5a2UMM70p/vuYv5JhTMDStTVx9OPcydZDeK77OY39qPhkW4Tm10BBUodzVV0YhxbCfRmSRSF2FuZCSLdd5bmpQKBgQDDKTUYuA+s/cFt0QsKkRRBm/ONQnETCCXo87NP9RzspcydkULnmuRMLWP4zqHN5TccL0MyI7hyHZ7AwU3qoi4JXFo8k5rRcSdwaBy99B+ZKF159l7chVHE8p4tYSmxwoIOIbpfXA2nfp+zaknt6lb8DSeCw8lewsEZUwmU++bu1QKBgB5M5t16yeS0WxAwajyE828m3KvQYSkvxC/oZKbcxv1tRQFA+y9sOK5zDDjwOCkvg3UKidcQJ8sJhWqkTTifIFGHrB2CGWgJEiNK3pngv/In74A2iC7YC8DJ3/WVaK4KDyEJJLlIXX/gjkDw58bgr8l0j3gXTLFtYFKMRdl2bkAdAoGAHwhNZhnWfEZ5XHHyFIMPOoOGzb5z5nfUN1+Q8rTiHYsbpy5y+gr6JFbPX7/ToL7C7ZtiTvW5HYQyOypBrn6NXXWu75T0+DrK76fOcjIAWEU/3+XaHayhXPTLTCH4FEj+jyqzzPgBP9H1qPzMtqUdocShtLxXJ9dGBzXZ/zOy++UCgYAHgaZC5Jz8+p5Ka7YtPZXpDXt1gUh2bmzIcAOBlizE+ElWZN/skybumos3lP8JOXdB65jEuXI9V0rc6n/KpOLY2Xfy6CX78RpWVXPc30D10DxUVI9hyEU+Xg4t9rwOAVhZaOwjhaEqpdvDrjMmX0bBVwCI2QXt7GnjUPqibNyEbQ==";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 生成 HmacSHA256 签名
|
* 生成 HmacSHA256 签名
|
||||||
@@ -37,6 +43,47 @@ public class SignatureUtils {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 正新菜品市场系统 验签
|
||||||
|
* @param httpMethod
|
||||||
|
* @param uri
|
||||||
|
* @param requestBody
|
||||||
|
* @param timeStamp
|
||||||
|
* @param random
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public static String sign(String httpMethod, String uri, String requestBody, String timeStamp, String random) throws Exception {
|
||||||
|
log.info("timeStamp+random:{}",timeStamp + "/" + random);
|
||||||
|
String plainText = new StringJoiner("&")
|
||||||
|
.add("CRM")
|
||||||
|
.add(httpMethod.toUpperCase())
|
||||||
|
.add(uri)
|
||||||
|
.add(requestBody)
|
||||||
|
.add(timeStamp)
|
||||||
|
.add(random)
|
||||||
|
.toString();
|
||||||
|
// 签名算法
|
||||||
|
Signature signature = Signature.getInstance("SHA256WithRSA");
|
||||||
|
|
||||||
|
PrivateKey privateKey = readPrivateKey(SignatureUtils.privateKey);
|
||||||
|
// 签名
|
||||||
|
signature.initSign(privateKey);
|
||||||
|
signature.update(plainText.getBytes(StandardCharsets.UTF_8));
|
||||||
|
return Base64.getEncoder().encodeToString(signature.sign());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private static PrivateKey readPrivateKey(String key) throws Exception {
|
||||||
|
KeyFactory keyFactory = KeyFactory.getInstance("RSA");
|
||||||
|
byte[] keys = Base64.getDecoder().decode(key);
|
||||||
|
try {
|
||||||
|
PKCS8EncodedKeySpec keySpec = new PKCS8EncodedKeySpec(keys);
|
||||||
|
return keyFactory.generatePrivate(keySpec);
|
||||||
|
} catch (InvalidKeySpecException e) {
|
||||||
|
throw new IllegalStateException("私钥⽆效:", e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 生成待签名字符串(参数按字母排序 + appkey + timestamp)
|
* 生成待签名字符串(参数按字母排序 + appkey + timestamp)
|
||||||
* @param params 请求参数Map(需提前过滤空值)
|
* @param params 请求参数Map(需提前过滤空值)
|
||||||
|
|||||||
@@ -63,5 +63,9 @@ public class StoreDao {
|
|||||||
return storeMapper.listByMobile(mobile);
|
return storeMapper.listByMobile(mobile);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public List<StoreDO> list() {
|
||||||
|
return storeMapper.list();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -31,4 +31,10 @@ public interface StoreMapper {
|
|||||||
*/
|
*/
|
||||||
List<StoreDO> listByMobile(@Param("mobile") String mobile);
|
List<StoreDO> listByMobile(@Param("mobile") String mobile);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询门店数据
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<StoreDO> list();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -83,10 +83,16 @@
|
|||||||
select *
|
select *
|
||||||
from store_${enterpriseId}
|
from store_${enterpriseId}
|
||||||
<where>
|
<where>
|
||||||
|
and is_delete = 'effective'
|
||||||
<if test="mobile!=null and mobile !=''">
|
<if test="mobile!=null and mobile !=''">
|
||||||
and `extend_field` like concat('%', #{mobile}, '%')
|
and `extend_field` like concat('%', #{mobile}, '%')
|
||||||
</if>
|
</if>
|
||||||
</where>
|
</where>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<select id="list" resultMap="BaseResultMap">
|
||||||
|
select *
|
||||||
|
from store_${enterpriseId} where is_delete = 'effective' order by id asc
|
||||||
|
</select>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|||||||
@@ -0,0 +1,14 @@
|
|||||||
|
package com.cool.store.dto;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author suzhuhong
|
||||||
|
* @Date 2025/5/13 17:02
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class FoodTokenDTO {
|
||||||
|
|
||||||
|
private String mobile ;
|
||||||
|
}
|
||||||
@@ -0,0 +1,31 @@
|
|||||||
|
package com.cool.store.dto;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author suzhuhong
|
||||||
|
* @Date 2025/5/13 10:56
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class StoreDTO {
|
||||||
|
|
||||||
|
@ApiModelProperty("门店名称")
|
||||||
|
private String storeName;
|
||||||
|
@ApiModelProperty("门店CODE")
|
||||||
|
private String storeCode;
|
||||||
|
@ApiModelProperty("店长手机号")
|
||||||
|
private String managerPhone;
|
||||||
|
@ApiModelProperty("签约人1姓名")
|
||||||
|
private String signer1Name;
|
||||||
|
@ApiModelProperty("签约人2手机号")
|
||||||
|
private String signer1Phone;
|
||||||
|
@ApiModelProperty("签约人2姓名")
|
||||||
|
private String signer2Name;
|
||||||
|
@ApiModelProperty("签约人2手机号")
|
||||||
|
private String signer2Phone;
|
||||||
|
@ApiModelProperty("订单小程序名称")
|
||||||
|
private String orderMiniProgramName;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
package com.cool.store.request;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author suzhuhong
|
||||||
|
* @Date 2025/5/13 11:08
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class OpenApiStoreRequest {
|
||||||
|
|
||||||
|
private Integer pageSize;
|
||||||
|
|
||||||
|
private Integer pageNum;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,24 @@
|
|||||||
|
package com.cool.store.service;
|
||||||
|
|
||||||
|
import com.cool.store.dto.StoreDTO;
|
||||||
|
import com.github.pagehelper.PageInfo;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author suzhuhong
|
||||||
|
* @Date 2025/5/13 9:56
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
public interface StoreService {
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询门店信息 包括扩展信息
|
||||||
|
* @param pageSize
|
||||||
|
* @param pageNum
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
PageInfo<StoreDTO> getStoreExtendFieldInfo(Integer pageSize,Integer pageNum);
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,22 @@
|
|||||||
|
package com.cool.store.service;
|
||||||
|
|
||||||
|
import com.cool.store.dto.FoodTokenDTO;
|
||||||
|
import com.cool.store.dto.GetAccessTokenDTO;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 正新菜品市场api对接-埃林哲-对接人徐哲
|
||||||
|
* @Author suzhuhong
|
||||||
|
* @Date 2025/5/13 15:20
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
public interface ThirdFoodService {
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取正新菜品市场token
|
||||||
|
* @param dto
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
String getFoodToken(FoodTokenDTO dto);
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,116 @@
|
|||||||
|
package com.cool.store.service.impl;
|
||||||
|
|
||||||
|
import com.cool.store.dao.StoreDao;
|
||||||
|
import com.cool.store.dto.StoreDTO;
|
||||||
|
import com.cool.store.entity.StoreDO;
|
||||||
|
import com.cool.store.enums.ErrorCodeEnum;
|
||||||
|
import com.cool.store.enums.ExtendFieldTypeEnum;
|
||||||
|
import com.cool.store.exception.ServiceException;
|
||||||
|
import com.cool.store.service.StoreService;
|
||||||
|
import com.fasterxml.jackson.core.type.TypeReference;
|
||||||
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||||
|
import com.github.pagehelper.Page;
|
||||||
|
import com.github.pagehelper.PageHelper;
|
||||||
|
import com.github.pagehelper.PageInfo;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.apache.commons.collections4.CollectionUtils;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author suzhuhong
|
||||||
|
* @Date 2025/5/13 9:56
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
@Slf4j
|
||||||
|
public class StoreServiceImpl implements StoreService {
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
StoreDao storeDao;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public PageInfo<StoreDTO> getStoreExtendFieldInfo(Integer pageSize, Integer pageNum) {
|
||||||
|
if (pageSize>200){
|
||||||
|
throw new ServiceException(ErrorCodeEnum.ERROR_MESSAGE,"单次最多获取200条门店数据");
|
||||||
|
}
|
||||||
|
PageHelper.startPage(pageNum,pageSize);
|
||||||
|
List<StoreDO> list = storeDao.list();
|
||||||
|
PageInfo info = new PageInfo<>(list);
|
||||||
|
if (CollectionUtils.isEmpty(list)){
|
||||||
|
return info;
|
||||||
|
}
|
||||||
|
List<StoreDTO> storeDTOS = processStores(list);
|
||||||
|
info.setList(storeDTOS);
|
||||||
|
return info;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public static List<StoreDTO> processStores(List<StoreDO> stores) {
|
||||||
|
ObjectMapper objectMapper = new ObjectMapper();
|
||||||
|
|
||||||
|
// 创建配置映射:key -> 枚举项
|
||||||
|
Map<String, ExtendFieldTypeEnum> configMap = ExtendFieldTypeEnum.configMap();
|
||||||
|
|
||||||
|
// 处理每个门店
|
||||||
|
return stores.stream().map(store -> {
|
||||||
|
StoreDTO dto = new StoreDTO();
|
||||||
|
dto.setStoreName(store.getStoreName());
|
||||||
|
dto.setStoreCode(store.getStoreNum());
|
||||||
|
|
||||||
|
try {
|
||||||
|
// 解析门店的扩展字段
|
||||||
|
Map<String, String> extendFields = objectMapper.readValue(
|
||||||
|
store.getExtendField(),
|
||||||
|
new TypeReference<Map<String, String>>() {}
|
||||||
|
);
|
||||||
|
|
||||||
|
// 匹配并设置DTO字段
|
||||||
|
for (Map.Entry<String, String> entry : extendFields.entrySet()) {
|
||||||
|
ExtendFieldTypeEnum fieldEnum = configMap.get(entry.getKey());
|
||||||
|
if (fieldEnum != null) {
|
||||||
|
switch (fieldEnum) {
|
||||||
|
case TEST_STORE_MANAGER_MOBILE:
|
||||||
|
case ONLINE_STORE_MANAGER_MOBILE:
|
||||||
|
dto.setManagerPhone(entry.getValue());
|
||||||
|
break;
|
||||||
|
case TEST_SIGNATORY_NAME_1:
|
||||||
|
case ONLINE_SIGNATORY_NAME_1:
|
||||||
|
dto.setSigner1Name(entry.getValue());
|
||||||
|
break;
|
||||||
|
case TEST_SIGNATORY_MOBILE_1:
|
||||||
|
case ONLINE_SIGNATORY_MOBILE_1:
|
||||||
|
dto.setSigner1Phone(entry.getValue());
|
||||||
|
break;
|
||||||
|
case TEST_SIGNATORY_NAME_2:
|
||||||
|
case ONLINE_SIGNATORY_NAME_2:
|
||||||
|
dto.setSigner2Name(entry.getValue());
|
||||||
|
break;
|
||||||
|
case TEST_SIGNATORY_MOBILE_2:
|
||||||
|
case ONLINE_SIGNATORY_MOBILE_2:
|
||||||
|
dto.setSigner2Phone(entry.getValue());
|
||||||
|
break;
|
||||||
|
case TEST_ORDER_NAME:
|
||||||
|
case ONLINE_ORDER_NAME:
|
||||||
|
dto.setOrderMiniProgramName(entry.getValue());
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
// 处理JSON解析异常
|
||||||
|
log.error("解析门店扩展字段失败: {} " + store.getStoreNum());
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
return dto;
|
||||||
|
}).collect(Collectors.toList());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,148 @@
|
|||||||
|
package com.cool.store.service.impl;
|
||||||
|
|
||||||
|
import cn.hutool.core.util.RandomUtil;
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import com.cool.store.dto.FoodTokenDTO;
|
||||||
|
import com.cool.store.dto.GetAccessTokenDTO;
|
||||||
|
import com.cool.store.enums.ErrorCodeEnum;
|
||||||
|
import com.cool.store.exception.ServiceException;
|
||||||
|
import com.cool.store.response.oppty.OpportunityApiResponse;
|
||||||
|
import com.cool.store.service.ThirdFoodService;
|
||||||
|
import com.cool.store.utils.SignatureUtils;
|
||||||
|
import com.fasterxml.jackson.databind.JavaType;
|
||||||
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import okhttp3.OkHttpClient;
|
||||||
|
import okhttp3.Request;
|
||||||
|
import okhttp3.RequestBody;
|
||||||
|
import okhttp3.Response;
|
||||||
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import java.net.URI;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author suzhuhong
|
||||||
|
* @Date 2025/5/13 15:21
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
@Slf4j
|
||||||
|
public class ThirdFoodServiceImpl implements ThirdFoodService {
|
||||||
|
|
||||||
|
@Value("${zx.food.url}")
|
||||||
|
private String apiUrl;
|
||||||
|
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
OkHttpClient okHttpClient;
|
||||||
|
@Resource
|
||||||
|
ObjectMapper objectMapper;
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getFoodToken(FoodTokenDTO dto) {
|
||||||
|
// 1. 发送POST请求
|
||||||
|
String url = apiUrl + "/interface/v1/user/getToken";
|
||||||
|
return executeApiCall(url, dto, String.class);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private <T> T executeApiCall(String url, Object requestBody, Class<T> responseType) {
|
||||||
|
// 1. 打印请求前日志
|
||||||
|
//logRequest(url, requestBody);
|
||||||
|
|
||||||
|
try {
|
||||||
|
Request request = buildRequest(requestBody, url);
|
||||||
|
|
||||||
|
try (Response response = okHttpClient.newCall(request).execute()) {
|
||||||
|
// 2. 获取原始响应内容
|
||||||
|
String responseBody = response.body().string();
|
||||||
|
|
||||||
|
// 3. 打印响应日志
|
||||||
|
logResponse(url, response.code(), responseBody);
|
||||||
|
|
||||||
|
if (!response.isSuccessful()) {
|
||||||
|
throw new ServiceException(ErrorCodeEnum.THIRD_API_ERROR,
|
||||||
|
"HTTP请求失败,状态码: " + response.code());
|
||||||
|
}
|
||||||
|
|
||||||
|
// 4. 解析响应
|
||||||
|
JavaType javaType = objectMapper.getTypeFactory()
|
||||||
|
.constructParametricType(OpportunityApiResponse.class, responseType);
|
||||||
|
|
||||||
|
OpportunityApiResponse<T> apiResponse = objectMapper.readValue(responseBody, javaType);
|
||||||
|
|
||||||
|
if (apiResponse.getCode() != 200) {
|
||||||
|
throw new ServiceException(ErrorCodeEnum.THIRD_API_ERROR, apiResponse.getMsg());
|
||||||
|
}
|
||||||
|
return apiResponse.getData();
|
||||||
|
}
|
||||||
|
} catch (ServiceException e) {
|
||||||
|
throw e;
|
||||||
|
} catch (Exception e) {
|
||||||
|
log.error("API调用异常 - URL: {}, 错误: {}", url, e.getMessage(), e);
|
||||||
|
throw new ServiceException(ErrorCodeEnum.THIRD_API_ERROR, "接口调用异常: " + e.getMessage());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private Request buildRequest(Object requestBody, String url) {
|
||||||
|
String timestamp = String.valueOf(System.currentTimeMillis());
|
||||||
|
String random = RandomUtil.randomString(20);
|
||||||
|
|
||||||
|
String signString = null;
|
||||||
|
try {
|
||||||
|
signString = SignatureUtils.sign("POST","/v1/user/getToken", objectMapper.writeValueAsString(requestBody),timestamp,random);
|
||||||
|
} catch (Exception e) {
|
||||||
|
throw new ServiceException(ErrorCodeEnum.THIRD_API_SIGN_ERROR,"加密失败");
|
||||||
|
}
|
||||||
|
|
||||||
|
log.info("签名生成 - 签名结果: {}", signString);
|
||||||
|
|
||||||
|
RequestBody body = RequestBody.create(okhttp3.MediaType.parse("application/json"),
|
||||||
|
JSONObject.toJSONString(requestBody)
|
||||||
|
);
|
||||||
|
|
||||||
|
return new Request.Builder()
|
||||||
|
.url(url)
|
||||||
|
.post(body)
|
||||||
|
.addHeader("X-ZhengXin-Sign", signString)
|
||||||
|
.addHeader("X-ZhengXin-SignTime", timestamp)
|
||||||
|
.addHeader("X-ZhengXin-SignRandom", random)
|
||||||
|
.addHeader("X-ZhengXin-appId", "CRM")
|
||||||
|
.build();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void logResponse(String url, int statusCode, String responseBody) {
|
||||||
|
if (log.isInfoEnabled()) {
|
||||||
|
try {
|
||||||
|
// 尝试美化JSON输出
|
||||||
|
Object json = objectMapper.readValue(responseBody, Object.class);
|
||||||
|
String prettyResponse = objectMapper.writerWithDefaultPrettyPrinter()
|
||||||
|
.writeValueAsString(json);
|
||||||
|
|
||||||
|
log.info("\n======= 响应开始 =======\n" +
|
||||||
|
"API地址: {}\n" +
|
||||||
|
"HTTP状态码: {}\n" +
|
||||||
|
"响应内容: {}\n" +
|
||||||
|
"======= 响应结束 =======",
|
||||||
|
url,
|
||||||
|
statusCode,
|
||||||
|
prettyResponse);
|
||||||
|
} catch (Exception e) {
|
||||||
|
// 非JSON响应或解析失败时直接输出原始内容
|
||||||
|
log.info("\n======= 响应开始 =======\n" +
|
||||||
|
"API地址: {}\n" +
|
||||||
|
"HTTP状态码: {}\n" +
|
||||||
|
"原始响应: {}\n" +
|
||||||
|
"======= 响应结束 =======",
|
||||||
|
url,
|
||||||
|
statusCode,
|
||||||
|
responseBody);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,7 +1,9 @@
|
|||||||
package com.cool.store.config;
|
package com.cool.store.config;
|
||||||
|
import com.alibaba.fastjson.JSON;
|
||||||
import com.cool.store.constants.CommonConstants;
|
import com.cool.store.constants.CommonConstants;
|
||||||
import com.cool.store.enums.ErrorCodeEnum;
|
import com.cool.store.enums.ErrorCodeEnum;
|
||||||
import com.cool.store.exception.ServiceException;
|
import com.cool.store.exception.ServiceException;
|
||||||
|
import com.cool.store.response.ResponseResult;
|
||||||
import com.cool.store.utils.OpenSignatureUtil;
|
import com.cool.store.utils.OpenSignatureUtil;
|
||||||
import com.cool.store.utils.StringUtil;
|
import com.cool.store.utils.StringUtil;
|
||||||
import com.cool.store.utils.UUIDUtils;
|
import com.cool.store.utils.UUIDUtils;
|
||||||
@@ -11,10 +13,12 @@ import lombok.extern.slf4j.Slf4j;
|
|||||||
import org.slf4j.MDC;
|
import org.slf4j.MDC;
|
||||||
import org.springframework.beans.factory.annotation.Value;
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
import org.springframework.core.annotation.Order;
|
import org.springframework.core.annotation.Order;
|
||||||
|
import org.springframework.http.HttpStatus;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
import javax.servlet.*;
|
import javax.servlet.*;
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
import java.io.BufferedReader;
|
import java.io.BufferedReader;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
@@ -48,44 +52,63 @@ public class OpenApiValidateFilter implements Filter {
|
|||||||
public void doFilter(ServletRequest servletRequest, ServletResponse response, FilterChain filterChain) throws IOException, ServletException {
|
public void doFilter(ServletRequest servletRequest, ServletResponse response, FilterChain filterChain) throws IOException, ServletException {
|
||||||
HttpServletRequest request = (HttpServletRequest) servletRequest;
|
HttpServletRequest request = (HttpServletRequest) servletRequest;
|
||||||
String uri = request.getRequestURI();
|
String uri = request.getRequestURI();
|
||||||
if(!uri.startsWith("/zxjp/open/v1/getYlsToken")){
|
if(!uri.startsWith("/zxjp/open/v1")){
|
||||||
filterChain.doFilter(servletRequest, response);
|
filterChain.doFilter(servletRequest, response);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
MDC.put(CommonConstants.REQUEST_ID, UUIDUtils.get32UUID());
|
MDC.put(CommonConstants.REQUEST_ID, UUIDUtils.get32UUID());
|
||||||
|
//statusRefresh 放开不需要验签
|
||||||
|
if(uri.startsWith("/zxjp/open/v1/statusRefresh")){
|
||||||
|
filterChain.doFilter(servletRequest, response);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
HttpServletResponse res = (HttpServletResponse) response;
|
||||||
// 1. 验证时间戳
|
// 1. 验证时间戳
|
||||||
try {
|
try {
|
||||||
String timestampStr = request.getHeader("timestamp");
|
String timestampStr = request.getHeader("timestamp");
|
||||||
if (timestampStr == null) {
|
if (timestampStr == null) {
|
||||||
log.info("timestampStr is null {}","缺少timestamp参数");
|
log.info("timestampStr is null {}","缺少timestamp参数");
|
||||||
throw new ServiceException(ErrorCodeEnum.SIGN_FAIL);
|
res.setStatus(HttpStatus.OK.value());
|
||||||
|
res.setCharacterEncoding("UTF-8");
|
||||||
|
res.getWriter().write(JSON.toJSONString(
|
||||||
|
ResponseResult.fail(ErrorCodeEnum.SIGN_FAIL,"缺少timestamp参数")));
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
long timestamp = Long.parseLong(timestampStr)/1000;
|
long timestamp = Long.parseLong(timestampStr)/1000;
|
||||||
long currentTime = System.currentTimeMillis()/1000;
|
long currentTime = System.currentTimeMillis()/1000;
|
||||||
long timeDiff = Math.abs(currentTime - timestamp);
|
long timeDiff = Math.abs(currentTime - timestamp);
|
||||||
try {
|
try {
|
||||||
|
|
||||||
|
|
||||||
if (timeDiff > 600) {
|
if (timeDiff > 600) {
|
||||||
log.info("OpenApiValidateFilter==>{}","请求已过期,服务器时间:" + currentTime + " 请求时间:" + timestamp);
|
log.info("OpenApiValidateFilter==>{}","请求已过期,服务器时间:" + currentTime + " 请求时间:" + timestamp);
|
||||||
throw new ServiceException(ErrorCodeEnum.THIRD_API_ERROR,"请求已过期,请保证timestamp时间在10分钟之内");
|
throw new ServiceException(ErrorCodeEnum.SIGN_FAIL,"请求已过期,请保证timestamp时间在10分钟之内");
|
||||||
}
|
}
|
||||||
} catch (NumberFormatException e) {
|
} catch (NumberFormatException e) {
|
||||||
log.info("OpenApiValidateFilter==>{}","非法timestamp格式");
|
log.info("OpenApiValidateFilter==>{}","非法timestamp格式");
|
||||||
throw new ServiceException(ErrorCodeEnum.SIGN_FAIL);
|
res.setStatus(HttpStatus.OK.value());
|
||||||
|
res.setCharacterEncoding("UTF-8");
|
||||||
|
res.getWriter().write(JSON.toJSONString(
|
||||||
|
ResponseResult.fail(ErrorCodeEnum.SIGN_FAIL,"非法timestamp格式")));
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 2. 验证签名
|
// 2. 验证签名
|
||||||
String appKey = request.getHeader("appkey");
|
String appKey = request.getHeader("appkey");
|
||||||
if (appKey == null || !coolAppKey.equals(appKey)) {
|
if (appKey == null || !coolAppKey.equals(appKey)) {
|
||||||
log.info("OpenApiValidateFilter==>{}","无效的appKey");
|
log.info("OpenApiValidateFilter==>{}","无效的appKey");
|
||||||
throw new ServiceException(ErrorCodeEnum.THIRD_API_ERROR,"无效的appKey");
|
res.setStatus(HttpStatus.OK.value());
|
||||||
|
res.setCharacterEncoding("UTF-8");
|
||||||
|
res.getWriter().write(JSON.toJSONString(
|
||||||
|
ResponseResult.fail(ErrorCodeEnum.SIGN_FAIL,"无效的appKey")));
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
String clientSign = request.getHeader("sign");
|
String clientSign = request.getHeader("sign");
|
||||||
if (clientSign == null) {
|
if (clientSign == null) {
|
||||||
throw new ServiceException(ErrorCodeEnum.THIRD_API_ERROR,"签名校验失败");
|
res.setStatus(HttpStatus.OK.value());
|
||||||
|
res.setCharacterEncoding("UTF-8");
|
||||||
|
res.getWriter().write(JSON.toJSONString(
|
||||||
|
ResponseResult.fail(ErrorCodeEnum.SIGN_FAIL,"签名为空")));
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
// 1. 读取请求体
|
// 1. 读取请求体
|
||||||
StringBuilder requestBody = new StringBuilder();
|
StringBuilder requestBody = new StringBuilder();
|
||||||
@@ -112,7 +135,11 @@ public class OpenApiValidateFilter implements Filter {
|
|||||||
log.info("{}",serverSign);
|
log.info("{}",serverSign);
|
||||||
|
|
||||||
if (!serverSign.equalsIgnoreCase(clientSign)) {
|
if (!serverSign.equalsIgnoreCase(clientSign)) {
|
||||||
throw new ServiceException(ErrorCodeEnum.SIGN_FAIL);
|
res.setStatus(HttpStatus.OK.value());
|
||||||
|
res.setCharacterEncoding("UTF-8");
|
||||||
|
res.getWriter().write(JSON.toJSONString(
|
||||||
|
ResponseResult.fail(ErrorCodeEnum.SIGN_FAIL,"签名校验失败")));
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
filterChain.doFilter(request, response);
|
filterChain.doFilter(request, response);
|
||||||
} finally {
|
} finally {
|
||||||
|
|||||||
@@ -4,11 +4,15 @@ import com.alibaba.fastjson.JSONObject;
|
|||||||
import com.cool.store.dto.AskBotTokenDTO;
|
import com.cool.store.dto.AskBotTokenDTO;
|
||||||
import com.cool.store.dto.GetAccessTokenDTO;
|
import com.cool.store.dto.GetAccessTokenDTO;
|
||||||
import com.cool.store.dto.StatusRefreshDTO;
|
import com.cool.store.dto.StatusRefreshDTO;
|
||||||
|
import com.cool.store.dto.StoreDTO;
|
||||||
|
import com.cool.store.request.OpenApiStoreRequest;
|
||||||
import com.cool.store.response.ResponseResult;
|
import com.cool.store.response.ResponseResult;
|
||||||
import com.cool.store.response.bigdata.ApiResponse;
|
import com.cool.store.response.bigdata.ApiResponse;
|
||||||
import com.cool.store.service.OpenApiService;
|
import com.cool.store.service.OpenApiService;
|
||||||
import com.cool.store.service.PushService;
|
import com.cool.store.service.PushService;
|
||||||
import com.cool.store.service.ShopAccountService;
|
import com.cool.store.service.ShopAccountService;
|
||||||
|
import com.cool.store.service.StoreService;
|
||||||
|
import com.github.pagehelper.PageInfo;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
@@ -34,6 +38,8 @@ public class OpenApiController {
|
|||||||
PushService pushService;
|
PushService pushService;
|
||||||
@Resource
|
@Resource
|
||||||
ShopAccountService shopAccountService;
|
ShopAccountService shopAccountService;
|
||||||
|
@Resource
|
||||||
|
StoreService storeService;
|
||||||
|
|
||||||
@PostMapping("/statusRefresh")
|
@PostMapping("/statusRefresh")
|
||||||
public ApiResponse<Boolean> statusRefresh(@RequestBody StatusRefreshDTO statusRefreshDTO){
|
public ApiResponse<Boolean> statusRefresh(@RequestBody StatusRefreshDTO statusRefreshDTO){
|
||||||
@@ -49,4 +55,11 @@ public class OpenApiController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ApiOperation("获取门店信息")
|
||||||
|
@PostMapping("/getStoreList")
|
||||||
|
public ApiResponse<PageInfo<StoreDTO>> getStoreList(@RequestBody @Validated OpenApiStoreRequest dto) {
|
||||||
|
return ApiResponse.success(storeService.getStoreExtendFieldInfo(dto.getPageSize(),dto.getPageNum()));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
package com.cool.store.controller.webb;
|
package com.cool.store.controller.webb;
|
||||||
|
|
||||||
import com.cool.store.dao.*;
|
import com.cool.store.dao.*;
|
||||||
|
import com.cool.store.dto.FoodTokenDTO;
|
||||||
import com.cool.store.dto.GetAccessTokenDTO;
|
import com.cool.store.dto.GetAccessTokenDTO;
|
||||||
import com.cool.store.dto.ModifyPasswordDTO;
|
import com.cool.store.dto.ModifyPasswordDTO;
|
||||||
import com.cool.store.entity.*;
|
import com.cool.store.entity.*;
|
||||||
@@ -295,6 +296,12 @@ public class PCTestController {
|
|||||||
public ResponseResult<List<String>> getAuthRegionIdAndSubRegionIdByUserId(@RequestParam(value = "userId", required = true) String userId) {
|
public ResponseResult<List<String>> getAuthRegionIdAndSubRegionIdByUserId(@RequestParam(value = "userId", required = true) String userId) {
|
||||||
return ResponseResult.success(userAuthMappingService.getAuthRegionIdAndSubRegionIdByUserId(userId));
|
return ResponseResult.success(userAuthMappingService.getAuthRegionIdAndSubRegionIdByUserId(userId));
|
||||||
}
|
}
|
||||||
|
@Resource
|
||||||
|
ThirdFoodService thirdFoodService;
|
||||||
|
@ApiOperation("获取菜品市场token")
|
||||||
|
@PostMapping("/getFoodToken")
|
||||||
|
public ResponseResult<String> getFoodToken(@RequestBody @Validated FoodTokenDTO dto) {
|
||||||
|
return ResponseResult.success(thirdFoodService.getFoodToken(dto));
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
package com.cool.store.controller.webc;
|
package com.cool.store.controller.webc;
|
||||||
|
|
||||||
|
import com.cool.store.dto.FoodTokenDTO;
|
||||||
import com.cool.store.dto.GetAccessTokenDTO;
|
import com.cool.store.dto.GetAccessTokenDTO;
|
||||||
import com.cool.store.dto.ModifyPasswordDTO;
|
import com.cool.store.dto.ModifyPasswordDTO;
|
||||||
import com.cool.store.dto.ShopAccount.ShopAccountDTO;
|
import com.cool.store.dto.ShopAccount.ShopAccountDTO;
|
||||||
@@ -7,6 +8,7 @@ import com.cool.store.request.GetPasswordDTO;
|
|||||||
import com.cool.store.response.ResponseResult;
|
import com.cool.store.response.ResponseResult;
|
||||||
import com.cool.store.service.PushService;
|
import com.cool.store.service.PushService;
|
||||||
import com.cool.store.service.ShopAccountService;
|
import com.cool.store.service.ShopAccountService;
|
||||||
|
import com.cool.store.service.ThirdFoodService;
|
||||||
import com.cool.store.service.ThirdXinGuanJiaService;
|
import com.cool.store.service.ThirdXinGuanJiaService;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
@@ -36,6 +38,9 @@ public class MiniShopAccountController {
|
|||||||
@Resource
|
@Resource
|
||||||
ThirdXinGuanJiaService thirdXinGuanJiaService;
|
ThirdXinGuanJiaService thirdXinGuanJiaService;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
ThirdFoodService thirdFoodService;
|
||||||
|
|
||||||
|
|
||||||
@ApiOperation("根据门店shopId查询平台账号")
|
@ApiOperation("根据门店shopId查询平台账号")
|
||||||
@GetMapping("/getShopAccountByShopId")
|
@GetMapping("/getShopAccountByShopId")
|
||||||
@@ -68,6 +73,12 @@ public class MiniShopAccountController {
|
|||||||
return ResponseResult.success(pushService.getXzgToken(dto));
|
return ResponseResult.success(pushService.getXzgToken(dto));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ApiOperation("获取菜品市场token")
|
||||||
|
@PostMapping("/getFoodToken")
|
||||||
|
public ResponseResult<String> getFoodToken(@RequestBody @Validated FoodTokenDTO dto) {
|
||||||
|
return ResponseResult.success(thirdFoodService.getFoodToken(dto));
|
||||||
|
}
|
||||||
|
|
||||||
@ApiOperation("获取加密子串")
|
@ApiOperation("获取加密子串")
|
||||||
@PostMapping("/getEncryptedSubstring")
|
@PostMapping("/getEncryptedSubstring")
|
||||||
public ResponseResult<String> getEncryptedSubstring(@RequestBody GetPasswordDTO dto) {
|
public ResponseResult<String> getEncryptedSubstring(@RequestBody GetPasswordDTO dto) {
|
||||||
|
|||||||
@@ -118,6 +118,8 @@ zx.big.data.appSecret=35b8b9a400b4430fa022190be0913cd6
|
|||||||
xzg.api.auth.url=http://webapi.zhengxinfood.com
|
xzg.api.auth.url=http://webapi.zhengxinfood.com
|
||||||
|
|
||||||
|
|
||||||
|
zx.food.url=https://datacenter.zhengxinshipin.com
|
||||||
|
|
||||||
cool.api.appKey=k8J7fG2qR5tY9vX3
|
cool.api.appKey=k8J7fG2qR5tY9vX3
|
||||||
cool.api.secret=wP4sN6dL8zK2xM9c
|
cool.api.secret=wP4sN6dL8zK2xM9c
|
||||||
|
|
||||||
|
|||||||
@@ -121,6 +121,8 @@ yls.api.auth.secret=3b56198f096d4009072c927c96fbc8b6
|
|||||||
#新掌柜账号
|
#新掌柜账号
|
||||||
xzg.api.auth.url=http://webapi.zhengxinfood.com
|
xzg.api.auth.url=http://webapi.zhengxinfood.com
|
||||||
|
|
||||||
|
zx.food.url=https://datacenter.zhengxinfood.com
|
||||||
|
|
||||||
cool.api.appKey=k8J7fG2qR5tY9vX3
|
cool.api.appKey=k8J7fG2qR5tY9vX3
|
||||||
cool.api.secret=wP4sN6dL8zK2xM9c
|
cool.api.secret=wP4sN6dL8zK2xM9c
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user