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

Commit fe35c01a authored by 胡佳晨's avatar 胡佳晨

添加 配置退票阶梯的 param

增加 查询未处理订单数量接口
将kylin的设置退票相关redis方法迁移到admin 并增加响应的获取
增加 设置/获取 退票阶梯接口
增加 设置/获取 退票注意事项接口
parent ac0d256a
......@@ -15,7 +15,7 @@ import java.math.BigDecimal;
*/
@Data
public class OrderRefundPoundage implements Cloneable {
@ApiModelProperty(value = "日期")
@ApiModelProperty(value = "日期 yyyy-MM-dd HH:mm:ss")
private String day;
@ApiModelProperty(value = "距离演出开始日期>15天")
private String content;
......
package com.liquidnet.service.kylin.dto.vo.admin;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.math.BigDecimal;
import java.util.List;
/**
* <p>
* 退款手续费说明
* </p>
*
* @author jiangxiulong
* @since 2021-10-13
*/
@Data
public class OrderRefundPoundageF implements Cloneable {
@ApiModelProperty(value = "演出id")
private String performanceId;
@ApiModelProperty(value = "阶梯退款数据")
private List<OrderRefundPoundage> orderRefundPoundage;
private static final OrderRefundPoundageF obj = new OrderRefundPoundageF();
public static OrderRefundPoundageF getNew() {
try {
return (OrderRefundPoundageF) obj.clone();
} catch (CloneNotSupportedException e) {
return new OrderRefundPoundageF();
}
}
}
......@@ -11,6 +11,7 @@ import com.liquidnet.service.kylin.dto.vo.partner.KylinPerformanceMisVo;
import com.liquidnet.service.kylin.entity.KylinOrderImport;
import com.liquidnet.service.kylin.entity.KylinPerformances;
import java.util.ArrayList;
import java.util.List;
/**
......@@ -28,6 +29,7 @@ public interface IKylinPerformancesAdminService {
/**
* 同步演出 到票务平台
*
* @param performanceId 演出id
* @return 结果
*/
......@@ -35,6 +37,7 @@ public interface IKylinPerformancesAdminService {
/**
* 同步订单 到票务平台
*
* @param performanceId 演出id
* @return 结果
*/
......@@ -80,7 +83,7 @@ public interface IKylinPerformancesAdminService {
* @param status 演出状态
* @return 20个 sql 数据
*/
List<PerformanceTitleDao> getListByStatus(String status,String title);
List<PerformanceTitleDao> getListByStatus(String status, String title);
/**
* 根据演出状态 查询演出列表 演出全量场次票
......@@ -94,7 +97,7 @@ public interface IKylinPerformancesAdminService {
* 根据(演出\场次\票种)ID 查询演出、场次、票种信息
*
* @param scope ID所属字段
* @param id ID值
* @param id ID值
* @return 1条记录(包括演出名称、场次名称?、票种名称?及对于ID)
*/
PerformanceSimpleAllDao getSimpleDetailByScopeAndId(String scope, String id);
......@@ -123,7 +126,7 @@ public interface IKylinPerformancesAdminService {
* @param performancesId 相关参数
* @return boolean
*/
boolean setRecommend(String performancesId,Integer isRecommend);
boolean setRecommend(String performancesId, Integer isRecommend);
/**
* 设置 演出推荐 关联
......@@ -131,7 +134,7 @@ public interface IKylinPerformancesAdminService {
* @param performancesId 相关参数
* @return boolean
*/
Integer setIsShow(String performancesId,Integer isShow);
Integer setIsShow(String performancesId, Integer isShow);
/**
* 查询 推荐演出列表
......@@ -193,41 +196,79 @@ public interface IKylinPerformancesAdminService {
/**
* 修改 当前票种是否关联分销
*
* @param ticketId 票务id
* @param status 0 否 1 是
* @param status 0 否 1 是
* @return
*/
boolean changeTicketAgent(String performancesId,String ticketId, Integer status);
boolean changeTicketAgent(String performancesId, String ticketId, Integer status);
/**
* 修改 当前票种支付文案
*
* @param ticketId 票务id
* @param payTxt 支付文案
* @param payTxt 支付文案
* @return
*/
boolean changeTicketPayTxt(String performancesId,String ticketId, String payTxt);
boolean changeTicketPayTxt(String performancesId, String ticketId, String payTxt);
/**
* 修改 演出&票种&是否同步到大麦
*
* @return
*/
boolean changeSysDamai(List<SysDamaiParam> params);
/**
* 获取 演出退款配置
*
* @param performanceId
* @return
*/
PerformanceRefundConfigVo getRefundConfig(String performanceId);
/**
* 配置 注意事项
*
* @param performanceId
* @return
*/
String setPoundageExplain(String explain, String performanceId);
/**
* 获取 注意事项
*
* @param performanceId
* @return
*/
String getPoundageExplain(String performanceId);
/**
* 配置 注意事项
*
* @param performanceId
* @return
*/
String setRefundPoundageAll(List<OrderRefundPoundage> orderRefundPoundageArrayList, String performanceId);
/**
* 获取 注意事项
*
* @param performanceId
* @return
*/
ArrayList<OrderRefundPoundage> getRefundPoundageAll(String performanceId);
/**
* 修改 演出退款配置
*
* @return
*/
String changeRefundConfig(String performancesId,
Integer isCanRefund,
String refundOpenTime,
String refundCloseTime,
Integer isCanRefund,
String refundOpenTime,
String refundCloseTime,
Integer isRefundPoundage,
Integer isRefundVoucher,
Integer isRefundExpress,
......@@ -236,6 +277,7 @@ public interface IKylinPerformancesAdminService {
/**
* 获取 演出转赠配置
*
* @param performanceId
* @return
*/
......@@ -243,6 +285,7 @@ public interface IKylinPerformancesAdminService {
/**
* 获取 演出转赠配置
*
* @param performanceId
* @return
*/
......@@ -250,12 +293,13 @@ public interface IKylinPerformancesAdminService {
/**
* 修改 演出转赠配置
*
* @return
*/
String changeTransferConfig(String performancesId,
Integer isCanRefund,
String refundOpenTime,
String refundCloseTime);
Integer isCanRefund,
String refundOpenTime,
String refundCloseTime);
KylinPerformanceAgentVo getPerformanceAgent(String performancesId);
......
......@@ -10,6 +10,7 @@ import com.liquidnet.client.admin.common.enums.BusinessType;
import com.liquidnet.client.admin.zhengzai.kylin.dto.KylinOrderImportDto;
import com.liquidnet.client.admin.zhengzai.kylin.dto.PerformanceOrderStatisCountResp;
import com.liquidnet.commons.lang.util.JsonUtils;
import com.liquidnet.service.goblin.param.GoblinFrontCubeParam;
import com.liquidnet.service.kylin.dao.PerformanceAdminListDao;
import com.liquidnet.service.kylin.dao.PerformanceMemberAuditDao;
import com.liquidnet.service.kylin.dao.PerformanceOrderStatisticalDao;
......@@ -21,12 +22,14 @@ import com.liquidnet.service.kylin.dto.vo.partner.KylinPerformanceMisVo;
import com.liquidnet.service.kylin.entity.KylinOrderImport;
import com.liquidnet.service.kylin.service.admin.IKylinPerformancesAdminService;
import com.liquidnet.service.kylin.service.other.DamaiService;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.*;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;
......@@ -117,7 +120,7 @@ public class KylinPerformancesController extends BaseController {
return toAjax(kylinPerformancesService.setIsShow(performancesId, isShow));
}
// @Log(title = "演出列表", businessType = BusinessType.DETAIL)
// @Log(title = "演出列表", businessType = BusinessType.DETAIL)
//@RequiresPermissions("kylin:performances:view")
@GetMapping(value = "/memberInfo/{performancesId}")
public String memberInfo(@PathVariable("performancesId") String performancesId, ModelMap mmap) {
......@@ -135,7 +138,7 @@ public class KylinPerformancesController extends BaseController {
return toAjax(result);
}
// @Log(title = "演出列表-演出数据", businessType = BusinessType.LIST)
// @Log(title = "演出列表-演出数据", businessType = BusinessType.LIST)
//@RequiresPermissions("kylin:performances:view")
@GetMapping(value = "/performanceStatic/{performancesId}")
public String performanceStatic(@PathVariable("performancesId") String performancesId, ModelMap mmap) {
......@@ -229,6 +232,46 @@ public class KylinPerformancesController extends BaseController {
return prefix + "/refundConfig";
}
//
@PostMapping(value = "/refundConfig/explain") //todo 阶梯退票
@ApiOperation(value = "设置注意事项")
@ResponseBody
public AjaxResult setPoundageExplain(@RequestParam("explain") String explain,
@RequestParam("performancesId") String performancesId) {
String result = kylinPerformancesService.setPoundageExplain(explain, performancesId);
return AjaxResult.success(result);
}
@GetMapping(value = "/refundConfig/explain") //todo 阶梯退票
@ApiOperation(value = "获取注意事项")
@ResponseBody
public AjaxResult getPoundageExplain(@RequestParam("performancesId") String performancesId) {
String result = kylinPerformancesService.getPoundageExplain(performancesId);
return AjaxResult.success(result);
}
//阶梯退票
@GetMapping(value = "/refundConfig/poundage") //todo 阶梯退票
@ApiOperation(value = "获取阶梯退票")
@ResponseBody
public AjaxResult getRefundPoundageAll(@RequestParam("performancesId") String performancesId) {
ArrayList<OrderRefundPoundage> result = kylinPerformancesService.getRefundPoundageAll(performancesId);
return AjaxResult.success(result);
}
//
@PostMapping(value = "/refundConfig/poundage") //todo 阶梯退票
@ApiOperation(value = "设置阶梯退票")
@ResponseBody
public AjaxResult setRefundPoundageAll(@RequestBody OrderRefundPoundageF param) {
String result = kylinPerformancesService.setRefundPoundageAll(param.getOrderRefundPoundage(), param.getPerformanceId());
if (null != result && result.equals("操作成功")) {
return AjaxResult.success(result);
} else {
return AjaxResult.error(result);
}
}
//@RequiresPermissions("kylin:performances:view")
@PostMapping(value = "/refundConfig/change")
@ResponseBody
......
......@@ -45,6 +45,7 @@ import org.springframework.data.mongodb.core.query.Criteria;
import org.springframework.data.mongodb.core.query.Query;
import org.springframework.stereotype.Service;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
import java.util.ArrayList;
......@@ -53,6 +54,8 @@ import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
import static com.liquidnet.commons.lang.util.DateUtil.DTF_YMD_HMS;
/**
* <p>
* 演出 服务实现类
......@@ -91,6 +94,8 @@ public class KylinPerformancesAdminServiceImpl extends ServiceImpl<KylinPerforma
ISlimeAuthorizationRecordsAdminService merchantAuthorizationRecordsAdminService;
@Autowired
InnerService innerService;
@Autowired
private KylinOrderRefundsMapper kylinOrderRefundsMapper;
@Autowired
SmileRedisUtils smileRedisUtils;
......@@ -754,6 +759,53 @@ public class KylinPerformancesAdminServiceImpl extends ServiceImpl<KylinPerforma
return vo;
}
@Override
public String setPoundageExplain(String explain, String performanceId) {
dataUtils.setRefundPoundageExplain(explain, performanceId);
return explain;
}
@Override
public String getPoundageExplain(String performanceId) {
return dataUtils.getRefundPoundageExplain(performanceId);
}
@Override
public String setRefundPoundageAll(List<OrderRefundPoundage> orderRefundPoundageArrayList, String performanceId) {
if (orderRefundPoundageArrayList.size() > 10) {
return "阶梯不能大于10";
}
PerformanceRefundConfigVo configVo = getRefundConfig(performanceId);
if (configVo.getIsCanRefund() == 1) {
return "请先关闭退款再进行操作";
}
int count = kylinOrderRefundsMapper.selectingCount(performanceId);
if (count > 0) {
return "请先处理该演出待退款订单再进行操作";
}
LocalDateTime nextTime = LocalDateTime.parse("2001-01-01 12:00:00", DTF_YMD_HMS);
for (OrderRefundPoundage item : orderRefundPoundageArrayList) {
if (item.getPresent().compareTo(BigDecimal.ONE) > 0) {
return "手续费不能大于100%";
}
LocalDateTime curTime = LocalDateTime.parse(item.getDay(), DTF_YMD_HMS);
if (curTime.isBefore(nextTime)) {
return "当前阶梯时间不能早于前一个阶梯";
}
nextTime = curTime;
}
dataUtils.setRefundPoundage(orderRefundPoundageArrayList, performanceId);
return "操作成功";
}
@Override
public ArrayList<OrderRefundPoundage> getRefundPoundageAll(String performanceId) {
return dataUtils.getRefundPoundage(performanceId);
}
@Override
public PerformanceTransferConfigVo getTransferConfig(String performanceId) {
KylinPerformances kylinPerformances = performancesMapper.selectOne(new UpdateWrapper<KylinPerformances>().eq("performances_id", performanceId));
......
......@@ -7,6 +7,7 @@ import com.liquidnet.commons.lang.util.CollectionUtil;
import com.liquidnet.service.kylin.constant.KylinRedisConst;
import com.liquidnet.service.kylin.dto.vo.KylinExpressModuleVo;
import com.liquidnet.service.kylin.dto.vo.admin.OrderRefundAddress;
import com.liquidnet.service.kylin.dto.vo.admin.OrderRefundPoundage;
import com.liquidnet.service.kylin.dto.vo.express.KylinOrderExpressVo;
import com.liquidnet.service.kylin.dto.vo.mongo.KylinOrderTicketEntitiesVo;
import com.liquidnet.service.kylin.dto.vo.mongo.KylinOrderTicketVo;
......@@ -24,6 +25,7 @@ import org.springframework.stereotype.Component;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.util.ArrayList;
import java.util.List;
@Component
......@@ -274,8 +276,8 @@ public class DataUtils {
public void changeBuyInfo(String userId, String idCard, String performanceId, String ticketId, int buyCount) {
String redisKeyUid;
String redisKeyIdCard;
String performanceIdKeyIdCard="";
String ticketIdKeyIdCard="";
String performanceIdKeyIdCard = "";
String ticketIdKeyIdCard = "";
int isTrueName = getPerformanceIsTrueName(performanceId);
......@@ -499,36 +501,84 @@ public class DataUtils {
public String getTicketPayTxt(String ticketId) {
String rdsKey = KylinRedisConst.TICKET_PAY_TXT.concat(ticketId);
Object obj = redisDataSourceUtil.getRedisKylinUtil().get(rdsKey);
if(obj==null){
if (obj == null) {
return "";
}else{
} else {
return (String) obj;
}
}
//删除 订单Ar激活码
public void delOrderArCode(String orderId){
public void delOrderArCode(String orderId) {
String rdk = KylinRedisConst.ORDER_AR_CODE.concat(orderId);
redisDataSourceUtil.getRedisKylinUtil().del(rdk);
}
//添加 订单Ar激活码
public void addOrderArCode(String orderId,String arCode){
public void addOrderArCode(String orderId, String arCode) {
String rdk = KylinRedisConst.ORDER_AR_CODE.concat(orderId);
List<String> data = getOrderArCode(orderId);
data.add(arCode);
redisDataSourceUtil.getRedisKylinUtil().set(rdk,data);
redisDataSourceUtil.getRedisKylinUtil().set(rdk, data);
}
//获取 订单Ar激活码
public List<String> getOrderArCode(String orderId){
public List<String> getOrderArCode(String orderId) {
String rdk = KylinRedisConst.ORDER_AR_CODE.concat(orderId);
Object obj = redisDataSourceUtil.getRedisKylinUtil().get(rdk);
if(obj==null){
Object obj = redisDataSourceUtil.getRedisKylinUtil().get(rdk);
if (obj == null) {
return CollectionUtil.arrayListString();
}else{
} else {
return (List<String>) obj;
}
}
/**
* //todo 阶梯退票
* 设置 注意事项
*
* @param explain 注意事项
* @param performanceId 演出id
*/
public void setRefundPoundageExplain(String explain, String performanceId) {
redisDataSourceUtil.getRedisKylinUtil().set(KylinRedisConst.ORDER_REFUND_POUNDAGE_EXPLAIN.concat(":").concat(performanceId), explain);
}
/**
* //todo 阶梯退票
* 获取 注意事项
*
* @param performanceId 演出id
*/
public String getRefundPoundageExplain(String performanceId) {
Object obj = redisDataSourceUtil.getRedisKylinUtil().get(KylinRedisConst.ORDER_REFUND_POUNDAGE_EXPLAIN.concat(":").concat(performanceId));
if (null == obj) {
return "";
} else {
return (String) obj;
}
}
/**
* //todo 阶梯退票
* 设置手续费
*
* @param orderRefundPoundageArrayList 手续费数据集合
* @param performanceId 演出id
*/
public void setRefundPoundage(List<OrderRefundPoundage> orderRefundPoundageArrayList, String performanceId) {
redisDataSourceUtil.getRedisKylinUtil().set(KylinRedisConst.ORDER_REFUND_POUNDAGE.concat(":").concat(performanceId), orderRefundPoundageArrayList);
}
// 获取手续费
public ArrayList<OrderRefundPoundage> getRefundPoundage(String performanceId) {
ArrayList<OrderRefundPoundage> orderRefundPoundageArrayList = new ArrayList<>();
Object obj = redisDataSourceUtil.getRedisKylinUtil().get(KylinRedisConst.ORDER_REFUND_POUNDAGE.concat(":").concat(performanceId));
if (obj == null) {
return orderRefundPoundageArrayList;
} else {
return (ArrayList<OrderRefundPoundage>) obj;
}
}
}
......@@ -28,7 +28,7 @@ public interface KylinOrderRefundsMapper extends BaseMapper<KylinOrderRefunds> {
double refundedTotalPrice(String orderTicketsId);
List<OrderRefundDao> misRefundList(Map<String,Object> map);
List<OrderRefundDao> misRefundList(Map<String, Object> map);
int selectRefundingCount(
@Param("orderTicketsId") String orderTicketsId,
......@@ -47,4 +47,7 @@ public interface KylinOrderRefundsMapper extends BaseMapper<KylinOrderRefunds> {
@Param("orderRefundsId") String orderRefundsId,
@Param("entitiesId") String entitiesId
);
//查询正在进行的订单 TODO 阶梯退票
int selectingCount(@Param("performanceId") String performanceId);
}
......@@ -33,7 +33,8 @@
<result column="price" property="price"/>
<result column="created_at" property="createdAt"/>
</resultMap>
<select id="misRefundList1" resultType="com.liquidnet.service.kylin.dao.OrderRefundDao" resultMap="misRefundListResult">
<select id="misRefundList1" resultType="com.liquidnet.service.kylin.dao.OrderRefundDao"
resultMap="misRefundListResult">
SELECT a.*, b.order_code, b.performance_title, d.mailno
FROM kylin_order_refunds AS a
JOIN kylin_order_tickets AS b ON a.order_tickets_id = b.order_tickets_id
......@@ -79,7 +80,8 @@
ORDER BY a.mid DESC
</select>
<select id="misRefundList" resultType="com.liquidnet.service.kylin.dao.OrderRefundDao" resultMap="misRefundListResult">
<select id="misRefundList" resultType="com.liquidnet.service.kylin.dao.OrderRefundDao"
resultMap="misRefundListResult">
select t.*, b.order_code, b.performance_title, b.get_ticket_type from
(select a.*, d.mailno, d.send_express_type,d.remark,d.express_status
from kylin_order_refunds a
......@@ -182,4 +184,13 @@
AND b.order_ticket_entities_id = #{entitiesId}
</where>
</select>
<select id="selectingCount" resultType="java.lang.Integer">
SELECT COUNT(0)
FROM kylin_order_refunds AS a
INNER JOIN kylin_order_ticket_relations AS b ON a.order_tickets_id = b.order_id
WHERE (status = 0 OR status = 1 OR status = 7 OR status = 3)
AND b.performance_id = #{performanceId}
</select>
</mapper>
......@@ -1106,17 +1106,6 @@ public class DataUtils {
}
}
/**
* //todo 阶梯退票
* 设置手续费
*
* @param orderRefundPoundageArrayList 手续费数据集合
* @param performanceId 演出id
*/
public void setRefundPoundage(ArrayList<OrderRefundPoundage> orderRefundPoundageArrayList, String performanceId) {
redisUtil.set(KylinRedisConst.ORDER_REFUND_POUNDAGE.concat(":").concat(performanceId), orderRefundPoundageArrayList);
}
// 获取手续费ALL说明
public OrderRefundPoundageAll getRefundPoundageAll(Integer isRefundPoundage, String performanceId) {
ArrayList<OrderRefundPoundage> refundPoundage = getRefundPoundage(isRefundPoundage, performanceId);
......@@ -1134,17 +1123,6 @@ public class DataUtils {
return aNew;
}
/**
* //todo 阶梯退票
* 设置 注意事项
*
* @param explain 注意事项
* @param performanceId 演出id
*/
public void setRefundPoundageAll(String explain, String performanceId) {
redisUtil.set(KylinRedisConst.ORDER_REFUND_POUNDAGE_EXPLAIN.concat(":").concat(performanceId), explain);
}
// 获取订单券的使用情况
public ArrayList<KylinOrderCoupons> getOrderCoupon(String orderId) {
String redisKey = KylinRedisConst.ORDER_COUPON.concat(orderId);
......
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