Authored by wujiexiang

券导出

@@ -18,6 +18,12 @@ public class CouponQueryResp { @@ -18,6 +18,12 @@ public class CouponQueryResp {
18 name = "券名称" 18 name = "券名称"
19 ) 19 )
20 private String name; 20 private String name;
  21 +
  22 + @BatchExportField(
  23 + name = "用户类型"
  24 + )
  25 + private String userTypeName;
  26 +
21 @BatchExportField( 27 @BatchExportField(
22 name = "TOKEN" 28 name = "TOKEN"
23 ) 29 )
@@ -38,8 +44,6 @@ public class CouponQueryResp { @@ -38,8 +44,6 @@ public class CouponQueryResp {
38 name = "状态" 44 name = "状态"
39 ) 45 )
40 46
41 - private Integer userType;  
42 -  
43 private String status; 47 private String status;
44 private Integer statusValue; 48 private Integer statusValue;
45 49
@@ -10,6 +10,9 @@ import com.yoho.error.exception.ServiceException; @@ -10,6 +10,9 @@ import com.yoho.error.exception.ServiceException;
10 import com.yoho.ufo.coupon.model.CouponAndProductConditions; 10 import com.yoho.ufo.coupon.model.CouponAndProductConditions;
11 import com.yoho.ufo.coupon.model.ProductCondition; 11 import com.yoho.ufo.coupon.model.ProductCondition;
12 import com.yoho.ufo.coupon.model.ProductLimitType; 12 import com.yoho.ufo.coupon.model.ProductLimitType;
  13 +import com.yoho.ufo.coupon.model.resp.CouponQueryResp;
  14 +import com.yoho.ufo.coupon.model.resp.UidCouponQueryResp;
  15 +import com.yoho.ufo.coupon.model.resp.UserCouponQueryResp;
13 import com.yoho.ufo.coupon.service.ICouponService; 16 import com.yoho.ufo.coupon.service.ICouponService;
14 import com.yoho.ufo.coupon.service.ProductServiceCaller; 17 import com.yoho.ufo.coupon.service.ProductServiceCaller;
15 import com.yoho.ufo.coupon.service.builder.CouponAndProductConditionsBuilder; 18 import com.yoho.ufo.coupon.service.builder.CouponAndProductConditionsBuilder;
@@ -25,13 +28,11 @@ import com.yoho.ufo.model.coupon.Coupon; @@ -25,13 +28,11 @@ import com.yoho.ufo.model.coupon.Coupon;
25 import com.yoho.ufo.model.coupon.CouponProductLimit; 28 import com.yoho.ufo.model.coupon.CouponProductLimit;
26 import com.yoho.ufo.model.coupon.UserCoupon; 29 import com.yoho.ufo.model.coupon.UserCoupon;
27 import com.yoho.ufo.model.coupon.UserCouponNum; 30 import com.yoho.ufo.model.coupon.UserCouponNum;
28 -import com.yoho.ufo.coupon.model.resp.CouponQueryResp;  
29 -import com.yoho.ufo.coupon.model.resp.UidCouponQueryResp;  
30 -import com.yoho.ufo.coupon.model.resp.UserCouponQueryResp;  
31 import com.yoho.ufo.service.IBusinessExportService; 31 import com.yoho.ufo.service.IBusinessExportService;
32 import com.yoho.ufo.service.impl.BatchService; 32 import com.yoho.ufo.service.impl.BatchService;
33 import com.yoho.ufo.service.impl.UserHelper; 33 import com.yoho.ufo.service.impl.UserHelper;
34 import com.yoho.ufo.service.model.ApiResponse; 34 import com.yoho.ufo.service.model.ApiResponse;
  35 +import com.yoho.ufo.util.DateUtil;
35 import com.yohobuy.ufo.coupon.req.*; 36 import com.yohobuy.ufo.coupon.req.*;
36 import com.yohobuy.ufo.model.common.PageResponseBO; 37 import com.yohobuy.ufo.model.common.PageResponseBO;
37 import com.yohobuy.ufo.model.promotion.CouponDisplayBo; 38 import com.yohobuy.ufo.model.promotion.CouponDisplayBo;
@@ -53,8 +54,6 @@ import javax.servlet.http.HttpServletRequest; @@ -53,8 +54,6 @@ import javax.servlet.http.HttpServletRequest;
53 import java.util.*; 54 import java.util.*;
54 import java.util.stream.Collectors; 55 import java.util.stream.Collectors;
55 56
56 -import com.yoho.ufo.util.DateUtil;  
57 -  
58 /** 57 /**
59 * Created by shengguo.cai on 2018/11/20. 58 * Created by shengguo.cai on 2018/11/20.
60 */ 59 */
@@ -750,7 +749,7 @@ public class CouponServiceImpl implements ICouponService,IBusinessExportService{ @@ -750,7 +749,7 @@ public class CouponServiceImpl implements ICouponService,IBusinessExportService{
750 CouponQueryResp resp = new CouponQueryResp(coupon.getId(),coupon.getCouponName(),coupon.getCouponNum(), 749 CouponQueryResp resp = new CouponQueryResp(coupon.getId(),coupon.getCouponName(),coupon.getCouponNum(),
751 useTime,coupon.getRemark(), getStatusDesc(coupon,curTime),coupon.getStatus(),coupon.getCouponToken()); 750 useTime,coupon.getRemark(), getStatusDesc(coupon,curTime),coupon.getStatus(),coupon.getCouponToken());
752 resp.setSendNum(coupon.getSendNum()); 751 resp.setSendNum(coupon.getSendNum());
753 - resp.setUserType(coupon.getUserType()); 752 + resp.setUserTypeName(UserTypeEnum.find(coupon.getUserType()).getName());
754 resp.setBusinessClient(coupon.getBusinessClient()); 753 resp.setBusinessClient(coupon.getBusinessClient());
755 resps.add(resp); 754 resps.add(resp);
756 } 755 }