mirror of
https://github.com/suhf/No1WMS.git
synced 2026-02-05 04:03:45 +09:00
tiles * 일때 기능 없앰
This commit is contained in:
@@ -1,4 +1,26 @@
|
||||
package com.no1.wms.account;
|
||||
|
||||
import com.no1.wms.utils.ConstantValues;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Controller
|
||||
public class AccountController {
|
||||
|
||||
@Autowired
|
||||
AccountService accountService;
|
||||
|
||||
public ModelAndView list(ModelAndView mav, @RequestParam(defaultValue = "") String search, @RequestParam(defaultValue = "0") int start){
|
||||
|
||||
List<AccountDto> list = accountService.selectAll(search, start, ConstantValues.PER_PAGE);
|
||||
|
||||
mav.addObject("list", list);
|
||||
mav.setViewName("account/list");
|
||||
return mav;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
19
src/main/java/com/no1/wms/account/AccountMapper.java
Normal file
19
src/main/java/com/no1/wms/account/AccountMapper.java
Normal file
@@ -0,0 +1,19 @@
|
||||
package com.no1.wms.account;
|
||||
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@Repository
|
||||
@Mapper
|
||||
public interface AccountMapper {
|
||||
|
||||
int insert(AccountDto dto);
|
||||
int update(AccountDto dto);
|
||||
|
||||
int selectById(AccountDto dto);
|
||||
|
||||
List<AccountDto> selectAll(Map<String, Object> m);
|
||||
}
|
||||
@@ -1,4 +1,35 @@
|
||||
package com.no1.wms.account;
|
||||
|
||||
public interface AccountService {
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@Service
|
||||
public class AccountService {
|
||||
@Autowired
|
||||
AccountMapper mapper;
|
||||
|
||||
public int insert(AccountDto dto){
|
||||
return mapper.insert(dto);
|
||||
}
|
||||
public int update(AccountDto dto){
|
||||
return mapper.update(dto);
|
||||
}
|
||||
|
||||
public int selectById(AccountDto dto){
|
||||
return mapper.selectById(dto);
|
||||
}
|
||||
|
||||
public List<AccountDto> selectAll(String search, int start, int perPage){
|
||||
HashMap<String, Object> map = new HashMap<String, Object>();
|
||||
|
||||
|
||||
|
||||
|
||||
return mapper.selectAll(map);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
package com.no1.wms.account;
|
||||
|
||||
public class AccountServiceImpl {
|
||||
|
||||
}
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.no1.wms.authority;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
import com.no1.wms.utils.ConstantValues;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
@@ -14,11 +15,10 @@ import java.util.UUID;
|
||||
public class AuthorityController {
|
||||
@Autowired
|
||||
AuthorityService authorityService;
|
||||
private static final int PER_PAGE = 1000;
|
||||
|
||||
@GetMapping("/list")
|
||||
public ModelAndView list(ModelAndView mav, @RequestParam(defaultValue = "") String search, @RequestParam(defaultValue = "0") int start){
|
||||
List<AuthorityDto> list = authorityService.selectAll(search, start, PER_PAGE);
|
||||
List<AuthorityDto> list = authorityService.selectAll(search, start, ConstantValues.PER_PAGE);
|
||||
mav.addObject("list", list);
|
||||
mav.setViewName("/authority/list");
|
||||
return mav;
|
||||
|
||||
5
src/main/java/com/no1/wms/utils/ConstantValues.java
Normal file
5
src/main/java/com/no1/wms/utils/ConstantValues.java
Normal file
@@ -0,0 +1,5 @@
|
||||
package com.no1.wms.utils;
|
||||
|
||||
public class ConstantValues {
|
||||
public static final int PER_PAGE = 1000;
|
||||
}
|
||||
Reference in New Issue
Block a user