diff --git a/build.gradle b/build.gradle index 14d2d37..016b65c 100644 --- a/build.gradle +++ b/build.gradle @@ -19,15 +19,19 @@ repositories { dependencies { implementation 'org.springframework.boot:spring-boot-starter-jdbc' implementation 'org.springframework.boot:spring-boot-starter-web' - implementation 'org.mybatis.spring.boot:mybatis-spring-boot-starter:2.3.0' + implementation 'org.mybatis.spring.boot:mybatis-spring-boot-starter:2.1.3' compileOnly 'org.projectlombok:lombok' developmentOnly 'org.springframework.boot:spring-boot-devtools' runtimeOnly 'org.mariadb.jdbc:mariadb-java-client' annotationProcessor 'org.projectlombok:lombok' - implementation group: 'org.glassfish.web', name: 'jakarta.servlet.jsp.jstl', version: '2.0.0' + // https://mvnrepository.com/artifact/javax.servlet/jstl + implementation group: 'javax.servlet', name: 'jstl', version: '1.2' + + + implementation 'org.apache.tomcat.embed:tomcat-embed-jasper' testImplementation 'org.springframework.boot:spring-boot-starter-test' - testImplementation 'org.mybatis.spring.boot:mybatis-spring-boot-starter-test:2.3.0' + testImplementation 'org.mybatis.spring.boot:mybatis-spring-boot-starter-test:2.1.3' // https://mvnrepository.com/artifact/com.google.code.gson/gson implementation group: 'com.google.code.gson', name: 'gson', version: '2.10.1' // https://mvnrepository.com/artifact/org.apache.poi/poi diff --git a/src/main/java/com/no1/wms/authority/AuthorityController.java b/src/main/java/com/no1/wms/authority/AuthorityController.java index 9c778a8..fbba874 100644 --- a/src/main/java/com/no1/wms/authority/AuthorityController.java +++ b/src/main/java/com/no1/wms/authority/AuthorityController.java @@ -5,6 +5,8 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.servlet.ModelAndView; +import java.util.UUID; + @Controller public class AuthorityController { @Autowired @@ -12,10 +14,11 @@ public class AuthorityController { @GetMapping("/test/tt") - public ModelAndView test(ModelAndView mav){ - //AuthorityDto dto = authorityService.selectById("94690a18-a933-11ee-b9dd-0242ac110006"); + public ModelAndView test(ModelAndView mav, AuthorityDto d){ + d.setId("94690a18-a933-11ee-b9dd-0242ac110006"); + AuthorityDto dto = authorityService.selectById(d); - //System.out.println(dto.getName()); + System.out.println(dto.getName()); mav.setViewName("test/testlayout"); return mav; diff --git a/src/main/java/com/no1/wms/authority/AuthorityDto.java b/src/main/java/com/no1/wms/authority/AuthorityDto.java index d118ce3..b925d9c 100644 --- a/src/main/java/com/no1/wms/authority/AuthorityDto.java +++ b/src/main/java/com/no1/wms/authority/AuthorityDto.java @@ -10,20 +10,21 @@ import java.util.UUID; @AllArgsConstructor @Alias("AuthorityDto") public class AuthorityDto { - private UUID id; + private String id; private String name; - private int account; - private int authority; - private int productCategory; - private int product; - private int prices; - private int vendor; - private int warehouse; - private int stock; - private int planIn; - private int productIn; - private int productOut; - private int board; - private boolean activation; - private boolean isGroupAuthority; + private Integer account; + private Integer authority; + private Integer productCategory; + private Integer product; + private Integer prices; + private Integer vendor; + private Integer warehouse; + private Integer stock; + private Integer planIn; + private Integer productIn; + private Integer productOut; + private Integer board; + private Boolean activation; + private Boolean isGroupAuthority; + } diff --git a/src/main/java/com/no1/wms/authority/AuthorityMapper.java b/src/main/java/com/no1/wms/authority/AuthorityMapper.java index 212457a..5d8cec1 100644 --- a/src/main/java/com/no1/wms/authority/AuthorityMapper.java +++ b/src/main/java/com/no1/wms/authority/AuthorityMapper.java @@ -1,11 +1,12 @@ package com.no1.wms.authority; import org.apache.ibatis.annotations.Mapper; +import org.springframework.stereotype.Repository; import java.util.UUID; - +@Repository @Mapper public interface AuthorityMapper { - AuthorityDto selectById(String id); + AuthorityDto selectById(AuthorityDto id); } diff --git a/src/main/java/com/no1/wms/authority/AuthorityService.java b/src/main/java/com/no1/wms/authority/AuthorityService.java index a95ebf1..854a0cc 100644 --- a/src/main/java/com/no1/wms/authority/AuthorityService.java +++ b/src/main/java/com/no1/wms/authority/AuthorityService.java @@ -11,7 +11,7 @@ public class AuthorityService { @Autowired AuthorityMapper mapper; - public AuthorityDto selectById(String id){ - return mapper.selectById(id); + public AuthorityDto selectById(AuthorityDto dto){ + return mapper.selectById(dto); } } diff --git a/src/main/java/com/no1/wms/base/WebConfig.java b/src/main/java/com/no1/wms/base/WebConfig.java index 11dddd1..60ed3bd 100644 --- a/src/main/java/com/no1/wms/base/WebConfig.java +++ b/src/main/java/com/no1/wms/base/WebConfig.java @@ -1,6 +1,7 @@ package com.no1.wms.base; +import org.mybatis.spring.annotation.MapperScan; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; diff --git a/src/main/java/com/no1/wms/category/CategoryController.java b/src/main/java/com/no1/wms/category/CategoryController.java index 1efce4e..eba75fe 100644 --- a/src/main/java/com/no1/wms/category/CategoryController.java +++ b/src/main/java/com/no1/wms/category/CategoryController.java @@ -2,6 +2,8 @@ package com.no1.wms.category; import java.util.List; +import javax.servlet.http.HttpServletResponse; + import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; @@ -16,7 +18,6 @@ import org.springframework.web.bind.annotation.ResponseBody; import com.no1.wms.excel.ExcelUtils; -import javax.servlet.http.HttpServletResponse; @Controller diff --git a/src/main/java/com/no1/wms/excel/ExcelUtils.java b/src/main/java/com/no1/wms/excel/ExcelUtils.java index 691d14b..32e5af0 100644 --- a/src/main/java/com/no1/wms/excel/ExcelUtils.java +++ b/src/main/java/com/no1/wms/excel/ExcelUtils.java @@ -4,6 +4,8 @@ import java.io.IOException; import java.io.UnsupportedEncodingException; import java.util.List; +import javax.servlet.http.HttpServletResponse; + import org.apache.poi.hssf.usermodel.HSSFWorkbook; import org.apache.poi.ss.usermodel.Cell; import org.apache.poi.ss.usermodel.Row; @@ -13,7 +15,8 @@ import org.springframework.stereotype.Service; import com.no1.wms.category.CategoryDto; -import javax.servlet.http.HttpServletResponse; + + @Service public class ExcelUtils { diff --git a/src/main/resources/static/css/base.css b/src/main/resources/static/css/base.css index e01d63e..ad281d4 100644 --- a/src/main/resources/static/css/base.css +++ b/src/main/resources/static/css/base.css @@ -18,4 +18,45 @@ } #search_modal_content{ height : 80vh; -} \ No newline at end of file +} + +.w-10{ + width : 10%!important; +} + +.w-15{ + width : 15%!important; +} + +.w-20{ + width : 20%!important; +} + +.w-25{ + width : 25%!important; +} + +.w-30{ + width : 30%!important; +} +.w-35{ + width : 35%!important; +} +.w-40{ + width : 40%!important; +} +.w-45{ + width : 45%!important; +} +.w-50{ + width : 50%!important; +} +.w-55{ + width : 50%!important; +} +.w-60{ + width : 60%!important; +} +.w-65{ + width : 65%!important; +} diff --git a/src/main/resources/static/dev/base.css b/src/main/resources/static/dev/base.css index e01d63e..ad281d4 100644 --- a/src/main/resources/static/dev/base.css +++ b/src/main/resources/static/dev/base.css @@ -18,4 +18,45 @@ } #search_modal_content{ height : 80vh; -} \ No newline at end of file +} + +.w-10{ + width : 10%!important; +} + +.w-15{ + width : 15%!important; +} + +.w-20{ + width : 20%!important; +} + +.w-25{ + width : 25%!important; +} + +.w-30{ + width : 30%!important; +} +.w-35{ + width : 35%!important; +} +.w-40{ + width : 40%!important; +} +.w-45{ + width : 45%!important; +} +.w-50{ + width : 50%!important; +} +.w-55{ + width : 50%!important; +} +.w-60{ + width : 60%!important; +} +.w-65{ + width : 65%!important; +} diff --git a/src/main/webapp/WEB-INF/views/category/create.jsp b/src/main/webapp/WEB-INF/views/category/create.jsp index 249d531..6cfd6d3 100644 --- a/src/main/webapp/WEB-INF/views/category/create.jsp +++ b/src/main/webapp/WEB-INF/views/category/create.jsp @@ -5,15 +5,6 @@