"use strict";
var __reflect = (this && this.__reflect) || function (p, c, t) {
    p.__class__ = c, t ? t.push(c) : t = [c], p.__types__ = p.__types__ ? t.concat(p.__types__) : t;
};
var __extends = this && this.__extends || function __extends(t, e) { 
 function r() { 
 this.constructor = t;
}
for (var i in e) e.hasOwnProperty(i) && (t[i] = e[i]);
r.prototype = e.prototype, t.prototype = new r();
};
Object.defineProperty(exports, "__esModule", { value: true });
var GPool_1 = require("../../../../tc/util/GPool");
var LotteryData_1 = require("../../common/lottery/LotteryData");
var Data_1 = require("../../Data");
/**
 *Created by cuiliqiang on 2018/3/12
 * 订单状态
 */
var GetCustomOrderStatusData = (function (_super) {
    __extends(GetCustomOrderStatusData, _super);
    function GetCustomOrderStatusData() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    GetCustomOrderStatusData.prototype.update = function (data) {
        if (!data) {
            return;
        }
        _super.prototype.update.call(this, data);
        this.result = data.result;
        if (data.exposure) {
            this.exposure = data.exposure;
        }
        else if (this.exposure) {
            this.exposure = null;
        }
        if (data.lottery && data.lottery.type != 'thanks') {
            this.lottery = GPool_1.GPool.takeOut('LotteryData', LotteryData_1.LotteryData);
            if (!this.lottery) {
                this.lottery = new LotteryData_1.LotteryData();
            }
            this.lottery.update(data.lottery);
        }
        else {
            GPool_1.GPool.recover('LotteryData', this.lottery);
            this.lottery = null;
        }
    };
    return GetCustomOrderStatusData;
}(Data_1.Data));
exports.GetCustomOrderStatusData = GetCustomOrderStatusData;
__reflect(GetCustomOrderStatusData.prototype, "\"e:/zqty/egret/libs/tw/data/custom/doJoin/GetCustomOrderStatusData\".GetCustomOrderStatusData");
//# sourceMappingURL=GetCustomOrderStatusData.js.map