公式
This commit is contained in:
@@ -31,4 +31,5 @@ public class AppletGiftBag {
|
|||||||
private String iconUrl;
|
private String iconUrl;
|
||||||
private String isGrounding;
|
private String isGrounding;
|
||||||
private String isRecommend;
|
private String isRecommend;
|
||||||
|
private String preferentialPrice;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -25,6 +25,7 @@ public class AppletGiftBagDto implements Dto {
|
|||||||
private String iconUrl;
|
private String iconUrl;
|
||||||
private String isGrounding;
|
private String isGrounding;
|
||||||
private String isRecommend;
|
private String isRecommend;
|
||||||
|
private String preferentialPrice;
|
||||||
//商品sid
|
//商品sid
|
||||||
private List<GiftBagGoods> goods = new ArrayList<>();
|
private List<GiftBagGoods> goods = new ArrayList<>();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -33,5 +33,6 @@ public class LpkGoods {
|
|||||||
private String specificationUnit;
|
private String specificationUnit;
|
||||||
private String number;
|
private String number;
|
||||||
private String isAppletGrounding;
|
private String isAppletGrounding;
|
||||||
|
private String content;
|
||||||
|
private String useTo;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -23,4 +23,6 @@ public class LpkGoodsDto implements Dto {
|
|||||||
private String appContent;
|
private String appContent;
|
||||||
private String specificationUnit;
|
private String specificationUnit;
|
||||||
private double number;
|
private double number;
|
||||||
|
private String content;
|
||||||
|
private String useTo;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -33,5 +33,7 @@ public class LpkGoodsVo implements Vo {
|
|||||||
private String specificationUnit;
|
private String specificationUnit;
|
||||||
private double number;
|
private double number;
|
||||||
private String isAppletGrounding; //1 上架 2 下架
|
private String isAppletGrounding; //1 上架 2 下架
|
||||||
|
private String content;
|
||||||
|
private String useTo;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -23,7 +23,7 @@
|
|||||||
isEnable,
|
isEnable,
|
||||||
isGrounding,
|
isGrounding,
|
||||||
isRecommend
|
isRecommend
|
||||||
from lpk_giftbag
|
from applet_giftbag
|
||||||
<where>
|
<where>
|
||||||
${ew.sqlSegment}
|
${ew.sqlSegment}
|
||||||
</where>
|
</where>
|
||||||
@@ -33,5 +33,6 @@
|
|||||||
*
|
*
|
||||||
from applet_giftbag
|
from applet_giftbag
|
||||||
where isGrounding=1
|
where isGrounding=1
|
||||||
|
order by isRecommend desc,createTime desc
|
||||||
</select>
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
@@ -92,7 +92,7 @@ public class AppletGiftBagService extends MybatisBaseService<AppletGiftBagMapper
|
|||||||
AppletGiftBagGoods.setGoodsSid(goods.getGoodsSid());
|
AppletGiftBagGoods.setGoodsSid(goods.getGoodsSid());
|
||||||
AppletGiftBagGoods.setGiftbagSid(AppletGiftBag.getSid());
|
AppletGiftBagGoods.setGiftbagSid(AppletGiftBag.getSid());
|
||||||
AppletGiftBagGoods.setGoodsNumber(goods.getGoodsNumber());
|
AppletGiftBagGoods.setGoodsNumber(goods.getGoodsNumber());
|
||||||
AppletGiftBagGoods.setPrice(0);
|
AppletGiftBagGoods.setPrice(Double.valueOf(goods.getPrice()));
|
||||||
appletGiftBagGoodsService.insert(AppletGiftBagGoods);
|
appletGiftBagGoodsService.insert(AppletGiftBagGoods);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -115,6 +115,7 @@ public class AppletGiftBagService extends MybatisBaseService<AppletGiftBagMapper
|
|||||||
AppletGiftBagGoods.setGoodsSid(goods.getGoodsSid());
|
AppletGiftBagGoods.setGoodsSid(goods.getGoodsSid());
|
||||||
AppletGiftBagGoods.setGiftbagSid(AppletGiftBag.getSid());
|
AppletGiftBagGoods.setGiftbagSid(AppletGiftBag.getSid());
|
||||||
AppletGiftBagGoods.setGoodsNumber(goods.getGoodsNumber());
|
AppletGiftBagGoods.setGoodsNumber(goods.getGoodsNumber());
|
||||||
|
AppletGiftBagGoods.setPrice(Double.valueOf(goods.getPrice()));
|
||||||
appletGiftBagGoodsService.insert(AppletGiftBagGoods);
|
appletGiftBagGoodsService.insert(AppletGiftBagGoods);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -153,6 +154,9 @@ public class AppletGiftBagService extends MybatisBaseService<AppletGiftBagMapper
|
|||||||
if (StringUtils.isNotBlank(lpkGoods.getName())) {
|
if (StringUtils.isNotBlank(lpkGoods.getName())) {
|
||||||
bagGoods.setName(lpkGoods.getName());
|
bagGoods.setName(lpkGoods.getName());
|
||||||
}
|
}
|
||||||
|
if (StringUtils.isNotBlank(lpkGoods.getPicUrl())) {
|
||||||
|
bagGoods.setIconUrl(lpkGoods.getPicUrl());
|
||||||
|
}
|
||||||
if (StringUtils.isNotBlank(lpkGoods.getUnitName())) {
|
if (StringUtils.isNotBlank(lpkGoods.getUnitName())) {
|
||||||
bagGoods.setUnitName(lpkGoods.getUnitName());
|
bagGoods.setUnitName(lpkGoods.getUnitName());
|
||||||
}
|
}
|
||||||
@@ -184,7 +188,7 @@ public class AppletGiftBagService extends MybatisBaseService<AppletGiftBagMapper
|
|||||||
List<AppletGiftBagVo> pagging = baseMapper.giftBagList();
|
List<AppletGiftBagVo> pagging = baseMapper.giftBagList();
|
||||||
return rb.success().setData(pagging);
|
return rb.success().setData(pagging);
|
||||||
}
|
}
|
||||||
public ResultBean isGrounding(String sid,String state) {
|
public ResultBean isGrounding(String sid,String state) {
|
||||||
ResultBean rb = new ResultBean().fail();
|
ResultBean rb = new ResultBean().fail();
|
||||||
AppletGiftBag bag=baseMapper.selectOne(new QueryWrapper<AppletGiftBag>().eq("sid",sid));
|
AppletGiftBag bag=baseMapper.selectOne(new QueryWrapper<AppletGiftBag>().eq("sid",sid));
|
||||||
bag.setIsGrounding(state);
|
bag.setIsGrounding(state);
|
||||||
@@ -218,7 +222,7 @@ public class AppletGiftBagService extends MybatisBaseService<AppletGiftBagMapper
|
|||||||
i=i+Double.valueOf(goods.getPrice())*Double.valueOf(goods.getGoodsNumber());
|
i=i+Double.valueOf(goods.getPrice())*Double.valueOf(goods.getGoodsNumber());
|
||||||
goods.setIconUrl(fileUploadComponent.getUrlPrefix() +goods.getIconUrl());
|
goods.setIconUrl(fileUploadComponent.getUrlPrefix() +goods.getIconUrl());
|
||||||
goods.setTotalValue(String.valueOf(decimalFormat.format(Double.valueOf(goods.getGoodsNumber())*Double.valueOf(goods.getPrice()))));
|
goods.setTotalValue(String.valueOf(decimalFormat.format(Double.valueOf(goods.getGoodsNumber())*Double.valueOf(goods.getPrice()))));
|
||||||
goods.setJPrice(String.valueOf(decimalFormat.format(Double.valueOf(goods.getPrice())/Double.valueOf(goods.getWeight()))));
|
goods.setJPrice(String.valueOf(decimalFormat.format(Double.valueOf(goods.getPrice())*Double.valueOf(goods.getWeight()))));
|
||||||
}
|
}
|
||||||
appletGiftBagVo.setPrice(decimalFormat.format(i));
|
appletGiftBagVo.setPrice(decimalFormat.format(i));
|
||||||
appletGiftBagVo.setGoods(goodsList);
|
appletGiftBagVo.setGoods(goodsList);
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
</delete>
|
</delete>
|
||||||
<select id="getRecordsByBagSid" resultType="com.yxt.yyth.api.appletgiftbaggoods.AppletGiftBagGoods">
|
<select id="getRecordsByBagSid" resultType="com.yxt.yyth.api.appletgiftbaggoods.AppletGiftBagGoods">
|
||||||
select *
|
select *
|
||||||
from lpk_giftbag_goods
|
from applet_giftbag_goods
|
||||||
WHERE giftbagSid = #{sid}
|
WHERE giftbagSid = #{sid}
|
||||||
</select>
|
</select>
|
||||||
<insert id="saveBagGoods" parameterType="java.util.List">
|
<insert id="saveBagGoods" parameterType="java.util.List">
|
||||||
|
|||||||
@@ -17,7 +17,8 @@
|
|||||||
picUrl,
|
picUrl,
|
||||||
specificationUnit,
|
specificationUnit,
|
||||||
number,
|
number,
|
||||||
isAppletGrounding
|
isAppletGrounding,
|
||||||
|
useTo
|
||||||
from lpk_goods
|
from lpk_goods
|
||||||
<where>
|
<where>
|
||||||
${ew.sqlSegment}
|
${ew.sqlSegment}
|
||||||
|
|||||||
@@ -159,7 +159,7 @@ public class LpkGoodsService extends MybatisBaseService<LpkGoodsMapper, LpkGoods
|
|||||||
list.forEach(s->{
|
list.forEach(s->{
|
||||||
s.setIconUrl(fileUploadComponent.getUrlPrefix() +s.getIconUrl());
|
s.setIconUrl(fileUploadComponent.getUrlPrefix() +s.getIconUrl());
|
||||||
s.setTotalValue(decimalFormat.format(0));
|
s.setTotalValue(decimalFormat.format(0));
|
||||||
s.setJPrice(String.valueOf(decimalFormat.format(Double.valueOf(s.getPrice())/Double.valueOf(s.getWeight()))));
|
s.setJPrice(String.valueOf(decimalFormat.format(Double.valueOf(s.getPrice())*Double.valueOf(s.getWeight()))));
|
||||||
});
|
});
|
||||||
return rb.success().setData(list);
|
return rb.success().setData(list);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user