}
@Override
public Feedback findById(long id)
{
Feedback fb = feedbackMapper.selectByPrimaryKey(id);
if(fb.getIdentifyId() != null)
{
Short type = fb.getIdentifyType();
if(type != null)
{
// 反馈人
if(type == Constants.Identity.IDENTITY_MERCHANT)
fb.setIdentifyStr(merchantMapper.selectByPrimaryKey(fb.getIdentifyId()).getMerchantName());
else if(type == Constants.Identity.IDENTITY_CUSTOMER)
fb.setIdentifyStr(customerMapper.selectByPrimaryKey(fb.getIdentifyId()).getLoginEmail());
// 反馈人身份类型
fb.setIdentifyTypeStr(handleStatusHtml.get("" + fb.getIdentifyType()));
}
}
// 反馈时间
if(fb.getSubTime() != null)
fb.setSubTimeStr(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(fb.getSubTime()));
// 处理状态
fb.setHandleStatusStr(handleStatusHtml.get("" + fb.getHandleStatus()));
// 处理时间
if(fb.getHandleTime() != null)
fb.setHandleTimeStr(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(fb.getHandleTime()));
return fb;
}