|
|
|
@ -25,6 +25,7 @@ import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
|
import org.springframework.web.bind.annotation.*; |
|
|
|
|
|
|
|
|
|
import javax.annotation.Resource; |
|
|
|
|
import java.math.BigDecimal; |
|
|
|
|
import java.util.*; |
|
|
|
|
import java.util.stream.Collectors; |
|
|
|
|
|
|
|
|
@ -52,12 +53,12 @@ public class CommonController { |
|
|
|
|
@ApiOperation(value = "test") |
|
|
|
|
public ResponseData test() { |
|
|
|
|
try { |
|
|
|
|
/* String goodsDesc = ""; |
|
|
|
|
/* String goodsDesc = ""; |
|
|
|
|
String tranDesc = ""; |
|
|
|
|
String businessType = "HiSen_phg_goods"; |
|
|
|
|
String instCode = "11101608"; |
|
|
|
|
String instCode = "11101667"; |
|
|
|
|
// 工会卡支付
|
|
|
|
|
JSONObject consumption = HuiLianTongUnionCardService.consumption("240803201355633339_1", "8800030115015087807", new BigDecimal("27.40"), businessType, instCode, goodsDesc, tranDesc); |
|
|
|
|
JSONObject consumption = HuiLianTongUnionCardService.consumption("2024122414280943330_01", "8800030115015124584", new BigDecimal("198"), businessType, instCode, goodsDesc, tranDesc); |
|
|
|
|
if (!consumption.getString("respCode").equals("0000")) { |
|
|
|
|
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, consumption.getString("respMessage")); |
|
|
|
|
} |
|
|
|
@ -65,10 +66,9 @@ public class CommonController { |
|
|
|
|
JSONObject consumptionResult = HuiLianTongUnionCardService.resolveResponse(consumption.getString("data")); |
|
|
|
|
if (consumptionResult.getBoolean("success") != true) { |
|
|
|
|
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, consumptionResult.getString("message")); |
|
|
|
|
} |
|
|
|
|
*/ |
|
|
|
|
}*/ |
|
|
|
|
String refundOrderNo = "R" + DateUtil.date2String(new Date(), DateUtil.YMDHMS); |
|
|
|
|
JSONObject refundObj = HuiLianTongUnionCardService.refund(refundOrderNo, "241227092905479836"); |
|
|
|
|
JSONObject refundObj = HuiLianTongUnionCardService.refund(refundOrderNo, "250105112754953629"); |
|
|
|
|
if (!refundObj.getString("respCode").equals("0000")) { |
|
|
|
|
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, refundObj.getString("respMessage")); |
|
|
|
|
} |
|
|
|
|