Skip to content
Permalink

Comparing changes

This is a direct comparison between two commits made in this repository or its related repositories. View the default comparison for this range or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: CMIPT/gcs-back-end
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 4c3a735ef7d7066e7e18754218661a511bca4fb8
Choose a base ref
..
head repository: CMIPT/gcs-back-end
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 38557c53e4b8f9d8b8d1e6ddc91a2f9f61078f79
Choose a head ref
3 changes: 2 additions & 1 deletion .github/workflows/java-format.yml
Original file line number Diff line number Diff line change
@@ -22,7 +22,8 @@ jobs:
echo "java_files_exist=false" >> $GITHUB_OUTPUT
fi
- uses: actions/setup-java@v4
- name: Set up openjdk-17
uses: actions/setup-java@v4
if: steps.check_java_files.outputs.java_files_exist == 'true'
with:
distribution: 'zulu'
3 changes: 2 additions & 1 deletion src/main/java/edu/cmipt/gcs/dao/UserMapper.java
Original file line number Diff line number Diff line change
@@ -4,4 +4,5 @@

import edu.cmipt.gcs.pojo.UserPO;

public interface UserMapper extends BaseMapper<UserPO> {}
public interface UserMapper extends BaseMapper<UserPO> {
}
15 changes: 5 additions & 10 deletions src/main/java/edu/cmipt/gcs/pojo/UserPO.java
Original file line number Diff line number Diff line change
@@ -1,16 +1,11 @@
package edu.cmipt.gcs.pojo;

import java.time.LocalDateTime;

import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.time.LocalDateTime;

@TableName("t_user")
public record UserPO(
@TableId Long pkUserId,
String username,
String email,
String userPassword,
LocalDateTime gmtCreated,
LocalDateTime gmtUpdated,
LocalDateTime gmtDeleted) {}
public record UserPO(@TableId Long pkUserId, String username, String email, String userPassword, LocalDateTime gmtCreated,
LocalDateTime gmtUpdated, LocalDateTime gmtDeleted) {
}
13 changes: 7 additions & 6 deletions src/test/java/edu/cmipt/gcs/controller/dao/UserMapperTest.java
Original file line number Diff line number Diff line change
@@ -1,20 +1,21 @@
package edu.cmipt.gcs.controller.dao;

import com.baomidou.mybatisplus.core.toolkit.Assert;

import edu.cmipt.gcs.dao.UserMapper;
import edu.cmipt.gcs.pojo.UserPO;
import java.util.List;

import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;

import java.util.List;
import com.baomidou.mybatisplus.core.toolkit.Assert;

import edu.cmipt.gcs.dao.UserMapper;
import edu.cmipt.gcs.pojo.UserPO;

@SpringBootTest
public class UserMapperTest {

@Autowired private UserMapper userMapper;
@Autowired
private UserMapper userMapper;

@Test
public void testSelect() {