Nav修改
This commit is contained in:
parent
ac6e84bb06
commit
5fdda5bdb6
@ -7,6 +7,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
|
|||||||
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
@RestController
|
@RestController
|
||||||
public class NavController {
|
public class NavController {
|
||||||
@ -36,7 +37,7 @@ public class NavController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@RequestMapping("/selectAllNav")
|
@RequestMapping("/selectAllNav")
|
||||||
public HashMap<Integer, Object> selectAllNav(){
|
public List<Nav> selectAllNav(){
|
||||||
return navService.selectAllNav();
|
return navService.selectAllNav();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -24,6 +24,6 @@ public interface NavDao {
|
|||||||
int updateByPrimaryKey(Nav record);
|
int updateByPrimaryKey(Nav record);
|
||||||
|
|
||||||
Nav selectAlreadyExist(Nav nav);
|
Nav selectAlreadyExist(Nav nav);
|
||||||
@MapKey("id")
|
|
||||||
HashMap<Integer,Object> selectAllNav();
|
List<Nav> selectAllNav();
|
||||||
}
|
}
|
@ -3,6 +3,7 @@ package com.lovenav.service;
|
|||||||
import com.lovenav.entity.Nav;
|
import com.lovenav.entity.Nav;
|
||||||
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
public interface NavService {
|
public interface NavService {
|
||||||
public String deleteNav(Nav nav);
|
public String deleteNav(Nav nav);
|
||||||
@ -10,5 +11,5 @@ public interface NavService {
|
|||||||
public String selectNav(Nav nav);
|
public String selectNav(Nav nav);
|
||||||
public String addNav(Nav nav);
|
public String addNav(Nav nav);
|
||||||
|
|
||||||
HashMap<Integer,Object> selectAllNav();
|
List<Nav> selectAllNav();
|
||||||
}
|
}
|
||||||
|
@ -8,6 +8,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
@Service
|
@Service
|
||||||
public class NavServiceImpl implements NavService {
|
public class NavServiceImpl implements NavService {
|
||||||
@ -62,7 +63,7 @@ public class NavServiceImpl implements NavService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public HashMap<Integer,Object> selectAllNav() {
|
public List<Nav> selectAllNav() {
|
||||||
return navDao.selectAllNav();
|
return navDao.selectAllNav();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
from ln_nav
|
from ln_nav
|
||||||
where nav_name = #{navName,jdbcType=VARCHAR}
|
where nav_name = #{navName,jdbcType=VARCHAR}
|
||||||
</select>
|
</select>
|
||||||
<select id="selectAllNav" resultMap="BaseResultMap">
|
<select id="selectAllNav" resultType="com.lovenav.entity.Nav" resultMap="BaseResultMap">
|
||||||
select * from ln_nav;
|
select * from ln_nav;
|
||||||
</select>
|
</select>
|
||||||
<delete id="deleteByNavName" parameterType="java.lang.String">
|
<delete id="deleteByNavName" parameterType="java.lang.String">
|
||||||
|
Loading…
Reference in New Issue
Block a user