Merge remote-tracking branch 'origin/master'
This commit is contained in:
@@ -159,7 +159,8 @@
|
||||
FROM emp_card card
|
||||
LEFT JOIN lpk_giftbag bag on card.giftbagSid = bag.sid
|
||||
left join lpk_giftbag_goods s on bag.sid = s.giftbagSid
|
||||
where card.sid = #{sid} and s.goodsSid=#{goodsSid}
|
||||
where card.sid = #{sid}
|
||||
and s.goodsSid = #{goodsSid}
|
||||
</select>
|
||||
<select id="cardStatisticsList" resultType="com.yxt.yythmall.api.empcard.EmpCardVo">
|
||||
SELECT
|
||||
@@ -232,14 +233,12 @@
|
||||
</where>
|
||||
</select>
|
||||
<select id="getGoodsList" resultType="com.yxt.yythmall.api.vegetablecellar.vegeVo">
|
||||
SELECT
|
||||
e.sid as goodsSid,
|
||||
e.name as goodsName,
|
||||
d.goodsNumber as goodsNumber,
|
||||
e.brandId as e.brandId,
|
||||
e.cetegoryId as cetegoryId
|
||||
FROM
|
||||
emp_card gi
|
||||
SELECT e.sid AS goodsSid,
|
||||
e.NAME AS goodsName,
|
||||
d.goodsNumber AS goodsNumber,
|
||||
e.brandId AS brandId,
|
||||
e.categoryId AS categoryId
|
||||
FROM emp_card gi
|
||||
left join lpk_giftbag_goods d on d.giftbagSid = gi.giftbagSid
|
||||
left join lpk_goods e on e.sid = d.goodsSid
|
||||
where gi.sid = #{sid}
|
||||
|
||||
@@ -244,8 +244,8 @@
|
||||
e.sid as goodsSid,
|
||||
e.name as goodsName,
|
||||
d.goodsNumber as goodsNumber,
|
||||
e.brandId as e.brandId,
|
||||
e.cetegoryId as cetegoryId
|
||||
e.brandId as brandId,
|
||||
e.categoryId as categoryId
|
||||
FROM
|
||||
emp_card_gift gi
|
||||
left join emp_card_gift_goods d on d.empCardGiftSid=gi.sid
|
||||
|
||||
@@ -17,8 +17,7 @@
|
||||
|
||||
|
||||
<select id="getGifCardsByCustomerSid" resultType="com.yxt.yythmall.api.lpkgiftcard.AppletVo">
|
||||
SELECT
|
||||
card.sid as sid,
|
||||
SELECT card.sid as sid,
|
||||
card.state AS state,
|
||||
CASE
|
||||
card.state
|
||||
@@ -49,8 +48,7 @@
|
||||
LEFT JOIN lpk_giftbag bag ON card.giftbagSid = bag.sid
|
||||
WHERE card.customerSid = #{customerSid}
|
||||
UNION
|
||||
SELECT
|
||||
card.sid as sid,
|
||||
SELECT card.sid as sid,
|
||||
card.state AS state,
|
||||
CASE card.state
|
||||
WHEN 3 THEN '未提货'
|
||||
@@ -82,8 +80,7 @@
|
||||
LEFT JOIN lpk_giftbag gif ON gif.sid = emp.giftbagSid
|
||||
WHERE card.customerSid = #{customerSid}
|
||||
UNION
|
||||
SELECT
|
||||
card.sid as sid,
|
||||
SELECT card.sid as sid,
|
||||
card.state AS state,
|
||||
CASE
|
||||
card.state
|
||||
@@ -325,15 +322,13 @@
|
||||
</where>
|
||||
</select>
|
||||
<select id="getGoodsList" resultType="com.yxt.yythmall.api.vegetablecellar.vegeVo">
|
||||
SELECT
|
||||
e.sid as goodsSid,
|
||||
SELECT e.sid as goodsSid,
|
||||
e.name as goodsName,
|
||||
d.goodsNumber as goodsNumber,
|
||||
e.brandId as e.brandId,
|
||||
e.cetegoryId as cetegoryId
|
||||
FROM
|
||||
lpk_giftcard gi
|
||||
left join emp_card_gift_goods d on d.empCardGiftSid=gi.sid
|
||||
e.brandId as brandId,
|
||||
e.categoryId as categoryId
|
||||
FROM lpk_giftcard gi
|
||||
left join lpk_giftbag_goods d on d.giftbagSid = gi.giftbagSid
|
||||
left join lpk_goods e on e.sid = d.goodsSid
|
||||
where gi.sid = #{sid}
|
||||
</select>
|
||||
|
||||
@@ -201,12 +201,11 @@ public class LpkGiftCardService extends MybatisBaseService<LpkGiftCardMapper, Lp
|
||||
baseMapper.updateById(lpkGiftCard);
|
||||
List<vegeVo> k = baseMapper.getGoodsList(lpkGiftCard.getSid());
|
||||
VegetableCellarDto dto = new VegetableCellarDto();
|
||||
//生成绑卡流水
|
||||
|
||||
//加入菜窖
|
||||
dto.setCustomerSid(dto.getCustomerSid());
|
||||
dto.setCustomerSid(bindCardDto.getCustomerSid());
|
||||
dto.setVos(k);
|
||||
vegetableCellarService.save1Goods(dto);
|
||||
//生成绑卡流水
|
||||
vegeReplenishService.saveBindRecord(bindCardDto, "0");
|
||||
return rb.success().setMsg("绑定成功");
|
||||
}
|
||||
|
||||
@@ -55,6 +55,8 @@ public class VegeReplenishService extends MybatisBaseService<VegeReplenishMapper
|
||||
private EmpCardGiftService empCardGiftService;
|
||||
@Autowired
|
||||
private EmpCardGiftGoodsService empCardGiftGoodsService;
|
||||
@Autowired
|
||||
private LpkGoodsService lpkGoodsService;
|
||||
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public ResultBean<String> saveBindRecord(BindCardDto dto, String type) {
|
||||
@@ -83,6 +85,9 @@ public class VegeReplenishService extends MybatisBaseService<VegeReplenishMapper
|
||||
detail.setGoodsNumber(Integer.parseInt(g.getGoodsNumber()));
|
||||
detail.setOrderSid(entity.getSid());
|
||||
detail.setCreateTime(new DateTime());
|
||||
if (StringUtils.isNotBlank(g.getName())) {
|
||||
detail.setGoodsName(g.getName());
|
||||
}
|
||||
vegeReplenishDetailService.insert(detail);
|
||||
});
|
||||
}
|
||||
@@ -102,6 +107,9 @@ public class VegeReplenishService extends MybatisBaseService<VegeReplenishMapper
|
||||
detail.setGoodsNumber(Integer.parseInt(g.getGoodsNumber()));
|
||||
detail.setOrderSid(entity.getSid());
|
||||
detail.setCreateTime(new DateTime());
|
||||
if (StringUtils.isNotBlank(g.getName())) {
|
||||
detail.setGoodsName(g.getName());
|
||||
}
|
||||
vegeReplenishDetailService.insert(detail);
|
||||
});
|
||||
}
|
||||
@@ -116,6 +124,10 @@ public class VegeReplenishService extends MybatisBaseService<VegeReplenishMapper
|
||||
goods.stream().forEach(g -> {
|
||||
VegeReplenishDetail detail = new VegeReplenishDetail();
|
||||
detail.setGoodsSid(g.getGoodsSid());
|
||||
LpkGoods lpkGoods = lpkGoodsService.fetchBySid(g.getGoodsSid());
|
||||
if (null != lpkGoods) {
|
||||
detail.setGoodsName(lpkGoods.getName());
|
||||
}
|
||||
detail.setGoodsNumber(g.getGoodsNumber());
|
||||
detail.setOrderSid(entity.getSid());
|
||||
detail.setCreateTime(new DateTime());
|
||||
|
||||
Reference in New Issue
Block a user