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

Commit 5f17bfdc authored by Administrator's avatar Administrator 🎨

Merge branch 'pre' into 'master'

Pre

See merge request !88
parents 71ae8f3f be643502
...@@ -33,8 +33,8 @@ public class KylinTableStatusConst { ...@@ -33,8 +33,8 @@ public class KylinTableStatusConst {
public static final Integer ORDER_REFUND_STATUS_REFUNDED = 4; // 完成退款 public static final Integer ORDER_REFUND_STATUS_REFUNDED = 4; // 完成退款
public static final Integer ORDER_REFUND_STATUS_REJECT = 5; // 运营审核驳回退款 等同取消 public static final Integer ORDER_REFUND_STATUS_REJECT = 5; // 运营审核驳回退款 等同取消
public static final Integer ORDER_REFUND_STATUS_ERROR = 6; // 退款失败 public static final Integer ORDER_REFUND_STATUS_ERROR = 6; // 退款失败
public static final Integer ORDER_REFUND_STATUS_UNFILLED = 7; // 二审同意 等待退款 public static final Integer ORDER_REFUND_STATUS_UNFILLED = 7; // 财务审核同意 等待退款
public static final Integer ORDER_REFUND_STATUS_REFUSE = 8; // 二审拒绝 public static final Integer ORDER_REFUND_STATUS_REFUSE = 8; // 财务审核拒绝
public static final Integer ORDER_REFUND_STATUS_TICKET = 9; // 票务确认收货 public static final Integer ORDER_REFUND_STATUS_TICKET = 9; // 票务确认收货
public static final Integer ORDER_REFUND_TYPE_APPLY = 0; // 客服、票务人工申请,可以取消退款,回调再处理库存和券 public static final Integer ORDER_REFUND_TYPE_APPLY = 0; // 客服、票务人工申请,可以取消退款,回调再处理库存和券
...@@ -81,4 +81,6 @@ public class KylinTableStatusConst { ...@@ -81,4 +81,6 @@ public class KylinTableStatusConst {
public static final Integer ORDER_EXPRESS_STATUS1 = 1; // 申请 顺丰返回失败 未下单 未发快递 public static final Integer ORDER_EXPRESS_STATUS1 = 1; // 申请 顺丰返回失败 未下单 未发快递
public static final Integer ORDER_EXPRESS_STATUS2 = 2; // 申请 顺丰返回成功 或 通过主动再查询更新 public static final Integer ORDER_EXPRESS_STATUS2 = 2; // 申请 顺丰返回成功 或 通过主动再查询更新
public static final Integer ORDER_EXPRESS_STATUS3 = 3; // 取消 public static final Integer ORDER_EXPRESS_STATUS3 = 3; // 取消
public static final Integer ORDER_EXPRESS_STATUS80 = 80; // 签收
public static final Integer ORDER_EXPRESS_STATUS8000 = 8000; // 签收结单
} }
...@@ -83,7 +83,7 @@ public enum BusinessType ...@@ -83,7 +83,7 @@ public enum BusinessType
AUDIT, AUDIT,
/** /**
* 二审 15 * 财务审核 15
*/ */
AUDIT2, AUDIT2,
......
...@@ -15,14 +15,14 @@ INSERT INTO test_ln_scene.sys_menu (menu_id, menu_name, parent_id, order_num, ur ...@@ -15,14 +15,14 @@ INSERT INTO test_ln_scene.sys_menu (menu_id, menu_name, parent_id, order_num, ur
INSERT INTO test_ln_scene.sys_menu (menu_id, menu_name, parent_id, order_num, url, target, menu_type, visible, is_refresh, perms, icon, create_by, create_time, update_by, update_time, remark) VALUES (2012, '取消', 2007, 1, '#', 'menuItem', 'F', '0', '1', 'kylin:refund:cancel', '#', 'admin', '2021-06-02 16:48:35', '', null, ''); INSERT INTO test_ln_scene.sys_menu (menu_id, menu_name, parent_id, order_num, url, target, menu_type, visible, is_refresh, perms, icon, create_by, create_time, update_by, update_time, remark) VALUES (2012, '取消', 2007, 1, '#', 'menuItem', 'F', '0', '1', 'kylin:refund:cancel', '#', 'admin', '2021-06-02 16:48:35', '', null, '');
INSERT INTO test_ln_scene.sys_menu (menu_id, menu_name, parent_id, order_num, url, target, menu_type, visible, is_refresh, perms, icon, create_by, create_time, update_by, update_time, remark) VALUES (2013, '提交申请', 2007, 2, '#', 'menuItem', 'F', '0', '1', 'kylin:refund:apple', '#', 'admin', '2021-06-02 16:49:18', '', null, ''); INSERT INTO test_ln_scene.sys_menu (menu_id, menu_name, parent_id, order_num, url, target, menu_type, visible, is_refresh, perms, icon, create_by, create_time, update_by, update_time, remark) VALUES (2013, '提交申请', 2007, 2, '#', 'menuItem', 'F', '0', '1', 'kylin:refund:apple', '#', 'admin', '2021-06-02 16:49:18', '', null, '');
INSERT INTO test_ln_scene.sys_menu (menu_id, menu_name, parent_id, order_num, url, target, menu_type, visible, is_refresh, perms, icon, create_by, create_time, update_by, update_time, remark) VALUES (2014, '运营审核', 2007, 3, '#', 'menuItem', 'F', '0', '1', 'kylin:refund:review', '#', 'admin', '2021-06-02 16:50:17', '', null, ''); INSERT INTO test_ln_scene.sys_menu (menu_id, menu_name, parent_id, order_num, url, target, menu_type, visible, is_refresh, perms, icon, create_by, create_time, update_by, update_time, remark) VALUES (2014, '运营审核', 2007, 3, '#', 'menuItem', 'F', '0', '1', 'kylin:refund:review', '#', 'admin', '2021-06-02 16:50:17', '', null, '');
INSERT INTO test_ln_scene.sys_menu (menu_id, menu_name, parent_id, order_num, url, target, menu_type, visible, is_refresh, perms, icon, create_by, create_time, update_by, update_time, remark) VALUES (2015, '二审', 2007, 4, '#', 'menuItem', 'F', '0', '1', 'kylin:refund:execute', '#', 'admin', '2021-06-02 16:50:44', '', null, ''); INSERT INTO test_ln_scene.sys_menu (menu_id, menu_name, parent_id, order_num, url, target, menu_type, visible, is_refresh, perms, icon, create_by, create_time, update_by, update_time, remark) VALUES (2015, '财务审核', 2007, 4, '#', 'menuItem', 'F', '0', '1', 'kylin:refund:execute', '#', 'admin', '2021-06-02 16:50:44', '', null, '');
INSERT INTO test_ln_scene.sys_menu (menu_id, menu_name, parent_id, order_num, url, target, menu_type, visible, is_refresh, perms, icon, create_by, create_time, update_by, update_time, remark) VALUES (2016, '主动完成退款', 2007, 5, '#', 'menuItem', 'F', '0', '1', 'kylin:refund:completed', '#', 'admin', '2021-06-02 16:53:42', '', null, ''); INSERT INTO test_ln_scene.sys_menu (menu_id, menu_name, parent_id, order_num, url, target, menu_type, visible, is_refresh, perms, icon, create_by, create_time, update_by, update_time, remark) VALUES (2016, '主动完成退款', 2007, 5, '#', 'menuItem', 'F', '0', '1', 'kylin:refund:completed', '#', 'admin', '2021-06-02 16:53:42', '', null, '');
INSERT INTO test_ln_scene.sys_menu (menu_id, menu_name, parent_id, order_num, url, target, menu_type, visible, is_refresh, perms, icon, create_by, create_time, update_by, update_time, remark) VALUES (2008, '演出退款管理', 2006, 1, '/kylin/refundBatch', 'menuItem', 'C', '0', '1', 'kylin:refundBatch:list', '#', 'admin', '2021-06-01 11:07:19', '', null, ''); INSERT INTO test_ln_scene.sys_menu (menu_id, menu_name, parent_id, order_num, url, target, menu_type, visible, is_refresh, perms, icon, create_by, create_time, update_by, update_time, remark) VALUES (2008, '演出退款管理', 2006, 1, '/kylin/refundBatch', 'menuItem', 'C', '0', '1', 'kylin:refundBatch:list', '#', 'admin', '2021-06-01 11:07:19', '', null, '');
INSERT INTO test_ln_scene.sys_menu (menu_id, menu_name, parent_id, order_num, url, target, menu_type, visible, is_refresh, perms, icon, create_by, create_time, update_by, update_time, remark) VALUES (2018, '详情', 2008, 0, '#', 'menuItem', 'F', '0', '1', 'kylin:refundBatch:detail', '#', 'admin', '2021-06-03 19:21:53', '', null, ''); INSERT INTO test_ln_scene.sys_menu (menu_id, menu_name, parent_id, order_num, url, target, menu_type, visible, is_refresh, perms, icon, create_by, create_time, update_by, update_time, remark) VALUES (2018, '详情', 2008, 0, '#', 'menuItem', 'F', '0', '1', 'kylin:refundBatch:detail', '#', 'admin', '2021-06-03 19:21:53', '', null, '');
INSERT INTO test_ln_scene.sys_menu (menu_id, menu_name, parent_id, order_num, url, target, menu_type, visible, is_refresh, perms, icon, create_by, create_time, update_by, update_time, remark) VALUES (2019, '取消', 2008, 1, '#', 'menuItem', 'F', '0', '1', 'kylin:refundBatch:cancel', '#', 'admin', '2021-06-03 19:22:25', '', null, ''); INSERT INTO test_ln_scene.sys_menu (menu_id, menu_name, parent_id, order_num, url, target, menu_type, visible, is_refresh, perms, icon, create_by, create_time, update_by, update_time, remark) VALUES (2019, '取消', 2008, 1, '#', 'menuItem', 'F', '0', '1', 'kylin:refundBatch:cancel', '#', 'admin', '2021-06-03 19:22:25', '', null, '');
INSERT INTO test_ln_scene.sys_menu (menu_id, menu_name, parent_id, order_num, url, target, menu_type, visible, is_refresh, perms, icon, create_by, create_time, update_by, update_time, remark) VALUES (2020, '提交申请', 2008, 2, '#', 'menuItem', 'F', '0', '1', 'kylin:refundBatch:apply', '#', 'admin', '2021-06-03 19:22:55', '', null, ''); INSERT INTO test_ln_scene.sys_menu (menu_id, menu_name, parent_id, order_num, url, target, menu_type, visible, is_refresh, perms, icon, create_by, create_time, update_by, update_time, remark) VALUES (2020, '提交申请', 2008, 2, '#', 'menuItem', 'F', '0', '1', 'kylin:refundBatch:apply', '#', 'admin', '2021-06-03 19:22:55', '', null, '');
INSERT INTO test_ln_scene.sys_menu (menu_id, menu_name, parent_id, order_num, url, target, menu_type, visible, is_refresh, perms, icon, create_by, create_time, update_by, update_time, remark) VALUES (2021, '运营审核', 2008, 3, '#', 'menuItem', 'F', '0', '1', 'kylin:refundBatch:review', '#', 'admin', '2021-06-03 19:23:27', '', null, ''); INSERT INTO test_ln_scene.sys_menu (menu_id, menu_name, parent_id, order_num, url, target, menu_type, visible, is_refresh, perms, icon, create_by, create_time, update_by, update_time, remark) VALUES (2021, '运营审核', 2008, 3, '#', 'menuItem', 'F', '0', '1', 'kylin:refundBatch:review', '#', 'admin', '2021-06-03 19:23:27', '', null, '');
INSERT INTO test_ln_scene.sys_menu (menu_id, menu_name, parent_id, order_num, url, target, menu_type, visible, is_refresh, perms, icon, create_by, create_time, update_by, update_time, remark) VALUES (2022, '二审', 2008, 4, '#', 'menuItem', 'F', '0', '1', 'kylin:refundBatch:execute', '#', 'admin', '2021-06-03 19:23:52', '', null, ''); INSERT INTO test_ln_scene.sys_menu (menu_id, menu_name, parent_id, order_num, url, target, menu_type, visible, is_refresh, perms, icon, create_by, create_time, update_by, update_time, remark) VALUES (2022, '财务审核', 2008, 4, '#', 'menuItem', 'F', '0', '1', 'kylin:refundBatch:execute', '#', 'admin', '2021-06-03 19:23:52', '', null, '');
INSERT INTO test_ln_scene.sys_menu (menu_id, menu_name, parent_id, order_num, url, target, menu_type, visible, is_refresh, perms, icon, create_by, create_time, update_by, update_time, remark) VALUES (2023, '会员管理', 2000, 3, '#', 'menuItem', 'C', '0', '1', '', '#', 'admin', '2021-06-06 17:24:23', 'admin', '2021-06-07 20:02:44', ''); INSERT INTO test_ln_scene.sys_menu (menu_id, menu_name, parent_id, order_num, url, target, menu_type, visible, is_refresh, perms, icon, create_by, create_time, update_by, update_time, remark) VALUES (2023, '会员管理', 2000, 3, '#', 'menuItem', 'C', '0', '1', '', '#', 'admin', '2021-06-06 17:24:23', 'admin', '2021-06-07 20:02:44', '');
INSERT INTO test_ln_scene.sys_menu (menu_id, menu_name, parent_id, order_num, url, target, menu_type, visible, is_refresh, perms, icon, create_by, create_time, update_by, update_time, remark) VALUES (2024, '会员订单', 2023, 1, '/adam/order/orderList', 'menuItem', 'C', '0', '1', null, '#', 'admin', '2021-06-06 17:26:44', '', null, ''); INSERT INTO test_ln_scene.sys_menu (menu_id, menu_name, parent_id, order_num, url, target, menu_type, visible, is_refresh, perms, icon, create_by, create_time, update_by, update_time, remark) VALUES (2024, '会员订单', 2023, 1, '/adam/order/orderList', 'menuItem', 'C', '0', '1', null, '#', 'admin', '2021-06-06 17:26:44', '', null, '');
......
...@@ -2,15 +2,19 @@ package com.liquidnet.client.admin.web.controller.zhengzai.tools; ...@@ -2,15 +2,19 @@ package com.liquidnet.client.admin.web.controller.zhengzai.tools;
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.utils.poi.ExcelUtil; import com.liquidnet.client.admin.common.utils.poi.ExcelUtil;
import com.liquidnet.client.admin.zhengzai.kylin.dto.OrderExportVo; import com.liquidnet.client.admin.zhengzai.kylin.dto.OrderExportVo;
import com.liquidnet.client.admin.zhengzai.kylin.dto.OrderOutLineVo; import com.liquidnet.client.admin.zhengzai.kylin.dto.OrderOutLineVo;
import com.liquidnet.client.admin.zhengzai.kylin.service.IExportService; import com.liquidnet.client.admin.zhengzai.kylin.service.IExportService;
import com.liquidnet.client.admin.zhengzai.kylin.service.IToolService;
import com.liquidnet.service.kylin.entity.KylinOrderTicketEntities;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller; 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.util.ArrayList;
import java.util.List; import java.util.List;
@Controller @Controller
...@@ -20,22 +24,42 @@ public class ToolsBaseController extends BaseController { ...@@ -20,22 +24,42 @@ public class ToolsBaseController extends BaseController {
private String prefix = "zhengzai/tools"; private String prefix = "zhengzai/tools";
@Autowired @Autowired
private IExportService exportService; private IExportService exportService;
@Autowired
private IToolService toolService;
@GetMapping() @GetMapping()
public String tools() { public String tools() {
return prefix + "/tools"; return prefix + "/tools";
} }
/**
* 路径跳转
*
* @param id
* @param mmap
* @return
*/
@GetMapping(value = "/details/{id}") @GetMapping(value = "/details/{id}")
public String detailsRoadShow(@PathVariable("id") Integer id, ModelMap mmap) { public String detailsRoadShow(@PathVariable("id") Integer id, ModelMap mmap) {
if (id == 1) { if (id == 1) {
mmap.put("url", "/tools/export/mobile"); mmap.put("url", "/tools/export/mobile");
return prefix + "/fun1"; return prefix + "/fun1";//导出手机号
} else if (id == 2) {
mmap.put("url_info", "/tools/order/enter");
mmap.put("url_single", "/tools/order/getSingleEnter");
return prefix + "/fun2";//订单修改入场人
} else { } else {
return prefix + "/edit"; return prefix + "/edit";
} }
} }
/**
* 导出手机号
*
* @param mobileType
* @param performanceId
* @return
*/
@PostMapping("/export/mobile") @PostMapping("/export/mobile")
@ResponseBody @ResponseBody
public AjaxResult exportMobile(Integer mobileType, String performanceId) { public AjaxResult exportMobile(Integer mobileType, String performanceId) {
...@@ -57,4 +81,52 @@ public class ToolsBaseController extends BaseController { ...@@ -57,4 +81,52 @@ public class ToolsBaseController extends BaseController {
ExcelUtil<OrderExportVo> util = new ExcelUtil(OrderExportVo.class); ExcelUtil<OrderExportVo> util = new ExcelUtil(OrderExportVo.class);
return util.exportExcel(list, list.get(0).getPerformanceTitle() + "-" + mobileType); return util.exportExcel(list, list.get(0).getPerformanceTitle() + "-" + mobileType);
} }
/**
* 根据订单号获取入场人信息
*
* @param orderCode
* @return
*/
@PostMapping("/order/enter")
@ResponseBody
public TableDataInfo getOrderTicketEnterByOrderCode(String orderCode, ModelMap mmap) {
List<KylinOrderTicketEntities> data = toolService.getOrderTicketEnterByOrderCode(orderCode);
TableDataInfo rspData = new TableDataInfo();
rspData.setCode(0);
if (data != null) {
rspData.setRows(data);
rspData.setTotal(data.size());
} else {
rspData.setRows(new ArrayList<>());
rspData.setTotal(0);
}
return rspData;
}
/**
* 根据票单id查询票单入场人
*
* @param orderTicketEntitiesId
* @return
*/
@GetMapping("/order/getSingleEnter/{orderTicketEntitiesId}")
public String getSingleEnter(@PathVariable("orderTicketEntitiesId") String orderTicketEntitiesId, ModelMap mmap) {
KylinOrderTicketEntities data = toolService.getSingleEnter(orderTicketEntitiesId);
mmap.put("dataInfo", data);
mmap.put("url_change", "/tools/order/enterChange");
return prefix + "/fun2Details";
}
/**
* 根据订单号获取入场人信息
*
* @param orderId
* @return
*/
@PostMapping("/order/enterChange")
@ResponseBody
public AjaxResult getOrderTicketEnterByOrderCode(String orderTicketEntitiesId, String enterName, String enterMobile, String enterIdCode, Integer enterType, String orderId) {
return AjaxResult.success(toolService.supplementEnter(orderTicketEntitiesId, enterName, enterMobile, enterIdCode, enterType, orderId));
}
} }
...@@ -459,6 +459,9 @@ ...@@ -459,6 +459,9 @@
case 80: case 80:
expressStatusName = '已签收'; expressStatusName = '已签收';
break; break;
case 8000:
expressStatusName = '已签收';
break;
default: default:
expressStatusName = '运输中'; expressStatusName = '运输中';
break; break;
......
<!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="white-bg">
<div class="form-horizontal m wrapper wrapper-content animated fadeInRight ibox-content">
<div class="col-sm-12 search-collapse">
<form id="formId">
<div class="select-list">
<ul>
<li>
<label>订单号:</label>
<input type="text" name="orderCode"/>
</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>重置</a>
</li>
</ul>
</div>
</form>
</div>
<div class="form-group">
<table id="bootstrap-table"></table>
</div>
</div>
<th:block th:include="include :: footer"/>
<script th:inline="javascript">
var certificateType = [[${@dict.getType('zhengzai_certificate_type')}]];
var options = {
url: [[${url_info}]],
modalName: "入场人信息",
orderSc: "desc",
orderItem: "created_at",
updateUrl: [[${url_single}]] + "/{id}",
columns: [
{
field: 'orderTicketEntitiesId',
title: '票单id'
}, {
field: 'enterName',
title: '入场人姓名'
}, {
field: 'enterMobile',
title: '入场人手机号'
}, {
field: 'enterIdCode',
title: '入场人证件号'
}, {
field: 'enterType',
title: '证件类型',
formatter: function(value, row, index) {
return $.table.selectDictLabel(certificateType, value);
}
},
{
title: '操作',
align: 'center',
formatter: function (value, row, index) {
var actions = [];
actions.push('<a class="btn btn-success btn-xs " href="javascript:void(0)" onclick="$.operate.edit(\'' + row.orderTicketEntitiesId + '\')"><i class="fa fa-edit"></i>修改</a> ');
return actions.join('');
}
}]
};
$.table.init(options);
// }
</script>
</body>
</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="white-bg">
<div class="form-horizontal m wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-fun2Details-edit"
th:object="${dataInfo}">
<div class="form-group">
<label class="col-sm-3 control-label is-required">入场人姓名:</label>
<div class="col-sm-8">
<input name="enterName" th:field="*{enterName}" class="form-control" type="text" ly>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">入场人电话:</label>
<div class="col-sm-8">
<input name="enterMobile" th:field="*{enterMobile}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">入场人证件号:</label>
<div class="col-sm-8">
<input name="enterIdCode" th:field="*{enterIdCode}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">入场人证件类型:</label>
<div class="col-sm-8">
<!-- <input name="enterType" th:value="${@dict.getLabel('zhengzai_certificate_type',dataInfo.enterType)}"-->
<!-- class="form-control" type="text" required>-->
<select name="enterType" th:with="type=${@dict.getType('zhengzai_certificate_type')}">
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:selected="${dict.dictValue} == ${dataInfo.enterType}"></option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">入场人票单id:</label>
<div class="col-sm-8">
<input name="orderTicketEntitiesId" th:field="*{orderTicketEntitiesId}" class="form-control" type="text"
required readonly>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">订单id:</label>
<div class="col-sm-8">
<input name="orderId" th:field="*{orderId}" class="form-control" type="text"
required readonly>
</div>
</div>
</form>
</div>
<th:block th:include="include :: footer"/>
<script th:inline="javascript">
$("#form-fun2Details-edit").validate({
focusCleanup: true
});
function submitHandler() {
if ($.validate.form()) {
$.operate.save([[${url_change}]], $('#form-fun2Details-edit').serialize());
}
}
</script>
</body>
</html>
...@@ -23,6 +23,11 @@ ...@@ -23,6 +23,11 @@
导出演出订单手机号 导出演出订单手机号
</button> </button>
<button id="fun2" type="button" class="btn btn-w-m btn-success" href="javascript:void(0)"
onclick="$.operate.detail(2)">
修改订单入场人
</button>
</div> </div>
</form> </form>
</div> </div>
...@@ -32,13 +37,18 @@ ...@@ -32,13 +37,18 @@
var options = { var options = {
url: prefix, url: prefix,
modalName: "", modalName: "",
updateUrl: prefix + "details/{id}" updateUrl: prefix + "details/{id}",
detailUrl: prefix + "details/{id}"
}; };
$.table.init(options); $.table.init(options);
var fun1Flag = [[${@permission.hasPermi('tools:fun1')}]]; var fun1Flag = [[${@permission.hasPermi('tools:fun1')}]];
var fun2Flag = [[${@permission.hasPermi('tools:fun2')}]];
if (fun1Flag == "hidden") { if (fun1Flag == "hidden") {
document.getElementById("fun1").style.display = "none"; document.getElementById("fun1").style.display = "none";
} }
if (fun2Flag == "hidden") {
document.getElementById("fun2").style.display = "none";
}
</script> </script>
</body> </body>
</html> </html>
package com.liquidnet.client.admin.zhengzai.kylin.dto;
import lombok.Data;
import java.util.List;
/**
* @author AnJiabin <anjiabin@zhengzai.tv>
* @version V1.0
* @class: PerformanceCalendarReq
* @Package com.liquidnet.client.admin.zhengzai.kylin.dto
* @Copyright: LightNet @ Copyright (c) 2021
* @date 2021/6/1 15:47
*/
@Data
public class ChangeOrderEnterResp {
private String orderTicketEntitiesId;
private Integer enterType;
private String enterName;
private String enterMobile;
private String enterIdCard;
}
package com.liquidnet.client.admin.zhengzai.kylin.service;
import com.liquidnet.service.kylin.entity.KylinOrderTicketEntities;
import java.util.List;
public interface IToolService {
/**
* 修改订单入场人
*
* @param enterIdCard
* @param enterMobile
* @param enterName
* @param enterType
* @param orderTicketEntitiesId
* @return
*/
Boolean supplementEnter(String orderTicketEntitiesId, String enterName, String enterMobile, String enterIdCard, Integer enterType,String orderId);
/**
* 根据入场人id
*
* @param orderTicketEntitiesId
* @return
*/
KylinOrderTicketEntities getSingleEnter(String orderTicketEntitiesId);
/**
* 根据订单号查询 订单入场人信息
*
* @param orderCode
* @return
*/
List<KylinOrderTicketEntities> getOrderTicketEnterByOrderCode(String orderCode);
}
...@@ -164,7 +164,8 @@ public class KylinDamaiServiceImpl extends ServiceImpl<KylinRoadShowsMapper, Kyl ...@@ -164,7 +164,8 @@ public class KylinDamaiServiceImpl extends ServiceImpl<KylinRoadShowsMapper, Kyl
obj1.setProjectId(performancesmId); obj1.setProjectId(performancesmId);
obj1.setVenueId(venueId); obj1.setVenueId(venueId);
obj1.setStartTime(StringUtils.parseDateTime(timesData.getUseStart().format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")))); obj1.setStartTime(StringUtils.parseDateTime(timesData.getUseStart().format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"))));
obj1.setEndTime(StringUtils.parseDateTime(timesData.getUseEnd().format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")))); obj1.setEndTime(StringUtils.parseDateTime(timesData.getUseEnd().plusDays(1).minusSeconds(1L).format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"))));
// obj1.setEndTime(StringUtils.parseDateTime(timesData.getUseEnd().format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"))));
obj1.setSupplierSecret(taobaoTicketUtils.getSupplierSecret()); obj1.setSupplierSecret(taobaoTicketUtils.getSupplierSecret());
obj1.setSystemId(taobaoTicketUtils.getSystemId()); obj1.setSystemId(taobaoTicketUtils.getSystemId());
req.setPushPerformParam(obj1); req.setPushPerformParam(obj1);
...@@ -309,4 +310,9 @@ public class KylinDamaiServiceImpl extends ServiceImpl<KylinRoadShowsMapper, Kyl ...@@ -309,4 +310,9 @@ public class KylinDamaiServiceImpl extends ServiceImpl<KylinRoadShowsMapper, Kyl
return null; return null;
} }
} }
public static void main(String[] args) {
Long a=IDGenerator.getDamaiCode("397341627879178278349754");
System.out.println(a);
}
} }
...@@ -132,12 +132,14 @@ public class PerformancesExpressServiceImpl extends ServiceImpl<KylinOrderExpres ...@@ -132,12 +132,14 @@ public class PerformancesExpressServiceImpl extends ServiceImpl<KylinOrderExpres
// 运输中 // 运输中
Integer total2 = kylinOrderExpressMapper.selectCount( Integer total2 = kylinOrderExpressMapper.selectCount(
Wrappers.lambdaQuery(KylinOrderExpress.class).gt(KylinOrderExpress::getExpressStatus, 3) Wrappers.lambdaQuery(KylinOrderExpress.class).gt(KylinOrderExpress::getExpressStatus, 3)
.ne(KylinOrderExpress::getExpressStatus, 80) .ne(KylinOrderExpress::getExpressStatus, KylinTableStatusConst.ORDER_EXPRESS_STATUS80)
.ne(KylinOrderExpress::getExpressStatus, KylinTableStatusConst.ORDER_EXPRESS_STATUS8000)
.eq(KylinOrderExpress::getPerformancesId, info.getPerformancesId()) .eq(KylinOrderExpress::getPerformancesId, info.getPerformancesId())
); );
// 已签收 // 已签收
Integer[] statusList = new Integer[]{KylinTableStatusConst.ORDER_EXPRESS_STATUS80, KylinTableStatusConst.ORDER_EXPRESS_STATUS8000};
Integer total3 = kylinOrderExpressMapper.selectCount( Integer total3 = kylinOrderExpressMapper.selectCount(
Wrappers.lambdaQuery(KylinOrderExpress.class).eq(KylinOrderExpress::getExpressStatus, 80) Wrappers.lambdaQuery(KylinOrderExpress.class).in(KylinOrderExpress::getExpressStatus, statusList)
.eq(KylinOrderExpress::getPerformancesId, info.getPerformancesId()) .eq(KylinOrderExpress::getPerformancesId, info.getPerformancesId())
); );
info.setTotal1(total1); info.setTotal1(total1);
......
package com.liquidnet.client.admin.zhengzai.kylin.service.impl;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.fasterxml.jackson.core.type.TypeReference;
import com.liquidnet.client.admin.zhengzai.kylin.dto.ChangeOrderEnterResp;
import com.liquidnet.client.admin.zhengzai.kylin.service.IToolService;
import com.liquidnet.client.admin.zhengzai.kylin.utils.DataUtils;
import com.liquidnet.commons.lang.util.DateUtil;
import com.liquidnet.commons.lang.util.JsonUtils;
import com.liquidnet.service.kylin.dto.vo.mongo.KylinOrderTicketEntitiesVo;
import com.liquidnet.service.kylin.entity.KylinOrderTicketEntities;
import com.liquidnet.service.kylin.entity.KylinOrderTickets;
import com.liquidnet.service.kylin.mapper.KylinOrderTicketEntitiesMapper;
import com.liquidnet.service.kylin.mapper.KylinOrderTicketsMapper;
import lombok.extern.slf4j.Slf4j;
import org.bson.Document;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.mongodb.core.MongoTemplate;
import org.springframework.data.mongodb.core.query.Criteria;
import org.springframework.data.mongodb.core.query.Query;
import org.springframework.stereotype.Service;
import java.time.LocalDateTime;
import java.util.List;
@Service
@Slf4j
public class ToolServiceImpl implements IToolService {
@Autowired
private MongoTemplate mongoTemplate;
@Autowired
private DataUtils dataUtils;
@Autowired
private KylinOrderTicketEntitiesMapper kylinOrderTicketEntitiesMapper;
@Autowired
private KylinOrderTicketsMapper kylinOrderTicketsMapper;
@Override
public Boolean supplementEnter(String orderTicketEntitiesId, String enterName, String enterMobile, String enterIdCode, Integer enterType, String orderId) {
mongoTemplate.getCollection(KylinOrderTicketEntitiesVo.class.getSimpleName()).updateOne(
Query.query(Criteria.where("orderTicketEntitiesId").is(orderTicketEntitiesId)).getQueryObject(),
new Document("$set", new Document("enterType", enterType)
.append("enterName", enterName)
.append("enterMobile", enterMobile)
.append("enterIdCode", enterIdCode)
.append("updatedAt", DateUtil.Formatter.yyyyMMddHHmmss.format(LocalDateTime.now())))
);
KylinOrderTicketEntities orderTicketEntities = KylinOrderTicketEntities.getNew();
orderTicketEntities.setEnterType(enterType);
orderTicketEntities.setEnterName(enterName);
orderTicketEntities.setEnterMobile(enterMobile);
orderTicketEntities.setEnterIdCode(enterIdCode);
orderTicketEntities.setUpdatedAt(LocalDateTime.now());
kylinOrderTicketEntitiesMapper.update(orderTicketEntities, Wrappers.lambdaUpdate(KylinOrderTicketEntities.class).eq(KylinOrderTicketEntities::getOrderTicketEntitiesId, orderTicketEntitiesId));
dataUtils.delOrderTicketRedis(orderId);
return true;
}
@Override
public KylinOrderTicketEntities getSingleEnter(String orderTicketEntitiesId) {
KylinOrderTicketEntities entitiesList = kylinOrderTicketEntitiesMapper.selectOne(Wrappers.lambdaUpdate(KylinOrderTicketEntities.class).eq(KylinOrderTicketEntities::getOrderTicketEntitiesId, orderTicketEntitiesId));
return entitiesList;
}
@Override
public List<KylinOrderTicketEntities> getOrderTicketEnterByOrderCode(String orderCode) {
KylinOrderTickets orderTickets = kylinOrderTicketsMapper.selectOne(Wrappers.lambdaUpdate(KylinOrderTickets.class).eq(KylinOrderTickets::getOrderCode, orderCode));
if (orderTickets == null) {
return null;
}
String orderId = orderTickets.getOrderTicketsId();
List<KylinOrderTicketEntities> entitiesList = kylinOrderTicketEntitiesMapper.selectList(Wrappers.lambdaUpdate(KylinOrderTicketEntities.class).eq(KylinOrderTicketEntities::getOrderId, orderId));
return entitiesList;
}
}
...@@ -339,7 +339,8 @@ ...@@ -339,7 +339,8 @@
${expressStatus} ${expressStatus}
</if> </if>
<if test="expressStatus == 1">AND (oe.express_status IS NULL OR oe.express_status = ${expressStatus})</if> <if test="expressStatus == 1">AND (oe.express_status IS NULL OR oe.express_status = ${expressStatus})</if>
<if test="expressStatus == 70">AND (oe.express_status > 3 AND oe.express_status != 80)</if> <if test="expressStatus == 70">AND (oe.express_status > 3 AND oe.express_status != 80 AND oe.express_status != 8000)</if>
<if test="expressStatus == 80">AND (oe.express_status = 80 OR oe.express_status = 8000)</if>
<if test="mailno != ''">AND oe.mailno LIKE concat('%', #{mailno}, '%')</if> <if test="mailno != ''">AND oe.mailno LIKE concat('%', #{mailno}, '%')</if>
</where> </where>
......
...@@ -5,6 +5,7 @@ import feign.hystrix.FallbackFactory; ...@@ -5,6 +5,7 @@ import feign.hystrix.FallbackFactory;
import org.springframework.cloud.openfeign.FeignClient; import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
@Component @Component
@FeignClient(name = "liquidnet-service-sweet", @FeignClient(name = "liquidnet-service-sweet",
...@@ -14,6 +15,6 @@ import org.springframework.web.bind.annotation.GetMapping; ...@@ -14,6 +15,6 @@ import org.springframework.web.bind.annotation.GetMapping;
public interface FeignSweetTaskActivityClient { public interface FeignSweetTaskActivityClient {
@GetMapping("sweet/sweetCityVote/setStatList") @GetMapping("sweet/sweetCityVote/setStatList")
ResponseDto<Boolean> setStatList(); ResponseDto<Boolean> setStatList(@RequestParam("type") Integer type);
} }
...@@ -186,7 +186,7 @@ public class CandyCouponServiceImpl implements ICandyCouponService { ...@@ -186,7 +186,7 @@ public class CandyCouponServiceImpl implements ICandyCouponService {
int canUse = 0; int canUse = 0;
for (CandyUserCouponBasicDto dtoItem : dtoList) { for (CandyUserCouponBasicDto dtoItem : dtoList) {
CandyCouponVo baseVo = CouponBaseUtil.getPerformanceCouponUserVo(dtoItem, priceTotal, performanceId, timeId, ticketId); CandyCouponVo baseVo = CouponBaseUtil.getPerformanceCouponUserVo(dtoItem, priceTotal, performanceId, timeId, ticketId);
if (baseVo.getCouType().equals(101)) { if (baseVo.getCouType().equals(101) || baseVo.getBusiType() == 2) {
continue; continue;
} }
if (baseVo.getState().equals(1)) { //可用 if (baseVo.getState().equals(1)) { //可用
...@@ -255,7 +255,7 @@ public class CandyCouponServiceImpl implements ICandyCouponService { ...@@ -255,7 +255,7 @@ public class CandyCouponServiceImpl implements ICandyCouponService {
int canUse = 0; int canUse = 0;
for (CandyUserCouponBasicDto dtoItem : dtoList) { for (CandyUserCouponBasicDto dtoItem : dtoList) {
CandyCouponVo baseVo = CouponBaseUtil.getGoodCouponUserVo(dtoItem, priceTotal, goodId, dtoList.size()); CandyCouponVo baseVo = CouponBaseUtil.getGoodCouponUserVo(dtoItem, priceTotal, goodId, dtoList.size());
if (baseVo.getCouType().equals(101)) { if (baseVo.getCouType().equals(101) || baseVo.getBusiType() == 1 || baseVo.getBusiType() == 3) {
continue; continue;
} }
if (baseVo.getState().equals(1)) { //可用 if (baseVo.getState().equals(1)) { //可用
......
...@@ -91,6 +91,8 @@ public class CouponBaseUtil { ...@@ -91,6 +91,8 @@ public class CouponBaseUtil {
//适用范围 规则 //适用范围 规则
if (dtoItem.getBusiType().equals(0)) { if (dtoItem.getBusiType().equals(0)) {
isTarget = true; isTarget = true;
} else if (dtoItem.getBusiType().equals(2)) {
isTarget = false;
} else { } else {
for (CandyCouponRuleDto ruleItem : dtoItem.getUseRules()) { for (CandyCouponRuleDto ruleItem : dtoItem.getUseRules()) {
CandyCouponRulesVo voRules = CandyCouponRulesVo.getNew(); CandyCouponRulesVo voRules = CandyCouponRulesVo.getNew();
...@@ -109,7 +111,15 @@ public class CouponBaseUtil { ...@@ -109,7 +111,15 @@ public class CouponBaseUtil {
isTarget = isTargetCoupon(ruleItem.getBusiId(), dtoItem.getCouType(), ticketId, priceTotal, dtoItem.getValOver()); isTarget = isTargetCoupon(ruleItem.getBusiId(), dtoItem.getCouType(), ticketId, priceTotal, dtoItem.getValOver());
break; break;
case 100://全场 case 100://全场
if (dtoItem.getCouType().equals(2)) {
if (priceTotal.compareTo(dtoItem.getValOver()) >= 0) {
isTarget = true;
} else {
isTarget = false;
}
} else {
isTarget = true; isTarget = true;
}
break; break;
default: default:
isTarget = false; isTarget = false;
...@@ -170,6 +180,8 @@ public class CouponBaseUtil { ...@@ -170,6 +180,8 @@ public class CouponBaseUtil {
//适用范围 规则 //适用范围 规则
if (dtoItem.getBusiType().equals(0)) { if (dtoItem.getBusiType().equals(0)) {
isTarget = true; isTarget = true;
} else if (dtoItem.getBusiType().equals(1) || dtoItem.getBusiType().equals(3)) {
isTarget = false;
} else { } else {
for (CandyCouponRuleDto ruleItem : dtoItem.getUseRules()) { for (CandyCouponRuleDto ruleItem : dtoItem.getUseRules()) {
CandyCouponRulesVo voRules = CandyCouponRulesVo.getNew(); CandyCouponRulesVo voRules = CandyCouponRulesVo.getNew();
...@@ -185,15 +197,20 @@ public class CouponBaseUtil { ...@@ -185,15 +197,20 @@ public class CouponBaseUtil {
// isTarget = isTargetCoupon(ruleItem.getBusiId(), dtoItem.getCouType(), produceId, priceTotal, dtoItem.getValOver()); // isTarget = isTargetCoupon(ruleItem.getBusiId(), dtoItem.getCouType(), produceId, priceTotal, dtoItem.getValOver());
break; break;
case 100://全场 case 100://全场
if (dtoItem.getCouType().equals(2)) {
if (priceTotal.compareTo(dtoItem.getValOver()) >= 0) {
isTarget = true; isTarget = true;
} else {
isTarget = false;
}
} else {
isTarget = true;
}
break; break;
default: default:
isTarget = false; isTarget = false;
break; break;
} }
if (size > 1 && dtoItem.getCouType().equals(4)) {
isTarget = false;
}
} }
if (dtoItem.getUseRules().size() == 0 && !dtoItem.getBusiType().equals(0)) { if (dtoItem.getUseRules().size() == 0 && !dtoItem.getBusiType().equals(0)) {
......
# -- 使用券 -- # -- 使用券 --
candy_coupon.use=UPDATE candy_user_coupon SET state = 3 ,used_at = ? , used_for = ? WHERE uid = ? AND ucoupon_id = ? candy_coupon.use=UPDATE candy_user_coupon SET state = 5 ,used_at = ? , used_for = ? WHERE uid = ? AND ucoupon_id = ?
#candy_coupon.use_insert=INSERT INTO candy_user_coupon (ucoupon_id , uid , state , coupon_id , used_at , used_for ) VALUE ( ? , ? , 3 , ? , ? ,? ) #candy_coupon.use_insert=INSERT INTO candy_user_coupon (ucoupon_id , uid , state , coupon_id , used_at , used_for ) VALUE ( ? , ? , 3 , ? , ? ,? )
candy_coupon.use_insert=INSERT INTO candy_user_coupon (ucoupon_id , uid , state , coupon_id , bind_at, dued_at, used_at , used_for, created_at) VALUE ( ? , ? , 3 , ? , ? , ?, ?, ?, ?) candy_coupon.use_insert=INSERT INTO candy_user_coupon (ucoupon_id , uid , state , coupon_id , bind_at, dued_at, used_at , used_for, created_at) VALUE ( ? , ? , 5 , ? , ? , ?, ?, ?, ?)
# -- 回退券 -- # -- 回退券 --
candy_coupon.back=UPDATE candy_user_coupon SET state = 1 WHERE uid = ? AND ucoupon_id = ? candy_coupon.back=UPDATE candy_user_coupon SET state = 1 WHERE uid = ? AND ucoupon_id = ?
# -- 领取券 -- # -- 领取券 --
......
...@@ -2,6 +2,7 @@ package com.liquidnet.service.executor.main.handler; ...@@ -2,6 +2,7 @@ package com.liquidnet.service.executor.main.handler;
import com.liquidnet.service.feign.sweet.task.FeignSweetTaskActivityClient; import com.liquidnet.service.feign.sweet.task.FeignSweetTaskActivityClient;
import com.xxl.job.core.biz.model.ReturnT; import com.xxl.job.core.biz.model.ReturnT;
import com.xxl.job.core.context.XxlJobHelper;
import com.xxl.job.core.handler.annotation.XxlJob; import com.xxl.job.core.handler.annotation.XxlJob;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
...@@ -21,7 +22,9 @@ public class SweetCityVoteTaskHandler { ...@@ -21,7 +22,9 @@ public class SweetCityVoteTaskHandler {
@XxlJob(value = "sev-sweet:cityVoteStat") @XxlJob(value = "sev-sweet:cityVoteStat")
public ReturnT<String> cityVoteStatHandler() { public ReturnT<String> cityVoteStatHandler() {
try { try {
Boolean data = feignSweetTaskActivityClient.setStatList().getData(); String jobParam = XxlJobHelper.getJobParam();//执行参数
log.info("jobParam = " + Integer.parseInt(jobParam));
Boolean data = feignSweetTaskActivityClient.setStatList(Integer.parseInt(jobParam)).getData();
log.info("cityVoteStatHandler:结果:{}", data); log.info("cityVoteStatHandler:结果:{}", data);
ReturnT<String> success = ReturnT.SUCCESS; ReturnT<String> success = ReturnT.SUCCESS;
success.setMsg(String.valueOf(data)); success.setMsg(String.valueOf(data));
......
...@@ -814,10 +814,10 @@ CREATE TABLE `kylin_order_express` ...@@ -814,10 +814,10 @@ CREATE TABLE `kylin_order_express`
`order_tickets_id` varchar(255) NOT NULL DEFAULT '' COMMENT '订单id', `order_tickets_id` varchar(255) NOT NULL DEFAULT '' COMMENT '订单id',
`order_express_code` varchar(255) NOT NULL DEFAULT '' COMMENT '订单快递编号', `order_express_code` varchar(255) NOT NULL DEFAULT '' COMMENT '订单快递编号',
`mailno` varchar(255) NOT NULL DEFAULT '' COMMENT '顺丰运单号', `mailno` varchar(255) NOT NULL DEFAULT '' COMMENT '顺丰运单号',
`express_type` tinyint NOT NULL DEFAULT 0 COMMENT '快件产品类型 1顺丰特快...', `express_type` tinyint NOT NULL DEFAULT 0 COMMENT '快件产品类型 1顺丰特快 2标快...',
`filter_result` varchar(2) NOT NULL DEFAULT '0' COMMENT '1-人工确认;2-可收派;3-不可以收派', `filter_result` varchar(2) NOT NULL DEFAULT '0' COMMENT '1-人工确认;2-可收派;3-不可以收派',
`remark` varchar(255) NOT NULL DEFAULT '' COMMENT 'filter_result=3时返回不可以收派的原因代码', `remark` varchar(255) NOT NULL DEFAULT '' COMMENT 'filter_result=3时返回不可以收派的原因代码',
`express_status` tinyint NOT NULL DEFAULT 0 COMMENT '快递状态', `express_status` smallint(6) NOT NULL DEFAULT 0 COMMENT '快递状态',
`origincode` varchar(255) NOT NULL DEFAULT '' COMMENT '原寄地区域代码 可用于顺丰电子面单标签打印', `origincode` varchar(255) NOT NULL DEFAULT '' COMMENT '原寄地区域代码 可用于顺丰电子面单标签打印',
`destcode` varchar(255) NOT NULL DEFAULT '' COMMENT '目的地区域代码 可用于顺丰电子面单标签打印', `destcode` varchar(255) NOT NULL DEFAULT '' COMMENT '目的地区域代码 可用于顺丰电子面单标签打印',
......
...@@ -97,11 +97,11 @@ public class KylinOrderTicketsServiceImpl implements IKylinOrderTicketsOrderServ ...@@ -97,11 +97,11 @@ public class KylinOrderTicketsServiceImpl implements IKylinOrderTicketsOrderServ
boolean isPay = true; boolean isPay = true;
List<AdamEntersVo> entersVoList = ObjectUtil.cloneArrayListObject(); List<AdamEntersVo> entersVoList = ObjectUtil.cloneArrayListObject();
String uid = CurrentUtil.getCurrentUid(); String uid = CurrentUtil.getCurrentUid();
HashMap<String, Object> advanceMap = null;
try {
if (payOrderParam.getVoucherType() != null && payOrderParam.getVoucherType().equals(3)) { if (payOrderParam.getVoucherType() != null && payOrderParam.getVoucherType().equals(3)) {
isPay = false; isPay = false;
} }
HashMap<String, Object> advanceMap = null;
try {
KylinPerformanceVo performanceData = dataUtils.getPerformanceVo(payOrderParam.getPerformanceId()); KylinPerformanceVo performanceData = dataUtils.getPerformanceVo(payOrderParam.getPerformanceId());
KylinTicketTimesVo ticketTimesData = null; KylinTicketTimesVo ticketTimesData = null;
KylinTicketVo ticketData = null; KylinTicketVo ticketData = null;
......
...@@ -490,6 +490,7 @@ CREATE TABLE `sweet_city_vote` ...@@ -490,6 +490,7 @@ CREATE TABLE `sweet_city_vote`
`phone` varchar(11) NOT NULL DEFAULT '' COMMENT '手机号', `phone` varchar(11) NOT NULL DEFAULT '' COMMENT '手机号',
`openId` varchar(255) NOT NULL DEFAULT '' COMMENT 'openId', `openId` varchar(255) NOT NULL DEFAULT '' COMMENT 'openId',
`unionId` varchar(255) NOT NULL DEFAULT '' COMMENT 'unionId', `unionId` varchar(255) NOT NULL DEFAULT '' COMMENT 'unionId',
`type` tinyint NOT NULL DEFAULT 1 COMMENT '活动类型 1新裤子 2莫宰羊',
`city_code` varchar(255) NOT NULL DEFAULT '' COMMENT '城市代码', `city_code` varchar(255) NOT NULL DEFAULT '' COMMENT '城市代码',
`city_name` varchar(255) NOT NULL DEFAULT '' COMMENT '城市名称', `city_name` varchar(255) NOT NULL DEFAULT '' COMMENT '城市名称',
`day_time` varchar(255) NOT NULL DEFAULT '' COMMENT '投票天', `day_time` varchar(255) NOT NULL DEFAULT '' COMMENT '投票天',
...@@ -511,6 +512,7 @@ CREATE TABLE `sweet_city_vote_stat` ...@@ -511,6 +512,7 @@ CREATE TABLE `sweet_city_vote_stat`
`city_name` varchar(255) NOT NULL DEFAULT '' COMMENT '城市名称', `city_name` varchar(255) NOT NULL DEFAULT '' COMMENT '城市名称',
`vote_num` int NOT NULL DEFAULT 0 COMMENT '真实投票数量', `vote_num` int NOT NULL DEFAULT 0 COMMENT '真实投票数量',
`manual_vote_num` int NOT NULL DEFAULT 0 COMMENT '手动增加投票数量', `manual_vote_num` int NOT NULL DEFAULT 0 COMMENT '手动增加投票数量',
`type` tinyint NOT NULL DEFAULT 1 COMMENT '活动类型 1新裤子 2莫宰羊',
`created_at` datetime NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', `created_at` datetime NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`updated_at` datetime NULL DEFAULT CURRENT_TIMESTAMP COMMENT '更新时间', `updated_at` datetime NULL DEFAULT CURRENT_TIMESTAMP COMMENT '更新时间',
PRIMARY KEY (`mid`), PRIMARY KEY (`mid`),
......
...@@ -26,7 +26,8 @@ public class SweetConstant { ...@@ -26,7 +26,8 @@ public class SweetConstant {
public final static String REDIS_KEY_SWEET_ANSWER_PHONE="sweet:answer:phone:"; public final static String REDIS_KEY_SWEET_ANSWER_PHONE="sweet:answer:phone:";
public final static String REDIS_KEY_SWEET_CITY_VOTE_STAT_LIST="sweet:cityVote:StatList"; public final static String REDIS_KEY_SWEET_CITY_VOTE_STAT_LIST="sweet:cityVote:StatList";
public final static String REDIS_KEY_SWEET_CITY_VOTE_CITY_CODE="sweet:cityVote:cityCode:"; public final static String REDIS_KEY_SWEET_CITY_VOTE_CITY_CODE="sweet:cityVote:cityCode:";
public final static String REDIS_KEY_SWEET_CITY_VOTE_USER="sweet:cityVote:user:"; public final static String REDIS_KEY_SWEET_CITY_VOTE="sweet:cityVote";
public final static String REDIS_KEY_SWEET_CITY_VOTE_USER=":user:";
public final static String REDIS_KEY_SWEET_CITY_VOTE_STAT_UPDATE_TIME="sweet:cityVote:updateTime"; public final static String REDIS_KEY_SWEET_CITY_VOTE_STAT_UPDATE_TIME="sweet:cityVote:updateTime";
public final static String REDIS_KEY_SWEET_WECHAT_USER_INFO_MODERNSKY="sweet:wechatUser:modernsky:unionId:"; public final static String REDIS_KEY_SWEET_WECHAT_USER_INFO_MODERNSKY="sweet:wechatUser:modernsky:unionId:";
......
...@@ -32,28 +32,30 @@ public class SweetCityVoteController { ...@@ -32,28 +32,30 @@ public class SweetCityVoteController {
private ISweetCityVoteService sweetCityVoteService; private ISweetCityVoteService sweetCityVoteService;
@GetMapping("statList") @GetMapping("statList")
@ApiOperation("城市投票排名") @ApiOperation("城市投票排名列表")
@ApiImplicitParams({ @ApiImplicitParams({
@ApiImplicitParam(type = "query", dataType = "String", name = "phone", value = "手机号", required = true), @ApiImplicitParam(type = "query", dataType = "String", name = "phone", value = "手机号", required = true),
@ApiImplicitParam(type = "query", dataType = "String", name = "unionId", value = "unionId", required = true) @ApiImplicitParam(type = "query", dataType = "String", name = "unionId", value = "unionId", required = true),
@ApiImplicitParam(type = "query", dataType = "Integer", name = "type", value = "活动类型 1新裤子 2莫宰羊", required = false)
}) })
public ResponseDto<List<SweetCItyVoteStatVo>> getList( public ResponseDto<List<SweetCItyVoteStatVo>> getList(
@RequestParam String phone, @RequestParam String phone,
@RequestParam String unionId @RequestParam String unionId,
@RequestParam(defaultValue = "1") Integer type
) { ) {
return sweetCityVoteService.getList(phone, unionId); return sweetCityVoteService.getList(phone, unionId, type);
} }
@PostMapping("createVote") @PostMapping("createVote")
@ApiOperation("用户投票记录") @ApiOperation("用户投票")
public ResponseDto createVote(@Valid @RequestBody SweetCityVoteParam param) { public ResponseDto createVote(@Valid @RequestBody SweetCityVoteParam param) {
return sweetCityVoteService.createVote(param); return sweetCityVoteService.createVote(param);
} }
@GetMapping("setStatList") @GetMapping("setStatList")
@ApiOperation("统计投票排名") @ApiOperation("统计投票排名")
public ResponseDto setStatList() { public ResponseDto setStatList(@RequestParam Integer type) {
return sweetCityVoteService.setStatList(); return sweetCityVoteService.setStatList(type);
} }
} }
...@@ -27,6 +27,9 @@ public class SweetCityVoteStatDto implements Serializable ,Cloneable{ ...@@ -27,6 +27,9 @@ public class SweetCityVoteStatDto implements Serializable ,Cloneable{
@ApiModelProperty("总投票数") @ApiModelProperty("总投票数")
private Integer totalNum; private Integer totalNum;
@ApiModelProperty("type")
private Integer type;
private static final SweetCityVoteStatDto obj = new SweetCityVoteStatDto(); private static final SweetCityVoteStatDto obj = new SweetCityVoteStatDto();
public static SweetCityVoteStatDto getNew() { public static SweetCityVoteStatDto getNew() {
......
...@@ -47,6 +47,11 @@ public class SweetCityVote implements Serializable { ...@@ -47,6 +47,11 @@ public class SweetCityVote implements Serializable {
@TableField("unionId") @TableField("unionId")
private String unionId; private String unionId;
/**
* 活动类型 1新裤子 2莫宰羊
*/
private Integer type;
/** /**
* 城市代码 * 城市代码
*/ */
......
...@@ -49,6 +49,11 @@ public class SweetCityVoteStat implements Serializable { ...@@ -49,6 +49,11 @@ public class SweetCityVoteStat implements Serializable {
*/ */
private Integer manualVoteNum; private Integer manualVoteNum;
/**
* type
*/
private Integer type;
/** /**
* 创建时间 * 创建时间
*/ */
......
...@@ -16,5 +16,5 @@ import java.util.List; ...@@ -16,5 +16,5 @@ import java.util.List;
*/ */
public interface SweetCityVoteStatMapper extends BaseMapper<SweetCityVoteStat> { public interface SweetCityVoteStatMapper extends BaseMapper<SweetCityVoteStat> {
List<SweetCityVoteStatDto> getStatList(); List<SweetCityVoteStatDto> getStatList(Integer type);
} }
...@@ -5,6 +5,7 @@ import io.swagger.annotations.ApiModelProperty; ...@@ -5,6 +5,7 @@ import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import javax.validation.constraints.NotBlank; import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable; import java.io.Serializable;
@ApiModel(value = "SweetCityVoteParam", description = "用户投票记录入参") @ApiModel(value = "SweetCityVoteParam", description = "用户投票记录入参")
...@@ -29,4 +30,8 @@ public class SweetCityVoteParam implements Serializable { ...@@ -29,4 +30,8 @@ public class SweetCityVoteParam implements Serializable {
@NotBlank(message = "cityName不能为空") @NotBlank(message = "cityName不能为空")
private String cityName; private String cityName;
@ApiModelProperty(position = 14, required = true, value = "活动类型 1新裤子 2莫宰羊", example = "1")
@NotNull(message = "type不能为空")
private Integer type;
} }
...@@ -20,7 +20,7 @@ public interface ISweetCityVoteService extends IService<SweetCityVote> { ...@@ -20,7 +20,7 @@ public interface ISweetCityVoteService extends IService<SweetCityVote> {
ResponseDto createVote(SweetCityVoteParam param); ResponseDto createVote(SweetCityVoteParam param);
ResponseDto setStatList(); ResponseDto setStatList(Integer type);
ResponseDto<List<SweetCItyVoteStatVo>> getList(String phone, String unionId); ResponseDto<List<SweetCItyVoteStatVo>> getList(String phone, String unionId, Integer type);
} }
...@@ -46,9 +46,9 @@ public class SweetCityVoteServiceImpl extends ServiceImpl<SweetCityVoteMapper, S ...@@ -46,9 +46,9 @@ public class SweetCityVoteServiceImpl extends ServiceImpl<SweetCityVoteMapper, S
private SweetCityVoteStatMapper sweetCityVoteStatMapper; private SweetCityVoteStatMapper sweetCityVoteStatMapper;
@Override @Override
public ResponseDto getList(String phone, String unionId) { public ResponseDto getList(String phone, String unionId, Integer type) {
List<SweetCItyVoteStatVo> sweetCityVoteStatList = redisDataUtils.getSweetCityVoteStatList(); List<SweetCItyVoteStatVo> sweetCityVoteStatList = redisDataUtils.getSweetCityVoteStatList(type);
SweetCityVoteParam userVote = redisDataUtils.getUserVote(phone, unionId); SweetCityVoteParam userVote = redisDataUtils.getUserVote(phone, unionId, type);
if (!CollectionUtils.isEmpty(sweetCityVoteStatList)) { if (!CollectionUtils.isEmpty(sweetCityVoteStatList)) {
for (SweetCItyVoteStatVo info : sweetCityVoteStatList) { for (SweetCItyVoteStatVo info : sweetCityVoteStatList) {
if (null == userVote) { if (null == userVote) {
...@@ -64,14 +64,14 @@ public class SweetCityVoteServiceImpl extends ServiceImpl<SweetCityVoteMapper, S ...@@ -64,14 +64,14 @@ public class SweetCityVoteServiceImpl extends ServiceImpl<SweetCityVoteMapper, S
HashMap<String, Object> stringObjectHashMap = CollectionUtil.mapStringObject(); HashMap<String, Object> stringObjectHashMap = CollectionUtil.mapStringObject();
stringObjectHashMap.put("list", sweetCityVoteStatList); stringObjectHashMap.put("list", sweetCityVoteStatList);
stringObjectHashMap.put("userVote", userVote); stringObjectHashMap.put("userVote", userVote);
stringObjectHashMap.put("statUpdateTime", redisDataUtils.getSweetCityVoteStatUpdateTime()); stringObjectHashMap.put("statUpdateTime", redisDataUtils.getSweetCityVoteStatUpdateTime(type));
return ResponseDto.success(stringObjectHashMap); return ResponseDto.success(stringObjectHashMap);
} }
@Override @Override
public ResponseDto createVote(SweetCityVoteParam param) { public ResponseDto createVote(SweetCityVoteParam param) {
SweetCityVoteParam userVote = redisDataUtils.getUserVote(param.getPhone(), param.getUnionId()); SweetCityVoteParam userVote = redisDataUtils.getUserVote(param.getPhone(), param.getUnionId(), param.getType());
if (null != userVote) { if (null != userVote) {
return ResponseDto.failure("已经投过票啦~"); return ResponseDto.failure("已经投过票啦~");
} }
...@@ -83,6 +83,7 @@ public class SweetCityVoteServiceImpl extends ServiceImpl<SweetCityVoteMapper, S ...@@ -83,6 +83,7 @@ public class SweetCityVoteServiceImpl extends ServiceImpl<SweetCityVoteMapper, S
aNew.setUnionId(param.getUnionId()); aNew.setUnionId(param.getUnionId());
aNew.setCityCode(param.getCityCode()); aNew.setCityCode(param.getCityCode());
aNew.setCityName(param.getCityName()); aNew.setCityName(param.getCityName());
aNew.setType(param.getType());
LinkedList<String> sqls = CollectionUtil.linkedListString(); LinkedList<String> sqls = CollectionUtil.linkedListString();
...@@ -90,38 +91,38 @@ public class SweetCityVoteServiceImpl extends ServiceImpl<SweetCityVoteMapper, S ...@@ -90,38 +91,38 @@ public class SweetCityVoteServiceImpl extends ServiceImpl<SweetCityVoteMapper, S
LinkedList<Object[]> sqlsDataB = CollectionUtil.linkedListObjectArr(); LinkedList<Object[]> sqlsDataB = CollectionUtil.linkedListObjectArr();
sqls.add(SqlMapping.get("sweet_city_vote.insert")); sqls.add(SqlMapping.get("sweet_city_vote.insert"));
sqlsDataA.add(new Object[]{ sqlsDataA.add(new Object[]{
aNew.getVoteId(), aNew.getPhone(), sweetWechatOpenId, aNew.getUnionId(), aNew.getCityCode(), aNew.getCityName(), DateUtil.format(LocalDateTime.now(), DateUtil.Formatter.yyyyMMdd) aNew.getVoteId(), aNew.getPhone(), sweetWechatOpenId, aNew.getUnionId(), aNew.getType(), aNew.getCityCode(), aNew.getCityName(), DateUtil.format(LocalDateTime.now(), DateUtil.Formatter.yyyyMMdd)
}); });
Integer cityVoteNum = redisDataUtils.getSweetCityVote(aNew.getCityCode()); Integer cityVoteNum = redisDataUtils.getSweetCityVote(aNew.getCityCode(), aNew.getType());
if (cityVoteNum > 0) { // 已有 incr if (cityVoteNum > 0) { // 已有 incr
sqls.add(SqlMapping.get("sweet_city_vote_stat.update")); sqls.add(SqlMapping.get("sweet_city_vote_stat.update"));
sqlsDataB.add(new Object[]{ sqlsDataB.add(new Object[]{
LocalDateTime.now(), aNew.getCityCode() LocalDateTime.now(), aNew.getCityCode(), aNew.getType()
}); });
} else { // insert } else { // insert
sqls.add(SqlMapping.get("sweet_city_vote_stat.insert")); sqls.add(SqlMapping.get("sweet_city_vote_stat.insert"));
sqlsDataB.add(new Object[]{ sqlsDataB.add(new Object[]{
IDGenerator.nextSnowId(), aNew.getCityCode(), aNew.getCityName(), 1 IDGenerator.nextSnowId(), aNew.getCityCode(), aNew.getCityName(), 1, aNew.getType()
}); });
} }
queueUtils.sendMsgByRedis(MQConst.SweetQueue.SWEET_CITY_VOTE_DRAW.getKey(), queueUtils.sendMsgByRedis(MQConst.SweetQueue.SWEET_CITY_VOTE_DRAW.getKey(),
SqlMapping.gets(sqls, sqlsDataA, sqlsDataB)); SqlMapping.gets(sqls, sqlsDataA, sqlsDataB));
redisDataUtils.incrSweetCityVote(aNew.getCityCode()); redisDataUtils.incrSweetCityVote(aNew.getCityCode(), aNew.getType());
redisDataUtils.setUserVote(param.getPhone(), param.getUnionId(), param); redisDataUtils.setUserVote(param.getPhone(), param.getUnionId(), param);
return ResponseDto.success(); return ResponseDto.success();
} }
public ResponseDto setStatList() { public ResponseDto setStatList(Integer type) {
List<SweetCityVoteStatDto> list = sweetCityVoteStatMapper.getStatList(); List<SweetCityVoteStatDto> list = sweetCityVoteStatMapper.getStatList(type);
if (!CollectionUtils.isEmpty(list)) { if (!CollectionUtils.isEmpty(list)) {
ArrayList<SweetCItyVoteStatVo> newList = ObjectUtil.getSweetCItyVoteStatVoList(); ArrayList<SweetCItyVoteStatVo> newList = ObjectUtil.getSweetCItyVoteStatVoList();
list.forEach(r -> newList.add(SweetCItyVoteStatVo.getNew().copy(r))); list.forEach(r -> newList.add(SweetCItyVoteStatVo.getNew().copy(r)));
redisDataUtils.setSweetCityVoteStatList(newList); redisDataUtils.setSweetCityVoteStatList(newList, type);
} }
redisDataUtils.setSweetCityVoteStatUpdateTime(); redisDataUtils.setSweetCityVoteStatUpdateTime(type);
return ResponseDto.success(); return ResponseDto.success();
} }
} }
...@@ -492,12 +492,12 @@ public class RedisDataUtils { ...@@ -492,12 +492,12 @@ public class RedisDataUtils {
} }
// 投票 // 投票
public void setSweetCityVoteStatList(List<SweetCItyVoteStatVo> sweetCItyVoteStatVo) { public void setSweetCityVoteStatList(List<SweetCItyVoteStatVo> sweetCItyVoteStatVo, Integer type) {
String redisKey = SweetConstant.REDIS_KEY_SWEET_CITY_VOTE_STAT_LIST; String redisKey = SweetConstant.REDIS_KEY_SWEET_CITY_VOTE_STAT_LIST.concat(String.valueOf(type));
redisUtil.set(redisKey, sweetCItyVoteStatVo); redisUtil.set(redisKey, sweetCItyVoteStatVo);
} }
public List<SweetCItyVoteStatVo> getSweetCityVoteStatList() { public List<SweetCItyVoteStatVo> getSweetCityVoteStatList(Integer type) {
String redisKey = SweetConstant.REDIS_KEY_SWEET_CITY_VOTE_STAT_LIST; String redisKey = SweetConstant.REDIS_KEY_SWEET_CITY_VOTE_STAT_LIST.concat(String.valueOf(type));
Object obj = redisUtil.get(redisKey); Object obj = redisUtil.get(redisKey);
List<SweetCItyVoteStatVo> sweetCityVoteStatList = ObjectUtil.getSweetCItyVoteStatVoList(); List<SweetCItyVoteStatVo> sweetCityVoteStatList = ObjectUtil.getSweetCItyVoteStatVoList();
if (null != obj) { if (null != obj) {
...@@ -505,12 +505,12 @@ public class RedisDataUtils { ...@@ -505,12 +505,12 @@ public class RedisDataUtils {
} }
return sweetCityVoteStatList; return sweetCityVoteStatList;
} }
public void incrSweetCityVote(String cityCode) { public void incrSweetCityVote(String cityCode, Integer type) {
String redisKey = SweetConstant.REDIS_KEY_SWEET_CITY_VOTE_CITY_CODE.concat(cityCode); String redisKey = SweetConstant.REDIS_KEY_SWEET_CITY_VOTE_CITY_CODE.concat(String.valueOf(type)).concat(cityCode);
redisUtil.incr(redisKey, 1); redisUtil.incr(redisKey, 1);
} }
public Integer getSweetCityVote(String cityCode) { public Integer getSweetCityVote(String cityCode, Integer type) {
String redisKey = SweetConstant.REDIS_KEY_SWEET_CITY_VOTE_CITY_CODE.concat(cityCode); String redisKey = SweetConstant.REDIS_KEY_SWEET_CITY_VOTE_CITY_CODE.concat(String.valueOf(type)).concat(cityCode);
Object obj = redisUtil.get(redisKey); Object obj = redisUtil.get(redisKey);
if (null == obj) { if (null == obj) {
return 0; return 0;
...@@ -519,11 +519,13 @@ public class RedisDataUtils { ...@@ -519,11 +519,13 @@ public class RedisDataUtils {
} }
} }
public void setUserVote(String phone, String openId, SweetCityVoteParam param) { public void setUserVote(String phone, String openId, SweetCityVoteParam param) {
String redisKey = SweetConstant.REDIS_KEY_SWEET_CITY_VOTE_USER.concat(phone).concat("-").concat(openId); String redisKey = SweetConstant.REDIS_KEY_SWEET_CITY_VOTE.concat(String.valueOf(param.getType()))
.concat(SweetConstant.REDIS_KEY_SWEET_CITY_VOTE_USER).concat(phone).concat("-").concat(openId);
redisUtil.set(redisKey, param); redisUtil.set(redisKey, param);
} }
public SweetCityVoteParam getUserVote(String phone, String openId) { public SweetCityVoteParam getUserVote(String phone, String openId, Integer type) {
String redisKey = SweetConstant.REDIS_KEY_SWEET_CITY_VOTE_USER.concat(phone).concat("-").concat(openId); String redisKey = SweetConstant.REDIS_KEY_SWEET_CITY_VOTE.concat(String.valueOf(type))
.concat(SweetConstant.REDIS_KEY_SWEET_CITY_VOTE_USER).concat(phone).concat("-").concat(openId);
Object obj = redisUtil.get(redisKey); Object obj = redisUtil.get(redisKey);
if (null == obj) { if (null == obj) {
return null; return null;
...@@ -531,12 +533,12 @@ public class RedisDataUtils { ...@@ -531,12 +533,12 @@ public class RedisDataUtils {
return (SweetCityVoteParam) obj; return (SweetCityVoteParam) obj;
} }
} }
public void setSweetCityVoteStatUpdateTime() { public void setSweetCityVoteStatUpdateTime(Integer type) {
String redisKey = SweetConstant.REDIS_KEY_SWEET_CITY_VOTE_STAT_UPDATE_TIME; String redisKey = SweetConstant.REDIS_KEY_SWEET_CITY_VOTE_STAT_UPDATE_TIME.concat(String.valueOf(type));
redisUtil.set(redisKey, DateUtil.getNowTime()); redisUtil.set(redisKey, DateUtil.getNowTime());
} }
public String getSweetCityVoteStatUpdateTime() { public String getSweetCityVoteStatUpdateTime(Integer type) {
String redisKey = SweetConstant.REDIS_KEY_SWEET_CITY_VOTE_STAT_UPDATE_TIME; String redisKey = SweetConstant.REDIS_KEY_SWEET_CITY_VOTE_STAT_UPDATE_TIME.concat(String.valueOf(type));
Object obj = redisUtil.get(redisKey); Object obj = redisUtil.get(redisKey);
if (null == obj) { if (null == obj) {
return ""; return "";
......
...@@ -37,6 +37,9 @@ public class SweetCItyVoteStatVo implements Serializable, Cloneable { ...@@ -37,6 +37,9 @@ public class SweetCItyVoteStatVo implements Serializable, Cloneable {
@ApiModelProperty("当前用户是否投了当前城市 1没投 2投了") @ApiModelProperty("当前用户是否投了当前城市 1没投 2投了")
private Integer isVote; private Integer isVote;
@ApiModelProperty("type")
private Integer type;
/*@ApiModelProperty("创建时间") /*@ApiModelProperty("创建时间")
private LocalDateTime createdAt; private LocalDateTime createdAt;
...@@ -59,6 +62,7 @@ public class SweetCItyVoteStatVo implements Serializable, Cloneable { ...@@ -59,6 +62,7 @@ public class SweetCItyVoteStatVo implements Serializable, Cloneable {
// this.setVoteNum(source.getVoteNum()); // this.setVoteNum(source.getVoteNum());
// this.setManualVoteNum(source.getManualVoteNum()); // this.setManualVoteNum(source.getManualVoteNum());
this.setTotalNum(source.getTotalNum()); this.setTotalNum(source.getTotalNum());
this.setType(source.getType());
return this; return this;
} }
......
...@@ -8,12 +8,18 @@ ...@@ -8,12 +8,18 @@
<result column="vote_num" property="voteNum"/> <result column="vote_num" property="voteNum"/>
<result column="manual_vote_num" property="manualVoteNum"/> <result column="manual_vote_num" property="manualVoteNum"/>
<result column="total_num" property="totalNum"/> <result column="total_num" property="totalNum"/>
<result column="type" property="type"/>
</resultMap> </resultMap>
<select id="getStatList" resultMap="getListResult"> <select id="getStatList" resultMap="getListResult">
select select
*, (vote_num + manual_vote_num) as total_num *, (vote_num + manual_vote_num) as total_num
from sweet_city_vote_stat from sweet_city_vote_stat
<where>
<if test="type != ''">
AND type=${type}
</if>
</where>
ORDER BY total_num DESC ORDER BY total_num DESC
</select> </select>
</mapper> </mapper>
...@@ -50,8 +50,8 @@ sweet_remind.insert=INSERT INTO sweet_remind (remind_id,openId,unionId,performan ...@@ -50,8 +50,8 @@ sweet_remind.insert=INSERT INTO sweet_remind (remind_id,openId,unionId,performan
# --------------------------小程序登录记录用户解密后信息-------------------------- # --------------------------小程序登录记录用户解密后信息--------------------------
sweet_applet_user.insert=INSERT INTO sweet_applet_user (user_id,openId,unionId,getPhoneNumber,getPurePhoneNumber,getCountryCode,type) VALUES (?,?,?,?,?,?,?) sweet_applet_user.insert=INSERT INTO sweet_applet_user (user_id,openId,unionId,getPhoneNumber,getPurePhoneNumber,getCountryCode,type) VALUES (?,?,?,?,?,?,?)
# --------------------------用户投票记录-------------------------- # --------------------------用户投票记录--------------------------
sweet_city_vote.insert=INSERT INTO sweet_city_vote (vote_id,phone,openId,unionId,city_code,city_name,day_time) VALUES (?,?,?,?,?,?,?) sweet_city_vote.insert=INSERT INTO sweet_city_vote (vote_id,phone,openId,unionId,type,city_code,city_name,day_time) VALUES (?,?,?,?,?,?,?,?)
sweet_city_vote_stat.insert=INSERT INTO sweet_city_vote_stat (stat_id,city_code,city_name,vote_num) VALUES (?,?,?,?) sweet_city_vote_stat.insert=INSERT INTO sweet_city_vote_stat (stat_id,city_code,city_name,vote_num,type) VALUES (?,?,?,?,?)
sweet_city_vote_stat.update=UPDATE sweet_city_vote_stat SET vote_num = IFNULL(vote_num, 0) + 1, updated_at = ? WHERE city_code = ? sweet_city_vote_stat.update=UPDATE sweet_city_vote_stat SET vote_num = IFNULL(vote_num, 0) + 1, updated_at = ? WHERE city_code = ? AND type = ?
# --------------------------防疫答题-------------------------- # --------------------------防疫答题--------------------------
sweet_antigenic_question.insert=INSERT INTO sweet_antigenic_question (question_id,type,openId,unionId,nickname,address,phone,urgent_phone,keyword1,keyword11,keyword2,keyword3,keyword4,keyword5,keyword6,keyword7) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?) sweet_antigenic_question.insert=INSERT INTO sweet_antigenic_question (question_id,type,openId,unionId,nickname,address,phone,urgent_phone,keyword1,keyword11,keyword2,keyword3,keyword4,keyword5,keyword6,keyword7) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)
\ No newline at end of file
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