fix
This commit is contained in:
parent
5b63dd28a1
commit
f504601071
|
|
@ -15,4 +15,13 @@ public class OrderDetailsVo extends OrderDetails {
|
|||
|
||||
/* 装备名称 child */
|
||||
private String deviceName;
|
||||
|
||||
/* 订单编号 */
|
||||
private String code;
|
||||
|
||||
/* 订单时间 */
|
||||
private String orderTime;
|
||||
|
||||
/* 订单状态 */
|
||||
private String orderStatus;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -12,7 +12,6 @@ import com.bonus.zlpt.common.log.annotation.Log;
|
|||
import com.bonus.zlpt.common.log.enums.BusinessType;
|
||||
import com.bonus.zlpt.common.security.annotation.RequiresPermissions;
|
||||
import com.bonus.zlpt.order.feign.EquipClient;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
|
|
@ -73,19 +72,17 @@ public class OrderDetailsController extends BaseController
|
|||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
OrderDetails orderDetails = orderDetailsService.selectOrderDetailsById(id);
|
||||
OrderDetailsVo orderDetails = orderDetailsService.selectOrderDetailsById(id);
|
||||
Map map1 = (Map) equipClient.getInfo(orderDetails.getMaId());
|
||||
Map map2 = (Map) map1.get(DATA_TAG);
|
||||
String typeName = (String) map2.get("typeName");
|
||||
String groupName = (String) map2.get("groupName");
|
||||
String modelName = (String) map2.get("modelName");
|
||||
String deviceName = (String) map2.get("deviceName");
|
||||
OrderDetailsVo orderDetailsVo = new OrderDetailsVo();
|
||||
BeanUtils.copyProperties(orderDetails, orderDetailsVo);
|
||||
orderDetailsVo.setTypeName(typeName);
|
||||
orderDetailsVo.setGroupName(groupName);
|
||||
orderDetailsVo.setDeviceName(modelName+deviceName);
|
||||
return success(orderDetailsVo);
|
||||
orderDetails.setTypeName(typeName);
|
||||
orderDetails.setGroupName(groupName);
|
||||
orderDetails.setDeviceName(modelName+deviceName);
|
||||
return success(orderDetails);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ package com.bonus.zlpt.order.mapper;
|
|||
|
||||
import java.util.List;
|
||||
import com.bonus.zlpt.common.core.domain.order.OrderDetails;
|
||||
import com.bonus.zlpt.common.core.domain.order.vo.OrderDetailsVo;
|
||||
|
||||
/**
|
||||
* 订单详细Mapper接口
|
||||
|
|
@ -17,7 +18,7 @@ public interface OrderDetailsMapper
|
|||
* @param id 订单详细主键
|
||||
* @return 订单详细
|
||||
*/
|
||||
public OrderDetails selectOrderDetailsById(Long id);
|
||||
public OrderDetailsVo selectOrderDetailsById(Long id);
|
||||
|
||||
/**
|
||||
* 查询订单详细列表
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ package com.bonus.zlpt.order.service;
|
|||
|
||||
import java.util.List;
|
||||
import com.bonus.zlpt.common.core.domain.order.OrderDetails;
|
||||
import com.bonus.zlpt.common.core.domain.order.vo.OrderDetailsVo;
|
||||
|
||||
/**
|
||||
* 订单详细Service接口
|
||||
|
|
@ -17,7 +18,7 @@ public interface IOrderDetailsService
|
|||
* @param id 订单详细主键
|
||||
* @return 订单详细
|
||||
*/
|
||||
public OrderDetails selectOrderDetailsById(Long id);
|
||||
public OrderDetailsVo selectOrderDetailsById(Long id);
|
||||
|
||||
/**
|
||||
* 查询订单详细列表
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
package com.bonus.zlpt.order.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.bonus.zlpt.common.core.domain.order.vo.OrderDetailsVo;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.bonus.zlpt.order.mapper.OrderDetailsMapper;
|
||||
|
|
@ -26,7 +28,7 @@ public class OrderDetailsServiceImpl implements IOrderDetailsService
|
|||
* @return 订单详细
|
||||
*/
|
||||
@Override
|
||||
public OrderDetails selectOrderDetailsById(Long id)
|
||||
public OrderDetailsVo selectOrderDetailsById(Long id)
|
||||
{
|
||||
return orderDetailsMapper.selectOrderDetailsById(id);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -58,8 +58,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectOrderDetailsById" parameterType="Long" resultMap="OrderDetailsResult">
|
||||
<include refid="selectOrderDetailsVo"/>
|
||||
<select id="selectOrderDetailsById" parameterType="Long" resultType="com.bonus.zlpt.common.core.domain.order.vo.OrderDetailsVo">
|
||||
select d.*,o.code,o.time as order_time,o.order_status
|
||||
from ma_order_details d
|
||||
left join ma_order_info o on d.order_id = o.order_id
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue