|
|
@ -1,5 +1,6 @@ |
|
|
|
package com.yxt.yythmall.biz.lpkgoods; |
|
|
|
|
|
|
|
import cn.dev33.satoken.stp.StpUtil; |
|
|
|
import cn.hutool.core.bean.BeanUtil; |
|
|
|
import cn.hutool.core.date.DateTime; |
|
|
|
import cn.hutool.core.date.DateUnit; |
|
|
@ -19,6 +20,7 @@ import com.yxt.yythmall.api.enterprisecertification.EnterpriseCertificationVo; |
|
|
|
import com.yxt.yythmall.api.lpkcustomer.LpkCustomer; |
|
|
|
import com.yxt.yythmall.api.lpkgiftcard.LpkGiftCardQuery; |
|
|
|
import com.yxt.yythmall.api.lpkgoods.*; |
|
|
|
import com.yxt.yythmall.api.shoppingcart.ShoppingCart; |
|
|
|
import com.yxt.yythmall.api.shoppingcart.ShoppingCartQuery; |
|
|
|
import com.yxt.yythmall.api.shoppingcart.ShoppingCartVo; |
|
|
|
import com.yxt.yythmall.biz.enterprisecertification.EnterpriseCertificationService; |
|
|
@ -133,7 +135,7 @@ public class LpkGoodsService extends MybatisBaseService<LpkGoodsMapper, LpkGoods |
|
|
|
return rb.success().setData(vo); |
|
|
|
} |
|
|
|
|
|
|
|
public ResultBean<LpkGoodsDetailsVo> goodsDetails(String sid) { |
|
|
|
public ResultBean<LpkGoodsDetailsVo> goodsDetails(String sid,String customerSid) { |
|
|
|
ResultBean rb = ResultBean.fireFail(); |
|
|
|
LpkGoodsDetailsVo vo = new LpkGoodsDetailsVo(); |
|
|
|
LpkGoodsVo lpkGoods = baseMapper.getGoodsDetails(sid); |
|
|
@ -145,6 +147,18 @@ public class LpkGoodsService extends MybatisBaseService<LpkGoodsMapper, LpkGoods |
|
|
|
} |
|
|
|
vo.setCreateTime(sdf.format(lpkGoods.getCreateTime())); |
|
|
|
} |
|
|
|
vo.setBrandId(lpkGoods.getBrandId()); |
|
|
|
LpkCustomer lpkCustomer =lpkCustomerService.getOne(new QueryWrapper<LpkCustomer>().eq("sid",customerSid)); |
|
|
|
PmsBrand pmsBrand= IPmsBrandService.getById(lpkGoods.getBrandId()); |
|
|
|
ShoppingCart shoppingCart=shoppingCartService.getOne(new QueryWrapper<ShoppingCart>().eq("customerSid",lpkCustomer.getSid()) |
|
|
|
.eq("goodsSid",lpkGoods.getSid()).eq("affiliation",lpkGoods.getBrandId())); |
|
|
|
vo.setPrice(removeZeros(lpkGoods.getPrice())); |
|
|
|
vo.setDgxy(pmsBrand.getDgxy()); |
|
|
|
vo.setQdxy(pmsBrand.getQdxy()); |
|
|
|
vo.setQssl(pmsBrand.getQssl()); |
|
|
|
vo.setCategoryId(lpkGoods.getCategoryId()); |
|
|
|
vo.setGoodsNumber(shoppingCart.getGoodsNumber()); |
|
|
|
vo.setMefenPrice(removeZeros(String.valueOf(Double.valueOf(lpkGoods.getWeight())*Double.valueOf(lpkGoods.getPrice())))); |
|
|
|
return rb.success().setData(vo); |
|
|
|
} |
|
|
|
|
|
|
|