更改为构造注入并完善方法注释

This commit is contained in:
thinkgem
2025-10-12 14:09:49 +08:00
parent 10820bf441
commit 67b3649c15
98 changed files with 556 additions and 700 deletions

View File

@@ -23,8 +23,7 @@ public class AppCommentService extends CrudService<AppCommentDao, AppComment> {
/**
* 获取单条数据
* @param appComment
* @return
* @param appComment 主键
*/
@Override
public AppComment get(AppComment appComment) {
@@ -35,7 +34,6 @@ public class AppCommentService extends CrudService<AppCommentDao, AppComment> {
* 查询分页数据
* @param appComment 查询条件
* @param appComment page 分页对象
* @return
*/
@Override
public Page<AppComment> findPage(AppComment appComment) {
@@ -44,7 +42,7 @@ public class AppCommentService extends CrudService<AppCommentDao, AppComment> {
/**
* 保存数据(插入或更新)
* @param appComment
* @param appComment 查询条件
*/
@Override
@Transactional
@@ -56,7 +54,7 @@ public class AppCommentService extends CrudService<AppCommentDao, AppComment> {
/**
* 更新状态
* @param appComment
* @param appComment 数据对象
*/
@Override
@Transactional
@@ -66,7 +64,7 @@ public class AppCommentService extends CrudService<AppCommentDao, AppComment> {
/**
* 删除数据
* @param appComment
* @param appComment 数据对象
*/
@Override
@Transactional

View File

@@ -22,8 +22,7 @@ public class AppUpgradeService extends CrudService<AppUpgradeDao, AppUpgrade> {
/**
* 获取单条数据
* @param appUpgrade
* @return
* @param appUpgrade 主键
*/
@Override
public AppUpgrade get(AppUpgrade appUpgrade) {
@@ -34,7 +33,6 @@ public class AppUpgradeService extends CrudService<AppUpgradeDao, AppUpgrade> {
* 查询分页数据
* @param appUpgrade 查询条件
* @param appUpgrade page 分页对象
* @return
*/
@Override
public Page<AppUpgrade> findPage(AppUpgrade appUpgrade) {
@@ -43,7 +41,7 @@ public class AppUpgradeService extends CrudService<AppUpgradeDao, AppUpgrade> {
/**
* 保存数据(插入或更新)
* @param appUpgrade
* @param appUpgrade 数据对象
*/
@Override
@Transactional
@@ -53,7 +51,7 @@ public class AppUpgradeService extends CrudService<AppUpgradeDao, AppUpgrade> {
/**
* 更新状态
* @param appUpgrade
* @param appUpgrade 数据对象
*/
@Override
@Transactional
@@ -63,7 +61,7 @@ public class AppUpgradeService extends CrudService<AppUpgradeDao, AppUpgrade> {
/**
* 删除数据
* @param appUpgrade
* @param appUpgrade 数据对象
*/
@Override
@Transactional

View File

@@ -13,7 +13,6 @@ import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;
import org.apache.commons.lang3.StringUtils;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.validation.annotation.Validated;
@@ -33,9 +32,12 @@ import java.util.Date;
@RequestMapping(value = "${adminPath}/app/appComment")
public class AppCommentController extends BaseController {
@Autowired
private AppCommentService appCommentService;
private final AppCommentService appCommentService;
public AppCommentController(AppCommentService appCommentService) {
this.appCommentService = appCommentService;
}
/**
* 获取数据
*/

View File

@@ -4,21 +4,19 @@
*/
package com.jeesite.modules.app.web;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import com.jeesite.common.config.Global;
import com.jeesite.common.web.BaseController;
import com.jeesite.modules.app.entity.AppComment;
import com.jeesite.modules.app.entity.AppUpgrade;
import com.jeesite.modules.app.service.AppCommentService;
import com.jeesite.modules.app.service.AppUpgradeService;
import org.springframework.stereotype.Controller;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import java.util.List;
/**
* APP公共服务 Controller
@@ -29,12 +27,14 @@ import com.jeesite.modules.app.service.AppUpgradeService;
@RequestMapping(value = "/app")
public class AppPublicServiceController extends BaseController {
@Autowired
private AppUpgradeService appUpgradeService;
private final AppUpgradeService appUpgradeService;
private final AppCommentService appCommentService;
public AppPublicServiceController(AppUpgradeService appUpgradeService, AppCommentService appCommentService) {
this.appUpgradeService = appUpgradeService;
this.appCommentService = appCommentService;
}
@Autowired
private AppCommentService appCommentService;
/**
* 升级检测
*/

View File

@@ -4,11 +4,14 @@
*/
package com.jeesite.modules.app.web;
import com.jeesite.common.config.Global;
import com.jeesite.common.entity.Page;
import com.jeesite.common.web.BaseController;
import com.jeesite.modules.app.entity.AppUpgrade;
import com.jeesite.modules.app.service.AppUpgradeService;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.validation.annotation.Validated;
@@ -17,12 +20,6 @@ import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import com.jeesite.common.config.Global;
import com.jeesite.common.entity.Page;
import com.jeesite.common.web.BaseController;
import com.jeesite.modules.app.entity.AppUpgrade;
import com.jeesite.modules.app.service.AppUpgradeService;
/**
* APP版本管理Controller
* @author ThinkGem
@@ -32,9 +29,12 @@ import com.jeesite.modules.app.service.AppUpgradeService;
@RequestMapping(value = "${adminPath}/app/appUpgrade")
public class AppUpgradeController extends BaseController {
@Autowired
private AppUpgradeService appUpgradeService;
private final AppUpgradeService appUpgradeService;
public AppUpgradeController(AppUpgradeService appUpgradeService) {
this.appUpgradeService = appUpgradeService;
}
/**
* 获取数据
*/