diff --git a/jsowell-admin/src/test/java/SpringBootTestController.java b/jsowell-admin/src/test/java/SpringBootTestController.java index f1c626c4d..701656d65 100644 --- a/jsowell-admin/src/test/java/SpringBootTestController.java +++ b/jsowell-admin/src/test/java/SpringBootTestController.java @@ -56,6 +56,7 @@ import com.jsowell.pile.mapper.PileBillingTemplateMapper; import com.jsowell.pile.service.*; import com.jsowell.pile.service.programlogic.AbstractProgramLogic; import com.jsowell.pile.service.programlogic.ProgramLogicFactory; +import com.jsowell.pile.thirdparty.CommonParamsDTO; import com.jsowell.pile.transaction.dto.OrderTransactionDTO; import com.jsowell.pile.transaction.service.TransactionService; import com.jsowell.pile.util.SnUtils; @@ -71,12 +72,11 @@ import com.jsowell.service.PileService; import com.jsowell.service.TempService; import com.jsowell.thirdparty.amap.service.AMapService; import com.jsowell.thirdparty.huawei.HuaWeiService; -import com.jsowell.pile.thirdparty.CommonParamsDTO; import com.jsowell.thirdparty.lianlian.service.LianLianService; +import com.jsowell.thirdparty.lutongyunting.service.LTYTService; import com.jsowell.thirdparty.platform.util.Cryptos; import com.jsowell.thirdparty.platform.util.Encodes; import com.jsowell.thirdparty.platform.util.GBSignUtils; -import com.jsowell.thirdparty.lutongyunting.service.LTYTService; import com.jsowell.wxpay.common.WeChatPayParameter; import com.jsowell.wxpay.dto.AppletTemplateMessageSendDTO; import com.jsowell.wxpay.response.WechatPayRefundRequest; @@ -595,14 +595,6 @@ public class SpringBootTestController { return refundList; } - public static void main(String[] args) { - BigDecimal totalAmount = new BigDecimal("0.1"); - List payments = Lists.newArrayList(new BigDecimal("0.97"), new BigDecimal("1.00")); - - List refunds = calculateRefund(totalAmount, payments); - System.out.println("每笔单需要退还的金额: " + refunds); - } - /** * 测试多笔支付情况,解冻部分金额 */ @@ -10028,4 +10020,23 @@ public class SpringBootTestController { adapayService.createSettleAccountRequest(settleAccountDTO, adapayMemberId, wechatAppId); } + public static void main(String[] args) { + String data = "{\"total\":1,\"stationStatusInfo\":{\"operationID\":\"123456789\",\"stationID\":\"111111111111111\",\"connectorStatusInfos\":{\"connectorID\":1,\"equipmentID\":\"10000000000000000000001\",\"status\":4,\"currentA\":0,\"currentB\":0,\"currentC\":0,\"voltageA\":0,\"voltageB\":0,\"voltageC\":0,\"soc\":10}}}"; + String dataSecret = "1234567890abcdef"; + String dataSecretIv = "1234567890abcdef"; + + // 加密数据 + String encryptData = Cryptos.encrypt(JSON.toJSONString(data), dataSecret, dataSecretIv); + String encryptData2 = Cryptos.aesEncrypt(JSON.toJSONString(data), dataSecret, dataSecretIv); + System.out.println(StringUtils.equals(encryptData, encryptData2)); + String str = "il7B0BSEjFdzpyKzfOFpvg/Se1CP802RItKYFPfSLRxJ3jf0bVl9hvYOEktPAYW2nd7S8MBcyHYyacHKbI" + + "Sq5iTmDzG+ivnR+SZJv3USNTYVMz9rCQVSxd0cLlqsJauko79NnwQJbzDTyLooYoIwz75qBOH2/x" + + "OMirpeEqRJrF/EQjWekJmGk9RtboXePu2rka+Xm51syBPhiXJAq0GfbfaFu9tNqs/e2Vjja/ltE1M0lq" + + "vxfXQ6da6HrThsm5id4ClZFIi0acRfrsPLRixS/IQYtksxghvJwbqOsbIsITail9Ayy4tKcogeEZiOO+4Ed2" + + "64NSKmk7l3wKwJLAFjCFogBx8GE3OBz4pqcAn/ydA="; + + System.out.println(StringUtils.equals(encryptData, str)); + System.out.println(StringUtils.equals(encryptData2, str)); + } + } diff --git a/jsowell-ui/.env.staging b/jsowell-ui/.env.staging index 554f41d9a..9d4c40f1c 100644 --- a/jsowell-ui/.env.staging +++ b/jsowell-ui/.env.staging @@ -7,4 +7,4 @@ NODE_ENV = production ENV = 'staging' # 万车充后台管理系统/测试环境 -VUE_APP_BASE_API = '/stage-api' +VUE_APP_BASE_API = '/dev-api'