-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
hz wang
committed
May 8, 2023
1 parent
7b3a885
commit 592d523
Showing
27 changed files
with
1,126 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,5 +8,5 @@ public interface CodeConstant { | |
/** | ||
* 代码返回时每页的数量 | ||
*/ | ||
Long CODE_PAGE_NUM = 3L; | ||
Long CODE_PAGE_NUM = 5L; | ||
} |
34 changes: 34 additions & 0 deletions
34
pastecode-system/src/main/java/com/mewhz/paste/constant/LogConstant.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
package com.mewhz.paste.constant; | ||
|
||
/** | ||
* @author mewhz | ||
*/ | ||
public interface LogConstant { | ||
|
||
String LOGIN = "登录"; | ||
|
||
String REGISTER = "注册"; | ||
|
||
String UPDATE_USER = "更新用户"; | ||
|
||
String DELETE_USER = "删除用户"; | ||
|
||
String INSERT_CODE = "分享代码"; | ||
|
||
String UPDATE_CODE = "更新代码"; | ||
|
||
String DELETE_CODE = "删除代码"; | ||
|
||
String INSERT_LIKE = "点赞"; | ||
|
||
String DELETE_LIKE = "取消赞"; | ||
|
||
String INSERT_COLLECT = "收藏"; | ||
|
||
String DELETE_COLLECT = "取消收藏"; | ||
|
||
String RUN_CODE = "运行代码"; | ||
|
||
Long LOG_PAGE_NUM = 5L; | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
pastecode-system/src/main/java/com/mewhz/paste/controller/LogController.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package com.mewhz.paste.controller; | ||
|
||
import com.mewhz.paste.service.LogService; | ||
import org.springframework.web.bind.annotation.RequestMapping; | ||
import org.springframework.web.bind.annotation.RestController; | ||
|
||
import javax.annotation.Resource; | ||
import javax.annotation.Resources; | ||
|
||
/** | ||
* @author mewhz | ||
*/ | ||
@RestController | ||
@RequestMapping("/log") | ||
public class LogController { | ||
|
||
@Resource | ||
private LogService logService; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
pastecode-system/src/main/java/com/mewhz/paste/mapper/LogMapper.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package com.mewhz.paste.mapper; | ||
|
||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; | ||
import com.mewhz.paste.model.entity.Log; | ||
import org.springframework.stereotype.Repository; | ||
|
||
import javax.annotation.Resource; | ||
|
||
/** | ||
* @author mewhz | ||
*/ | ||
@Repository | ||
public interface LogMapper extends BaseMapper<Log> { | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
pastecode-system/src/main/java/com/mewhz/paste/model/entity/Log.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
package com.mewhz.paste.model.entity; | ||
|
||
|
||
import com.baomidou.mybatisplus.annotation.IdType; | ||
import com.baomidou.mybatisplus.annotation.TableId; | ||
import com.baomidou.mybatisplus.annotation.TableName; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Data; | ||
import lombok.NoArgsConstructor; | ||
import lombok.ToString; | ||
|
||
/** | ||
* @author mewhz | ||
*/ | ||
@Data | ||
@ToString | ||
@TableName("log") | ||
@AllArgsConstructor | ||
@NoArgsConstructor | ||
public class Log { | ||
|
||
@TableId(value = "log_id", type = IdType.AUTO) | ||
private Integer logId; | ||
private String logType; | ||
private String logInfo; | ||
private Boolean logIsSuccess; | ||
private String logCreateDate; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 0 additions & 19 deletions
19
pastecode-system/src/main/java/com/mewhz/paste/model/vo/CodeRunInfoVO.java
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
pastecode-system/src/main/java/com/mewhz/paste/model/vo/RunInfoVO.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
package com.mewhz.paste.model.vo; | ||
|
||
import lombok.AllArgsConstructor; | ||
import lombok.Data; | ||
import lombok.NoArgsConstructor; | ||
import lombok.ToString; | ||
|
||
/** | ||
* @author mewhz | ||
*/ | ||
@Data | ||
@ToString | ||
@NoArgsConstructor | ||
@AllArgsConstructor | ||
public class RunInfoVO { | ||
|
||
private Integer codeId; | ||
private String codeText; | ||
private String codeType; | ||
|
||
private Integer runId; | ||
private String runInput; | ||
private String runOutput; | ||
private String runError; | ||
private String runCreateDate; | ||
|
||
private String userAccount; | ||
private String userName; | ||
} |
31 changes: 31 additions & 0 deletions
31
pastecode-system/src/main/java/com/mewhz/paste/model/vo/RunSearchVO.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
package com.mewhz.paste.model.vo; | ||
|
||
import lombok.AllArgsConstructor; | ||
import lombok.Data; | ||
import lombok.NoArgsConstructor; | ||
import lombok.ToString; | ||
|
||
import static com.mewhz.paste.constant.RunConstant.RUN_PAGE_NUM; | ||
|
||
/** | ||
* @author mewhz | ||
*/ | ||
@Data | ||
@ToString | ||
@AllArgsConstructor | ||
@NoArgsConstructor | ||
public class RunSearchVO { | ||
|
||
private String codeType; | ||
|
||
private String userAccount; | ||
|
||
private String startDate; | ||
private String endDate; | ||
|
||
private Long current; | ||
|
||
public Long getCurrent() { | ||
return current * RUN_PAGE_NUM; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
pastecode-system/src/main/java/com/mewhz/paste/service/LogService.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package com.mewhz.paste.service; | ||
|
||
|
||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | ||
import com.mewhz.paste.mapper.LogMapper; | ||
import com.mewhz.paste.model.entity.Log; | ||
import org.springframework.stereotype.Service; | ||
|
||
/** | ||
* @author mewhz | ||
*/ | ||
@Service | ||
public class LogService extends ServiceImpl<LogMapper, Log> { | ||
} |
Oops, something went wrong.