dingxin 6 years ago
parent
commit
cfecbde1ff
16 changed files with 425 additions and 9 deletions
  1. 26
    0
      CODE/smart-community/app-api/src/main/java/com/community/huiju/common/perproties/PayNotifyPerproties.java
  2. 6
    2
      CODE/smart-community/app-api/src/main/java/com/community/huiju/service/impl/AliPayServiceImpl.java
  3. 5
    1
      CODE/smart-community/app-api/src/main/java/com/community/huiju/service/impl/WxPayServiceImpl.java
  4. 4
    0
      CODE/smart-community/app-api/src/main/resources/application.yml
  5. 19
    5
      CODE/smart-community/community-common/src/main/java/com/community/commom/fushi/FuShiRequestAPI.java
  6. 5
    0
      CODE/smart-community/community-common/src/main/java/com/community/commom/fushi/FushiConstant.java
  7. 7
    0
      CODE/smart-community/property-api/pom.xml
  8. 91
    0
      CODE/smart-community/property-api/src/main/java/com/community/huiju/aop/LogAOP.java
  9. 12
    0
      CODE/smart-community/property-api/src/main/java/com/community/huiju/controller/FSController.java
  10. 32
    0
      CODE/smart-community/property-api/src/main/java/com/community/huiju/log/LogAnnotation.java
  11. 43
    0
      CODE/smart-community/property-api/src/main/java/com/community/huiju/log/LogEnums.java
  12. 103
    0
      CODE/smart-community/property-api/src/main/java/com/community/huiju/log/LogFactory.java
  13. 46
    0
      CODE/smart-community/property-api/src/main/java/com/community/huiju/log/LogFileManager.java
  14. 6
    0
      CODE/smart-community/property-api/src/main/java/com/community/huiju/service/IFuShiService.java
  15. 17
    0
      CODE/smart-community/property-api/src/main/java/com/community/huiju/service/impl/FuShiServiceImpl.java
  16. 3
    1
      CODE/smart-community/property-api/src/main/resources/bootstrap.yml

+ 26
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/common/perproties/PayNotifyPerproties.java View File

@@ -0,0 +1,26 @@
1
+package com.community.huiju.common.perproties;
2
+
3
+import lombok.Data;
4
+import org.springframework.boot.context.properties.ConfigurationProperties;
5
+import org.springframework.stereotype.Component;
6
+
7
+/**
8
+ * 支付回调地址配置
9
+ * @author weiximei
10
+ */
11
+@Component
12
+@ConfigurationProperties(prefix = "pay-notify")
13
+@Data
14
+public class PayNotifyPerproties {
15
+
16
+    /**
17
+     * 微信回调
18
+     */
19
+    private String wxNotify;
20
+
21
+    /**
22
+     * 支付宝回调
23
+     */
24
+    private String aliNotify;
25
+
26
+}

+ 6
- 2
CODE/smart-community/app-api/src/main/java/com/community/huiju/service/impl/AliPayServiceImpl.java View File

@@ -7,6 +7,7 @@ import com.alipay.api.domain.AlipayTradeAppPayModel;
7 7
 import com.alipay.api.request.AlipayTradeAppPayRequest;
8 8
 import com.alipay.api.response.AlipayTradeAppPayResponse;
9 9
 import com.community.commom.session.UserElement;
10
+import com.community.huiju.common.perproties.PayNotifyPerproties;
10 11
 import com.community.huiju.common.wxpay.HfWxConfig;
11 12
 import com.community.huiju.common.wxpay.WXPay;
12 13
 import com.community.huiju.common.wxpay.WXPayConstants;
