diff --git a/wfc-modules/wfc-system/src/main/java/org/wfc/system/controller/UClientController.java b/wfc-modules/wfc-system/src/main/java/org/wfc/system/controller/UClientController.java new file mode 100644 index 0000000..f4ecac3 --- /dev/null +++ b/wfc-modules/wfc-system/src/main/java/org/wfc/system/controller/UClientController.java @@ -0,0 +1,69 @@ +package org.wfc.system.controller; + +import cn.hutool.core.collection.CollUtil; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.PutMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; +import org.wfc.common.core.web.controller.BaseController; +import org.wfc.common.core.web.domain.AjaxResult; +import org.wfc.common.core.web.page.TableDataInfo; +import org.wfc.system.domain.UClient; +import org.wfc.system.service.IUClientService; + +import java.util.List; + +/** + *

+ * 用户平台_用户设备表 前端控制器 + *

+ * + * @author sys + * @since 2025-01-03 + */ +@RestController +@RequestMapping("/client") +public class UClientController extends BaseController { + + @Autowired + private IUClientService uClientService; + + @GetMapping("/page") + public TableDataInfo page(UClient uClient) { + startPage(); + List list = uClientService.list(); + return getDataTable(list); + } + + @GetMapping("/list") + public AjaxResult list(UClient uClient) { + List list = uClientService.list(); + return success(list); + } + + @GetMapping(value = "/{id}") + public AjaxResult getById(@PathVariable("id") Long id) { + return success(uClientService.getById(id)); + } + + @PostMapping + public AjaxResult add(@RequestBody UClient uClient) { + return toAjax(uClientService.save(uClient)); + } + + @PutMapping + public AjaxResult edit(@RequestBody UClient uClient) { + return toAjax(uClientService.updateById(uClient)); + } + + @DeleteMapping("/{ids}") + public AjaxResult remove(@PathVariable Long[] ids) { + return toAjax(uClientService.removeByIds(CollUtil.newArrayList(ids))); + } + +} diff --git a/wfc-modules/wfc-system/src/main/java/org/wfc/system/controller/UDeviceController.java b/wfc-modules/wfc-system/src/main/java/org/wfc/system/controller/UDeviceController.java new file mode 100644 index 0000000..817e4f4 --- /dev/null +++ b/wfc-modules/wfc-system/src/main/java/org/wfc/system/controller/UDeviceController.java @@ -0,0 +1,69 @@ +package org.wfc.system.controller; + +import cn.hutool.core.collection.CollUtil; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.PutMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; +import org.wfc.common.core.web.controller.BaseController; +import org.wfc.common.core.web.domain.AjaxResult; +import org.wfc.common.core.web.page.TableDataInfo; +import org.wfc.system.domain.UDevice; +import org.wfc.system.service.IUDeviceService; + +import java.util.List; + +/** + *

+ * 用户平台_AP设备表 前端控制器 + *

+ * + * @author sys + * @since 2025-01-03 + */ +@RestController +@RequestMapping("/device") +public class UDeviceController extends BaseController { + + @Autowired + private IUDeviceService uDeviceService; + + @GetMapping("/page") + public TableDataInfo page(UDevice uDevice) { + startPage(); + List list = uDeviceService.list(); + return getDataTable(list); + } + + @GetMapping("/list") + public AjaxResult list(UDevice uDevice) { + List list = uDeviceService.list(); + return success(list); + } + + @GetMapping(value = "/{id}") + public AjaxResult getById(@PathVariable("id") Long id) { + return success(uDeviceService.getById(id)); + } + + @PostMapping + public AjaxResult add(@RequestBody UDevice uDevice) { + return toAjax(uDeviceService.save(uDevice)); + } + + @PutMapping + public AjaxResult edit(@RequestBody UDevice uDevice) { + return toAjax(uDeviceService.updateById(uDevice)); + } + + @DeleteMapping("/{ids}") + public AjaxResult remove(@PathVariable Long[] ids) { + return toAjax(uDeviceService.removeByIds(CollUtil.newArrayList(ids))); + } + +} diff --git a/wfc-modules/wfc-system/src/main/java/org/wfc/system/domain/UClient.java b/wfc-modules/wfc-system/src/main/java/org/wfc/system/domain/UClient.java new file mode 100644 index 0000000..a4c562f --- /dev/null +++ b/wfc-modules/wfc-system/src/main/java/org/wfc/system/domain/UClient.java @@ -0,0 +1,40 @@ +package org.wfc.system.domain; + +import com.baomidou.mybatisplus.annotation.TableName; +import java.io.Serializable; +import org.wfc.common.mybatis.domain.BaseData; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Getter; +import lombok.Setter; + +/** + *

+ * 用户平台_用户设备表 + *

+ * + * @author sys + * @since 2025-01-03 + */ +@Getter +@Setter +@TableName("u_client") +@Schema(name = "UClient", description = "用户平台_用户设备表") +public class UClient extends BaseData { + + private static final long serialVersionUID = 1L; + + @Schema(description = "User ID link to u_user") + private Long userId; + + @Schema(description = "Site ID") + private String siteId; + + @Schema(description = "Client Name") + private String clientName; + + @Schema(description = "Client device type") + private String clientDeviceType; + + @Schema(description = "Client mac address") + private String clientMac; +} diff --git a/wfc-modules/wfc-system/src/main/java/org/wfc/system/domain/UDevice.java b/wfc-modules/wfc-system/src/main/java/org/wfc/system/domain/UDevice.java new file mode 100644 index 0000000..e2c87e1 --- /dev/null +++ b/wfc-modules/wfc-system/src/main/java/org/wfc/system/domain/UDevice.java @@ -0,0 +1,40 @@ +package org.wfc.system.domain; + +import com.baomidou.mybatisplus.annotation.TableName; +import java.io.Serializable; +import org.wfc.common.mybatis.domain.BaseData; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Getter; +import lombok.Setter; + +/** + *

+ * 用户平台_AP设备表 + *

+ * + * @author sys + * @since 2025-01-03 + */ +@Getter +@Setter +@TableName("u_device") +@Schema(name = "UDevice", description = "用户平台_AP设备表") +public class UDevice extends BaseData { + + private static final long serialVersionUID = 1L; + + @Schema(description = "User ID link to u_user") + private Long userId; + + @Schema(description = "Device Name") + private String deviceName; + + @Schema(description = "Device ip") + private String deviceIp; + + @Schema(description = "Device mac") + private String deviceMac; + + @Schema(description = "Device model") + private String deviceModel; +} diff --git a/wfc-modules/wfc-system/src/main/java/org/wfc/system/mapper/UClientMapper.java b/wfc-modules/wfc-system/src/main/java/org/wfc/system/mapper/UClientMapper.java new file mode 100644 index 0000000..88c1b82 --- /dev/null +++ b/wfc-modules/wfc-system/src/main/java/org/wfc/system/mapper/UClientMapper.java @@ -0,0 +1,18 @@ +package org.wfc.system.mapper; + +import com.baomidou.dynamic.datasource.annotation.DS; +import org.wfc.system.domain.UClient; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; + +/** + *

+ * 用户平台_用户设备表 Mapper 接口 + *

+ * + * @author sys + * @since 2025-01-03 + */ +@DS("user") +public interface UClientMapper extends BaseMapper { + +} diff --git a/wfc-modules/wfc-system/src/main/java/org/wfc/system/mapper/UDeviceMapper.java b/wfc-modules/wfc-system/src/main/java/org/wfc/system/mapper/UDeviceMapper.java new file mode 100644 index 0000000..3437767 --- /dev/null +++ b/wfc-modules/wfc-system/src/main/java/org/wfc/system/mapper/UDeviceMapper.java @@ -0,0 +1,18 @@ +package org.wfc.system.mapper; + +import com.baomidou.dynamic.datasource.annotation.DS; +import org.wfc.system.domain.UDevice; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; + +/** + *

+ * 用户平台_AP设备表 Mapper 接口 + *

+ * + * @author sys + * @since 2025-01-03 + */ +@DS("user") +public interface UDeviceMapper extends BaseMapper { + +} diff --git a/wfc-modules/wfc-system/src/main/java/org/wfc/system/service/IUClientService.java b/wfc-modules/wfc-system/src/main/java/org/wfc/system/service/IUClientService.java new file mode 100644 index 0000000..79d2248 --- /dev/null +++ b/wfc-modules/wfc-system/src/main/java/org/wfc/system/service/IUClientService.java @@ -0,0 +1,16 @@ +package org.wfc.system.service; + +import org.wfc.system.domain.UClient; +import com.baomidou.mybatisplus.extension.service.IService; + +/** + *

+ * 用户平台_用户设备表 服务类 + *

+ * + * @author sys + * @since 2025-01-03 + */ +public interface IUClientService extends IService { + +} diff --git a/wfc-modules/wfc-system/src/main/java/org/wfc/system/service/IUDeviceService.java b/wfc-modules/wfc-system/src/main/java/org/wfc/system/service/IUDeviceService.java new file mode 100644 index 0000000..0f7d1cd --- /dev/null +++ b/wfc-modules/wfc-system/src/main/java/org/wfc/system/service/IUDeviceService.java @@ -0,0 +1,16 @@ +package org.wfc.system.service; + +import org.wfc.system.domain.UDevice; +import com.baomidou.mybatisplus.extension.service.IService; + +/** + *

+ * 用户平台_AP设备表 服务类 + *

+ * + * @author sys + * @since 2025-01-03 + */ +public interface IUDeviceService extends IService { + +} diff --git a/wfc-modules/wfc-system/src/main/java/org/wfc/system/service/impl/UClientServiceImpl.java b/wfc-modules/wfc-system/src/main/java/org/wfc/system/service/impl/UClientServiceImpl.java new file mode 100644 index 0000000..d39554b --- /dev/null +++ b/wfc-modules/wfc-system/src/main/java/org/wfc/system/service/impl/UClientServiceImpl.java @@ -0,0 +1,20 @@ +package org.wfc.system.service.impl; + +import org.wfc.system.domain.UClient; +import org.wfc.system.mapper.UClientMapper; +import org.wfc.system.service.IUClientService; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import org.springframework.stereotype.Service; + +/** + *

+ * 用户平台_用户设备表 服务实现类 + *

+ * + * @author sys + * @since 2025-01-03 + */ +@Service +public class UClientServiceImpl extends ServiceImpl implements IUClientService { + +} diff --git a/wfc-modules/wfc-system/src/main/java/org/wfc/system/service/impl/UDeviceServiceImpl.java b/wfc-modules/wfc-system/src/main/java/org/wfc/system/service/impl/UDeviceServiceImpl.java new file mode 100644 index 0000000..bb3783e --- /dev/null +++ b/wfc-modules/wfc-system/src/main/java/org/wfc/system/service/impl/UDeviceServiceImpl.java @@ -0,0 +1,20 @@ +package org.wfc.system.service.impl; + +import org.wfc.system.domain.UDevice; +import org.wfc.system.mapper.UDeviceMapper; +import org.wfc.system.service.IUDeviceService; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import org.springframework.stereotype.Service; + +/** + *

+ * 用户平台_AP设备表 服务实现类 + *

+ * + * @author sys + * @since 2025-01-03 + */ +@Service +public class UDeviceServiceImpl extends ServiceImpl implements IUDeviceService { + +} diff --git a/wfc-modules/wfc-system/src/main/resources/mapper/system/UClientMapper.xml b/wfc-modules/wfc-system/src/main/resources/mapper/system/UClientMapper.xml new file mode 100644 index 0000000..e8ba729 --- /dev/null +++ b/wfc-modules/wfc-system/src/main/resources/mapper/system/UClientMapper.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/wfc-modules/wfc-system/src/main/resources/mapper/system/UDeviceMapper.xml b/wfc-modules/wfc-system/src/main/resources/mapper/system/UDeviceMapper.xml new file mode 100644 index 0000000..24e8339 --- /dev/null +++ b/wfc-modules/wfc-system/src/main/resources/mapper/system/UDeviceMapper.xml @@ -0,0 +1,5 @@ + + + + +