记得上下班打卡 | git大法好,push需谨慎

Commit 1b952d30 authored by jiangxiulong's avatar jiangxiulong

Merge remote-tracking branch 'origin/dev' into dev

parents f4cdcbc7 28a244db
...@@ -42,3 +42,13 @@ logs ...@@ -42,3 +42,13 @@ logs
*.orig *.orig
temp/ temp/
### Example user template template
### Example user template
# IntelliJ project files
.idea
*.iml
out
gen
/Users/anjiabin/mdsky_gitlab/liquidnet-bus-v1/liquidnet-bus-client/liquidnet-client-admin/liquidnet-client-admin-web/src/main/resources/templates/zhengzai/kylin/performances/details.html
...@@ -21,20 +21,22 @@ public class AdamMemberOrderParam implements Serializable { ...@@ -21,20 +21,22 @@ public class AdamMemberOrderParam implements Serializable {
private BigDecimal pricePaid; private BigDecimal pricePaid;
@ApiModelProperty(position = 14, required = true, value = "会员价格ID") @ApiModelProperty(position = 14, required = true, value = "会员价格ID")
private String memberPriceId; private String memberPriceId;
@ApiModelProperty(position = 15, required = true, value = "支付方式", allowableValues = "ALIPAY,WEPAY,WAPALIPAY,WAPWEPAY,JSWEPAY,APPLETWEPAY,APPIAP") @ApiModelProperty(position = 15, required = true, value = "支付终端", allowableValues = "app,wap,js,applet")
private String payChannel; private String deviceFrom;
@ApiModelProperty(position = 16, required = false, value = "苹果支付使用") @ApiModelProperty(position = 16, required = true, value = "支付方式", allowableValues = "alipay,wepay")
private String payType;
@ApiModelProperty(position = 17, required = false, value = "苹果支付使用")
private String productId; private String productId;
@ApiModelProperty(position = 17, required = false, value = "姓名", example = "王武") @ApiModelProperty(position = 18, required = false, value = "姓名", example = "王武")
private String name; private String name;
@ApiModelProperty(position = 18, required = false, value = "身份证件号", example = "111111111111111111") @ApiModelProperty(position = 19, required = false, value = "身份证件号", example = "111111111111111111")
private String idCard; private String idCard;
@ApiModelProperty(position = 19, required = false, value = "微信支付使用")
private String authCode;
@ApiModelProperty(position = 20, required = false, value = "微信支付使用") @ApiModelProperty(position = 20, required = false, value = "微信支付使用")
private String authCode;
@ApiModelProperty(position = 21, required = false, value = "微信支付使用")
private String openId; private String openId;
@ApiModelProperty(position = 21, required = true, value = "未支付/取消支付跳转URL") @ApiModelProperty(position = 22, required = true, value = "未支付/取消支付跳转URL")
private String showUrl; private String showUrl;
@ApiModelProperty(position = 22, required = true, value = "支付成功跳转URL") @ApiModelProperty(position = 23, required = true, value = "支付成功跳转URL")
private String returnUrl; private String returnUrl;
} }
...@@ -7,97 +7,40 @@ import lombok.Data; ...@@ -7,97 +7,40 @@ import lombok.Data;
import java.io.Serializable; import java.io.Serializable;
import java.util.List; import java.util.List;
@ApiModel(value = "AdamMemberParam", description = "添加会员参数") @ApiModel(value = "AdamMemberParam", description = "添加会员入参")
@Data @Data
public class AdamMemberParam implements Serializable { public class AdamMemberParam implements Serializable {
private static final long serialVersionUID = -7411934614249221021L; private static final long serialVersionUID = -7411934614249221021L;
@ApiModelProperty(position = 0, required = false, value = "会员ID[50]", example = "62960077673504768") @ApiModelProperty(position = 0, required = false, value = "会员ID[50]", example = "62960077673504768")
private String memberId; private String memberId;
/**
* 会员卡名称
*/
@ApiModelProperty(position = 1, required = false, value = "会员名称[50]", example = "摩登天空会员卡") @ApiModelProperty(position = 1, required = false, value = "会员名称[50]", example = "摩登天空会员卡")
private String name; private String name;
/**
* 标题
*/
@ApiModelProperty(position = 2, required = true, value = "会员标题[50]", example = "摩登天空会员卡") @ApiModelProperty(position = 2, required = true, value = "会员标题[50]", example = "摩登天空会员卡")
private String title; private String title;
/**
* 副标题
*/
@ApiModelProperty(position = 3, required = true, value = "会员副标题[50]", example = "摩登天空会员卡副标题") @ApiModelProperty(position = 3, required = true, value = "会员副标题[50]", example = "摩登天空会员卡副标题")
private String subTitle; private String subTitle;
/**
* 图标
*/
@ApiModelProperty(position = 4, required = true, value = "icon图标[200]", example = "https://img.zhengzai.tv/files/2020/08/28/5f490418d30b4.png") @ApiModelProperty(position = 4, required = true, value = "icon图标[200]", example = "https://img.zhengzai.tv/files/2020/08/28/5f490418d30b4.png")
private String icon; private String icon;
/**
* 头像
*/
@ApiModelProperty(position = 5, required = true, value = "会员头像[200]", example = "https://img.zhengzai.tv/files/2020/08/31/5f4c75095e9bc.pngv") @ApiModelProperty(position = 5, required = true, value = "会员头像[200]", example = "https://img.zhengzai.tv/files/2020/08/31/5f4c75095e9bc.pngv")
private String avatar; private String avatar;
/**
* 权益详情
*/
@ApiModelProperty(position = 6, required = true, value = "权益详情[200]", example = "加入摩登天空会员您可享受到.....") @ApiModelProperty(position = 6, required = true, value = "权益详情[200]", example = "加入摩登天空会员您可享受到.....")
private String interestsDetail; private String interestsDetail;
/**
* 注意事项
*/
@ApiModelProperty(position = 7, required = true, value = "注意事项[200]", example = "摩登天空会员需注意以下事项.....") @ApiModelProperty(position = 7, required = true, value = "注意事项[200]", example = "摩登天空会员需注意以下事项.....")
private String notes; private String notes;
/**
* '是否展示须知'
*/
@ApiModelProperty(position = 8, required = true, value = "是否展示须知[[0-否,1-是]]", allowableValues = "0,1") @ApiModelProperty(position = 8, required = true, value = "是否展示须知[[0-否,1-是]]", allowableValues = "0,1")
private Integer isNotice; private Integer isNotice;
/**
* 须知内容
*/
@ApiModelProperty(position = 9, required = true, value = "会员须知内容[200]", example = "会员须知细则1.xxxx\n2.xxxx") @ApiModelProperty(position = 9, required = true, value = "会员须知内容[200]", example = "会员须知细则1.xxxx\n2.xxxx")
private String noticeInfo; private String noticeInfo;
/**
* 须知标题
*/
@ApiModelProperty(position = 10, required = true, value = "会员须知标题[200]", example = "摩登天空会员须知") @ApiModelProperty(position = 10, required = true, value = "会员须知标题[200]", example = "摩登天空会员须知")
private String noticeTitle; private String noticeTitle;
/**
* 是否需要答题 0不需要 1需要
*/
@ApiModelProperty(position = 11, required = true, value = "是否需要答题[0-否,1-是]", allowableValues = "0,1") @ApiModelProperty(position = 11, required = true, value = "是否需要答题[0-否,1-是]", allowableValues = "0,1")
private Integer needQuestion; private Integer needQuestion;
/**
* 是否展示协议 0否1是
*/
@ApiModelProperty(position = 12, required = true, value = "是否展示协议[0-否,1-是]", allowableValues = "0,1") @ApiModelProperty(position = 12, required = true, value = "是否展示协议[0-否,1-是]", allowableValues = "0,1")
private Integer displayAgreement; private Integer displayAgreement;
@ApiModelProperty(position = 13, required = true, value = "状态[1-NORMAL,2-INVALID]")
/** private Integer state;
* 会员协议
*/
@ApiModelProperty(position = 13, required = true, value = "会员协议内容[200]", example = "摩登天空会员协议须知....")
private String agreement;
/**
* 限购数量
*/
@ApiModelProperty(position = 14, required = true, value = "限购数量,0不限购[200]", example = "0") @ApiModelProperty(position = 14, required = true, value = "限购数量,0不限购[200]", example = "0")
private Integer limitation; private Integer limitation;
@ApiModelProperty(position = 15, required = true, value = "会员卡价格ID", example = "[63666042953703424]") @ApiModelProperty(position = 15, required = true, value = "会员卡价格ID", example = "[63666042953703424]")
private List<String> memberPriceList; private List<String> memberPriceList;
} }
...@@ -48,6 +48,6 @@ public interface IAdamMemberOrderService extends IService<AdamMemberOrder> { ...@@ -48,6 +48,6 @@ public interface IAdamMemberOrderService extends IService<AdamMemberOrder> {
* 支付回调 * 支付回调
* @return * @return
*/ */
boolean memberNotifyCallBack(AdamMemberOrderCallbackResult result); ResponseDto<Object> memberNotifyCallBack(AdamMemberOrderCallbackResult result);
} }
package com.liquidnet.service.kylin.dto.vo; package com.liquidnet.service.kylin.dto.vo;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import lombok.Data; import lombok.Data;
import java.io.Serializable; import java.io.Serializable;
...@@ -8,19 +10,30 @@ import java.io.Serializable; ...@@ -8,19 +10,30 @@ import java.io.Serializable;
public class PayDataVo implements Serializable { public class PayDataVo implements Serializable {
private static final long serialVersionUID = -5841205289132250565L; private static final long serialVersionUID = -5841205289132250565L;
@JsonProperty("appId")
private String appid; private String appid;
@JsonProperty("appid")
private String appId;
@JsonProperty("nonceStr")
private String noncestr; private String noncestr;
@JsonProperty("noncestr")
private String nonceStr;
@JsonProperty("timeStamp")
private String timestamp;
@JsonProperty("timestamp")
private String timeStamp;
@JsonProperty("package")
private String packageOther;
private String packages; private String packages;
private String partnerid; private String partnerid;
private String prepayid; private String prepayid;
private String sign; private String sign;
private String mweb_url;
private long timestamp; private String paySign;
private String signType;
private String redirect_url; private String redirect_url;
private String order_str; private String order_str;
......
...@@ -5,7 +5,6 @@ import com.github.pagehelper.PageInfo; ...@@ -5,7 +5,6 @@ import com.github.pagehelper.PageInfo;
import com.liquidnet.service.kylin.dao.*; import com.liquidnet.service.kylin.dao.*;
import com.liquidnet.service.kylin.dto.param.PerformanceAdminListParam; import com.liquidnet.service.kylin.dto.param.PerformanceAdminListParam;
import com.liquidnet.service.kylin.dto.param.PerformanceMemberAuditParam; import com.liquidnet.service.kylin.dto.param.PerformanceMemberAuditParam;
import com.liquidnet.service.kylin.dto.param.PerformanceRecommendAdminParam;
import com.liquidnet.service.kylin.dto.param.SysDamaiParam; import com.liquidnet.service.kylin.dto.param.SysDamaiParam;
import com.liquidnet.service.kylin.dto.vo.partner.KylinPerformanceMisVo; import com.liquidnet.service.kylin.dto.vo.partner.KylinPerformanceMisVo;
import com.liquidnet.service.kylin.entity.KylinPerformances; import com.liquidnet.service.kylin.entity.KylinPerformances;
...@@ -168,4 +167,6 @@ public interface IKylinPerformancesAdminService extends IService<KylinPerformanc ...@@ -168,4 +167,6 @@ public interface IKylinPerformancesAdminService extends IService<KylinPerformanc
* @return * @return
*/ */
boolean changeSysDamai(List<SysDamaiParam> params); boolean changeSysDamai(List<SysDamaiParam> params);
List<PerformanceOrderStatisticalDao> getPerformanceOrderStatisticalList(String performancesId);
} }
...@@ -4,9 +4,11 @@ import com.github.pagehelper.PageInfo; ...@@ -4,9 +4,11 @@ import com.github.pagehelper.PageInfo;
import com.liquidnet.client.admin.common.core.controller.BaseController; import com.liquidnet.client.admin.common.core.controller.BaseController;
import com.liquidnet.client.admin.common.core.domain.AjaxResult; import com.liquidnet.client.admin.common.core.domain.AjaxResult;
import com.liquidnet.client.admin.common.core.page.TableDataInfo; import com.liquidnet.client.admin.common.core.page.TableDataInfo;
import com.liquidnet.client.admin.zhengzai.kylin.dto.PerformanceOrderStatisCountResp;
import com.liquidnet.client.admin.zhengzai.kylin.service.impl.KylinPerformancesAdminServiceImpl; import com.liquidnet.client.admin.zhengzai.kylin.service.impl.KylinPerformancesAdminServiceImpl;
import com.liquidnet.service.kylin.dao.PerformanceAdminListDao; import com.liquidnet.service.kylin.dao.PerformanceAdminListDao;
import com.liquidnet.service.kylin.dao.PerformanceMemberAuditDao; import com.liquidnet.service.kylin.dao.PerformanceMemberAuditDao;
import com.liquidnet.service.kylin.dao.PerformanceOrderStatisticalDao;
import com.liquidnet.service.kylin.dto.param.PerformanceAdminListParam; import com.liquidnet.service.kylin.dto.param.PerformanceAdminListParam;
import com.liquidnet.service.kylin.dto.param.PerformanceMemberAuditParam; import com.liquidnet.service.kylin.dto.param.PerformanceMemberAuditParam;
import com.liquidnet.service.kylin.dto.vo.partner.KylinPerformanceMisVo; import com.liquidnet.service.kylin.dto.vo.partner.KylinPerformanceMisVo;
...@@ -16,6 +18,9 @@ import org.springframework.stereotype.Controller; ...@@ -16,6 +18,9 @@ import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap; import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import java.math.BigDecimal;
import java.util.List;
/** /**
* 演出Controller * 演出Controller
...@@ -88,4 +93,31 @@ public class KylinPerformancesController extends BaseController { ...@@ -88,4 +93,31 @@ public class KylinPerformancesController extends BaseController {
boolean result = kylinPerformancesService.performanceMemberChange(performanceMemberAuditParam); boolean result = kylinPerformancesService.performanceMemberChange(performanceMemberAuditParam);
return toAjax(result); return toAjax(result);
} }
@RequiresPermissions("kylin:performances:performanceStatic")
@GetMapping(value = "/performanceStatic/{performancesId}")
public String performanceStatic(@PathVariable("performancesId") String performancesId, ModelMap mmap) {
//获取演出详情
KylinPerformanceMisVo performanceMisVo = kylinPerformancesService.performanceDetails(performancesId);
List<PerformanceOrderStatisticalDao> result = kylinPerformancesService.getPerformanceOrderStatisticalList(performancesId);
//构造top统计数据
PerformanceOrderStatisCountResp perCountResp = new PerformanceOrderStatisCountResp();
perCountResp.setPerformanceTitle(performanceMisVo.getTitle());
if(result.size()>=2){
PerformanceOrderStatisticalDao resdao = result.get(result.size()-1);
perCountResp.setTotalSalePrice(resdao.getTotalSalePrice());
perCountResp.setSaleGeneral(resdao.getSaleGeneral());
perCountResp.setTotalGeneral(resdao.getTotalGeneral());
perCountResp.setTotalExchange(resdao.getTotalExchange());
perCountResp.setSurplusExchange(resdao.getSurplusGeneral());
perCountResp.setTotalBuyUsers(resdao.getTotalBuyUsers());
perCountResp.setTotalDisPrice(BigDecimal.ONE);
perCountResp.setTotalRefundGeneral(resdao.getTotalRefundGeneral());
}
mmap.put("perCountResp", perCountResp);
mmap.put("perOrderStaticList", result);
return prefix + "/performancesStatic";
}
} }
...@@ -132,7 +132,7 @@ public class PerformanceCalendarController extends BaseController{ ...@@ -132,7 +132,7 @@ public class PerformanceCalendarController extends BaseController{
//查询条件 //查询条件
LambdaQueryWrapper<KylinPerformances> wrapper = new LambdaQueryWrapper<>(); LambdaQueryWrapper<KylinPerformances> wrapper = new LambdaQueryWrapper<>();
if (!StringUtils.isNotNull(performanceCalendarReq.getPerformanceIimeBegin())) { if (!StringUtils.isNotNull(performanceCalendarReq.getPerformanceIimeBegin())) {
wrapper.ge(KylinPerformances::getTimeStart, DateUtil.parse(performanceCalendarReq.getPerformanceIimeBegin(),DateUtil.DATE_SMALL_STR)); wrapper.ge(KylinPerformances::getTimeStart, DateUtil.asLocalDate(DateUtil.parse(performanceCalendarReq.getPerformanceIimeBegin(),DateUtil.DATE_SMALL_STR)));
} }
if (!StringUtils.isNotNull(performanceCalendarReq.getPerformanceIimeend())) { if (!StringUtils.isNotNull(performanceCalendarReq.getPerformanceIimeend())) {
wrapper.le(KylinPerformances::getTimeStart, DateUtil.addDay(DateUtil.parse(performanceCalendarReq.getPerformanceIimeend(),DateUtil.DATE_SMALL_STR),1)); wrapper.le(KylinPerformances::getTimeStart, DateUtil.addDay(DateUtil.parse(performanceCalendarReq.getPerformanceIimeend(),DateUtil.DATE_SMALL_STR),1));
...@@ -148,7 +148,7 @@ public class PerformanceCalendarController extends BaseController{ ...@@ -148,7 +148,7 @@ public class PerformanceCalendarController extends BaseController{
PerformanceCalendarResp.PerformanceVo performanceVo = new PerformanceCalendarResp.PerformanceVo(); PerformanceCalendarResp.PerformanceVo performanceVo = new PerformanceCalendarResp.PerformanceVo();
performanceVo.setTitle(kylinPerformances.getTitle()); performanceVo.setTitle(kylinPerformances.getTitle());
performanceVo.setCityName(kylinPerformances.getCityName()); performanceVo.setCityName(kylinPerformances.getCityName());
performanceVo.setTimeStart(DateUtil.format(kylinPerformances.getTimeStart(),DateUtil.Formatter.ddHHmmssTrim)); performanceVo.setTimeStart(DateUtil.format(kylinPerformances.getTimeStart(),DateUtil.Formatter.yyyyMMddHHmmss));
//页面行循环 //页面行循环
for(int i = 0;i< dateArray2.length;i++){ for(int i = 0;i< dateArray2.length;i++){
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
<ul class="nav nav-tabs"> <ul class="nav nav-tabs">
<li class="active"><a data-toggle="tab" href="#tab-2" aria-expanded="false">演出详情</a> <li class="active"><a data-toggle="tab" href="#tab-2" aria-expanded="false">演出详情</a>
</li> </li>
<li class=""><a data-toggle="tab" href="#tab-1" aria-expanded="true"> 演出数据</a> <li class=""><a data-toggle="tab" href="#tab-1" aria-expanded="true" id="tab-nav-1"> 演出数据</a>
</li> </li>
<li class=""><a data-toggle="tab" href="#tab-2" aria-expanded="false">校园分销</a> <li class=""><a data-toggle="tab" href="#tab-2" aria-expanded="false">校园分销</a>
</li> </li>
...@@ -31,8 +31,10 @@ ...@@ -31,8 +31,10 @@
<div class="tab-content"> <div class="tab-content">
<div id="tab-1" class="tab-pane"> <div id="tab-1" class="tab-pane">
<div class="panel-body"> <div class="panel-body">
<strong>HTML5 文档类型</strong> <div id="tab-1" class="tab-pane">
<p>Bootstrap 使用到的某些 HTML 元素和 CSS 属性需要将页面设置为 HTML5 文档类型。在你项目中的每个页面都要参照下面的格式进行设置。</p> <!-- <th:block th:include="../templates/zhengzai/kylin/performances/performancesStatic :: performancesStatic"/>-->
<iframe id="tab_iframe_1" name="tab_iframe_1" marginwidth=0 marginheight=0 width=100% height=800px frameborder=0></iframe>
</div>
</div> </div>
</div> </div>
<div id="tab-2" class="tab-pane active"> <div id="tab-2" class="tab-pane active">
...@@ -284,6 +286,10 @@ ...@@ -284,6 +286,10 @@
document.getElementById("content_iframe").src="../memberInfo/"+'[[${kylinPerformanceMisVo.performancesId}]]'.replaceAll("\"", ""); document.getElementById("content_iframe").src="../memberInfo/"+'[[${kylinPerformanceMisVo.performancesId}]]'.replaceAll("\"", "");
} }
$("#tab-nav-1").bind("click",function(){
$("#tab_iframe_1").attr("src",prefix + "/performanceStatic/"+'[[${kylinPerformanceMisVo.performancesId}]]'.replaceAll("\"", ""));
});
</script> </script>
</body> </body>
</html> </html>
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
<th:block th:include="include :: header('演出列表')" />
</head>
<body class="gray-bg">
<div class="container-div">
<div class="row">
<div class="col-sm-12 select-table table-bordered" th:object="${perCountResp}">
<div class="row">
<div class="col-lg-12">
<div>
<div th:text="*{performanceTitle}">我用什么把你留住(二)——福禄寿FloruitShow音乐会上海(7月24日)</div>
</div>
</div>
</div>
<div class="row"></div>
<div class="row">
<div class="col-lg-1">
<div>
<div>总销售票款(元)</div>
<div th:text="*{totalSalePrice}">28700</div>
</div>
</div>
<div class="col-lg-1">
<div>
<div>实销总数(张)</div>
<div th:text="*{saleGeneral}">55</div>
</div>
</div>
<div class="col-lg-1">
<div>
<div>销售库存(张)</div>
<div th:text="*{totalGeneral}">80</div>
</div>
</div>
<div class="col-lg-1">
<div>
<div>已兑换总数(张)</div>
<div th:text="*{totalExchange}">0</div>
</div>
</div>
<div class="col-lg-1">
<div>
<div>兑换库存(张)</div>
<div th:text="*{totalExchange}">0</div>
</div>
</div>
<div class="col-lg-1">
<div>
<div>购买人数(人)</div>
<div th:text="*{totalBuyUsers}">39</div>
</div>
</div>
<div class="col-lg-1">
<div>
<div>小家伙分销(元)</div>
<div th:text="*{totalDisPrice}">0</div>
</div>
</div>
<div class="col-lg-1">
<div>
<div>退票数量(张)</div>
<div th:text="*{totalRefundGeneral}">24</div>
</div>
</div>
</div>
</div>
<table class="col-sm-12 select-table table-bordered">
<thead>
<tr>
<th>
<div class="cell">票种名</div>
</th>
<th>
<div class="cell">单价</div>
</th>
<th>
<div class="cell">类型</div>
</th>
<th>
<div class="cell">适用时间</div>
</th>
<th>
<div class="cell">销售总数量</div>
</th>
<th>
<div class="cell">会员销售数量</div>
</th>
<th>
<div class="cell">库存数量</div>
</th>
<th>
<div class="cell">正在支付数量</div>
</th>
<th>
<div class="cell">退票数量</div>
</th>
<th>
<div class="cell">销售额(元)</div>
</th>
<!-- <th colspan="1" rowspan="1" class="el-table_5_column_42 is-leaf">-->
<!-- <div class="cell">兑换数量</div>-->
<!-- </th>-->
</tr>
</thead>
<tbody>
<tr th:each="respBean,respBeanStat:${perOrderStaticList}">
<td>
<div class="cell" th:text="${respBean.title}">180元区</div>
</td>
<td>
<div class="cell" th:text="${respBean.price}">180.00</div>
</td>
<td>
<div class="cell" th:text="${respBean.type}">单日票</div>
</td>
<td>
<div class="cell" th:text="${respBean.useStart}">2021-03-06</div>
</td>
<td>
<div class="cell" th:text="${respBean.saleGeneral}">0</div>
</td>
<td>
<div class="cell" th:text="${respBean.totalMemberNumber}">0</div>
</td>
<td>
<div class="cell" th:text="${respBean.surplusGeneral}">0</div>
</td>
<td>
<div class="cell" th:text="${respBean.totalPayingNumber}">0</div>
</td>
<td>
<div class="cell" th:text="${respBean.totalRefundGeneral}">0</div>
</td>
<td>
<div class="cell" th:text="${respBean.totalSalePrice}">0</div>
</td>
<!-- <td>-->
<!-- <div class="cell" th:text="${respBean.price}">0</div>-->
<!-- </td>-->
</tr>
<!-- <tr class="el-table__row el-table__row&#45;&#45;striped">-->
<!-- <td rowspan="1" colspan="1" class="el-table_5_column_32 ">-->
<!-- <div class="cell">680元区</div>-->
<!-- </td>-->
<!-- <td rowspan="1" colspan="1" class="el-table_5_column_33 ">-->
<!-- <div class="cell">680.00</div>-->
<!-- </td>-->
<!-- <td rowspan="1" colspan="1" class="el-table_5_column_34 ">-->
<!-- <div class="cell">单日票</div>-->
<!-- </td>-->
<!-- <td rowspan="1" colspan="1" class="el-table_5_column_35 ">-->
<!-- <div class="cell">2021-03-06</div>-->
<!-- </td>-->
<!-- <td rowspan="1" colspan="1" class="el-table_5_column_36 ">-->
<!-- <div class="cell">19</div>-->
<!-- </td>-->
<!-- <td rowspan="1" colspan="1" class="el-table_5_column_37 ">-->
<!-- <div class="cell">9</div>-->
<!-- </td>-->
<!-- <td rowspan="1" colspan="1" class="el-table_5_column_38 ">-->
<!-- <div class="cell">1</div>-->
<!-- </td>-->
<!-- <td rowspan="1" colspan="1" class="el-table_5_column_39 ">-->
<!-- <div class="cell">0</div>-->
<!-- </td>-->
<!-- <td rowspan="1" colspan="1" class="el-table_5_column_40 ">-->
<!-- <div class="cell">10</div>-->
<!-- </td>-->
<!-- <td rowspan="1" colspan="1" class="el-table_5_column_41 ">-->
<!-- <div class="cell">12920</div>-->
<!-- </td>-->
<!-- <td rowspan="1" colspan="1" class="el-table_5_column_42 ">-->
<!-- <div class="cell">0</div>-->
<!-- </td>-->
<!-- </tr>-->
<!-- <tr class="el-table__row">-->
<!-- <td rowspan="1" colspan="1" class="el-table_5_column_32 ">-->
<!-- <div class="cell">480元区</div>-->
<!-- </td>-->
<!-- <td rowspan="1" colspan="1" class="el-table_5_column_33 ">-->
<!-- <div class="cell">480.00</div>-->
<!-- </td>-->
<!-- <td rowspan="1" colspan="1" class="el-table_5_column_34 ">-->
<!-- <div class="cell">单日票</div>-->
<!-- </td>-->
<!-- <td rowspan="1" colspan="1" class="el-table_5_column_35 ">-->
<!-- <div class="cell">2021-03-06</div>-->
<!-- </td>-->
<!-- <td rowspan="1" colspan="1" class="el-table_5_column_36 ">-->
<!-- <div class="cell">21</div>-->
<!-- </td>-->
<!-- <td rowspan="1" colspan="1" class="el-table_5_column_37 ">-->
<!-- <div class="cell">3</div>-->
<!-- </td>-->
<!-- <td rowspan="1" colspan="1" class="el-table_5_column_38 ">-->
<!-- <div class="cell">0</div>-->
<!-- </td>-->
<!-- <td rowspan="1" colspan="1" class="el-table_5_column_39 ">-->
<!-- <div class="cell">0</div>-->
<!-- </td>-->
<!-- <td rowspan="1" colspan="1" class="el-table_5_column_40 ">-->
<!-- <div class="cell">9</div>-->
<!-- </td>-->
<!-- <td rowspan="1" colspan="1" class="el-table_5_column_41 ">-->
<!-- <div class="cell">10080</div>-->
<!-- </td>-->
<!-- <td rowspan="1" colspan="1" class="el-table_5_column_42 ">-->
<!-- <div class="cell">0</div>-->
<!-- </td>-->
<!-- </tr>-->
<!-- <tr class="el-table__row el-table__row&#45;&#45;striped">-->
<!-- <td rowspan="1" colspan="1" class="el-table_5_column_32 ">-->
<!-- <div class="cell">380元区</div>-->
<!-- </td>-->
<!-- <td rowspan="1" colspan="1" class="el-table_5_column_33 ">-->
<!-- <div class="cell">380.00</div>-->
<!-- </td>-->
<!-- <td rowspan="1" colspan="1" class="el-table_5_column_34 ">-->
<!-- <div class="cell">单日票</div>-->
<!-- </td>-->
<!-- <td rowspan="1" colspan="1" class="el-table_5_column_35 ">-->
<!-- <div class="cell">2021-03-06</div>-->
<!-- </td>-->
<!-- <td rowspan="1" colspan="1" class="el-table_5_column_36 ">-->
<!-- <div class="cell">15</div>-->
<!-- </td>-->
<!-- <td rowspan="1" colspan="1" class="el-table_5_column_37 ">-->
<!-- <div class="cell">8</div>-->
<!-- </td>-->
<!-- <td rowspan="1" colspan="1" class="el-table_5_column_38 ">-->
<!-- <div class="cell">0</div>-->
<!-- </td>-->
<!-- <td rowspan="1" colspan="1" class="el-table_5_column_39 ">-->
<!-- <div class="cell">0</div>-->
<!-- </td>-->
<!-- <td rowspan="1" colspan="1" class="el-table_5_column_40 ">-->
<!-- <div class="cell">5</div>-->
<!-- </td>-->
<!-- <td rowspan="1" colspan="1" class="el-table_5_column_41 ">-->
<!-- <div class="cell">5700</div>-->
<!-- </td>-->
<!-- <td rowspan="1" colspan="1" class="el-table_5_column_42 ">-->
<!-- <div class="cell">0</div>-->
<!-- </td>-->
<!-- </tr>-->
<!-- <tr class="el-table__row">-->
<!-- <td rowspan="1" colspan="1" class="el-table_5_column_32 ">-->
<!-- <div class="cell">总计</div>-->
<!-- </td>-->
<!-- <td rowspan="1" colspan="1" class="el-table_5_column_33 ">-->
<!-- <div class="cell"></div>-->
<!-- </td>-->
<!-- <td rowspan="1" colspan="1" class="el-table_5_column_34 ">-->
<!-- <div class="cell"></div>-->
<!-- </td>-->
<!-- <td rowspan="1" colspan="1" class="el-table_5_column_35 ">-->
<!-- <div class="cell"></div>-->
<!-- </td>-->
<!-- <td rowspan="1" colspan="1" class="el-table_5_column_36 ">-->
<!-- <div class="cell">55</div>-->
<!-- </td>-->
<!-- <td rowspan="1" colspan="1" class="el-table_5_column_37 ">-->
<!-- <div class="cell">20</div>-->
<!-- </td>-->
<!-- <td rowspan="1" colspan="1" class="el-table_5_column_38 ">-->
<!-- <div class="cell">25</div>-->
<!-- </td>-->
<!-- <td rowspan="1" colspan="1" class="el-table_5_column_39 ">-->
<!-- <div class="cell">0</div>-->
<!-- </td>-->
<!-- <td rowspan="1" colspan="1" class="el-table_5_column_40 ">-->
<!-- <div class="cell">24</div>-->
<!-- </td>-->
<!-- <td rowspan="1" colspan="1" class="el-table_5_column_41 ">-->
<!-- <div class="cell">28700</div>-->
<!-- </td>-->
<!-- <td rowspan="1" colspan="1" class="el-table_5_column_42 ">-->
<!-- <div class="cell">0</div>-->
<!-- </td>-->
<!-- </tr>&lt;!&ndash;&ndash;&gt;-->
</tbody>
</table>
<div style="display: none;">
<button type="button" class="el-button main el-button--primary el-button--medium"><!---->
<!----><span>查看数据统计图表</span></button> <!---->
<div class="main" style="display: none;">暂无省份/年龄/性别统计数据</div>
<div class="chart-main">
<div>
<button type="button" class="el-button el-button--primary el-button--mini"><!---->
<!----><span>导出统计数据表格</span></button>
</div>
<div id="provinceChart" class="chartProvince"></div>
<div id="cityChart" class="chartAge"></div>
<div id="timeChart" class="chartSex"></div>
<div id="ageChart" class="chartAge"></div>
<div id="sexChart" class="chartSex"></div>
</div>
</div>
</div>
</div>
<th:block th:include="include :: footer" />
</body>
</html>
\ No newline at end of file
package com.liquidnet.client.admin.zhengzai.kylin.dto;
import lombok.Data;
import java.math.BigDecimal;
/**
* @author AnJiabin <anjiabin@zhengzai.tv>
* @version V1.0
* @Description: TODO
* @class: PerformanceCalendarReq
* @Package com.liquidnet.client.admin.zhengzai.kylin.dto
* @Copyright: LightNet @ Copyright (c) 2021
* @date 2021/6/1 15:47
*/
@Data
public class PerformanceOrderStatisCountResp {
/**
* 销售总金额
*/
String performanceTitle;
BigDecimal totalSalePrice;
BigDecimal saleGeneral;
BigDecimal totalGeneral;
BigDecimal totalExchange;
BigDecimal surplusExchange;
BigDecimal totalBuyUsers;
BigDecimal totalDisPrice; //分销金额
BigDecimal totalRefundGeneral;
}
...@@ -13,7 +13,6 @@ import com.liquidnet.service.kylin.dto.vo.KylinPerformanceVo; ...@@ -13,7 +13,6 @@ import com.liquidnet.service.kylin.dto.vo.KylinPerformanceVo;
import com.liquidnet.service.kylin.dto.vo.KylinTicketVo; import com.liquidnet.service.kylin.dto.vo.KylinTicketVo;
import com.liquidnet.service.kylin.dto.vo.admin.KylinPerformanceMemberHistoryVo; import com.liquidnet.service.kylin.dto.vo.admin.KylinPerformanceMemberHistoryVo;
import com.liquidnet.service.kylin.dto.vo.partner.KylinPerformanceMisVo; import com.liquidnet.service.kylin.dto.vo.partner.KylinPerformanceMisVo;
import com.liquidnet.service.kylin.dto.vo.partner.KylinPerformancePartnerListVo;
import com.liquidnet.service.kylin.dto.vo.partner.KylinTicketPartnerVo; import com.liquidnet.service.kylin.dto.vo.partner.KylinTicketPartnerVo;
import com.liquidnet.service.kylin.dto.vo.partner.KylinTicketTimesPartnerVo; import com.liquidnet.service.kylin.dto.vo.partner.KylinTicketTimesPartnerVo;
import com.liquidnet.service.kylin.entity.*; import com.liquidnet.service.kylin.entity.*;
...@@ -632,4 +631,26 @@ public class KylinPerformancesAdminServiceImpl extends ServiceImpl<KylinPerforma ...@@ -632,4 +631,26 @@ public class KylinPerformancesAdminServiceImpl extends ServiceImpl<KylinPerforma
return false; return false;
} }
} }
@Override
public List<PerformanceOrderStatisticalDao> getPerformanceOrderStatisticalList(String performancesId) {
PerformanceOrderStatisticalDao countBean = new PerformanceOrderStatisticalDao();
countBean.setTitle("总计:");
List<PerformanceOrderStatisticalDao> dtoList = performancesMapper.getPerformanceOrderStatisticalList(performancesId);
dtoList.forEach(dto -> {
countBean.setTotalGeneral(countBean.getTotalGeneral().add(dto.getTotalGeneral()));
countBean.setSaleGeneral(countBean.getSaleGeneral().add(dto.getSaleGeneral()));
countBean.setSurplusGeneral(countBean.getSurplusGeneral().add(dto.getSurplusGeneral()));
countBean.setTotalSalePrice(countBean.getTotalSalePrice().add(dto.getTotalSalePrice()));
countBean.setTotalExchange(countBean.getTotalExchange().add(dto.getTotalExchange()));
countBean.setTotalRefundGeneral(countBean.getTotalRefundGeneral().add(dto.getTotalRefundGeneral()));
countBean.setTotalRefundPrice(countBean.getTotalRefundPrice().add(dto.getTotalRefundPrice()));
countBean.setTotalMemberNumber(countBean.getTotalMemberNumber().add(dto.getTotalMemberNumber()));
countBean.setTotalPayingNumber(countBean.getTotalPayingNumber().add(dto.getTotalPayingNumber()));
countBean.setTotalBuyUsers(dto.getTotalBuyUsers());
});
dtoList.add(countBean);
return dtoList;
}
} }
//package com.liquidnet.common.web.filter;
//
//import lombok.extern.slf4j.Slf4j;
//import org.springframework.context.annotation.Configuration;
//
//import javax.servlet.*;
//import javax.servlet.http.HttpServletRequest;
//import javax.servlet.http.HttpServletResponse;
//import java.io.IOException;
//
//@Slf4j
//@Configuration
//public class CrossDomainFilter implements Filter {
//
//
// @Override
// public void init(FilterConfig filterConfig) throws ServletException {
//
// }
//
// @Override
// public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException {
// HttpServletResponse resp = (HttpServletResponse)servletResponse;
// HttpServletRequest req = (HttpServletRequest)servletRequest;
// //获取请求的源
// String url = req.getHeader("Origin");
// resp.setHeader("Access-Control-Allow-Origin", url);
// resp.setHeader("Access-Control-Allow-Headers", "X-Requested-With, accept, content-type, token, xxxx");
// resp.setHeader("Access-Control-Allow-Methods", "GET, HEAD, POST, PUT, DELETE, TRACE, OPTIONS, PATCH");
// resp.setHeader("Access-Control-Allow-Credentials", "true");
// HttpServletRequest httpServletRequest = (HttpServletRequest) servletRequest;
// String requestMethod = httpServletRequest.getMethod();
// if ("OPTIONS".equalsIgnoreCase(requestMethod)) {
// return;
// }
// filterChain.doFilter(servletRequest, servletResponse);
// }
//
// @Override
// public void destroy() {
//
// }
//}
package com.liquidnet.common.web.util;
import org.springframework.boot.SpringApplication;
import org.springframework.core.env.Environment;
import java.util.HashMap;
import java.util.Map;
/**
* Utility class to load a Spring profile to be used as default
* when there is no <code>spring.profiles.active</code> set in the environment or as command line argument.
* If the value is not available in <code>application.yml</code> then <code>dev</code> profile will be used as default.
*/
public final class DefaultProfileUtil {
private static final String SPRING_PROFILE_DEFAULT = "spring.profiles.default";
private static final String SPRING_PROFILE_DEVELOPMENT ="dev";
private DefaultProfileUtil() {
}
/**
* Set a default to use when no profile is configured.
*
* @param app the Spring application
*/
public static void addDefaultProfile(SpringApplication app) {
Map<String, Object> defProperties = new HashMap<>();
/*
* The default profile to use when no other profiles are defined
* This cannot be set in the <code>application.yml</code> file.
* See https://github.com/spring-projects/spring-boot/issues/1219
*/
defProperties.put(SPRING_PROFILE_DEFAULT, SPRING_PROFILE_DEVELOPMENT);
app.setDefaultProperties(defProperties);
}
/**
* Get the profiles that are applied else get default profiles.
*
* @param env spring environment
* @return profiles
*/
public static String[] getActiveProfiles(Environment env) {
String[] profiles = env.getActiveProfiles();
if (profiles.length == 0) {
return env.getDefaultProfiles();
}
return profiles;
}
}
...@@ -5,3 +5,4 @@ liquidnet: ...@@ -5,3 +5,4 @@ liquidnet:
logfile: logfile:
path: ./logs path: ./logs
name: support-zuul name: support-zuul
level: debug
liquidnet: liquidnet:
info: info:
port: 7003 port: 80
name: liquidnet-support-zuul name: liquidnet-support-zuul
logfile: logfile:
path: ./logs path: ./logs
name: support-zuul name: support-zuul
level: debug
...@@ -28,7 +28,7 @@ logging: ...@@ -28,7 +28,7 @@ logging:
level: level:
root: info root: info
#以下是为指定包设置日志级别 #以下是为指定包设置日志级别
com.netflix: info com.liquidnet: ${liquidnet.logfile.level}
# ----------------------------------------------------------- # -----------------------------------------------------------
spring: spring:
application: application:
...@@ -75,18 +75,26 @@ zuul: ...@@ -75,18 +75,26 @@ zuul:
# ignored-patterns: /**/div/** # ignored-patterns: /**/div/**
# ----------------------------------------------------------- # -----------------------------------------------------------
# 判断顺序: exclude.url > include.url > include.url-pattern > exclude.url-pattern # 判断顺序: exclude.url > include.url > include.url-pattern > exclude.url-pattern
global: global-auth:
include: include-url:
url: - /kylin/performance/payDetail
url-pattern: /kylin/station/** - /kylin/order/pre
exclude: - /kylin/order/checkPayment
url: /adam/send, - /kylin/order/details
/adam/member/info, - /kylin/order/list
/kylin/station/login, - /kylin/order/payAgain
/kylin/station/login/sms include-url-pattern:
url-pattern: /**/login/**, - /kylin/station/**
/*/v2/api-docs*, - /kylin/performance/partner/**
/kylin/** exclude-url:
- /adam/send
- /adam/member/info
- /kylin/station/login
- /kylin/station/login/sms
exclude-url-pattern:
- /**/login/**
- /*/v2/api-docs*
- /kylin/**
# ----------------------------------------------------------- # -----------------------------------------------------------
#解决错误 com.netflix.client.ClientException: Load balancer does not have available server for client:panfeng-item-service #解决错误 com.netflix.client.ClientException: Load balancer does not have available server for client:panfeng-item-service
#这样就可以即指定path与URL,又不破坏Zuul的Hystrix与Ribbon特性了。 #这样就可以即指定path与URL,又不破坏Zuul的Hystrix与Ribbon特性了。
......
package com.liquidnet.service.kylin.dao;
import lombok.Data;
import java.math.BigDecimal;
import java.time.LocalDateTime;
/**
* @author AnJiabin <anjiabin@zhengzai.tv>
* @version V1.0
* @Description: TODO
* @class: PerformanceOrderStatisticalDao
* @Package com.liquidnet.service.kylin.dao
* @Copyright: LightNet @ Copyright (c) 2021
* @date 2021/6/3 16:39
*/
@Data
public class PerformanceOrderStatisticalDao {
private String performancesId;
private String ticketsId;
private String title;
private BigDecimal price;
private Integer type;
private LocalDateTime useStart;
private BigDecimal totalGeneral;
private BigDecimal saleGeneral;
private BigDecimal surplusGeneral;
private BigDecimal totalSalePrice;
private BigDecimal totalExchange;
private BigDecimal totalRefundGeneral;
private BigDecimal totalRefundPrice;
private BigDecimal totalMemberNumber;
private BigDecimal totalPayingNumber;
private BigDecimal totalBuyUsers;
}
...@@ -41,4 +41,6 @@ public interface KylinPerformancesMapper extends BaseMapper<KylinPerformances> { ...@@ -41,4 +41,6 @@ public interface KylinPerformancesMapper extends BaseMapper<KylinPerformances> {
//演出 会员票相关信息 //演出 会员票相关信息
PerformanceRecommendDao getRecommend(String performancesId); PerformanceRecommendDao getRecommend(String performancesId);
List<PerformanceOrderStatisticalDao> getPerformanceOrderStatisticalList(String performancesId);
} }
...@@ -73,6 +73,24 @@ ...@@ -73,6 +73,24 @@
<result column="is_exclusive" property="isExclusive"/> <result column="is_exclusive" property="isExclusive"/>
</resultMap> </resultMap>
<resultMap id="performanceOrderStatisticalDaoResult" type="com.liquidnet.service.kylin.dao.PerformanceOrderStatisticalDao">
<result column="performances_id" property="performancesId"/>
<result column="tickets_id" property="ticketsId"/>
<result column="title" property="title"/>
<result column="price" property="price"/>
<result column="type" property="type"/>
<result column="use_start" property="useStart"/>
<result column="total_general" property="totalGeneral"/>
<result column="sale_general" property="saleGeneral"/>
<result column="surplus_general" property="surplusGeneral"/>
<result column="total_sale_price" property="totalSalePrice"/>
<result column="total_exchange" property="totalExchange"/>
<result column="total_refund_general" property="totalRefundGeneral"/>
<result column="total_refund_price" property="totalRefundPrice"/>
<result column="total_member_number" property="totalMemberNumber"/>
<result column="total_paying_number" property="totalPayingNumber"/>
<result column="total_buy_users" property="totalBuyUsers"/>
</resultMap>
<!-- 第三方演出列表 (不包含退票信息) --> <!-- 第三方演出列表 (不包含退票信息) -->
<select id="partnerPerformanceList" parameterType="java.util.Map" resultMap="partnerPerformanceListResult"> <select id="partnerPerformanceList" parameterType="java.util.Map" resultMap="partnerPerformanceListResult">
...@@ -320,4 +338,59 @@ ...@@ -320,4 +338,59 @@
where ttr.performance_id = ${performancesId}; where ttr.performance_id = ${performancesId};
</select> </select>
<!-- 演出订单统计-->
<select id="getPerformanceOrderStatisticalList" parameterType="java.lang.String" resultMap="performanceOrderStatisticalDaoResult">
SELECT
kp.performances_id ,
kt.tickets_id,
kt.title,
kt.price,
kt.type,
kt.use_start,
IFNULL(kts.total_general , 0) AS 'total_general' ,
IFNULL(ot.total_sale_general , 0) AS 'sale_general' ,
IFNULL((kts.total_general - ot.total_sale_general),0) AS 'surplus_general',
IFNULL(ot.total_sale_price , 0) AS 'total_sale_price' ,
IFNULL(kts.total_exchange , 0) AS 'total_exchange',
IFNULL(ot.total_refund_general , 0) AS 'total_refund_general',
IFNULL(ot.total_refund_price , 0) AS 'total_refund_price',
IFNULL(ot.total_member_number , 0) AS 'total_member_number',
IFNULL(ot.total_paying_number , 0) AS 'total_paying_number',
IFNULL(ut.total_buy_users , 0) AS 'total_buy_users'
FROM
(select t.performances_id from kylin_performances t where t.performances_id = ${performancesId}) AS kp
inner JOIN(
SELECT
kote.performance_id AS 'performance_id',
kotr.ticket_id,
sum(kot.number) AS 'total_sale_general' ,
sum(kot.price_actual) AS 'total_sale_price',
sum(kot.refund_number) as 'total_refund_general',
sum(kot.price_refund) as 'total_refund_price',
sum(case when kotr.is_member = 1 then kot.number else 0 end) total_member_number,
sum(case when kots.`status` = 0 then kot.number else 0 end) total_paying_number
FROM
kylin_order_ticket_relations kotr
inner join kylin_order_tickets AS kot on kotr.ticket_id = kot.order_tickets_id
inner JOIN kylin_order_ticket_status AS kots ON kots.order_id = kot.order_tickets_id
inner JOIN kylin_order_ticket_entities AS kote ON kote.order_id = kot.order_tickets_id
WHERE kotr.performance_id = ${performancesId} and (kots.`status` = 0 OR kots.`status` = 1)
) AS ot ON ot.performance_id = kp.performances_id
inner join kylin_tickets kt on kt.tickets_id = ot.ticket_id
inner join kylin_ticket_status kts on kts.ticket_id = kt.tickets_id
inner JOIN(
select t.performance_id,count(t.user_id) as 'total_buy_users' from(
SELECT
kotr.performance_id,
kot.user_id
FROM
kylin_order_ticket_relations kotr
inner join kylin_order_tickets AS kot on kotr.ticket_id = kot.order_tickets_id
inner JOIN kylin_order_ticket_status AS kots ON kots.order_id = kot.order_tickets_id
inner JOIN kylin_order_ticket_entities AS kote ON kote.order_id = kot.order_tickets_id
WHERE kotr.performance_id = ${performancesId} and (kots.`status` = 0 OR kots.`status` = 1)
group by kotr.performance_id,kot.user_id
) t
) AS ut ON ut.performance_id = kp.performances_id
</select>
</mapper> </mapper>
package com.liquidnet.service.feign.kylin.api;
import com.liquidnet.service.base.ResponseDto;
import feign.hystrix.FallbackFactory;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import java.util.List;
@Component
@FeignClient(name = "liquidnet-service-kylin",
contextId = "FeignKylinOrderRefundClient", path = "",
fallback = FallbackFactory.Default.class)
public interface FeignKylinOrderRefundClient {
@PostMapping("admin/refund/apply")
ResponseDto<Object> refundApply(
@RequestBody String orderTicketsId,
@RequestBody String orderRefundBatchesId,
@RequestBody String refundData,
@RequestBody String reason
);
@PostMapping("admin/refund/cancel")
@ApiOperation("取消退款")
ResponseDto<Object> refundApply(@RequestBody List orderRefundsIdList);
@PostMapping("admin/refund/reapply")
@ApiOperation("再次提交审核")
ResponseDto<Object> refundReapply(@RequestBody List orderRefundsIdList);
@PostMapping("admin/refund/review")
@ApiOperation("一审运营 审核/驳回")
ResponseDto<Object> refundReview(@RequestBody List orderRefundsIdList, @RequestBody Integer status, @RequestBody String reject);
@PostMapping("admin/refund/execute")
@ApiOperation("二审财务 审核(执行退款)/驳回")
ResponseDto<Object> refundExecute(@RequestBody List orderRefundsIdList, @RequestBody Integer status, @RequestBody String refuse);
}
...@@ -24,5 +24,5 @@ public interface FeignKylinTaskClient { ...@@ -24,5 +24,5 @@ public interface FeignKylinTaskClient {
ResponseDto<Boolean> checkOrderTime(); ResponseDto<Boolean> checkOrderTime();
@PostMapping("performance/checkPerformanceTime") @PostMapping("performance/checkPerformanceTime")
void checkPerformanceTime(); ResponseDto<String> checkPerformanceTime();
} }
...@@ -125,12 +125,10 @@ public class AdamMemberOrderController { ...@@ -125,12 +125,10 @@ public class AdamMemberOrderController {
@ApiOperationSupport(order = 5) @ApiOperationSupport(order = 5)
@ApiOperation(value = "会员支付回调") @ApiOperation(value = "会员支付回调")
@PostMapping("callback") @PostMapping("callback")
public ResponseDto<Object> memberOrderCallBack(@RequestBody AdamMemberOrderCallbackResult result){ public void memberOrderCallBack(@RequestBody AdamMemberOrderCallbackResult result){
boolean b = adamMemberOrderService.memberNotifyCallBack(result); ResponseDto<Object> dto = adamMemberOrderService.memberNotifyCallBack(result);
if (b) { if (!dto.isSuccess()) {
return ResponseDto.success(); log.warn(JsonUtils.toJson(dto));
} else {
return ResponseDto.failure();
} }
} }
} }
...@@ -145,7 +145,7 @@ public class AdamMemberOrderServiceImpl extends ServiceImpl<AdamMemberOrderMappe ...@@ -145,7 +145,7 @@ public class AdamMemberOrderServiceImpl extends ServiceImpl<AdamMemberOrderMappe
orderVo.setCreatedAt(createdAt); orderVo.setCreatedAt(createdAt);
orderVo.setMemberName(adamMemberVo.getName()); orderVo.setMemberName(adamMemberVo.getName());
orderVo.setMode(param.getMode()); orderVo.setMode(param.getMode());
orderVo.setPayChannel(param.getPayChannel()); orderVo.setPayChannel(param.getPayType());
orderVo.setState(AdamMemberConst.STATUS_UNPAID); orderVo.setState(AdamMemberConst.STATUS_UNPAID);
orderVo.setUid(CurrentUtil.getCurrentUid()); orderVo.setUid(CurrentUtil.getCurrentUid());
orderVo.setPrice(param.getPrice()); orderVo.setPrice(param.getPrice());
...@@ -193,7 +193,7 @@ public class AdamMemberOrderServiceImpl extends ServiceImpl<AdamMemberOrderMappe ...@@ -193,7 +193,7 @@ public class AdamMemberOrderServiceImpl extends ServiceImpl<AdamMemberOrderMappe
// break; // break;
// } // }
payParam.add("detail", buyType == 0 ? "正在现场 - 购买会员" : "正在现场 - 购买会员码"); payParam.add("detail", buyType == 0 ? "正在现场 - 购买会员" : "正在现场 - 购买会员码");
Map payResult = this.callPayServer(param.getPayChannel(), payParam); Map payResult = this.callPayServer(param.getDeviceFrom(), param.getPayType(), payParam);
AdamMemberOrderResult result = AdamMemberOrderResult.getNew(); AdamMemberOrderResult result = AdamMemberOrderResult.getNew();
result.setOrderNo(orderVo.getOrderNo()); result.setOrderNo(orderVo.getOrderNo());
...@@ -325,51 +325,32 @@ public class AdamMemberOrderServiceImpl extends ServiceImpl<AdamMemberOrderMappe ...@@ -325,51 +325,32 @@ public class AdamMemberOrderServiceImpl extends ServiceImpl<AdamMemberOrderMappe
* @param payParam 支付参数 * @param payParam 支付参数
* @return Map * @return Map
*/ */
private Map callPayServer(String payType, LinkedMultiValueMap<String, String> payParam) { private Map callPayServer(String deviceFrom, String payType, LinkedMultiValueMap<String, String> payParam) {
String url = env.getProperty("liquidnet.url-pay.pay"); String url = env.getProperty("liquidnet.url-pay.pay") + "/" + deviceFrom + "/" + payType;
switch (payType) { log.info("HttpUtil.resquest.url:{},param:{}", url, JsonUtils.toJson(payParam));
case "APPALIPAY":
url += "/app/alipay";
break;
case "APPWEPAY":
url += "/app/wepay";
break;
case "WAPALIPAY":
url += "/wap/alipay";
break;
case "WAPWEPAY":
url += "/wap/wepay";
break;
case "JSWEPAY":
url += "/js/wepay";
break;
case "APPLETWEPAY":
url += "/applet/wepay";
break;
}
String json = HttpUtil.post(url, payParam); String json = HttpUtil.post(url, payParam);
log.info("HttpUtil.response.body:{}", json); log.info("HttpUtil.response.body:{}", json);
return JsonUtils.fromJson(json, Map.class); return JsonUtils.fromJson(json, Map.class);
} }
@Override @Override
public boolean memberNotifyCallBack(AdamMemberOrderCallbackResult result) { public ResponseDto<Object> memberNotifyCallBack(AdamMemberOrderCallbackResult result) {
if (1 != result.getStatus() || if (1 != result.getStatus() ||
!result.getType().equals(AdamMemberConst.TYPE_VIP) || !result.getType().equals(AdamMemberConst.TYPE_VIP) ||
null == result.getOrderCode() || null == result.getOrderCode() ||
null == result.getCode()) { null == result.getCode()) {
return false; return ResponseDto.failure(ErrorMapping.get("10500"), result);
} }
AdamMemberOrderVo orderVo = mongoTemplate.findOne(Query.query(Criteria.where("orderNo").is(result.getOrderCode())), AdamMemberOrderVo.class, AdamMemberOrderVo.class.getSimpleName()); AdamMemberOrderVo orderVo = mongoTemplate.findOne(Query.query(Criteria.where("orderNo").is(result.getOrderCode())), AdamMemberOrderVo.class, AdamMemberOrderVo.class.getSimpleName());
int state = orderVo.getState(); int state = orderVo.getState();
if (AdamMemberConst.STATUS_PAID == state || AdamMemberConst.STATUS_LATE == state) { if (AdamMemberConst.STATUS_PAID == state || AdamMemberConst.STATUS_LATE == state) {
// 订单已经处理过 // 订单已经处理过
return false; return ResponseDto.failure(ErrorMapping.get("10502"), result);
} }
if (result.getPrice().compareTo(orderVo.getPrice()) != 0) { if (result.getPrice().compareTo(orderVo.getPrice()) != 0) {
// 金额不一致 // 金额不一致
return false; return ResponseDto.failure(ErrorMapping.get("10503"), result);
} }
String currentDateTime = DateUtil.getNowTime(); String currentDateTime = DateUtil.getNowTime();
// 获取购买天数 // 获取购买天数
...@@ -475,10 +456,10 @@ public class AdamMemberOrderServiceImpl extends ServiceImpl<AdamMemberOrderMappe ...@@ -475,10 +456,10 @@ public class AdamMemberOrderServiceImpl extends ServiceImpl<AdamMemberOrderMappe
// SqlMapping.get("adam_member_order.add", mqList.toArray())); // SqlMapping.get("adam_member_order.add", mqList.toArray()));
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); log.error("系统异常:会员订单回调处理", e);
return false; return ResponseDto.failure(ErrorMapping.get("10501"), result);
} }
return true; return ResponseDto.success();
} }
/** /**
......
...@@ -29,3 +29,16 @@ ...@@ -29,3 +29,16 @@
10301= 10301=
10401=
10500=会员订单回调参数有误,请核实
10501=会员订单回调处理失败,请核实
10502=会员订单回调处理失败,该订单已处理
10503=会员订单回调处理失败,订单金额有误
\ No newline at end of file
...@@ -4,10 +4,13 @@ import lombok.extern.slf4j.Slf4j; ...@@ -4,10 +4,13 @@ import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.CommandLineRunner; import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication; import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.amqp.RabbitAutoConfiguration;
import org.springframework.boot.autoconfigure.data.redis.RedisAutoConfiguration; import org.springframework.boot.autoconfigure.data.redis.RedisAutoConfiguration;
import org.springframework.boot.autoconfigure.data.redis.RedisRepositoriesAutoConfiguration; import org.springframework.boot.autoconfigure.data.redis.RedisRepositoriesAutoConfiguration;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration; import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.cloud.bus.BusAutoConfiguration;
import org.springframework.cloud.openfeign.EnableFeignClients; import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.core.env.Environment; import org.springframework.core.env.Environment;
...@@ -20,6 +23,7 @@ import java.util.Arrays; ...@@ -20,6 +23,7 @@ import java.util.Arrays;
@SpringBootApplication( @SpringBootApplication(
scanBasePackages = {"com.liquidnet"} scanBasePackages = {"com.liquidnet"}
) )
@EnableAutoConfiguration(exclude = {BusAutoConfiguration.class,RabbitAutoConfiguration.class})
public class ServiceExecutorMainApplication implements CommandLineRunner { public class ServiceExecutorMainApplication implements CommandLineRunner {
@Autowired @Autowired
private Environment environment; private Environment environment;
......
package com.liquidnet.service.executor.main.handler;
import com.liquidnet.service.feign.kylin.task.FeignKylinTaskClient;
import com.rabbitmq.client.Return;
import com.xxl.job.core.biz.model.ReturnT;
import com.xxl.job.core.handler.annotation.XxlJob;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
/**
* XxlJob开发示例(Bean模式)
* <p>
* 开发步骤:
* 1、在Spring Bean实例中,开发Job方法,方式格式要求为 "public ReturnT<String> execute(String param)"
* 2、为Job方法添加注解 "@XxlJob(value="自定义jobhandler名称", init = "JobHandler初始化方法", destroy = "JobHandler销毁方法")",注解value值对应的是调度中心新建任务的JobHandler属性的值。
* 3、执行日志:需要通过 "XxlJobLogger.log" 打印执行日志;
*/
@Component
public class KylinTaskHandler {
private static final Logger log = LoggerFactory.getLogger(KylinTaskHandler.class);
@Autowired
private FeignKylinTaskClient feignKylinTaskClient;
@XxlJob(value = "sev-kylin:checkOrderTimeHandler")
public ReturnT<String> checkOrderTimeHandler() {
try {
boolean result = feignKylinTaskClient.checkOrderTime().getData();
log.info("checkOrderTimeHandler:结果:"+result);
return ReturnT.SUCCESS;
} catch (Exception e) {
return ReturnT.FAIL;
}
}
@XxlJob(value = "sev-kylin:checkPerformanceTimeHandler")
public ReturnT<String> checkPerformanceTimeHandler() {
try {
String result = feignKylinTaskClient.checkPerformanceTime().getData();
log.info("checkPerformanceTimeHandler:结果:"+result);
return ReturnT.SUCCESS;
} catch (Exception e) {
return ReturnT.FAIL;
}
}
// @Autowired
// private FeignSequenceClient feignSequenceClient;
//
// @XxlJob(value = "sev-sequence:mainDemoJobHandler")
// public ReturnT<String> mainDemoJobHandler(String param) {
// log.info("liquidnet.mainDemoJobHandler");
// Long test = feignSequenceClient.nextId();
// log.info("test : " + test);
// Long[] tests = feignSequenceClient.nextId(2);
// log.info("tests: " + JSON.toJSONString(tests));
// Long nextIncrId = feignSequenceClient.nextIncrId("SEQ_WL_N01_1784");
// log.info("incrid:" + nextIncrId);
// return ReturnT.SUCCESS;
// }
// @XxlJob(value = "sev-recon:accountCheckTask")
// public ReturnT<String> accountCheckTask(String param) {
// XxlJobLogger.log("start:liquidnet.accountCheckTask:[{}]", param);
//
// String bankChannel = null;
// String billDate = null;
// if (!StringUtils.isEmpty(param)) {
// JSONObject jsonParam = JSON.parseObject(param);
// bankChannel = jsonParam.getString("bankChannel");
// billDate = jsonParam.getString("billDate");
// }
// feignTaskReconAccountCheckClient.accountCheck(bankChannel,billDate);
// XxlJobLogger.log("end:liquidnet.accountCheckTask:[{}]", JSON.toJSONString(ResponseDto.success()));
// return ReturnT.SUCCESS;
// }
}
...@@ -83,7 +83,7 @@ public class KylinOrderTicketsController { ...@@ -83,7 +83,7 @@ public class KylinOrderTicketsController {
@GetMapping("checkOrderTime") @PostMapping("checkOrderTime")
@ApiOperation("订单过期脚本") @ApiOperation("订单过期脚本")
@ApiResponse(code = 200, message = "接口返回对象参数") @ApiResponse(code = 200, message = "接口返回对象参数")
public ResponseDto<Boolean> checkOrderTime() { public ResponseDto<Boolean> checkOrderTime() {
......
...@@ -215,7 +215,7 @@ public class KylinPerformancesController { ...@@ -215,7 +215,7 @@ public class KylinPerformancesController {
} }
@PostMapping("/checkPerformanceTime") @PostMapping("/checkPerformanceTime")
public void checkPerformanceTime(){ public ResponseDto<String> checkPerformanceTime(){
kylinPerformancesService.checkPerformanceTime(); return ResponseDto.success(kylinPerformancesService.checkPerformanceTime());
} }
} }
...@@ -787,6 +787,7 @@ public class KylinOrderTicketsServiceImpl extends ServiceImpl<KylinOrderTicketsM ...@@ -787,6 +787,7 @@ public class KylinOrderTicketsServiceImpl extends ServiceImpl<KylinOrderTicketsM
@Override @Override
public boolean checkOrderTime(String userId) { public boolean checkOrderTime(String userId) {
try {
Query query = new Query(); Query query = new Query();
query.addCriteria(Criteria.where("status").is(0).and("overdueAt").lte(LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")))); query.addCriteria(Criteria.where("status").is(0).and("overdueAt").lte(LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"))));
if (null != userId) { if (null != userId) {
...@@ -796,7 +797,7 @@ public class KylinOrderTicketsServiceImpl extends ServiceImpl<KylinOrderTicketsM ...@@ -796,7 +797,7 @@ public class KylinOrderTicketsServiceImpl extends ServiceImpl<KylinOrderTicketsM
KylinOrderTicketVo.class, KylinOrderTicketVo.class.getSimpleName()); KylinOrderTicketVo.class, KylinOrderTicketVo.class.getSimpleName());
for (KylinOrderTicketVo item : orderTicketVo) { for (KylinOrderTicketVo item : orderTicketVo) {
if(!RedisLockUtil.tryLock("order_lock:" + item.getOrderCode(),240,240)){ if (!RedisLockUtil.tryLock("order_lock:" + item.getOrderCode(), 240, 240)) {
continue; continue;
} }
RLock lock = redisLockUtil.lock("order_lock:" + item.getOrderCode(), 240); RLock lock = redisLockUtil.lock("order_lock:" + item.getOrderCode(), 240);
...@@ -842,6 +843,10 @@ public class KylinOrderTicketsServiceImpl extends ServiceImpl<KylinOrderTicketsM ...@@ -842,6 +843,10 @@ public class KylinOrderTicketsServiceImpl extends ServiceImpl<KylinOrderTicketsM
} }
} }
return true; return true;
}catch (Exception e){
e.printStackTrace();
return false;
}
} }
@Override @Override
......
...@@ -440,7 +440,13 @@ public class KylinPerformancesServiceImpl extends ServiceImpl<KylinPerformancesM ...@@ -440,7 +440,13 @@ public class KylinPerformancesServiceImpl extends ServiceImpl<KylinPerformancesM
return payDetailVo; return payDetailVo;
} }
public void checkPerformanceTime(){ public String checkPerformanceTime(){
try {
task.performanceVoStatus(null); task.performanceVoStatus(null);
return "成功";
}catch (Exception e){
e.printStackTrace();
return "失败";
}
} }
} }
...@@ -92,7 +92,7 @@ public class PerformanceVoTask { ...@@ -92,7 +92,7 @@ public class PerformanceVoTask {
LocalDateTime timeNow = LocalDateTime.now(); LocalDateTime timeNow = LocalDateTime.now();
List<String> performanceIdList = new ArrayList<>(); List<String> performanceIdList = new ArrayList<>();
if (performanceSingleId.isEmpty()) { if (performanceSingleId==null) {
List<KylinPerformanceVo> kylinPerformanceVoList = mongoTemplate.findAll(KylinPerformanceVo.class); List<KylinPerformanceVo> kylinPerformanceVoList = mongoTemplate.findAll(KylinPerformanceVo.class);
for (KylinPerformanceVo kylinPerformanceVoItem : kylinPerformanceVoList) { for (KylinPerformanceVo kylinPerformanceVoItem : kylinPerformanceVoList) {
performanceIdList.add(kylinPerformanceVoItem.getPerformancesId()); performanceIdList.add(kylinPerformanceVoItem.getPerformancesId());
......
...@@ -33,6 +33,10 @@ ...@@ -33,6 +33,10 @@
<groupId>org.springframework.cloud</groupId> <groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-openfeign</artifactId> <artifactId>spring-cloud-starter-openfeign</artifactId>
</dependency> </dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-configuration-processor</artifactId>
</dependency>
<dependency> <dependency>
<groupId>com.liquidnet</groupId> <groupId>com.liquidnet</groupId>
<artifactId>liquidnet-common-web</artifactId> <artifactId>liquidnet-common-web</artifactId>
......
...@@ -11,10 +11,11 @@ import com.netflix.zuul.ZuulFilter; ...@@ -11,10 +11,11 @@ import com.netflix.zuul.ZuulFilter;
import com.netflix.zuul.context.RequestContext; import com.netflix.zuul.context.RequestContext;
import io.jsonwebtoken.Claims; import io.jsonwebtoken.Claims;
import io.jsonwebtoken.ExpiredJwtException; import io.jsonwebtoken.ExpiredJwtException;
import lombok.Data;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value; import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
import org.springframework.util.DigestUtils; import org.springframework.util.DigestUtils;
...@@ -25,19 +26,19 @@ import java.util.List; ...@@ -25,19 +26,19 @@ import java.util.List;
import java.util.Map; import java.util.Map;
@Slf4j @Slf4j
@Data
@Component @Component
@ConfigurationProperties(prefix = "global-auth")
public class GlobalAuthFilter extends ZuulFilter { public class GlobalAuthFilter extends ZuulFilter {
@Value("#{'${global.include.url}'.split(', ')}") private List<String> includeUrl;
private List<String> includeUrls; private List<String> includeUrlPattern;
@Value("#{'${global.include.url-pattern}'.split(', ')}") private List<String> excludeUrl;
private List<String> includeUrlPatterns; private List<String> excludeUrlPattern;
@Value("#{'${global.exclude.url}'.split(', ')}")
private List<String> excludeUrls;
@Value("#{'${global.exclude.url-pattern}'.split(', ')}")
private List<String> excludeUrlPatterns;
private static final String CONTENT_TYPE = "application/json;charset=utf-8"; private static final String CONTENT_TYPE = "application/json;charset=utf-8";
private static final String AUTHORIZATION = "authorization"; private static final String AUTHORIZATION = "authorization";
private static final String TOKEN_STATUS = "token_status"; private static final String TOKEN_STATUS = "token_status";
private static final String TOKEN_ILLEGAL = "40001"; private static final String TOKEN_ILLEGAL = "40001";
private static final String TOKEN_KICK = "40002"; private static final String TOKEN_KICK = "40002";
private static final String TOKEN_INVALID = "40003"; private static final String TOKEN_INVALID = "40003";
...@@ -83,18 +84,18 @@ public class GlobalAuthFilter extends ZuulFilter { ...@@ -83,18 +84,18 @@ public class GlobalAuthFilter extends ZuulFilter {
String requestURI = ctxRequest.getRequestURI(); String requestURI = ctxRequest.getRequestURI();
if (excludeUrls.contains(requestURI)) { if (excludeUrl.contains(requestURI)) {
return false; return false;
} }
if (includeUrls.contains(requestURI)) { if (includeUrl.contains(requestURI)) {
return true; return true;
} }
for (String urlPattern : includeUrlPatterns) { for (String urlPattern : includeUrlPattern) {
if (PathMatchUtil.isPathMatch(urlPattern, requestURI)) { if (PathMatchUtil.isPathMatch(urlPattern, requestURI)) {
return true; return true;
} }
} }
for (String urlPattern : excludeUrlPatterns) { for (String urlPattern : excludeUrlPattern) {
if (PathMatchUtil.isPathMatch(urlPattern, requestURI)) { if (PathMatchUtil.isPathMatch(urlPattern, requestURI)) {
return false; return false;
} }
...@@ -110,8 +111,7 @@ public class GlobalAuthFilter extends ZuulFilter { ...@@ -110,8 +111,7 @@ public class GlobalAuthFilter extends ZuulFilter {
String uToken = zuulRequestHeaders.get(CurrentUtil.uToken); String uToken = zuulRequestHeaders.get(CurrentUtil.uToken);
log.info("headers:{}", JsonUtils.toJson(ctx.getRequest().getHeaderNames())); log.debug("headers:{}", zuulRequestHeaders);
log.info("uToken:{}", uToken);
if (StringUtils.isEmpty(uToken)) { if (StringUtils.isEmpty(uToken)) {
respHandler(ctx, TOKEN_ILLEGAL); respHandler(ctx, TOKEN_ILLEGAL);
......
...@@ -66,7 +66,7 @@ ...@@ -66,7 +66,7 @@
<dependencies> <dependencies>
<dependency> <dependency>
<groupId>org.springframework.boot</groupId> <groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId> <artifactId>spring-boot-dependencies</artifactId>
<version>${spring-boot.version}</version> <version>${spring-boot.version}</version>
<type>pom</type> <type>pom</type>
<scope>import</scope> <scope>import</scope>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment