|
@@ -5,6 +5,7 @@ import com.alibaba.fastjson.JSONObject;
|
|
|
import com.java110.acct.payment.IPaymentBusiness;
|
|
import com.java110.acct.payment.IPaymentBusiness;
|
|
|
import com.java110.core.context.ICmdDataFlowContext;
|
|
import com.java110.core.context.ICmdDataFlowContext;
|
|
|
import com.java110.core.factory.GenerateCodeFactory;
|
|
import com.java110.core.factory.GenerateCodeFactory;
|
|
|
|
|
+import com.java110.doc.annotation.*;
|
|
|
import com.java110.dto.communitySpace.CommunitySpaceDto;
|
|
import com.java110.dto.communitySpace.CommunitySpaceDto;
|
|
|
import com.java110.dto.communitySpacePerson.CommunitySpacePersonDto;
|
|
import com.java110.dto.communitySpacePerson.CommunitySpacePersonDto;
|
|
|
import com.java110.dto.payment.PaymentOrderDto;
|
|
import com.java110.dto.payment.PaymentOrderDto;
|
|
@@ -23,6 +24,50 @@ import org.springframework.stereotype.Service;
|
|
|
import java.math.BigDecimal;
|
|
import java.math.BigDecimal;
|
|
|
import java.util.List;
|
|
import java.util.List;
|
|
|
|
|
|
|
|
|
|
+
|
|
|
|
|
+@Java110CmdDoc(title = "场地预约",
|
|
|
|
|
+ description = "场地预约手机端发起支付",
|
|
|
|
|
+ httpMethod = "post",
|
|
|
|
|
+ url = "http://{ip}:{port}/app/payment.unifiedPayment",
|
|
|
|
|
+ resource = "acctDoc",
|
|
|
|
|
+ author = "吴学文",
|
|
|
|
|
+ serviceCode = "payment.unifiedPayment"
|
|
|
|
|
+)
|
|
|
|
|
+
|
|
|
|
|
+@Java110ParamsDoc(params = {
|
|
|
|
|
+ @Java110ParamDoc(name = "business", length = 64, remark = "支付场景,比如场地预约 为 venueReservation"),
|
|
|
|
|
+ @Java110ParamDoc(name = "payAdapt", length = 64, remark = "支付适配器,非必填"),
|
|
|
|
|
+ @Java110ParamDoc(name = "communityId", length = 30, remark = "小区ID"),
|
|
|
|
|
+ @Java110ParamDoc(name = "tradeType", length = 30, remark = "支付类型 NATIVE JSAPI APP"),
|
|
|
|
|
+ @Java110ParamDoc(name = "personName", length = 30, remark = "预约人"),
|
|
|
|
|
+ @Java110ParamDoc(name = "personTel", length = 30, remark = "预约电话"),
|
|
|
|
|
+ @Java110ParamDoc(name = "appointmentTime", length = 30, remark = "预约时间 YYYY-MM-DD"),
|
|
|
|
|
+ @Java110ParamDoc(name = "payWay", length = 30, remark = "支付方式"),
|
|
|
|
|
+ @Java110ParamDoc(name = "spaces", type = "Array", length = 0, remark = "场地"),
|
|
|
|
|
+ @Java110ParamDoc(parentNodeName = "spaces", name = "spaceId", length = 30, remark = "场地"),
|
|
|
|
|
+ @Java110ParamDoc(parentNodeName = "spaces", name = "openTimes", type = "Array", length = 0, remark = "预约时间"),
|
|
|
|
|
+ @Java110ParamDoc(parentNodeName = "openTimes", name = "hours", length = 10, remark = "预约小时"),
|
|
|
|
|
+
|
|
|
|
|
+})
|
|
|
|
|
+
|
|
|
|
|
+@Java110ResponseDoc(
|
|
|
|
|
+ params = {
|
|
|
|
|
+ @Java110ParamDoc(name = "code", type = "int", length = 11, defaultValue = "0", remark = "返回编号,0 成功 100 成功不需要唤起支付窗口,直接支付成功,可能从账户等做了扣款,其他失败"),
|
|
|
|
|
+ @Java110ParamDoc(name = "msg", type = "String", length = 250, defaultValue = "成功", remark = "描述"),
|
|
|
|
|
+ }
|
|
|
|
|
+)
|
|
|
|
|
+
|
|
|
|
|
+@Java110ExampleDoc(
|
|
|
|
|
+ reqBody = "{ \"business\":\"venueReservation\",\"communityId\":\"123123\",\n" +
|
|
|
|
|
+ " personName:\"张三\",\n" +
|
|
|
|
|
+ " personTel:\"18909711111\",\n" +
|
|
|
|
|
+ " appointmentTime:\"2022-12-12\",\n" +
|
|
|
|
|
+ " payWay:\"2\",\n" +
|
|
|
|
|
+ " communityId:\"123123\", spaces:[{spaceId:'123',openTimes:[{hours:1},{hours:2}]}]\n" +
|
|
|
|
|
+ " }",
|
|
|
|
|
+ resBody = "{'code':0,'msg':'成功'}"
|
|
|
|
|
+)
|
|
|
|
|
+
|
|
|
/**
|
|
/**
|
|
|
* 场地预约
|
|
* 场地预约
|
|
|
*/
|
|
*/
|
|
@@ -42,16 +87,14 @@ public class VenueReservationPaymentBusiness implements IPaymentBusiness {
|
|
|
private ICommunitySpacePersonTimeV1InnerServiceSMO communitySpacePersonTimeV1InnerServiceSMOImpl;
|
|
private ICommunitySpacePersonTimeV1InnerServiceSMO communitySpacePersonTimeV1InnerServiceSMOImpl;
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
- *
|
|
|
|
|
* @param context
|
|
* @param context
|
|
|
- * @param reqJson{
|
|
|
|
|
- * personName:"",
|
|
|
|
|
- * personTel:"",
|
|
|
|
|
- * appointmentTime:"",
|
|
|
|
|
- * payWay:"",
|
|
|
|
|
- * communityId:"",
|
|
|
|
|
- * spaces:[{spaceId:'123',openTimes:[{hours:1},{hours:2}]}]
|
|
|
|
|
- * }
|
|
|
|
|
|
|
+ * @param reqJson{ personName:"",
|
|
|
|
|
+ * personTel:"",
|
|
|
|
|
+ * appointmentTime:"",
|
|
|
|
|
+ * payWay:"",
|
|
|
|
|
+ * communityId:"",
|
|
|
|
|
+ * spaces:[{spaceId:'123',openTimes:[{hours:1},{hours:2}]}]
|
|
|
|
|
+ * }
|
|
|
* @return
|
|
* @return
|
|
|
*/
|
|
*/
|
|
|
@Override
|
|
@Override
|
|
@@ -98,8 +141,8 @@ public class VenueReservationPaymentBusiness implements IPaymentBusiness {
|
|
|
paymentOrderDto.setMoney(money.doubleValue());
|
|
paymentOrderDto.setMoney(money.doubleValue());
|
|
|
paymentOrderDto.setName("预约费用");
|
|
paymentOrderDto.setName("预约费用");
|
|
|
|
|
|
|
|
- reqJson.put("receivableAmount",money.doubleValue());
|
|
|
|
|
- reqJson.put("receivedAmount",money.doubleValue());
|
|
|
|
|
|
|
+ reqJson.put("receivableAmount", money.doubleValue());
|
|
|
|
|
+ reqJson.put("receivedAmount", money.doubleValue());
|
|
|
return paymentOrderDto;
|
|
return paymentOrderDto;
|
|
|
}
|
|
}
|
|
|
|
|
|