Merge branch 'main' of http://192.168.0.251:3000/localnet/localhost-back.git into main
This commit is contained in:
commit
b72ce018d5
@ -22,7 +22,7 @@ import io.company.localhost.common.annotation.ParameterCheck;
|
||||
import io.company.localhost.common.annotation.ReqMap;
|
||||
import io.company.localhost.common.dto.ApiResponse;
|
||||
import io.company.localhost.common.dto.MapDto;
|
||||
import io.company.localhost.service.RegisterService;
|
||||
import io.company.localhost.service.netmemberService;
|
||||
import io.company.localhost.service.commoncodService;
|
||||
import io.company.localhost.utils.AuthUtil;
|
||||
import io.company.localhost.utils.SessionListener;
|
||||
@ -60,7 +60,7 @@ import static org.springframework.security.web.authentication.rememberme.Abstrac
|
||||
public class UserController {
|
||||
|
||||
private final commoncodService commoncodservice;
|
||||
private final RegisterService registerService;
|
||||
private final netmemberService netmemberservice;
|
||||
|
||||
/**
|
||||
* 사용 가능 색상 조회
|
||||
@ -97,8 +97,8 @@ public class UserController {
|
||||
* @throws RuntimeException 파일 업로드 실패 시
|
||||
*/
|
||||
@PostMapping("/join")
|
||||
public ApiResponse<Integer> register(@RequestParam("profile") MultipartFile profile, @ReqMap MapDto map) {
|
||||
int member = registerService.register(profile, map);
|
||||
public ApiResponse<Integer> register(@RequestParam("memberPrf") MultipartFile memberPrf, @ReqMap MapDto map) {
|
||||
int member = netmemberservice.register(memberPrf, map);
|
||||
return ApiResponse.ok(member);
|
||||
}
|
||||
|
||||
@ -111,7 +111,7 @@ public class UserController {
|
||||
*/
|
||||
@GetMapping("/checkId")
|
||||
public ApiResponse<Boolean> selectCheckId(@RequestParam String memberIds) {
|
||||
boolean isDuplicate = registerService.selectCheckId(memberIds);
|
||||
boolean isDuplicate = netmemberservice.selectCheckId(memberIds);
|
||||
return ApiResponse.ok(!isDuplicate);
|
||||
}
|
||||
|
||||
@ -198,6 +198,19 @@ public class UserController {
|
||||
|
||||
return ApiResponse.ok(returnMessage);
|
||||
}
|
||||
/**
|
||||
* 사원 목록 전체 조회
|
||||
*
|
||||
*
|
||||
*
|
||||
*/
|
||||
@ParameterCheck
|
||||
@GetMapping("/allUserList")
|
||||
public ApiResponse<List<MapDto>> getallUserList() {
|
||||
List<MapDto> allUserList = netmemberservice.getallUserList();
|
||||
return ApiResponse.ok(allUserList);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Guest
|
||||
|
||||
@ -14,6 +14,8 @@
|
||||
*************************************************************/
|
||||
package io.company.localhost.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
import io.company.localhost.common.dto.MapDto;
|
||||
@ -27,4 +29,6 @@ public interface NetmemberMapper {
|
||||
int insertMember(MapDto map);
|
||||
|
||||
int selectCheckId(String memberIds);
|
||||
|
||||
List<MapDto> getallUserList();
|
||||
}
|
||||
|
||||
@ -15,6 +15,7 @@
|
||||
package io.company.localhost.service;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
import org.springframework.security.crypto.password.DelegatingPasswordEncoder;
|
||||
import org.springframework.stereotype.Service;
|
||||
@ -27,7 +28,7 @@ import lombok.RequiredArgsConstructor;
|
||||
|
||||
@Service
|
||||
@RequiredArgsConstructor
|
||||
public class RegisterService {
|
||||
public class netmemberService {
|
||||
private final NetmemberMapper memberMapper;
|
||||
private final commoncodMapper commoncodMapper;
|
||||
private final DelegatingPasswordEncoder passwordEncoder;
|
||||
@ -40,9 +41,9 @@ public class RegisterService {
|
||||
* @param map
|
||||
* @return
|
||||
*/
|
||||
public int register(MultipartFile profile, MapDto map) {
|
||||
public int register(MultipartFile memberPrf, MapDto map) {
|
||||
// 프로필 이미지 저장, 저장된 경로 가져옴
|
||||
String profilePath = fileService.uploadFile(profile, "profiles");
|
||||
String profilePath = fileService.uploadFile(memberPrf, "profiles");
|
||||
map.put("memberPrf", profilePath);
|
||||
|
||||
// 비밀번호 암호화 및 저장
|
||||
@ -78,5 +79,14 @@ public class RegisterService {
|
||||
public boolean selectCheckId(String memberIds) {
|
||||
return memberMapper.selectCheckId(memberIds) > 0;
|
||||
}
|
||||
/**
|
||||
* 사원 목록 전체 조회
|
||||
*
|
||||
* @param
|
||||
* @return
|
||||
*/
|
||||
public List<MapDto> getallUserList() {
|
||||
return memberMapper.getallUserList();
|
||||
}
|
||||
|
||||
}
|
||||
@ -36,7 +36,9 @@ public class MemberVo {
|
||||
private String passwordRes; // 비밀번호힌트답변
|
||||
private int position; // 직급
|
||||
private String address; // 주소
|
||||
private String addressDetail; // 상세주소
|
||||
private String zipcode; // 우편번호
|
||||
private Date birth; // 생년월일
|
||||
private String phone; // 전화번호
|
||||
private Date regist; // 가입요청일
|
||||
private Date isCdt; // 입사일
|
||||
|
||||
@ -20,8 +20,8 @@ spring:
|
||||
add-mappings: false
|
||||
servlet:
|
||||
multipart:
|
||||
max-file-size: 10MB
|
||||
max-request-size: 10MB
|
||||
max-file-size: 5MB
|
||||
max-request-size: 5MB
|
||||
|
||||
mybatis:
|
||||
mapper-locations: classpath:mapper/**/*.xml
|
||||
|
||||
@ -15,7 +15,9 @@
|
||||
, MEMBERPWR AS passwordRes
|
||||
, MEMBERPOS AS position
|
||||
, MEMBERARR AS address
|
||||
, MEMBERDTL AS addressDetail
|
||||
, MEMBERZIP AS zipcode
|
||||
, MEMBERBTH AS birth
|
||||
, MEMBERTEL AS phone
|
||||
, MEMBERRDT AS regist
|
||||
, MEMBERCDT AS isCdt
|
||||
@ -43,7 +45,9 @@
|
||||
MEMBERPWR,
|
||||
MEMBERPOS,
|
||||
MEMBERARR,
|
||||
MEMBERDTL,
|
||||
MEMBERZIP,
|
||||
MEMBERBTH,
|
||||
MEMBERTEL,
|
||||
MEMBERRDT,
|
||||
MEMBERCDT,
|
||||
@ -63,7 +67,9 @@
|
||||
#{memberPwr},
|
||||
#{memberPos},
|
||||
#{memberArr},
|
||||
#{memberDtl},
|
||||
#{memberZip},
|
||||
#{memberBth},
|
||||
#{memberTel},
|
||||
#{memberRdt},
|
||||
#{memberCdt},
|
||||
@ -81,5 +87,17 @@
|
||||
FROM netmember
|
||||
WHERE MEMBERIDS = #{memberIds}
|
||||
</select>
|
||||
<select id="getallUserList" resultType="Map">
|
||||
SELECT *
|
||||
FROM
|
||||
netmember
|
||||
WHERE
|
||||
MEMBERDEL = "N"
|
||||
AND
|
||||
MEMBERPRM = "Y"
|
||||
AND
|
||||
MEMBERLEA ="N"
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user