| | |
| | | import com.yeshi.fanli.dao.mybatis.msg.MsgOrderDetailMapper;
|
| | | import com.yeshi.fanli.entity.bus.msg.MsgExtra;
|
| | | import com.yeshi.fanli.entity.bus.msg.MsgOrderDetail;
|
| | | import com.yeshi.fanli.entity.bus.msg.MsgOrderDetail.MsgTypeOrderTypeEnum;
|
| | | import com.yeshi.fanli.entity.order.CommonOrder;
|
| | | import com.yeshi.fanli.exception.msg.MsgOrderDetailException;
|
| | | import com.yeshi.fanli.service.inter.msg.MsgExtraService;
|
| | |
| | | if (detail.getOrderId() == null || detail.getType() == null || detail.getUser() == null
|
| | | || StringUtil.isNullOrEmpty(detail.getExtraInfo()))
|
| | | throw new MsgOrderDetailException(2, "消息不完整");
|
| | | |
| | | if (detail.getType() == MsgTypeOrderTypeEnum.businessRunning) {
|
| | | MsgOrderDetail msgOrderDetail = msgOrderDetailMapper.getByUniqueKey(detail.getUniquekey());
|
| | | if (msgOrderDetail != null) {
|
| | | return;
|
| | | }
|
| | | }
|
| | | |
| | | |
| | | // 锁住订单号
|
| | | Jedis jedis = jedisPool.getResource();
|
| | | try {
|
| | |
| | | return msgOrderDetailMapper.listByOrderId(orderId);
|
| | | }
|
| | |
|
| | | @Override
|
| | | public MsgOrderDetail selectByPrimaryKey(Long id) {
|
| | | return msgOrderDetailMapper.selectByPrimaryKey(id);
|
| | | }
|
| | | |
| | | @Override
|
| | | public void deleteByPrimaryKey(Long id) {
|
| | | msgOrderDetailMapper.deleteByPrimaryKey(id);
|
| | | msgExtraService.deleteByPidAndType(id, MsgExtra.MSG_TYPE_ORDER);
|
| | | }
|
| | | |
| | | }
|