package cn.freemud.service.job;

import cn.freemud.entities.dto.activity.ActivitysDtoNew;
import cn.freemud.entities.dto.activity.PayGiftCheckAndJoinResponseDtoNew;
import cn.freemud.entities.vo.PayGiftCouponVo;
import cn.freemud.entities.vo.PayGiftWechatCouponInfoVo;
import lombok.Data;

import java.util.ArrayList;
import java.util.List;

/**
 * @author : xh.Z
 * @email : fisherman0510@163.com
 * @Date : 2021/6/25 上午10:26
 * @description :
 */
@Data
public class DemoDataMsg {

    /**
     *  fisherman 假数据
     * @return
     */
    public List<PayGiftCheckAndJoinResponseDtoNew> getDemoData() {
        List<PayGiftCheckAndJoinResponseDtoNew> list = new ArrayList<>();
        PayGiftCheckAndJoinResponseDtoNew demo1 = new PayGiftCheckAndJoinResponseDtoNew();
        demo1.setSendType(0);
        demo1.setType("6");
        demo1.setSyncWechat("0");
        demo1.setWechatCouponInfo(getWechatCouponInfo());
        demo1.setCoupons(getCoupons());
        demo1.setActivitys(getactivityDemo());
        list.add(demo1);

        // 第二个
        PayGiftCheckAndJoinResponseDtoNew demo2 = new PayGiftCheckAndJoinResponseDtoNew();
        demo2.setSendType(5);
        demo2.setType("6");
        demo2.setSyncWechat("0");
        demo2.setWechatCouponInfo(getWechatCouponInfo());
        demo2.setCoupons(getCoupons());
        demo2.setActivitys(getactivityDemo());
        list.add(demo2);

        // 第三个
        PayGiftCheckAndJoinResponseDtoNew demo3 = new PayGiftCheckAndJoinResponseDtoNew();
        demo3.setSendType(5);
        demo3.setType("6");
        demo3.setSyncWechat("2");
        demo3.setWechatCouponInfo(getWechatCouponInfo());
        demo3.setCoupons(getCoupons());
        demo3.setActivitys(getactivityDemo());
        list.add(demo3);
        // 4
        PayGiftCheckAndJoinResponseDtoNew demo4 = new PayGiftCheckAndJoinResponseDtoNew();
        demo4.setSendType(5);
        demo4.setType("6");
        demo4.setSyncWechat("3");
        demo4.setWechatCouponInfo(getWechatCouponInfo());
        demo4.setCoupons(getCoupons());
        demo4.setActivitys(getactivityDemo());
        list.add(demo4);

        return list;

    }


    // fisherman 假数据
    private List<ActivitysDtoNew> getactivityDemo(){
        List<ActivitysDtoNew>  demo1111  =new ArrayList<>();
        for (int i = 0; i < 2; i++) {
            ActivitysDtoNew vo = new ActivitysDtoNew();
            vo.setActivityId(i+"");
            vo.setActivityName(i+"");
            vo.setActivityPicture(i+"");
            vo.setRedirectType(5+"");
            vo.setRedirectPage(i+"");
            demo1111.add(vo);
        }
        return demo1111;
    };
    // fisherman 假数据
    private List<PayGiftCouponVo>  getCoupons(){
        List<PayGiftCouponVo>  demo111  =new ArrayList<>();
        for (int i = 0; i < 2; i++) {
            PayGiftCouponVo vo = new PayGiftCouponVo();
            vo.setActivityId(i+"");
            vo.setCouponType(i);
            vo.setActivityCode(i+"");
            vo.setCouponCode(i+"");
            vo.setCouponName(i+"");
            vo.setExpiryTime(i+"");
            vo.setDiscountAmount(i);
            vo.setEffectiveData(i+"");
            vo.setBenefitRebate(i+"");
            vo.setLogo(i+"");
            vo.setMinAmount(i+"");
            demo111.add(vo);
        }
        return demo111;

    };

    // fisherman 假数据
    private PayGiftWechatCouponInfoVo  getWechatCouponInfo(){
        PayGiftWechatCouponInfoVo demo11 = new PayGiftWechatCouponInfoVo();
        demo11.setSend_coupon_merchant("发券商户号");
        demo11.setSend_coupon_params(new ArrayList<>());
        demo11.setSign("this is sign");
        return demo11;

    };


}
