1轮修复
This commit is contained in:
@@ -10,6 +10,7 @@ import com.alibaba.fastjson2.JSON;
|
||||
import org.apache.dubbo.config.annotation.DubboReference;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springdoc.core.annotations.ParameterObject;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
@@ -81,7 +82,7 @@ public class GuestController {
|
||||
|
||||
|
||||
@PostMapping
|
||||
public ResultDomain<TbGuestDTO> createGuest(TbGuestDTO guest) {
|
||||
public ResultDomain<TbGuestDTO> createGuest(@RequestBody TbGuestDTO guest) {
|
||||
ValidationUtils.validate(guest, Arrays.asList(
|
||||
ValidationUtils.requiredString("name", "姓名"),
|
||||
ValidationUtils.atLeastOne(
|
||||
@@ -93,7 +94,7 @@ public class GuestController {
|
||||
}
|
||||
|
||||
@PutMapping
|
||||
public ResultDomain<TbGuestDTO> updateGuest(TbGuestDTO guest) {
|
||||
public ResultDomain<TbGuestDTO> updateGuest(@RequestBody TbGuestDTO guest) {
|
||||
ValidationUtils.validate(guest, Arrays.asList(
|
||||
ValidationUtils.requiredString("name", "姓名"),
|
||||
ValidationUtils.atLeastOne(
|
||||
@@ -104,8 +105,8 @@ public class GuestController {
|
||||
return guestService.updateGuest(guest);
|
||||
}
|
||||
|
||||
@DeleteMapping
|
||||
public ResultDomain<TbGuestDTO> deleteGuest(@NotNull String userId) {
|
||||
@DeleteMapping("/{userId}")
|
||||
public ResultDomain<TbGuestDTO> deleteGuest(@PathVariable("userId") @NotNull String userId) {
|
||||
return guestService.deleteGuest(userId);
|
||||
}
|
||||
|
||||
@@ -115,13 +116,13 @@ public class GuestController {
|
||||
}
|
||||
|
||||
|
||||
@GetMapping("/list")
|
||||
public ResultDomain<TbGuestDTO> listGuest(TbGuestDTO filter) {
|
||||
@PostMapping("/list")
|
||||
public ResultDomain<TbGuestDTO> listGuest(@RequestBody TbGuestDTO filter) {
|
||||
return guestService.selectGuestList(filter);
|
||||
}
|
||||
|
||||
@PostMapping("/page")
|
||||
public ResultDomain<TbGuestDTO> pageGuest(PageRequest<TbGuestDTO> pageRequest) {
|
||||
public ResultDomain<TbGuestDTO> pageGuest(@RequestBody PageRequest<TbGuestDTO> pageRequest) {
|
||||
return guestService.selectGuestPage(pageRequest);
|
||||
}
|
||||
|
||||
|
||||
@@ -3,6 +3,8 @@ package org.xyzh.system.mapper.user;
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.security.access.method.P;
|
||||
import org.xyzh.common.core.page.PageParam;
|
||||
import org.xyzh.common.dto.sys.TbGuestDTO;
|
||||
|
||||
@@ -64,7 +66,7 @@ public interface TbGuestMapper extends BaseMapper<TbGuestDTO>{
|
||||
* @author yslg
|
||||
* @since 2025-12-18
|
||||
*/
|
||||
List<TbGuestDTO> selectGuestList(TbGuestDTO guest);
|
||||
List<TbGuestDTO> selectGuestList(@Param("filter") TbGuestDTO filter);
|
||||
|
||||
/**
|
||||
* @description 查询来客分页列表
|
||||
@@ -73,7 +75,7 @@ public interface TbGuestMapper extends BaseMapper<TbGuestDTO>{
|
||||
* @author yslg
|
||||
* @since 2025-12-18
|
||||
*/
|
||||
List<TbGuestDTO> selectGuestPage(TbGuestDTO guest, PageParam pageParam);
|
||||
List<TbGuestDTO> selectGuestPage(@Param("filter") TbGuestDTO guest, @Param("pageParam") PageParam pageParam);
|
||||
|
||||
int countGuest(TbGuestDTO guest);
|
||||
}
|
||||
|
||||
64
urbanLifelineServ/system/src/main/resources/bootstrap.yml
Normal file
64
urbanLifelineServ/system/src/main/resources/bootstrap.yml
Normal file
@@ -0,0 +1,64 @@
|
||||
# ================================================
|
||||
# Urban Lifeline - 通用 Bootstrap 配置
|
||||
# 所有微服务共享的基础配置
|
||||
# ================================================
|
||||
|
||||
# ================== Spring Cloud Nacos ==================
|
||||
spring:
|
||||
cloud:
|
||||
nacos:
|
||||
discovery:
|
||||
server-addr: ${NACOS_SERVER_ADDR:127.0.0.1:8848}
|
||||
namespace: ${NACOS_NAMESPACE:dev}
|
||||
group: ${NACOS_GROUP:DEFAULT_GROUP}
|
||||
|
||||
# ================== DataSource ==================
|
||||
datasource:
|
||||
url: ${DB_URL:jdbc:postgresql://127.0.0.1:5432/urban_lifeline}
|
||||
username: ${DB_USERNAME:postgres}
|
||||
password: ${DB_PASSWORD:postgres}
|
||||
driver-class-name: org.postgresql.Driver
|
||||
|
||||
# ================== Redis ==================
|
||||
data:
|
||||
redis:
|
||||
host: ${REDIS_HOST:127.0.0.1}
|
||||
port: ${REDIS_PORT:6379}
|
||||
database: ${REDIS_DATABASE:0}
|
||||
password: ${REDIS_PASSWORD:123456}
|
||||
|
||||
# ================== Security AES ==================
|
||||
security:
|
||||
aes:
|
||||
# AES-256 密钥(Base64编码,必须与所有服务保持一致)
|
||||
# 警告:这是开发环境密钥,生产环境请使用密钥管理系统
|
||||
secret-key: ${AES_SECRET_KEY:MTIzNDU2Nzg5MDEyMzQ1Njc4OTAxMjM0NTY3ODkwMTI=}
|
||||
|
||||
# ================== Dubbo ==================
|
||||
dubbo:
|
||||
protocol:
|
||||
name: dubbo
|
||||
port: -1
|
||||
registry:
|
||||
address: nacos://${NACOS_SERVER_ADDR:127.0.0.1:8848}
|
||||
|
||||
# ================== MyBatis-Plus ==================
|
||||
mybatis-plus:
|
||||
mapper-locations: classpath:mapper/**/*.xml
|
||||
type-aliases-package: org.xyzh.common.dto, org.xyzh.api
|
||||
|
||||
# ================== SpringDoc 基础配置 ==================
|
||||
springdoc:
|
||||
api-docs:
|
||||
enabled: true
|
||||
path: /v3/api-docs
|
||||
swagger-ui:
|
||||
enabled: true
|
||||
path: /swagger-ui.html
|
||||
|
||||
# ================== Logging ==================
|
||||
logging:
|
||||
config: classpath:log4j2.xml
|
||||
charset:
|
||||
console: UTF-8
|
||||
file: UTF-8
|
||||
Reference in New Issue
Block a user