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