mirror of
https://github.com/suhf/No1WMS.git
synced 2026-02-05 12:13:33 +09:00
update Category
This commit is contained in:
@@ -126,13 +126,11 @@ public class CategoryController {
|
||||
}
|
||||
|
||||
// KAN코드 중복확인 메서드
|
||||
|
||||
@PostMapping("/category/chackKancode")
|
||||
@PostMapping("/category/checkKancode")
|
||||
@ResponseBody
|
||||
public int chackKancode(String kan_code) {
|
||||
int chack = categoryService.checkKan(kan_code);
|
||||
System.out.println(chack);
|
||||
return chack;
|
||||
public String chackKancode(String kan_code) {
|
||||
String checkkan = categoryService.kanCheck(kan_code);
|
||||
return checkkan;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -14,4 +14,5 @@ public interface CategoryMapper {
|
||||
int updateByKanCode(CategoryDto dto);
|
||||
int deactivateByKanCode(String kan_code);
|
||||
int activateByKanCode(String kan_code);
|
||||
String kanCheck(String kan_code);
|
||||
}
|
||||
|
||||
@@ -52,14 +52,8 @@ public class CategoryService {
|
||||
return mapper.activateByKanCode(kan_code);
|
||||
}
|
||||
|
||||
public int checkKan(String kan_code) {
|
||||
CategoryDto dto = mapper.selectByKanCode(kan_code);
|
||||
String kancode = dto.getKan_code();
|
||||
if(kancode == null) {
|
||||
return 0;
|
||||
}else {
|
||||
return 1;
|
||||
}
|
||||
public String kanCheck(String kan_code) {
|
||||
return mapper.kanCheck(kan_code);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user