first commit
This commit is contained in:
@@ -0,0 +1,43 @@
|
||||
package com.kimgo.wepush;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.kimgo.wepush.mapper.QyWeChatAppInfoMapper;
|
||||
import com.kimgo.wepush.model.QyWeChatAppInfo;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@SpringBootTest
|
||||
public class QyWeChatAppInfoMapperTest {
|
||||
|
||||
@Autowired
|
||||
private QyWeChatAppInfoMapper qyWeChatAppInfoMapper;
|
||||
@Test
|
||||
public void testSelect() {
|
||||
System.out.println(("----- select by id test ------"));
|
||||
QyWeChatAppInfo qyWeChatAppInfo = qyWeChatAppInfoMapper.selectById("1");
|
||||
System.out.printf(qyWeChatAppInfo.toString());
|
||||
System.out.printf("test complete");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testSelectByPhoneNumber() {
|
||||
System.out.println("----- select by phoneNumber test ------");
|
||||
|
||||
QueryWrapper<QyWeChatAppInfo> wrapper = new QueryWrapper<>();
|
||||
wrapper.eq("phone_number", "18281561650");
|
||||
|
||||
QyWeChatAppInfo result = qyWeChatAppInfoMapper.selectOne(wrapper);
|
||||
|
||||
// 打印结果
|
||||
if (result != null) {
|
||||
System.out.println(result);
|
||||
} else {
|
||||
System.out.println("No record found.");
|
||||
}
|
||||
|
||||
System.out.println("Test complete");
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user