mirror of
https://github.com/suhf/No1WMS.git
synced 2026-02-04 19:54:00 +09:00
add stockController
This commit is contained in:
@@ -4,6 +4,7 @@ import java.io.Console;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.UUID;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
@@ -13,18 +14,43 @@ public class StockService {
|
||||
@Autowired
|
||||
StockMapper mapper;
|
||||
|
||||
public List<StockDto> stockList(int p){
|
||||
public int count(int searchn, String search) {
|
||||
|
||||
System.out.println(searchn+search);
|
||||
|
||||
Map<String,Object> m = new HashMap<String, Object>();
|
||||
m.put("searchn",searchn);
|
||||
m.put("search", search);
|
||||
return mapper.count(m);
|
||||
}
|
||||
|
||||
|
||||
public List<StockDto> stockList(int searchn, String search, int start){
|
||||
|
||||
int start = 0;
|
||||
int end = 0;
|
||||
System.out.println(searchn+search);
|
||||
|
||||
Map m = new HashMap<String, Object>();
|
||||
Map<String, Object> m = new HashMap<String, Object>();
|
||||
m.put("searchn",searchn);
|
||||
m.put("search", search);
|
||||
m.put("start", start);
|
||||
m.put("end", end);
|
||||
m.put("count", 10);
|
||||
|
||||
return mapper.stockList(m);
|
||||
|
||||
}
|
||||
|
||||
|
||||
public StockDto stockOne(UUID id) {
|
||||
return mapper.stockOne(id);
|
||||
}
|
||||
|
||||
|
||||
public int createStock(StockDto dto) {
|
||||
return mapper.createStock(dto);
|
||||
}
|
||||
|
||||
|
||||
public int updateStock(StockDto dto) {
|
||||
return mapper.updateStock(dto);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user