/** 填充自己 */ public void setId(long id) { t_products product = null; try { product = t_products.findById(id); } catch (Exception e) { Logger.error("产品->填充自己:" + e.getMessage()); this._id = -1; return; } if (null == product) { this._id = -1; return; } this._id = product.id; this.mark = product.mark; if (this.createBid) { this.isUse = product.is_use; if (!this.isUse) return; this.isAgency = product.is_agency; this.name = product.name; this.loanImageFilename = product.loan_image_filename; this.bailScale = product.bail_scale; this.maxCopies = product.max_copies; this.minInvestAmount = product.min_invest_amount; this.minInterestRate = product.min_interest_rate; this.maxInterestRate = product.max_interest_rate; this.minAmount = product.min_amount; this.maxAmount = product.max_amount; this.loanType = product.loan_type; this.isDealPassword = product.is_deal_password; this.repaymentId = product.repayment_type_id; this.periodYear = product.period_year; this.periodMonth = product.period_month; this.periodDay = product.period_day; this.investPeriod = product.invest_period; this.loanImageType = product.loan_image_type; this.creditId = product.credit_id; this.showType = product.show_type; return; } if (this.bidDetail) { this.name = product.name; this.smallImageFilename = product.small_image_filename; return; } this.time = product.time; this.name = product.name; this.nameImageFilename = product.name_image_filename; this.fitCrowd = product.fit_crowd; this.characteristic = product.characteristic; this.minAmount = product.min_amount; this.maxAmount = product.max_amount; this.minInvestAmount = product.min_invest_amount; this.maxCopies = product.max_copies; this.creditId = product.credit_id; this.auditCycle = product.audit_cycle; this.applicantCondition = product.applicant_condition; this.loanType = product.loan_type; this.bailScale = product.bail_scale; this.isDealPassword = product.is_deal_password; this.loanImageType = product.loan_image_type; this.loanImageFilename = product.loan_image_filename; this.smallImageFilename = product.small_image_filename; this.isAgency = product.is_agency; this.isUse = product.is_use; this.order = product._order; this.showType = product.show_type; this.repaymentId = product.repayment_type_id; /* 年借款期限 */ this.periodYear = product.period_year; /* 月借款期限 */ this.periodMonth = product.period_month; /* 日借款期限 */ this.periodDay = product.period_day; /* 投标期限 */ this.investPeriod = product.invest_period; /* 年利率 */ double minApr = product.min_interest_rate; double maxApr = product.max_interest_rate; this.minInterestRate = minApr; this.maxInterestRate = maxApr; this.monthMinApr = minApr > 0 ? Arith.div(minApr, 12, 2) : 0; this.monthMaxApr = maxApr > 0 ? Arith.div(maxApr, 12, 2) : 0; }