fix: import cycle
This commit is contained in:
@@ -5,7 +5,6 @@ import (
|
||||
"cutego/modules/core/api/v1/response"
|
||||
"cutego/modules/core/dataobject"
|
||||
"cutego/modules/core/service"
|
||||
"cutego/pkg/common"
|
||||
"cutego/pkg/cronjob"
|
||||
"cutego/pkg/resp"
|
||||
"cutego/pkg/util"
|
||||
@@ -36,7 +35,7 @@ func (a CronJobApi) List(c *gin.Context) {
|
||||
// GetById 根据id获取任务详情
|
||||
func (a CronJobApi) GetById(c *gin.Context) {
|
||||
jobId := c.Param("jobId")
|
||||
info := a.cronJobService.GetInfo(common.StringToInt64(jobId))
|
||||
info := a.cronJobService.GetInfo(util.StringToInt64(jobId))
|
||||
resp.OK(c, util.DeepCopy(info, &response.CronJobResponse{}))
|
||||
}
|
||||
|
||||
@@ -73,7 +72,7 @@ func (a CronJobApi) Add(c *gin.Context) {
|
||||
|
||||
// Remove 删除定时任务
|
||||
func (a CronJobApi) Remove(c *gin.Context) {
|
||||
jobId := common.StringToInt64(c.Param("jobId"))
|
||||
jobId := util.StringToInt64(c.Param("jobId"))
|
||||
funcAlias := c.Param("funcAlias")
|
||||
|
||||
if a.cronJobService.GetInfo(jobId).Status == "1" {
|
||||
|
||||
@@ -5,7 +5,6 @@ import (
|
||||
cache2 "cutego/modules/core/cache"
|
||||
"cutego/modules/core/dataobject"
|
||||
"cutego/modules/core/service"
|
||||
"cutego/pkg/common"
|
||||
"cutego/pkg/page"
|
||||
"cutego/pkg/resp"
|
||||
"cutego/pkg/tree/tree_menu"
|
||||
@@ -46,7 +45,7 @@ func (a LoginApi) Login(c *gin.Context) {
|
||||
}
|
||||
|
||||
func (a LoginApi) handleLoginInfo(c *gin.Context, body request2.LoginBody, loginStatus bool) {
|
||||
status := common.If(loginStatus, "1", "0")
|
||||
status := util.IF(loginStatus, "1", "0")
|
||||
|
||||
clientIp := a.loginInfoService.GetRequestClientIp(c)
|
||||
var location string
|
||||
|
||||
@@ -5,7 +5,7 @@ import (
|
||||
"cutego/modules/core/api/v1/response"
|
||||
"cutego/modules/core/dataobject"
|
||||
"cutego/modules/core/service"
|
||||
"cutego/pkg/common"
|
||||
"cutego/pkg/config"
|
||||
"cutego/pkg/excels"
|
||||
"cutego/pkg/logging"
|
||||
"cutego/pkg/page"
|
||||
@@ -287,7 +287,7 @@ func (a UserApi) UpdatePwd(c *gin.Context) {
|
||||
|
||||
// Avatar 修改头像
|
||||
func (a UserApi) Avatar(c *gin.Context) {
|
||||
dirPath := common.GetDirPath("avatar")
|
||||
dirPath := config.GetDirPath("avatar")
|
||||
file, _, err := c.Request.FormFile("avatarFile")
|
||||
fileName := gotool.IdUtils.IdUUIDToRan(true) + ".jpg"
|
||||
filePath := dirPath + fileName
|
||||
|
||||
Reference in New Issue
Block a user