@Override public List<EquipmentEntity> selectEntityByUserId(long userId, Object attach) { List<EquipmentEntity> entitys = dao.selectEntityByUserId(userId, attach); for (EquipmentEntity entity : entitys) { entity.obtainAfter(); } return entitys; }
@Override public List<EquipmentEntity> selectAllEntity(Object attach) { List<EquipmentEntity> entitys = dao.selectAllEntity(attach); for (EquipmentEntity entity : entitys) { entity.obtainAfter(); } return entitys; }
@Override public void batchInsertEntity(List<EquipmentEntity> entitys, Object attach) { for (EquipmentEntity entity : entitys) { entity.saveBefore(); } IDaoOperate daoOperate = daoOperateFactory.createDaoOperate( dao, DaoOperateType.BatchInsert, entitys, "", null, attach); operatePool.execute(daoOperate); }
@Override public EquipmentEntity selectEntityByUserIdAndHeroIdAndPositionId( long userId, int heroId, int positionId, Object attach) { EquipmentEntity entity = (EquipmentEntity) dao.selectEntityByUserIdAndHeroIdAndPositionId(userId, heroId, positionId, attach); if (entity != null) { entity.obtainAfter(); } return entity; }
@Override public void updateEntity(EquipmentEntity entity, Object attach) { entity.saveBefore(); IDaoOperate daoOperate = daoOperateFactory.createDaoOperate(dao, DaoOperateType.Update, entity, "", null, attach); operatePool.execute(daoOperate); }