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

Commit 0b08cf57 authored by 胡佳晨's avatar 胡佳晨

Merge branch 'master' into dev_stone

# Conflicts:
#	liquidnet-bus-client/liquidnet-client-admin/liquidnet-client-admin-web/src/main/resources/templates/zhengzai/candy/coupon/mgt/add1.html
#	liquidnet-bus-client/liquidnet-client-admin/liquidnet-client-admin-web/src/main/resources/templates/zhengzai/candy/coupon/mgt/add2.html
parents d992ac66 3086b75c
...@@ -112,6 +112,7 @@ public class CandyCouponCodeAdminController extends BaseController { ...@@ -112,6 +112,7 @@ public class CandyCouponCodeAdminController extends BaseController {
LambdaQueryWrapper<CandyCouponCode> couponCodeLambdaQueryWrapper = Wrappers.lambdaQuery(CandyCouponCode.class); LambdaQueryWrapper<CandyCouponCode> couponCodeLambdaQueryWrapper = Wrappers.lambdaQuery(CandyCouponCode.class);
couponCodeLambdaQueryWrapper.in(CandyCouponCode::getCcode, ccodes); couponCodeLambdaQueryWrapper.in(CandyCouponCode::getCcode, ccodes);
couponCodeLambdaQueryWrapper.eq(CandyCouponCode::getCouponId, couponId); couponCodeLambdaQueryWrapper.eq(CandyCouponCode::getCouponId, couponId);
couponCodeLambdaQueryWrapper.eq(CandyCouponCode::getState, 0);
List<CandyCouponCode> list = candyCouponCodeAdminService.list(couponCodeLambdaQueryWrapper); List<CandyCouponCode> list = candyCouponCodeAdminService.list(couponCodeLambdaQueryWrapper);
List<String> ccodeUpdateList = CollectionUtil.arrayListString(); List<String> ccodeUpdateList = CollectionUtil.arrayListString();
...@@ -155,6 +156,8 @@ public class CandyCouponCodeAdminController extends BaseController { ...@@ -155,6 +156,8 @@ public class CandyCouponCodeAdminController extends BaseController {
LambdaQueryWrapper<CandyCouponCode> couponCodeLambdaQueryWrapper = Wrappers.lambdaQuery(CandyCouponCode.class); LambdaQueryWrapper<CandyCouponCode> couponCodeLambdaQueryWrapper = Wrappers.lambdaQuery(CandyCouponCode.class);
couponCodeLambdaQueryWrapper.in(CandyCouponCode::getUcouponId, ucouponIds); couponCodeLambdaQueryWrapper.in(CandyCouponCode::getUcouponId, ucouponIds);
couponCodeLambdaQueryWrapper.eq(CandyCouponCode::getCouponId, couponId); couponCodeLambdaQueryWrapper.eq(CandyCouponCode::getCouponId, couponId);
couponCodeLambdaQueryWrapper.eq(CandyCouponCode::getState, 1);
couponCodeLambdaQueryWrapper.select(CandyCouponCode::getCouponId, CandyCouponCode::getUcouponId, CandyCouponCode::getRedeemUid);
List<CandyCouponCode> list = candyCouponCodeAdminService.list(couponCodeLambdaQueryWrapper); List<CandyCouponCode> list = candyCouponCodeAdminService.list(couponCodeLambdaQueryWrapper);
List<String> ccodeUpdateList = CollectionUtil.arrayListString(); List<String> ccodeUpdateList = CollectionUtil.arrayListString();
...@@ -166,6 +169,8 @@ public class CandyCouponCodeAdminController extends BaseController { ...@@ -166,6 +169,8 @@ public class CandyCouponCodeAdminController extends BaseController {
vos.removeIf(rv -> rv.getUcouponId().equals(r.getUcouponId())); vos.removeIf(rv -> rv.getUcouponId().equals(r.getUcouponId()));
} }
redisUtil.set(uckey, vos);
ccodeUpdateList.add(r.getUcouponId()); ccodeUpdateList.add(r.getUcouponId());
}); });
......
...@@ -293,8 +293,8 @@ public class PerformancesExpressController extends BaseController { ...@@ -293,8 +293,8 @@ public class PerformancesExpressController extends BaseController {
@RequiresPermissions("kylin:performancesExpress:batchPrintExpress") @RequiresPermissions("kylin:performancesExpress:batchPrintExpress")
@PostMapping("/batchPrintExpress") @PostMapping("/batchPrintExpress")
@ResponseBody @ResponseBody
public ResponseDto<KylinOrderExpressPrintVo> batchPrintExpress(@RequestParam("ids") String performanceId, @RequestParam("ticketId") String ticketId) { public ResponseDto<KylinOrderExpressPrintVo> batchPrintExpress(@RequestParam("ids") String performanceId, @RequestParam("ticketId") String ticketId, @RequestParam("printNum") Integer printNum) {
KylinOrderExpressPrintVo res = performancesExpressServiceImpl.batchPrintExpress(performanceId, ticketId); KylinOrderExpressPrintVo res = performancesExpressServiceImpl.batchPrintExpress(performanceId, ticketId, printNum);
try { try {
return ResponseDto.success(res); return ResponseDto.success(res);
} catch (Exception e) { } catch (Exception e) {
......
...@@ -9,8 +9,8 @@ liquidnet: ...@@ -9,8 +9,8 @@ liquidnet:
#host: 172.17.207.177:7001 #host: 172.17.207.177:7001
instance: instance:
prefer-ip-address: true 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: 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: 192.168.193.41:7001
# end-dev-这里是配置信息基本值 # end-dev-这里是配置信息基本值
spring: spring:
......
...@@ -47,7 +47,7 @@ var table = { ...@@ -47,7 +47,7 @@ var table = {
paginationLoop: false, paginationLoop: false,
pageSize: 10, pageSize: 10,
pageNumber: 1, pageNumber: 1,
pageList: [10, 25, 50, 200], pageList: [10, 25, 50, 200, 500, 2000],
toolbar: "toolbar", toolbar: "toolbar",
loadingFontSize: 13, loadingFontSize: 13,
striped: false, striped: false,
......
...@@ -92,7 +92,7 @@ ...@@ -92,7 +92,7 @@
if (row.state === 0) { if (row.state === 0) {
actions.push('<a class="btn btn-primary btn-xs ' + invalidFlag + '" href="javascript:void(0)" onclick="invalidHandler(\'' + row.ccode + '\')"><i class="fa fa-edit"></i>失效</a> '); actions.push('<a class="btn btn-primary btn-xs ' + invalidFlag + '" href="javascript:void(0)" onclick="invalidHandler(\'' + row.ccode + '\')"><i class="fa fa-edit"></i>失效</a> ');
} else if (row.state === 1) { } else if (row.state === 1) {
actions.push('<a class="btn btn-danger btn-xs ' + recoverFlag + '" href="javascript:void(0)" onclick="recoverHandler(\'' + row.ccode + '\',' + row.ucouponId + '\')"><i class="fa fa-remove"></i>退回</a>'); actions.push('<a class="btn btn-danger btn-xs ' + recoverFlag + '" href="javascript:void(0)" onclick="recoverHandler(\'' + row.ccode + '\', \'' + row.ucouponId + '\')"><i class="fa fa-remove"></i>退回</a>');
} }
return actions.join(''); return actions.join('');
} }
...@@ -113,17 +113,21 @@ ...@@ -113,17 +113,21 @@
function invalidHandler(ccode) { function invalidHandler(ccode) {
if (ccode !== null && ccode !== undefined) { if (ccode !== null && ccode !== undefined) {
var data = {"couponId":couponId,"ccodes": ccode}; $.modal.confirm("是否失效?", function() {
$.operate.submit('code/invalid', "post", "json", data); var data = {"couponId":couponId,"ccodes": ccode};
$.operate.submit('code/invalid', "post", "json", data);
});
} else { } else {
$.operate.batchProcessingForCouponCode(couponId, 1); $.operate.batchProcessingForCouponCode(couponId, 1);
} }
} }
function recoverHandler(ccode, ucouponId) { function recoverHandler(ccode, ucouponId) {
if (ccode !== null && ccode !== undefined) { if (ccode !== null && ccode !== undefined && ucouponId !== null && ucouponId !== undefined) {
var data = {"ucouponId":ucouponId,"couponId":couponId,"ccodes": ccode}; var data = {"ucouponIds": ucouponId, "couponId": couponId, "ccodes": ccode};
$.operate.submit('code/recover', "post", "json", data); $.modal.confirm("是否退回?", function() {
$.operate.submit('code/recover', "post", "json", data);
});
} }
// else { // else {
// $.operate.batchProcessingForCouponCode(couponId, 2); // $.operate.batchProcessingForCouponCode(couponId, 2);
......
...@@ -277,7 +277,7 @@ ...@@ -277,7 +277,7 @@
searchData.reduce((cur,next) => { searchData.reduce((cur,next) => {
if (!obj[next.performancesId]) { if (!obj[next.performancesId]) {
obj[next.performancesId] = true obj[next.performancesId] = true
str+= `<li class="selectData" onclick="selectOne('${next.performancesId}', 'performancesId')">${next.title}</li>` str+= `<li class="selectData" onclick="selectOne('${next.performancesId}','${next.title}')">${next.title}</li>`
} }
},[]) //设置cur默认类型为数组,并且初始值为空的数组 },[]) //设置cur默认类型为数组,并且初始值为空的数组
$('#dataList').html(str); $('#dataList').html(str);
...@@ -295,21 +295,22 @@ ...@@ -295,21 +295,22 @@
if (res.data.length>0) { if (res.data.length>0) {
searchData = res.data; searchData = res.data;
searchData.forEach((item,index)=>{ searchData.forEach((item,index)=>{
str+= `<li class="selectData" onclick="selectOne('${item.id}', 'id')">${item.title}</li>` str+= `<li class="selectData" onclick="selectOne('${item.id}','${item.title}')">${item.title}</li>`
}) })
$('#dataList').html(str); $('#dataList').html(str);
} else { } else {
$('#dataList').html('<li style="width:100%;text-align:center;color:#ccc;">--- 暂无数据 ---</li>'); $('#dataList').html('<li style="width:100%;text-align:center;color:#ccc;">--- 暂无数据 ---</li>');
} }
}) })
// $.ajax({
// type:'get',
// url:phpMallUrl + '/admin/goodListForQuick',
// success:function(e){
// }
// });
}; };
function selectOne(id, name) { function selectOne(id,name) {
searchData.some( item => { $("#searchIpt").val(name);
if (item[name] == id) {
return $("#searchIpt").val(item.title);
}
} )
// $("#searchIpt").val(name);
showId = id; showId = id;
if (typeOne == 2) { if (typeOne == 2) {
return return
......
...@@ -279,7 +279,7 @@ ...@@ -279,7 +279,7 @@
searchData.reduce((cur,next) => { searchData.reduce((cur,next) => {
if (!obj[next.performancesId]) { if (!obj[next.performancesId]) {
obj[next.performancesId] = true obj[next.performancesId] = true
str+= `<li class="selectData" onclick="selectOne('${next.performancesId}','performancesId')">${next.title}</li>` str+= `<li class="selectData" onclick="selectOne('${next.performancesId}','${next.title}')">${next.title}</li>`
} }
},[]) //设置cur默认类型为数组,并且初始值为空的数组 },[]) //设置cur默认类型为数组,并且初始值为空的数组
$('#dataList').html(str); $('#dataList').html(str);
...@@ -297,20 +297,22 @@ ...@@ -297,20 +297,22 @@
if (res.data.length>0) { if (res.data.length>0) {
searchData = res.data; searchData = res.data;
searchData.forEach((item,index)=>{ searchData.forEach((item,index)=>{
str+= `<li class="selectData" onclick="selectOne('${item.id}','id')">${item.title}</li>` str+= `<li class="selectData" onclick="selectOne('${item.id}','${item.title}')">${item.title}</li>`
}) })
$('#dataList').html(str); $('#dataList').html(str);
} else { } else {
$('#dataList').html('<li style="width:100%;text-align:center;color:#ccc;">--- 暂无数据 ---</li>'); $('#dataList').html('<li style="width:100%;text-align:center;color:#ccc;">--- 暂无数据 ---</li>');
} }
}) })
// $.ajax({
// type:'get',
// url:phpMallUrl + '/admin/goodListForQuick',
// success:function(e){
// }
// });
}; };
function selectOne(id,name) { function selectOne(id,name) {
searchData.some( item => { $("#searchIpt").val(name);
if (item[name] == id) {
return $("#searchIpt").val(item.title);
}
} )
showId = id; showId = id;
if (typeOne == 2) { if (typeOne == 2) {
return return
......
...@@ -3,6 +3,13 @@ ...@@ -3,6 +3,13 @@
<head> <head>
<th:block th:include="include :: header('选项卡 & 面板')"/> <th:block th:include="include :: header('选项卡 & 面板')"/>
</head> </head>
<style>
.img-details{
width: 30%;
height: 40%;
}
</style>
<body class="gray-bg"> <body class="gray-bg">
<div class="wrapper wrapper-content animated fadeIn"> <div class="wrapper wrapper-content animated fadeIn">
<div class="row"> <div class="row">
...@@ -57,12 +64,17 @@ ...@@ -57,12 +64,17 @@
th:object="${kylinPerformanceMisVo}"> th:object="${kylinPerformanceMisVo}">
<div> <div>
<p>演出封面:</p> <p>演出封面:</p>
<img name="img" th:src="*{imgPoster}"> <img class="img-details" name="img" th:src="*{imgPoster}" th:onclick="click_big([[*{imgPoster}]])">
</div> </div>
<div> <div>
<label>演出名称:</label> <label>演出名称:</label>
<span th:text="*{title}"></span> <span th:text="*{title}"></span>
</div> </div>
<div>
<label>是否实名:</label>
<span th:if="*{isTrueName==1}"></span>
<span th:if="*{isTrueName==0}"></span>
</div>
<div> <div>
<label>时间:</label> <label>时间:</label>
<span th:text="*{timeStart}"></span> <span th:text="*{timeStart}"></span>
...@@ -101,7 +113,7 @@ ...@@ -101,7 +113,7 @@
</div> </div>
<div> <div>
<p>演出批文:</p> <p>演出批文:</p>
<img name="img" th:src="*{approvalUrl}"> <img class="img-details" name="img" th:src="*{approvalUrl}" th:onclick="click_big([[*{approvalUrl}]])">
</div> </div>
<div class="ibox-content" id="eg"> <div class="ibox-content" id="eg">
...@@ -380,6 +392,27 @@ ...@@ -380,6 +392,27 @@
$("#tab-nav-1").bind("click", function () { $("#tab-nav-1").bind("click", function () {
$("#tab_iframe_1").attr("src", prefix + "/performanceStatic/" + '[[${kylinPerformanceMisVo.performancesId}]]'.replaceAll("\"", "")); $("#tab_iframe_1").attr("src", prefix + "/performanceStatic/" + '[[${kylinPerformanceMisVo.performancesId}]]'.replaceAll("\"", ""));
}); });
// 点击图片放大
function click_big(url){
var img_url = url
if(url.indexOf("x-oss-process") != "-1"){
img_url = url.split("?")[0]
}
var json = {
"data": [ //相册包含的图片,数组格式
{
"alt": "演出封面",
"src": img_url, //原图地址
}
]
};
layer.photos({
photos: json,
closeBtn: 1, //右上角按钮,可通过配置1和2来展示,如果不显示,则closeBtn: 0
anim: 5 //0-6的选择,指定弹出图片动画类型,默认随机(请注意,3.0之前的版本用shift参数)
});
}
</script> </script>
</body> </body>
</html> </html>
...@@ -53,6 +53,12 @@ ...@@ -53,6 +53,12 @@
</select> </select>
</div> </div>
</div> </div>
<div class="form-group">
<label class="col-sm-2 control-label is-required">数量:</label>
<div class="col-sm-10">
<input class="form-control" type="text" name="printNum" id="printNum">
</div>
</div>
</div> </div>
</form> </form>
</div> </div>
...@@ -266,7 +272,7 @@ ...@@ -266,7 +272,7 @@
LODOP.PRINT(); LODOP.PRINT();
} }
function printExpress(performanceId, ticketId) { function printExpress(performanceId, ticketId, printNum) {
var message = "确定打印吗?"; var message = "确定打印吗?";
$.modal.confirm(message, function () { $.modal.confirm(message, function () {
try { try {
...@@ -279,7 +285,7 @@ ...@@ -279,7 +285,7 @@
} }
var data = ''; var data = '';
var ids = [performanceId]; var ids = [performanceId];
data = {"ids": ids.join(), "ticketId": ticketId}; data = {"ids": ids.join(), "ticketId": ticketId, "printNum": printNum};
var configPrint = { var configPrint = {
url: prefix + "/batchPrintExpress", url: prefix + "/batchPrintExpress",
type: "post", type: "post",
...@@ -355,7 +361,8 @@ ...@@ -355,7 +361,8 @@
shadeClose: true, shadeClose: true,
btn1: function (index, layero) { btn1: function (index, layero) {
var ticketId = layero.find('#openTicketListTplSelect').val(); var ticketId = layero.find('#openTicketListTplSelect').val();
printExpress(performanceId, ticketId); var printNum = layero.find('#printNum').val();
printExpress(performanceId, ticketId, printNum);
} }
}); });
} }
......
...@@ -2,6 +2,110 @@ ...@@ -2,6 +2,110 @@
<html lang="zh" xmlns:th="http://www.thymeleaf.org"> <html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head> <head>
<th:block th:include="include :: header('退款详情')"/> <th:block th:include="include :: header('退款详情')"/>
<style>
.showPhotoModal {
display: none;
height: 450px;
width: 640px;
z-index: 999;
position: fixed;
top: 0;
right: 0;
bottom: 0;
left: 0;
margin: 10% auto;
background: #fff;
box-shadow: rgba(0, 0, 0, 0.3) 1px 1px 50px;
}
.showPhotoModal .top{
height: 40px;
display: flex;
justify-content: space-between;
align-items: center;
border-bottom: 1px solid #ccc;
}
.showPhotoModal .top .title{
padding-left: 12px;
font-size: 16px;
}
.showPhotoModal .top .close{
padding-right: 12px;
font-size: 16px;
color: black;
}
.showPhotoModal .content {
height: 360px;
width: 100%;
border-bottom: 1px solid #ccc;
display: flex;
justify-content: center;
align-items: center;
}
.showPhotoModal .content img{
max-height: 360px;
/* width: 100%; */
}
.showPhotoModal .bottom {
height: 50px;
display: flex;
flex-direction: row-reverse;
align-items: center;
}
.showPhotoModal .bottom {
display: flex;
flex-direction: row-reverse;
align-items: center;
}
.showPhotoModal .bottom div span {
cursor: pointer;
font-size: 12px;
font-weight: normal;
margin: 0px 7px;
padding: 0px 15px;
color: rgb(255, 255, 255);
border: 1px solid rgb(0, 100, 182);
background: no-repeat rgb(0, 113, 206);
border-radius: 3px;
display: inline-block;
height: 30px;
line-height: 30px;
text-align: center;
vertical-align: middle;
text-decoration: none;
outline: none;
box-sizing: content-box;
}
.showPhotoModal .bottom div span:last-child {
font-size: 12px;
font-weight: normal;
margin: 0px 7px;
padding: 0px 15px;
color: black;
border: 1px solid #bbb;
background: no-repeat #fff;
border-radius: 3px;
display: inline-block;
height: 30px;
line-height: 30px;
text-align: center;
vertical-align: middle;
text-decoration: none;
outline: none;
box-sizing: content-box;
}
.modals {
position: absolute;
width: 100%;
height: 100%;
top: 0;
left: 0;
z-index: 888;
display: none;
overflow: hidden;
background-color: rgb(0, 0, 0);
opacity: 0.3;
}
</style>
</head> </head>
<body class="white-bg"> <body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content"> <div class="wrapper wrapper-content animated fadeInRight ibox-content">
...@@ -73,7 +177,7 @@ ...@@ -73,7 +177,7 @@
<tbody> <tbody>
<tr> <tr>
<td th:each="str : ${KylinOrderRefundsVo.picList}" style="float: left"> <td th:each="str : ${KylinOrderRefundsVo.picList}" style="float: left">
<img th:src="${str}" width="25%"> <img th:src="${str}" onclick="showPic(this)" width="25%">
</td> </td>
</tr> </tr>
</tbody> </tbody>
...@@ -105,8 +209,45 @@ ...@@ -105,8 +209,45 @@
</tbody> </tbody>
</table> </table>
</div> </div>
<a id="downLoadImg" href="" download style="display: none;"></a>
<div class="modals"></div>
<div class="showPhotoModal">
<div class="top">
<div class="title">
图片展示
</div>
<div class="close" onclick="closeModal()">
x
</div>
</div>
<div class="content">
<img id="showPhoto" src="" alt="">
</div>
<div class="bottom">
<div>
<span onclick="downloadImg()">下载</span>
<span onclick="closeModal()">关闭</span>
</div>
</div>
</div>
</form> </form>
</div> </div>
<th:block th:include="include :: footer"/> <th:block th:include="include :: footer"/>
</body> </body>
<script>
function showPic(e) {
$(".showPhotoModal").show();
$(".modals").show();
$("#showPhoto").attr('src', $(e).attr('src'));
};
function downloadImg() {
$("#downLoadImg").attr('href', $("#showPhoto").attr('src')+'?response-content-type=application/octet-stream');
$("#downLoadImg")[0].click();
closeModal();
};
function closeModal() {
$(".showPhotoModal").hide();
$(".modals").hide();
};
</script>
</html> </html>
...@@ -406,9 +406,23 @@ public class KylinRefundsStatusServiceImpl { ...@@ -406,9 +406,23 @@ public class KylinRefundsStatusServiceImpl {
kylinOrderRefunds.setExecutorName(authName); kylinOrderRefunds.setExecutorName(authName);
kylinOrderRefunds.setExecutorAt(LocalDateTime.now()); kylinOrderRefunds.setExecutorAt(LocalDateTime.now());
kylinOrderRefunds.setRefuse(refundApplyParam.getRefuse()); kylinOrderRefunds.setRefuse(refundApplyParam.getRefuse());
kylinOrderRefunds.setUpdatedAt(LocalDateTime.now());
for (KylinOrderRefunds refund : refundList) { for (KylinOrderRefunds refund : refundList) {
// 更新退款表
kylinOrderRefunds.setUpdatedAt(LocalDateTime.now());
kylinOrderRefundsMapper.update(
kylinOrderRefunds,
new UpdateWrapper<KylinOrderRefunds>().eq("order_refunds_id", refund.getOrderRefundsId())
);
// 修改缓存
KylinOrderRefundsVo kylinOrderRefundsVo = new KylinOrderRefundsVo();
BeanUtils.copyProperties(kylinOrderRefunds, kylinOrderRefundsVo);
BasicDBObject object = new BasicDBObject("$set", mongoConverter.convertToMongoType(kylinOrderRefundsVo));
UpdateResult updateResult = mongoTemplate.getCollection(KylinOrderRefundsVo.class.getSimpleName()).updateOne(
Query.query(Criteria.where("orderRefundsId").is(refund.getOrderRefundsId())).getQueryObject(),
object
);
KylinOrderTickets oderInfo = kylinOrderTicketsMapper.selectOne( KylinOrderTickets oderInfo = kylinOrderTicketsMapper.selectOne(
new QueryWrapper<KylinOrderTickets>() new QueryWrapper<KylinOrderTickets>()
.eq("order_tickets_id", refund.getOrderTicketsId()) .eq("order_tickets_id", refund.getOrderTicketsId())
...@@ -426,7 +440,7 @@ public class KylinRefundsStatusServiceImpl { ...@@ -426,7 +440,7 @@ public class KylinRefundsStatusServiceImpl {
params.add("reason", "按需退款"); params.add("reason", "按需退款");
MultiValueMap<String, String> headers = new LinkedMultiValueMap(); MultiValueMap<String, String> headers = new LinkedMultiValueMap();
// headers.add("Content-Type", "application/json;charset=UTF-8"); // headers.add("Content-Type", "application/json;charset=UTF-8");
headers.add("Accept", "application/json;charset=UTF-8"); headers.add("Accept", "application/json;charset=UTF-8");
log.info("退款参数" + JsonUtils.toJson(params)); log.info("退款参数" + JsonUtils.toJson(params));
// 请求pay // 请求pay
...@@ -443,23 +457,23 @@ public class KylinRefundsStatusServiceImpl { ...@@ -443,23 +457,23 @@ public class KylinRefundsStatusServiceImpl {
KylinOrderRefunds kylinOrderRefundsFail = new KylinOrderRefunds(); KylinOrderRefunds kylinOrderRefundsFail = new KylinOrderRefunds();
kylinOrderRefundsFail.setStatus(KylinTableStatusConst.ORDER_REFUND_STATUS_ERROR); kylinOrderRefundsFail.setStatus(KylinTableStatusConst.ORDER_REFUND_STATUS_ERROR);
kylinOrderRefundsFail.setRefundError(message); kylinOrderRefundsFail.setRefundError(message);
kylinOrderRefunds.setUpdatedAt(LocalDateTime.now()); kylinOrderRefundsFail.setUpdatedAt(LocalDateTime.now());
kylinOrderRefundsMapper.update( kylinOrderRefundsMapper.update(
kylinOrderRefundsFail, kylinOrderRefundsFail,
new UpdateWrapper<KylinOrderRefunds>().eq("order_refunds_id", refund.getOrderRefundsId()) new UpdateWrapper<KylinOrderRefunds>().eq("order_refunds_id", refund.getOrderRefundsId())
); );
// 修改缓存 // 修改缓存
KylinOrderRefundsVo kylinOrderRefundsVo = new KylinOrderRefundsVo(); KylinOrderRefundsVo kylinOrderRefundsVoFail = new KylinOrderRefundsVo();
BeanUtils.copyProperties(kylinOrderRefundsFail, kylinOrderRefundsVo); BeanUtils.copyProperties(kylinOrderRefundsFail, kylinOrderRefundsVoFail);
BasicDBObject object = new BasicDBObject("$set", mongoConverter.convertToMongoType(kylinOrderRefundsVo)); BasicDBObject objectFail = new BasicDBObject("$set", mongoConverter.convertToMongoType(kylinOrderRefundsVoFail));
UpdateResult updateResult = mongoTemplate.getCollection(KylinOrderRefundsVo.class.getSimpleName()).updateOne( UpdateResult updateFailResult = mongoTemplate.getCollection(KylinOrderRefundsVo.class.getSimpleName()).updateOne(
Query.query(Criteria.where("orderRefundsId").is(refund.getOrderRefundsId())).getQueryObject(), Query.query(Criteria.where("orderRefundsId").is(refund.getOrderRefundsId())).getQueryObject(),
object objectFail
); );
List<String> strings = Arrays.asList(refund.getOrderRefundsId()); // List<String> strings = Arrays.asList(refund.getOrderRefundsId());
List<String> strings1 = Arrays.asList(refund.getOrderTicketsId()); // List<String> strings1 = Arrays.asList(refund.getOrderTicketsId());
dataUtils.delOrderRefundVo(strings); // dataUtils.delOrderRefundVo(strings);
dataUtils.delOrderRefundVoByOrderId(strings1); // dataUtils.delOrderRefundVoByOrderId(strings1);
continue; continue;
}else{ }else{
...@@ -474,19 +488,6 @@ public class KylinRefundsStatusServiceImpl { ...@@ -474,19 +488,6 @@ public class KylinRefundsStatusServiceImpl {
log.info("退款请求pay失败e" + e.getMessage()); log.info("退款请求pay失败e" + e.getMessage());
continue; continue;
} }
// 更新退款表
kylinOrderRefundsMapper.update(
kylinOrderRefunds,
new UpdateWrapper<KylinOrderRefunds>().eq("order_refunds_id", refund.getOrderRefundsId())
);
// 修改缓存
KylinOrderRefundsVo kylinOrderRefundsVo = new KylinOrderRefundsVo();
BeanUtils.copyProperties(kylinOrderRefunds, kylinOrderRefundsVo);
BasicDBObject object = new BasicDBObject("$set", mongoConverter.convertToMongoType(kylinOrderRefundsVo));
UpdateResult updateResult = mongoTemplate.getCollection(KylinOrderRefundsVo.class.getSimpleName()).updateOne(
Query.query(Criteria.where("orderRefundsId").is(refund.getOrderRefundsId())).getQueryObject(),
object
);
} }
List<String> orderRefundIds = refundList.stream().map( List<String> orderRefundIds = refundList.stream().map(
......
...@@ -622,13 +622,13 @@ public class PerformancesExpressServiceImpl extends ServiceImpl<KylinOrderExpres ...@@ -622,13 +622,13 @@ public class PerformancesExpressServiceImpl extends ServiceImpl<KylinOrderExpres
return kylinOrderExpressPrintVo; return kylinOrderExpressPrintVo;
} }
public KylinOrderExpressPrintVo batchPrintExpress(String performanceId, String ticketId) { public KylinOrderExpressPrintVo batchPrintExpress(String performanceId, String ticketId, Integer printNum) {
List<OrderExpressListDao> newList = new ArrayList<>(); List<OrderExpressListDao> newList = new ArrayList<>();
int count = 0; int count = 0;
int limitNum = 1000; int limitNum = 1000;
int mid = 0; int mid = 0;
do { do {
List<OrderExpressListDao> list = kylinOrderExpressMapper.selectPrintListOfPerformanceId(performanceId, ticketId, mid, limitNum); List<OrderExpressListDao> list = kylinOrderExpressMapper.selectPrintListOfPerformanceId(performanceId, ticketId, mid, limitNum, printNum);
if (!CollectionUtil.isEmpty(list)) { if (!CollectionUtil.isEmpty(list)) {
newList.addAll(list); newList.addAll(list);
......
...@@ -9,8 +9,8 @@ liquidnet: ...@@ -9,8 +9,8 @@ liquidnet:
#host: 172.17.207.177:7001 #host: 172.17.207.177:7001
instance: instance:
prefer-ip-address: true 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: 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: 192.168.193.41:7001
# end-dev-这里是配置信息基本值 # end-dev-这里是配置信息基本值
......
...@@ -50,8 +50,8 @@ liquidnet: ...@@ -50,8 +50,8 @@ liquidnet:
user: admin user: admin
pwd: S&y$6d*JwJ pwd: S&y$6d*JwJ
chime: chime:
host: s-2ze04ffc16a54af4.mongodb.rds.aliyuncs.com:3717,s-2zed407acd469104.mongodb.rds.aliyuncs.com host: 172.17.205.50:27017
port: 3717 port: 27017
user: admin user: admin
pwd: S&y$6d*JwJ pwd: S&y$6d*JwJ
service: service:
......
...@@ -127,6 +127,7 @@ global-auth: ...@@ -127,6 +127,7 @@ global-auth:
- ${liquidnet.info.context}/send - ${liquidnet.info.context}/send
- ${liquidnet.info.context}/member/info - ${liquidnet.info.context}/member/info
- ${liquidnet.info.context}/member/info/rights - ${liquidnet.info.context}/member/info/rights
- ${liquidnet.info.context}/member/onsale
- ${liquidnet.info.context}/member/check/depth - ${liquidnet.info.context}/member/check/depth
- ${liquidnet.info.context}/member/check/depth/new - ${liquidnet.info.context}/member/check/depth/new
- ${liquidnet.info.context}/member/order/callback - ${liquidnet.info.context}/member/order/callback
......
...@@ -23,7 +23,8 @@ public interface KylinOrderExpressMapper extends BaseMapper<KylinOrderExpress> { ...@@ -23,7 +23,8 @@ public interface KylinOrderExpressMapper extends BaseMapper<KylinOrderExpress> {
@Param("performanceId") String performanceId, @Param("performanceId") String performanceId,
@Param("ticketId") String ticketId, @Param("ticketId") String ticketId,
@Param("mid") Integer mid, @Param("mid") Integer mid,
@Param("limitNum") Integer limitNum @Param("limitNum") Integer limitNum,
@Param("printNum") Integer printNum
); );
List<KylinOrderExpress> getCanCancelExpressList( List<KylinOrderExpress> getCanCancelExpressList(
......
...@@ -38,6 +38,7 @@ ...@@ -38,6 +38,7 @@
AND a.performances_id = #{performanceId} AND a.performances_id = #{performanceId}
<if test="ticketId != ''">AND e.tickets_id = #{ticketId}</if> <if test="ticketId != ''">AND e.tickets_id = #{ticketId}</if>
AND a.mid > ${mid} AND a.mid > ${mid}
<if test="printNum != '' and printNum > 0">AND a.mid > ${printNum}</if>
</where> </where>
ORDER BY a.mid ASC ORDER BY a.mid ASC
LIMIT ${limitNum} LIMIT ${limitNum}
......
...@@ -129,7 +129,7 @@ public class AdamLoginController { ...@@ -129,7 +129,7 @@ public class AdamLoginController {
} }
AdamUserInfoVo userInfoVo = adamRdmService.getUserInfoVoByUid(uid); AdamUserInfoVo userInfoVo = adamRdmService.getUserInfoVoByUid(uid);
if (null == userInfoVo) { if (null == userInfoVo || userInfoVo.getState() == 2) {
log.warn("Cancelled mobile:{}", mobile); log.warn("Cancelled mobile:{}", mobile);
return ResponseDto.failure(ErrorMapping.get("10024")); return ResponseDto.failure(ErrorMapping.get("10024"));
} }
...@@ -169,7 +169,7 @@ public class AdamLoginController { ...@@ -169,7 +169,7 @@ public class AdamLoginController {
AdamUserInfoVo userInfoVo = toRegister ? adamUserService.register(mobile) : adamRdmService.getUserInfoVoByUid(uid); AdamUserInfoVo userInfoVo = toRegister ? adamUserService.register(mobile) : adamRdmService.getUserInfoVoByUid(uid);
if (!toRegister && null == userInfoVo) { if (!toRegister && (null == userInfoVo || userInfoVo.getState() == 2)) {
log.warn("Cancelled mobile:{}", mobile); log.warn("Cancelled mobile:{}", mobile);
return ResponseDto.failure(ErrorMapping.get("10024")); return ResponseDto.failure(ErrorMapping.get("10024"));
} }
...@@ -206,7 +206,7 @@ public class AdamLoginController { ...@@ -206,7 +206,7 @@ public class AdamLoginController {
AdamUserInfoVo userInfoVo = toRegister ? adamUserService.register(mobile) : adamRdmService.getUserInfoVoByUid(uid); AdamUserInfoVo userInfoVo = toRegister ? adamUserService.register(mobile) : adamRdmService.getUserInfoVoByUid(uid);
if (!toRegister && null == userInfoVo) { if (!toRegister && (null == userInfoVo || userInfoVo.getState() == 2)) {
log.warn("Cancelled mobile:{}", mobile); log.warn("Cancelled mobile:{}", mobile);
return ResponseDto.failure(ErrorMapping.get("10024")); return ResponseDto.failure(ErrorMapping.get("10024"));
} }
...@@ -257,6 +257,11 @@ public class AdamLoginController { ...@@ -257,6 +257,11 @@ public class AdamLoginController {
AdamUserInfoVo userInfoVo = toRegister ? adamUserService.register(wechatMobile) : adamRdmService.getUserInfoVoByUid(uid); AdamUserInfoVo userInfoVo = toRegister ? adamUserService.register(wechatMobile) : adamRdmService.getUserInfoVoByUid(uid);
if (!toRegister && (null == userInfoVo || userInfoVo.getState() == 2)) {
log.warn("Cancelled mobile:{}", wechatMobile);
return ResponseDto.failure(ErrorMapping.get("10024"));
}
// 根据skip值,设置IsComplete(考虑到已存在用户未完善信息的情况,这里只对返回数据单独设置IsComplete) // 根据skip值,设置IsComplete(考虑到已存在用户未完善信息的情况,这里只对返回数据单独设置IsComplete)
userInfoVo.setIsComplete(1); userInfoVo.setIsComplete(1);
...@@ -285,7 +290,7 @@ public class AdamLoginController { ...@@ -285,7 +290,7 @@ public class AdamLoginController {
if (StringUtils.isEmpty(uid)) return ResponseDto.failure(ErrorMapping.get("10006")); if (StringUtils.isEmpty(uid)) return ResponseDto.failure(ErrorMapping.get("10006"));
AdamUserInfoVo userInfoVo = adamRdmService.getUserInfoVoByUid(uid); AdamUserInfoVo userInfoVo = adamRdmService.getUserInfoVoByUid(uid);
if (null == userInfoVo) { if (null == userInfoVo || userInfoVo.getState() == 2) {
log.warn("Cancelled openId:{}", parameter.getOpenId()); log.warn("Cancelled openId:{}", parameter.getOpenId());
return ResponseDto.failure(ErrorMapping.get("10024")); return ResponseDto.failure(ErrorMapping.get("10024"));
} }
......
...@@ -80,6 +80,18 @@ public class AdamMemberController { ...@@ -80,6 +80,18 @@ public class AdamMemberController {
return ResponseDto.success(adamRdmService.getMemberRightsDetailVoByRightsId(memberId, mrightsId)); return ResponseDto.success(adamRdmService.getMemberRightsDetailVoByRightsId(memberId, mrightsId));
} }
@ApiOperationSupport(order = 1)
@ApiOperation(value = "会员开售状态")
@GetMapping("onsale")
public ResponseDto<Integer> onsale() {
AdamMemberSimpleVo memberSimpleVo = adamRdmService.getMemberSimpleVo();
AdamMemberVo memberVo = null;
if (null != memberSimpleVo && null != (memberVo = adamRdmService.getMemberVoByMemberId(memberSimpleVo.getMemberId()))) {
return ResponseDto.success(memberVo.getOnsale());
}
return ResponseDto.success(1);
}
/* ------------------------------------------------------------|@API:RSC */ /* ------------------------------------------------------------|@API:RSC */
@ApiOperationSupport(order = 99) @ApiOperationSupport(order = 99)
......
...@@ -183,6 +183,10 @@ public class AdamRdmService { ...@@ -183,6 +183,10 @@ public class AdamRdmService {
return vo; return vo;
} }
public void delRealInfoVoByUid(String uid) {
redisUtil.del(AdamRedisConst.INFO_REAL_NAME.concat(uid));
}
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | 认证失败的<ID_TYPE+ID_NO, ID_NAME> */ /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | 认证失败的<ID_TYPE+ID_NO, ID_NAME> */
public boolean setCertificationJunk(int idType, String idNo, String idName) { public boolean setCertificationJunk(int idType, String idNo, String idName) {
...@@ -652,7 +656,7 @@ public class AdamRdmService { ...@@ -652,7 +656,7 @@ public class AdamRdmService {
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | <ORDER_NO, MEMBER_ORDER_INFO> */ /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | <ORDER_NO, MEMBER_ORDER_INFO> */
public boolean setShotMemberOrderVoByOrderNo(String orderNo, AdamMemberOrderVo vo) { public boolean setShotMemberOrderVoByOrderNo(String orderNo, AdamMemberOrderVo vo) {
return redisUtil.set(AdamRedisConst.SHOT_MEMBER_ORDER + orderNo, vo); return redisUtil.set(AdamRedisConst.SHOT_MEMBER_ORDER + orderNo, vo, 604800);
} }
public AdamMemberOrderVo getShotMemberOrderVoByOrderNo(String orderNo) { public AdamMemberOrderVo getShotMemberOrderVoByOrderNo(String orderNo) {
......
...@@ -179,7 +179,7 @@ public class AdamUserServiceImpl implements IAdamUserService { ...@@ -179,7 +179,7 @@ public class AdamUserServiceImpl implements IAdamUserService {
AdamThirdPartInfoVo thirdPartVo = adamRdmService.getThirdPartVoByUidPlatform(uid, param.getPlatform()); AdamThirdPartInfoVo thirdPartVo = adamRdmService.getThirdPartVoByUidPlatform(uid, param.getPlatform());
if (null == thirdPartVo) {// 未绑定 if (null == thirdPartVo) {// 未绑定
userInfoVo = adamRdmService.getUserInfoVoByUid(uid); userInfoVo = adamRdmService.getUserInfoVoByUid(uid);
if (null == userInfoVo) { if (null == userInfoVo || userInfoVo.getState() == 2) {
log.warn("Cancelled mobile:{}", param.getMobile()); log.warn("Cancelled mobile:{}", param.getMobile());
return ResponseDto.failure(ErrorMapping.get("10024")); return ResponseDto.failure(ErrorMapping.get("10024"));
} }
...@@ -301,86 +301,88 @@ public class AdamUserServiceImpl implements IAdamUserService { ...@@ -301,86 +301,88 @@ public class AdamUserServiceImpl implements IAdamUserService {
objsMobileLocate = CollectionUtil.linkedListObjectArr(); objsMobileLocate = CollectionUtil.linkedListObjectArr();
long s = System.currentTimeMillis(); long s = System.currentTimeMillis();
// AdamUserInfoVo userInfoVo = adamRdmService.getUserInfoVoByUid(uid);
//
// adamRdmService.delUidByMobile(userInfoVo.getMobile());
// adamRdmService.delUserInfoVoByUid(uid);
// adamRdmService.delUserMemberVoByUid(uid);
// adamRdmService.delAddressesVoByUid(uid);
// adamRdmService.delEntersVoByUid(uid);
log.debug("##RDS耗时:{}ms", System.currentTimeMillis() - s); log.debug("##RDS耗时:{}ms", System.currentTimeMillis() - s);
/* ---------------------- 账号基础信息 */ /* ---------------------- 账号基础信息 */
AdamUserInfoVo userInfoVoByUid = adamRdmService.getUserInfoVoByUid(uid); // AdamUserInfoVo userInfoVoByUid = adamRdmService.getUserInfoVoByUid(uid);
if (null != userInfoVoByUid) { // if (null != userInfoVoByUid) {
userInfoVoByUid.setState(2); // userInfoVoByUid.setState(2);
userInfoVoByUid.setUpdatedAt(now); // userInfoVoByUid.setUpdatedAt(now);
userInfoVoByUid.setClosedAt(now); // userInfoVoByUid.setClosedAt(now);
adamRdmService.setUserInfoVoByUid(uid, userInfoVoByUid); // adamRdmService.setUserInfoVoByUid(uid, userInfoVoByUid);
} // }
adamRdmService.delUserInfoVoByUid(uid);
toMqSqls.add(SqlMapping.get("adam_user.close")); toMqSqls.add(SqlMapping.get("adam_user.close"));
objsUser.add(new Object[]{now, now, uid}); objsUser.add(new Object[]{now, now, uid});
/* ---------------------- 三方账号信息 */ /* ---------------------- 三方账号信息 */
List<AdamThirdPartInfoVo> thirdPartInfoVos = adamRdmService.getThirdPartVoListByUid(uid); List<AdamThirdPartInfoVo> thirdPartInfoVos = adamRdmService.getThirdPartVoListByUid(uid);
if (!CollectionUtils.isEmpty(thirdPartInfoVos)) { if (!CollectionUtils.isEmpty(thirdPartInfoVos)) {
adamRdmService.delThirdPartVoListByUid(uid);
thirdPartInfoVos.forEach(r -> { thirdPartInfoVos.forEach(r -> {
r.setState(2); // r.setState(2);
r.setUpdatedAt(now); // r.setUpdatedAt(now);
adamRdmService.delUidByPlatformOpenId(r.getPlatform(), r.getOpenId()); if (null != r) {
adamRdmService.delUidByPlatformOpenId(r.getPlatform(), r.getOpenId());
}
}); });
adamRdmService.setThirdPartVoListByUid(uid, thirdPartInfoVos); // adamRdmService.setThirdPartVoListByUid(uid, thirdPartInfoVos);
} }
toMqSqls.add(SqlMapping.get("adam_third_party.close")); toMqSqls.add(SqlMapping.get("adam_third_party.close"));
objsThirdPart.add(new Object[]{now, uid}); objsThirdPart.add(new Object[]{now, uid});
/* ---------------------- 用户会员信息 */ /* ---------------------- 用户会员信息 */
AdamUserMemberVo userMemberVoByUid = adamRdmService.getUserMemberVoByUid(uid); // AdamUserMemberVo userMemberVoByUid = adamRdmService.getUserMemberVoByUid(uid);
if (null != userMemberVoByUid) { // if (null != userMemberVoByUid) {
userMemberVoByUid.setState(2); // userMemberVoByUid.setState(2);
userMemberVoByUid.setUpdatedAt(now); // userMemberVoByUid.setUpdatedAt(now);
//
adamRdmService.setUserMemberVoByUid(uid, userMemberVoByUid); // adamRdmService.setUserMemberVoByUid(uid, userMemberVoByUid);
} // }
adamRdmService.delUserMemberVoByUid(uid);
adamRdmService.delMemberOrderVoByUid(uid);
toMqSqls.add(SqlMapping.get("adam_user_member.close")); toMqSqls.add(SqlMapping.get("adam_user_member.close"));
objsUserMember.add(new Object[]{now, uid}); objsUserMember.add(new Object[]{now, uid});
/* ---------------------- 用户实名信息 */ /* ---------------------- 用户实名信息 */
AdamRealInfoVo realInfoVoByUid = adamRdmService.getRealInfoVoByUid(uid); // AdamRealInfoVo realInfoVoByUid = adamRdmService.getRealInfoVoByUid(uid);
if (null != realInfoVoByUid) { // if (null != realInfoVoByUid) {
realInfoVoByUid.setState(2); // realInfoVoByUid.setState(2);
//
adamRdmService.setRealInfoVoByUid(uid, realInfoVoByUid); // adamRdmService.setRealInfoVoByUid(uid, realInfoVoByUid);
} // }
adamRdmService.delRealInfoVoByUid(uid);
toMqSqls.add(SqlMapping.get("adam_real_name.close")); toMqSqls.add(SqlMapping.get("adam_real_name.close"));
objsRealInfo.add(new Object[]{now, uid}); objsRealInfo.add(new Object[]{now, uid});
/* ---------------------- 收货地址信息 */ /* ---------------------- 收货地址信息 */
List<AdamAddressesVo> addressesVoByUid = adamRdmService.getAddressesVoByUid(uid); // List<AdamAddressesVo> addressesVoByUid = adamRdmService.getAddressesVoByUid(uid);
if (!CollectionUtils.isEmpty(addressesVoByUid)) { // if (!CollectionUtils.isEmpty(addressesVoByUid)) {
addressesVoByUid.forEach(r -> { // addressesVoByUid.forEach(r -> {
r.setState(2); // r.setState(2);
r.setUpdatedAt(now); // r.setUpdatedAt(now);
r.setDeletedAt(now); // r.setDeletedAt(now);
}); // });
//
adamRdmService.setAddressesVoByUid(uid, addressesVoByUid); // adamRdmService.setAddressesVoByUid(uid, addressesVoByUid);
} // }
adamRdmService.delAddressesVoByUid(uid);
toMqSqls.add(SqlMapping.get("adam_addresses.close")); toMqSqls.add(SqlMapping.get("adam_addresses.close"));
objsAddresses.add(new Object[]{now, now, uid}); objsAddresses.add(new Object[]{now, now, uid});
/* ---------------------- 入场人信息 */ /* ---------------------- 入场人信息 */
List<AdamEntersVo> entersVoByUid = adamRdmService.getEntersVoByUid(uid); // List<AdamEntersVo> entersVoByUid = adamRdmService.getEntersVoByUid(uid);
if (!CollectionUtils.isEmpty(entersVoByUid)) { // if (!CollectionUtils.isEmpty(entersVoByUid)) {
entersVoByUid.forEach(r -> { // entersVoByUid.forEach(r -> {
r.setState(2); // r.setState(2);
r.setUpdatedAt(now); // r.setUpdatedAt(now);
r.setDeletedAt(now); // r.setDeletedAt(now);
}); // });
//
adamRdmService.setEntersVoByUid(uid, entersVoByUid); // adamRdmService.setEntersVoByUid(uid, entersVoByUid);
} // }
adamRdmService.delEntersVoByUid(uid);
toMqSqls.add(SqlMapping.get("adam_enters.close")); toMqSqls.add(SqlMapping.get("adam_enters.close"));
objsEnters.add(new Object[]{now, now, uid}); objsEnters.add(new Object[]{now, now, uid});
......
...@@ -6,7 +6,11 @@ liquidnet: ...@@ -6,7 +6,11 @@ liquidnet:
username: user username: user
password: user123 password: user123
eureka: eureka:
host: 172.17.207.177:7001 #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: 192.168.193.41:7001
# end-test-这里是配置信息基本值 # end-test-这里是配置信息基本值
spring: spring:
......
...@@ -213,7 +213,7 @@ public class CandyCouponController { ...@@ -213,7 +213,7 @@ public class CandyCouponController {
for (int i = initSize; i < forSize; i++) { for (int i = initSize; i < forSize; i++) {
listVo.add(list.get(i)); listVo.add(list.get(i));
} }
return ResponseDto.success(); return ResponseDto.success(listVo);
} }
// //判断券是否可用 // //判断券是否可用
......
...@@ -155,7 +155,7 @@ public class CandyCouponServiceImpl implements ICandyCouponService { ...@@ -155,7 +155,7 @@ public class CandyCouponServiceImpl implements ICandyCouponService {
continue; continue;
} }
} }
if (baseVo.getCouType().equals(101)) { if (baseVo.getCouType().equals(101) || baseVo.getCouType().equals(3)) {
continue; continue;
} }
if (dtoItem.getExclusive().equals(1)) { //会员券 if (dtoItem.getExclusive().equals(1)) { //会员券
...@@ -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) || baseVo.getBusiType() == 2) { if (baseVo.getCouType().equals(101) || baseVo.getCouType().equals(3) || baseVo.getBusiType() == 2) {
continue; continue;
} }
if (baseVo.getState().equals(1)) { //可用 if (baseVo.getState().equals(1)) { //可用
......
...@@ -6,7 +6,11 @@ liquidnet: ...@@ -6,7 +6,11 @@ liquidnet:
username: user username: user
password: user123 password: user123
eureka: eureka:
host: 172.17.207.177:7001 #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: 192.168.193.41:7001
# end-test-这里是配置信息基本值 # end-test-这里是配置信息基本值
spring: spring:
......
...@@ -9,8 +9,8 @@ liquidnet: ...@@ -9,8 +9,8 @@ liquidnet:
#host: 172.17.207.177:7001 #host: 172.17.207.177:7001
instance: instance:
prefer-ip-address: true 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: 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: 192.168.193.41:7001
# end-dev-这里是配置信息基本值 # end-dev-这里是配置信息基本值
spring: spring:
......
...@@ -9,8 +9,8 @@ liquidnet: ...@@ -9,8 +9,8 @@ liquidnet:
#host: 172.17.207.177:7001 #host: 172.17.207.177:7001
instance: instance:
prefer-ip-address: true 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: 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: 192.168.193.41:7001
# end-test-这里是配置信息基本值 # end-test-这里是配置信息基本值
spring: spring:
......
...@@ -9,8 +9,8 @@ liquidnet: ...@@ -9,8 +9,8 @@ liquidnet:
#host: 172.17.207.177:7001 #host: 172.17.207.177:7001
instance: instance:
prefer-ip-address: true 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: 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: 192.168.193.41:7001
# end-test-这里是配置信息基本值 # end-test-这里是配置信息基本值
spring: spring:
......
...@@ -9,8 +9,8 @@ liquidnet: ...@@ -9,8 +9,8 @@ liquidnet:
#host: 172.17.207.177:7001 #host: 172.17.207.177:7001
instance: instance:
prefer-ip-address: true 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: 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: 192.168.193.41:7001
# end-test-这里是配置信息基本值 # end-test-这里是配置信息基本值
spring: spring:
......
...@@ -9,8 +9,8 @@ liquidnet: ...@@ -9,8 +9,8 @@ liquidnet:
#host: 172.17.207.177:7001 #host: 172.17.207.177:7001
instance: instance:
prefer-ip-address: true 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: 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: 192.168.193.41:7001
# end-test-这里是配置信息基本值 # end-test-这里是配置信息基本值
spring: spring:
......
...@@ -9,8 +9,8 @@ liquidnet: ...@@ -9,8 +9,8 @@ liquidnet:
#host: 172.17.207.177:7001 #host: 172.17.207.177:7001
instance: instance:
prefer-ip-address: true 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: 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: 192.168.193.41:7001
# end-dev-这里是配置信息基本值 # end-dev-这里是配置信息基本值
spring: spring:
......
...@@ -9,11 +9,9 @@ liquidnet: ...@@ -9,11 +9,9 @@ liquidnet:
#host: 172.17.207.177:7001,172.17.121.158:7001,172.17.121.157:7001 #host: 172.17.207.177:7001,172.17.121.158:7001,172.17.121.157:7001
instance: instance:
prefer-ip-address: true 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: 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: 192.168.193.41:7001
# end-dev-这里是配置信息基本值 # end-dev-这里是配置信息基本值
spring: spring:
profiles: profiles:
include: service-example include: service-example
\ No newline at end of file
...@@ -9,8 +9,8 @@ liquidnet: ...@@ -9,8 +9,8 @@ liquidnet:
#host: 172.17.207.177:7001 #host: 172.17.207.177:7001
instance: instance:
prefer-ip-address: true 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: 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: 192.168.193.41:7001
# end-dev-这里是配置信息基本值 # end-dev-这里是配置信息基本值
......
...@@ -9,8 +9,8 @@ liquidnet: ...@@ -9,8 +9,8 @@ liquidnet:
#host: 172.17.207.177:7001 #host: 172.17.207.177:7001
instance: instance:
prefer-ip-address: true 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: 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: 192.168.193.41:7001
# end-dev-这里是配置信息基本值 # end-dev-这里是配置信息基本值
......
...@@ -9,8 +9,8 @@ liquidnet: ...@@ -9,8 +9,8 @@ liquidnet:
#host: 172.17.207.177:7001 #host: 172.17.207.177:7001
instance: instance:
prefer-ip-address: true 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: 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: 192.168.193.41:7001
# end-dev-这里是配置信息基本值 # end-dev-这里是配置信息基本值
......
...@@ -101,6 +101,9 @@ public class KylinOrderTicketsServiceImpl implements IKylinOrderTicketsOrderServ ...@@ -101,6 +101,9 @@ public class KylinOrderTicketsServiceImpl implements IKylinOrderTicketsOrderServ
try { try {
if (payOrderParam.getVoucherType() != null && payOrderParam.getVoucherType().equals(3)) { if (payOrderParam.getVoucherType() != null && payOrderParam.getVoucherType().equals(3)) {
isPay = false; isPay = false;
if(payOrderParam.getNumber()>1){
return ResponseDto.failure("张数大于1不支持兑换");//参数错误
}
} }
KylinPerformanceVo performanceData = dataUtils.getPerformanceVo(payOrderParam.getPerformanceId()); KylinPerformanceVo performanceData = dataUtils.getPerformanceVo(payOrderParam.getPerformanceId());
KylinTicketTimesVo ticketTimesData = null; KylinTicketTimesVo ticketTimesData = null;
...@@ -209,10 +212,12 @@ public class KylinOrderTicketsServiceImpl implements IKylinOrderTicketsOrderServ ...@@ -209,10 +212,12 @@ public class KylinOrderTicketsServiceImpl implements IKylinOrderTicketsOrderServ
if (isOldMember) { if (isOldMember) {
} else { } else {
advanceMap = orderUtils.useCoupon(payOrderParam.getAdvanceCode(), "购买 " + performanceData.getTitle(), BigDecimal.ZERO, payOrderParam.getPerformanceId(), payOrderParam.getTimeId(), payOrderParam.getTicketId()); if (memberType == 1) {
Integer typeVoucher = (Integer) advanceMap.get("type"); advanceMap = orderUtils.useCoupon(payOrderParam.getAdvanceCode(), "购买 " + performanceData.getTitle(), BigDecimal.ZERO, payOrderParam.getPerformanceId(), payOrderParam.getTimeId(), payOrderParam.getTicketId());
if (typeVoucher.equals(-1)) { Integer typeVoucher = (Integer) advanceMap.get("type");
return ResponseDto.failure("优先券券不可用"); if (typeVoucher.equals(-1)) {
return ResponseDto.failure("优先券券不可用");
}
} }
} }
} }
...@@ -1108,11 +1113,11 @@ public class KylinOrderTicketsServiceImpl implements IKylinOrderTicketsOrderServ ...@@ -1108,11 +1113,11 @@ public class KylinOrderTicketsServiceImpl implements IKylinOrderTicketsOrderServ
long orderTicketEntitiesKey; long orderTicketEntitiesKey;
if (item.getOrderTicketEntitiesId().length() > 13) { if (item.getOrderTicketEntitiesId().length() > 13) {
if(isMember==1){ if (isMember == 1) {
orderTicketEntitiesKey = Long.valueOf(IDGenerator.getDamaiCode(item.getOrderTicketEntitiesId()).toString().concat("010")); orderTicketEntitiesKey = Long.valueOf(IDGenerator.getDamaiCode(item.getOrderTicketEntitiesId()).toString().concat("010"));
obj3.setExt("登登登VIP"); obj3.setExt("登登登VIP");
obj3.setTicketItemId(Long.valueOf(ticketIdKey+"".concat("010"))); obj3.setTicketItemId(Long.valueOf(ticketIdKey + "".concat("010")));
}else{ } else {
orderTicketEntitiesKey = Long.valueOf(IDGenerator.getDamaiCode(item.getOrderTicketEntitiesId()).toString().concat("020")); orderTicketEntitiesKey = Long.valueOf(IDGenerator.getDamaiCode(item.getOrderTicketEntitiesId()).toString().concat("020"));
obj3.setExt(""); obj3.setExt("");
obj3.setTicketItemId(ticketIdKey); obj3.setTicketItemId(ticketIdKey);
...@@ -1122,7 +1127,7 @@ public class KylinOrderTicketsServiceImpl implements IKylinOrderTicketsOrderServ ...@@ -1122,7 +1127,7 @@ public class KylinOrderTicketsServiceImpl implements IKylinOrderTicketsOrderServ
} }
obj3.setPerformId(ticketTimesKey);//场次id obj3.setPerformId(ticketTimesKey);//场次id
obj3.setVoucherId(orderTicketEntitiesKey);//票单号 入场人id obj3.setVoucherId(orderTicketEntitiesKey);//票单号 入场人id
obj3.setQrCode("http://m.zhengzai.tv?c="+IDGenerator.ticketQrCode(item.getOrderTicketEntitiesId())); obj3.setQrCode("http://m.zhengzai.tv?c=" + IDGenerator.ticketQrCode(item.getOrderTicketEntitiesId()));
obj3.setOrderId(orderIdKey);//订单id orderId obj3.setOrderId(orderIdKey);//订单id orderId
obj3.setMediumType(orderData.getGetTicketType().equals("express") ? 1L : 2L);//票类型 快递 电子 obj3.setMediumType(orderData.getGetTicketType().equals("express") ? 1L : 2L);//票类型 快递 电子
obj3.setSupplierSecret(taobaoTicketUtils.getSupplierSecret()); obj3.setSupplierSecret(taobaoTicketUtils.getSupplierSecret());
......
...@@ -9,8 +9,8 @@ liquidnet: ...@@ -9,8 +9,8 @@ liquidnet:
#host: 172.17.207.177:7001 #host: 172.17.207.177:7001
instance: instance:
prefer-ip-address: true 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: 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: 192.168.193.41:7001
# end-dev-这里是配置信息基本值 # end-dev-这里是配置信息基本值
......
...@@ -8,6 +8,7 @@ import com.liquidnet.service.base.ResponseDto; ...@@ -8,6 +8,7 @@ import com.liquidnet.service.base.ResponseDto;
import com.liquidnet.service.candy.constant.CandyRedisConst; import com.liquidnet.service.candy.constant.CandyRedisConst;
import com.liquidnet.service.candy.dto.CandyCommonCouponBasicDto; import com.liquidnet.service.candy.dto.CandyCommonCouponBasicDto;
import com.liquidnet.service.candy.dto.CandyCouponCodeDto; import com.liquidnet.service.candy.dto.CandyCouponCodeDto;
import com.liquidnet.service.candy.dto.CandyUserCouponBasicDto;
import com.liquidnet.service.candy.entity.CandyCommonCoupon; import com.liquidnet.service.candy.entity.CandyCommonCoupon;
import com.liquidnet.service.candy.entity.CandyCoupon; import com.liquidnet.service.candy.entity.CandyCoupon;
import com.liquidnet.service.candy.entity.CandyCouponCode; import com.liquidnet.service.candy.entity.CandyCouponCode;
...@@ -30,6 +31,7 @@ import java.util.List; ...@@ -30,6 +31,7 @@ import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.concurrent.atomic.AtomicInteger; import java.util.concurrent.atomic.AtomicInteger;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import java.util.stream.IntStream;
/** /**
* <p> * <p>
...@@ -59,6 +61,8 @@ public class CandyCouponDueTaskController { ...@@ -59,6 +61,8 @@ public class CandyCouponDueTaskController {
@Autowired @Autowired
private PlatformCandyUserCouponService platformCandyUserCouponService; private PlatformCandyUserCouponService platformCandyUserCouponService;
private static final String OPERATOR_CHECK = "CHECK";
/** /**
* <p> * <p>
* 兑换类 * 兑换类
...@@ -80,7 +84,7 @@ public class CandyCouponDueTaskController { ...@@ -80,7 +84,7 @@ public class CandyCouponDueTaskController {
AtomicInteger pl = new AtomicInteger(); AtomicInteger pl = new AtomicInteger();
int remainCount = totalCount; int remainCount = totalCount;
int num = 0, pSize = 1000; int num = 0, pSize = 1000;
log.info("券到期检查处理:兑换码[到期总记录数:{}] >>> BEGIN BEGIN BEGIN", totalCount); log.info("券到期检查处理:兑换码[到期总记录数:{}] >>> BEGIN BEGIN BEGIN", totalCount);
ArrayList<CandyCouponCode> updateCouponCodeList = ObjectUtil.getCandyCouponCodeArrayList(); ArrayList<CandyCouponCode> updateCouponCodeList = ObjectUtil.getCandyCouponCodeArrayList();
couponCodeQueryWrapper.select(CandyCouponCode::getMid, CandyCouponCode::getCcode); couponCodeQueryWrapper.select(CandyCouponCode::getMid, CandyCouponCode::getCcode);
...@@ -89,7 +93,7 @@ public class CandyCouponDueTaskController { ...@@ -89,7 +93,7 @@ public class CandyCouponDueTaskController {
updateCouponCodeList.clear(); updateCouponCodeList.clear();
LambdaQueryWrapper<CandyCouponCode> couponCodeLambdaQueryWrapper = couponCodeQueryWrapper.clone(); LambdaQueryWrapper<CandyCouponCode> couponCodeLambdaQueryWrapper = couponCodeQueryWrapper.clone();
String lastLimitSql = "LIMIT " + (num * pSize) + "," + pSize; String lastLimitSql = "LIMIT " + 0 + "," + pSize;
couponCodeLambdaQueryWrapper.last(lastLimitSql); couponCodeLambdaQueryWrapper.last(lastLimitSql);
List<CandyCouponCode> couponCodeList = platformCandyCouponCodeService.list(couponCodeLambdaQueryWrapper); List<CandyCouponCode> couponCodeList = platformCandyCouponCodeService.list(couponCodeLambdaQueryWrapper);
...@@ -98,12 +102,13 @@ public class CandyCouponDueTaskController { ...@@ -98,12 +102,13 @@ public class CandyCouponDueTaskController {
CandyCouponCode couponCode = couponCodeList.get(i); CandyCouponCode couponCode = couponCodeList.get(i);
couponCode.setState(3); couponCode.setState(3);
couponCode.setOperator(OPERATOR_CHECK);
couponCode.setUpdatedAt(now); couponCode.setUpdatedAt(now);
updateCouponCodeList.add(couponCode); updateCouponCodeList.add(couponCode);
} }
if (!CollectionUtils.isEmpty(couponCodeList)) { if (!CollectionUtils.isEmpty(updateCouponCodeList)) {
if (platformCandyCouponCodeService.updateBatchById(updateCouponCodeList, updateCouponCodeList.size())) { if (platformCandyCouponCodeService.updateBatchById(updateCouponCodeList, updateCouponCodeList.size())) {
updateCouponCodeList.forEach(r -> { updateCouponCodeList.forEach(r -> {
String ccKey = CandyRedisConst.BASIC_COUPON_CODE.concat(r.getCcode()); String ccKey = CandyRedisConst.BASIC_COUPON_CODE.concat(r.getCcode());
...@@ -123,9 +128,9 @@ public class CandyCouponDueTaskController { ...@@ -123,9 +128,9 @@ public class CandyCouponDueTaskController {
num++; num++;
remainCount -= pSize; remainCount -= pSize;
log.info("券到期检查处理中:兑换码[到期总记录数:{},单次处理:{},剩余处理数:{}]", totalCount, lastLimitSql, remainCount); log.info("券到期检查处理中:兑换码[到期总记录数:{},单次处理:{},剩余处理数:{}]", totalCount, lastLimitSql, remainCount);
} }
log.info("券到期检查处理:兑换码[到期总记录数:{},处理总数:{}] >>> END END END", totalCount, pl.get()); log.info("券到期检查处理:兑换码[到期总记录数:{},处理总数:{}] >>> END END END", totalCount, pl.get());
return ResponseDto.success(); return ResponseDto.success();
} }
...@@ -167,7 +172,7 @@ public class CandyCouponDueTaskController { ...@@ -167,7 +172,7 @@ public class CandyCouponDueTaskController {
couponQueryWrapper.orderByAsc(CandyCoupon::getMid); couponQueryWrapper.orderByAsc(CandyCoupon::getMid);
while (remainCount > 0) { while (remainCount > 0) {
LambdaQueryWrapper<CandyCoupon> couponLambdaQueryWrapper = couponQueryWrapper.clone(); LambdaQueryWrapper<CandyCoupon> couponLambdaQueryWrapper = couponQueryWrapper.clone();
String lastLimitSql = "LIMIT " + (num * pSize) + "," + pSize; String lastLimitSql = "LIMIT " + 0 + "," + pSize;
couponLambdaQueryWrapper.last(lastLimitSql); couponLambdaQueryWrapper.last(lastLimitSql);
List<CandyCoupon> couponList = platformCandyCouponService.list(couponLambdaQueryWrapper); List<CandyCoupon> couponList = platformCandyCouponService.list(couponLambdaQueryWrapper);
...@@ -178,7 +183,7 @@ public class CandyCouponDueTaskController { ...@@ -178,7 +183,7 @@ public class CandyCouponDueTaskController {
List<CandyCommonCoupon> inCommonCouponList = commonCouponIdToListMap.get(coupon.getCouponId()); List<CandyCommonCoupon> inCommonCouponList = commonCouponIdToListMap.get(coupon.getCouponId());
inCommonCouponList.forEach(r -> { inCommonCouponList.forEach(r -> {
r.setState(3); r.setState(3);
r.setOperator("system"); r.setOperator(OPERATOR_CHECK);
r.setUpdatedAt(now); r.setUpdatedAt(now);
updateCommonCouponList.add(r); updateCommonCouponList.add(r);
...@@ -238,8 +243,62 @@ public class CandyCouponDueTaskController { ...@@ -238,8 +243,62 @@ public class CandyCouponDueTaskController {
int num = 0, pSize = 1000; int num = 0, pSize = 1000;
log.info("券到期检查处理:私有券[到期总记录数:{}] >>> BEGIN BEGIN BEGIN", totalCount); log.info("券到期检查处理:私有券[到期总记录数:{}] >>> BEGIN BEGIN BEGIN", totalCount);
ArrayList<CandyUserCoupon> candyUserCouponArrayList = ObjectUtil.getCandyUserCouponArrayList(); ArrayList<CandyUserCoupon> updateUserCouponList = ObjectUtil.getCandyUserCouponArrayList();
userCouponQueryWrapper.select(CandyUserCoupon::getMid, CandyUserCoupon::getUcouponId);
userCouponQueryWrapper.orderByAsc(CandyUserCoupon::getMid);
while (remainCount > 0) {
updateUserCouponList.clear();
LambdaQueryWrapper<CandyUserCoupon> userCouponLambdaQueryWrapper = userCouponQueryWrapper.clone();
String lastLimitSql = "LIMIT " + 0 + "," + pSize;
userCouponLambdaQueryWrapper.last(lastLimitSql);
List<CandyUserCoupon> userCouponList = platformCandyUserCouponService.list(userCouponLambdaQueryWrapper);
int listSize = CollectionUtils.isEmpty(userCouponList) ? -1 : userCouponList.size();
for (int i = 0; i < listSize; i++) {
CandyUserCoupon userCoupon = userCouponList.get(i);
userCoupon.setState(3);
userCoupon.setOperator(OPERATOR_CHECK);
userCoupon.setUpdatedAt(now);
updateUserCouponList.add(userCoupon);
}
if (!CollectionUtils.isEmpty(updateUserCouponList)) {
if (platformCandyUserCouponService.updateBatchById(updateUserCouponList, updateUserCouponList.size())) {
// 需要更新的用户券记录按UID分组处理
Map<String, List<CandyUserCoupon>> userCouponListByUidMap = updateUserCouponList.stream().collect(Collectors.groupingBy(CandyUserCoupon::getUid));
userCouponListByUidMap.forEach((uid, updateUserCouponListByUid) -> {
String uckey = CandyRedisConst.BASIC_USER_COUPON.concat(uid);
List<CandyUserCouponBasicDto> vos = (List<CandyUserCouponBasicDto>) redisUtil.get(uckey);
if (!CollectionUtils.isEmpty(vos)) {
updateUserCouponListByUid.forEach(r -> {
int idx = IntStream.range(0, vos.size())
.filter(i -> vos.get(i).getUcouponId().equals(r.getUcouponId()))
.findFirst().orElse(-1);
if (idx != -1) {
CandyUserCouponBasicDto dto = vos.get(idx);
dto.setState(3);
vos.set(idx, dto);
}
pl.getAndIncrement();
});
redisUtil.set(uckey, vos);
}
});
} else {
throw new LiquidnetServiceException("-1", String.format("券到期处理失败[updateUserCouponList.size=%s]", updateUserCouponList.size()));
}
}
num++;
remainCount -= pSize;
log.info("券到期检查处理中:私有券[到期总记录数:{},单次处理:{},剩余处理数:{}]", totalCount, lastLimitSql, remainCount);
}
log.info("券到期检查处理:私有券[到期总记录数:{},处理总数:{}] >>> END END END", totalCount, pl.get());
return ResponseDto.success(); return ResponseDto.success();
} }
} }
...@@ -9,8 +9,8 @@ liquidnet: ...@@ -9,8 +9,8 @@ liquidnet:
#host: 172.17.207.177:7001 #host: 172.17.207.177:7001
instance: instance:
prefer-ip-address: true 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: 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: 192.168.193.41:7001
# end-test-这里是配置信息基本值 # end-test-这里是配置信息基本值
......
...@@ -441,6 +441,9 @@ CREATE TABLE `sweet_wechat_user` ...@@ -441,6 +441,9 @@ CREATE TABLE `sweet_wechat_user`
ROW_FORMAT = DYNAMIC COMMENT '正在现场服务号关注事件储存用户信息表'; ROW_FORMAT = DYNAMIC COMMENT '正在现场服务号关注事件储存用户信息表';
alter table sweet_wechat_user add type tinyint NOT NULL DEFAULT 1 COMMENT '服务类型 1正在 2摩登' after user_id; alter table sweet_wechat_user add type tinyint NOT NULL DEFAULT 1 COMMENT '服务类型 1正在 2摩登' after user_id;
alter table sweet_wechat_user add adam_user_id varchar(200) NOT NULL DEFAULT '' COMMENT 'adam用户id' after user_id;
alter table sweet_wechat_user add adam_phone varchar(200) NOT NULL DEFAULT '' COMMENT 'adam用户手机号' after adam_user_id;
-- 小程序登录记录用户解密后信息表 -- 小程序登录记录用户解密后信息表
drop TABLE if exists `sweet_applet_user`; drop TABLE if exists `sweet_applet_user`;
CREATE TABLE `sweet_applet_user` CREATE TABLE `sweet_applet_user`
......
...@@ -25,6 +25,7 @@ public class SweetConstant { ...@@ -25,6 +25,7 @@ public class SweetConstant {
public final static String REDIS_KEY_SWEET_WECHAT_USER_INFO="sweet:wechatUser:unionId:"; public final static String REDIS_KEY_SWEET_WECHAT_USER_INFO="sweet:wechatUser:unionId:";
public final static String REDIS_KEY_SWEET_WECHAT_USER_INFO_STR="sweet:wechatUser:unionIdStr:"; 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_WECHAT_USER_UNIONID="sweet:wechatUser:openId:";
public final static String REDIS_KEY_SWEET_WECHAT_USER_UNIONID_PHONE="sweet:wechatUser:phone:";
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=":StatList"; 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_CITY_CODE=":cityCode:";
......
...@@ -7,12 +7,14 @@ import io.swagger.annotations.Api; ...@@ -7,12 +7,14 @@ import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam; import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams; import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import javax.validation.Valid; import javax.validation.Valid;
@Api(tags = "服务号-模版消息") @Api(tags = "服务号-模版消息")
@Slf4j
@RestController @RestController
@RequestMapping("/wechatTemplate") @RequestMapping("/wechatTemplate")
public class SweetWechatTemplateController { public class SweetWechatTemplateController {
...@@ -52,12 +54,17 @@ public class SweetWechatTemplateController { ...@@ -52,12 +54,17 @@ public class SweetWechatTemplateController {
@ApiImplicitParams({ @ApiImplicitParams({
@ApiImplicitParam(type = "form", dataType = "String", name = "unionId", value = "微信unionId", required = true), @ApiImplicitParam(type = "form", dataType = "String", name = "unionId", value = "微信unionId", required = true),
@ApiImplicitParam(type = "form", dataType = "Integer", name = "type", value = "type 1正在 2摩登", required = false), @ApiImplicitParam(type = "form", dataType = "Integer", name = "type", value = "type 1正在 2摩登", required = false),
@ApiImplicitParam(type = "form", dataType = "String", name = "userId", value = "正在用户ID", required = false),
@ApiImplicitParam(type = "form", dataType = "String", name = "phone", value = "正在用户手机号", required = false),
}) })
public ResponseDto followStatus( public ResponseDto followStatus(
@RequestParam() String unionId, @RequestParam() String unionId,
@RequestParam(defaultValue = "1") Integer type @RequestParam(defaultValue = "1") Integer type,
@RequestParam(defaultValue = "") String userId,
@RequestParam(defaultValue = "") String phone
) { ) {
boolean status = sweetTemplateService.followStatus(unionId, type); log.info("followStatus参数 [unionId:{},type:{},userId:{},phone:{}]", unionId, type, userId, phone);
boolean status = sweetTemplateService.followStatus(unionId, type, userId, phone);
if (status) { if (status) {
return ResponseDto.success(1); return ResponseDto.success(1);
} else { } else {
......
...@@ -30,6 +30,16 @@ public class SweetWechatUser implements Serializable { ...@@ -30,6 +30,16 @@ public class SweetWechatUser implements Serializable {
*/ */
private String userId; private String userId;
/**
* adam_user_id
*/
private String adamUserId;
/**
* adam_phone
*/
private String adamPhone;
/** /**
* openId * openId
*/ */
......
...@@ -6,6 +6,7 @@ import com.liquidnet.commons.lang.util.CollectionUtil; ...@@ -6,6 +6,7 @@ import com.liquidnet.commons.lang.util.CollectionUtil;
import com.liquidnet.commons.lang.util.DateUtil; import com.liquidnet.commons.lang.util.DateUtil;
import com.liquidnet.commons.lang.util.JsonUtils; import com.liquidnet.commons.lang.util.JsonUtils;
import com.liquidnet.service.base.ResponseDto; import com.liquidnet.service.base.ResponseDto;
import com.liquidnet.service.base.SqlMapping;
import com.liquidnet.service.base.constant.MQConst; import com.liquidnet.service.base.constant.MQConst;
import com.liquidnet.service.kylin.constant.KylinRedisConst; import com.liquidnet.service.kylin.constant.KylinRedisConst;
import com.liquidnet.service.kylin.dto.vo.middle.KylinTicketTimesVo; import com.liquidnet.service.kylin.dto.vo.middle.KylinTicketTimesVo;
...@@ -31,6 +32,7 @@ import org.springframework.util.CollectionUtils; ...@@ -31,6 +32,7 @@ import org.springframework.util.CollectionUtils;
import java.time.LocalDateTime; import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter; import java.time.format.DateTimeFormatter;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.LinkedList;
import java.util.List; import java.util.List;
/** /**
...@@ -259,7 +261,7 @@ public class SweetWechatTemplateServiceImpl { ...@@ -259,7 +261,7 @@ public class SweetWechatTemplateServiceImpl {
} }
} }
public boolean followStatus(String unionId, Integer type) { public boolean followStatus(String unionId, Integer type, String userId, String phone) {
SweetWechatUser sweetWechatUser = null; SweetWechatUser sweetWechatUser = null;
if (null == type || type <= 1) { if (null == type || type <= 1) {
sweetWechatUser = redisDataUtils.getSweetWechatUser(unionId); sweetWechatUser = redisDataUtils.getSweetWechatUser(unionId);
...@@ -268,6 +270,42 @@ public class SweetWechatTemplateServiceImpl { ...@@ -268,6 +270,42 @@ public class SweetWechatTemplateServiceImpl {
} }
if (null != sweetWechatUser && !sweetWechatUser.getUnionId().isEmpty()) { if (null != sweetWechatUser && !sweetWechatUser.getUnionId().isEmpty()) {
// 同步手机号
String oldAdamUserId = sweetWechatUser.getAdamUserId();
String oldAdamPhone = sweetWechatUser.getAdamPhone();
if (null == oldAdamUserId) {
oldAdamUserId = "";
}
if (null == oldAdamPhone) {
oldAdamPhone = "";
}
if ((!phone.isEmpty() || !userId.isEmpty()) && (oldAdamUserId.isEmpty() || oldAdamPhone.isEmpty())) {
if (phone.isEmpty()) {
phone = oldAdamPhone;
} else {
redisDataUtils.setUnionIdByPhone(phone, unionId);
}
if (userId.isEmpty()) {
userId = oldAdamUserId;
}
sweetWechatUser.setAdamPhone(phone);
sweetWechatUser.setAdamUserId(userId);
if (null == type || type <= 1) {
redisDataUtils.setSweetWechatUser(sweetWechatUser);
} else if (type == 2) {
redisDataUtils.setSweetWechatUserModernsky(sweetWechatUser);
}
LinkedList<String> sqls = CollectionUtil.linkedListString();
LinkedList<Object[]> sqlsDataA = CollectionUtil.linkedListObjectArr();
sqls.add(SqlMapping.get("sweet_user.update2"));
LocalDateTime now = LocalDateTime.now();
sqlsDataA.add(new Object[]{
userId, phone, now, unionId, type
});
queueUtils.sendMsgByRedis(MQConst.SweetQueue.SWEET_USER_INSERT_DRAW.getKey(),
SqlMapping.gets(sqls, sqlsDataA));
}
return true; return true;
} else { } else {
return false; return false;
......
...@@ -341,6 +341,21 @@ public class RedisDataUtils { ...@@ -341,6 +341,21 @@ public class RedisDataUtils {
return (String) redisUtil.get(redisKey); return (String) redisUtil.get(redisKey);
} }
public String getUnionIdByPhone(String phone) {
String redisKey = SweetConstant.REDIS_KEY_SWEET_WECHAT_USER_UNIONID_PHONE.concat(phone);
Object obj = redisUtil.get(redisKey);
if (null == obj) {
return "";
} else {
return (String) redisUtil.get(redisKey);
}
}
public void setUnionIdByPhone(String phone, String unionId) {
String redisKey = SweetConstant.REDIS_KEY_SWEET_WECHAT_USER_UNIONID_PHONE.concat(phone);
redisUtil.set(redisKey, unionId);
}
public SweetWechatUser getSweetWechatUser(String unionid) { public SweetWechatUser getSweetWechatUser(String unionid) {
if (unionid.isEmpty()) { if (unionid.isEmpty()) {
return null; return null;
......
...@@ -9,8 +9,8 @@ liquidnet: ...@@ -9,8 +9,8 @@ liquidnet:
#host: 172.17.207.177:7001 #host: 172.17.207.177:7001
instance: instance:
prefer-ip-address: true 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: 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: 192.168.193.41:7001
# end-dev-这里是配置信息基本值 # end-dev-这里是配置信息基本值
......
...@@ -38,6 +38,7 @@ sweet_answer.insert=INSERT INTO sweet_answer (answer_id,phone,answer_json,img_ur ...@@ -38,6 +38,7 @@ sweet_answer.insert=INSERT INTO sweet_answer (answer_id,phone,answer_json,img_ur
# --------------------------关注/取消服务号的用户信息-------------------------- # --------------------------关注/取消服务号的用户信息--------------------------
sweet_user.insert=INSERT INTO sweet_wechat_user (user_id,type,openId,unionId,nickname,sexDesc,sex,headImgUrl,language,country,province,city,subscribeTime,subscribeScene) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?) sweet_user.insert=INSERT INTO sweet_wechat_user (user_id,type,openId,unionId,nickname,sexDesc,sex,headImgUrl,language,country,province,city,subscribeTime,subscribeScene) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?)
sweet_user.update=UPDATE sweet_wechat_user SET is_cancel = ?, updated_at = ? WHERE unionId = ? and type = ? sweet_user.update=UPDATE sweet_wechat_user SET is_cancel = ?, updated_at = ? WHERE unionId = ? and type = ?
sweet_user.update2=UPDATE sweet_wechat_user SET adam_user_id = ?, adam_phone = ?, updated_at = ? WHERE unionId = ? and type = ?
# --------------------------提醒记录-------------------------- # --------------------------提醒记录--------------------------
sweet_remind.insert=INSERT INTO sweet_remind (remind_id,openId,unionId,performancesId) VALUES (?,?,?,?) sweet_remind.insert=INSERT INTO sweet_remind (remind_id,openId,unionId,performancesId) VALUES (?,?,?,?)
# --------------------------小程序登录记录用户解密后信息-------------------------- # --------------------------小程序登录记录用户解密后信息--------------------------
......
...@@ -38,7 +38,7 @@ eureka: ...@@ -38,7 +38,7 @@ eureka:
register-with-eureka: true #禁止自己当做服务注册 register-with-eureka: true #禁止自己当做服务注册
fetch-registry: true #屏蔽注册信息 fetch-registry: true #屏蔽注册信息
serviceUrl: serviceUrl:
defaultZone: http://${spring.security.user.name}:${spring.security.user.password}@eureka-test-0.eureka-test-svc.zhengzai-test:7001${server.servlet.context-path}/eureka,http://${spring.security.user.name}:${spring.security.user.password}@eureka-test-1.eureka-test-svc.zhengzai-test:7001${server.servlet.context-path}/eureka,http://${spring.security.user.name}:${spring.security.user.password}@eureka-test-2.eureka-test-svc.zhengzai-test:7001${server.servlet.context-path}/eureka defaultZone: http://${spring.security.user.name}:${spring.security.user.password}@eureka-test-0.eureka-test-svc.zhengzai-test:7001${server.servlet.context-path}/eureka
# instance: # instance:
# prefer-ip-address: true # prefer-ip-address: true
# instance-id: ${spring.application.name}:${server.port} # instance-id: ${spring.application.name}:${server.port}
......
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