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

Commit 19e66f15 authored by 胡佳晨's avatar 胡佳晨

Merge branch 'master' into dev_notice_0708

parents 78e47e97 c032b792
......@@ -342,4 +342,7 @@ public class GoblinRedisConst {
public static final String GOBLIN_ORDER_LOG = PREFIX.concat("order:log:");//无用
/* ----------------------------------------------------------------- */
public static final String GOBLIN_NUM_LIST = PREFIX.concat("nft:num:");//$key+":"+$skuId 根据skuId获取序号list
public static final String GOBLIN_NUM_DETAILS = PREFIX.concat("nft:num:details:");//$key+$num+$skuId 根据num+skuId获取DTO
}
......@@ -26,5 +26,6 @@ public interface IGoblinNftOrderService {
String refundSyncOrder(GoblinNftOrderRefundCallbackParam refundCallbackParam);
ResponseDto<Boolean> exchange(String code, String uid, String deviceFrom, int orderType);
ResponseDto<String> exchange(String code, String uid, String deviceFrom, int orderType);
}
......@@ -139,4 +139,9 @@ public enum BusinessType
* 修改
*/
PERFORMANCE_SAVE,
/**
* 内部操作
*/
INNER_OPERATION,
}
......@@ -193,7 +193,7 @@ public class LocalAdminController extends BaseController
@GetMapping("/createActivityModal") // 创建活动
public String createActivityModal()
{
return activityPrefix + "/performanceActivity/CreateActivity";
return activityPrefix + "/performanceActivity/createActivity";
}
@GetMapping("/activityTicketList") // 活动关联券部分
public String activityTicketList()
......
package com.liquidnet.client.admin.web.controller.zhengzai.goblin;
import com.fasterxml.jackson.core.type.TypeReference;
import com.liquidnet.client.admin.common.annotation.Log;
import com.liquidnet.client.admin.common.core.controller.BaseController;
import com.liquidnet.client.admin.common.core.domain.AjaxResult;
import com.liquidnet.client.admin.common.enums.BusinessType;
import com.liquidnet.client.admin.zhengzai.goblin.utils.GoblinRedisUtils;
import com.liquidnet.common.cache.redis.util.RedisDataSourceUtil;
import com.liquidnet.commons.lang.util.CollectionUtil;
import com.liquidnet.commons.lang.util.DateUtil;
import com.liquidnet.commons.lang.util.HttpUtil;
import com.liquidnet.commons.lang.util.JsonUtils;
import com.liquidnet.service.adam.constant.AdamRedisConst;
import com.liquidnet.service.base.ResponseDto;
import com.liquidnet.service.candy.vo.CandyCouponVo;
import com.liquidnet.service.galaxy.dto.param.GalaxyNftPublishAndBuyReqDto;
import com.liquidnet.service.goblin.dto.vo.GoblinGoodsSkuInfoVo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Controller;
import org.springframework.util.MultiValueMap;
import org.springframework.web.bind.annotation.*;
import java.util.List;
@Api(tags = "商铺公共方法")
@Controller
@RequestMapping("goblin/gago")
public class GoblinGagoController extends BaseController {
@Autowired
RedisDataSourceUtil redisDataSourceUtil;
@Autowired
GoblinRedisUtils goblinRedisUtils;
@Value("${liquidnet.service.order.url}")
private String orderUrl;
// private String orderUrl = "http://127.0.0.1:9004/order";
private final String prefix = "zhengzai/goblin/gago";
@GetMapping()
public String mainHtml() {
return prefix + "/gago";
}
@Log(title = "判断手机号是否开通数字账号", businessType = BusinessType.INNER_OPERATION)
@GetMapping("nftAccount")
@ApiImplicitParams({
@ApiImplicitParam(type = "form", required = true, name = "userMobile", value = "手机号"),
})
@ResponseBody
public AjaxResult storeSearch(String userMobile) {
AjaxResult ajaxResult = AjaxResult.success();
Object obj1 = redisDataSourceUtil.getRedisAdamUtil().get(AdamRedisConst.IDENTITY_MOBILE.concat(userMobile));
if (obj1 == null) {
return AjaxResult.error("账号不存在");
}
String uid = (String) obj1;
Boolean obj2 = goblinRedisUtils.getIsOpenAccount(uid);
if (!obj2) {
return AjaxResult.error("账号未开通数字账号");
}
ajaxResult.put("uid", uid);
return ajaxResult;
}
@Log(title = "生成兑换订单", businessType = BusinessType.INNER_OPERATION)
@PostMapping(value = "/exchangeNumNftOrder")
@ResponseBody
public AjaxResult listByStatus(@RequestParam(value = "skuId") String skuId, @RequestParam(value = "nftNum") int nftNum, @RequestParam(value = "uid") String uid) {
//当前 nft序号
GoblinGoodsSkuInfoVo skuInfoVo = goblinRedisUtils.getGoodsSkuInfoVo(skuId);
int cNufCount = goblinRedisUtils.getNftCountBySku(skuInfoVo.getRouteType(), skuId);
if (cNufCount >= nftNum) {
return AjaxResult.error("该序号已售卖");
}
if (skuInfoVo == null || skuInfoVo.getSkuStock() <= nftNum) {
return AjaxResult.error("该序号不存在");
}
if (skuInfoVo.getUnbox().equals("1")) {
return AjaxResult.error("不支持盲盒");
}
boolean addResult = goblinRedisUtils.addNftList(skuId, nftNum + "");
if (!addResult) {
return AjaxResult.error("该序号已被占用");
}
//
int count = goblinRedisUtils.decrSkuStock(null,skuId,1);
if(count<0){
goblinRedisUtils.incrSkuStock(null,skuId,1);
goblinRedisUtils.removeNftList(skuId, nftNum + "");
return AjaxResult.error("已售罄");
}
//下单
MultiValueMap<String, String> params = CollectionUtil.linkedMultiValueMapStringString();
params.add("userId", uid);
params.add("skuId", skuId);
MultiValueMap<String, String> header = CollectionUtil.linkedMultiValueMapStringString();
header.add("Accept", "application/json;charset=UTF-8");
System.out.println(orderUrl.concat("/goblin/nft/airdropInner"));
String returnData = HttpUtil.post(orderUrl.concat("/order/goblin/nft/airdropInner"), params, header);
ResponseDto<String> innerReturnVo = JsonUtils.fromJson(returnData, new TypeReference<ResponseDto<String>>() {
});
if (innerReturnVo.isSuccess()) {
GalaxyNftPublishAndBuyReqDto dto = GalaxyNftPublishAndBuyReqDto.getNew();
dto.setBuyTimestamp(DateUtil.getNowTime());
dto.setNftOrderPayId(innerReturnVo.getData());
dto.setSkuId(skuId);
dto.setUserId(uid);
goblinRedisUtils.setNftNumDetails(nftNum + "", skuId, dto);
return AjaxResult.success();
} else {
return AjaxResult.error();
}
}
/** ------------------------------------------------------------------------ **/
}
;(function ($) {
//这里放入插件代码
var RemoteSearchPerformance = function (element, options) {
this.$element = $(element);
this.options = $.extend(true, {}, $.fn.remoteSearchPerformance.defaults, options);
this.id = $(element).attr('id');
this.ulID = '#' + this.id + '_ul';
this.ulFoucus = false;
// Method overrides
this.render = this.options.render || this.render;
this.select = this.options.select || this.select;
this.ajax = $.extend({}, $.fn.remoteSearchPerformance.defaults.ajax, this.options.ajax);
this.listen();
}
RemoteSearchPerformance.prototype = {
listen: function () {
this.$element.on('blur', $.proxy(this.blur, this))
.on('keyup', $.proxy(this.keyup, this));
this.$element.parent('div.remote_wrapper').on('click',this.ulID, $.proxy(this.click, this));
},
blur: function (e) {
var that = this;
e.stopPropagation();
e.preventDefault();
setTimeout(function () {
if (!that.ulFoucus) {
that.$element.val(that.$element.attr('data-name'));
that.hide();
}
}, 150)
},
keyup: function (e) {
e.stopPropagation();
e.preventDefault();
switch (e.keyCode) {
case 40:
// down arrow
case 38:
// up arrow
break;
case 9:
// tab
case 13:
// enter
this.ajaxer();
case 27:
// escape
break;
default:
this.ajaxer();
}
},
hide: function () {
$(this.ulID).remove();
return this;
},
ajaxer: function () {
var that = this,
title = that.$element.val();
// Query changed
that.title = title;
// Cancel last timer if set
if (that.ajax.timerId) {
clearTimeout(that.ajax.timerId);
that.ajax.timerId = null;
}
// Query is good to send, set a timer
that.ajax.timerId = setTimeout(function() {
var params = { title : title };
var jAjax = (that.ajax.method === "post") ? $.post : $.get;
jAjax(that.ajax.url, params, function(data){
return that.render(data.data);
});
that.ajax.timerId = null;
}, that.ajax.timeout);
return that;
},
render: function (data) {
this.ulFoucus = false;
var liList = data || [];
var num = this._getNum();
//添加 ul
if($(this.ulID).length == 0) {
this.$element.after("<ul id='" + this.id + "_ul' class='remote_search remote_search_top'></ul>");
};
//添加li
var str = "";
if(num) {
if(liList.length) {
for(var i = 0; i < liList.length; i++) {
str += "<li data-id='"+liList[i].spuId+"' data-name='"+liList[i].spuName+"' title='"+liList[i].spuName+"' value='"+liList[i].spuId+"'>" + liList[i].spuName + "</li>";
}
} else {
str = "<li data-id='' data-name=''>搜索无数据</li>"
}
} else {
this.$element.attr('data-name',"");
this.$element.attr('data-id',"");
}
$(this.ulID).html(str);
var bodyHeight = $(document.body).height();
var offsetTop = this.$element.offset().top;
var height = $(this.ulID).outerHeight(true);
if(offsetTop + height > bodyHeight){
$(this.ulID).addClass('remote_search_bottom').removeClass('remote_search_top');
}else{
$(this.ulID).addClass('remote_search_top').removeClass('remote_search_bottom');
}
return this;
},
click: function (e) {
e.stopPropagation();
e.preventDefault();
var dataName = $(e.target).attr('data-name');
var dataID = $(e.target).attr('data-id');
this.$element.val(dataName);
this.$element.attr('data-name',dataName);
this.$element.attr('data-id',dataID);
this.options.chose(dataName,dataID);
this.ulFoucus = true;
return this.hide();
},
_getNum: function(){
return this.$element.val().length;
}
}
$.fn.remoteSearchPerformance = function (option) {
return this.each(function () {
var $this = $(this),
data = $this.data('remoteSearchPerformance'),
options = typeof option === 'object' && option;
if (!data) {
$this.data('remoteSearchPerformance', (data = new RemoteSearchPerformance(this, options)));
}
if (typeof option === 'string') {
data[option]();
}
});
}
$.fn.remoteSearchPerformance.defaults = {
hiddenVal: '',
chose: function () { },
ajax: {
url: null,
timeout: 300,
method: 'get',
timerId: null
},
success: function(res){
}
}
$.fn.remoteSearchPerformance.Constructor = RemoteSearchPerformance;
})(jQuery);
\ No newline at end of file
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
<th:block th:include="include :: header('gago')"/>
</head>
<style>
td {
horiz-align: center;
text-align: left;
padding: 10px;
}
</style>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="userMobile-form">
<div class="form-group">
<label class="col-sm-3 control-label is-required">用户手机号码:</label>
<div class="col-sm-8">
<input type="number" id="userMobile" name="userMobile" class="form-control">
<input id="userId" name="userId" class="form-control" type="hidden" readonly>
</div>
<button type="button" class="btn btn-w-m btn-success" onclick="getMobileIsAudit()">
验证手机号
</button>
</div>
</form>
<form class="form-horizontal m" id="nft-form">
<div class="form-group">
<label class="col-sm-3 control-label is-required">数字藏品名称:</label>
<div class="col-sm-8">
<input id="skuId" name="skuId" th:value="*{skuId}" type="hidden">
<div class="remote_wrapper" style="position: relative;">
<input name="ids" type="hidden">
<input type="text" id="remoteSearch">
</div>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">生成序号:</label>
<div class="col-sm-8">
<input type="number" id="nftNum" name="nftNum" class="form-control">
</div>
</div>
</form>
<button type="button" class="btn btn-w-m btn-success" onclick="ce()">
生成订单
</button>
</div>
<th:block th:include="include :: footer"/>
<th:block th:include="include :: bootstrap-suggest-js"/>
<script th:src="@{/js/remote-search-nft.js}"></script>
<script th:inline="javascript">
var prefix = ctx + "goblin/gago";
function getMobileIsAudit() {
var mobile = $("#userMobile").val();
$("#userId").val('');
$.operate.get(prefix + "/nftAccount?userMobile=" + mobile, function (res) {
uid = res.uid;
$("#userId").val(uid);
});
}
$('#remoteSearch').remoteSearchPerformance({
ajax: {
url: "/goblin/common/sku?type=1",
type: "get"
},
chose: function (text, val) {
$("#skuId").val(val);
},
success: function () {
}
})
function ce() {
var skuId = $("#skuId").val();
var nftNum = $("#nftNum").val();
var uid = $("#userId").val();
if (uid == "" || nftNum == "" || uid == "") {
alert("请完整填写信息")
} else {
var param = {
skuId: skuId,
nftNum: nftNum,
uid: uid
};
$.operate.post(prefix + "/exchangeNumNftOrder", param, function (res) {
});
// alert("uid =" + uid + " skuId=" + skuId + " nftNum=" + nftNum)
}
}
</script>
</body>
</html>
......@@ -101,14 +101,14 @@
<table id="team-table_user" class="table table-condensed table-sm" th:border="1">
<tr>
<td>名称</td>
<td>介绍</td>
<!-- <td>介绍</td>-->
<tr/>
<div th:each="item : ${smileVolunteersDetailsVo.teamArray}">
<tr class="content-tr">
<td th:value="${item.name}" th:text="${item.name}">
</td>
<td th:text="${item.introduce}">
</td>
<!-- <td th:text="${item.introduce}">-->
<!-- </td>-->
</tr>
</div>
</table>
......@@ -118,15 +118,15 @@
<table id="team-table" class="table table-condensed table-sm" th:border="1">
<tr>
<td>名称</td>
<td>介绍</td>
<!-- <td>介绍</td>-->
<td>选中</td>
<tr/>
<div th:each="item : ${listData}">
<tr class="content-tr">
<td th:value="${item.name}" th:text="${item.name}">
</td>
<td th:text="${item.introduce}">
</td>
<!-- <td th:text="${item.introduce}">-->
<!-- </td>-->
<td>
<input name="teamCheck" type="radio" th:value="${item.teamId}"> 选中</label>
</td>
......
......@@ -87,6 +87,8 @@
promiseMethods('/kylin-acitve/add', 'post', JSON.stringify(data), 'application/json').then((res) => {
layer.msg("保存成功!")
$("#activityName").val('')
$("#ticketNum").val('')
$.operate.successCallback(res);
})
}
......
......@@ -54,10 +54,6 @@
}
}
},
{
field: 'redeemUid',
title: '使用者ID'
},
{
field: 'redeemAt',
title: '使用时间'
......
......@@ -151,6 +151,11 @@
<artifactId>liquidnet-service-goblin-api</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>com.liquidnet</groupId>
<artifactId>liquidnet-service-galaxy-api</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>com.liquidnet</groupId>
<artifactId>liquidnet-service-smile-do</artifactId>
......
package com.liquidnet.client.admin.zhengzai.goblin.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.liquidnet.client.admin.zhengzai.goblin.service.IGoblinFrontSelectGoodsService;
import com.liquidnet.service.goblin.entity.GoblinFrontSelectGoods;
import com.liquidnet.service.goblin.mapper.GoblinFrontSelectGoodsMapper;
public class GoblinGageServiceImpl extends ServiceImpl<GoblinFrontSelectGoodsMapper, GoblinFrontSelectGoods> implements IGoblinFrontSelectGoodsService {
}
package com.liquidnet.client.admin.zhengzai.goblin.utils;
import com.liquidnet.common.cache.redis.util.RedisDataSourceUtil;
import com.liquidnet.commons.lang.util.CollectionUtil;
import com.liquidnet.service.galaxy.constant.GalaxyConstant;
import com.liquidnet.service.galaxy.dto.param.GalaxyNftPublishAndBuyReqDto;
import com.liquidnet.service.goblin.constant.GoblinRedisConst;
import com.liquidnet.service.goblin.dto.vo.GoblinMarketingZhengzaiRelationVo;
import com.liquidnet.service.goblin.dto.vo.GoblinSelfMarketingVo;
import com.liquidnet.service.goblin.constant.GoblinStatusConst;
import com.liquidnet.service.goblin.constant.NftAccStatusEnum;
import com.liquidnet.service.goblin.dto.GoblinUserNftAccInfoVo;
import com.liquidnet.service.goblin.dto.vo.*;
import com.liquidnet.service.goblin.entity.GoblinGoodsSku;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
@Component
......@@ -131,4 +139,99 @@ public class GoblinRedisUtils {
redisDataSourceUtil.getRedisGoblinUtil().set(redisKey, list);
}
//是否开通数字账号
public Boolean getIsOpenAccount(String userId) {
String redisKey = GoblinRedisConst.REDIS_GOBLIN_NFT_NUM_ACCOUNT_INFO.concat(userId);
Object obj = redisDataSourceUtil.getRedisGoblinUtil().get(redisKey);
GoblinUserNftAccInfoVo openAccountInfo;
if (obj == null) {
openAccountInfo = null;
} else {
openAccountInfo = (GoblinUserNftAccInfoVo) obj;
}
// 认证验证
if (null == openAccountInfo || !NftAccStatusEnum.StatusAcc.SUCCESS.getCode().equals(openAccountInfo.getCode())) {
return false;
} else {
return true;
}
}
//获取 当前xx链上SkuId 发行的数量
public int getNftCountBySku(String routerType, String skuId) {
String redisKey = GalaxyConstant.REDIS_KEY_GALAXY_PUBLISH_NFT.concat(routerType).concat(":").concat(skuId);
Object obj = redisDataSourceUtil.getRedisGoblinUtil().get(redisKey);
if (obj == null) {
return -1;
} else {
return (int) obj;
}
}
//获取 nft序号站位list
public List<String> getNftList(String skuId) {
String redisKey = GoblinRedisConst.GOBLIN_NUM_LIST.concat(skuId);
Object obj = redisDataSourceUtil.getRedisGoblinUtil().get(redisKey);
if (obj == null) {
return CollectionUtil.arrayListString();
} else {
return (List<String>) obj;
}
}
//添加 nft序号站位list
public boolean addNftList(String skuId, String num) {
String redisKey = GoblinRedisConst.GOBLIN_NUM_LIST.concat(skuId);
List<String> voList = getNftList(skuId);
if (voList.contains(num)) {
return false;
}
voList.add(num);
redisDataSourceUtil.getRedisGoblinUtil().set(redisKey, voList);
return true;
}
//删除 nft序号站位list
public boolean removeNftList(String skuId, String num) {
String redisKey = GoblinRedisConst.GOBLIN_NUM_LIST.concat(skuId);
List<String> voList = getNftList(skuId);
voList.remove(num);
redisDataSourceUtil.getRedisGoblinUtil().set(redisKey, voList);
return true;
}
public GoblinGoodsSkuInfoVo getGoodsSkuInfoVo(String skuId) {
String rk = GoblinRedisConst.BASIC_GOODS_SKU.concat(skuId);
GoblinGoodsSkuInfoVo vo = (GoblinGoodsSkuInfoVo) redisDataSourceUtil.getRedisGoblinUtil().get(rk);
if (null == vo) {
return null;
}
return vo;
}
//覆盖 站位宾哥要dto
public void setNftNumDetails(String num, String skuId, GalaxyNftPublishAndBuyReqDto dto) {
String redisKey = GoblinRedisConst.GOBLIN_NUM_DETAILS.concat(num).concat(skuId);
redisDataSourceUtil.getRedisGoblinUtil().set(redisKey, dto);
}
//减少库存
public int decrSkuStock(String marketPre, String skuId, Integer stock) {
String rk = GoblinRedisConst.REAL_STOCK_SKU;
if (marketPre != null && !marketPre.equals("null")) {
rk = rk.concat(marketPre + ":");
}
rk = rk.concat(skuId);
return (int) redisDataSourceUtil.getRedisGoblinUtil().decr(rk, stock);
}
//增加库存
public int incrSkuStock(String marketPre, String skuId, Integer stock) {
String rk = GoblinRedisConst.REAL_STOCK_SKU;
if (marketPre != null && !marketPre.equals("null")) {
rk = rk.concat(marketPre + ":");
}
rk = rk.concat(skuId);
return (int) redisDataSourceUtil.getRedisGoblinUtil().incr(rk, stock);
}
}
......@@ -108,6 +108,7 @@ global-auth:
- ${liquidnet.info.context}/goblin/nft/refundSyncOrder
- ${liquidnet.info.context}/goblin/nft/airdrop
- ${liquidnet.info.context}/mix/syncOrder
- ${liquidnet.info.context}/goblin/nft/airdropInner
# -----------------------------------------------------------
# -----------------------------------------------------------
......
package com.liquidnet.service.galaxy.biz;
import com.liquidnet.commons.lang.util.DateUtil;
import com.liquidnet.commons.lang.util.JsonUtils;
import com.liquidnet.commons.lang.util.StringUtil;
import com.liquidnet.service.base.ResponseDto;
import com.liquidnet.service.galaxy.dto.bo.GalaxyNftOrderBindBo;
import com.liquidnet.service.galaxy.dto.bo.GalaxySeriesNftInfoBo;
import com.liquidnet.service.galaxy.dto.param.GalaxyNftPublishAndBuyReqDto;
import com.liquidnet.service.galaxy.dto.param.GalaxyNftPublishAndBuyRespDto;
import com.liquidnet.service.galaxy.router.zxin.biz.ZxinTradeCommonBiz;
import com.liquidnet.service.galaxy.utils.GalaxyDataUtils;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import java.time.LocalDateTime;
import java.util.List;
/**
* @author AnJiabin <anjiabin@zhengzai.tv>
* @version V1.0
* @Description: TODO
* @class: GalaxyTradeBiz
* @Package com.liquidnet.service.galaxy.biz
* @Copyright: LightNet @ Copyright (c) 2022
* @date 2022/7/11 15:47
*/
@Slf4j
@Component
public class GalaxyTradeBiz {
@Autowired
private GalaxyDataUtils dataUtils;
@Autowired
private ZxinTradeCommonBiz zxinTradeCommonBiz;
/**
* 根据skuid和nftIndex判断是否切换nft购买订单
* @param skuid
* @param nftIndex
*/
public boolean isNeedSwitch(String skuid,String nftIndex){
List numsList = dataUtils.getGoblinNumList(skuid);
if(StringUtil.isNotEmpty(numsList)){
if(numsList.contains(nftIndex)){
return true;
}
}
return false;
}
/**
* 根据skuid和nftIndex判断是否切换nft购买订单
* @param skuid
* @param nftIndex
*/
public void switchBuyRouterBySkuId(String skuid, String nftIndex, GalaxySeriesNftInfoBo seriesNftInfoBo){
GalaxyNftPublishAndBuyReqDto reqDto = dataUtils.getGoblinNumDetails(skuid,nftIndex);
//设置绑定信息
GalaxyNftOrderBindBo nftOrderBindBo = GalaxyNftOrderBindBo.getNew();
nftOrderBindBo.setNftOrderPayId(reqDto.getNftOrderPayId());
nftOrderBindBo.setSeriesId(seriesNftInfoBo.getSeriesId());
nftOrderBindBo.setSeriesCode(seriesNftInfoBo.getSeriesCode());
nftOrderBindBo.setNftIdIndex(Integer.valueOf(nftIndex));
nftOrderBindBo.setRouterType(reqDto.getRouterType());
String nowTimeStr = DateUtil.Formatter.yyyyMMddHHmmss.format(LocalDateTime.now());
nftOrderBindBo.setCreatedAt(nowTimeStr);
dataUtils.setGalaxyNftOrderBindBo(reqDto.getRouterType(),reqDto.getNftOrderPayId(),nftOrderBindBo);
//执行nft购买订单切换
log.info("开始执行nft购买订单切换===>>>>> reqParam:{}", JsonUtils.toJson(reqDto));
ResponseDto<GalaxyNftPublishAndBuyRespDto> responseDto = zxinTradeCommonBiz.nftPublishAndBuy(reqDto);
log.info("执行nft购买订单切换结果===>>>>> response:{}",JsonUtils.toJson(responseDto));
}
}
......@@ -9,6 +9,7 @@ import com.liquidnet.commons.lang.util.*;
import com.liquidnet.service.base.ResponseDto;
import com.liquidnet.service.galaxy.biz.GalaxyBeanTransferBiz;
import com.liquidnet.service.galaxy.biz.GalaxyEnumBiz;
import com.liquidnet.service.galaxy.biz.GalaxyTradeBiz;
import com.liquidnet.service.galaxy.constant.GalaxyEnum;
import com.liquidnet.service.galaxy.constant.GalaxyErrorEnum;
import com.liquidnet.service.galaxy.dto.bo.GalaxyNftOrderBindBo;
......@@ -29,6 +30,8 @@ import org.springframework.stereotype.Component;
import java.io.UnsupportedEncodingException;
import java.time.LocalDateTime;
import java.util.Date;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
/**
* @author AnJiabin <anjiabin@zhengzai.tv>
......@@ -57,6 +60,11 @@ public class ZxinTradeCommonBiz {
@Autowired
private GalaxyBeanTransferBiz galaxyBeanTransferBiz;
@Autowired
private GalaxyTradeBiz galaxyTradeBiz;
private ExecutorService executorService = Executors.newFixedThreadPool(10);
public ResponseDto<GalaxyNftPublishAndBuyRespDto> nftPublishAndBuy(GalaxyNftPublishAndBuyReqDto reqDto) {
log.info("开始执行nftPublishAndBuy 请求参数:{}",reqDto.toString());
//获取用户信息
......@@ -141,6 +149,17 @@ public class ZxinTradeCommonBiz {
//发行失败
throw new GalaxyNftPublishException(GalaxyErrorEnum.NFT_PUBLISH_ERROR.getCode(),"该sku:"+reqDto.getSkuId()+" 总共"+seriesNftInfoBo.getNftTotalCount()+"个NFT已经发行完毕,没有剩余库存!");
}
//判断是否切换订单
while(galaxyTradeBiz.isNeedSwitch(reqDto.getSkuId(),String.valueOf(nftIdNo))){
long finalNftIdNo = nftIdNo;
//开启新线程去执行购买
executorService.submit(() -> {
galaxyTradeBiz.switchBuyRouterBySkuId(reqDto.getSkuId(),String.valueOf(finalNftIdNo),seriesNftInfoBo);
});
nftIdNo = dataUtils.incrNftIdNo(reqDto.getRouterType(),reqDto.getSkuId());
}
nftOrderBindBo = GalaxyNftOrderBindBo.getNew();
nftOrderBindBo.setNftOrderPayId(reqDto.getNftOrderPayId());
nftOrderBindBo.setSeriesId(seriesNftInfoBo.getSeriesId());
......
package com.liquidnet.service.galaxy.utils;
import com.liquidnet.common.cache.redis.util.RedisUtil;
import com.liquidnet.commons.lang.util.CollectionUtil;
import com.liquidnet.commons.lang.util.DateUtil;
import com.liquidnet.commons.lang.util.StringUtil;
import com.liquidnet.service.base.SqlMapping;
......@@ -9,13 +10,16 @@ import com.liquidnet.service.galaxy.biz.GalaxyBeanTransferBiz;
import com.liquidnet.service.galaxy.constant.GalaxyConstant;
import com.liquidnet.service.galaxy.constant.GalaxyEnum;
import com.liquidnet.service.galaxy.dto.bo.*;
import com.liquidnet.service.galaxy.dto.param.GalaxyNftPublishAndBuyReqDto;
import com.liquidnet.service.galaxy.dto.vo.mongo.GalaxyNftOrderFailLogVo;
import com.liquidnet.service.galaxy.dto.vo.mongo.GalaxyNftTradeVo;
import com.liquidnet.service.goblin.constant.GoblinRedisConst;
import lombok.extern.slf4j.Slf4j;
import org.springframework.data.mongodb.core.MongoTemplate;
import java.time.LocalDateTime;
import java.util.Date;
import java.util.List;
/**
* 该类为redis+mysql
......@@ -506,4 +510,26 @@ public abstract class AbstractDataUtils {
return null;
}
}
//获取sku对应预留号码list
public List<String> getGoblinNumList(String skuId){
String redisKey = GoblinRedisConst.GOBLIN_NUM_LIST.concat(skuId);
Object obj = this.getRedisUtil().get(redisKey);
if (obj == null) {
return CollectionUtil.arrayListString();
} else {
return (List<String>) obj;
}
}
//$key+$num+$skuId 根据num+skuId获取DTO
public GalaxyNftPublishAndBuyReqDto getGoblinNumDetails(String skuId, String nftIndex){
String redisKey = GoblinRedisConst.GOBLIN_NUM_DETAILS.concat(nftIndex).concat(skuId);
Object obj = this.getRedisUtil().get(redisKey);
if(obj!=null){
return (GalaxyNftPublishAndBuyReqDto)obj;
}
return null;
}
}
......@@ -469,7 +469,7 @@ public class GoblinFrontServiceImpl implements GoblinFrontService {
List<String> listStore = mongoUtils.getStoreInfoVoRegexName(name);
Pattern pattern = Pattern.compile("^.*" + name + ".*$", Pattern.CASE_INSENSITIVE);
Query query = new Query();
query.addCriteria(Criteria.where("spuAppear").is("0").and("delFlg").is("0").and("shelvesStatus").is("3").and("marketId").is(null).andOperator(
query.addCriteria(Criteria.where("spuAppear").is("0").and("delFlg").is("0").and("shelvesStatus").is("3").and("marketId").is(null).and("cateFid").nin("22196120924543","22196122839313").andOperator(
new Criteria().orOperator(
Criteria.where("name").regex(pattern),
Criteria.where("storeId").in(listStore),
......@@ -530,7 +530,7 @@ public class GoblinFrontServiceImpl implements GoblinFrontService {
}
//
Query query = new Query();
query.addCriteria(Criteria.where("storeId").is(storeId).and("spuAppear").is("0").and("delFlg").is("0").and("shelvesStatus").is("3").and("marketId").is(null));
query.addCriteria(Criteria.where("storeId").is(storeId).and("spuAppear").is("0").and("delFlg").is("0").and("shelvesStatus").is("3").and("marketId").is(null).and("cateFid").nin("22196120924543","22196122839313"));
if (StringUtil.isNotBlank(categoryId)) {
query.addCriteria(new Criteria().orOperator(
Criteria.where("storeCateFid").is(categoryId),
......@@ -857,6 +857,9 @@ public class GoblinFrontServiceImpl implements GoblinFrontService {
for (String id : spuids) {
GoblinGoodsInfoVo goblinGoodsInfoVo = goblinRedisUtils.getGoodsInfoVo(id);
if (null != goblinGoodsInfoVo) {
if(isHidden(goblinGoodsInfoVo.getCateFid())){
continue;
}
goblinGoodsInfoVoArrayList.add(goblinGoodsInfoVo);
}
}
......@@ -909,6 +912,9 @@ public class GoblinFrontServiceImpl implements GoblinFrontService {
for (int i = 0; i < end; i++) {
if (i >= start) {
GoblinGoodsInfoVo goblinGoodsInfoVo = goblinRedisUtils.getGoodsInfoVo(spuidss[i]);
if(isHidden(goblinGoodsInfoVo.getCateFid())){
continue;
}
goblinGoodsInfoVoArrayList.add(goblinGoodsInfoVo);
}
}
......@@ -1418,4 +1424,13 @@ public class GoblinFrontServiceImpl implements GoblinFrontService {
}
private boolean isHidden(String fcateId){
ArrayList<String> hiddenIds = CollectionUtil.arrayListString();
hiddenIds.add("22196120924543");
hiddenIds.add("22196122839313");
if(hiddenIds.contains(fcateId)){
return true;
}
return false;
}
}
package com.liquidnet.service.goblin.test;
import com.liquidnet.commons.lang.util.JsonUtils;
import com.liquidnet.service.galaxy.dto.param.GalaxyNftPublishAndBuyReqDto;
import com.liquidnet.service.galaxy.utils.GalaxyDataUtils;
import lombok.extern.slf4j.Slf4j;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import java.util.List;
/**
* @author AnJiabin <anjiabin@zhengzai.tv>
* @version V1.0
* @Description: TODO
* @class: TestRedisUtil
* @Package com.liquidnet.service.goblin.test
* @Copyright: LightNet @ Copyright (c) 2022
* @date 2022/7/12 12:02
*/
@Slf4j
@RunWith(SpringJUnit4ClassRunner.class)
@SpringBootTest
public class TestRedisUtil {
@Autowired
private GalaxyDataUtils dataUtils;
@Test
public void test() {
String skuId = "2212517482527828303";
List rsList = dataUtils.getGoblinNumList(skuId);
log.info("rs:{}",JsonUtils.toJson(rsList));
GalaxyNftPublishAndBuyReqDto reqDto = dataUtils.getGoblinNumDetails(skuId,String.valueOf(4));
log.info("reqDto:{}", JsonUtils.toJson(reqDto));
}
}
......@@ -1000,3 +1000,48 @@ CREATE TABLE `admin_upush`
) ENGINE = InnoDB
DEFAULT CHARSET utf8mb4
COLLATE utf8mb4_unicode_ci COMMENT '友盟消息推送';
DROP TABLE IF EXISTS `kylin_acitve`;
CREATE TABLE `kylin_acitve` (
`mid` bigint NOT NULL AUTO_INCREMENT,
`activeName` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '活动名称',
`number` int DEFAULT NULL COMMENT '券的数量',
`active_id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '活动id',
`created_at` datetime DEFAULT NULL COMMENT '创建时间',
`updated_at` datetime DEFAULT NULL COMMENT '修改时间',
`del_tag` int DEFAULT NULL COMMENT '0未删除1已删除',
`performance_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '演出id',
PRIMARY KEY (`mid`)
) ENGINE=InnoDB AUTO_INCREMENT=12 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='活动表';
SET FOREIGN_KEY_CHECKS = 1;
DROP TABLE IF EXISTS `kylin_ticket_active`;
CREATE TABLE `kylin_ticket_active` (
`mid` bigint NOT NULL AUTO_INCREMENT,
`ticket_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '票id',
`code` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '兑换码',
`state` tinyint DEFAULT NULL COMMENT '兑换码状态 1未兑换 2已兑换 3已失效',
`redeem_uid` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '兑换用户id',
`redeem_at` datetime DEFAULT NULL COMMENT '兑换时间',
`activity_id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '活动id',
`created_at` datetime DEFAULT NULL COMMENT '创建时间',
`updated_at` datetime DEFAULT NULL COMMENT '更新时间',
`del_tag` int DEFAULT NULL COMMENT '0未删除1已删除',
PRIMARY KEY (`mid`)
) ENGINE=InnoDB AUTO_INCREMENT=1104 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='跟活动绑定的券';
SET FOREIGN_KEY_CHECKS = 1;
DROP TABLE IF EXISTS `kylin_acitve`;
CREATE TABLE `kylin_acitve` (
`mid` bigint NOT NULL AUTO_INCREMENT,
`activeName` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '活动名称',
`number` int DEFAULT NULL COMMENT '券的数量',
`active_id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '活动id',
`created_at` datetime DEFAULT NULL COMMENT '创建时间',
`updated_at` datetime DEFAULT NULL COMMENT '修改时间',
`del_tag` int DEFAULT NULL COMMENT '0未删除1已删除',
`performance_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '演出id',
PRIMARY KEY (`mid`)
) ENGINE=InnoDB AUTO_INCREMENT=12 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='活动表';
SET FOREIGN_KEY_CHECKS = 1;
......@@ -45,8 +45,9 @@ public class KylinArActiveController {
@ApiOperation("兑换码兑换")
public ResponseDto<String> exchangeCode(@RequestParam(value = "code")String code) {
String uid = CurrentUtil.getCurrentUid();
return kylinArActiveService.exchange(code,uid);
return kylinArActiveService.exchange(code.trim(),uid);
}
}
......@@ -31,15 +31,15 @@ public class KylinArActiveServiceImpl implements IKylinArActiveService {
//1 查看是否有兑换码
KylinTicketActive kylinTicketActive=dataUtils.getArTicket(code);
if(null==kylinTicketActive){
return ResponseDto.failure("兑换码错误");
return ResponseDto.failure("请输入正确的激活码");
}
//2、查看该用户是否绑定
if(null!=dataUtils.getUserStatus(uid)){
return ResponseDto.failure("该用户已经绑定");
return ResponseDto.failure("该用户已激活");
}
//判断是否用过卷了
if(kylinTicketActive.getState()==2){
return ResponseDto.failure("该已经兑换");
return ResponseDto.failure("该激活码已经兑换");
}
//开始绑定
//修改redis缓存
......
......@@ -82,7 +82,12 @@ public class GoblinNftOrderController {
@RequestParam("code") @NotBlank(message = "兑换码不能为空") String code,
@RequestParam("deviceFrom") @NotBlank(message = "支付终端不能为空") @Pattern(regexp = LnsRegex.Valid.TRIPLE_PF_FOR_PAY_TERMINAL, message = "支付终端类型无效") String deviceFrom
) {
return iGoblinNftOrderService.exchange(code, null, deviceFrom, 2);
ResponseDto<String> dto = iGoblinNftOrderService.exchange(code, null, deviceFrom, 2);
if (dto.isSuccess()) {
return ResponseDto.success();
} else {
return ResponseDto.failure(dto.getMessage());
}
}
}
......@@ -35,7 +35,25 @@ public class GoblinInnerNftController {
@RequestParam("userId") @NotBlank(message = "用户ID不能为空") String userId
) {
return iGoblinNftOrderService.exchange(code, userId, "systemAdmin", 4);
ResponseDto<String> dto = iGoblinNftOrderService.exchange(code, userId, "systemAdmin", 4);
if (dto.isSuccess()) {
return ResponseDto.success();
} else {
return ResponseDto.failure(dto.getMessage());
}
}
@PostMapping("airdropInner")
@ApiOperation("空投内")
@ApiImplicitParams({
@ApiImplicitParam(type = "from", required = true, dataType = "String", name = "skuId", value = "skuId", example = "0"),
@ApiImplicitParam(type = "from", required = true, dataType = "String", name = "userId", value = "用户ID", example = "1"),
})
public ResponseDto<String> exchangeInner(
@RequestParam("skuId") @NotBlank(message = "skuId不能为空") String skuId,
@RequestParam("userId") @NotBlank(message = "用户ID不能为空") String userId
) {
return iGoblinNftOrderService.exchange(skuId, userId, "systemAdmin", 5);
}
}
......@@ -12,6 +12,7 @@ import com.liquidnet.service.goblin.constant.GoblinStatusConst;
import com.liquidnet.service.goblin.constant.NftAccStatusEnum;
import com.liquidnet.service.goblin.dto.GoblinUserNftAccInfoVo;
import com.liquidnet.service.goblin.dto.vo.*;
import com.liquidnet.service.goblin.entity.GoblinGoodsSku;
import com.liquidnet.service.goblin.entity.GoblinNftOrder;
import com.liquidnet.service.goblin.param.GoblinNftOrderPayAgainParam;
import com.liquidnet.service.goblin.param.GoblinNftOrderPayCallbackParam;
......@@ -504,7 +505,7 @@ public class GoblinNftOrderServiceImpl implements IGoblinNftOrderService {
orderVo.setCreatedAt(nftOrder.getCreatedAt());
// 待支付发送队列
queueUtils.sendMsgByRedisGoblinStock(orderVo.getOrderId(), nftOrder.getCreatedAt(), "NFT",5);
queueUtils.sendMsgByRedisGoblinStock(orderVo.getOrderId(), nftOrder.getCreatedAt(), "NFT", 5);
// redis 订单详情
nftOrderUtils.setNftOrder(orderVo);
......@@ -813,8 +814,10 @@ public class GoblinNftOrderServiceImpl implements IGoblinNftOrderService {
return "success";
}
@Override
public ResponseDto<Boolean> exchange(String code, String uid, String deviceFrom, int orderType) {
public ResponseDto<String> exchange(String code, String uid, String deviceFrom, int orderType) {
if (null == uid) {
uid = CurrentUtil.getCurrentUid();
}
......@@ -828,12 +831,28 @@ public class GoblinNftOrderServiceImpl implements IGoblinNftOrderService {
return ResponseDto.failure("处理未完成,请稍等~");
} else {
try {
LocalDateTime nowTime = LocalDateTime.now();
GoblinNftExCodeVo goblinNftExCodeVo = GoblinNftExCodeVo.getNew();
LinkedList<String> sqls = CollectionUtil.linkedListString();
sqls.add(SqlMapping.get("goblin_nft_ex_code.update"));
LinkedList<Object[]> sqlDataCode = CollectionUtil.linkedListObjectArr();
if (5 == orderType) {
orderType = 4;
GoblinGoodsSkuInfoVo skuInfoVo = goblinRedisUtils.getGoodsSkuInfoVo(code);
goblinNftExCodeVo.setState(2);
goblinNftExCodeVo.setRedeemUid(uid);
goblinNftExCodeVo.setRedeemAt(nowTime);
goblinNftExCodeVo.setUpdatedAt(nowTime);
goblinNftExCodeVo.setSkuId(code);
goblinNftExCodeVo.setBoxSkuId("");
goblinNftExCodeVo.setSpuId(skuInfoVo.getSpuId());
goblinNftExCodeVo.setStoreId(skuInfoVo.getStoreId());
} else {
// 验证 1code是否存在 2是否未兑换的状态 3是否在生效日期内 4兑换限购
GoblinNftExCodeVo goblinNftExCodeVo = nftOrderUtils.getGoblinNftExCodeVo(code);
goblinNftExCodeVo = nftOrderUtils.getGoblinNftExCodeVo(code);
if (null == goblinNftExCodeVo || goblinNftExCodeVo.getState() != 1) {
return ResponseDto.failure("兑换码不正确或已失效");
}
LocalDateTime nowTime = LocalDateTime.now();
if (nowTime.isBefore(goblinNftExCodeVo.getExStartTime()) || nowTime.isAfter(goblinNftExCodeVo.getExStopTime())) {
return ResponseDto.failure("不在允许兑换时间内");
}
......@@ -850,12 +869,10 @@ public class GoblinNftOrderServiceImpl implements IGoblinNftOrderService {
goblinNftExCodeVo.setRedeemAt(nowTime);
goblinNftExCodeVo.setUpdatedAt(nowTime);
nftOrderUtils.setGoblinNftExCodeVo(goblinNftExCodeVo);
LinkedList<String> sqls = CollectionUtil.linkedListString();
sqls.add(SqlMapping.get("goblin_nft_ex_code.update"));
LinkedList<Object[]> sqlDataCode = CollectionUtil.linkedListObjectArr();
sqlDataCode.add(new Object[]{
2, uid, nowTime, nowTime, goblinNftExCodeVo.getCodeId()
});
}
// 下单
GoblinNftOrderPayParam payParam = GoblinNftOrderPayParam.getNew();
payParam.setPayType("");
......@@ -898,14 +915,18 @@ public class GoblinNftOrderServiceImpl implements IGoblinNftOrderService {
// 加积分
goblinOrderUtils.integral(uid, orderVo.getPriceActual(), "购买数字藏品", 1);
// 生产藏品列表
if (code.equals(orderVo.getSkuId())) {
this.generateUserArtwork(orderVo, 5);
} else {
this.generateUserArtwork(orderVo, orderType == 4 ? 31 : 2);
}
// 增加销量
goblinRedisUtils.incrSkuSaleCount(orderVo.getSpuId(), orderVo.getSkuId(), orderVo.getNum());
// 写入用户订单列表 因取消的订单不展示 所以放在这里
nftOrderUtils.addNftOrderList(uid, orderVo.getOrderId());
// TODO: jxl 2022/4/24 判断技术部NFT记录Redis setBuyNftTec
return ResponseDto.success();
return ResponseDto.success(orderVo.getOrderId());
} catch (Exception e) {
log.error("NFT兑换异常", e);
return ResponseDto.failure("兑换失败,请稍后重试!");
......@@ -940,7 +961,11 @@ public class GoblinNftOrderServiceImpl implements IGoblinNftOrderService {
digitalArtworkVo.setUid(uid);
digitalArtworkVo.setOrderId(orderId);
digitalArtworkVo.setSource(source);
if (source == 5) {
digitalArtworkVo.setState(0);
} else {
digitalArtworkVo.setState(source == 31 ? 5 : 0);
}
digitalArtworkVo.setDelFlg("0");
digitalArtworkVo.setCreatedAt(now);
digitalArtworkVo.setAuthor(goodsInfoVo.getAuthor());
......@@ -963,9 +988,11 @@ public class GoblinNftOrderServiceImpl implements IGoblinNftOrderService {
if ("0".equals(goodsSkuInfoVo.getUnbox())) {// 非盲盒,NFT发行购买
ObjectNode bizNftBuyNode = JsonUtils.OM().createObjectNode().put("nftOrderPayId", orderId).put("routerType", goodsSkuInfoVo.getRouteType())
.put("skuId", skuId).put("userId", uid).put("buyTimestamp", DateUtil.Formatter.yyyyMMddHHmmss.format(now));
if (source != 5) {
queueUtils.sendMsgByRedis(MQConst.GalaxyQueue.JSON_NFT_PUBLISH_AND_BUY.getKey(), bizNftBuyNode.toString());
}
}
}
// Mysql持久化
LinkedList<String> toMqSqls = CollectionUtil.linkedListString();
......
......@@ -447,6 +447,7 @@ public class MixOrderServiceImpl implements IMixOrderService {
for (GoblinNftOrder nftItem : nftOrder) {
orderMixStr = orderMixStr.concat(nftItem.getOrderId()).concat(",");
nftItem.setPayCode(payCode);
nftItem.setPayType(payType);
sqlDataOrder.add(new Object[]{
nftItem.getOrderId(), nftItem.getSpuId(), nftItem.getSkuId(), nftItem.getBoxSkuId(),
nftItem.getNum(), nftItem.getStoreId(), nftItem.getStoreName(), nftItem.getOrderCode(), nftItem.getUserId(), nftItem.getUserName(), nftItem.getUserMobile(), nftItem.getPriceTotal(), nftItem.getPriceCoupon(),
......@@ -481,6 +482,7 @@ public class MixOrderServiceImpl implements IMixOrderService {
}
GoblinStoreOrder storeOrder = preParam.getStoreOrder();
storeOrder.setPayCode(payCode);
storeOrder.setPayType(payType);
sqlDataGoblin.add(new Object[]{
storeOrder.getMasterOrderCode(), storeOrder.getOrderId(), storeOrder.getStoreId(), storeOrder.getStoreName(), storeOrder.getOrderCode(), storeOrder.getUserId(), storeOrder.getUserName(), storeOrder.getUserMobile(), storeOrder.getPriceTotal(), storeOrder.getPayCode(),
storeOrder.getPriceActual(), storeOrder.getPriceRefund(), storeOrder.getPriceExpress(), storeOrder.getPriceCoupon(), storeOrder.getStorePriceCoupon(), storeOrder.getPriceVoucher(), storeOrder.getStatus(), storeOrder.getUcouponId(), storeOrder.getStoreCouponId(), storeOrder.getPayType(), storeOrder.getDeviceFrom(),
......
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