|
|
|
@ -40,6 +40,7 @@ import com.elink.esua.epdc.dto.result.PointExchangeResultDTO; |
|
|
|
import com.elink.esua.epdc.dto.result.ProductDetailsResultDTO; |
|
|
|
import com.elink.esua.epdc.dto.result.ProductInfoResultDTO; |
|
|
|
import com.elink.esua.epdc.entity.AcitveProductDeptEntity; |
|
|
|
import com.elink.esua.epdc.entity.AcitveProductExchangeEntity; |
|
|
|
import com.elink.esua.epdc.entity.AcitveProductInfoEntity; |
|
|
|
import com.elink.esua.epdc.feign.AdminFeignClient; |
|
|
|
import com.elink.esua.epdc.feign.OssFeignClient; |
|
|
|
@ -220,6 +221,7 @@ public class AcitveProductInfoServiceImpl extends BaseServiceImpl<AcitveProductI |
|
|
|
@Override |
|
|
|
public Result<ProductDetailsResultDTO> getProductDetail(String productId) { |
|
|
|
AcitveProductInfoEntity acitveProductInfoEntity = baseDao.selectById(productId); |
|
|
|
System.out.println("11111111111111111111111getProductDetail"+acitveProductInfoEntity.toString()); |
|
|
|
return new Result<ProductDetailsResultDTO>().ok(ConvertUtils.sourceToTarget(acitveProductInfoEntity, ProductDetailsResultDTO.class)); |
|
|
|
} |
|
|
|
|
|
|
|
@ -267,8 +269,8 @@ public class AcitveProductInfoServiceImpl extends BaseServiceImpl<AcitveProductI |
|
|
|
acitveProductExchangeDTO.setProductName(acitveProductInfoEntity.getName()); |
|
|
|
acitveProductExchangeDTO.setExchangeTime(new Date()); |
|
|
|
acitveProductExchangeDTO.setExchangeState("0"); |
|
|
|
|
|
|
|
acitveProductExchangeService.save(acitveProductExchangeDTO); |
|
|
|
AcitveProductExchangeEntity entity = ConvertUtils.sourceToTarget(acitveProductExchangeDTO, AcitveProductExchangeEntity.class); |
|
|
|
acitveProductExchangeService.insert(entity); |
|
|
|
// 根据核销兑换接口链接 生成核销二维码。
|
|
|
|
String qrcodeUrl =null; |
|
|
|
System.out.println("22222222222222222222"); |
|
|
|
@ -285,8 +287,8 @@ public class AcitveProductInfoServiceImpl extends BaseServiceImpl<AcitveProductI |
|
|
|
} |
|
|
|
System.out.println("333333333333"+qrcodeUrl); |
|
|
|
// 更新二维码地址
|
|
|
|
acitveProductExchangeDTO.setQrCodeUrl(qrcodeUrl); |
|
|
|
acitveProductExchangeService.update(acitveProductExchangeDTO); |
|
|
|
entity.setQrCodeUrl(qrcodeUrl); |
|
|
|
acitveProductExchangeService.updateById(entity); |
|
|
|
|
|
|
|
PointExchangeResultDTO pointExchangeResultDTO = new PointExchangeResultDTO(); |
|
|
|
pointExchangeResultDTO.setSuccess(true); |
|
|
|
|