|
@@ -4,16 +4,10 @@ import java.util.List;
|
|
|
import javax.servlet.http.HttpServletResponse;
|
|
|
|
|
|
import com.game.common.core.domain.R;
|
|
|
+import com.game.common.utils.SecurityUtils;
|
|
|
import org.springframework.security.access.prepost.PreAuthorize;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
-import org.springframework.web.bind.annotation.GetMapping;
|
|
|
-import org.springframework.web.bind.annotation.PostMapping;
|
|
|
-import org.springframework.web.bind.annotation.PutMapping;
|
|
|
-import org.springframework.web.bind.annotation.DeleteMapping;
|
|
|
-import org.springframework.web.bind.annotation.PathVariable;
|
|
|
-import org.springframework.web.bind.annotation.RequestBody;
|
|
|
-import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
-import org.springframework.web.bind.annotation.RestController;
|
|
|
+import org.springframework.web.bind.annotation.*;
|
|
|
import com.game.common.annotation.Log;
|
|
|
import com.game.common.core.controller.BaseController;
|
|
|
import com.game.common.core.domain.AjaxResult;
|
|
@@ -128,4 +122,21 @@ public class AppGameController extends BaseController
|
|
|
{
|
|
|
return toAjax(appGameService.deleteAppGameByIds(ids));
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
+ @GetMapping("/gameTime")
|
|
|
+ @ApiOperation(value = "记录游戏打开", notes = "记录游戏打开")
|
|
|
+ public R gameTime(@RequestParam(name = "type") Integer type,
|
|
|
+ @RequestParam(name = "gameId") String gameId,
|
|
|
+ @RequestParam(name = "gameName") String gameName,
|
|
|
+ @RequestParam(name = "date") String date)
|
|
|
+ {
|
|
|
+ if(null != type && type.intValue() == 1){
|
|
|
+ logger.info("用户:{},关闭游戏{}({}),时间", SecurityUtils.getUserId(), gameId, gameName, date);
|
|
|
+ }else{
|
|
|
+ logger.info("用户:{},打开游戏{}({}),时间",SecurityUtils.getUserId(), gameId, gameName, date);
|
|
|
+ }
|
|
|
+
|
|
|
+ return R.ok("记录成功","记录成功");
|
|
|
+ }
|
|
|
}
|