| | |
| | | } |
| | | |
| | | @ResponseBody |
| | | @RequestMapping("/finance/vipPayment") |
| | | @PostMapping("/finance/vipPayment") |
| | | List<VipPaymentListVO> vipPayment(@RequestBody VipPaymentDto vipPaymentDto){ |
| | | List<VipPaymentListVO> vipPaymentListVOS = new ArrayList<>(); |
| | | |
| | | List<Integer> payStatus = new ArrayList<>(); |
| | | payStatus.add(2); |
| | | LambdaQueryWrapper<VipPayment> vipPaymentLambdaQueryWrapper = new LambdaQueryWrapper<>(); |
| | | vipPaymentLambdaQueryWrapper.in(!vipPaymentDto.getUserIds().isEmpty(),VipPayment::getAppUserId, vipPaymentDto.getUserIds()); |
| | | vipPaymentLambdaQueryWrapper.in(!vipPaymentDto.getVipIds().isEmpty(),VipPayment::getVipId, vipPaymentDto.getVipIds()); |
| | | vipPaymentLambdaQueryWrapper.in(vipPaymentDto.getUserIds()!=null&&!vipPaymentDto.getUserIds().isEmpty(),VipPayment::getAppUserId, vipPaymentDto.getUserIds()); |
| | | vipPaymentLambdaQueryWrapper.in(vipPaymentDto.getVipIds()!=null&&!vipPaymentDto.getVipIds().isEmpty(),VipPayment::getVipId, vipPaymentDto.getVipIds()); |
| | | vipPaymentLambdaQueryWrapper.in(VipPayment::getPayStatus,payStatus); |
| | | vipPaymentLambdaQueryWrapper.ge(StringUtils.hasLength(vipPaymentDto.getStartTime()), VipPayment::getInsertTime, vipPaymentDto.getStartTime()); |
| | | vipPaymentLambdaQueryWrapper.le(StringUtils.hasLength(vipPaymentDto.getEndTime()), VipPayment::getInsertTime, vipPaymentDto.getEndTime()); |
| | |
| | | // 使用 Stream + 手动拷贝提升性能和可读性(或使用 MapStruct) |
| | | vipPaymentListVOS = list.stream().map(vipDetail -> { |
| | | VipPaymentListVO vo = new VipPaymentListVO(); |
| | | BeanUtils.copyProperties(vo, vipDetail); // 注意参数顺序是否正确 |
| | | BeanUtils.copyProperties(vipDetail,vo); // 注意参数顺序是否正确 |
| | | return vo; |
| | | }).collect(Collectors.toList()); |
| | | for (VipPaymentListVO vipPaymentListVO : vipPaymentListVOS) { |
| | |
| | | @ApiModelProperty(value = "金额¥") |
| | | private String amountValue; |
| | | @ApiModelProperty(value = "金额") |
| | | private BigDecimal amount; |
| | | private Double amount; |
| | | @ApiModelProperty(value = "下单时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date insertTime; |
| | |
| | | @ApiModelProperty(value = "现金") |
| | | private BigDecimal cash; |
| | | |
| | | @ApiModelProperty(value = "兑换方式(1=积分,2=积分+现金 3=现金 4=会员赠送 当该字段为4时 展示的二维码内容增加一个vipDetail:当前数据id)") |
| | | @ApiModelProperty(value = "兑换方式(1=积分,2=积分+现金 3=现金 4=会员赠送 当该字段为4时切goodType=3门票时 展示的二维码内容增加一个vipDetail:当前数据id)") |
| | | private Integer exchangeType; |
| | | |
| | | @ApiModelProperty(value = "有效期开始时间") |
| | |
| | | |
| | | private String key = "6f5e0c2dcabfa9c27b5da5836a362fef";//微信商户号 |
| | | |
| | | private String callbackPath = "https://online.daowepark.com:443/account";//支付回调网关地址 |
| | | // private String callbackPath = "https://online.daowepark.com:443/account";//支付回调网关地址 |
| | | private String callbackPath = "https://y6cgd7wo3ooa.guyubao.com/account";//支付回调网关地址 |
| | | |
| | | private String app_cert_path = "C:/cert/alipay/user/app_cert_path.crt";//应用公钥证书路径 |
| | | |
| | |
| | | |
| | | @Resource |
| | | private StudentClient studentClient; |
| | | @Resource |
| | | private PointsMerchandiseService pointsMerchandiseService; |
| | | |
| | | |
| | | |
| | |
| | | @PostMapping("/base/coupon/vipDetail") |
| | | @ResponseBody |
| | | List<VipDetailVO> vipDetail(@RequestBody VipDetailDto vipDetailDto){ |
| | | List<PointsMerchandise> pointsMerchandiseList = pointsMerchandiseService.list(); |
| | | List<VipDetailVO> vipDetailVOS = new ArrayList<>(); |
| | | List<VipDetail> list = vipDetailService.lambdaQuery() |
| | | .in(!vipDetailDto.getVipIds().isEmpty(), VipDetail::getVipId, vipDetailDto.getVipIds()) |
| | | .in(!vipDetailDto.getUserIds().isEmpty(), VipDetail::getAppUserId, vipDetailDto.getUserIds()) |
| | | .in(!vipDetailDto.getStoreIds().isEmpty(), VipDetail::getUseStoreId, vipDetailDto.getStoreIds()) |
| | | .in(vipDetailDto.getVipIds()!=null&&!vipDetailDto.getVipIds().isEmpty(), VipDetail::getVipId, vipDetailDto.getVipIds()) |
| | | .in(vipDetailDto.getUserIds()!=null&&!vipDetailDto.getUserIds().isEmpty(), VipDetail::getAppUserId, vipDetailDto.getUserIds()) |
| | | .in(vipDetailDto.getStoreIds()!=null&&!vipDetailDto.getStoreIds().isEmpty(), VipDetail::getUseStoreId, vipDetailDto.getStoreIds()) |
| | | .ge(StringUtils.hasLength(vipDetailDto.getStartTime()), VipDetail::getInsertTime, vipDetailDto.getStartTime()) |
| | | .le(StringUtils.hasLength(vipDetailDto.getEndTime()), VipDetail::getInsertTime, vipDetailDto.getEndTime()) |
| | | .ge(StringUtils.hasLength(vipDetailDto.getUseStartTime()), VipDetail::getUseTime, vipDetailDto.getUseStartTime()) |
| | |
| | | if (coupon!=null){ |
| | | vipDetailVO.setTicketName(coupon.getName()); |
| | | vipDetailVO.setGoodsName(coupon.getName()); |
| | | if (coupon.getType()==4){ |
| | | // 查询抵扣商品 |
| | | PointsMerchandise pointsMerchandise1 = pointsMerchandiseList.stream().filter(pointsMerchandise -> pointsMerchandise.getId().equals(coupon.getGoodsId())) |
| | | .findFirst().orElse(null); |
| | | if (pointsMerchandise1 != null){ |
| | | vipDetailVO.setGoodsName(pointsMerchandise1.getName()); |
| | | } |
| | | } |
| | | } |
| | | |
| | | } |
| | | } |
| | | return vipDetailVOS; |
| | |
| | | package com.dsh.activity.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import io.swagger.annotations.ApiModel; |
| | |
| | | private Integer id; |
| | | |
| | | @ApiModelProperty(value = "用户id") |
| | | @TableField("appUserId") |
| | | private Integer appUserId; |
| | | |
| | | @ApiModelProperty(value = "使用状态 1待使用 2已使用 3已过期") |
| | | |
| | | private Integer status; |
| | | |
| | | @ApiModelProperty(value = "获取时间") |
| | | @TableField("insertTime") |
| | | |
| | | private Date insertTime; |
| | | |
| | | @ApiModelProperty(value = "会员id") |
| | | @TableField("vipId") |
| | | |
| | | private Integer vipId; |
| | | |
| | | @ApiModelProperty(value = "会员权益类型 1优惠券 2门票") |
| | | private Integer type; |
| | | |
| | | @ApiModelProperty(value = "会员支付记录id") |
| | | @TableField("vipPaymentId") |
| | | private Integer vipPaymentId; |
| | | |
| | | @ApiModelProperty(value = "优惠券id") |
| | | @TableField("couponId") |
| | | |
| | | private Integer couponId; |
| | | |
| | | @ApiModelProperty(value = "门票名称") |
| | | @TableField("ticketName") |
| | | |
| | | private String ticketName; |
| | | |
| | | @ApiModelProperty(value = "开始时间") |
| | | @TableField("startTime") |
| | | |
| | | private Date startTime; |
| | | |
| | | @ApiModelProperty(value = "结束时间") |
| | | @TableField("endTime") |
| | | |
| | | private Date endTime; |
| | | |
| | | @ApiModelProperty(value = "可用次数") |
| | | @TableField("useCount") |
| | | |
| | | private Integer useCount; |
| | | |
| | | @ApiModelProperty(value = "使用门店id") |
| | | @TableField("useStoreId") |
| | | |
| | | private Integer useStoreId; |
| | | |
| | | @ApiModelProperty(value = "使用场地id") |
| | | @TableField("useSiteId") |
| | | |
| | | private Integer useSiteId; |
| | | @ApiModelProperty(value = "使用商品id") |
| | | private Integer useGoodsId; |
| | | |
| | | @ApiModelProperty(value = "使用时间") |
| | | @TableField("useTime") |
| | | |
| | | private Date useTime; |
| | | |
| | | @ApiModelProperty(value = "运营商id") |
| | | @TableField("operatorId") |
| | | |
| | | private Integer operatorId; |
| | | |
| | | @ApiModelProperty(value = "用户优惠券id") |
| | | @TableField("userCouponId") |
| | | |
| | | private Long userCouponId; |
| | | } |
| | |
| | | @ApiModelProperty(value = "使用场地id") |
| | | private Integer useSiteId; |
| | | |
| | | @ApiModelProperty(value = "使用商品id") |
| | | private Integer useGoodsId; |
| | | |
| | | @ApiModelProperty(value = "使用商品/场地名称") |
| | | private String goodsName; |
| | | |
| | |
| | | import com.dsh.guns.modular.system.model.dto.VipRefundDto; |
| | | import com.dsh.guns.modular.system.model.vo.VipPaymentListVO; |
| | | import org.springframework.cloud.openfeign.FeignClient; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | |
| | |
| | | */ |
| | | @RequestMapping("/finance/vipPaymentList") |
| | | List<VipPayment> registrationList(@RequestBody IncomeQuery query); |
| | | @RequestMapping("/finance/vipPayment") |
| | | @PostMapping("/finance/vipPayment") |
| | | List<VipPaymentListVO> vipPayment(@RequestBody VipPaymentDto vipPaymentDto); |
| | | @RequestMapping("/finance/refund") |
| | | String refund(@RequestBody VipRefundDto vipRefundDto); |
| | |
| | | @ApiModelProperty(value = "使用场地id") |
| | | private Integer useSiteId; |
| | | |
| | | @ApiModelProperty(value = "使用商品id") |
| | | private Integer useGoodsId; |
| | | |
| | | @ApiModelProperty(value = "使用商品/场地名称") |
| | | private String goodsName; |
| | | |
| | |
| | | package com.dsh.guns.modular.system.model.vo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | |
| | | @ApiModelProperty(value = "金额¥") |
| | | private String amountValue; |
| | | @ApiModelProperty(value = "金额") |
| | | private BigDecimal amount; |
| | | private Double amount; |
| | | @ApiModelProperty(value = "下单时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date insertTime; |
| | |
| | | @ApiModelProperty(value = "备注") |
| | | private Integer remark; |
| | | |
| | | /** |
| | | * 支付方式(1=微信,2=支付宝) |
| | | */ |
| | | @TableField("payType") |
| | | private Integer payType; |
| | | /** |
| | | * 支付状态(1=待支付,2=已支付 3=已退款) |
| | | */ |
| | | @TableField("payStatus") |
| | | private Integer payStatus; |
| | | /** |
| | | * 支付时间 |
| | | */ |
| | | @TableField("payTime") |
| | | private Date payTime; |
| | | /** |
| | | * 第三方流水号 |
| | | */ |
| | | @TableField("orderNumber") |
| | | private String orderNumber; |
| | | /** |
| | | * 状态(1=正常,2=冻结,3=删除) |
| | | */ |
| | | @TableField("state") |
| | | private Integer state; |
| | | |
| | | |
| | | } |
| | |
| | | <option value="1">满减券</option> |
| | | <option value="2">折扣券</option> |
| | | <option value="3">体验券</option> |
| | | <option value="4">抵扣券</option> |
| | | </#SelectCon> |
| | | </div> |
| | | <div class="col-sm-3"> |
| | |
| | | <option value="1">满减券</option> |
| | | <option value="2">折扣券</option> |
| | | <option value="3">体验券</option> |
| | | <option value="4">抵扣券</option> |
| | | |
| | | </#SelectCon> |
| | | </div> |
| | | <div class="col-sm-3"> |
| | |
| | | }, |
| | | {title: '优惠券类型', field: 'type', visible: true, align: 'center', valign: 'middle', |
| | | formatter: function (value, row, index) { |
| | | return {1: "满减券", 2: "代金券", 3: "体验券"}[value] |
| | | return {1: "满减券", 2: "代金券", 3: "体验券",4:"抵扣券"}[value] |
| | | }}, |
| | | {title: '发放方式', field: 'distributionMethod', visible: true, align: 'center', valign: 'middle', |
| | | formatter: function (value, row, index) { |
| | |
| | | }, |
| | | {title: '优惠券类型', field: 'type', visible: true, align: 'center', valign: 'middle', |
| | | formatter: function (value, row, index) { |
| | | return {1: "满减券", 2: "代金券", 3: "体验券"}[value] |
| | | return {1: "满减券", 2: "代金券", 3: "体验券",4:"抵扣券"}[value] |
| | | }}, |
| | | {title: '发放方式', field: 'distributionMethod', visible: true, align: 'center', valign: 'middle', |
| | | formatter: function (value, row, index) { |
| | |
| | | ajax.start(); |
| | | } |
| | | }; |
| | | /** |
| | | * 下架 |
| | | */ |
| | | Vip.offShelf = function () { |
| | | if (this.check()){ |
| | | var selected = $('#' + this.id).bootstrapTable('getSelections'); |
| | | const data1 = { |
| | | siteIds:[], |
| | | type:null |
| | | }; |
| | | selected.forEach(function(obj) { |
| | | var id = obj.id; |
| | | data1.siteIds.push(id); |
| | | }); |
| | | data1.type = 2; |
| | | $.ajax({ |
| | | url: Feng.ctxPath + "/tSite/changeState", |
| | | type: "POST", |
| | | contentType: "application/json", // 设置请求头的 Content-Type |
| | | data: JSON.stringify(data1), // 将数据转换为 JSON 字符串 |
| | | success: function(response) { |
| | | Feng.success("下架成功!"); |
| | | Vip.search(); |
| | | }, |
| | | error: function(xhr, status, error) { |
| | | var errorMessage = xhr.responseText ? xhr.responseText : "下架失败!"; |
| | | Feng.error("您的网络异常!"); |
| | | } |
| | | }); |
| | | } |
| | | }; |
| | | |
| | | /** |
| | | * 跳转添加场地页面 |
| | | */ |
| | |
| | | var id = row.id; |
| | | // 已退费不展示按钮 |
| | | if (temp==0){ |
| | | var str = '<button class="btn btn-outline btn-primary" onclick="TCompetition.refund(\'' + id + '\')" >'+row.id+'</button>' |
| | | var str = '<button class="btn btn-outline btn-primary" onclick="TCompetition.refund(\'' + id + '\')" >'+'会员退费'+'</button>' |
| | | btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="" onfocus="TUser.tooltip()">' + str + '</p>'] |
| | | return btn; |
| | | }else{ |
| | |
| | | ' <div class="form-group">\n' + |
| | | '<label class="col-sm-3 control-label">*会员到期时间:</label>'+ |
| | | '<div class="col-sm-9">'+ |
| | | '<input style="width: 300px" class="form-control" id="vipEndTime" name="vipEndTime" type="date">'| |
| | | '<input style="width: 300px" class="form-control" id="vipEndTime" name="vipEndTime" type="date">'+ |
| | | '</div>'+ |
| | | ' <div class="form-group refusal" style="display: none;">\n' + |
| | | ' <div class="form-group refusal" >\n' + |
| | | ' <label class="col-sm-3 control-label">备注:</label>\n' + |
| | | ' <div class="col-sm-9">\n' + |
| | | ' <textarea id="refusal" class="form-control" style="width: 100%;height: 200px"></textarea>'+ |
| | |
| | | } |
| | | }); |
| | | this.layerIndex = index; |
| | | $("#status1").change(function () { |
| | | this.value == 3 ? $(".refusal").show() : $(".refusal").hide(); |
| | | }); |
| | | |
| | | }; |
| | | |
| | | |