From 4563cd9df39f91031db21579bb4330efb11e43cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=AF=E8=88=AA?= Date: Wed, 13 Mar 2024 18:34:18 +0845 Subject: [PATCH] update --- .../controller/AjaxOrderPddController.java | 18 +- .../{DouRequest.java => OpenApiRequest.java} | 8 +- .../qihang/pdd/controller/ShopApiParams.java | 49 ++ .../com/qihang/pdd/domain/SysPlatform.java | 197 +++++++++ .../java/com/qihang/pdd/domain/SysShop.java | 417 ++++++++++++++++++ .../pdd/domain/SysShopPullLasttime.java | 176 ++++++++ .../qihang/pdd/domain/SysShopPullLogs.java | 220 +++++++++ .../qihang/pdd/mapper/SysPlatformMapper.java | 18 + .../com/qihang/pdd/mapper/SysShopMapper.java | 18 + .../pdd/mapper/SysShopPullLasttimeMapper.java | 18 + .../pdd/mapper/SysShopPullLogsMapper.java | 18 + .../pdd/service/SysPlatformService.java | 13 + .../service/SysShopPullLasttimeService.java | 13 + .../pdd/service/SysShopPullLogsService.java | 13 + .../qihang/pdd/service/SysShopService.java | 15 + .../main/java/com/qihang/pdd/service/a.java | 4 - .../service/impl/SysPlatformServiceImpl.java | 22 + .../impl/SysShopPullLasttimeServiceImpl.java | 22 + .../impl/SysShopPullLogsServiceImpl.java | 22 + .../pdd/service/impl/SysShopServiceImpl.java | 37 ++ .../resources/mapper/SysPlatformMapper.xml | 22 + .../main/resources/mapper/SysShopMapper.xml | 35 ++ .../mapper/SysShopPullLasttimeMapper.xml | 20 + .../mapper/SysShopPullLogsMapper.xml | 23 + 24 files changed, 1401 insertions(+), 17 deletions(-) rename pdd-api/src/main/java/com/qihang/pdd/controller/{DouRequest.java => OpenApiRequest.java} (85%) create mode 100644 pdd-api/src/main/java/com/qihang/pdd/controller/ShopApiParams.java create mode 100644 pdd-api/src/main/java/com/qihang/pdd/domain/SysPlatform.java create mode 100644 pdd-api/src/main/java/com/qihang/pdd/domain/SysShop.java create mode 100644 pdd-api/src/main/java/com/qihang/pdd/domain/SysShopPullLasttime.java create mode 100644 pdd-api/src/main/java/com/qihang/pdd/domain/SysShopPullLogs.java create mode 100644 pdd-api/src/main/java/com/qihang/pdd/mapper/SysPlatformMapper.java create mode 100644 pdd-api/src/main/java/com/qihang/pdd/mapper/SysShopMapper.java create mode 100644 pdd-api/src/main/java/com/qihang/pdd/mapper/SysShopPullLasttimeMapper.java create mode 100644 pdd-api/src/main/java/com/qihang/pdd/mapper/SysShopPullLogsMapper.java create mode 100644 pdd-api/src/main/java/com/qihang/pdd/service/SysPlatformService.java create mode 100644 pdd-api/src/main/java/com/qihang/pdd/service/SysShopPullLasttimeService.java create mode 100644 pdd-api/src/main/java/com/qihang/pdd/service/SysShopPullLogsService.java create mode 100644 pdd-api/src/main/java/com/qihang/pdd/service/SysShopService.java delete mode 100644 pdd-api/src/main/java/com/qihang/pdd/service/a.java create mode 100644 pdd-api/src/main/java/com/qihang/pdd/service/impl/SysPlatformServiceImpl.java create mode 100644 pdd-api/src/main/java/com/qihang/pdd/service/impl/SysShopPullLasttimeServiceImpl.java create mode 100644 pdd-api/src/main/java/com/qihang/pdd/service/impl/SysShopPullLogsServiceImpl.java create mode 100644 pdd-api/src/main/java/com/qihang/pdd/service/impl/SysShopServiceImpl.java create mode 100644 pdd-api/src/main/resources/mapper/SysPlatformMapper.xml create mode 100644 pdd-api/src/main/resources/mapper/SysShopMapper.xml create mode 100644 pdd-api/src/main/resources/mapper/SysShopPullLasttimeMapper.xml create mode 100644 pdd-api/src/main/resources/mapper/SysShopPullLogsMapper.xml diff --git a/pdd-api/src/main/java/com/qihang/pdd/controller/AjaxOrderPddController.java b/pdd-api/src/main/java/com/qihang/pdd/controller/AjaxOrderPddController.java index 11c828f1..e5f1c998 100644 --- a/pdd-api/src/main/java/com/qihang/pdd/controller/AjaxOrderPddController.java +++ b/pdd-api/src/main/java/com/qihang/pdd/controller/AjaxOrderPddController.java @@ -6,6 +6,7 @@ import com.pdd.pop.sdk.http.PopHttpClient; import com.pdd.pop.sdk.http.api.pop.request.PddOrderListGetRequest; import com.pdd.pop.sdk.http.api.pop.response.PddOrderListGetResponse; import com.qihang.common.common.ApiResult; +import com.qihang.pdd.service.SysShopService; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; @@ -18,12 +19,12 @@ import org.springframework.web.bind.annotation.RestController; @RestController public class AjaxOrderPddController { private static Logger log = LoggerFactory.getLogger(AjaxOrderPddController.class); +// @Autowired +// private ServerConfig serverConfig; @Autowired - private ServerConfig serverConfig; - @Autowired - private IShopService shopService; - @Autowired - private IPddOrderService pddOrderService; + private SysShopService shopService; +// @Autowired +// private IPddOrderService pddOrderService; /** * 接口拉取订单 @@ -34,16 +35,15 @@ public class AjaxOrderPddController { * @throws Exception */ @RequestMapping(value = "/order/pull_order", method = RequestMethod.GET) - public ApiResult getOrderList(DouRequest reqData) + public ApiResult getOrderList(OpenApiRequest reqData) throws Exception { Integer updType = reqData.getUpdType();//更新类型0拉取新订单1更新订单 String startDate = reqData.getStartDate();//reqData.getString("startTime"); String endDate = reqData.getEndDate();//reqData.getString("endTime"); - Long shopId = reqData.getShopId();// 拼多多shopId - var shop = shopService.selectShopById(shopId); + var shop = shopService.selectShopById(reqData.getShopId()); if(shop == null) return new ApiResult<>(EnumResultVo.Fail.getIndex(), "店铺不存在!"); - String appKey = shop.getAppkey(); + String appKey = shop.getAppKey(); String appSercet = shop.getAppSercet(); if(!StringUtils.hasText(appKey) || !StringUtils.hasText(appSercet)) return new ApiResult<>(EnumResultVo.Fail.getIndex(), "参数错误:请设置appkey和serecet"); diff --git a/pdd-api/src/main/java/com/qihang/pdd/controller/DouRequest.java b/pdd-api/src/main/java/com/qihang/pdd/controller/OpenApiRequest.java similarity index 85% rename from pdd-api/src/main/java/com/qihang/pdd/controller/DouRequest.java rename to pdd-api/src/main/java/com/qihang/pdd/controller/OpenApiRequest.java index 6f3b5cd3..8dc12e8b 100644 --- a/pdd-api/src/main/java/com/qihang/pdd/controller/DouRequest.java +++ b/pdd-api/src/main/java/com/qihang/pdd/controller/OpenApiRequest.java @@ -1,7 +1,7 @@ package com.qihang.pdd.controller; -public class DouRequest { - private Long shopId;//店铺Id +public class OpenApiRequest { + private Integer shopId;//店铺Id private Long orderId;//订单id private Integer updType;//更新类型0拉取新订单1更新订单 private String startDate; @@ -39,11 +39,11 @@ public class DouRequest { this.orderId = orderId; } - public Long getShopId() { + public Integer getShopId() { return shopId; } - public void setShopId(Long shopId) { + public void setShopId(Integer shopId) { this.shopId = shopId; } } diff --git a/pdd-api/src/main/java/com/qihang/pdd/controller/ShopApiParams.java b/pdd-api/src/main/java/com/qihang/pdd/controller/ShopApiParams.java new file mode 100644 index 00000000..e7a3f40e --- /dev/null +++ b/pdd-api/src/main/java/com/qihang/pdd/controller/ShopApiParams.java @@ -0,0 +1,49 @@ +package com.qihang.pdd.controller; + +public class ShopApiParams { + private String appKey; + private String appSecret; + private String accessToken; + private String apiRequestUrl; + private String tokenRequestUrl; + + public String getTokenRequestUrl() { + return tokenRequestUrl; + } + + public void setTokenRequestUrl(String tokenRequestUrl) { + this.tokenRequestUrl = tokenRequestUrl; + } + + public String getAppKey() { + return appKey; + } + + public void setAppKey(String appKey) { + this.appKey = appKey; + } + + public String getAppSecret() { + return appSecret; + } + + public void setAppSecret(String appSecret) { + this.appSecret = appSecret; + } + + public String getAccessToken() { + return accessToken; + } + + public void setAccessToken(String accessToken) { + this.accessToken = accessToken; + } + + public String getApiRequestUrl() { + return apiRequestUrl; + } + + public void setApiRequestUrl(String apiRequestUrl) { + this.apiRequestUrl = apiRequestUrl; + } +} diff --git a/pdd-api/src/main/java/com/qihang/pdd/domain/SysPlatform.java b/pdd-api/src/main/java/com/qihang/pdd/domain/SysPlatform.java new file mode 100644 index 00000000..19722c31 --- /dev/null +++ b/pdd-api/src/main/java/com/qihang/pdd/domain/SysPlatform.java @@ -0,0 +1,197 @@ +package com.qihang.pdd.domain; + +import java.io.Serializable; + +/** + * + * @TableName sys_platform + */ +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; + + /** + * + */ + public Integer getId() { + return id; + } + + /** + * + */ + public void setId(Integer id) { + this.id = id; + } + + /** + * 平台名 + */ + public String getName() { + return name; + } + + /** + * 平台名 + */ + public void setName(String name) { + this.name = name; + } + + /** + * 平台编码 + */ + public String getCode() { + return code; + } + + /** + * 平台编码 + */ + public void setCode(String code) { + this.code = code; + } + + /** + * + */ + public String getAppKey() { + return appKey; + } + + /** + * + */ + public void setAppKey(String appKey) { + this.appKey = appKey; + } + + /** + * + */ + public String getAppSecret() { + return appSecret; + } + + /** + * + */ + public void setAppSecret(String appSecret) { + this.appSecret = appSecret; + } + + /** + * 平台回调uri + */ + public String getRedirectUri() { + return redirectUri; + } + + /** + * 平台回调uri + */ + public void setRedirectUri(String redirectUri) { + this.redirectUri = redirectUri; + } + + /** + * 接口访问地址 + */ + public String getServerUrl() { + return serverUrl; + } + + /** + * 接口访问地址 + */ + public void setServerUrl(String serverUrl) { + this.serverUrl = serverUrl; + } + + @Override + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + SysPlatform other = (SysPlatform) that; + return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) + && (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName())) + && (this.getCode() == null ? other.getCode() == null : this.getCode().equals(other.getCode())) + && (this.getAppKey() == null ? other.getAppKey() == null : this.getAppKey().equals(other.getAppKey())) + && (this.getAppSecret() == null ? other.getAppSecret() == null : this.getAppSecret().equals(other.getAppSecret())) + && (this.getRedirectUri() == null ? other.getRedirectUri() == null : this.getRedirectUri().equals(other.getRedirectUri())) + && (this.getServerUrl() == null ? other.getServerUrl() == null : this.getServerUrl().equals(other.getServerUrl())); + } + + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getId() == null) ? 0 : getId().hashCode()); + result = prime * result + ((getName() == null) ? 0 : getName().hashCode()); + result = prime * result + ((getCode() == null) ? 0 : getCode().hashCode()); + result = prime * result + ((getAppKey() == null) ? 0 : getAppKey().hashCode()); + result = prime * result + ((getAppSecret() == null) ? 0 : getAppSecret().hashCode()); + result = prime * result + ((getRedirectUri() == null) ? 0 : getRedirectUri().hashCode()); + result = prime * result + ((getServerUrl() == null) ? 0 : getServerUrl().hashCode()); + return result; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", id=").append(id); + sb.append(", name=").append(name); + sb.append(", code=").append(code); + sb.append(", appKey=").append(appKey); + sb.append(", appSecret=").append(appSecret); + sb.append(", redirectUri=").append(redirectUri); + sb.append(", serverUrl=").append(serverUrl); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/pdd-api/src/main/java/com/qihang/pdd/domain/SysShop.java b/pdd-api/src/main/java/com/qihang/pdd/domain/SysShop.java new file mode 100644 index 00000000..b3a28c28 --- /dev/null +++ b/pdd-api/src/main/java/com/qihang/pdd/domain/SysShop.java @@ -0,0 +1,417 @@ +package com.qihang.pdd.domain; + +import java.io.Serializable; + +/** + * 数据中心-店铺 + * @TableName sys_shop + */ +public class SysShop implements Serializable { + /** + * 主键 + */ + private Integer id; + + /** + * 店铺名 + */ + private String name; + + /** + * 对应第三方平台Id + */ + private Integer type; + + /** + * 店铺url + */ + private String url; + + /** + * 排序 + */ + private Integer sort; + + /** + * 状态(1正常2已删除) + */ + private Integer status; + + /** + * 更新时间 + */ + private Long modifyOn; + + /** + * 描述 + */ + private String remark; + + /** + * 第三方平台店铺id,淘宝天猫开放平台使用 + */ + private Long sellerId; + + /** + * Appkey + */ + private String appKey; + + /** + * Appsercet + */ + private String appSercet; + + /** + * 第三方平台sessionKey(access_token) + */ + private String accessToken; + + /** + * 到期 + */ + private Long expiresIn; + + /** + * access_token开始时间 + */ + private Long accessTokenBegin; + + /** + * 刷新token + */ + private String refreshToken; + + /** + * 刷新token过期时间 + */ + private Long refreshTokenTimeout; + + /** + * 请求url + */ + private String apiRequestUrl; + + private static final long serialVersionUID = 1L; + + /** + * 主键 + */ + public Integer getId() { + return id; + } + + /** + * 主键 + */ + public void setId(Integer id) { + this.id = id; + } + + /** + * 店铺名 + */ + public String getName() { + return name; + } + + /** + * 店铺名 + */ + public void setName(String name) { + this.name = name; + } + + /** + * 对应第三方平台Id + */ + public Integer getType() { + return type; + } + + /** + * 对应第三方平台Id + */ + public void setType(Integer type) { + this.type = type; + } + + /** + * 店铺url + */ + public String getUrl() { + return url; + } + + /** + * 店铺url + */ + public void setUrl(String url) { + this.url = url; + } + + /** + * 排序 + */ + public Integer getSort() { + return sort; + } + + /** + * 排序 + */ + public void setSort(Integer sort) { + this.sort = sort; + } + + /** + * 状态(1正常2已删除) + */ + public Integer getStatus() { + return status; + } + + /** + * 状态(1正常2已删除) + */ + public void setStatus(Integer status) { + this.status = status; + } + + /** + * 更新时间 + */ + public Long getModifyOn() { + return modifyOn; + } + + /** + * 更新时间 + */ + public void setModifyOn(Long modifyOn) { + this.modifyOn = modifyOn; + } + + /** + * 描述 + */ + public String getRemark() { + return remark; + } + + /** + * 描述 + */ + public void setRemark(String remark) { + this.remark = remark; + } + + /** + * 第三方平台店铺id,淘宝天猫开放平台使用 + */ + public Long getSellerId() { + return sellerId; + } + + /** + * 第三方平台店铺id,淘宝天猫开放平台使用 + */ + public void setSellerId(Long sellerId) { + this.sellerId = sellerId; + } + + /** + * Appkey + */ + public String getAppKey() { + return appKey; + } + + /** + * Appkey + */ + public void setAppKey(String appKey) { + this.appKey = appKey; + } + + /** + * Appsercet + */ + public String getAppSercet() { + return appSercet; + } + + /** + * Appsercet + */ + public void setAppSercet(String appSercet) { + this.appSercet = appSercet; + } + + /** + * 第三方平台sessionKey(access_token) + */ + public String getAccessToken() { + return accessToken; + } + + /** + * 第三方平台sessionKey(access_token) + */ + public void setAccessToken(String accessToken) { + this.accessToken = accessToken; + } + + /** + * 到期 + */ + public Long getExpiresIn() { + return expiresIn; + } + + /** + * 到期 + */ + public void setExpiresIn(Long expiresIn) { + this.expiresIn = expiresIn; + } + + /** + * access_token开始时间 + */ + public Long getAccessTokenBegin() { + return accessTokenBegin; + } + + /** + * access_token开始时间 + */ + public void setAccessTokenBegin(Long accessTokenBegin) { + this.accessTokenBegin = accessTokenBegin; + } + + /** + * 刷新token + */ + public String getRefreshToken() { + return refreshToken; + } + + /** + * 刷新token + */ + public void setRefreshToken(String refreshToken) { + this.refreshToken = refreshToken; + } + + /** + * 刷新token过期时间 + */ + public Long getRefreshTokenTimeout() { + return refreshTokenTimeout; + } + + /** + * 刷新token过期时间 + */ + public void setRefreshTokenTimeout(Long refreshTokenTimeout) { + this.refreshTokenTimeout = refreshTokenTimeout; + } + + /** + * 请求url + */ + public String getApiRequestUrl() { + return apiRequestUrl; + } + + /** + * 请求url + */ + public void setApiRequestUrl(String apiRequestUrl) { + this.apiRequestUrl = apiRequestUrl; + } + + @Override + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + SysShop other = (SysShop) that; + return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) + && (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName())) + && (this.getType() == null ? other.getType() == null : this.getType().equals(other.getType())) + && (this.getUrl() == null ? other.getUrl() == null : this.getUrl().equals(other.getUrl())) + && (this.getSort() == null ? other.getSort() == null : this.getSort().equals(other.getSort())) + && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus())) + && (this.getModifyOn() == null ? other.getModifyOn() == null : this.getModifyOn().equals(other.getModifyOn())) + && (this.getRemark() == null ? other.getRemark() == null : this.getRemark().equals(other.getRemark())) + && (this.getSellerId() == null ? other.getSellerId() == null : this.getSellerId().equals(other.getSellerId())) + && (this.getAppKey() == null ? other.getAppKey() == null : this.getAppKey().equals(other.getAppKey())) + && (this.getAppSercet() == null ? other.getAppSercet() == null : this.getAppSercet().equals(other.getAppSercet())) + && (this.getAccessToken() == null ? other.getAccessToken() == null : this.getAccessToken().equals(other.getAccessToken())) + && (this.getExpiresIn() == null ? other.getExpiresIn() == null : this.getExpiresIn().equals(other.getExpiresIn())) + && (this.getAccessTokenBegin() == null ? other.getAccessTokenBegin() == null : this.getAccessTokenBegin().equals(other.getAccessTokenBegin())) + && (this.getRefreshToken() == null ? other.getRefreshToken() == null : this.getRefreshToken().equals(other.getRefreshToken())) + && (this.getRefreshTokenTimeout() == null ? other.getRefreshTokenTimeout() == null : this.getRefreshTokenTimeout().equals(other.getRefreshTokenTimeout())) + && (this.getApiRequestUrl() == null ? other.getApiRequestUrl() == null : this.getApiRequestUrl().equals(other.getApiRequestUrl())); + } + + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getId() == null) ? 0 : getId().hashCode()); + result = prime * result + ((getName() == null) ? 0 : getName().hashCode()); + result = prime * result + ((getType() == null) ? 0 : getType().hashCode()); + result = prime * result + ((getUrl() == null) ? 0 : getUrl().hashCode()); + result = prime * result + ((getSort() == null) ? 0 : getSort().hashCode()); + result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode()); + result = prime * result + ((getModifyOn() == null) ? 0 : getModifyOn().hashCode()); + result = prime * result + ((getRemark() == null) ? 0 : getRemark().hashCode()); + result = prime * result + ((getSellerId() == null) ? 0 : getSellerId().hashCode()); + result = prime * result + ((getAppKey() == null) ? 0 : getAppKey().hashCode()); + result = prime * result + ((getAppSercet() == null) ? 0 : getAppSercet().hashCode()); + result = prime * result + ((getAccessToken() == null) ? 0 : getAccessToken().hashCode()); + result = prime * result + ((getExpiresIn() == null) ? 0 : getExpiresIn().hashCode()); + result = prime * result + ((getAccessTokenBegin() == null) ? 0 : getAccessTokenBegin().hashCode()); + result = prime * result + ((getRefreshToken() == null) ? 0 : getRefreshToken().hashCode()); + result = prime * result + ((getRefreshTokenTimeout() == null) ? 0 : getRefreshTokenTimeout().hashCode()); + result = prime * result + ((getApiRequestUrl() == null) ? 0 : getApiRequestUrl().hashCode()); + return result; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", id=").append(id); + sb.append(", name=").append(name); + sb.append(", type=").append(type); + sb.append(", url=").append(url); + sb.append(", sort=").append(sort); + sb.append(", status=").append(status); + sb.append(", modifyOn=").append(modifyOn); + sb.append(", remark=").append(remark); + sb.append(", sellerId=").append(sellerId); + sb.append(", appKey=").append(appKey); + sb.append(", appSercet=").append(appSercet); + sb.append(", accessToken=").append(accessToken); + sb.append(", expiresIn=").append(expiresIn); + sb.append(", accessTokenBegin=").append(accessTokenBegin); + sb.append(", refreshToken=").append(refreshToken); + sb.append(", refreshTokenTimeout=").append(refreshTokenTimeout); + sb.append(", apiRequestUrl=").append(apiRequestUrl); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/pdd-api/src/main/java/com/qihang/pdd/domain/SysShopPullLasttime.java b/pdd-api/src/main/java/com/qihang/pdd/domain/SysShopPullLasttime.java new file mode 100644 index 00000000..96236875 --- /dev/null +++ b/pdd-api/src/main/java/com/qihang/pdd/domain/SysShopPullLasttime.java @@ -0,0 +1,176 @@ +package com.qihang.pdd.domain; + +import java.io.Serializable; +import java.util.Date; + +/** + * 店铺更新最后时间记录 + * @TableName sys_shop_pull_lasttime + */ +public class SysShopPullLasttime implements Serializable { + /** + * + */ + private Integer id; + + /** + * 店铺id + */ + private Integer shopId; + + /** + * 类型(ORDER:订单,REFUND:退款) + */ + private Object pullType; + + /** + * 最后更新时间 + */ + private Date lasttime; + + /** + * 创建时间 + */ + private Date createTime; + + /** + * 更新时间 + */ + private Date updateTime; + + private static final long serialVersionUID = 1L; + + /** + * + */ + public Integer getId() { + return id; + } + + /** + * + */ + public void setId(Integer id) { + this.id = id; + } + + /** + * 店铺id + */ + public Integer getShopId() { + return shopId; + } + + /** + * 店铺id + */ + public void setShopId(Integer shopId) { + this.shopId = shopId; + } + + /** + * 类型(ORDER:订单,REFUND:退款) + */ + public Object getPullType() { + return pullType; + } + + /** + * 类型(ORDER:订单,REFUND:退款) + */ + public void setPullType(Object pullType) { + this.pullType = pullType; + } + + /** + * 最后更新时间 + */ + public Date getLasttime() { + return lasttime; + } + + /** + * 最后更新时间 + */ + public void setLasttime(Date lasttime) { + this.lasttime = lasttime; + } + + /** + * 创建时间 + */ + public Date getCreateTime() { + return createTime; + } + + /** + * 创建时间 + */ + public void setCreateTime(Date createTime) { + this.createTime = createTime; + } + + /** + * 更新时间 + */ + public Date getUpdateTime() { + return updateTime; + } + + /** + * 更新时间 + */ + public void setUpdateTime(Date updateTime) { + this.updateTime = updateTime; + } + + @Override + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + SysShopPullLasttime other = (SysShopPullLasttime) that; + return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) + && (this.getShopId() == null ? other.getShopId() == null : this.getShopId().equals(other.getShopId())) + && (this.getPullType() == null ? other.getPullType() == null : this.getPullType().equals(other.getPullType())) + && (this.getLasttime() == null ? other.getLasttime() == null : this.getLasttime().equals(other.getLasttime())) + && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime())) + && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime())); + } + + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getId() == null) ? 0 : getId().hashCode()); + result = prime * result + ((getShopId() == null) ? 0 : getShopId().hashCode()); + result = prime * result + ((getPullType() == null) ? 0 : getPullType().hashCode()); + result = prime * result + ((getLasttime() == null) ? 0 : getLasttime().hashCode()); + result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode()); + result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode()); + return result; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", id=").append(id); + sb.append(", shopId=").append(shopId); + sb.append(", pullType=").append(pullType); + sb.append(", lasttime=").append(lasttime); + sb.append(", createTime=").append(createTime); + sb.append(", updateTime=").append(updateTime); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/pdd-api/src/main/java/com/qihang/pdd/domain/SysShopPullLogs.java b/pdd-api/src/main/java/com/qihang/pdd/domain/SysShopPullLogs.java new file mode 100644 index 00000000..d47559a2 --- /dev/null +++ b/pdd-api/src/main/java/com/qihang/pdd/domain/SysShopPullLogs.java @@ -0,0 +1,220 @@ +package com.qihang.pdd.domain; + +import java.io.Serializable; +import java.util.Date; + +/** + * 更新日志表 + * @TableName sys_shop_pull_logs + */ +public class SysShopPullLogs implements Serializable { + /** + * 主键Id + */ + private Long id; + + /** + * 店铺id + */ + private Integer shopId; + + /** + * 类型(ORDER订单,GOODS商品,REFUND退款) + */ + private Object pullType; + + /** + * 拉取方式(主动拉取、定时任务) + */ + private String pullWay; + + /** + * 拉取参数 + */ + private String pullParams; + + /** + * 拉取结果 + */ + private String pullResult; + + /** + * 拉取时间 + */ + private Date pullTime; + + /** + * 耗时(毫秒) + */ + private Long duration; + + private static final long serialVersionUID = 1L; + + /** + * 主键Id + */ + public Long getId() { + return id; + } + + /** + * 主键Id + */ + public void setId(Long id) { + this.id = id; + } + + /** + * 店铺id + */ + public Integer getShopId() { + return shopId; + } + + /** + * 店铺id + */ + public void setShopId(Integer shopId) { + this.shopId = shopId; + } + + /** + * 类型(ORDER订单,GOODS商品,REFUND退款) + */ + public Object getPullType() { + return pullType; + } + + /** + * 类型(ORDER订单,GOODS商品,REFUND退款) + */ + public void setPullType(Object pullType) { + this.pullType = pullType; + } + + /** + * 拉取方式(主动拉取、定时任务) + */ + public String getPullWay() { + return pullWay; + } + + /** + * 拉取方式(主动拉取、定时任务) + */ + public void setPullWay(String pullWay) { + this.pullWay = pullWay; + } + + /** + * 拉取参数 + */ + public String getPullParams() { + return pullParams; + } + + /** + * 拉取参数 + */ + public void setPullParams(String pullParams) { + this.pullParams = pullParams; + } + + /** + * 拉取结果 + */ + public String getPullResult() { + return pullResult; + } + + /** + * 拉取结果 + */ + public void setPullResult(String pullResult) { + this.pullResult = pullResult; + } + + /** + * 拉取时间 + */ + public Date getPullTime() { + return pullTime; + } + + /** + * 拉取时间 + */ + public void setPullTime(Date pullTime) { + this.pullTime = pullTime; + } + + /** + * 耗时(毫秒) + */ + public Long getDuration() { + return duration; + } + + /** + * 耗时(毫秒) + */ + public void setDuration(Long duration) { + this.duration = duration; + } + + @Override + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + SysShopPullLogs other = (SysShopPullLogs) that; + return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) + && (this.getShopId() == null ? other.getShopId() == null : this.getShopId().equals(other.getShopId())) + && (this.getPullType() == null ? other.getPullType() == null : this.getPullType().equals(other.getPullType())) + && (this.getPullWay() == null ? other.getPullWay() == null : this.getPullWay().equals(other.getPullWay())) + && (this.getPullParams() == null ? other.getPullParams() == null : this.getPullParams().equals(other.getPullParams())) + && (this.getPullResult() == null ? other.getPullResult() == null : this.getPullResult().equals(other.getPullResult())) + && (this.getPullTime() == null ? other.getPullTime() == null : this.getPullTime().equals(other.getPullTime())) + && (this.getDuration() == null ? other.getDuration() == null : this.getDuration().equals(other.getDuration())); + } + + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getId() == null) ? 0 : getId().hashCode()); + result = prime * result + ((getShopId() == null) ? 0 : getShopId().hashCode()); + result = prime * result + ((getPullType() == null) ? 0 : getPullType().hashCode()); + result = prime * result + ((getPullWay() == null) ? 0 : getPullWay().hashCode()); + result = prime * result + ((getPullParams() == null) ? 0 : getPullParams().hashCode()); + result = prime * result + ((getPullResult() == null) ? 0 : getPullResult().hashCode()); + result = prime * result + ((getPullTime() == null) ? 0 : getPullTime().hashCode()); + result = prime * result + ((getDuration() == null) ? 0 : getDuration().hashCode()); + return result; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", id=").append(id); + sb.append(", shopId=").append(shopId); + sb.append(", pullType=").append(pullType); + sb.append(", pullWay=").append(pullWay); + sb.append(", pullParams=").append(pullParams); + sb.append(", pullResult=").append(pullResult); + sb.append(", pullTime=").append(pullTime); + sb.append(", duration=").append(duration); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/pdd-api/src/main/java/com/qihang/pdd/mapper/SysPlatformMapper.java b/pdd-api/src/main/java/com/qihang/pdd/mapper/SysPlatformMapper.java new file mode 100644 index 00000000..6434e57c --- /dev/null +++ b/pdd-api/src/main/java/com/qihang/pdd/mapper/SysPlatformMapper.java @@ -0,0 +1,18 @@ +package com.qihang.pdd.mapper; + +import com.qihang.pdd.domain.SysPlatform; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; + +/** +* @author TW +* @description 针对表【sys_platform】的数据库操作Mapper +* @createDate 2024-03-13 17:43:42 +* @Entity com.qihang.pdd.domain.SysPlatform +*/ +public interface SysPlatformMapper extends BaseMapper { + +} + + + + diff --git a/pdd-api/src/main/java/com/qihang/pdd/mapper/SysShopMapper.java b/pdd-api/src/main/java/com/qihang/pdd/mapper/SysShopMapper.java new file mode 100644 index 00000000..73f96084 --- /dev/null +++ b/pdd-api/src/main/java/com/qihang/pdd/mapper/SysShopMapper.java @@ -0,0 +1,18 @@ +package com.qihang.pdd.mapper; + +import com.qihang.pdd.domain.SysShop; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; + +/** +* @author TW +* @description 针对表【sys_shop(数据中心-店铺)】的数据库操作Mapper +* @createDate 2024-03-13 17:43:42 +* @Entity com.qihang.pdd.domain.SysShop +*/ +public interface SysShopMapper extends BaseMapper { + +} + + + + diff --git a/pdd-api/src/main/java/com/qihang/pdd/mapper/SysShopPullLasttimeMapper.java b/pdd-api/src/main/java/com/qihang/pdd/mapper/SysShopPullLasttimeMapper.java new file mode 100644 index 00000000..028cc303 --- /dev/null +++ b/pdd-api/src/main/java/com/qihang/pdd/mapper/SysShopPullLasttimeMapper.java @@ -0,0 +1,18 @@ +package com.qihang.pdd.mapper; + +import com.qihang.pdd.domain.SysShopPullLasttime; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; + +/** +* @author TW +* @description 针对表【sys_shop_pull_lasttime(店铺更新最后时间记录)】的数据库操作Mapper +* @createDate 2024-03-13 17:43:42 +* @Entity com.qihang.pdd.domain.SysShopPullLasttime +*/ +public interface SysShopPullLasttimeMapper extends BaseMapper { + +} + + + + diff --git a/pdd-api/src/main/java/com/qihang/pdd/mapper/SysShopPullLogsMapper.java b/pdd-api/src/main/java/com/qihang/pdd/mapper/SysShopPullLogsMapper.java new file mode 100644 index 00000000..d4dd37bd --- /dev/null +++ b/pdd-api/src/main/java/com/qihang/pdd/mapper/SysShopPullLogsMapper.java @@ -0,0 +1,18 @@ +package com.qihang.pdd.mapper; + +import com.qihang.pdd.domain.SysShopPullLogs; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; + +/** +* @author TW +* @description 针对表【sys_shop_pull_logs(更新日志表)】的数据库操作Mapper +* @createDate 2024-03-13 17:43:42 +* @Entity com.qihang.pdd.domain.SysShopPullLogs +*/ +public interface SysShopPullLogsMapper extends BaseMapper { + +} + + + + diff --git a/pdd-api/src/main/java/com/qihang/pdd/service/SysPlatformService.java b/pdd-api/src/main/java/com/qihang/pdd/service/SysPlatformService.java new file mode 100644 index 00000000..e48569ab --- /dev/null +++ b/pdd-api/src/main/java/com/qihang/pdd/service/SysPlatformService.java @@ -0,0 +1,13 @@ +package com.qihang.pdd.service; + +import com.qihang.pdd.domain.SysPlatform; +import com.baomidou.mybatisplus.extension.service.IService; + +/** +* @author TW +* @description 针对表【sys_platform】的数据库操作Service +* @createDate 2024-03-13 17:43:42 +*/ +public interface SysPlatformService extends IService { + +} diff --git a/pdd-api/src/main/java/com/qihang/pdd/service/SysShopPullLasttimeService.java b/pdd-api/src/main/java/com/qihang/pdd/service/SysShopPullLasttimeService.java new file mode 100644 index 00000000..119f8d92 --- /dev/null +++ b/pdd-api/src/main/java/com/qihang/pdd/service/SysShopPullLasttimeService.java @@ -0,0 +1,13 @@ +package com.qihang.pdd.service; + +import com.qihang.pdd.domain.SysShopPullLasttime; +import com.baomidou.mybatisplus.extension.service.IService; + +/** +* @author TW +* @description 针对表【sys_shop_pull_lasttime(店铺更新最后时间记录)】的数据库操作Service +* @createDate 2024-03-13 17:43:42 +*/ +public interface SysShopPullLasttimeService extends IService { + +} diff --git a/pdd-api/src/main/java/com/qihang/pdd/service/SysShopPullLogsService.java b/pdd-api/src/main/java/com/qihang/pdd/service/SysShopPullLogsService.java new file mode 100644 index 00000000..4e443dc0 --- /dev/null +++ b/pdd-api/src/main/java/com/qihang/pdd/service/SysShopPullLogsService.java @@ -0,0 +1,13 @@ +package com.qihang.pdd.service; + +import com.qihang.pdd.domain.SysShopPullLogs; +import com.baomidou.mybatisplus.extension.service.IService; + +/** +* @author TW +* @description 针对表【sys_shop_pull_logs(更新日志表)】的数据库操作Service +* @createDate 2024-03-13 17:43:42 +*/ +public interface SysShopPullLogsService extends IService { + +} diff --git a/pdd-api/src/main/java/com/qihang/pdd/service/SysShopService.java b/pdd-api/src/main/java/com/qihang/pdd/service/SysShopService.java new file mode 100644 index 00000000..7d744c22 --- /dev/null +++ b/pdd-api/src/main/java/com/qihang/pdd/service/SysShopService.java @@ -0,0 +1,15 @@ +package com.qihang.pdd.service; + +import com.qihang.pdd.domain.SysShop; +import com.baomidou.mybatisplus.extension.service.IService; + +/** +* @author TW +* @description 针对表【sys_shop(数据中心-店铺)】的数据库操作Service +* @createDate 2024-03-13 17:43:42 +*/ +public interface SysShopService extends IService { + SysShop selectShopById(Integer shopId); + + void updateSessionKey(Integer shopId,String sessionKey); +} diff --git a/pdd-api/src/main/java/com/qihang/pdd/service/a.java b/pdd-api/src/main/java/com/qihang/pdd/service/a.java deleted file mode 100644 index bd940146..00000000 --- a/pdd-api/src/main/java/com/qihang/pdd/service/a.java +++ /dev/null @@ -1,4 +0,0 @@ -package com.qihang.pdd.service; - -public class a { -} diff --git a/pdd-api/src/main/java/com/qihang/pdd/service/impl/SysPlatformServiceImpl.java b/pdd-api/src/main/java/com/qihang/pdd/service/impl/SysPlatformServiceImpl.java new file mode 100644 index 00000000..8f2c904e --- /dev/null +++ b/pdd-api/src/main/java/com/qihang/pdd/service/impl/SysPlatformServiceImpl.java @@ -0,0 +1,22 @@ +package com.qihang.pdd.service.impl; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.qihang.pdd.domain.SysPlatform; +import com.qihang.pdd.service.SysPlatformService; +import com.qihang.pdd.mapper.SysPlatformMapper; +import org.springframework.stereotype.Service; + +/** +* @author TW +* @description 针对表【sys_platform】的数据库操作Service实现 +* @createDate 2024-03-13 17:43:42 +*/ +@Service +public class SysPlatformServiceImpl extends ServiceImpl + implements SysPlatformService{ + +} + + + + diff --git a/pdd-api/src/main/java/com/qihang/pdd/service/impl/SysShopPullLasttimeServiceImpl.java b/pdd-api/src/main/java/com/qihang/pdd/service/impl/SysShopPullLasttimeServiceImpl.java new file mode 100644 index 00000000..7b4db53e --- /dev/null +++ b/pdd-api/src/main/java/com/qihang/pdd/service/impl/SysShopPullLasttimeServiceImpl.java @@ -0,0 +1,22 @@ +package com.qihang.pdd.service.impl; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.qihang.pdd.domain.SysShopPullLasttime; +import com.qihang.pdd.service.SysShopPullLasttimeService; +import com.qihang.pdd.mapper.SysShopPullLasttimeMapper; +import org.springframework.stereotype.Service; + +/** +* @author TW +* @description 针对表【sys_shop_pull_lasttime(店铺更新最后时间记录)】的数据库操作Service实现 +* @createDate 2024-03-13 17:43:42 +*/ +@Service +public class SysShopPullLasttimeServiceImpl extends ServiceImpl + implements SysShopPullLasttimeService{ + +} + + + + diff --git a/pdd-api/src/main/java/com/qihang/pdd/service/impl/SysShopPullLogsServiceImpl.java b/pdd-api/src/main/java/com/qihang/pdd/service/impl/SysShopPullLogsServiceImpl.java new file mode 100644 index 00000000..7c2a7f19 --- /dev/null +++ b/pdd-api/src/main/java/com/qihang/pdd/service/impl/SysShopPullLogsServiceImpl.java @@ -0,0 +1,22 @@ +package com.qihang.pdd.service.impl; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.qihang.pdd.domain.SysShopPullLogs; +import com.qihang.pdd.service.SysShopPullLogsService; +import com.qihang.pdd.mapper.SysShopPullLogsMapper; +import org.springframework.stereotype.Service; + +/** +* @author TW +* @description 针对表【sys_shop_pull_logs(更新日志表)】的数据库操作Service实现 +* @createDate 2024-03-13 17:43:42 +*/ +@Service +public class SysShopPullLogsServiceImpl extends ServiceImpl + implements SysShopPullLogsService{ + +} + + + + diff --git a/pdd-api/src/main/java/com/qihang/pdd/service/impl/SysShopServiceImpl.java b/pdd-api/src/main/java/com/qihang/pdd/service/impl/SysShopServiceImpl.java new file mode 100644 index 00000000..7082c218 --- /dev/null +++ b/pdd-api/src/main/java/com/qihang/pdd/service/impl/SysShopServiceImpl.java @@ -0,0 +1,37 @@ +package com.qihang.pdd.service.impl; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.qihang.pdd.domain.SysShop; +import com.qihang.pdd.service.SysShopService; +import com.qihang.pdd.mapper.SysShopMapper; +import lombok.AllArgsConstructor; +import org.springframework.stereotype.Service; + +/** +* @author TW +* @description 针对表【sys_shop(数据中心-店铺)】的数据库操作Service实现 +* @createDate 2024-03-13 17:43:42 +*/ +@AllArgsConstructor +@Service +public class SysShopServiceImpl extends ServiceImpl + implements SysShopService{ + + private SysShopMapper mapper; + @Override + public SysShop selectShopById(Integer shopId) { + return mapper.selectById(shopId); + } + + @Override + public void updateSessionKey(Integer shopId, String sessionKey) { + SysShop shop = new SysShop(); + shop.setId(shopId); + shop.setAccessToken(sessionKey); + mapper.updateById(shop); + } +} + + + + diff --git a/pdd-api/src/main/resources/mapper/SysPlatformMapper.xml b/pdd-api/src/main/resources/mapper/SysPlatformMapper.xml new file mode 100644 index 00000000..cdc8d21f --- /dev/null +++ b/pdd-api/src/main/resources/mapper/SysPlatformMapper.xml @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + id,name,code, + app_key,app_secret,redirect_uri, + server_url + + diff --git a/pdd-api/src/main/resources/mapper/SysShopMapper.xml b/pdd-api/src/main/resources/mapper/SysShopMapper.xml new file mode 100644 index 00000000..b5cc0eb5 --- /dev/null +++ b/pdd-api/src/main/resources/mapper/SysShopMapper.xml @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + id,name,type, + url,sort,status, + modify_on,remark,seller_id, + app_key,app_sercet,access_token, + expires_in,access_token_begin,refresh_token, + refresh_token_timeout,api_request_url + + diff --git a/pdd-api/src/main/resources/mapper/SysShopPullLasttimeMapper.xml b/pdd-api/src/main/resources/mapper/SysShopPullLasttimeMapper.xml new file mode 100644 index 00000000..b3f81d39 --- /dev/null +++ b/pdd-api/src/main/resources/mapper/SysShopPullLasttimeMapper.xml @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + id,shop_id,pull_type, + lasttime,create_time,update_time + + diff --git a/pdd-api/src/main/resources/mapper/SysShopPullLogsMapper.xml b/pdd-api/src/main/resources/mapper/SysShopPullLogsMapper.xml new file mode 100644 index 00000000..19494755 --- /dev/null +++ b/pdd-api/src/main/resources/mapper/SysShopPullLogsMapper.xml @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + + + id,shop_id,pull_type, + pull_way,pull_params,pull_result, + pull_time,duration + +