| | |
| | | import com.mzl.flower.constant.Constants; |
| | | import com.mzl.flower.dto.request.coupon.*; |
| | | import com.mzl.flower.dto.response.coupon.CouponPointStatisVO; |
| | | import com.mzl.flower.dto.response.coupon.CouponTemplateCustomerVO; |
| | | import com.mzl.flower.dto.response.coupon.CouponTemplateVO; |
| | | import com.mzl.flower.entity.coupon.CouponRecordDO; |
| | | import com.mzl.flower.entity.coupon.CouponTemplateCustomerDO; |
| | |
| | | import com.mzl.flower.entity.customer.Customer; |
| | | import com.mzl.flower.entity.point.CustomerPoint; |
| | | import com.mzl.flower.entity.point.CustomerPointDetail; |
| | | import com.mzl.flower.entity.point.PointGoodsRecord; |
| | | import com.mzl.flower.enums.*; |
| | | import com.mzl.flower.mapper.coupon.CouponTemplateMapper; |
| | | import com.mzl.flower.mapper.coupon.CouponTemplateMapperCustom; |
| | |
| | | import com.mzl.flower.service.coupon.CouponRecordService; |
| | | import com.mzl.flower.service.coupon.CouponTemplateCustomerService; |
| | | import com.mzl.flower.service.coupon.CouponTemplateService2; |
| | | import com.mzl.flower.service.payment.OrderService; |
| | | import com.mzl.flower.utils.UUIDGenerator; |
| | | import org.apache.commons.collections4.CollectionUtils; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.springframework.beans.BeanUtils; |
| | |
| | | |
| | | @Autowired |
| | | private CustomerPointDetailMapper customerPointDetailMapper; |
| | | |
| | | |
| | | |
| | | @Transactional |
| | | @Override |
| | |
| | | dto.setId(id); |
| | | final List<CouponTemplateVO> list = getList(dto); |
| | | if (CollectionUtils.isNotEmpty(list)) { |
| | | return list.get(0); |
| | | CouponTemplateVO vo =list.get(0); |
| | | if(vo.getCategory().equals(CouponCategoryEnum.USER.getStatus())){ |
| | | List<CouponTemplateCustomerVO> customerList= couponTemplateMapperCustom.getCouponCustomerList(id); |
| | | vo.setCustomerList(customerList); |
| | | } |
| | | return vo; |
| | | } |
| | | return null; |
| | | } |