1/8
This commit is contained in:
@@ -34,5 +34,6 @@ public class LpkGoods {
|
||||
private String number;
|
||||
private String isAppletGrounding;
|
||||
private String content;
|
||||
private String weight;
|
||||
private String useTo;
|
||||
}
|
||||
|
||||
@@ -28,4 +28,6 @@ public class LpkGoodsDetailsVo implements Vo {
|
||||
private String appContent;
|
||||
private String specificationUnit;
|
||||
private double number;
|
||||
private String content;
|
||||
private String weight;
|
||||
}
|
||||
|
||||
@@ -24,5 +24,6 @@ public class LpkGoodsDto implements Dto {
|
||||
private String specificationUnit;
|
||||
private double number;
|
||||
private String content;
|
||||
private String weight;
|
||||
private String useTo;
|
||||
}
|
||||
|
||||
@@ -231,9 +231,9 @@ public class AppletGiftBagService extends MybatisBaseService<AppletGiftBagMapper
|
||||
appletGiftBagVo.setName(s.getName());
|
||||
return rb.success().setData(appletGiftBagVo);
|
||||
}
|
||||
public String aa(double a){
|
||||
public static String aa(double a){
|
||||
BigDecimal d=new BigDecimal(a);
|
||||
double c= d.setScale(2,BigDecimal.ROUND_HALF_UP).doubleValue();
|
||||
String c= d.setScale(2,BigDecimal.ROUND_HALF_UP).toString();
|
||||
return String.valueOf(c);
|
||||
}
|
||||
|
||||
|
||||
@@ -74,7 +74,8 @@
|
||||
content as remark,
|
||||
weight
|
||||
from lpk_goods
|
||||
where isAppletGrounding=1
|
||||
where isAppletGrounding=1 and useTo=1
|
||||
order by createTime desc
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -68,6 +68,11 @@ public class LpkGoodsRest {
|
||||
public ResultBean<LpkGoodsDetailsVo> appletGrounding(@PathVariable("sid") String sid,@PathVariable("state") String state) {
|
||||
return lpkGoodsService.appletGrounding(sid,state);
|
||||
}
|
||||
@ApiOperation("小程序商品是否自选")
|
||||
@GetMapping("/appletUseTo/{sid}/{state}")
|
||||
public ResultBean<LpkGoodsDetailsVo> appletUseTo(@PathVariable("sid") String sid,@PathVariable("state") String state) {
|
||||
return lpkGoodsService.appletUseTo(sid,state);
|
||||
}
|
||||
@ApiOperation("商品信息")
|
||||
@GetMapping("/getAllGiftBag")
|
||||
public ResultBean getAllGiftBag() {
|
||||
|
||||
@@ -152,6 +152,18 @@ public class LpkGoodsService extends MybatisBaseService<LpkGoodsMapper, LpkGoods
|
||||
}
|
||||
return rb.success();
|
||||
}
|
||||
public ResultBean appletUseTo(String sid,String state) {
|
||||
ResultBean rb = ResultBean.fireFail();
|
||||
LpkGoods lpkGoods = fetchBySid(sid);
|
||||
if (null != lpkGoods) {
|
||||
lpkGoods.setUseTo(state);
|
||||
baseMapper.updateById(lpkGoods);
|
||||
}else{
|
||||
return rb;
|
||||
}
|
||||
return rb.success();
|
||||
}
|
||||
|
||||
public ResultBean<List<GiftBagGoods>> getAllGoodsApplet() {
|
||||
ResultBean rb = ResultBean.fireFail();
|
||||
List<GiftBagGoods> list=baseMapper.getAllGoodsApplet();
|
||||
|
||||
Reference in New Issue
Block a user