This commit is contained in:
wuchunlei
2025-04-10 13:31:10 +08:00
2 changed files with 24 additions and 1 deletions

View File

@@ -13,6 +13,10 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.jdbc.datasource.DriverManagerDataSource;
import org.springframework.stereotype.Service;
/** /**
* 用户管理 * 用户管理
@@ -78,6 +82,25 @@ public class UserManageController {
return R.ok().put("result",page); return R.ok().put("result",page);
} }
@RequestMapping("/getTest")
public R getTest(){
DriverManagerDataSource dataSourceSecond = new DriverManagerDataSource();
dataSourceSecond.setDriverClassName("com.mysql.cj.jdbc.Driver");
dataSourceSecond.setUrl("jdbc:mysql://goldorchid.mysql.rds.aliyuncs.com:3309/everhealth?useUnicode=true&characterEncoding=UTF-8&zeroDateTimeBehavior=convertToNull");
dataSourceSecond.setUsername("yljkmaster");
dataSourceSecond.setPassword("Wu751019!@");
JdbcTemplate jdbcTemplate = new JdbcTemplate(dataSourceSecond);
List<Map<String, Object>> maps = jdbcTemplate.queryForList("select * from t_customer where POINT>0 or pointbyjf>0 limit 100");
for (Map<String, Object> m:maps){
System.out.println(m.get("nameCN")+"/"+m.get("point"));
}
System.out.println(maps);
return R.ok();
}

View File

@@ -67,7 +67,7 @@ aliyun:
accessKeyId: LTAI5tJbbw5fY97pnw635yq3 accessKeyId: LTAI5tJbbw5fY97pnw635yq3
accessKeySecret: LTXQ9v3OYVwNVbDWWfVpbbcVDKErKi accessKeySecret: LTXQ9v3OYVwNVbDWWfVpbbcVDKErKi
singName: 疯子读书国际 singName: 疯子读书国际
templateCode: SMS_248840040 templateCode: SMS_483250023
sTemplateCode: SMS_463780139 sTemplateCode: SMS_463780139
server: server: