添加微信视频号小店接口
This commit is contained in:
parent
1c815b1ca5
commit
f686efa65e
|
|
@ -59,6 +59,12 @@ spring:
|
||||||
- Path=/api/pdd-api/**
|
- Path=/api/pdd-api/**
|
||||||
filters:
|
filters:
|
||||||
- StripPrefix=2
|
- StripPrefix=2
|
||||||
|
- id: wei_api_route
|
||||||
|
uri: lb://wei-api
|
||||||
|
predicates:
|
||||||
|
- Path=/api/wei-api/**
|
||||||
|
filters:
|
||||||
|
- StripPrefix=2
|
||||||
# - TokenFilter
|
# - TokenFilter
|
||||||
# default-filters:
|
# default-filters:
|
||||||
# - TokenFilter
|
# - TokenFilter
|
||||||
|
|
|
||||||
|
|
@ -11,6 +11,7 @@ public enum EnumShopType {
|
||||||
TAO("淘宝天猫", 1),
|
TAO("淘宝天猫", 1),
|
||||||
JD("京东", 2),
|
JD("京东", 2),
|
||||||
DOUDIAN("抖音", 3),
|
DOUDIAN("抖音", 3),
|
||||||
|
WEI("微信视频号小店", 5),
|
||||||
PDD("拼多多", 4);
|
PDD("拼多多", 4);
|
||||||
private String name;
|
private String name;
|
||||||
private int index;
|
private int index;
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@
|
||||||
Target Server Version : 80200
|
Target Server Version : 80200
|
||||||
File Encoding : 65001
|
File Encoding : 65001
|
||||||
|
|
||||||
Date: 24/03/2024 17:06:44
|
Date: 24/03/2024 18:21:33
|
||||||
*/
|
*/
|
||||||
|
|
||||||
SET NAMES utf8mb4;
|
SET NAMES utf8mb4;
|
||||||
|
|
@ -2267,10 +2267,11 @@ CREATE TABLE `sys_platform` (
|
||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
-- Records of sys_platform
|
-- Records of sys_platform
|
||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
INSERT INTO `sys_platform` VALUES (1, '天猫', 'TMALL', '', NULL, NULL, NULL);
|
INSERT INTO `sys_platform` VALUES (1, '天猫', 'TMALL', '12175777', '368dbbd183a77d551735be13f59bbcda', '', 'http://gw.api.taobao.com/router/rest');
|
||||||
INSERT INTO `sys_platform` VALUES (2, '京东', 'JD', '', NULL, NULL, NULL);
|
INSERT INTO `sys_platform` VALUES (2, '京东', 'JD', 'FB4CC3688E6F9065D4FF510A53BB60FF', '40e8c8b2427f4e6db8f4a39af27d719e', 'http://www.qumei.com', 'https://api.jd.com/routerjson');
|
||||||
INSERT INTO `sys_platform` VALUES (3, '抖店', 'DOUDIAN', '', NULL, NULL, NULL);
|
INSERT INTO `sys_platform` VALUES (3, '抖店', 'DOUDIAN', '7344938657423296019', '4e704882-832a-42e5-845f-6af991ce0ce2', '', NULL);
|
||||||
INSERT INTO `sys_platform` VALUES (4, '拼多多', 'PDD', '', NULL, NULL, NULL);
|
INSERT INTO `sys_platform` VALUES (4, '拼多多', 'PDD', 'b92194d1af904c8a86a2c9eff6f9bfb0', '8da714f8dcbfb12d3972626ef8acfc0737aacecb', 'http://www.qumei.com', NULL);
|
||||||
|
INSERT INTO `sys_platform` VALUES (5, '微信视频号小店', 'WEI', NULL, NULL, NULL, 'https://api.weixin.qq.com');
|
||||||
|
|
||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
-- Table structure for sys_shop
|
-- Table structure for sys_shop
|
||||||
|
|
@ -2300,11 +2301,11 @@ CREATE TABLE `sys_shop` (
|
||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
-- Records of sys_shop
|
-- Records of sys_shop
|
||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
INSERT INTO `sys_shop` VALUES (1, '天猫旗舰店', 1, '', 98, 1, 0, '', 0, '', '', '', NULL, NULL, NULL, NULL, 'http://gw.api.taobao.com/router/rest');
|
INSERT INTO `sys_shop` VALUES (1, '天猫旗舰店AB', 1, '', 98, 1, 0, '', 59972781, '31014100', '7b0769269b0c0ca88949791c14eb3a5c', '6102522199aaa4a42a2e6be95d0a5e18657c1576ec563a0351855490', NULL, NULL, NULL, NULL, 'http://gw.api.taobao.com/router/rest');
|
||||||
INSERT INTO `sys_shop` VALUES (2, '京东旗舰店', 2, NULL, 9, 1, 0, NULL, 0, NULL, NULL, '', 31535999, NULL, '919b21a3b9d247d08d7701cb8bcc2432ote5', NULL, NULL);
|
INSERT INTO `sys_shop` VALUES (2, '京东旗舰店', 2, NULL, 9, 1, 0, NULL, 10706, NULL, NULL, '8abd974c62c34778935b34b5952e6f68izdk', 31535999, NULL, '919b21a3b9d247d08d7701cb8bcc2432ote5', NULL, NULL);
|
||||||
INSERT INTO `sys_shop` VALUES (3, '抖音旗舰店', 3, 'http://openapi.jinritemai.com', 87, 1, 1653672695, NULL, 0, '', '', '', NULL, NULL, NULL, NULL, '2');
|
INSERT INTO `sys_shop` VALUES (3, '抖音旗舰店', 3, 'http://openapi.jinritemai.com', 87, 1, 1653672695, NULL, 90158786, '7249607407477720636', '36a12497-fb9d-4b54-8cd1-fd1617346687', '', NULL, NULL, NULL, NULL, '2');
|
||||||
INSERT INTO `sys_shop` VALUES (5, '拼多多旗舰店', 4, NULL, 99, 1, 1680698886, 'pdd10006159121', 0, NULL, NULL, '', NULL, NULL, NULL, NULL, NULL);
|
INSERT INTO `sys_shop` VALUES (4, '拼多多旗舰店', 4, NULL, 99, 1, 1680698886, '', 100061591, NULL, NULL, '87f8044d2a5f45a489aa3a952785b0d35e61788a', NULL, NULL, NULL, NULL, NULL);
|
||||||
INSERT INTO `sys_shop` VALUES (6, '视频号小店', 5, NULL, 9, 0, 0, NULL, 0, 'wx2b826d52663c3ac5', '680867143a2cdf9caa350c947df76c37', '78_Dlbnrt1yqBv0C2ThdK5k80vh3Agg-sdgg0AvgEp6J28aiDQ0tlMteFHaLIr0sle-UXMiNBTkqzgdme-Z1zGR3XkCxGP4afeT9mB-mZPzWI6QE7Vdl6HwOv7tgY0FVZfADAZPT', NULL, NULL, NULL, NULL, NULL);
|
INSERT INTO `sys_shop` VALUES (5, '视频号小店', 5, NULL, 9, 0, 0, NULL, 0, 'wx2b826d52663c3ac5', '680867143a2cdf9caa350c947df76c37', '78_xn2z6F4-Eq8OeElAYhn0PKCfAhcOfrS4M47w8xybtFThM2jusDxoVDPBY8XJDQ2q5-aTaSlHjiSuKotZPpYY1SH_w8E_VE8EeD0dc3ABVLfH1Eu1PJZvOYNIjbYMSFgAHASYL', NULL, NULL, NULL, NULL, NULL);
|
||||||
|
|
||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
-- Table structure for sys_shop_pull_lasttime
|
-- Table structure for sys_shop_pull_lasttime
|
||||||
|
|
@ -2432,7 +2433,7 @@ CREATE TABLE `sys_user` (
|
||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
-- Records of sys_user
|
-- Records of sys_user
|
||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
INSERT INTO `sys_user` VALUES (1, 103, 'admin', '启航oms', '00', '280645618@qq.com', '15888888888', '1', '', '$2a$10$7JB720yubVSZvUI0rEqK/.VqGOZTH.ulu33dHOiBE8ByOhJIrdAu2', '0', '0', '127.0.0.1', '2024-03-24 16:56:36', 'admin', '2023-08-07 19:31:37', '', '2024-03-24 16:56:35', '管理员');
|
INSERT INTO `sys_user` VALUES (1, 103, 'admin', '启航oms', '00', '280645618@qq.com', '15888888888', '1', '', '$2a$10$7JB720yubVSZvUI0rEqK/.VqGOZTH.ulu33dHOiBE8ByOhJIrdAu2', '0', '0', '127.0.0.1', '2024-03-24 17:46:21', 'admin', '2023-08-07 19:31:37', '', '2024-03-24 17:46:21', '管理员');
|
||||||
INSERT INTO `sys_user` VALUES (100, NULL, 'qlp', 'a', '00', '', '15818590119', '0', '', '$2a$10$5YEoazvKfi3TTfvduAe8mOT5dtV7W4EeJo5x5T.4P0yOTBms2BDmy', '0', '0', '', NULL, 'admin', '2024-03-17 14:55:22', '', NULL, NULL);
|
INSERT INTO `sys_user` VALUES (100, NULL, 'qlp', 'a', '00', '', '15818590119', '0', '', '$2a$10$5YEoazvKfi3TTfvduAe8mOT5dtV7W4EeJo5x5T.4P0yOTBms2BDmy', '0', '0', '', NULL, 'admin', '2024-03-17 14:55:22', '', NULL, NULL);
|
||||||
|
|
||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
|
|
|
||||||
|
|
@ -290,4 +290,9 @@ public class SysUserServiceImpl implements ISysUserService
|
||||||
return userMapper.deleteUserById(userId);
|
return userMapper.deleteUserById(userId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void checkUserDataScope(Long userId) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,9 @@ import com.pdd.pop.sdk.http.api.pop.request.PddPopAuthTokenRefreshRequest;
|
||||||
import com.pdd.pop.sdk.http.api.pop.response.PddOrderListGetResponse;
|
import com.pdd.pop.sdk.http.api.pop.response.PddOrderListGetResponse;
|
||||||
import com.pdd.pop.sdk.http.api.pop.response.PddPopAuthTokenRefreshResponse;
|
import com.pdd.pop.sdk.http.api.pop.response.PddPopAuthTokenRefreshResponse;
|
||||||
import com.pdd.pop.sdk.http.token.AccessTokenResponse;
|
import com.pdd.pop.sdk.http.token.AccessTokenResponse;
|
||||||
import com.qihang.common.common.ApiResult;
|
import com.qihang.common.common.AjaxResult;
|
||||||
|
import com.qihang.common.common.ResultVo;
|
||||||
|
import com.qihang.common.common.ResultVoEnum;
|
||||||
import com.qihang.common.enums.EnumShopType;
|
import com.qihang.common.enums.EnumShopType;
|
||||||
import com.qihang.common.enums.HttpStatus;
|
import com.qihang.common.enums.HttpStatus;
|
||||||
import com.qihang.pdd.domain.SysPlatform;
|
import com.qihang.pdd.domain.SysPlatform;
|
||||||
|
|
@ -49,29 +51,29 @@ public class AjaxOrderPddController {
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
@RequestMapping(value = "/pull_order", method = RequestMethod.POST)
|
@RequestMapping(value = "/pull_order", method = RequestMethod.POST)
|
||||||
public ApiResult<Object> getOrderList(@RequestBody OpenApiRequest reqData)
|
public AjaxResult getOrderList(@RequestBody OpenApiRequest reqData)
|
||||||
throws Exception {
|
throws Exception {
|
||||||
Integer updType = reqData.getUpdType();//更新类型0拉取新订单1更新订单
|
Integer updType = reqData.getUpdType();//更新类型0拉取新订单1更新订单
|
||||||
String startDate = reqData.getStartDate();//reqData.getString("startTime");
|
String startDate = reqData.getStartDate();//reqData.getString("startTime");
|
||||||
String endDate = reqData.getEndDate();//reqData.getString("endTime");
|
String endDate = reqData.getEndDate();//reqData.getString("endTime");
|
||||||
|
|
||||||
var shop = shopService.selectShopById(reqData.getShopId());
|
var shop = shopService.selectShopById(reqData.getShopId());
|
||||||
if(shop == null) return ApiResult.build(HttpStatus.PARAMS_ERROR, "店铺不存在!");
|
if(shop == null) AjaxResult.error(HttpStatus.PARAMS_ERROR, "店铺不存在!");
|
||||||
|
|
||||||
if (shop.getType() != EnumShopType.PDD.getIndex()) {
|
if (shop.getType() != EnumShopType.PDD.getIndex()) {
|
||||||
return ApiResult.build(HttpStatus.PARAMS_ERROR, "参数错误,店铺不是PDD店铺");
|
return AjaxResult.error(HttpStatus.PARAMS_ERROR, "参数错误,店铺不是PDD店铺");
|
||||||
}
|
}
|
||||||
SysPlatform platform = platformService.selectById(EnumShopType.PDD.getIndex());
|
SysPlatform platform = platformService.selectById(EnumShopType.PDD.getIndex());
|
||||||
|
|
||||||
if(!StringUtils.hasText(platform.getAppKey())) {
|
if(!StringUtils.hasText(platform.getAppKey())) {
|
||||||
return ApiResult.build(HttpStatus.PARAMS_ERROR, "平台配置错误,没有找到AppKey");
|
return AjaxResult.error(HttpStatus.PARAMS_ERROR, "平台配置错误,没有找到AppKey");
|
||||||
}
|
}
|
||||||
if(!StringUtils.hasText(platform.getAppSecret())) {
|
if(!StringUtils.hasText(platform.getAppSecret())) {
|
||||||
return ApiResult.build(HttpStatus.PARAMS_ERROR, "第三方平台配置错误,没有找到AppSercet");
|
return AjaxResult.error(HttpStatus.PARAMS_ERROR, "第三方平台配置错误,没有找到AppSercet");
|
||||||
}
|
|
||||||
if(!StringUtils.hasText(platform.getRedirectUri())) {
|
|
||||||
return ApiResult.build(HttpStatus.PARAMS_ERROR, "第三方平台配置错误,没有找到RedirectUri");
|
|
||||||
}
|
}
|
||||||
|
// if(!StringUtils.hasText(platform.getRedirectUri())) {
|
||||||
|
// return AjaxResult.error(HttpStatus.PARAMS_ERROR, "第三方平台配置错误,没有找到RedirectUri");
|
||||||
|
// }
|
||||||
// if(!StringUtils.hasText(platform.getServerUrl())) {
|
// if(!StringUtils.hasText(platform.getServerUrl())) {
|
||||||
// return ApiResult.build(HttpStatus.PARAMS_ERROR, "第三方平台配置错误,没有找到ServerUrl");
|
// return ApiResult.build(HttpStatus.PARAMS_ERROR, "第三方平台配置错误,没有找到ServerUrl");
|
||||||
// }
|
// }
|
||||||
|
|
@ -91,16 +93,16 @@ public class AjaxOrderPddController {
|
||||||
params.setAccessToken(shop.getAccessToken());
|
params.setAccessToken(shop.getAccessToken());
|
||||||
params.setTokenRequestUrl("http://localhost:3000/pdd_api2/oauth");
|
params.setTokenRequestUrl("http://localhost:3000/pdd_api2/oauth");
|
||||||
params.setApiRequestUrl(shop.getApiRequestUrl());
|
params.setApiRequestUrl(shop.getApiRequestUrl());
|
||||||
String url = "https://mms.pinduoduo.com/open.html?response_type=code&client_id=" + params.getAppKey() + "&redirect_uri=" + URLEncoder.encode(platform.getRedirectUri());
|
// String url = "https://mms.pinduoduo.com/open.html?response_type=code&client_id=" + params.getAppKey() + "&redirect_uri=" + URLEncoder.encode(platform.getRedirectUri());
|
||||||
|
|
||||||
String accessToken = params.getAccessToken();
|
String accessToken = params.getAccessToken();
|
||||||
if(!StringUtils.hasText(accessToken)) {
|
if(!StringUtils.hasText(accessToken)) {
|
||||||
return ApiResult.build(HttpStatus.PARAMS_ERROR, "参数错误:accessToken为空");
|
return AjaxResult.error(HttpStatus.PARAMS_ERROR, "参数错误:accessToken为空");
|
||||||
}
|
}
|
||||||
// if(!StringUtils.hasText(accessToken)) return new ApiResult<>(EnumResultVo.TokenFail.getIndex(), "参数错误:accessToken为空",params);
|
// if(!StringUtils.hasText(accessToken)) return new ApiResult<>(EnumResultVo.TokenFail.getIndex(), "参数错误:accessToken为空",params);
|
||||||
// 获取店铺信息,判断店铺是否一致
|
// 获取店铺信息,判断店铺是否一致
|
||||||
var shopResult = PddApiUtils.getShopInfo(params.getAppKey(), params.getAppSecret(), accessToken);
|
var shopResult = PddApiUtils.getShopInfo(params.getAppKey(), params.getAppSecret(), accessToken);
|
||||||
if (shopResult.getCode() != HttpStatus.SUCCESS) {
|
if (shopResult.getCode() != ResultVoEnum.SUCCESS.getIndex()) {
|
||||||
// if(shopResult.getCode() == HttpStatus.UNAUTHORIZED){
|
// if(shopResult.getCode() == HttpStatus.UNAUTHORIZED){
|
||||||
// // 生成AccessToken
|
// // 生成AccessToken
|
||||||
// PopAccessTokenClient accessTokenClient = new PopAccessTokenClient(params.getAppKey(), params.getAppSecret());
|
// PopAccessTokenClient accessTokenClient = new PopAccessTokenClient(params.getAppKey(), params.getAppSecret());
|
||||||
|
|
@ -117,7 +119,7 @@ public class AjaxOrderPddController {
|
||||||
// e.printStackTrace();
|
// e.printStackTrace();
|
||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
return ApiResult.build(shopResult.getCode(), shopResult.getMsg(), params);
|
return AjaxResult.error(shopResult.getCode(), shopResult.getMsg(), params);
|
||||||
}else{
|
}else{
|
||||||
// 看看是否需要刷新一下token
|
// 看看是否需要刷新一下token
|
||||||
PopClient client = new PopHttpClient(params.getAppKey(), params.getAppSecret());
|
PopClient client = new PopHttpClient(params.getAppKey(), params.getAppSecret());
|
||||||
|
|
@ -130,10 +132,10 @@ public class AjaxOrderPddController {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (shopResult.getData().getMallId().longValue() != shop.getSellerId().longValue()) {
|
if (shopResult.getData().getMallId().longValue() != shop.getSellerId().longValue()) {
|
||||||
return ApiResult.build(HttpStatus.UNAUTHORIZED, "该店铺不是授权店铺",params);
|
return AjaxResult.error(HttpStatus.UNAUTHORIZED, "该店铺不是授权店铺",params);
|
||||||
}
|
}
|
||||||
|
|
||||||
ApiResult<ErpSalesPullCountResp> result = null;// 返回结果
|
ResultVo<ErpSalesPullCountResp> result = null;// 返回结果
|
||||||
|
|
||||||
Long endTime = System.currentTimeMillis() / 1000;// 订单更新结束时间(默认值)
|
Long endTime = System.currentTimeMillis() / 1000;// 订单更新结束时间(默认值)
|
||||||
Long startTime = endTime - 60 * 60 * 24 + 10;// 订单更新开始时间(默认值)
|
Long startTime = endTime - 60 * 60 * 24 + 10;// 订单更新开始时间(默认值)
|
||||||
|
|
@ -193,7 +195,7 @@ public class AjaxOrderPddController {
|
||||||
failCount += result.getData().getFailCount();
|
failCount += result.getData().getFailCount();
|
||||||
// log.info("查询到数据:"+result.getData().getTotalRecords());
|
// log.info("查询到数据:"+result.getData().getTotalRecords());
|
||||||
} else if (result.getCode() > 0)
|
} else if (result.getCode() > 0)
|
||||||
return ApiResult.build(result.getCode(), result.getMsg());
|
return AjaxResult.error(result.getCode(), result.getMsg());
|
||||||
// 计算总页数
|
// 计算总页数
|
||||||
int totalPage = (result.getData().getTotalRecords() % pageSize == 0)
|
int totalPage = (result.getData().getTotalRecords() % pageSize == 0)
|
||||||
? result.getData().getTotalRecords() / pageSize
|
? result.getData().getTotalRecords() / pageSize
|
||||||
|
|
@ -229,9 +231,9 @@ public class AjaxOrderPddController {
|
||||||
* log.info("添加更新日志错误"); }
|
* log.info("添加更新日志错误"); }
|
||||||
*/
|
*/
|
||||||
if (result.getCode() == 0)
|
if (result.getCode() == 0)
|
||||||
return ApiResult.build(HttpStatus.SUCCESS, "SUCCESS");
|
return AjaxResult.success();
|
||||||
else
|
else
|
||||||
return ApiResult.build(result.getCode(), result.getMsg());
|
return AjaxResult.error(result.getCode(), result.getMsg());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -245,7 +247,7 @@ public class AjaxOrderPddController {
|
||||||
* @return
|
* @return
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
private ApiResult<ErpSalesPullCountResp> pullPddOrder( String clientId,String clientSecret,String accessToken,Integer pageNo, Integer pageSize, Long startTime, Long endTime, Long shopId) throws Exception {
|
private ResultVo<ErpSalesPullCountResp> pullPddOrder( String clientId,String clientSecret,String accessToken,Integer pageNo, Integer pageSize, Long startTime, Long endTime, Long shopId) throws Exception {
|
||||||
PopClient client = new PopHttpClient(clientId, clientSecret);
|
PopClient client = new PopHttpClient(clientId, clientSecret);
|
||||||
|
|
||||||
// 调取拼多多接口 pdd.order.list.get 订单列表查询接口(根据成交时间)
|
// 调取拼多多接口 pdd.order.list.get 订单列表查询接口(根据成交时间)
|
||||||
|
|
@ -268,9 +270,9 @@ public class AjaxOrderPddController {
|
||||||
PddOrderListGetResponse pddOrderListGetResponse = client.syncInvoke(pddOrderListGetRequest, accessToken);
|
PddOrderListGetResponse pddOrderListGetResponse = client.syncInvoke(pddOrderListGetRequest, accessToken);
|
||||||
if (pddOrderListGetResponse.getErrorResponse() != null) {
|
if (pddOrderListGetResponse.getErrorResponse() != null) {
|
||||||
if (pddOrderListGetResponse.getErrorResponse().getErrorCode().intValue() == 10019) {
|
if (pddOrderListGetResponse.getErrorResponse().getErrorCode().intValue() == 10019) {
|
||||||
return ApiResult.build(HttpStatus.UNAUTHORIZED, "Token过期");
|
return ResultVo.error(HttpStatus.UNAUTHORIZED, "Token过期");
|
||||||
} else
|
} else
|
||||||
return ApiResult.build(HttpStatus.ERROR,
|
return ResultVo.error(HttpStatus.ERROR,
|
||||||
"接口调用失败:" + pddOrderListGetResponse.getErrorResponse().getErrorMsg());
|
"接口调用失败:" + pddOrderListGetResponse.getErrorResponse().getErrorMsg());
|
||||||
} else {
|
} else {
|
||||||
// 获取到了数据
|
// 获取到了数据
|
||||||
|
|
@ -370,7 +372,7 @@ public class AjaxOrderPddController {
|
||||||
} else
|
} else
|
||||||
resp.setTotalRecords(0);
|
resp.setTotalRecords(0);
|
||||||
}
|
}
|
||||||
return ApiResult.build(HttpStatus.SUCCESS, "SUCCESS", resp);
|
return ResultVo.success(resp);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@ import com.pdd.pop.sdk.http.PopClient;
|
||||||
import com.pdd.pop.sdk.http.PopHttpClient;
|
import com.pdd.pop.sdk.http.PopHttpClient;
|
||||||
import com.pdd.pop.sdk.http.api.pop.request.PddMallInfoGetRequest;
|
import com.pdd.pop.sdk.http.api.pop.request.PddMallInfoGetRequest;
|
||||||
import com.pdd.pop.sdk.http.api.pop.response.PddMallInfoGetResponse;
|
import com.pdd.pop.sdk.http.api.pop.response.PddMallInfoGetResponse;
|
||||||
import com.qihang.common.common.ApiResult;
|
import com.qihang.common.common.ResultVo;
|
||||||
import com.qihang.common.enums.HttpStatus;
|
import com.qihang.common.enums.HttpStatus;
|
||||||
|
|
||||||
public class PddApiUtils {
|
public class PddApiUtils {
|
||||||
|
|
@ -17,7 +17,7 @@ public class PddApiUtils {
|
||||||
* @return
|
* @return
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
public static ApiResult<PddMallInfoGetResponse.MallInfoGetResponse> getShopInfo(String clientId, String clientSecret, String accessToken) throws Exception {
|
public static ResultVo<PddMallInfoGetResponse.MallInfoGetResponse> getShopInfo(String clientId, String clientSecret, String accessToken) throws Exception {
|
||||||
|
|
||||||
PopClient client = new PopHttpClient(clientId, clientSecret);
|
PopClient client = new PopHttpClient(clientId, clientSecret);
|
||||||
|
|
||||||
|
|
@ -26,11 +26,11 @@ public class PddApiUtils {
|
||||||
if (response.getErrorResponse() == null) {
|
if (response.getErrorResponse() == null) {
|
||||||
// 刷新一下token
|
// 刷新一下token
|
||||||
|
|
||||||
return ApiResult.build(HttpStatus.SUCCESS, "SUCCESS", response.getMallInfoGetResponse());
|
return ResultVo.success( response.getMallInfoGetResponse());
|
||||||
} else if (response.getErrorResponse().getErrorCode().intValue() == 10019) {
|
} else if (response.getErrorResponse().getErrorCode().intValue() == 10019) {
|
||||||
return ApiResult.build(HttpStatus.UNAUTHORIZED, "Token过期");
|
return ResultVo.error(HttpStatus.UNAUTHORIZED, "Token过期");
|
||||||
}else
|
}else
|
||||||
return ApiResult.build(HttpStatus.ERROR, "接口调用失败:"+response.getErrorResponse().getErrorMsg());
|
return ResultVo.error(HttpStatus.ERROR, "接口调用失败:"+response.getErrorResponse().getErrorMsg());
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -290,4 +290,9 @@ public class SysUserServiceImpl implements ISysUserService
|
||||||
return userMapper.deleteUserById(userId);
|
return userMapper.deleteUserById(userId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void checkUserDataScope(Long userId) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
package com.qihang.wei.controller;
|
package com.qihang.wei.controller;
|
||||||
|
|
||||||
import com.qihang.common.common.AjaxResult;
|
import com.qihang.common.common.AjaxResult;
|
||||||
|
import com.qihang.common.common.ResultVoEnum;
|
||||||
import com.qihang.common.enums.HttpStatus;
|
import com.qihang.common.enums.HttpStatus;
|
||||||
import com.qihang.wei.openApi.ApiCommon;
|
import com.qihang.wei.openApi.ApiCommon;
|
||||||
import com.qihang.wei.openApi.PullRequest;
|
import com.qihang.wei.openApi.PullRequest;
|
||||||
|
|
@ -30,14 +31,14 @@ public class GoodsApiController {
|
||||||
Date currDateTime = new Date();
|
Date currDateTime = new Date();
|
||||||
long startTime = System.currentTimeMillis();
|
long startTime = System.currentTimeMillis();
|
||||||
var checkResult = apiCommon.checkBefore(params.getShopId());
|
var checkResult = apiCommon.checkBefore(params.getShopId());
|
||||||
if (checkResult.getCode() != HttpStatus.SUCCESS) {
|
if (checkResult.getCode() != ResultVoEnum.SUCCESS.getIndex()) {
|
||||||
return AjaxResult.error(checkResult.getCode(), checkResult.getMsg(), checkResult.getData());
|
return AjaxResult.error(checkResult.getCode(), checkResult.getMsg(), checkResult.getData());
|
||||||
}
|
}
|
||||||
String accessToken = checkResult.getData().getAccessToken();
|
String accessToken = checkResult.getData().getAccessToken();
|
||||||
String serverUrl = checkResult.getData().getServerUrl();
|
String serverUrl = checkResult.getData().getServerUrl();
|
||||||
String appKey = checkResult.getData().getAppKey();
|
String appKey = checkResult.getData().getAppKey();
|
||||||
String appSecret = checkResult.getData().getAppSecret();
|
String appSecret = checkResult.getData().getAppSecret();
|
||||||
GoodsApiService remoting = RemoteUtil.Remoting("https://api.weixin.qq.com", GoodsApiService.class);
|
GoodsApiService remoting = RemoteUtil.Remoting(serverUrl, GoodsApiService.class);
|
||||||
GoodsApiBo apiBo = new GoodsApiBo();
|
GoodsApiBo apiBo = new GoodsApiBo();
|
||||||
apiBo.setPage_size(10);
|
apiBo.setPage_size(10);
|
||||||
GoodsListVo res = remoting.getGoodsList(accessToken, apiBo);
|
GoodsListVo res = remoting.getGoodsList(accessToken, apiBo);
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,6 @@
|
||||||
package com.qihang.wei.controller;
|
package com.qihang.wei.controller;
|
||||||
|
|
||||||
import com.qihang.common.common.AjaxResult;
|
import com.qihang.common.common.AjaxResult;
|
||||||
import com.qihang.common.common.ApiResult;
|
|
||||||
import com.qihang.common.common.ResultVoEnum;
|
import com.qihang.common.common.ResultVoEnum;
|
||||||
import com.qihang.common.enums.EnumShopType;
|
import com.qihang.common.enums.EnumShopType;
|
||||||
import com.qihang.common.enums.HttpStatus;
|
import com.qihang.common.enums.HttpStatus;
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,48 @@
|
||||||
|
package com.qihang.wei.domain;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @TableName sys_platform
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class SysPlatform implements Serializable {
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private Integer id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 平台名
|
||||||
|
*/
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 平台编码
|
||||||
|
*/
|
||||||
|
private String code;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private String appKey;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private String appSecret;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 平台回调uri
|
||||||
|
*/
|
||||||
|
private String redirectUri;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 接口访问地址
|
||||||
|
*/
|
||||||
|
private String serverUrl;
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,18 @@
|
||||||
|
package com.qihang.wei.mapper;
|
||||||
|
|
||||||
|
import com.qihang.wei.domain.SysPlatform;
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author qilip
|
||||||
|
* @description 针对表【sys_platform】的数据库操作Mapper
|
||||||
|
* @createDate 2024-03-24 18:04:27
|
||||||
|
* @Entity com.qihang.wei.domain.SysPlatform
|
||||||
|
*/
|
||||||
|
public interface SysPlatformMapper extends BaseMapper<SysPlatform> {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -1,12 +1,15 @@
|
||||||
package com.qihang.wei.openApi;
|
package com.qihang.wei.openApi;
|
||||||
|
|
||||||
import com.qihang.common.api.ShopApiParams;
|
import com.qihang.common.api.ShopApiParams;
|
||||||
import com.qihang.common.common.ApiResult;
|
import com.qihang.common.common.ResultVo;
|
||||||
import com.qihang.common.enums.EnumShopType;
|
import com.qihang.common.enums.EnumShopType;
|
||||||
import com.qihang.common.enums.HttpStatus;
|
import com.qihang.common.enums.HttpStatus;
|
||||||
|
|
||||||
|
import com.qihang.wei.openApi.service.ShopInfoApiService;
|
||||||
import com.qihang.wei.openApi.service.TokenApiService;
|
import com.qihang.wei.openApi.service.TokenApiService;
|
||||||
|
import com.qihang.wei.openApi.vo.ShopApiResultVo;
|
||||||
import com.qihang.wei.openApi.vo.Token;
|
import com.qihang.wei.openApi.vo.Token;
|
||||||
|
import com.qihang.wei.service.SysPlatformService;
|
||||||
import com.qihang.wei.service.SysShopService;
|
import com.qihang.wei.service.SysShopService;
|
||||||
import com.qihang.wei.utils.RemoteUtil;
|
import com.qihang.wei.utils.RemoteUtil;
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
|
|
@ -17,6 +20,7 @@ import org.springframework.util.StringUtils;
|
||||||
@Component
|
@Component
|
||||||
public class ApiCommon {
|
public class ApiCommon {
|
||||||
private final SysShopService shopService;
|
private final SysShopService shopService;
|
||||||
|
private final SysPlatformService platformService;
|
||||||
/**
|
/**
|
||||||
* 更新前的检查
|
* 更新前的检查
|
||||||
*
|
*
|
||||||
|
|
@ -24,78 +28,51 @@ public class ApiCommon {
|
||||||
* @return
|
* @return
|
||||||
* @throws
|
* @throws
|
||||||
*/
|
*/
|
||||||
public ApiResult<ShopApiParams> checkBefore(Integer shopId) {
|
public ResultVo<ShopApiParams> checkBefore(Integer shopId) {
|
||||||
var shop = shopService.selectShopById(shopId);
|
var shop = shopService.selectShopById(shopId);
|
||||||
if (shop == null) {
|
if (shop == null) {
|
||||||
// return new ApiResult<>(EnumResultVo.ParamsError.getIndex(), "参数错误,没有找到店铺");
|
return ResultVo.error(HttpStatus.PARAMS_ERROR,"参数错误,没有找到店铺");
|
||||||
return ApiResult.build(HttpStatus.PARAMS_ERROR,"参数错误,没有找到店铺");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (shop.getType() != EnumShopType.WEI.getIndex()) {
|
if (shop.getType() != EnumShopType.WEI.getIndex()) {
|
||||||
return ApiResult.build(HttpStatus.PARAMS_ERROR, "参数错误,店铺不是JD店铺");
|
return ResultVo.error(HttpStatus.PARAMS_ERROR, "参数错误,店铺不是JD店铺");
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!StringUtils.hasText(shop.getAppKey())) {
|
if(!StringUtils.hasText(shop.getAppKey())) {
|
||||||
return ApiResult.build(HttpStatus.PARAMS_ERROR, "平台配置错误,没有找到AppKey");
|
return ResultVo.error(HttpStatus.PARAMS_ERROR, "平台配置错误,没有找到AppKey");
|
||||||
}
|
}
|
||||||
if(!StringUtils.hasText(shop.getAppSercet())) {
|
if(!StringUtils.hasText(shop.getAppSercet())) {
|
||||||
return ApiResult.build(HttpStatus.PARAMS_ERROR, "第三方平台配置错误,没有找到AppSercet");
|
return ResultVo.error(HttpStatus.PARAMS_ERROR, "第三方平台配置错误,没有找到AppSercet");
|
||||||
|
}
|
||||||
|
var platform =platformService.getById(EnumShopType.WEI.getIndex());
|
||||||
|
if(!StringUtils.hasText(platform.getServerUrl())) {
|
||||||
|
return ResultVo.error(HttpStatus.PARAMS_ERROR, "第三方平台配置错误,没有找到ServerUrl");
|
||||||
}
|
}
|
||||||
// if(!StringUtils.hasText(platform.getRedirectUri())) {
|
|
||||||
// return ApiResult.build(HttpStatus.PARAMS_ERROR, "第三方平台配置错误,没有找到RedirectUri");
|
|
||||||
// }
|
|
||||||
// if(!StringUtils.hasText(platform.getServerUrl())) {
|
|
||||||
// return ApiResult.build(HttpStatus.PARAMS_ERROR, "第三方平台配置错误,没有找到ServerUrl");
|
|
||||||
// }
|
|
||||||
|
|
||||||
// if(shop.getSellerId() == null || shop.getSellerId() <= 0) {
|
|
||||||
// return com.qihang.tao.common.ApiResult.build(HttpStatus.PARAMS_ERROR, "第三方平台配置错误,没有找到SellerUserId");
|
|
||||||
// }
|
|
||||||
|
|
||||||
ShopApiParams params = new ShopApiParams();
|
ShopApiParams params = new ShopApiParams();
|
||||||
params.setAppKey(shop.getAppKey());
|
params.setAppKey(shop.getAppKey());
|
||||||
params.setAppSecret(shop.getAppSercet());
|
params.setAppSecret(shop.getAppSercet());
|
||||||
params.setAccessToken(shop.getAccessToken());
|
params.setAccessToken(shop.getAccessToken());
|
||||||
// params.setTokenRequestUrl(platform.getRedirectUri());
|
|
||||||
params.setApiRequestUrl(shop.getApiRequestUrl());
|
params.setApiRequestUrl(shop.getApiRequestUrl());
|
||||||
// params.setServerUrl(platform.getServerUrl());
|
params.setServerUrl(platform.getServerUrl());
|
||||||
params.setSellerId(shop.getSellerId().toString());
|
params.setSellerId(shop.getSellerId().toString());
|
||||||
if (!StringUtils.hasText(shop.getAccessToken())) {
|
if (!StringUtils.hasText(shop.getAccessToken())) {
|
||||||
String tokenUrl = "https://api.weixin.qq.com/cgi-bin";
|
|
||||||
// String s = "/token?grant_type=client_credential&appid="+params.getAppKey()+"&secret="+params.getAppSecret();
|
// String s = "/token?grant_type=client_credential&appid="+params.getAppKey()+"&secret="+params.getAppSecret();
|
||||||
TokenApiService remoting = RemoteUtil.Remoting(tokenUrl, TokenApiService.class);
|
TokenApiService remoting = RemoteUtil.Remoting(params.getServerUrl(), TokenApiService.class);
|
||||||
Token token = remoting.getToken("client_credential",params.getAppKey(),params.getAppSecret());
|
Token token = remoting.getToken("client_credential",params.getAppKey(),params.getAppSecret());
|
||||||
params.setAccessToken(token.getAccess_token());
|
params.setAccessToken(token.getAccess_token());
|
||||||
shopService.updateSessionKey(shopId,token.getAccess_token());
|
shopService.updateSessionKey(shopId,token.getAccess_token());
|
||||||
// return ApiResult.build(HttpStatus.UNAUTHORIZED, "Token已过期,请重新授权", params);
|
}else {
|
||||||
|
// 调用 店铺基本信息接口 验证Token
|
||||||
|
ShopInfoApiService remoting = RemoteUtil.Remoting(params.getServerUrl(), ShopInfoApiService.class);
|
||||||
|
ShopApiResultVo shopInfo = remoting.getShopInfo(params.getAccessToken());
|
||||||
|
if(shopInfo.getErrcode() == 42001){
|
||||||
|
// Token过期
|
||||||
|
TokenApiService remoting1 = RemoteUtil.Remoting(params.getServerUrl(), TokenApiService.class);
|
||||||
|
Token token = remoting1.getToken("client_credential",params.getAppKey(),params.getAppSecret());
|
||||||
|
params.setAccessToken(token.getAccess_token());
|
||||||
|
shopService.updateSessionKey(shopId,token.getAccess_token());
|
||||||
}
|
}
|
||||||
|
}
|
||||||
/****************先查询卖家对不对***************/
|
return ResultVo.success(params);
|
||||||
// TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
|
|
||||||
// UserSellerGetRequest reqSeller = new UserSellerGetRequest();
|
|
||||||
// reqSeller.setFields("nick,user_id");
|
|
||||||
// UserSellerGetResponse rsp = client.execute(reqSeller, sessionKey);
|
|
||||||
// if(StringUtils.hasText(rsp.getErrorCode())){
|
|
||||||
// if(rsp.getErrorCode().equals("27")){
|
|
||||||
// return new ApiResult<>(EnumResultVo.TokenFail.getIndex(), "Token已过期,请重新授权",params);
|
|
||||||
// }
|
|
||||||
// else if(rsp.getErrorCode().equals("11")){
|
|
||||||
// if(rsp.getSubCode().equals("isv.permission-api-package-limit"))
|
|
||||||
// return new ApiResult<>(EnumResultVo.ParamsError.getIndex(), "请检查淘宝用户API:taobao.user.seller.get是否具有访问权限",params);
|
|
||||||
// return new ApiResult<>(EnumResultVo.ParamsError.getIndex(), rsp.getSubCode(),params);
|
|
||||||
// }
|
|
||||||
// else if(rsp.getErrorCode().equals("25")){
|
|
||||||
// return new ApiResult<>(EnumResultVo.ParamsError.getIndex(), "无效签名!请检查SessionKey、appKey、appSecret是否匹配",params);
|
|
||||||
// } else
|
|
||||||
// return new ApiResult<>(EnumResultVo.ParamsError.getIndex(), "参数错误!"+(StringUtils.hasText(rsp.getSubMsg()) ? rsp.getSubMsg(): rsp.getMsg()));
|
|
||||||
// }
|
|
||||||
// if(rsp.getUser() == null || rsp.getUser().getUserId() == null){
|
|
||||||
// return new ApiResult<>(EnumResultVo.ParamsError.getIndex(), "参数错误!请设置店铺SellerUserId值!",params);
|
|
||||||
// }
|
|
||||||
// else if (shop.getSellerUserId().longValue() != rsp.getUser().getUserId().longValue()) {
|
|
||||||
// return new ApiResult<>(EnumResultVo.TokenFail.getIndex(), "当前用户是:" + rsp.getUser().getNick() + ",请重新授权",params);
|
|
||||||
// }
|
|
||||||
return ApiResult.build(HttpStatus.SUCCESS,"",params);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,13 @@
|
||||||
|
package com.qihang.wei.openApi.service;
|
||||||
|
|
||||||
|
import com.qihang.wei.openApi.vo.ShopApiResultVo;
|
||||||
|
import com.qihang.wei.openApi.vo.Token;
|
||||||
|
import org.springframework.web.bind.annotation.RequestParam;
|
||||||
|
import org.springframework.web.service.annotation.GetExchange;
|
||||||
|
import org.springframework.web.service.annotation.HttpExchange;
|
||||||
|
|
||||||
|
@HttpExchange
|
||||||
|
public interface ShopInfoApiService {
|
||||||
|
@GetExchange("/channels/ec/basics/info/get")
|
||||||
|
ShopApiResultVo getShopInfo(@RequestParam String access_token);
|
||||||
|
}
|
||||||
|
|
@ -9,6 +9,6 @@ import org.springframework.web.service.annotation.HttpExchange;
|
||||||
@HttpExchange
|
@HttpExchange
|
||||||
public interface TokenApiService {
|
public interface TokenApiService {
|
||||||
|
|
||||||
@GetExchange("/token")
|
@GetExchange("/cgi-bin/token")
|
||||||
Token getToken(@RequestParam String grant_type, @RequestParam String appid, @RequestParam String secret);
|
Token getToken(@RequestParam String grant_type, @RequestParam String appid, @RequestParam String secret);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,8 @@
|
||||||
|
package com.qihang.wei.openApi.vo;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class ShopApiResultVo extends BaseResVo{
|
||||||
|
private ShopInfoVo info;
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,12 @@
|
||||||
|
package com.qihang.wei.openApi.vo;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class ShopInfoVo {
|
||||||
|
private String nickname;
|
||||||
|
private String headimg_url;
|
||||||
|
private String subject_type;
|
||||||
|
private String status;
|
||||||
|
private String username;
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,13 @@
|
||||||
|
package com.qihang.wei.service;
|
||||||
|
|
||||||
|
import com.qihang.wei.domain.SysPlatform;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author qilip
|
||||||
|
* @description 针对表【sys_platform】的数据库操作Service
|
||||||
|
* @createDate 2024-03-24 18:04:27
|
||||||
|
*/
|
||||||
|
public interface SysPlatformService extends IService<SysPlatform> {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,22 @@
|
||||||
|
package com.qihang.wei.service.impl;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import com.qihang.wei.domain.SysPlatform;
|
||||||
|
import com.qihang.wei.service.SysPlatformService;
|
||||||
|
import com.qihang.wei.mapper.SysPlatformMapper;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author qilip
|
||||||
|
* @description 针对表【sys_platform】的数据库操作Service实现
|
||||||
|
* @createDate 2024-03-24 18:04:27
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class SysPlatformServiceImpl extends ServiceImpl<SysPlatformMapper, SysPlatform>
|
||||||
|
implements SysPlatformService{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -0,0 +1,22 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE mapper
|
||||||
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="com.qihang.wei.mapper.SysPlatformMapper">
|
||||||
|
|
||||||
|
<resultMap id="BaseResultMap" type="com.qihang.wei.domain.SysPlatform">
|
||||||
|
<id property="id" column="id" jdbcType="INTEGER"/>
|
||||||
|
<result property="name" column="name" jdbcType="VARCHAR"/>
|
||||||
|
<result property="code" column="code" jdbcType="VARCHAR"/>
|
||||||
|
<result property="appKey" column="app_key" jdbcType="VARCHAR"/>
|
||||||
|
<result property="appSecret" column="app_secret" jdbcType="VARCHAR"/>
|
||||||
|
<result property="redirectUri" column="redirect_uri" jdbcType="VARCHAR"/>
|
||||||
|
<result property="serverUrl" column="server_url" jdbcType="VARCHAR"/>
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<sql id="Base_Column_List">
|
||||||
|
id,name,code,
|
||||||
|
app_key,app_secret,redirect_uri,
|
||||||
|
server_url
|
||||||
|
</sql>
|
||||||
|
</mapper>
|
||||||
Loading…
Reference in New Issue