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

Commit 92258581 authored by 胡佳晨's avatar 胡佳晨

添加 下单来源

parent f1b677e7
......@@ -5,9 +5,9 @@ import com.liquidnet.service.kylin.dto.vo.tmp.CourierListVo;
public interface DamaiService {
//同步演出
ResponseDto<Boolean> sycPerformance(String performanceId);
Boolean sycPerformance(String performanceId);
//同步场次
ResponseDto<Boolean> sycTimes(String timeId);
Boolean sycTimes(String timeId);
//同步票
ResponseDto<Boolean> sycTicket(String ticketId);
Boolean sycTicket(String ticketId);
}
......@@ -8,6 +8,7 @@ import com.liquidnet.client.admin.common.core.domain.AjaxResult;
import com.liquidnet.client.admin.common.core.page.TableDataInfo;
import com.liquidnet.client.admin.common.json.JSON;
import com.liquidnet.client.admin.zhengzai.kylin.dto.PerformanceOrderStatisCountResp;
import com.liquidnet.client.admin.zhengzai.kylin.service.impl.KylinDamaiServiceImpl;
import com.liquidnet.client.admin.zhengzai.kylin.service.impl.KylinPerformancesAdminServiceImpl;
import com.liquidnet.commons.lang.util.JsonUtils;
import com.liquidnet.service.kylin.dao.PerformanceAdminListDao;
......@@ -43,6 +44,9 @@ public class KylinPerformancesController extends BaseController {
@Autowired
private KylinPerformancesAdminServiceImpl kylinPerformancesService;
@Autowired
private KylinDamaiServiceImpl damaiService;
@RequiresPermissions("kylin:performances:view")
@GetMapping()
public String performances() {
......@@ -161,4 +165,12 @@ public class KylinPerformancesController extends BaseController {
boolean result = kylinPerformancesService.changeSysDamai(data);
return toAjax(result);
}
@RequiresPermissions("kylin:performances:damai")
@PostMapping(value = "/sync/damai")
@ResponseBody
public AjaxResult syncDamai(@RequestParam("performancesId") String performancesId) {
boolean result = damaiService.sycPerformance(performancesId);
return toAjax(result);
}
}
<!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('演出列表')" />
<th:block th:include="include :: header('演出列表')"/>
</head>
<body class="gray-bg">
<div class="container-div">
<div class="container-div">
<div class="row">
<div class="col-sm-12 search-collapse">
<form id="formId">
......@@ -64,8 +64,10 @@
</select>
</li>
<li>
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i
class="fa fa-search"></i>&nbsp;搜索</a>
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i
class="fa fa-refresh"></i>&nbsp;重置</a>
</li>
</ul>
</div>
......@@ -76,10 +78,12 @@
<a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="kylin:performances:add">
<i class="fa fa-plus"></i> 添加
</a>
<a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="kylin:performances:edit">
<a class="btn btn-primary single disabled" onclick="$.operate.edit()"
shiro:hasPermission="kylin:performances:edit">
<i class="fa fa-edit"></i> 修改
</a>
<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="kylin:performances:remove">
<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()"
shiro:hasPermission="kylin:performances:remove">
<i class="fa fa-remove"></i> 删除
</a>
<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="kylin:performances:export">
......@@ -90,14 +94,14 @@
<table id="bootstrap-table"></table>
</div>
</div>
</div>
<th:block th:include="include :: footer" />
<script th:inline="javascript">
</div>
<th:block th:include="include :: footer"/>
<script th:inline="javascript">
var detailFlag = [[${@permission.hasPermi('kylin:performances:detail')}]];
var expertFlag = [[${@permission.hasPermi('kylin:performances:expert')}]];
var prefix = ctx + "kylin/performances";
$(function() {
$(function () {
var options = {
url: prefix + "/list",
detailUrl: prefix + "/details/{id}",
......@@ -142,10 +146,6 @@
field: 'rejectTxt',
title: '拒绝理由'
},
// {
// field: 'provinceName',
// title: '转增状态'
// },
{
field: 'sort',
title: '排序',
......@@ -154,16 +154,24 @@
{
title: '操作',
align: 'center',
formatter: function(value, row, index) {
formatter: function (value, row, index) {
var actions = [];
actions.push('<a class="btn btn-success btn-xs ' + detailFlag + '" href="javascript:void(0)" onclick="$.operate.detailTab(\'' + row.performancesId + '\')"><i class="fa fa-edit"></i>查看</a> ');
actions.push('<a class="btn btn-danger btn-xs ' + expertFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.mid + '\')"><i class="fa fa-remove"></i>导出</a>');
if (row.syncDamai == 1) {
actions.push('<a class="btn btn-warning btn-xs ' + expertFlag + '" href="javascript:void(0)" onclick="f(\'' + row.performancesId + '\')"><i class="fa fa-remove"></i>同步</a>');
}
return actions.join('');
}
}]
};
$.table.init(options);
});
</script>
function f(id) {
$.post(prefix + "/sync/damai",{performancesId:id},function (res) {
alert(res.msg)
});
}
</script>
</body>
</html>
\ No newline at end of file
......@@ -46,17 +46,17 @@ public class KylinDamaiServiceImpl extends ServiceImpl<KylinRoadShowsMapper, Kyl
@Override
public ResponseDto<Boolean> sycPerformance(String performanceId) {
return null;
public Boolean sycPerformance(String performanceId) {
return false;
}
@Override
public ResponseDto<Boolean> sycTimes(String timeId) {
return null;
public Boolean sycTimes(String timeId) {
return false;
}
@Override
public ResponseDto<Boolean> sycTicket(String ticketId) {
return null;
public Boolean sycTicket(String ticketId) {
return false;
}
}
......@@ -19,6 +19,7 @@ public class PerformanceAdminListDao {
private Integer saleGeneral;
private Integer totalSalePrice;
private Integer surplusGeneral;
private Integer syncDamai;
private String rejectTxt;
private Integer sort;
private String createdAt;
......
......@@ -34,6 +34,7 @@
<result column="sort" property="sort"/>
<result column="audit_time" property="auditTime"/>
<result column="sponsor" property="sponsor"/>
<result column="sync_damai" property="syncDamai"/>
<result column="created_at" property="createdAt"/>
</resultMap>
......@@ -178,6 +179,7 @@
p.type,
p.time_start ,
p.time_end ,
ps.sync_damai ,
IFNULL(t.total_general , 0) AS 'total_general' ,
IFNULL(ot.sale_general , 0) AS 'sale_general' ,
IFNULL(ot.total_sale_price , 0) AS 'total_sale_price' ,
......
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