Merge branch 'dev.fence'
commit
adcf07d469
|
@ -0,0 +1,36 @@
|
||||||
|
package com.muyu.fence.controller;
|
||||||
|
|
||||||
|
import com.muyu.common.core.domain.Result;
|
||||||
|
import com.muyu.fence.domain.TbGroup;
|
||||||
|
import com.muyu.fence.service.TbGroupService;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author YuPing
|
||||||
|
* @Description 围栏控制器
|
||||||
|
* @Version 1.0
|
||||||
|
* @Data 2024-09-22 17:00:08
|
||||||
|
*/
|
||||||
|
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/tbGroup")
|
||||||
|
public class TbGroupController {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private TbGroupService tbGroupService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询围栏列表
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@GetMapping("/selectTbGroupList")
|
||||||
|
public Result<List<TbGroup>> selectTbGroupList() {
|
||||||
|
return Result.success(tbGroupService.selectTbGroupList());
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -49,7 +49,7 @@ public class TbFence extends BaseEntity{
|
||||||
|
|
||||||
/** 优先级 */
|
/** 优先级 */
|
||||||
@Excel(name = "优先级")
|
@Excel(name = "优先级")
|
||||||
private Long fencePriority;
|
private String fencePriority;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,26 @@
|
||||||
|
package com.muyu.fence.domain;
|
||||||
|
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author YuPing
|
||||||
|
* @Description 围栏组
|
||||||
|
* @Version 1.0
|
||||||
|
* @Data 2024-09-22 16:55:16
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@AllArgsConstructor
|
||||||
|
@NoArgsConstructor
|
||||||
|
public class TbGroup {
|
||||||
|
/**
|
||||||
|
* 围栏组编号
|
||||||
|
*/
|
||||||
|
private Integer groupId;
|
||||||
|
/**
|
||||||
|
* 围栏组名称
|
||||||
|
*/
|
||||||
|
private String groupName;
|
||||||
|
}
|
|
@ -0,0 +1,12 @@
|
||||||
|
package com.muyu.fence.mapper;
|
||||||
|
|
||||||
|
import com.muyu.fence.domain.TbGroup;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Mapper
|
||||||
|
public interface TbGroupDao {
|
||||||
|
//查询围栏组列表
|
||||||
|
public List<TbGroup> selectTbGroupList();
|
||||||
|
}
|
|
@ -0,0 +1,10 @@
|
||||||
|
package com.muyu.fence.service;
|
||||||
|
|
||||||
|
import com.muyu.fence.domain.TbGroup;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public interface TbGroupService {
|
||||||
|
//查询围栏组列表
|
||||||
|
public List<TbGroup> selectTbGroupList();
|
||||||
|
}
|
|
@ -0,0 +1,32 @@
|
||||||
|
package com.muyu.fence.service.impl;
|
||||||
|
|
||||||
|
import com.muyu.fence.domain.TbGroup;
|
||||||
|
import com.muyu.fence.mapper.TbGroupDao;
|
||||||
|
import com.muyu.fence.service.TbGroupService;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author YuPing
|
||||||
|
* @Description 围栏组业务实现
|
||||||
|
* @Version 1.0
|
||||||
|
* @Data 2024-09-22 16:59:33
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Service
|
||||||
|
public class TbGroupServiceImpl implements TbGroupService {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private TbGroupDao tbGroupDao;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询围栏组列表
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<TbGroup> selectTbGroupList() {
|
||||||
|
return tbGroupDao.selectTbGroupList();
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,17 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
|
<!DOCTYPE mapper
|
||||||
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<!--
|
||||||
|
1.在mybats的开发中namespace有特殊的意思,一定要是对应接口的全限定名
|
||||||
|
通过namespace可以简历mapper.xml和接口之间的关系(名字不重要,位置不重要)
|
||||||
|
-->
|
||||||
|
<mapper namespace="com.muyu.fence.mapper.TbGroupDao">
|
||||||
|
|
||||||
|
<!--查询围栏组列表-->
|
||||||
|
<select id="selectTbGroupList" resultType="com.muyu.fence.domain.TbGroup">
|
||||||
|
select group_id, group_name
|
||||||
|
from tb_group;
|
||||||
|
</select>
|
||||||
|
|
||||||
|
</mapper>
|
Loading…
Reference in New Issue