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

Commit cd1ec121 authored by 刘喆's avatar 刘喆

Merge branch 'pre' into 'k8s-test'

Pre

See merge request !101
parents 4516a98a 5bedd01d
......@@ -33,8 +33,8 @@ public class KylinTableStatusConst {
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_ERROR = 6; // 退款失败
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_UNFILLED = 7; // 财务审核同意 等待退款
public static final Integer ORDER_REFUND_STATUS_REFUSE = 8; // 财务审核拒绝
public static final Integer ORDER_REFUND_STATUS_TICKET = 9; // 票务确认收货
public static final Integer ORDER_REFUND_TYPE_APPLY = 0; // 客服、票务人工申请,可以取消退款,回调再处理库存和券
......@@ -81,4 +81,8 @@ public class KylinTableStatusConst {
public static final Integer ORDER_EXPRESS_STATUS1 = 1; // 申请 顺丰返回失败 未下单 未发快递
public static final Integer ORDER_EXPRESS_STATUS2 = 2; // 申请 顺丰返回成功 或 通过主动再查询更新
public static final Integer ORDER_EXPRESS_STATUS3 = 3; // 取消
public static final Integer ORDER_EXPRESS_STATUS80 = 80; // 签收
public static final Integer ORDER_EXPRESS_STATUS8000 = 8000; // 签收结单
public static final Integer ORDER_EXPRESS_SEND_TYPE1 = 1; // 发货
public static final Integer ORDER_EXPRESS_SEND_TYPE2 = 2; // 退款
}
......@@ -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 (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 (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 (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 (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 (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 (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;
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.page.TableDataInfo;
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.OrderOutLineVo;
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.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.*;
import java.util.ArrayList;
import java.util.List;
@Controller
......@@ -20,22 +24,42 @@ public class ToolsBaseController extends BaseController {
private String prefix = "zhengzai/tools";
@Autowired
private IExportService exportService;
@Autowired
private IToolService toolService;
@GetMapping()
public String tools() {
return prefix + "/tools";
}
/**
* 路径跳转
*
* @param id
* @param mmap
* @return
*/
@GetMapping(value = "/details/{id}")
public String detailsRoadShow(@PathVariable("id") Integer id, ModelMap mmap) {
if (id == 1) {
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 {
return prefix + "/edit";
}
}
/**
* 导出手机号
*
* @param mobileType
* @param performanceId
* @return
*/
@PostMapping("/export/mobile")
@ResponseBody
public AjaxResult exportMobile(Integer mobileType, String performanceId) {
......@@ -57,4 +81,52 @@ public class ToolsBaseController extends BaseController {
ExcelUtil<OrderExportVo> util = new ExcelUtil(OrderExportVo.class);
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 @@
case 80:
expressStatusName = '已签收';
break;
case 8000:
expressStatusName = '已签收';
break;
default:
expressStatusName = '运输中';
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>
......@@ -19,10 +19,15 @@
<div class="form-group">
<button id="fun1" type="button" class="btn btn-w-m btn-success" href="javascript:void(0)"
onclick="$.operate.edit(1)">
onclick="$.operate.edit(1)">
导出演出订单手机号
</button>
<button id="fun2" type="button" class="btn btn-w-m btn-success" href="javascript:void(0)"
onclick="$.operate.detail(2)">
修改订单入场人
</button>
</div>
</form>
</div>
......@@ -32,13 +37,18 @@
var options = {
url: prefix,
modalName: "",
updateUrl: prefix + "details/{id}"
updateUrl: prefix + "details/{id}",
detailUrl: prefix + "details/{id}"
};
$.table.init(options);
var fun1Flag = [[${@permission.hasPermi('tools:fun1')}]];
var fun2Flag = [[${@permission.hasPermi('tools:fun2')}]];
if (fun1Flag == "hidden") {
document.getElementById("fun1").style.display = "none";
}
if (fun2Flag == "hidden") {
document.getElementById("fun2").style.display = "none";
}
</script>
</body>
</html>
......@@ -137,7 +137,7 @@ public class AdamMemberOrderAdminServiceImpl extends ServiceImpl<AdamMemberOrder
linkedMultiValueMap.add("notifyUrl", notifyUrl);
linkedMultiValueMap.add("orderCode", memberOrder.getOrderNo());
linkedMultiValueMap.add("orderRefundCode", refundNo);
linkedMultiValueMap.add("paymentId", null);
linkedMultiValueMap.add("paymentId", memberOrder.getPaymentId());
linkedMultiValueMap.add("paymentType", (memberOrder.getDeviceFrom() + memberOrder.getPayType()).toUpperCase());
linkedMultiValueMap.add("price", String.valueOf(param.getRefundAmt()));
linkedMultiValueMap.add("priceTotal", String.valueOf(memberOrder.getPricePaid()));
......
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
obj1.setProjectId(performancesmId);
obj1.setVenueId(venueId);
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.setSystemId(taobaoTicketUtils.getSystemId());
req.setPushPerformParam(obj1);
......@@ -309,4 +310,9 @@ public class KylinDamaiServiceImpl extends ServiceImpl<KylinRoadShowsMapper, Kyl
return null;
}
}
public static void main(String[] args) {
Long a=IDGenerator.getDamaiCode("397341627879178278349754");
System.out.println(a);
}
}
......@@ -128,17 +128,22 @@ public class PerformancesExpressServiceImpl extends ServiceImpl<KylinOrderExpres
Wrappers.lambdaQuery(KylinOrderExpress.class)
.ne(KylinOrderExpress::getExpressStatus, 1).ne(KylinOrderExpress::getExpressStatus, 3)
.eq(KylinOrderExpress::getPerformancesId, info.getPerformancesId())
.eq(KylinOrderExpress::getSendType, KylinTableStatusConst.ORDER_EXPRESS_SEND_TYPE1)
);
// 运输中
Integer total2 = kylinOrderExpressMapper.selectCount(
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::getSendType, KylinTableStatusConst.ORDER_EXPRESS_SEND_TYPE1)
);
// 已签收
Integer[] statusList = new Integer[]{KylinTableStatusConst.ORDER_EXPRESS_STATUS80, KylinTableStatusConst.ORDER_EXPRESS_STATUS8000};
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::getSendType, KylinTableStatusConst.ORDER_EXPRESS_SEND_TYPE1)
);
info.setTotal1(total1);
info.setTotal2(total2);
......@@ -202,6 +207,9 @@ public class PerformancesExpressServiceImpl extends ServiceImpl<KylinOrderExpres
kylinOrderExpressPre.setExpressType(expressType);
kylinOrderExpressPre.setCreatedAt(DateUtil.getNowTime());
kylinOrderExpressPre.setPerformancesId(Relations.getPerformanceId());
kylinOrderExpressPre.setExpressContacts(orderInfo.getExpressContacts());
kylinOrderExpressPre.setExpressPhone(orderInfo.getExpressPhone());
kylinOrderExpressPre.setSendExpressAddress(orderInfo.getExpressAddress());
kylinOrderExpressMapper.insert(kylinOrderExpressPre);
// 请求下单数据
......
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;
}
}
......@@ -13,7 +13,8 @@
LEFT JOIN kylin_ticket_times d ON c.time_id = d.ticket_times_id
LEFT JOIN kylin_tickets e ON c.ticket_id = e.tickets_id
<where>
a.order_express_id IN
a.send_type = 1
AND a.order_express_id IN
<foreach collection="ids" item="orderExpressId" index="index" open="(" close=")" separator=",">
${orderExpressId}
</foreach>
......@@ -32,7 +33,8 @@
LEFT JOIN kylin_ticket_times d ON c.time_id = d.ticket_times_id
LEFT JOIN kylin_tickets e ON c.ticket_id = e.tickets_id
<where>
a.express_status = 2
a.send_type = 1
AND a.express_status = 2
AND a.performances_id = #{performanceId}
<if test="ticketId != ''">AND e.tickets_id = #{ticketId}</if>
AND a.mid > ${mid}
......@@ -46,6 +48,7 @@
FROM kylin_order_express
<where>
performances_id = #{performanceId}
AND send_type = 1
AND express_status = 2 -- 只能取消申请成功的 揽收以后不支持取消
AND mid > ${mid}
</where>
......
......@@ -339,7 +339,8 @@
${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>
</where>
......
......@@ -5,6 +5,7 @@ import feign.hystrix.FallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
@Component
@FeignClient(name = "liquidnet-service-sweet",
......@@ -14,6 +15,6 @@ import org.springframework.web.bind.annotation.GetMapping;
public interface FeignSweetTaskActivityClient {
@GetMapping("sweet/sweetCityVote/setStatList")
ResponseDto<Boolean> setStatList();
ResponseDto<Boolean> setStatList(@RequestParam("type") Integer type);
}
......@@ -6,11 +6,7 @@ liquidnet:
username: user
password: user123
eureka:
#host: 172.17.207.177:7001
instance:
prefer-ip-address: true
host: eureka-test-0.eureka-test-svc.zhengzai-test:7001/eureka-server/eureka,eureka-test-1.eureka-test-svc.zhengzai-test:7001/eureka-server/eureka,eureka-test-2.eureka-test-svc.zhengzai-test:7001/eureka-server/eureka
host: 172.17.207.177:7001
# end-test-这里是配置信息基本值
spring:
......
......@@ -8,6 +8,7 @@ import com.liquidnet.commons.lang.util.JsonUtils;
import com.liquidnet.service.base.ResponseDto;
import com.liquidnet.service.candy.param.BackCouponParam;
import com.liquidnet.service.candy.service.ICandyCouponService;
import com.liquidnet.service.candy.util.ObjectUtil;
import com.liquidnet.service.candy.vo.CandyCouponPreVo;
import com.liquidnet.service.candy.vo.CandyCouponVo;
import com.liquidnet.service.candy.vo.CandyMyCouponListVo;
......@@ -52,8 +53,24 @@ public class CandyCouponController {
@ApiImplicitParams({
@ApiImplicitParam(type = "form", dataType = "Integer", name = "type", value = "类型 1可用 2过期/已使用 ", required = true),
})
public ResponseDto<CandyMyCouponListVo> myCoupon(@RequestParam("type") @NotNull Integer type) {
return ResponseDto.success(candyCouponService.myCoupon(type));
public ResponseDto<CandyMyCouponListVo> myCoupon(@RequestParam("type") @NotNull Integer type, @RequestParam(required = false, name = "page") Integer page) {
CandyMyCouponListVo vo = candyCouponService.myCoupon(type);
// List<CandyCouponVo> list = vo.getMyCoupon();
// List<CandyCouponVo> listVo = ObjectUtil.getCandyCouponVoArrayList();
// if (page == null || page == 0) {
// page = 1;
// }
// int size = 40;
// int initSize = (page - 1) * size;
// int forSize = page * size;
// if (forSize >= list.size()) {
// forSize = list.size();
// }
// for (int i = initSize; i < forSize; i++) {
// listVo.add(list.get(i));
// }
// vo.setMyCoupon(listVo);
return ResponseDto.success(vo);
}
//我的会员权益券统计
......@@ -87,8 +104,25 @@ public class CandyCouponController {
@RequestParam("performanceId") @NotNull @NotBlank String performanceId,
@RequestParam("timeId") @NotNull @NotBlank String timeId,
@RequestParam("ticketId") @NotNull @NotBlank String ticketId,
@RequestParam("type") @NotNull Integer type) {
return ResponseDto.success(candyCouponService.preUsePerformanceCoupon(priceTotal, performanceId, timeId, ticketId, type));
@RequestParam("type") @NotNull Integer type,
@RequestParam(required = false, name = "page") Integer page) {
CandyMyCouponListVo vo = candyCouponService.preUsePerformanceCoupon(priceTotal, performanceId, timeId, ticketId, type);
List<CandyCouponVo> list = vo.getMyCoupon();
List<CandyCouponVo> listVo = ObjectUtil.getCandyCouponVoArrayList();
if (page == null || page == 0) {
page = 1;
}
int size = 10;
int initSize = (page - 1) * size;
int forSize = page * size;
if (forSize >= list.size()) {
forSize = list.size();
}
for (int i = initSize; i < forSize; i++) {
listVo.add(list.get(i));
}
vo.setMyCoupon(listVo);
return ResponseDto.success(vo);
}
// 是否可用券演出
......@@ -120,8 +154,25 @@ public class CandyCouponController {
})
public ResponseDto<CandyMyCouponListVo> preUseGoodCoupon(@RequestParam("priceTotal") @NotNull BigDecimal priceTotal,
@RequestParam("goodId") @NotNull @NotBlank String goodId,
@RequestParam("type") @NotNull Integer type) {
return ResponseDto.success(candyCouponService.preUseGoodCoupon(priceTotal, goodId, type));
@RequestParam("type") @NotNull Integer type,
@RequestParam(required = false, name = "page") Integer page) {
CandyMyCouponListVo vo = candyCouponService.preUseGoodCoupon(priceTotal, goodId, type);
List<CandyCouponVo> list = vo.getMyCoupon();
List<CandyCouponVo> listVo = ObjectUtil.getCandyCouponVoArrayList();
if (page == null || page == 0) {
page = 1;
}
int size = 10;
int initSize = (page - 1) * size;
int forSize = page * size;
if (forSize >= list.size()) {
forSize = list.size();
}
for (int i = initSize; i < forSize; i++) {
listVo.add(list.get(i));
}
vo.setMyCoupon(listVo);
return ResponseDto.success(vo);
}
//是否可用券 - 商品
......@@ -145,8 +196,24 @@ public class CandyCouponController {
@ApiImplicitParams({
@ApiImplicitParam(type = "form", dataType = "String", name = "performanceId", value = "演出id", required = true)
})
public ResponseDto<List<CandyCouponVo>> myAdvanceCoupon(@RequestParam("performanceId") @NotNull @NotBlank String performanceId) {
return ResponseDto.success(candyCouponService.myAdvanceCoupon(performanceId));
public ResponseDto<List<CandyCouponVo>> myAdvanceCoupon(@RequestParam("performanceId") @NotNull @NotBlank String performanceId,
@RequestParam(required = false, name = "page") Integer page) {
List<CandyCouponVo> list = candyCouponService.myAdvanceCoupon(performanceId);
List<CandyCouponVo> listVo = ObjectUtil.getCandyCouponVoArrayList();
if (page == null || page == 0) {
page = 1;
}
int size = 10;
int initSize = (page - 1) * size;
int forSize = page * size;
if (forSize >= list.size()) {
forSize = list.size();
}
for (int i = initSize; i < forSize; i++) {
listVo.add(list.get(i));
}
return ResponseDto.success(listVo);
}
// //判断券是否可用
......@@ -187,11 +254,11 @@ public class CandyCouponController {
@RequestParam("timeId") @NotNull @NotBlank String timeId,
@RequestParam("ticketId") @NotNull @NotBlank String ticketId
) {
CandyUseResultVo result = candyCouponService.useCoupon(uCouponId, content, totalPrice, performanceId, timeId,ticketId, goodId);
CandyUseResultVo result = candyCouponService.useCoupon(uCouponId, content, totalPrice, performanceId, timeId, ticketId, goodId);
if (result == null) {
return ResponseDto.failure();
}
result.setValue(result.getValue().setScale(2,BigDecimal.ROUND_HALF_UP));
result.setValue(result.getValue().setScale(2, BigDecimal.ROUND_HALF_UP));
return ResponseDto.success(result);
}
......
......@@ -186,7 +186,7 @@ public class CandyCouponServiceImpl implements ICandyCouponService {
int canUse = 0;
for (CandyUserCouponBasicDto dtoItem : dtoList) {
CandyCouponVo baseVo = CouponBaseUtil.getPerformanceCouponUserVo(dtoItem, priceTotal, performanceId, timeId, ticketId);
if (baseVo.getCouType().equals(101)) {
if (baseVo.getCouType().equals(101) || baseVo.getBusiType() == 2) {
continue;
}
if (baseVo.getState().equals(1)) { //可用
......@@ -255,7 +255,7 @@ public class CandyCouponServiceImpl implements ICandyCouponService {
int canUse = 0;
for (CandyUserCouponBasicDto dtoItem : dtoList) {
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;
}
if (baseVo.getState().equals(1)) { //可用
......
......@@ -91,6 +91,8 @@ public class CouponBaseUtil {
//适用范围 规则
if (dtoItem.getBusiType().equals(0)) {
isTarget = true;
} else if (dtoItem.getBusiType().equals(2)) {
isTarget = false;
} else {
for (CandyCouponRuleDto ruleItem : dtoItem.getUseRules()) {
CandyCouponRulesVo voRules = CandyCouponRulesVo.getNew();
......@@ -109,7 +111,15 @@ public class CouponBaseUtil {
isTarget = isTargetCoupon(ruleItem.getBusiId(), dtoItem.getCouType(), ticketId, priceTotal, dtoItem.getValOver());
break;
case 100://全场
isTarget = true;
if (dtoItem.getCouType().equals(2)) {
if (priceTotal.compareTo(dtoItem.getValOver()) >= 0) {
isTarget = true;
} else {
isTarget = false;
}
} else {
isTarget = true;
}
break;
default:
isTarget = false;
......@@ -170,6 +180,8 @@ public class CouponBaseUtil {
//适用范围 规则
if (dtoItem.getBusiType().equals(0)) {
isTarget = true;
} else if (dtoItem.getBusiType().equals(1) || dtoItem.getBusiType().equals(3)) {
isTarget = false;
} else {
for (CandyCouponRuleDto ruleItem : dtoItem.getUseRules()) {
CandyCouponRulesVo voRules = CandyCouponRulesVo.getNew();
......@@ -185,15 +197,20 @@ public class CouponBaseUtil {
// isTarget = isTargetCoupon(ruleItem.getBusiId(), dtoItem.getCouType(), produceId, priceTotal, dtoItem.getValOver());
break;
case 100://全场
isTarget = true;
if (dtoItem.getCouType().equals(2)) {
if (priceTotal.compareTo(dtoItem.getValOver()) >= 0) {
isTarget = true;
} else {
isTarget = false;
}
} else {
isTarget = true;
}
break;
default:
isTarget = false;
break;
}
if (size > 1 && dtoItem.getCouType().equals(4)) {
isTarget = false;
}
}
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 , 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 = ?
# -- 领取券 --
......
......@@ -2,6 +2,7 @@ package com.liquidnet.service.executor.main.handler;
import com.liquidnet.service.feign.sweet.task.FeignSweetTaskActivityClient;
import com.xxl.job.core.biz.model.ReturnT;
import com.xxl.job.core.context.XxlJobHelper;
import com.xxl.job.core.handler.annotation.XxlJob;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
......@@ -21,7 +22,9 @@ public class SweetCityVoteTaskHandler {
@XxlJob(value = "sev-sweet:cityVoteStat")
public ReturnT<String> cityVoteStatHandler() {
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);
ReturnT<String> success = ReturnT.SUCCESS;
success.setMsg(String.valueOf(data));
......
......@@ -814,10 +814,10 @@ CREATE TABLE `kylin_order_express`
`order_tickets_id` varchar(255) NOT NULL DEFAULT '' COMMENT '订单id',
`order_express_code` 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-不可以收派',
`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 '原寄地区域代码 可用于顺丰电子面单标签打印',
`destcode` varchar(255) NOT NULL DEFAULT '' COMMENT '目的地区域代码 可用于顺丰电子面单标签打印',
......
......@@ -97,11 +97,11 @@ public class KylinOrderTicketsServiceImpl implements IKylinOrderTicketsOrderServ
boolean isPay = true;
List<AdamEntersVo> entersVoList = ObjectUtil.cloneArrayListObject();
String uid = CurrentUtil.getCurrentUid();
if (payOrderParam.getVoucherType() != null && payOrderParam.getVoucherType().equals(3)) {
isPay = false;
}
HashMap<String, Object> advanceMap = null;
try {
if (payOrderParam.getVoucherType() != null && payOrderParam.getVoucherType().equals(3)) {
isPay = false;
}
KylinPerformanceVo performanceData = dataUtils.getPerformanceVo(payOrderParam.getPerformanceId());
KylinTicketTimesVo ticketTimesData = null;
KylinTicketVo ticketData = null;
......
......@@ -74,7 +74,7 @@ public class CandyCouponDueTaskController {
// 查取状态可用的到期兑换码
LambdaQueryWrapper<CandyCouponCode> couponCodeQueryWrapper = Wrappers.lambdaQuery(CandyCouponCode.class);
couponCodeQueryWrapper.eq(CandyCouponCode::getState, 1);
couponCodeQueryWrapper.eq(CandyCouponCode::getState, 0);
couponCodeQueryWrapper.le(CandyCouponCode::getRedeemStop, now);
int totalCount = platformCandyCouponCodeService.count(couponCodeQueryWrapper);
AtomicInteger pl = new AtomicInteger();
......
......@@ -20,6 +20,7 @@ import com.liquidnet.service.candy.mapper.CandyUserCouponMapper;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils;
import javax.servlet.http.HttpServletRequest;
import java.time.LocalDate;
......@@ -67,7 +68,7 @@ public class PlatformMemberRefundService extends ServiceImpl<AdamMemberRefundMap
LambdaUpdateWrapper<AdamMemberRefund> memberRefundLambdaUpdateWrapper = Wrappers.lambdaUpdate(AdamMemberRefund.class)
.eq(AdamMemberRefund::getRefundNo, refundNo);
memberRefundLambdaUpdateWrapper.set(AdamMemberRefund::getRefundAt, refundAt);
memberRefundLambdaUpdateWrapper.set(AdamMemberRefund::getRefundReason, refundError);
memberRefundLambdaUpdateWrapper.set(AdamMemberRefund::getRepayReason, refundError);
memberRefundLambdaUpdateWrapper.set(AdamMemberRefund::getUpdatedAt, now);
switch (status) {
......@@ -133,45 +134,52 @@ public class PlatformMemberRefundService extends ServiceImpl<AdamMemberRefundMap
syncVo = redisUtil.set(umKey, userMemberVo);
log.info("###会员退款回调处理成功:更新REDIS会员信息{}[orderNo:{},uid:{}]", syncVo ? "成功" : "失败", orderNo, memberOrder.getUid());
removeUcouponIdList = userCouponBasicDtoList.stream()
.filter(r -> (r.getExclusive() == 1 && r.getDuedAt().compareTo(expiryAt) == 0))
.map(CandyUserCouponBasicDto::getUcouponId)
.collect(Collectors.toList());
// 同步更新MYSQL会员信息
AdamUserMember updateInfoUserMember = new AdamUserMember();
updateInfoUserMember.setExpiryAt(newExpiryAt);
updateInfoUserMember.setUpdatedAt(now);
updateInfoUserMember.setComment("R");
int updateRst = adamUserMemberMapper.update(updateInfoUserMember, Wrappers.lambdaUpdate(AdamUserMember.class).eq(AdamUserMember::getUid, memberOrder.getUid()));
log.info("###会员退款回调处理成功:更新DB会员信息{}[orderNo:{},uid:{}]", updateRst <= 0 ? "失败" : "成功", orderNo, memberOrder.getUid());
if (!CollectionUtils.isEmpty(userCouponBasicDtoList)) {
removeUcouponIdList = userCouponBasicDtoList.stream()
.filter(r -> (r.getExclusive() == 1 && r.getDuedAt().compareTo(expiryAt) == 0))
.map(CandyUserCouponBasicDto::getUcouponId)
.collect(Collectors.toList());
}
} else if (userMemberVo.getState() == 2) {// 拉黑用户
removeUcouponIdList = userCouponBasicDtoList.stream()
.filter(r -> (r.getExclusive() == 1))
.map(CandyUserCouponBasicDto::getUcouponId)
.collect(Collectors.toList());
if (!CollectionUtils.isEmpty(userCouponBasicDtoList)) {
removeUcouponIdList = userCouponBasicDtoList.stream()
.filter(r -> (r.getExclusive() == 1))
.map(CandyUserCouponBasicDto::getUcouponId)
.collect(Collectors.toList());
}
}
// 同步删除REDIS用户会员权益券信息
List<String> finalRemoveUcouponIdList = removeUcouponIdList;
userCouponBasicDtoList.removeIf(r -> finalRemoveUcouponIdList.contains(r.getUcouponId()));
redisUtil.set(uckey, userCouponBasicDtoList);
if (!CollectionUtils.isEmpty(removeUcouponIdList)) {
List<String> finalRemoveUcouponIdList = removeUcouponIdList;
userCouponBasicDtoList.removeIf(r -> finalRemoveUcouponIdList.contains(r.getUcouponId()));
redisUtil.set(uckey, userCouponBasicDtoList);
// 同步更新MYSQL用户会员权益券信息
LambdaUpdateWrapper<CandyUserCoupon> candyUserCouponLambdaUpdateWrapper = Wrappers.lambdaUpdate(CandyUserCoupon.class);
candyUserCouponLambdaUpdateWrapper.in(CandyUserCoupon::getUcouponId, removeUcouponIdList.toArray()).eq(CandyUserCoupon::getState, 1);
CandyUserCoupon updateInfoUserCoupon = new CandyUserCoupon();
updateInfoUserCoupon.setState(2);
updateInfoUserCoupon.setUpdatedAt(now);
updateInfoUserCoupon.setOperator("system.vip.refund");
int updateRst = candyUserCouponMapper.update(updateInfoUserCoupon, candyUserCouponLambdaUpdateWrapper);
log.info("###会员退款回调处理成功:更新DB会员权益券信息{}[orderNo:{},uid:{}]", updateRst <= 0 ? "失败" : "成功", orderNo, memberOrder.getUid());
}
}
// 同步更新MYSQL用户会员权益券信息
LambdaUpdateWrapper<CandyUserCoupon> candyUserCouponLambdaUpdateWrapper = Wrappers.lambdaUpdate(CandyUserCoupon.class);
candyUserCouponLambdaUpdateWrapper.in(CandyUserCoupon::getUcouponId, removeUcouponIdList.toArray()).eq(CandyUserCoupon::getState, 1);
CandyUserCoupon updateInfoUserCoupon = new CandyUserCoupon();
updateInfoUserCoupon.setState(2);
updateInfoUserCoupon.setUpdatedAt(now);
updateInfoUserCoupon.setOperator("system.vip.refund");
int updateRst = candyUserCouponMapper.update(updateInfoUserCoupon, candyUserCouponLambdaUpdateWrapper);
log.info("###会员退款回调处理成功:更新DB会员权益券信息{}[orderNo:{},uid:{}]", updateRst <= 0 ? "失败" : "成功", orderNo, memberOrder.getUid());
// 同步更新MYSQL会员信息
AdamUserMember updateInfoUserMember = new AdamUserMember();
updateInfoUserMember.setExpiryAt(newExpiryAt);
updateInfoUserMember.setUpdatedAt(now);
updateInfoUserMember.setComment("R");
updateRst = adamUserMemberMapper.update(updateInfoUserMember, Wrappers.lambdaUpdate(AdamUserMember.class).eq(AdamUserMember::getUid, memberOrder.getUid()));
log.info("###会员退款回调处理成功:更新DB会员信息{}[orderNo:{},uid:{}]", updateRst <= 0 ? "失败" : "成功", orderNo, memberOrder.getUid());
// 同步更新MYSQL会员订单信息
AdamMemberOrder updateInfoMemberOrder = new AdamMemberOrder();
updateInfoMemberOrder.setMid(memberOrder.getMid());
updateInfoMemberOrder.setState(5);
updateInfoMemberOrder.setUpdatedAt(now);
updateRst = adamMemberOrderMapper.updateById(updateInfoMemberOrder);
int updateRst = adamMemberOrderMapper.updateById(updateInfoMemberOrder);
log.info("###会员退款回调处理成功:更新DB订单信息{}[orderNo:{}]", updateRst <= 0 ? "失败" : "成功", orderNo);
}
}
......@@ -22,8 +22,10 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils;
import java.nio.charset.StandardCharsets;
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.Base64;
import java.util.List;
@Slf4j
......@@ -90,9 +92,13 @@ public class PlatformCandyCouponService extends ServiceImpl<CandyCouponMapper, C
List<CandyCouponCode> initCouponCodeList = new ArrayList<>();
LocalDateTime now = LocalDateTime.now();
Integer eventAmt = mgtCoupon.getEventAmt();
Base64.Encoder encoder = Base64.getEncoder();
for (int i = 0; i < eventAmt; i++) {
CandyCouponCode couponCode = new CandyCouponCode();
couponCode.setCcode(RandomStringUtils.randomAlphanumeric(16));
String lStrEncoder = encoder.encodeToString((System.nanoTime() + RandomStringUtils.randomNumeric(3)).getBytes(StandardCharsets.UTF_8));
couponCode.setCcode(lStrEncoder.replace("=", ""));
couponCode.setCouponId(coupon.getCouponId());
couponCode.setState(0);
couponCode.setCreatedAt(now);
......
......@@ -490,6 +490,7 @@ CREATE TABLE `sweet_city_vote`
`phone` varchar(11) NOT NULL DEFAULT '' COMMENT '手机号',
`openId` varchar(255) NOT NULL DEFAULT '' COMMENT 'openId',
`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_name` varchar(255) NOT NULL DEFAULT '' COMMENT '城市名称',
`day_time` varchar(255) NOT NULL DEFAULT '' COMMENT '投票天',
......@@ -511,6 +512,7 @@ CREATE TABLE `sweet_city_vote_stat`
`city_name` varchar(255) NOT NULL DEFAULT '' COMMENT '城市名称',
`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 '创建时间',
`updated_at` datetime NULL DEFAULT CURRENT_TIMESTAMP COMMENT '更新时间',
PRIMARY KEY (`mid`),
......
......@@ -24,10 +24,11 @@ public class SweetConstant {
public final static String REDIS_KEY_SWEET_WECHAT_USER_INFO_STR="sweet:wechatUser:unionIdStr:";
public final static String REDIS_KEY_SWEET_WECHAT_USER_UNIONID="sweet:wechatUser:openId:";
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_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_STAT_UPDATE_TIME="sweet:cityVote:updateTime";
public final static String REDIS_KEY_SWEET_CITY_VOTE_STAT_LIST=":StatList";
public final static String REDIS_KEY_SWEET_CITY_VOTE_CITY_CODE=":cityCode:";
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=":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_STR_MODERNSKY="sweet:wechatUser:modernsky:unionIdStr:";
......
......@@ -32,28 +32,30 @@ public class SweetCityVoteController {
private ISweetCityVoteService sweetCityVoteService;
@GetMapping("statList")
@ApiOperation("城市投票排名")
@ApiOperation("城市投票排名列表")
@ApiImplicitParams({
@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(
@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")
@ApiOperation("用户投票记录")
@ApiOperation("用户投票")
public ResponseDto createVote(@Valid @RequestBody SweetCityVoteParam param) {
return sweetCityVoteService.createVote(param);
}
@GetMapping("setStatList")
@ApiOperation("统计投票排名")
public ResponseDto setStatList() {
return sweetCityVoteService.setStatList();
public ResponseDto setStatList(@RequestParam Integer type) {
return sweetCityVoteService.setStatList(type);
}
}
......@@ -27,6 +27,9 @@ public class SweetCityVoteStatDto implements Serializable ,Cloneable{
@ApiModelProperty("总投票数")
private Integer totalNum;
@ApiModelProperty("type")
private Integer type;
private static final SweetCityVoteStatDto obj = new SweetCityVoteStatDto();
public static SweetCityVoteStatDto getNew() {
......
......@@ -47,6 +47,11 @@ public class SweetCityVote implements Serializable {
@TableField("unionId")
private String unionId;
/**
* 活动类型 1新裤子 2莫宰羊
*/
private Integer type;
/**
* 城市代码
*/
......
......@@ -49,6 +49,11 @@ public class SweetCityVoteStat implements Serializable {
*/
private Integer manualVoteNum;
/**
* type
*/
private Integer type;
/**
* 创建时间
*/
......
......@@ -16,5 +16,5 @@ import java.util.List;
*/
public interface SweetCityVoteStatMapper extends BaseMapper<SweetCityVoteStat> {
List<SweetCityVoteStatDto> getStatList();
List<SweetCityVoteStatDto> getStatList(Integer type);
}
......@@ -5,6 +5,7 @@ import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
@ApiModel(value = "SweetCityVoteParam", description = "用户投票记录入参")
......@@ -29,4 +30,8 @@ public class SweetCityVoteParam implements Serializable {
@NotBlank(message = "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> {
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
private SweetCityVoteStatMapper sweetCityVoteStatMapper;
@Override
public ResponseDto getList(String phone, String unionId) {
List<SweetCItyVoteStatVo> sweetCityVoteStatList = redisDataUtils.getSweetCityVoteStatList();
SweetCityVoteParam userVote = redisDataUtils.getUserVote(phone, unionId);
public ResponseDto getList(String phone, String unionId, Integer type) {
List<SweetCItyVoteStatVo> sweetCityVoteStatList = redisDataUtils.getSweetCityVoteStatList(type);
SweetCityVoteParam userVote = redisDataUtils.getUserVote(phone, unionId, type);
if (!CollectionUtils.isEmpty(sweetCityVoteStatList)) {
for (SweetCItyVoteStatVo info : sweetCityVoteStatList) {
if (null == userVote) {
......@@ -64,14 +64,14 @@ public class SweetCityVoteServiceImpl extends ServiceImpl<SweetCityVoteMapper, S
HashMap<String, Object> stringObjectHashMap = CollectionUtil.mapStringObject();
stringObjectHashMap.put("list", sweetCityVoteStatList);
stringObjectHashMap.put("userVote", userVote);
stringObjectHashMap.put("statUpdateTime", redisDataUtils.getSweetCityVoteStatUpdateTime());
stringObjectHashMap.put("statUpdateTime", redisDataUtils.getSweetCityVoteStatUpdateTime(type));
return ResponseDto.success(stringObjectHashMap);
}
@Override
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) {
return ResponseDto.failure("已经投过票啦~");
}
......@@ -83,6 +83,7 @@ public class SweetCityVoteServiceImpl extends ServiceImpl<SweetCityVoteMapper, S
aNew.setUnionId(param.getUnionId());
aNew.setCityCode(param.getCityCode());
aNew.setCityName(param.getCityName());
aNew.setType(param.getType());
LinkedList<String> sqls = CollectionUtil.linkedListString();
......@@ -90,38 +91,38 @@ public class SweetCityVoteServiceImpl extends ServiceImpl<SweetCityVoteMapper, S
LinkedList<Object[]> sqlsDataB = CollectionUtil.linkedListObjectArr();
sqls.add(SqlMapping.get("sweet_city_vote.insert"));
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
sqls.add(SqlMapping.get("sweet_city_vote_stat.update"));
sqlsDataB.add(new Object[]{
LocalDateTime.now(), aNew.getCityCode()
LocalDateTime.now(), aNew.getCityCode(), aNew.getType()
});
} else { // insert
sqls.add(SqlMapping.get("sweet_city_vote_stat.insert"));
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(),
SqlMapping.gets(sqls, sqlsDataA, sqlsDataB));
redisDataUtils.incrSweetCityVote(aNew.getCityCode());
redisDataUtils.incrSweetCityVote(aNew.getCityCode(), aNew.getType());
redisDataUtils.setUserVote(param.getPhone(), param.getUnionId(), param);
return ResponseDto.success();
}
public ResponseDto setStatList() {
List<SweetCityVoteStatDto> list = sweetCityVoteStatMapper.getStatList();
public ResponseDto setStatList(Integer type) {
List<SweetCityVoteStatDto> list = sweetCityVoteStatMapper.getStatList(type);
if (!CollectionUtils.isEmpty(list)) {
ArrayList<SweetCItyVoteStatVo> newList = ObjectUtil.getSweetCItyVoteStatVoList();
list.forEach(r -> newList.add(SweetCItyVoteStatVo.getNew().copy(r)));
redisDataUtils.setSweetCityVoteStatList(newList);
redisDataUtils.setSweetCityVoteStatList(newList, type);
}
redisDataUtils.setSweetCityVoteStatUpdateTime();
redisDataUtils.setSweetCityVoteStatUpdateTime(type);
return ResponseDto.success();
}
}
......@@ -492,12 +492,14 @@ public class RedisDataUtils {
}
// 投票
public void setSweetCityVoteStatList(List<SweetCItyVoteStatVo> sweetCItyVoteStatVo) {
String redisKey = SweetConstant.REDIS_KEY_SWEET_CITY_VOTE_STAT_LIST;
public void setSweetCityVoteStatList(List<SweetCItyVoteStatVo> sweetCItyVoteStatVo, Integer type) {
String redisKey = SweetConstant.REDIS_KEY_SWEET_CITY_VOTE.concat(String.valueOf(type))
.concat(SweetConstant.REDIS_KEY_SWEET_CITY_VOTE_STAT_LIST);
redisUtil.set(redisKey, sweetCItyVoteStatVo);
}
public List<SweetCItyVoteStatVo> getSweetCityVoteStatList() {
String redisKey = SweetConstant.REDIS_KEY_SWEET_CITY_VOTE_STAT_LIST;
public List<SweetCItyVoteStatVo> getSweetCityVoteStatList(Integer type) {
String redisKey = SweetConstant.REDIS_KEY_SWEET_CITY_VOTE.concat(String.valueOf(type))
.concat(SweetConstant.REDIS_KEY_SWEET_CITY_VOTE_STAT_LIST);
Object obj = redisUtil.get(redisKey);
List<SweetCItyVoteStatVo> sweetCityVoteStatList = ObjectUtil.getSweetCItyVoteStatVoList();
if (null != obj) {
......@@ -505,12 +507,14 @@ public class RedisDataUtils {
}
return sweetCityVoteStatList;
}
public void incrSweetCityVote(String cityCode) {
String redisKey = SweetConstant.REDIS_KEY_SWEET_CITY_VOTE_CITY_CODE.concat(cityCode);
public void incrSweetCityVote(String cityCode, Integer type) {
String redisKey = SweetConstant.REDIS_KEY_SWEET_CITY_VOTE.concat(String.valueOf(type))
.concat(SweetConstant.REDIS_KEY_SWEET_CITY_VOTE_CITY_CODE).concat(cityCode);
redisUtil.incr(redisKey, 1);
}
public Integer getSweetCityVote(String cityCode) {
String redisKey = SweetConstant.REDIS_KEY_SWEET_CITY_VOTE_CITY_CODE.concat(cityCode);
public Integer getSweetCityVote(String cityCode, Integer type) {
String redisKey = SweetConstant.REDIS_KEY_SWEET_CITY_VOTE.concat(String.valueOf(type))
.concat(SweetConstant.REDIS_KEY_SWEET_CITY_VOTE_CITY_CODE).concat(cityCode);
Object obj = redisUtil.get(redisKey);
if (null == obj) {
return 0;
......@@ -519,11 +523,13 @@ public class RedisDataUtils {
}
}
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);
}
public SweetCityVoteParam getUserVote(String phone, String openId) {
String redisKey = SweetConstant.REDIS_KEY_SWEET_CITY_VOTE_USER.concat(phone).concat("-").concat(openId);
public SweetCityVoteParam getUserVote(String phone, String openId, Integer type) {
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);
if (null == obj) {
return null;
......@@ -531,12 +537,14 @@ public class RedisDataUtils {
return (SweetCityVoteParam) obj;
}
}
public void setSweetCityVoteStatUpdateTime() {
String redisKey = SweetConstant.REDIS_KEY_SWEET_CITY_VOTE_STAT_UPDATE_TIME;
public void setSweetCityVoteStatUpdateTime(Integer type) {
String redisKey = SweetConstant.REDIS_KEY_SWEET_CITY_VOTE.concat(String.valueOf(type))
.concat(SweetConstant.REDIS_KEY_SWEET_CITY_VOTE_STAT_UPDATE_TIME);
redisUtil.set(redisKey, DateUtil.getNowTime());
}
public String getSweetCityVoteStatUpdateTime() {
String redisKey = SweetConstant.REDIS_KEY_SWEET_CITY_VOTE_STAT_UPDATE_TIME;
public String getSweetCityVoteStatUpdateTime(Integer type) {
String redisKey = SweetConstant.REDIS_KEY_SWEET_CITY_VOTE.concat(String.valueOf(type))
.concat(SweetConstant.REDIS_KEY_SWEET_CITY_VOTE_STAT_UPDATE_TIME);
Object obj = redisUtil.get(redisKey);
if (null == obj) {
return "";
......
......@@ -37,6 +37,9 @@ public class SweetCItyVoteStatVo implements Serializable, Cloneable {
@ApiModelProperty("当前用户是否投了当前城市 1没投 2投了")
private Integer isVote;
@ApiModelProperty("type")
private Integer type;
/*@ApiModelProperty("创建时间")
private LocalDateTime createdAt;
......@@ -59,6 +62,7 @@ public class SweetCItyVoteStatVo implements Serializable, Cloneable {
// this.setVoteNum(source.getVoteNum());
// this.setManualVoteNum(source.getManualVoteNum());
this.setTotalNum(source.getTotalNum());
this.setType(source.getType());
return this;
}
......
......@@ -8,12 +8,18 @@
<result column="vote_num" property="voteNum"/>
<result column="manual_vote_num" property="manualVoteNum"/>
<result column="total_num" property="totalNum"/>
<result column="type" property="type"/>
</resultMap>
<select id="getStatList" resultMap="getListResult">
select
*, (vote_num + manual_vote_num) as total_num
from sweet_city_vote_stat
<where>
<if test="type != ''">
AND type=${type}
</if>
</where>
ORDER BY total_num DESC
</select>
</mapper>
......@@ -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_city_vote.insert=INSERT INTO sweet_city_vote (vote_id,phone,openId,unionId,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.update=UPDATE sweet_city_vote_stat SET vote_num = IFNULL(vote_num, 0) + 1, updated_at = ? WHERE city_code = ?
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,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 = ? 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 (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)
\ 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