| | |
| | | * 开始时间 |
| | | */ |
| | | @TableField("startTime") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date startTime; |
| | | /** |
| | | * 结束时间 |
| | | */ |
| | | @TableField("endTime") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date endTime; |
| | | /** |
| | | * 报名结束时间 |
| | | */ |
| | | @TableField("registerEndTime") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date registerEndTime; |
| | | /** |
| | | * 报名条件(1=全部用户,2=仅限年度会员参与,3=仅限学员参与) |
| | |
| | | * 添加时间 |
| | | */ |
| | | @TableField("insertTime") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date insertTime; |
| | | /** |
| | | * 运营商ID |
| | |
| | | } |
| | | |
| | | |
| | | //分账 |
| | | public void moneyOut(){ |
| | | |
| | | |
| | | |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 根据id获取课程数据 |
| | | * @param id |
| | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.alipay.api.AlipayApiException; |
| | | import com.alipay.api.AlipayClient; |
| | | import com.alipay.api.DefaultAlipayClient; |
| | | import com.alipay.api.domain.*; |
| | | import com.alipay.api.request.AlipayTradeOrderSettleRequest; |
| | | import com.alipay.api.response.AlipayTradeOrderSettleResponse; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | |
| | | @Resource |
| | | private CoursePackageStudentMapper cpsMapper; |
| | | |
| | | |
| | | private String aliAppid = "2021004105665036";//支付宝appid |
| | | |
| | | private String appPrivateKey = "MIIEvwIBADANBgkqhkiG9w0BAQEFAASCBKkwggSlAgEAAoIBAQCi5i9nW/hGLJ3A06cZxTQdviFC7THpdSihoTYGLr9q006hu0V26ecBMY/o4w5bvIX0Ok/yofmZsVcCJpAPvbXL/uqVrIjnRRxXiaeBFThlxoBUTdunvbUSDYfzlEhJr5NvUKI6H6lz2niXlQGx4qy8Hau4ccWit9kM8jwUvsBVQoFgJA+xrjMvooA7YLopQtpOD+UJr5thApTSf1xrnr1W12yolTLEH15JmNV372cqXrYUuqnY0QsaPtxeqJUGAOcGdVLllQ7easEznP8DFBvDdHATcmp2SHNQDUEWN6MCVPbMgY06NQVqAXxqjTAYSVh+6TRu6bofPmpYC3TZB003AgMBAAECggEBAJAcR2+PA3NBYUYHeFrqBRMS8uX8ZR19kjZ7IgoSLTFaQsP9opRylPSPXhrPVBKAE5leRQAHn4MCSlESwHvMfxo7KFjFTFAc6dffZZpipYQUOc9bGampwJh58/3e/pyBgVMG6J23CPf/HJQtNFSkjd/V9+ayb/9l2dUEL3bC0fAZ/dbx8HsxdLw8wn3fLlWLj68hOMqa2deCZe3JdSVsPbeWqkh56FFsMLug0Nd+Ar4TgRl9/jnhXF0JWiD0LmPUYLhboY7EfUBzN4w1iYbDi1P+3zvoOYsiVKAXox9GMhQ2VzOO2UcSTuizSza2e98mGpabl/GpKmCz+RDFjtkX6eECgYEA2MyCij65eO3aGIm3FUe93DULRBYTfX8qJQSJq2WOWA3mmQlEW6L3O2B5/lG2h+8WmN6iLEs9eHpgycGYp7vAqgrANEn16ACVcuyx0scFtrZfZ+kmHMzFfiUWxJjVYk/6YngsGVBLdw6ueM42C8TTP67X9tU5TdVGoGWuqEj4W98CgYEAwFqwprXOch5Pqk/RPbb49r0Ou03K/UbciWnWWKzUhFFNS8MdlQPoDvQZbMwHLeWsa2VhaKITK3x5biLQb3U+0GLOn6lTvEyrEUH+ucREyLgVYTRAvwBPtnvlrzpyxPk2HnslQjju8WrvvLLBMKWUjlTrTOzhaHT21gz3pHMiOakCgYEAhLmfaXdBITGshb054sNLDtdCkGpbgEcrzAHdLps769iGxkYQHXHFngpQZUwtTUcoNGqIKknd1jZFrv7gsD+XkgKG7PwimehRlkwmCX5ilxtLiVgJRzRt6+5U5AMVD90a0tHzXYP0z2yjj73fBJF5KtGl0a10KZxaYrQdm1UhB00CgYBZZgzx/k9rtHC8LAqIj1CYhHejT92G53c6Gkl3vyOqN4sgKhfGmSEySfrDGPRBPZxr8ZtbIPCd5mUdberH0osWGMYFaJI1UsCy7aQwvGpniz7MhZeN7dweaOjwDs8mgtjHQ96mL4XGCDhR0BZ/wIURvZ/6iaGdhbbu9unlsWj3uQKBgQCmZYdsbbZkd3ev6f8rwyvMz+DrCQyYpY44cegBYuJgrZiQnL2fJioeN7ixX0UM48SfwsZEIrzshP/LGAwnc2MdjxKUl4jLN8SEe0NAjXOnz9Zaw740+aOmLpXcLWdP4uM2gIhWsvW1tEkQZCXmm7c9s/RsU8Pmzv+YL3+fSijOzA==";//支付宝开发者应用私钥 |
| | | |
| | | private String alipayPublicKey = "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAouYvZ1v4RiydwNOnGcU0Hb4hQu0x6XUooaE2Bi6/atNOobtFdunnATGP6OMOW7yF9DpP8qH5mbFXAiaQD721y/7qlayI50UcV4mngRU4ZcaAVE3bp721Eg2H85RISa+Tb1CiOh+pc9p4l5UBseKsvB2ruHHForfZDPI8FL7AVUKBYCQPsa4zL6KAO2C6KULaTg/lCa+bYQKU0n9ca569VtdsqJUyxB9eSZjVd+9nKl62FLqp2NELGj7cXqiVBgDnBnVS5ZUO3mrBM5z/AxQbw3RwE3JqdkhzUA1BFjejAlT2zIGNOjUFagF8ao0wGElYfuk0bum6Hz5qWAt02QdNNwIDAQAB";//支付宝应用公钥 |
| | | |
| | | private String alipay_public_key = "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAmu8n/4yTHWbn7VOrNc9OsLtDL1bEQ8gC1dHkj8Wy5z0mkaOsjJRIG/28ze12M0V8jdCKuuDr5Z1OPKiqf+XO3ypguEh+mYUVMBM/cZodDFQfTY1TKLWjvQCuaqlA+QUTCK6f7T7stsgyQ1o9Jj0rXZDz6PM4QHSTzjrLIBaeqM5WIBvH+fy/X+QG5Utd+/UT0kc0JyvuKhZ65yVUd/C9VcwJJAPliRsAQNrqYterwAJ9zvw9tF11wj9W0XgJ8Ccu4x3gR1vrlLRJJo/OA97RmxPQ+5hSacWQZCUd1dwiBq+YCrKVHGTj14izRHXrLc0yBlRXo7tBOIqcy3IsvKVthQIDAQAB";//支付宝支付公钥 |
| | | |
| | | |
| | | @Override |
| | |
| | | coursePackagePayment.setOrderNumber(tradeNo); |
| | | } |
| | | coursePackagePaymentService.updateBatchById(list); |
| | | |
| | | System.out.println("===========到达支付"); |
| | | // 2.0 |
| | | userCouponClient.sendUserCoupon(new SendCouponReq(uid,coursePackagePaymentConfig.getCouponIds())); |
| | | |
| | | |
| | | moneyOut(tradeNo,tradeNo); |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | |
| | | } |
| | | |
| | | |
| | | public void moneyOut(String outNum,String tradeNo) throws AlipayApiException { |
| | | AlipayClient alipayClient = new DefaultAlipayClient("https://openapi.alipay.com/gateway.do", aliAppid, appPrivateKey, "json", "UTF-8", alipay_public_key, "RSA2"); |
| | | AlipayTradeOrderSettleRequest request = new AlipayTradeOrderSettleRequest(); |
| | | AlipayTradeOrderSettleModel model = new AlipayTradeOrderSettleModel(); |
| | | model.setOutRequestNo(outNum); |
| | | model.setTradeNo(tradeNo); |
| | | List<RoyaltyDetailInfos> royaltyDetailInfos = new ArrayList<>(); |
| | | |
| | | |
| | | RoyaltyDetailInfos royaltyDetailInfos1 = new RoyaltyDetailInfos(); |
| | | royaltyDetailInfos1.setTransOutType("userId"); |
| | | royaltyDetailInfos1.setTransOut("2021004105665036"); |
| | | royaltyDetailInfos1.setTransInType("loginName"); |
| | | royaltyDetailInfos1.setTransIn("18398968484"); |
| | | royaltyDetailInfos1.setAmount("0.1"); |
| | | |
| | | |
| | | royaltyDetailInfos.add(royaltyDetailInfos1); |
| | | |
| | | request.setBizModel(model); |
| | | |
| | | |
| | | AlipayTradeOrderSettleResponse response = alipayClient.execute(request); |
| | | if(response.isSuccess()){ |
| | | System.out.println("调用成功"); |
| | | } else { |
| | | System.out.println("调用失败"); |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * 玩湃币支付课程 |
| | | * @param appUser |
| | |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | import lombok.experimental.Accessors; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | |
| | | import java.io.Serializable; |
| | | import java.math.BigDecimal; |
| | |
| | | * 开始时间 |
| | | */ |
| | | @TableField("startTime") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date startTime; |
| | | /** |
| | | * 结束时间 |
| | | */ |
| | | @TableField("endTime") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date endTime; |
| | | /** |
| | | * 报名结束时间 |
| | | */ |
| | | @TableField("registerEndTime") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date registerEndTime; |
| | | /** |
| | | * 报名条件(1=全部用户,2=仅限年度会员参与,3=仅限学员参与) |
| | |
| | | * 添加时间 |
| | | */ |
| | | @TableField("insertTime") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date insertTime; |
| | | |
| | | @TableField(exist = false) |
| | |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.ui.Model; |
| | | import org.springframework.web.bind.annotation.PathVariable; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | |
| | |
| | | } |
| | | |
| | | |
| | | SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); |
| | | SimpleDateFormat format1 = new SimpleDateFormat("yyyy-MM-dd"); |
| | | competition.setStartTime(format1.parse(competition.getSTime())); |
| | | competition.setEndTime(format1.parse(competition.getETime())); |
| | | competition.setRegisterEndTime(format.parse(competition.getREndTime())); |
| | | // SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); |
| | | // SimpleDateFormat format1 = new SimpleDateFormat("yyyy-MM-dd"); |
| | | // competition.setStartTime(format1.parse(competition.getSTime())); |
| | | // competition.setEndTime(format1.parse(competition.getETime())); |
| | | // competition.setRegisterEndTime(format.parse(competition.getREndTime())); |
| | | competitionClient.add(competition); |
| | | return new SuccessTip<>(); |
| | | }catch (Exception e){ |
| | |
| | | {title: '市', field: 'city', visible: true, align: 'center', valign: 'middle'}, |
| | | { title: '门店名称', field: 'store', visible: true, align: 'center', valign: 'middle'}, |
| | | { title: '所属场地', field: 'site', visible: true, align: 'center', valign: 'middle'}, |
| | | { title: '设备ID', field: 'blue', visible: true, align: 'center', valign: 'middle'}, |
| | | { title: '设备类型', field: 'red', visible: true, align: 'center', valign: 'middle'}, |
| | | { title: '设备类型', field: 'red', visible: true, align: 'center', valign: 'middle'}, |
| | | { title: '蓝方设备ID', field: 'blue', visible: true, align: 'center', valign: 'middle'}, |
| | | { title: '红方设备ID', field: 'red', visible: true, align: 'center', valign: 'middle'}, |
| | | { |
| | | title: '设备类型', |
| | | field: 'deviceType', |
| | | visible: true, |
| | | align: 'center', |
| | | valign: 'middle', |
| | | formatter: function(value, row, index) { |
| | | return '智慧球场'; |
| | | } |
| | | }, |
| | | { |
| | | title: '状态', field: 'state', visible: true, align: 'center', valign: 'middle', |
| | | formatter: function(value, row, index) { |
| | |
| | | $('#price > .form-group').each(function (i, e) { |
| | | let classHours = $($(e).find(".classNumber_span input[class='classNumber']")[0]).val(); |
| | | let cash = $($(e).find(".cash_span input[class='cash']")[0]).val(); |
| | | if (typeof cash == "undefined"){ |
| | | console.log("========进入===") |
| | | } |
| | | let paiCoin = $($(e).find(".paiCoin_span input[class='paiCoin']")[0]).val(); |
| | | let counpons = $($(e).find(".counpons")).val(); |
| | | price.push({ |
| | |
| | | Feng.error("授课教师不能为空"); |
| | | return |
| | | } |
| | | // if(null == maxSubscribeNumber || '' == maxSubscribeNumber){ |
| | | // Feng.error("最多预约人数不能为空"); |
| | | // return |
| | | // } |
| | | // if(null == codeTime || '' == codeTime){ |
| | | // Feng.error("扣除课时数不能为空不能为空"); |
| | | // return |
| | | // } |
| | | // if(null == classStartTime || '' == classStartTime){ |
| | | // Feng.error("上课时间不能为空"); |
| | | // return |
| | | // } |
| | | // if(null == classWeeks || '' == classWeeks){ |
| | | // Feng.error("上课时间不能为空"); |
| | | // return |
| | | // } |
| | | |
| | | // if(null == detailDrawing || '' == detailDrawing){ |
| | | // Feng.error("详情页不能为空"); |
| | | // return |
| | | // } |
| | | if (type == 1 ) { |
| | | |
| | | // if(null == validDays || '' == validDays){ |
| | | // Feng.error("课时有效期不能为空"); |
| | | // return |
| | | // } |
| | | var checkboxes1 = document.getElementsByName('payType'); |
| | | var isChecked1 = false; |
| | | |
| | | for (var i = 0; i < checkboxes1.length; i++) { |
| | | if (checkboxes1[i].checked) { |
| | | isChecked1 = true; |
| | | break; |
| | | } |
| | | } |
| | | |
| | | if (isChecked1) { |
| | | console.log("At least one checkbox is selected."); |
| | | } else { |
| | | Feng.error("请选择支付方式") |
| | | return; |
| | | } |
| | | |
| | | |
| | | var checkboxes = document.getElementsByName('payType'); |
| | | var isChecked = false; |
| | | |
| | | for (var i = 0; i < checkboxes.length; i++) { |
| | | if (checkboxes[i].checked && checkboxes[i].value === '1') { |
| | | isChecked = true; |
| | | break; |
| | | } |
| | | } |
| | | |
| | | if (isChecked) { |
| | | console.log("选择了现金"); |
| | | var cashElement = document.querySelector('.cash'); |
| | | var cashValue = cashElement.value.trim(); |
| | | |
| | | if (cashValue === '' || cashValue === undefined) { |
| | | console.log('金额为空或未定义'); |
| | | Feng.error("请输入金额") |
| | | return; |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | if (null == maxSubscribeNumber || '' == maxSubscribeNumber) { |
| | | Feng.error("最多预约人数不能为空"); |
| | | return |
| | | } |
| | | if (null == codeTime || '' == codeTime) { |
| | | Feng.error("扣除课时数不能为空不能为空"); |
| | | return |
| | | } |
| | | if (null == classStartTime || '' == classStartTime) { |
| | | Feng.error("上课时间不能为空"); |
| | | return |
| | | } |
| | | if (null == classWeeks || '' == classWeeks) { |
| | | Feng.error("上课时间不能为空"); |
| | | return |
| | | } |
| | | |
| | | |
| | | |
| | | if (null == validDays || '' == validDays) { |
| | | Feng.error("课时有效期不能为空"); |
| | | return |
| | | } |
| | | } |
| | | classWeeks = classWeeks.substring(0, classWeeks.length - 1); |
| | | |
| | | if(null == coverDrawing || '' == coverDrawing){ |
| | |
| | | let paiCoin = $($(e).find(".paiCoin_span input[class='paiCoin']")[0]).val(); |
| | | let counpons = $($(e).find(".counpons")).val(); |
| | | |
| | | |
| | | |
| | | price.push({ |
| | | classHours: classHours, |
| | | cashPayment: typeof cash == "undefined" ? 0 : cash, |
| | |
| | | ajax.set("cityCode",cCode); |
| | | ajax.set("storeId",shopIdString); |
| | | ajax.set("name",name); |
| | | ajax.set("sTime",startTime); |
| | | ajax.set("eTime",endTime); |
| | | ajax.set("rEndTime",registerEndTime); |
| | | ajax.set("startTime",startTime); |
| | | ajax.set("endTime",endTime); |
| | | ajax.set("registerEndTime",registerEndTime); |
| | | ajax.set("registerCondition",registerCondition); |
| | | ajax.set("startAge",startAge); |
| | | ajax.set("endAge",endAge); |
| | |
| | | String currentTime = appointmentStartTime; |
| | | while (currentTime.compareTo(appointmentEndTime) < 0) { |
| | | String nextTime = getNextTime(currentTime); |
| | | |
| | | |
| | | String timeRange = currentTime + "-" + nextTime; |
| | | QuerySiteTimes orderDto = new QuerySiteTimes(); |
| | | orderDto.setTime(timeRange); |
| | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | //分账 |
| | | // Integer coursePackagePayments = coursePackageClient.queryByCode(outTradeNo); |
| | | // Integer paymentCompetitions = competitionsClient.queryByCode(outTradeNo); |
| | |
| | | // String alipayProportion = operatorUser.getAlipayProportion(); |
| | | // String alipayNum = operatorUser.getAlipayNum(); |
| | | |
| | | ExtendParams extendParams = new ExtendParams(); |
| | | // extendParams.setSysServiceProviderId("YOUR_SERVICE_PROVIDER_ID"); |
| | | ExtendParams extendParams = new ExtendParams(); |
| | | model.setExtendParams(extendParams); |
| | | |
| | | RoyaltyInfo royaltyInfo = new RoyaltyInfo(); |
| | | // royaltyInfo.setRoyaltyType("transfer"); |
| | | |