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