コード例 #1
0
  @Transactional(rollbackFor = Exception.class, propagation = Propagation.REQUIRED)
  @Override
  public boolean insertGame(RegisterGamePara registerGamePara) throws Exception {

    int intResult = 0;

    MultipartFile file = registerGamePara.getUpfile();
    String strName = file.getOriginalFilename();
    byte[] byteName = file.getBytes();

    logger.info("gameId >> " + registerGamePara.getGameId());
    logger.info("gameDomain >> " + registerGamePara.getGameDomain());
    logger.info("gameTitle >> " + registerGamePara.getGameTitle());
    logger.info("gameExplain >> " + registerGamePara.getGameExplain());

    Map<String, Object> mapRegisterGame = new HashMap<String, Object>();
    mapRegisterGame.put("gameId", registerGamePara.getGameId());
    mapRegisterGame.put("gameDomain", registerGamePara.getGameDomain());
    mapRegisterGame.put("gameTitle", registerGamePara.getGameTitle());
    mapRegisterGame.put("gameExplain", registerGamePara.getGameExplain());
    mapRegisterGame.put("gameFile", byteName);
    mapRegisterGame.put("gameStatusFlag", "0");

    try {
      intResult = masterAdminDao.getMapper(MasterAdminDao.class).insertGame(mapRegisterGame);
    } catch (Exception e) {
      logger.error("Exception error", e);
    }
    if (intResult < 1) {
      logger.error("InsertGame error, gameId={}", registerGamePara.getGameId());
      return false;
    }

    return true;
  }
コード例 #2
0
  @Transactional(rollbackFor = Exception.class, propagation = Propagation.REQUIRED)
  @Override
  public boolean createTable(RegisterGamePara registerGamePara) throws Exception {

    Map<String, Object> mapCreateGame = new HashMap<String, Object>();
    mapCreateGame.put("gameDb", registerGamePara.getGameId());

    try {
      masterAdminDao.getMapper(MasterAdminDao.class).createTableGame(mapCreateGame);
      masterAdminDao.getMapper(MasterAdminDao.class).createIndexUu(mapCreateGame);
      masterAdminDao.getMapper(MasterAdminDao.class).createIndexDeny(mapCreateGame);
    } catch (Exception e) {
      logger.error("Exception error", e);
    }

    return true;
  }