@@ -65,7 +66,10 @@ public class AliPayServiceImpl implements AliPayServiceI {
65 66
 	
66 67
 	@Value("${alipay.ALIPAY_PUBLIC_KEY}")
67 68
 	private String ALIPAY_PUBLIC_KEY;
68
-	
69
+
70
+	@Autowired
71
+	private PayNotifyPerproties payNotifyPerproties;
72
+
69 73
 	/**
70 74
 	 * 支付宝统一下单
71 75
 	 *
@@ -101,7 +105,7 @@ public class AliPayServiceImpl implements AliPayServiceI {
101 105
 		model.setTotalAmount(BigDecimal.valueOf(Long.valueOf(payPrice)).divide(new BigDecimal(100)).toString());
102 106
 		model.setProductCode("QUICK_MSECURITY_PAY");
103 107
 		request.setBizModel(model);
104
-		request.setNotifyUrl("http://106.14.20.193:8086/app-api/aliPayNotify");
108
+		request.setNotifyUrl(payNotifyPerproties.getAliNotify());
105 109
 		try {
106 110
 			//这里和普通的接口调用不同,使用的是sdkExecute
107 111
 			AlipayTradeAppPayResponse response = alipayClient.sdkExecute(request);

+ 5
- 1
CODE/smart-community/app-api/src/main/java/com/community/huiju/service/impl/WxPayServiceImpl.java View File

@@ -1,6 +1,7 @@
1 1
 package com.community.huiju.service.impl;
2 2
 
3 3
 import com.community.commom.session.UserElement;
4
+import com.community.huiju.common.perproties.PayNotifyPerproties;
4 5
 import com.community.huiju.common.wxpay.HfWxConfig;
5 6
 import com.community.huiju.common.wxpay.WXPay;
6 7
 import com.community.huiju.common.wxpay.WXPayConstants;
@@ -59,6 +60,9 @@ public class WxPayServiceImpl implements WxPayServiceI {
59 60
 	@Autowired
60 61
 	private TpBuildingOwnerInfoMapper tpBuildingOwnerInfoMapper;
61 62
 
63
+	@Autowired
64
+	private PayNotifyPerproties payNotifyPerproties;
65
+
62 66
 	/**
63 67
 	 * 微信支付统一下单
64 68
 	 *
@@ -99,7 +103,7 @@ public class WxPayServiceImpl implements WxPayServiceI {
99 103
 		//终端IP
100 104
 		data.put("spbill_create_ip", "123.12.12.123");
101 105
 		//回调地址
102
-		data.put("notify_url", "http://106.14.20.193:8086/app-api/wxNotify");
106
+		data.put("notify_url", payNotifyPerproties.getWxNotify());
103 107
 		// 此处指定为APP支付
104 108
 		data.put("trade_type", "APP");
105 109
 		Map<String, String> resp = wxpay.unifiedOrder(data);

+ 4
- 0
CODE/smart-community/app-api/src/main/resources/application.yml View File

@@ -50,3 +50,7 @@ weixin:
50 50
   appid: wx6070fd3e8ef854e4
51 51
   secret: cb07709de2f05b824f1ebda220684d3b
52 52
 
53
+# 支付回调
54
+pay-notify:
55
+  wx-notify: http://ycapi.jcjyhn.com/app-api/wxNotify
56
+  ali-notify: http://ycapi.jcjyhn.com/app-api/aliPayNotify

+ 19
- 5
CODE/smart-community/community-common/src/main/java/com/community/commom/fushi/FuShiRequestAPI.java View File

@@ -70,10 +70,10 @@ public class FuShiRequestAPI {
70 70
      * 获取停车信息(通过车牌号)
71 71
      * @return
72 72
      */
73
-    public String getParkInfoByCarNo(String parkingCode, String carNo) {
73
+    public String getParkInfoByCarNo(String ParkingCode, String CarNo) {
74 74
         Map<String, Object> map = Maps.newHashMap();
75
-        map.put("ParkingCode", parkingCode);
76
-        map.put("CarNo", carNo);
75
+        map.put("ParkingCode", ParkingCode);
76
+        map.put("CarNo", CarNo);
77 77
         String json = JSONObject.toJSONString(map);
78 78
         log.info("获取停车信息(通过车牌号)请求参数:{}", json);
79 79
         SignBuild signBuild = requestSign(json);
@@ -171,8 +171,22 @@ public class FuShiRequestAPI {
171 171
     }
172 172
 
173 173
 
174
-
175
-
174
+    /**
175
+     * 获取线下算费结果
176
+     * @return
177
+     */
178
+    public String apiGetOfflineFee(String ParkingCode, String CarNoOrCardNo) {
179
+        Map<String, Object> map = Maps.newHashMap();
180
+        map.put("ParkingCode", ParkingCode);
181
+        map.put("CarNoOrCardNo", CarNoOrCardNo);
182
+        String json = JSONObject.toJSONString(map);
183
+        log.info("获取线下算费结果 请求参数:{}", json);
184
+        SignBuild signBuild = requestSign(json);
185
+        String result = client.doJsonPost(FushiConstant.CALCULATIONCOST_APIGETOFFLINEFEE, json, signBuild.getSign(), signBuild.getTimestamp());
186
+        showException(result);
187
+        log.info("获取线下算费结果 返回数据:{}", result);
188
+        return result;
189
+    }
176 190
 
177 191
 
178 192
 

+ 5
- 0
CODE/smart-community/community-common/src/main/java/com/community/commom/fushi/FushiConstant.java View File

@@ -21,4 +21,9 @@ public class FushiConstant {
21 21
      */
22 22
     public static final String CALCULATIONCOST_APITHIRDPARTYTEMPORARYCARDPAY = "/CalculationCost/ApiThirdPartyTemporaryCardPay";
23 23
 
24
+    /**
25
+     * 获取线下算费结果
26
+     */
27
+    public static final String CALCULATIONCOST_APIGETOFFLINEFEE = "/CalculationCost/ApiGetOfflineFee";
28
+
24 29
 }

+ 7
- 0
CODE/smart-community/property-api/pom.xml View File

@@ -217,6 +217,13 @@
217 217
 			<version>1.10</version>
218 218
 		</dependency>
219 219
 
220
+		<!-- https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter-aop -->
221
+		<dependency>
222
+			<groupId>org.springframework.boot</groupId>
223
+			<artifactId>spring-boot-starter-aop</artifactId>
224
+			<version>2.0.4.RELEASE</version>
225
+		</dependency>
226
+
220 227
 
221 228
 	</dependencies>
222 229
 

+ 91
- 0
CODE/smart-community/property-api/src/main/java/com/community/huiju/aop/LogAOP.java View File

@@ -0,0 +1,91 @@
1
+package com.community.huiju.aop;
2
+
3
+import com.alibaba.fastjson.JSONObject;
4
+import com.community.commom.fushi.error.FuShiException;
5
+import com.community.huiju.log.LogAnnotation;
6
+import com.community.huiju.log.LogEnums;
7
+import com.community.huiju.log.LogFactory;
8
+import com.community.huiju.log.LogFileManager;
9
+import lombok.extern.slf4j.Slf4j;
10
+import org.aspectj.lang.JoinPoint;
11
+import org.aspectj.lang.ProceedingJoinPoint;
12
+import org.aspectj.lang.Signature;
13
+import org.aspectj.lang.annotation.AfterThrowing;
14
+import org.aspectj.lang.annotation.Around;
15
+import org.aspectj.lang.annotation.Aspect;
16
+import org.aspectj.lang.annotation.Pointcut;
17
+import org.aspectj.lang.reflect.MethodSignature;
18
+import org.springframework.stereotype.Component;
19
+
20
+import java.lang.reflect.Method;
21
+
22
+@Aspect
23
+@Component
24
+@Slf4j
25
+public class LogAOP {
26
+
27
+    @Pointcut("@annotation(com.community.huiju.log.LogAnnotation)")
28
+    public void pointLog() {
29
+
30
+    }
31
+
32
+    @Around("pointLog()")
33
+    public Object logAround(ProceedingJoinPoint point) throws Throwable {
34
+
35
+        // 获取切面的点的实例
36
+        Object target = point.getTarget();
37
+        // 获取反射对象
38
+        Class<?> zClass = target.getClass();
39
+        // 获取切面点
40
+        Signature signature = point.getSignature();
41
+
42
+        // 判断日志注解是否用在方法上
43
+        if (!(signature instanceof MethodSignature)) {
44
+            throw new RuntimeException("该注解只允许在方法上使用!");
45
+        }
46
+
47
+        // 方法名称
48
+        String methodName = signature.getName();
49
+        // 获取方法参数类型
50
+        Class<?>[] parameterTypes = ((MethodSignature) signature).getMethod().getParameterTypes();
51
+
52
+        // 通过方法名称和方法参数类型
53
+        // 获取当前正在执行切面的方法
54
+        Method method = zClass.getMethod(methodName, parameterTypes);
55
+
56
+        // 所有方法输入参数
57
+        Object[] args = point.getArgs();
58
+        // 执行方法的返回值
59
+        Object result = null;
60
+        if (null != method && method.isAnnotationPresent(LogAnnotation.class)) {
61
+
62
+            // 获取这个注解
63
+            LogAnnotation logAnnotation = method.getAnnotation(LogAnnotation.class);
64
+            // 大苏操作
65
+            if (logAnnotation.record() && logAnnotation.value() == LogEnums.DA_SU) {
66
+                String alias = "".equals(logAnnotation.alias()) ? "未设置别名" : logAnnotation.alias();
67
+                    log.info("AOP拦截----大苏操作----执行方法:{},方法别名:{}, 请求参数:{}", methodName, alias,args);
68
+                    // 方法返回值
69
+                    result = point.proceed();
70
+                    log.info("AOP拦截----大苏操作----执行方法:{},方法别名:{},请求参数:{},返回结果:{}", methodName, alias,args, result);
71
+
72
+                    String strPararmeter = String.format( "AOP拦截----大苏操作----执行方法:%s,方法别名:%s,请求参数:%s", methodName, alias,JSONObject.toJSONString(args));
73
+                    String strReturn = String.format("AOP拦截----大苏操作----执行方法:%s,方法别名:%s, 请求参数:%s,返回结果:%s", methodName, alias ,JSONObject.toJSONString(args), JSONObject.toJSONString(result));
74
+
75
+                    LogFileManager.getInstance().executeLog(LogFactory.parametersAndReturn(strPararmeter, strReturn));
76
+
77
+            }
78
+
79
+        }
80
+
81
+        return result;
82
+    }
83
+
84
+    @AfterThrowing(value = "pointLog()", throwing = "cause")
85
+    public void doException(JoinPoint joinPoint, Throwable cause) {
86
+        if (null != cause) {
87
+            throw new FuShiException(cause.getMessage());
88
+        }
89
+    }
90
+
91
+}

+ 12
- 0
CODE/smart-community/property-api/src/main/java/com/community/huiju/controller/FSController.java View File

@@ -81,4 +81,16 @@ public class FSController extends BaseController {
81 81
         return responseBean;
82 82
     }
83 83
 
84
+
85
+    @RequestMapping(value = "/car/apiGetOfflineFee/{carNoOrCardNo}", method = RequestMethod.GET)
86
+    @ApiOperation(value = "获取线下算费结果", notes = "获取线下算费结果")
87
+    @ApiImplicitParams({
88
+        @ApiImplicitParam(paramType = "path", dataTypeClass = String.class, name = "carNoOrCardNo" , value = "车牌号码或卡号")
89
+    })
90
+    public ResponseBean apiGetOfflineFee(@PathVariable("carNoOrCardNo") String carNoOrCardNo) {
91
+        ResponseBean responseBean = new ResponseBean();
92
+        responseBean = iFuShiService.apiGetOfflineFee(carNoOrCardNo);
93
+        return responseBean;
94
+    }
95
+
84 96
 }

+ 32
- 0
CODE/smart-community/property-api/src/main/java/com/community/huiju/log/LogAnnotation.java View File

@@ -0,0 +1,32 @@
1
+package com.community.huiju.log;
2
+
3
+import java.lang.annotation.*;
4
+
5
+/**
6
+ * 日志注解
7
+ * @author weiximei
8
+ */
9
+@Retention(RetentionPolicy.RUNTIME) // 在运行时使用
10
+@Target({ ElementType.METHOD }) // 在方法上使用
11
+@Documented
12
+public @interface LogAnnotation {
13
+
14
+    /**
15
+     * 日志类型
16
+     * @return
17
+     */
18
+    LogEnums value() default LogEnums.NOT;
19
+
20
+    /**
21
+     * 是否记录
22
+     * @return
23
+     */
24
+    boolean record() default true;
25
+
26
+    /**
27
+     * 别名, 作为注释用
28
+     * @return
29
+     */
30
+    String alias() default "";
31
+
32
+}

+ 43
- 0
CODE/smart-community/property-api/src/main/java/com/community/huiju/log/LogEnums.java View File

@@ -0,0 +1,43 @@
1
+package com.community.huiju.log;
2
+
3
+/**
4
+ * 日志类型
5
+ *
6
+ * @author weiximei
7
+ */
8
+public enum LogEnums {
9
+
10
+    NOT(8000, "无类型"),
11
+
12
+    DA_SU(8001, "大苏")
13
+
14
+    ;
15
+
16
+    private Integer code;
17
+
18
+    private String value;
19
+
20
+
21
+    LogEnums(Integer code, String value) {
22
+        this.code = code;
23
+        this.value = value;
24
+    }
25
+
26
+    public Integer getCode() {
27
+        return code;
28
+    }
29
+
30
+    public void setCode(Integer code) {
31
+        this.code = code;
32
+    }
33
+
34
+    public String getValue() {
35
+        return value;
36
+    }
37
+
38
+    public void setValue(String value) {
39
+        this.value = value;
40
+    }
41
+
42
+
43
+}

+ 103
- 0
CODE/smart-community/property-api/src/main/java/com/community/huiju/log/LogFactory.java View File

@@ -0,0 +1,103 @@
1
+package com.community.huiju.log;
2
+
3
+import java.io.File;
4
+import java.io.FileNotFoundException;
5
+import java.io.IOException;
6
+import java.io.RandomAccessFile;
7
+import java.nio.ByteBuffer;
8
+import java.nio.channels.FileChannel;
9
+import java.nio.channels.FileLock;
10
+import java.time.LocalDate;
11
+import java.time.LocalDateTime;
12
+import java.time.format.DateTimeFormatter;
13
+import java.util.TimerTask;
14
+
15
+/**
16
+ * 日志工厂
17
+ * @author weiximei
18
+ */
19
+public class LogFactory {
20
+
21
+    public static File getFile() {
22
+        LocalDate localDate = LocalDate.now();
23
+        String pathMkdir = "";
24
+
25
+        String os = System.getProperty("os.name");
26
+        if(os.toLowerCase().startsWith("win")){
27
+            pathMkdir = "E:" + File.separator + "log" + File.separator + "property-log" + File.separator + localDate.getYear() + "-" + localDate.getMonthValue() + "-" + localDate.getDayOfMonth();
28
+        } else {
29
+            pathMkdir = "/home/fxf/smart-community" + File.separator + "log" + File.separator + "property-log" + File.separator + localDate.getYear() + "-" + localDate.getMonthValue() + "-" + localDate.getDayOfMonth();
30
+        }
31
+
32
+        File file = new File(pathMkdir);
33
+        if (!file.exists()) {
34
+            file.mkdirs();
35
+        }
36
+        file = new File(pathMkdir + File.separator + "app-log.log");
37
+
38
+        return file;
39
+    }
40
+
41
+    /**
42
+     * 记录请求参数和返回值
43
+     * @param parameters
44
+     * @param returnValue
45
+     * @return
46
+     */
47
+    public static TimerTask parametersAndReturn(String parameters, String returnValue){
48
+        return new TimerTask() {
49
+            @Override
50
+            public void run() {
51
+
52
+                RandomAccessFile accessFile = null;
53
+                FileChannel fileChannel = null;
54
+                FileLock fileLock = null;
55
+                try {
56
+                    // 获取这个文件的读和写的权限
57
+                    accessFile = new RandomAccessFile(getFile(), "rw");
58
+                    // 文件通道
59
+                    fileChannel = accessFile.getChannel();
60
+                    fileLock = null;
61
+                    while (true) {
62
+                        try {
63
+                            // 获取锁,如果失败,继续尝试
64
+                            fileLock = fileChannel.tryLock();
65
+                            break;
66
+                        } catch (Exception e) {
67
+                            Thread.sleep(100);
68
+                        }
69
+                    }
70
+
71
+                    // 获取当前这个文件的大小
72
+                    long length = accessFile.length();
73
+                    // 设置写入的指针, 设置到这个文件的末尾
74
+                    accessFile.seek(length);
75
+                    // 开始写入文件
76
+                    LocalDateTime localDateTime = LocalDateTime.now();
77
+                    DateTimeFormatter dateTimeFormatter = DateTimeFormatter.ofPattern("yyyy-MM-dd hh:mm:ss");
78
+                    String str = dateTimeFormatter.format(localDateTime) + " === " + Thread.currentThread().getName() + "  : " + parameters + "\n";
79
+                    fileChannel.write(ByteBuffer.wrap(str.getBytes()));
80
+                    str = dateTimeFormatter.format(localDateTime) + " === " + Thread.currentThread().getName() + "  : " + returnValue + "\n";
81
+                    fileChannel.write(ByteBuffer.wrap(str.getBytes()));
82
+
83
+                } catch (Exception e) {
84
+                    e.printStackTrace();
85
+                } finally {
86
+                    if (fileLock != null && fileChannel != null && accessFile != null) {
87
+                        // 释放锁
88
+                        try {
89
+                            fileLock.release();
90
+                            fileChannel.close();
91
+                            accessFile.close();
92
+                        } catch (Exception e) {
93
+                            e.printStackTrace();
94
+                        }
95
+                    }
96
+                }
97
+
98
+
99
+            }
100
+        };
101
+    }
102
+
103
+}

+ 46
- 0
CODE/smart-community/property-api/src/main/java/com/community/huiju/log/LogFileManager.java View File

@@ -0,0 +1,46 @@
1
+package com.community.huiju.log;
2
+
3
+import java.util.TimerTask;
4
+import java.util.concurrent.ScheduledThreadPoolExecutor;
5
+
6
+/**
7
+ * 日志文件记录
8
+ * @author weiximei
9
+ */
10
+public class LogFileManager {
11
+
12
+    // 记录日志的线程池
13
+    private ScheduledThreadPoolExecutor scheduledThreadPoolExecutor = new ScheduledThreadPoolExecutor(10);
14
+
15
+    private LogFileManager() {}
16
+
17
+    public static LogFileManager getInstance() {
18
+        return LogSingleton.INSTANCE.getInstance();
19
+    }
20
+
21
+    /**
22
+     * 记录日志
23
+     * @param timerTask 任务
24
+     */
25
+    public void executeLog(TimerTask timerTask){
26
+        // 日志记录
27
+        scheduledThreadPoolExecutor.execute(timerTask);
28
+    }
29
+
30
+    /**
31
+     * 枚举
32
+     */
33
+    private static enum LogSingleton {
34
+        INSTANCE;
35
+
36
+        private LogFileManager logFileManager;
37
+        private LogSingleton() {
38
+            logFileManager = new LogFileManager();
39
+        }
40
+
41
+        public LogFileManager getInstance() {
42
+            return logFileManager;
43
+        }
44
+
45
+    }
46
+}

+ 6
- 0
CODE/smart-community/property-api/src/main/java/com/community/huiju/service/IFuShiService.java View File

@@ -54,4 +54,10 @@ public interface IFuShiService {
54 54
      */
55 55
     ResponseBean apiThirdPartyTemporaryCardPay(String Amount, String ActualAmount, String DeductionAmount, String Reason, String PayStyle, String CarNo, String CardNo,  String CouponList);
56 56
 
57
+    /**
58
+     * 获取线下算费结果
59
+     * @param CarNoOrCardNo 车牌号码或卡号
60
+     * @return
61
+     */
62
+    ResponseBean apiGetOfflineFee(String CarNoOrCardNo);
57 63
 }

+ 17
- 0
CODE/smart-community/property-api/src/main/java/com/community/huiju/service/impl/FuShiServiceImpl.java View File

@@ -4,6 +4,8 @@ import com.alibaba.fastjson.JSONObject;
4 4
 import com.community.commom.fushi.FuShiRequestAPI;
5 5
 import com.community.commom.mode.ResponseBean;
6 6
 import com.community.commom.uuid.IdGen;
7
+import com.community.huiju.log.LogAnnotation;
8
+import com.community.huiju.log.LogEnums;
7 9
 import com.community.huiju.common.perproties.FuShiProperties;
8 10
 import com.community.huiju.service.IFuShiService;
9 11
 import com.google.common.collect.Maps;
@@ -45,6 +47,7 @@ public class FuShiServiceImpl implements IFuShiService {
45 47
         return map;
46 48
     }
47 49
 
50
+    @LogAnnotation(value = LogEnums.DA_SU, alias = "获取停车信息(通过车牌号)")
48 51
     @Override
49 52
     public ResponseBean getParkInfoByCarNo(String carNo) {
50 53
         ResponseBean responseBean = new ResponseBean();
@@ -54,6 +57,7 @@ public class FuShiServiceImpl implements IFuShiService {
54 57
         return responseBean;
55 58
     }
56 59
 
60
+    @LogAnnotation(value = LogEnums.DA_SU, alias = "第三方月卡上发续费")
57 61
     @Override
58 62
     public ResponseBean apiThirdPartyMonthCardPay(String Phone, String RenewDayType, String RenewDay, String PayStyle, String CarNo, String CardNo,String RechargeAmt) {
59 63
         ResponseBean responseBean = new ResponseBean();
@@ -94,6 +98,7 @@ public class FuShiServiceImpl implements IFuShiService {
94 98
      *
95 99
      * @return
96 100
      */
101
+    @LogAnnotation(value = LogEnums.DA_SU, alias = "第三方临时卡上发缴费")
97 102
     @Override
98 103
     public ResponseBean apiThirdPartyTemporaryCardPay(String Amount, String ActualAmount, String DeductionAmount, String Reason, String PayStyle, String CarNo, String CardNo, String CouponList) {
99 104
         ResponseBean responseBean = new ResponseBean();
@@ -106,4 +111,16 @@ public class FuShiServiceImpl implements IFuShiService {
106 111
         responseBean.addSuccess(map);
107 112
         return responseBean;
108 113
     }
114
+
115
+    @LogAnnotation(value = LogEnums.DA_SU, alias = "获取线下算费结果")
116
+    @Override
117
+    public ResponseBean apiGetOfflineFee(String CarNoOrCardNo) {
118
+        ResponseBean responseBean = new ResponseBean();
119
+        String apiGetOfflineFee = fuShiRequestAPI.apiGetOfflineFee(fuShiProperties.getParkingCode(), CarNoOrCardNo);
120
+        String result = JSONObject.parseObject(apiGetOfflineFee).getString("Result");
121
+        Map<String, Object> map = Maps.newHashMap();
122
+        map.put("Result", result);
123
+        responseBean.addSuccess(map);
124
+        return responseBean;
125
+    }
109 126
 }

+ 3
- 1
CODE/smart-community/property-api/src/main/resources/bootstrap.yml View File

@@ -18,7 +18,9 @@ spring:
18 18
       multipart:
19 19
         max-file-size: 10MB
20 20
         max-request-size: 100MB
21
-
21
+  aop:
22
+    auto: true
23
+    proxy-target-class: true
22 24
 eureka:
23 25
   client:
24 26
     service-url: