消费者订单接口
This commit is contained in:
parent
d0626c36b5
commit
9a6b4b2e7d
|
|
@ -12,6 +12,8 @@ import com.ghy.customer.domain.Customer;
|
|||
import com.ghy.customer.domain.CustomerAddress;
|
||||
import com.ghy.customer.service.CustomerAddressService;
|
||||
import com.ghy.customer.service.CustomerService;
|
||||
import com.ghy.goods.domain.GoodsStandard;
|
||||
import com.ghy.goods.service.GoodsService;
|
||||
import com.ghy.goods.service.GoodsStandardService;
|
||||
import com.ghy.order.domain.OrderDetail;
|
||||
import com.ghy.order.domain.OrderGoods;
|
||||
|
|
@ -63,6 +65,8 @@ public class OrderMasterController extends BaseController {
|
|||
@Autowired
|
||||
private OrderGoodsService orderGoodsService;
|
||||
@Autowired
|
||||
private GoodsService goodsService;
|
||||
@Autowired
|
||||
private CustomerAddressService customerAddressService;
|
||||
@Autowired
|
||||
private FinancialDetailService financialDetailService;
|
||||
|
|
@ -89,8 +93,10 @@ public class OrderMasterController extends BaseController {
|
|||
OrderGoods orderGoods = orderGoodsService.selectByOrderMasterId(master.getId());
|
||||
|
||||
// 添加商品信息
|
||||
if(!CollectionUtils.isEmpty(goodsStandardService.selectByGoodsId(orderGoods.getGoodsId()))){
|
||||
orderGoods.setGoodsStandard(goodsStandardService.selectByGoodsId(orderGoods.getGoodsId()).get(0));
|
||||
List<GoodsStandard> goodsStandardList = goodsStandardService.selectByGoodsId(orderGoods.getGoodsId());
|
||||
if(!CollectionUtils.isEmpty(goodsStandardList)){
|
||||
orderGoods.setGoodsStandard(goodsStandardList.get(0));
|
||||
orderGoods.setGoodsLogoUrl(goodsService.selectById(goodsStandardList.get(0).getGoodsId()).getGoodsImgUrl());
|
||||
}
|
||||
|
||||
// 添加订单商品信息
|
||||
|
|
|
|||
|
|
@ -57,11 +57,11 @@
|
|||
</foreach>
|
||||
</select>
|
||||
|
||||
<select id="selectByGoodsId" resultMap="GoodsStandardResult">
|
||||
<select id="selectByGoodsId" parameterType="long" resultMap="GoodsStandardResult">
|
||||
<include refid="selectGoodsStandard"/>
|
||||
<where>
|
||||
<if test="goodsId != null and goodsId != 0">
|
||||
AND goods_id = #{goodsId}
|
||||
<if test="goodsId != null ">
|
||||
AND goods_standard_id = #{goodsId}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
|
|
|||
|
|
@ -41,6 +41,8 @@ public class OrderGoods extends BaseEntity {
|
|||
|
||||
private GoodsStandard goodsStandard;
|
||||
|
||||
private String goodsLogoUrl;
|
||||
|
||||
public OrderGoods() {
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue