diff --git a/src/main/java/io/v/nutz/zhgh/memberCost/controller/MemberPaymentMineController.java b/src/main/java/io/v/nutz/zhgh/memberCost/controller/MemberPaymentMineController.java index eccff62..3e46303 100644 --- a/src/main/java/io/v/nutz/zhgh/memberCost/controller/MemberPaymentMineController.java +++ b/src/main/java/io/v/nutz/zhgh/memberCost/controller/MemberPaymentMineController.java @@ -1,12 +1,22 @@ package io.v.nutz.zhgh.memberCost.controller; +import cn.hutool.core.util.ObjectUtil; +import cn.hutool.core.util.StrUtil; +import cn.wizzer.framework.base.Result; import com.ijpay.wxpay.model.v3.Amount; import io.v.nutz.base.annontation.RepeatSubmit; +import io.v.nutz.base.annontation.ViReturn; import io.v.nutz.base.payment.wxpay.service.WxPayCommonService; import io.v.nutz.base.payment.wxpay.vo.WxPayNeedParamVo; +import io.v.nutz.base.query.PageForm; +import io.v.nutz.web.commons.utils.ShiroUtil; +import io.v.nutz.zhgh.memberCost.model.MemberPaymentInfo; import io.v.nutz.zhgh.memberCost.service.MemberPaymentService; import lombok.extern.slf4j.Slf4j; import org.apache.shiro.authz.annotation.RequiresPermissions; +import org.nutz.dao.Cnd; +import org.nutz.dao.Sqls; +import org.nutz.dao.sql.Sql; import org.nutz.ioc.loader.annotation.Inject; import org.nutz.ioc.loader.annotation.IocBean; import org.nutz.mvc.annotation.At; @@ -38,18 +48,60 @@ public class MemberPaymentMineController { @At - public Object pageData(){ - return null; + @ViReturn + @RequiresPermissions("member.payment.mine") + public Object pageData(PageForm pageForm, Integer year, Integer isPay) { + Sql sql = Sqls.create(""" + SELECT + + mpp.`year`, + mpp.projectName, + mpp.startTime, + mpp.endTime, + mpi.id, + mpi.payId, + mpi.isPayment, + mpi.payPersonnel, + mpi.personType, + mpi.paymentMonth, + mpc.paymentStartMonth, + mpc.paymentEndMonth, + mpc.payStandards + FROM + `member_payment_info` mpi + LEFT JOIN member_payment_project mpp ON mpi.paymentProjectId = mpp.id + LEFT JOIN member_payment_config mpc ON mpc.id = mpp.configId + $condition + """); + Cnd cnd = Cnd.NEW(); + cnd.andEX("YEAR(mpp.createTime)", "=", year); + cnd.andEX("mpi.userId", "=", ShiroUtil.getUserId()); + cnd.andEX("mpp.isDisabled", "=", 0); + if (ObjectUtil.isNotNull(isPay)) { + cnd.and("mpi.isPayment", "=", isPay); + } + sql.setCondition(cnd); + return memberPaymentService.listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sql); } @At @RepeatSubmit - public Object pcOrderPay(){ + @RequiresPermissions("member.payment.mine") + public Object pcOrderPay(Integer paymentMoney) { WxPayNeedParamVo paramVo = new WxPayNeedParamVo(); paramVo.setDescription("会费缴纳支付"); paramVo.setAttach(""); - paramVo.setAmount(new Amount().setTotal(1)); + paramVo.setAmount(new Amount().setTotal(paymentMoney)); return wxPayCommonService.nativePay(paramVo); } + + + @At + @RequiresPermissions("member.payment.mine") + public Object getIsPay(String paymentInfoId) { + MemberPaymentInfo info = memberPaymentService.dao().fetch(MemberPaymentInfo.class, + Cnd.where("id", "=", paymentInfoId).and("isPayment", "=", 1)); + return Result.success(info); + } } diff --git a/src/main/resources/static/assets/mobile/svg/memberPay/pcPaySuccess.svg b/src/main/resources/static/assets/mobile/svg/memberPay/pcPaySuccess.svg new file mode 100644 index 0000000..57ee4a3 --- /dev/null +++ b/src/main/resources/static/assets/mobile/svg/memberPay/pcPaySuccess.svg @@ -0,0 +1 @@ + diff --git a/src/main/resources/static/assets/mobile/svg/memberPay/wx_img.png b/src/main/resources/static/assets/mobile/svg/memberPay/wx_img.png new file mode 100644 index 0000000..dd3d9e2 Binary files /dev/null and b/src/main/resources/static/assets/mobile/svg/memberPay/wx_img.png differ diff --git a/src/main/resources/views/platform/membercost/mine/index.html b/src/main/resources/views/platform/membercost/mine/index.html index f8f080a..21a7412 100644 --- a/src/main/resources/views/platform/membercost/mine/index.html +++ b/src/main/resources/views/platform/membercost/mine/index.html @@ -1,15 +1,310 @@ -
+ +
+ + + + + + + + + + + + +
+ +
{{formData.paymentStartMonth}}至{{formData.paymentEndMonth}}
+
+ +
+ ( + + ) * 0.5% * {{formData.paymentMonth}}个月 +
+
固定金额缴费
+
+ +
+ + +
+ +
¥ {{formData.paymentMoney}}
+
+
+ +
+ + {{formData.tradingOrderNo}} + + +
¥ {{formData.paymentMoney}}
+
+
+ + +
+
+ + 请打开手机微信,扫一扫完成支付 +
+
+ +
+ +
+
+
+
+
+
+ +
+
+ +
+
支付成功!
+
+ + {{viewInfo.tradingOrderNo}} + + +
¥ {{viewInfo.paymentMoney}}
+
+ +
+
+
+ + 关 闭 + 下一步 + +
+
+ +