Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
commit
7d60753f10
|
|
@ -3,6 +3,7 @@ package com.bonus.zlpt.order.mapper;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import com.bonus.zlpt.common.core.domain.order.OrderInfo;
|
import com.bonus.zlpt.common.core.domain.order.OrderInfo;
|
||||||
import com.bonus.zlpt.common.core.domain.order.vo.OrderInfoVo;
|
import com.bonus.zlpt.common.core.domain.order.vo.OrderInfoVo;
|
||||||
|
import com.bonus.zlpt.equip.api.domain.vo.DevInfoVo;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 订单信息Mapper接口
|
* 订单信息Mapper接口
|
||||||
|
|
@ -67,4 +68,6 @@ public interface OrderInfoMapper
|
||||||
public Long selectLastInsertId();
|
public Long selectLastInsertId();
|
||||||
|
|
||||||
public long count(Long userId);
|
public long count(Long userId);
|
||||||
|
|
||||||
|
public DevInfoVo getDevInfoVo(Long maId);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -9,6 +9,7 @@ import com.bonus.zlpt.common.core.domain.order.vo.OrderInfoVo;
|
||||||
import com.bonus.zlpt.common.core.utils.StringUtils;
|
import com.bonus.zlpt.common.core.utils.StringUtils;
|
||||||
import com.bonus.zlpt.common.core.utils.uuid.UUID;
|
import com.bonus.zlpt.common.core.utils.uuid.UUID;
|
||||||
import com.bonus.zlpt.common.security.utils.SecurityUtils;
|
import com.bonus.zlpt.common.security.utils.SecurityUtils;
|
||||||
|
import com.bonus.zlpt.equip.api.domain.vo.DevInfoVo;
|
||||||
import com.bonus.zlpt.order.mapper.OrderDetailsMapper;
|
import com.bonus.zlpt.order.mapper.OrderDetailsMapper;
|
||||||
import com.bonus.zlpt.system.api.model.LoginUser;
|
import com.bonus.zlpt.system.api.model.LoginUser;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
|
@ -71,6 +72,8 @@ public class OrderInfoServiceImpl implements IOrderInfoService
|
||||||
orderInfo.setOrderUser(SecurityUtils.getUserId());
|
orderInfo.setOrderUser(SecurityUtils.getUserId());
|
||||||
orderInfo.setCode(UUID.randomUUID().toString());
|
orderInfo.setCode(UUID.randomUUID().toString());
|
||||||
orderInfo.setTime(dateFormat.format(new Date()));
|
orderInfo.setTime(dateFormat.format(new Date()));
|
||||||
|
DevInfoVo devInfoVo = orderInfoMapper.getDevInfoVo(orderInfo.getMaId());
|
||||||
|
orderInfo.setSupplier(String.valueOf(devInfoVo.getOwnCo()));
|
||||||
orderInfoMapper.insertOrderInfo(orderInfo);
|
orderInfoMapper.insertOrderInfo(orderInfo);
|
||||||
Long orderId = orderInfoMapper.selectLastInsertId();
|
Long orderId = orderInfoMapper.selectLastInsertId();
|
||||||
orderInfo.setOrderId(orderId);
|
orderInfo.setOrderId(orderId);
|
||||||
|
|
|
||||||
|
|
@ -203,4 +203,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<select id="count" parameterType="Long" resultType="Long">
|
<select id="count" parameterType="Long" resultType="Long">
|
||||||
SELECT count(*) from ma_order_info where order_user = #{userId}
|
SELECT count(*) from ma_order_info where order_user = #{userId}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<select id="getDevInfoVo" resultType="com.bonus.zlpt.equip.api.domain.vo.DevInfoVo">
|
||||||
|
select d.*
|
||||||
|
from ma_dev_info d
|
||||||
|
where d.ma_id = #{maId}
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
Loading…
Reference in New Issue