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

Commit 9592b46d authored by jiangxiulong's avatar jiangxiulong

快递修改

parent 7b5068c4
...@@ -67,11 +67,11 @@ ...@@ -67,11 +67,11 @@
}, },
{ {
field: 'total1', field: 'total1',
title: '待发货' title: '已下单'
}, },
{ {
field: 'total2', field: 'total2',
title: '已发货' title: '已揽收'
}, },
{ {
field: 'total3', field: 'total3',
......
...@@ -84,6 +84,12 @@ public class PerformancesExpressServiceImpl extends ServiceImpl<KylinOrderExpres ...@@ -84,6 +84,12 @@ public class PerformancesExpressServiceImpl extends ServiceImpl<KylinOrderExpres
@Autowired @Autowired
private KylinOrderExpressRouteMapper kylinOrderExpressRouteMapper; private KylinOrderExpressRouteMapper kylinOrderExpressRouteMapper;
@Autowired
private KylinOrderExpressPerformancesMapper kylinOrderExpressPerformancesMapper;
@Autowired
private KylinOrderTicketRelationsMapper kylinOrderTicketRelationsMapper;
@Autowired @Autowired
private DataUtils dataUtils; private DataUtils dataUtils;
...@@ -97,9 +103,6 @@ public class PerformancesExpressServiceImpl extends ServiceImpl<KylinOrderExpres ...@@ -97,9 +103,6 @@ public class PerformancesExpressServiceImpl extends ServiceImpl<KylinOrderExpres
PerformanceExpressPerformanceListAdminDao countInfo = performancesMapper.countExpressNumber(info.getPerformancesId()); PerformanceExpressPerformanceListAdminDao countInfo = performancesMapper.countExpressNumber(info.getPerformancesId());
if (null != countInfo) { if (null != countInfo) {
info.setTotalNumber(countInfo.getTotalNumber()); info.setTotalNumber(countInfo.getTotalNumber());
info.setTotal1(countInfo.getTotal1());
info.setTotal2(countInfo.getTotal2());
info.setTotal3(countInfo.getTotal3());
} }
} }
} }
...@@ -191,9 +194,42 @@ public class PerformancesExpressServiceImpl extends ServiceImpl<KylinOrderExpres ...@@ -191,9 +194,42 @@ public class PerformancesExpressServiceImpl extends ServiceImpl<KylinOrderExpres
kylinOrderExpress.setRemark((String) hashMapResult.get("remark")); kylinOrderExpress.setRemark((String) hashMapResult.get("remark"));
kylinOrderExpress.setOrigincode((String) hashMapResult.get("origincode")); kylinOrderExpress.setOrigincode((String) hashMapResult.get("origincode"));
kylinOrderExpress.setDestcode((String) hashMapResult.get("destcode")); kylinOrderExpress.setDestcode((String) hashMapResult.get("destcode"));
kylinOrderExpress.setPrintIcon((String) hashMapResult.get("printIcon"));
kylinOrderExpress.setPrintFlag((String) hashMapResult.get("printFlag"));
kylinOrderExpress.setTwoDimensionCode((String) hashMapResult.get("twoDimensionCode")); kylinOrderExpress.setTwoDimensionCode((String) hashMapResult.get("twoDimensionCode"));
kylinOrderExpress.setReturn_tracking_no((String) hashMapResult.get("return_tracking_no"));
kylinOrderExpress.setSourceTransferCode((String) hashMapResult.get("sourceTransferCode"));
kylinOrderExpress.setSourceCityCode((String) hashMapResult.get("sourceCityCode"));
kylinOrderExpress.setSourceDeptCode((String) hashMapResult.get("sourceDeptCode"));
kylinOrderExpress.setSourceTeamCode((String) hashMapResult.get("sourceTeamCode"));
kylinOrderExpress.setDestCityCode((String) hashMapResult.get("destCityCode"));
kylinOrderExpress.setDestDeptCode((String) hashMapResult.get("destDeptCode"));
kylinOrderExpress.setDestDeptCodeMapping((String) hashMapResult.get("destDeptCodeMapping"));
kylinOrderExpress.setDestTeamCode((String) hashMapResult.get("destTeamCode"));
kylinOrderExpress.setDestTeamCodeMapping((String) hashMapResult.get("destTeamCodeMapping"));
kylinOrderExpress.setDestTransferCode((String) hashMapResult.get("destTransferCode"));
kylinOrderExpress.setDestRouteLabel((String) hashMapResult.get("destRouteLabel"));
kylinOrderExpress.setProName((String) hashMapResult.get("proName"));
kylinOrderExpress.setCargoTypeCode((String) hashMapResult.get("cargoTypeCode"));
kylinOrderExpress.setLimitTypeCode((String) hashMapResult.get("limitTypeCode"));
kylinOrderExpress.setExpressTypeCode((String) hashMapResult.get("expressTypeCode"));
kylinOrderExpress.setCodingMapping((String) hashMapResult.get("codingMapping"));
kylinOrderExpress.setCodingMappingOut((String) hashMapResult.get("codingMappingOut"));
kylinOrderExpress.setXbFlag((String) hashMapResult.get("xbFlag"));
kylinOrderExpress.setPrintFlag((String) hashMapResult.get("printFlag"));
kylinOrderExpress.setProCode((String) hashMapResult.get("proCode"));
kylinOrderExpress.setPrintIcon((String) hashMapResult.get("printIcon"));
kylinOrderExpress.setAbFlag((String) hashMapResult.get("abFlag"));
kylinOrderExpress.setDestPortCode((String) hashMapResult.get("destPortCode"));
kylinOrderExpress.setDestPortCode((String) hashMapResult.get("destPortCode"));
kylinOrderExpress.setDestCountry((String) hashMapResult.get("destCountry"));
kylinOrderExpress.setDestPostCode((String) hashMapResult.get("destPostCode"));
kylinOrderExpress.setGoodsValueTotal((String) hashMapResult.get("goodsValueTotal"));
kylinOrderExpress.setCurrencySymbol((String) hashMapResult.get("currencySymbol"));
kylinOrderExpress.setGoodsNumber((String) hashMapResult.get("goodsNumber"));
kylinOrderExpress.setTwoDimensionCode2((String) hashMapResult.get("twoDimensionCode2"));
kylinOrderExpress.setNewIcon((String) hashMapResult.get("newIcon"));
kylinOrderExpress.setNewAbflag((String) hashMapResult.get("newAbflag"));
kylinOrderExpress.setUpdatedAt(DateUtil.getNowTime()); kylinOrderExpress.setUpdatedAt(DateUtil.getNowTime());
kylinOrderExpressMapper.update( kylinOrderExpressMapper.update(
kylinOrderExpress kylinOrderExpress
...@@ -205,6 +241,24 @@ public class PerformancesExpressServiceImpl extends ServiceImpl<KylinOrderExpres ...@@ -205,6 +241,24 @@ public class PerformancesExpressServiceImpl extends ServiceImpl<KylinOrderExpres
kylinOrderExpressVo.setMailno(kylinOrderExpress.getMailno()); kylinOrderExpressVo.setMailno(kylinOrderExpress.getMailno());
kylinOrderExpressVo.setExpressStatus(kylinOrderExpress.getExpressStatus()); kylinOrderExpressVo.setExpressStatus(kylinOrderExpress.getExpressStatus());
dataUtils.setOrderExpressInfo(orderTicketsId, kylinOrderExpressVo); dataUtils.setOrderExpressInfo(orderTicketsId, kylinOrderExpressVo);
// 记录演出数量
KylinOrderTicketRelations relationsInfo = kylinOrderTicketRelationsMapper.selectOne(new QueryWrapper<KylinOrderTicketRelations>().eq("order_tickets_id", orderTicketsId));
KylinOrderExpressPerformances expressPerformances = kylinOrderExpressPerformancesMapper.selectOne(new QueryWrapper<KylinOrderExpressPerformances>().eq("performances_id", relationsInfo.getPerformanceId()));
KylinOrderExpressPerformances kylinOrderExpressPerformances = new KylinOrderExpressPerformances();
if (null == expressPerformances) {
String orderExpressPerformancesId = IDGenerator.nextSnowId();
kylinOrderExpressPerformances.setOrderExpressPerformancesId(orderExpressPerformancesId);
kylinOrderExpressPerformances.setPerformancesId(relationsInfo.getPerformanceId());
kylinOrderExpressPerformances.setTotal1(1);
kylinOrderExpressPerformances.setCreatedAt(DateUtil.getNowTime());
kylinOrderExpressPerformancesMapper.insert(kylinOrderExpressPerformances);
} else {
kylinOrderExpressPerformances.setTotal1(expressPerformances.getTotal1() + 1);
kylinOrderExpressPerformances.setUpdatedAt(DateUtil.getNowTime());
kylinOrderExpressPerformancesMapper.update(kylinOrderExpressPerformances,
new QueryWrapper<KylinOrderExpressPerformances>().eq("performances_id", relationsInfo.getPerformanceId()));
}
} }
} }
return ResponseDto.success(); return ResponseDto.success();
...@@ -240,6 +294,16 @@ public class PerformancesExpressServiceImpl extends ServiceImpl<KylinOrderExpres ...@@ -240,6 +294,16 @@ public class PerformancesExpressServiceImpl extends ServiceImpl<KylinOrderExpres
dataUtils.delOrderExpressInfo(orderTicketsId); dataUtils.delOrderExpressInfo(orderTicketsId);
mongoTemplate.remove(Query.query(Criteria.where("orderTicketsId").is(orderTicketsId)), KylinOrderExpressRouteVo.class.getSimpleName()); mongoTemplate.remove(Query.query(Criteria.where("orderTicketsId").is(orderTicketsId)), KylinOrderExpressRouteVo.class.getSimpleName());
// 记录演出数量
KylinOrderTicketRelations relationsInfo = kylinOrderTicketRelationsMapper.selectOne(new QueryWrapper<KylinOrderTicketRelations>().eq("order_tickets_id", orderTicketsId));
KylinOrderExpressPerformances expressPerformances = kylinOrderExpressPerformancesMapper.selectOne(new QueryWrapper<KylinOrderExpressPerformances>().eq("performances_id", relationsInfo.getPerformanceId()));
KylinOrderExpressPerformances kylinOrderExpressPerformances = new KylinOrderExpressPerformances();
if (null == expressPerformances) {
kylinOrderExpressPerformances.setTotal1(expressPerformances.getTotal1() - 1);
kylinOrderExpressPerformances.setUpdatedAt(DateUtil.getNowTime());
kylinOrderExpressPerformancesMapper.update(kylinOrderExpressPerformances,
new QueryWrapper<KylinOrderExpressPerformances>().eq("performances_id", relationsInfo.getPerformanceId()));
}
} }
} }
} }
...@@ -415,7 +479,7 @@ public class PerformancesExpressServiceImpl extends ServiceImpl<KylinOrderExpres ...@@ -415,7 +479,7 @@ public class PerformancesExpressServiceImpl extends ServiceImpl<KylinOrderExpres
return ResponseDto.success(); return ResponseDto.success();
} }
// @Async // @Async
public void batchPlaceOrder(String performanceId) { public void batchPlaceOrder(String performanceId) {
int count; int count;
int limitNum = 10; int limitNum = 10;
...@@ -438,7 +502,7 @@ public class PerformancesExpressServiceImpl extends ServiceImpl<KylinOrderExpres ...@@ -438,7 +502,7 @@ public class PerformancesExpressServiceImpl extends ServiceImpl<KylinOrderExpres
} while (count >= limitNum); } while (count >= limitNum);
} }
// @Async // @Async
public void batchCancelOrder(String performanceId) { public void batchCancelOrder(String performanceId) {
int count; int count;
int limitNum = 10; int limitNum = 10;
......
...@@ -38,6 +38,37 @@ public class KylinOrderExpress implements Serializable { ...@@ -38,6 +38,37 @@ public class KylinOrderExpress implements Serializable {
private String twoDimensionCode; private String twoDimensionCode;
private String printFlag; private String printFlag;
private String return_tracking_no;
private String sourceTransferCode;
private String sourceCityCode;
private String sourceDeptCode;
private String sourceTeamCode;
private String destCityCode;
private String destDeptCode;
private String destDeptCodeMapping;
private String destTeamCode;
private String destTeamCodeMapping;
private String destTransferCode;
private String destRouteLabel;
private String proName;
private String cargoTypeCode;
private String limitTypeCode;
private String expressTypeCode;
private String codingMapping;
private String codingMappingOut;
private String xbFlag;
private String proCode;
private String abFlag;
private String destPortCode;
private String destCountry;
private String destPostCode;
private String goodsValueTotal;
private String currencySymbol;
private String goodsNumber;
private String twoDimensionCode2;
private String newIcon;
private String newAbflag;
/** /**
* 创建时间 * 创建时间
*/ */
......
package com.liquidnet.service.kylin.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.io.Serializable;
/**
* <p>
* 订单快递演出统计表
* </p>
*
* @author jiangxiulong
* @since 2021-07-06
*/
@Data
@EqualsAndHashCode(callSuper = false)
public class KylinOrderExpressPerformances implements Serializable {
private static final long serialVersionUID = 1L;
@TableId(value = "mid", type = IdType.AUTO)
private Integer mid;
private String orderExpressPerformancesId;
private String performancesId;
private Integer total1; // 订单状态
private Integer total2; // 订单状态
private Integer total3; // 订单状态
/**
* 创建时间
*/
private String createdAt;
/**
* 修改时间
*/
private String updatedAt;
}
package com.liquidnet.service.kylin.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.liquidnet.service.kylin.entity.KylinOrderExpressPerformances;
/**
* <p>
* 订单快递演出统计 Mapper 接口 处理数据库
* </p>
*
* @author jiangxiulong
* @since 2021-07-01
*/
public interface KylinOrderExpressPerformancesMapper extends BaseMapper<KylinOrderExpressPerformances> {
}
...@@ -485,11 +485,18 @@ ...@@ -485,11 +485,18 @@
p.title , p.title ,
p.time_start , p.time_start ,
p.time_end , p.time_end ,
p.created_at p.created_at,
p.created_at,
p.created_at,
oep.total1,
oep.total2,
oep.total3
FROM FROM
kylin_performances AS p kylin_performances AS p
LEFT JOIN kylin_performance_status AS ps ON p.performances_id = ps.performance_id LEFT JOIN kylin_performance_status AS ps ON p.performances_id = ps.performance_id
LEFT JOIN kylin_performance_relations AS pr ON p.performances_id = pr.performance_id LEFT JOIN kylin_performance_relations AS pr ON p.performances_id = pr.performance_id
LEFT JOIN kylin_order_express_performances AS oep ON oep.performances_id = pr.performance_id
<where> <where>
<if test="title!=''"> <if test="title!=''">
AND title LIKE concat('%', #{title}, '%') AND title LIKE concat('%', #{title}, '%')
...@@ -503,17 +510,14 @@ ...@@ -503,17 +510,14 @@
<select id="countExpressNumber" <select id="countExpressNumber"
resultType="com.liquidnet.service.kylin.dao.PerformanceExpressPerformanceListAdminDao"> resultType="com.liquidnet.service.kylin.dao.PerformanceExpressPerformanceListAdminDao">
SELECT SELECT
SUM(CASE WHEN ots.status NOT IN (0, 2, 5) AND ot.get_ticket_type = 'express' THEN 1 ELSE 0 END) total_number, COUNT(*) total_number
SUM(CASE WHEN IFNULL(oer.opcode, -1) &lt; 0 AND IFNULL(ot.order_tickets_id, -1) &gt; 0 THEN 1 ELSE 0 END) total1,
SUM(CASE WHEN oer.opcode &gt; 0 THEN 1 ELSE 0 END) total2,
SUM(CASE WHEN oer.opcode = 80 THEN 1 ELSE 0 END) total3
FROM FROM
kylin_performance_relations AS pr kylin_performance_relations AS pr
LEFT JOIN kylin_order_ticket_relations AS otr ON pr.performance_id = otr.performance_id LEFT JOIN kylin_order_ticket_relations AS otr ON pr.performance_id = otr.performance_id
LEFT JOIN kylin_order_tickets AS ot ON ot.order_tickets_id = otr.order_id LEFT JOIN kylin_order_tickets AS ot ON ot.order_tickets_id = otr.order_id
LEFT JOIN kylin_order_ticket_status AS ots ON ots.order_id = otr.order_id LEFT JOIN kylin_order_ticket_status AS ots ON ots.order_id = otr.order_id
LEFT JOIN (SELECT * FROM kylin_order_express WHERE express_status NOT IN (1, 3)) AS oe ON oe.order_tickets_id = otr.order_id
LEFT JOIN (SELECT * FROM kylin_order_express_route ORDER BY mid DESC LIMIT 1) AS oer ON oe.order_express_id = oer.order_express_id
WHERE pr.performance_id = #{performancesId} WHERE pr.performance_id = #{performancesId}
AND ots.status NOT IN (0, 2, 5)
AND ot.get_ticket_type = 'express'
</select> </select>
</mapper> </mapper>
\ No newline at end of file
...@@ -810,9 +810,41 @@ CREATE TABLE `kylin_order_express` ...@@ -810,9 +810,41 @@ CREATE TABLE `kylin_order_express`
`express_status` tinyint NOT NULL DEFAULT 0 COMMENT '快递状态', `express_status` tinyint NOT NULL DEFAULT 0 COMMENT '快递状态',
`origincode` varchar(255) NOT NULL DEFAULT '' COMMENT '原寄地区域代码 可用于顺丰电子面单标签打印', `origincode` varchar(255) NOT NULL DEFAULT '' COMMENT '原寄地区域代码 可用于顺丰电子面单标签打印',
`destcode` varchar(255) NOT NULL DEFAULT '' COMMENT '目的地区域代码 可用于顺丰电子面单标签打印', `destcode` varchar(255) NOT NULL DEFAULT '' COMMENT '目的地区域代码 可用于顺丰电子面单标签打印',
`print_icon` varchar(255) NOT NULL DEFAULT '' COMMENT '打印图标',
`print_flag` varchar(255) NOT NULL DEFAULT '' COMMENT '打印标志', `return_tracking_no` varchar(30) NOT NULL DEFAULT '' COMMENT '顺丰签回单服务运单号',
`two_dimension_code` varchar(255) NOT NULL DEFAULT '' COMMENT '二维码', `source_transfer_code` varchar(60) NOT NULL DEFAULT '' COMMENT '原寄地中转场',
`source_city_code` varchar(60) NOT NULL DEFAULT '' COMMENT '原寄地城市代码',
`source_dept_code` varchar(60) NOT NULL DEFAULT '' COMMENT '原寄地网点代码',
`source_team_code` varchar(60) NOT NULL DEFAULT '' COMMENT '原寄地单元区域',
`dest_city_code` varchar(60) NOT NULL DEFAULT '' COMMENT '目的地城市代码 eg:755',
`dest_dept_code` varchar(60) NOT NULL DEFAULT '' COMMENT '目的地网点代码 eg:755AQ',
`dest_dept_code_mapping` varchar(60) NOT NULL DEFAULT '' COMMENT '目的地网点代码映射码',
`dest_team_code` varchar(60) NOT NULL DEFAULT '' COMMENT '目的地单元区域 eg:001',
`dest_team_code_mapping` varchar(60) NOT NULL DEFAULT '' COMMENT '目的地单元区域映射码',
`dest_transfer_code` varchar(60) NOT NULL DEFAULT '' COMMENT '目的地中转场',
`dest_route_label` varchar(200) NOT NULL DEFAULT '' COMMENT '路由标签信息',
`pro_name` varchar(60) NOT NULL DEFAULT '' COMMENT '产品名称 对应RLS:pro_name',
`cargo_type_code` varchar(30) NOT NULL DEFAULT '' COMMENT '快件内容 如:C816、SP601',
`limit_type_code` varchar(30) NOT NULL DEFAULT '' COMMENT '时效代码 如:T4',
`express_type_code` varchar(30) NOT NULL DEFAULT '' COMMENT '产品类型 如:B1',
`coding_mapping` varchar(60) NOT NULL DEFAULT '' COMMENT '入港映射码 eg:S10',
`coding_mapping_out` varchar(60) NOT NULL DEFAULT '' COMMENT '出港映射码',
`xb_flag` varchar(30) NOT NULL DEFAULT '' COMMENT 'XB标志 0:不需要打印XB,1:需要打印XB',
`print_flag` varchar(60) NOT NULL DEFAULT '' COMMENT '打印标志',
`two_dimension_code` varchar(600) NOT NULL DEFAULT '' COMMENT '二维码',
`pro_code` varchar(30) NOT NULL DEFAULT '' COMMENT '时效类型 值为二维码中的K4',
`print_icon` varchar(100) NOT NULL DEFAULT '' COMMENT '打印图标',
`ab_flag` varchar(30) NOT NULL DEFAULT '' COMMENT 'AB标',
`dest_port_code` varchar(100) NOT NULL DEFAULT '' COMMENT '目的地口岸代码',
`dest_country` varchar(50) NOT NULL DEFAULT '' COMMENT '目的国别 国别代码如:JP',
`dest_post_code` varchar(100) NOT NULL DEFAULT '' COMMENT '目的地邮编',
`goods_value_total` varchar(30) NOT NULL DEFAULT '' COMMENT '总价值 保留两位小数,数字类型,可补位',
`currency_symbol` varchar(30) NOT NULL DEFAULT '' COMMENT '币种',
`goods_number` varchar(20) NOT NULL DEFAULT '' COMMENT '件数',
`two_dimension_code2` varchar(600) NOT NULL DEFAULT '' COMMENT '签回单二维码 下单时,当选择签回单增值服务时,会回传此字段,规则同“twoDimensionCode”',
`new_icon` varchar(100) NOT NULL DEFAULT '' COMMENT 'ab标扩展',
`new_abflag` varchar(30) NOT NULL DEFAULT '' COMMENT '打印图标扩展',
`created_at` timestamp NULL DEFAULT NULL, `created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL,
KEY `order_express_id_index` (`order_express_id`), KEY `order_express_id_index` (`order_express_id`),
...@@ -874,6 +906,21 @@ CREATE TABLE `kylin_order_express_status` ...@@ -874,6 +906,21 @@ CREATE TABLE `kylin_order_express_status`
PRIMARY KEY (`mid`) PRIMARY KEY (`mid`)
) ENGINE = InnoDB COMMENT '订单快递状态表'; ) ENGINE = InnoDB COMMENT '订单快递状态表';
drop TABLE if exists `kylin_order_express_performances`;
CREATE TABLE `kylin_order_express_performances`
(
`mid` int unsigned NOT NULL AUTO_INCREMENT,
`order_express_performances_id` varchar(255) NOT NULL DEFAULT '' COMMENT 'order_express_performances_id',
`performances_id` varchar(255) NOT NULL DEFAULT '' COMMENT 'performances_id',
`total1` int NOT NULL DEFAULT 0 COMMENT '已下单',
`total2` int NOT NULL DEFAULT 0 COMMENT '已揽收',
`total3` int NOT NULL DEFAULT 0 COMMENT '已签收',
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
KEY `order_express_performances_id_index` (`order_express_performances_id`),
PRIMARY KEY (`mid`)
) ENGINE = InnoDB COMMENT '订单快递演出记录表';
drop TABLE if exists `kylin_order_refund_pic`; drop TABLE if exists `kylin_order_refund_pic`;
CREATE TABLE `kylin_order_refund_pic` CREATE TABLE `kylin_order_refund_pic`
( (
......
...@@ -60,10 +60,13 @@ public class PerformancesExpressCallbackServiceImpl extends ServiceImpl<KylinOrd ...@@ -60,10 +60,13 @@ public class PerformancesExpressCallbackServiceImpl extends ServiceImpl<KylinOrd
private KylinOrderExpressStatusMapper kylinOrderExpressStatusMapper; private KylinOrderExpressStatusMapper kylinOrderExpressStatusMapper;
@Autowired @Autowired
HttpServletRequest httpServletRequest; private KylinOrderExpressPerformancesMapper kylinOrderExpressPerformancesMapper;
@Autowired @Autowired
private RedisUtil redisUtil; private KylinOrderTicketRelationsMapper kylinOrderTicketRelationsMapper;
@Autowired
HttpServletRequest httpServletRequest;
@Autowired @Autowired
private DataUtils dataUtils; private DataUtils dataUtils;
...@@ -154,6 +157,25 @@ public class PerformancesExpressCallbackServiceImpl extends ServiceImpl<KylinOrd ...@@ -154,6 +157,25 @@ public class PerformancesExpressCallbackServiceImpl extends ServiceImpl<KylinOrd
mongoTemplate.insert(kylinOrderExpressRouteVo, KylinOrderExpressRouteVo.class.getSimpleName()); mongoTemplate.insert(kylinOrderExpressRouteVo, KylinOrderExpressRouteVo.class.getSimpleName());
dataUtils.delOrderExpressRoute(orderExpressInfo.getOrderTicketsId()); dataUtils.delOrderExpressRoute(orderExpressInfo.getOrderTicketsId());
// 记录演出数量
if (50 == Integer.valueOf(performanceExpressPushRouteParam.getOpCode()) || 80 == Integer.valueOf(performanceExpressPushRouteParam.getOpCode())) {
KylinOrderTicketRelations relationsInfo = kylinOrderTicketRelationsMapper.selectOne(new QueryWrapper<KylinOrderTicketRelations>().eq("order_tickets_id", orderExpressInfo.getOrderTicketsId()));
KylinOrderExpressPerformances expressPerformances = kylinOrderExpressPerformancesMapper.selectOne(new QueryWrapper<KylinOrderExpressPerformances>().eq("performances_id", relationsInfo.getPerformanceId()));
KylinOrderExpressPerformances kylinOrderExpressPerformances = new KylinOrderExpressPerformances();
if (null == expressPerformances) {
if (50 == Integer.valueOf(performanceExpressPushRouteParam.getOpCode())) {
kylinOrderExpressPerformances.setTotal2(expressPerformances.getTotal2() + 1);
}
if (80 == Integer.valueOf(performanceExpressPushRouteParam.getOpCode())) {
kylinOrderExpressPerformances.setTotal3(expressPerformances.getTotal3() + 1);
}
kylinOrderExpressPerformances.setUpdatedAt(DateUtil.getNowTime());
kylinOrderExpressPerformancesMapper.update(kylinOrderExpressPerformances,
new QueryWrapper<KylinOrderExpressPerformances>().eq("performances_id", relationsInfo.getPerformanceId()));
}
}
return true; return true;
} }
......
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