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

Commit 196154dd authored by 张国柄's avatar 张国柄

Merge branch 'dev' into test

parents 96d31714 c554613d
......@@ -100,6 +100,7 @@
}
return str
}
function printExpressData(dataInfo, jContact, jAddress, jTel, index, listLen) {
var LODOP = getLodop();
LODOP.PRINT_INIT("运单打印");
......@@ -241,42 +242,47 @@
}
function printExpress(performanceId) {
try{
var LODOP = getLodop();
if (LODOP == undefined) {
var message = "确定打印吗?";
$.modal.confirm(message, function () {
try {
var LODOP = getLodop();
if (LODOP == undefined) {
return false;
}
} catch (err) {
return false;
}
} catch (err) {
return false;
}
var data = '';
var ids = [performanceId];
data = {"ids": ids.join()};
var configPrint = {
url: prefix + "/batchPrintExpress",
type: "post",
dataType: "json",
data: data,
beforeSend: function () {
$.modal.loading("正在获取数据中,请稍后...");
},
success: function (result) {
$.modal.closeLoading();
$.modal.loading("正在打印中,请稍后...");
var expressList = result.data.expressList;
var listLen = expressList.length;
var jContact = result.data.jcontact;
var jAddress = result.data.jaddress;
var jTel = result.data.jtel;
if (listLen > 0) {
$.each(expressList, function (index, value) {
printExpressData(value, jContact, jAddress, jTel, index+1, listLen);
});
var data = '';
var ids = [performanceId];
data = {"ids": ids.join()};
var configPrint = {
url: prefix + "/batchPrintExpress",
type: "post",
dataType: "json",
data: data,
beforeSend: function () {
$.modal.loading("正在获取数据中,请稍后...");
},
success: function (result) {
$.modal.closeLoading();
$.modal.loading("正在打印中,请稍后...");
var expressList = result.data.expressList;
var listLen = expressList.length;
var jContact = result.data.jcontact;
var jAddress = result.data.jaddress;
var jTel = result.data.jtel;
if (listLen > 0) {
$.each(expressList, function (index, value) {
printExpressData(value, jContact, jAddress, jTel, index + 1, listLen);
});
} else {
$.modal.msg("暂无需要打印的订单");
}
$.modal.closeLoading();
}
$.modal.closeLoading();
}
};
$.ajax(configPrint)
};
$.ajax(configPrint)
});
}
$(function () {
......
......@@ -5,6 +5,7 @@ import com.liquidnet.commons.lang.util.SensitizeUtil;
import com.liquidnet.service.adam.constant.AdamRedisConst;
import com.liquidnet.service.adam.dto.vo.*;
import com.liquidnet.service.adam.util.NknameUtil;
import com.liquidnet.service.adam.util.ObjectUtil;
import com.liquidnet.service.kylin.constant.KylinRedisConst;
import com.liquidnet.service.kylin.dto.vo.mongo.KylinPerformanceVo;
import lombok.extern.slf4j.Slf4j;
......@@ -197,11 +198,10 @@ public class AdamRdmService {
}
public boolean addThirdPartVoListByUid(String uid, List<AdamThirdPartInfoVo> vos, AdamThirdPartInfoVo vo) {
if (CollectionUtils.isEmpty(vos)) {
vos = Collections.singletonList(vo);
} else {
vos.add(vo);
if (null == vos) {
vos = ObjectUtil.getAdamThirdPartInfoVoArrayList();
}
vos.add(vo);
return redisUtil.set(AdamRedisConst.INFO_THIRD_PARTY + uid, vos);
}
......@@ -231,7 +231,7 @@ public class AdamRdmService {
public List<AdamEntersVo> getEntersVoByUid(String uid) {
String rk = AdamRedisConst.INFO_ENTERS.concat(uid);
long s = System.currentTimeMillis();
List<AdamEntersVo> vos = (List<AdamEntersVo>) redisUtil.get(rk);
ArrayList<AdamEntersVo> vos = (ArrayList<AdamEntersVo>) redisUtil.get(rk);
// if (CollectionUtils.isEmpty(vos)) {
// s = System.currentTimeMillis();
// vos = mongoTemplate.find(
......@@ -247,11 +247,10 @@ public class AdamRdmService {
}
public boolean addEntersVoByUid(String uid, List<AdamEntersVo> vos, AdamEntersVo vo) {
if (CollectionUtils.isEmpty(vos)) {
vos = Collections.singletonList(vo);
} else {
vos.add(vo);
if (null == vos) {
vos = ObjectUtil.getAdamEntersVoArrayList();
}
vos.add(vo);
return redisUtil.set(AdamRedisConst.INFO_ENTERS + uid, vos);
}
......@@ -305,11 +304,10 @@ public class AdamRdmService {
}
public boolean addAddressesVoByUid(String uid, List<AdamAddressesVo> vos, AdamAddressesVo vo) {
if (CollectionUtils.isEmpty(vos)) {
vos = Collections.singletonList(vo);
} else {
vos.add(vo);
if (null == vos) {
vos = ObjectUtil.getAdamAddressesVoArrayList();
}
vos.add(vo);
return redisUtil.set(AdamRedisConst.INFO_ADDRESSES + uid, vos);
}
......@@ -509,11 +507,10 @@ public class AdamRdmService {
}
public boolean addMemberOrderVoByUid(String uid, List<AdamMemberOrderVo> vos, AdamMemberOrderVo vo) {
if (CollectionUtils.isEmpty(vos)) {
vos = Collections.singletonList(vo);
} else {
vos.add(vo);
if (null == vos) {
vos = ObjectUtil.getAdamMemberOrderVoArrayList();
}
vos.add(vo);
return redisUtil.set(AdamRedisConst.INFO_MEMBER_ORDER + uid, vos);
}
......
......@@ -9,6 +9,10 @@ public class ObjectUtil {
private static final ArrayList<AdamTagParentVo> adamTagParentVoArrayList = new ArrayList<>();
private static final ArrayList<AdamTagVo> adamTagVoArrayList = new ArrayList<>();
private static final ArrayList<AdamMemberOrderSimpleVo> adamMemberOrderSimpleVoArrayList = new ArrayList<>();
private static final ArrayList<AdamThirdPartInfoVo> adamThirdPartInfoVoArrayList = new ArrayList<>();
private static final ArrayList<AdamEntersVo> adamEntersVoArrayList = new ArrayList<>();
private static final ArrayList<AdamAddressesVo> adamAddressesVoArrayList = new ArrayList<>();
private static final ArrayList<AdamMemberOrderVo> adamMemberOrderVoArrayList = new ArrayList<>();
private static final PagedResult<AdamCollectVo> adamCollectVoPagedResult = new PagedResult<>();
private static final PagedResult<AdamMemberOrderSimpleVo> adamMemberOrderSimpleVoPagedResult = new PagedResult<>();
......@@ -27,6 +31,22 @@ public class ObjectUtil {
return (ArrayList<AdamMemberOrderSimpleVo>) adamMemberOrderSimpleVoArrayList.clone();
}
public static ArrayList<AdamThirdPartInfoVo> getAdamThirdPartInfoVoArrayList() {
return (ArrayList<AdamThirdPartInfoVo>) adamThirdPartInfoVoArrayList.clone();
}
public static ArrayList<AdamEntersVo> getAdamEntersVoArrayList() {
return (ArrayList<AdamEntersVo>) adamEntersVoArrayList.clone();
}
public static ArrayList<AdamAddressesVo> getAdamAddressesVoArrayList() {
return (ArrayList<AdamAddressesVo>) adamAddressesVoArrayList.clone();
}
public static ArrayList<AdamMemberOrderVo> getAdamMemberOrderVoArrayList() {
return (ArrayList<AdamMemberOrderVo>) adamMemberOrderVoArrayList.clone();
}
public static PagedResult<AdamCollectVo> getAdamCollectVoPagedResult() {
return adamCollectVoPagedResult.clone();
}
......
......@@ -23,19 +23,19 @@ public class SweetTemplateController {
return sweetTemplateService.sendMsg();
}
// @PostMapping("remind")
// @ApiOperation("提醒记录")
// @ApiImplicitParams({
// @ApiImplicitParam(type = "form", dataType = "String", name = "openId", value = "微信openId", required = true),
// @ApiImplicitParam(type = "form", dataType = "String", name = "unionId", value = "微信unionId", required = true),
// @ApiImplicitParam(type = "form", dataType = "String", name = "performancesId", value = "演出ID", required = true),
// })
// public ResponseDto remind(
// @RequestParam() String openId,
// @RequestParam() String unionId,
// @RequestParam() String performancesId
// ) {
// return sweetTemplateService.remind(openId, unionId, performancesId);
// }
@PostMapping("remind")
@ApiOperation("提醒记录")
@ApiImplicitParams({
@ApiImplicitParam(type = "form", dataType = "String", name = "openId", value = "微信openId", required = true),
@ApiImplicitParam(type = "form", dataType = "String", name = "unionId", value = "微信unionId", required = true),
@ApiImplicitParam(type = "form", dataType = "String", name = "performancesId", value = "演出ID", required = true),
})
public ResponseDto remind(
@RequestParam() String openId,
@RequestParam() String unionId,
@RequestParam() String performancesId
) {
return sweetTemplateService.remind(openId, unionId, performancesId);
}
}
......@@ -4,6 +4,7 @@ import com.liquidnet.common.cache.redis.util.RedisUtil;
import com.liquidnet.service.base.ResponseDto;
import com.liquidnet.service.feign.kylin.api.FeignKylinPerformanceClient;
//import com.liquidnet.service.kylin.dto.vo.mongo.KylinPerformanceVo;
import com.liquidnet.service.kylin.dto.vo.mongo.KylinPerformanceVo;
import com.liquidnet.service.sweet.constant.SweetConstant;
import com.liquidnet.service.sweet.utils.RedisDataUtils;
import com.liquidnet.service.sweet.vo.SweetRemindVo;
......@@ -103,10 +104,10 @@ public class SweetTemplateServiceImpl {
return service;
}
// public ResponseDto remind(String openId, String unionId, String performancesId) {
// ResponseDto<KylinPerformanceVo> performanceVo = feignKylinPerformanceClient.detail(performancesId);
// KylinPerformanceVo performanceInfo = performanceVo.getData();
// redisDataUtils.setSweetRemind(openId, unionId, performancesId, performanceInfo);
// return ResponseDto.success();
// }
public ResponseDto remind(String openId, String unionId, String performancesId) {
ResponseDto<KylinPerformanceVo> performanceVo = feignKylinPerformanceClient.detail(performancesId);
KylinPerformanceVo performanceInfo = performanceVo.getData();
redisDataUtils.setSweetRemind(openId, unionId, performancesId, performanceInfo);
return ResponseDto.success();
}
}
......@@ -5,6 +5,7 @@ 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.service.kylin.dto.vo.mongo.KylinPerformanceVo;
import com.liquidnet.service.kylin.dto.vo.mongo.KylinPerformanceVo;
import com.liquidnet.service.sweet.constant.SweetConstant;
import com.liquidnet.service.sweet.dto.SweetManualAppletDto;
import com.liquidnet.service.sweet.dto.SweetManualArtistList2Dto;
......@@ -16,6 +17,7 @@ import com.liquidnet.service.sweet.entity.SweetManualSort;
import com.liquidnet.service.sweet.entity.SweetRichtext;
import com.liquidnet.service.sweet.mapper.*;
import com.liquidnet.service.sweet.vo.SweetArtistsRelationVo;
import com.liquidnet.service.sweet.vo.SweetRemindVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
......@@ -246,22 +248,22 @@ public class RedisDataUtils {
}
}
// // 小程序演出提醒
// public void setSweetRemind(String openId, String unionId, String performancesId, KylinPerformanceVo performanceInfo) {
// String redisKey = SweetConstant.REDIS_KEY_SWEET_REMIND.concat(unionId);
// SweetRemindVo sweetRemindVo = SweetRemindVo.getNew();
// sweetRemindVo.setCreatedAt(DateUtil.getNowTime());
// sweetRemindVo.setPerformancesId(performancesId);
// sweetRemindVo.setUnionId(unionId);
// sweetRemindVo.setOpenId(openId);
//
// if (null != performanceInfo) {
// sweetRemindVo.setFieldName(performanceInfo.getFieldName());
// sweetRemindVo.setTitle(performanceInfo.getTitle());
// sweetRemindVo.setTimeStart(performanceInfo.getTimeStart());
// sweetRemindVo.setSellTime(performanceInfo.getSellTime());
// }
// redisUtil.set(redisKey, sweetRemindVo);
// }
// 小程序演出提醒
public void setSweetRemind(String openId, String unionId, String performancesId, KylinPerformanceVo performanceInfo) {
String redisKey = SweetConstant.REDIS_KEY_SWEET_REMIND.concat(unionId);
SweetRemindVo sweetRemindVo = SweetRemindVo.getNew();
sweetRemindVo.setCreatedAt(DateUtil.getNowTime());
sweetRemindVo.setPerformancesId(performancesId);
sweetRemindVo.setUnionId(unionId);
sweetRemindVo.setOpenId(openId);
if (null != performanceInfo) {
sweetRemindVo.setFieldName(performanceInfo.getFieldName());
sweetRemindVo.setTitle(performanceInfo.getTitle());
sweetRemindVo.setTimeStart(performanceInfo.getTimeStart());
sweetRemindVo.setSellTime(performanceInfo.getSellTime());
}
redisUtil.set(redisKey, sweetRemindVo);
}
}
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