Commit cbf2ae17 by 吕明尚

提交代码

parent 2dd524be
......@@ -56,19 +56,23 @@ public class SCleanRecords extends BaseEntity
/**
* 门店名称
*/
@TableField(exist = false)
private String storeName;
/**
* 房间名称
*/
@TableField(exist = false)
private String roomName;
/**
* 保洁员姓名
*/
@TableField(exist = false)
private String cleanName;
/**
* 保洁员手机号
*/
@TableField(exist = false)
private String phone;
@TableField(exist = false)
......
......@@ -138,4 +138,20 @@ public class SOrder extends BaseEntity
@TableField(exist = false)
private Integer buyType;
//优惠卷名称
@TableField(exist = false)
private String couponName;
//套餐名称
@TableField(exist = false)
private String packName;
//门店名称
@TableField(exist = false)
private String storeName;
//房间名称
@TableField(exist = false)
private String roomName;
}
......@@ -105,7 +105,29 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper,SOrder> implemen
@Override
public List<SOrder> selectSOrderList(SOrder sOrder)
{
return sOrderMapper.selectSOrderList(sOrder);
List<SOrder> sOrders = sOrderMapper.selectSOrderList(sOrder);
if (CollectionUtils.isNotEmpty(sOrders)) {
sOrders.stream().forEach(item -> {
if (ObjectUtil.isNotNull(item.getCouponId())) {
SConsumerCoupon byId = consumerCouponService.getById(item.getCouponId());
item.setCouponName(byId.getName());
}
if (ObjectUtil.isNotNull(item.getPackId())) {
SPack byId = packService.getById(item.getPackId());
item.setPackName(byId.getName());
}
if (ObjectUtil.isNotNull(item.getStoreId())) {
SStore byId = storeService.getById(item.getStoreId());
item.setStoreName(byId.getName());
}
if (ObjectUtil.isNotNull(item.getRoomId())) {
SRoom byId = roomService.getById(item.getRoomId());
item.setRoomName(byId.getName());
}
});
}
return sOrders;
}
/**
......
......@@ -153,7 +153,7 @@
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="consumerId != null">#{consumerId},</if>
<if test="couponId != null">#{couponId},</if>
<if test="dealId != null">#{dealId}</if>
<if test="dealId != null">#{dealId},</if>
<if test="couponCode != null and couponCode != ''">#{couponCode},</if>
<if test="name != null and name != ''">#{name},</if>
<if test="couponType != null">#{couponType},</if>
......
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