Commit 50b2df96 by 吕明尚

工具类更改Impl类

parent 720140e5
......@@ -66,47 +66,6 @@
<artifactId>hutool-all</artifactId>
<version>5.8.16</version>
</dependency>
<!--美团SDK引入加相关依赖开始-->
<dependency>
<groupId>MtOpJavaSDK</groupId>
<artifactId>MtOpJavaSDK</artifactId>
<version>1.0</version>
<scope>system</scope>
<systemPath>${project.basedir}/src/lib/MtOpJavaSDK/MtOpJavaSDK-1.0-SNAPSHOT.jar</systemPath>
</dependency>
<dependency>
<groupId>MtOpJavaSDK-sources</groupId>
<artifactId>MtOpJavaSDK-sources</artifactId>
<version>1.0</version>
<scope>system</scope>
<systemPath>${project.basedir}/src/lib/MtOpJavaSDK/MtOpJavaSDK-1.0-SNAPSHOT-sources.jar</systemPath>
</dependency>
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>2.8.9</version>
</dependency>
<dependency>
<groupId>javax.validation</groupId>
<artifactId>validation-api</artifactId>
<version>2.0.1.Final</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-validator</artifactId>
<version>6.1.0.Final</version>
</dependency>
<dependency>
<groupId>org.glassfish</groupId>
<artifactId>javax.el</artifactId>
<version>3.0.1-b11</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>1.7.25</version>
</dependency>
<!--美团SDK引入加相关依赖结束-->
</dependencies>
<build>
......
......@@ -170,3 +170,7 @@ xss:
excludes: /system/notice
# 匹配链接
urlPatterns: /system/*,/monitor/*,/tool/*
meituan:
developerId: 123456
signKey: abcdefghijklmnopqrstuvwxyz
appAuthToken: abcdefghijklmnopqrstuvwxyz
......@@ -58,6 +58,48 @@
<version>0.7</version>
</dependency>
<!--美团SDK引入加相关依赖开始-->
<dependency>
<groupId>MtOpJavaSDK</groupId>
<artifactId>MtOpJavaSDK</artifactId>
<version>1.0</version>
<scope>system</scope>
<systemPath>${project.basedir}/src/lib/MtOpJavaSDK/MtOpJavaSDK-1.0-SNAPSHOT.jar</systemPath>
</dependency>
<dependency>
<groupId>MtOpJavaSDK-sources</groupId>
<artifactId>MtOpJavaSDK-sources</artifactId>
<version>1.0</version>
<scope>system</scope>
<systemPath>${project.basedir}/src/lib/MtOpJavaSDK/MtOpJavaSDK-1.0-SNAPSHOT-sources.jar</systemPath>
</dependency>
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>2.8.9</version>
</dependency>
<dependency>
<groupId>javax.validation</groupId>
<artifactId>validation-api</artifactId>
<version>2.0.1.Final</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-validator</artifactId>
<version>6.1.0.Final</version>
</dependency>
<dependency>
<groupId>org.glassfish</groupId>
<artifactId>javax.el</artifactId>
<version>3.0.1-b11</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>1.7.25</version>
</dependency>
<!--美团SDK引入加相关依赖结束-->
</dependencies>
</project>
\ No newline at end of file
package share.system.service;
public interface MTService {
public String VerificationVouchers(String code, int num);
public String revoke (String ERPId ,String ERPName ,String couponCode);
}
package share.utils;
package share.system.service.impl;
import com.meituan.sdk.DefaultMeituanClient;
import com.meituan.sdk.MeituanClient;
......@@ -11,17 +9,19 @@ import com.meituan.sdk.model.tuangouNg.coupon.couponCancel.CouponCancelResponse;
import com.meituan.sdk.model.tuangouNg.coupon.msSuperConsume.MsSuperConsumeRequest;
import com.meituan.sdk.model.tuangouNg.coupon.msSuperConsume.MsSuperConsumeResponse;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import share.system.service.MTService;
public class MTUtil {
@Value("${meituan.developerId}")
private Long developerId;
@Service
public class MTServiceImpl implements MTService {
@Value("${meituan.signKey}")
private String signKey;
@Value("${meituan.appAuthToken}")
private String appAuthToken;
//执行验券
public String VerificationVouchers(String code, int num){
@Value("${meituan.developerId}")
private Long developerId;
@Override
public String VerificationVouchers(String code, int num) {
//developerId 服务商身份标识 signKey 服务商签名密钥
MeituanClient meituanClient = DefaultMeituanClient.builder(developerId, signKey).build();
MsSuperConsumeRequest msSuperConsumeRequest = new MsSuperConsumeRequest();
......@@ -43,9 +43,10 @@ public class MTUtil {
}
return null;
}
//
public String revoke (String ERPId ,String ERPName ,String couponCode){
MeituanClient meituanClient = DefaultMeituanClient.builder(developerId, signKey).build();
@Override
public String revoke(String ERPId, String ERPName, String couponCode) {
MeituanClient meituanClient = DefaultMeituanClient.builder(developerId,signKey).build();
CouponCancelRequest couponCancelRequest = new CouponCancelRequest();
couponCancelRequest.setEId(ERPId);
couponCancelRequest.setEName(ERPName);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment