updateColorYon map으로 변경
This commit is contained in:
parent
712ae8e9c2
commit
7c3f646b36
@ -71,8 +71,8 @@ public class UserController {
|
|||||||
*/
|
*/
|
||||||
@ParameterCheck
|
@ParameterCheck
|
||||||
@GetMapping("/color")
|
@GetMapping("/color")
|
||||||
public ApiResponse<List<MapDto>> getColorList() {
|
public ApiResponse<List<MapDto>> getColorList(String type) {
|
||||||
List<MapDto> ColorList = commoncodservice.getColorList();
|
List<MapDto> ColorList = commoncodservice.getColorList(type);
|
||||||
return ApiResponse.ok(ColorList);
|
return ApiResponse.ok(ColorList);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -27,13 +27,13 @@ public interface commoncodMapper {
|
|||||||
|
|
||||||
Long insertCategory(MapDto map);
|
Long insertCategory(MapDto map);
|
||||||
|
|
||||||
List<MapDto> getColorList();
|
List<MapDto> getColorList(String type);
|
||||||
|
|
||||||
List<MapDto> getMbtiList();
|
List<MapDto> getMbtiList();
|
||||||
|
|
||||||
List<MapDto> getPwhintList();
|
List<MapDto> getPwhintList();
|
||||||
|
|
||||||
int updateColorYon(String color);
|
int updateColorYon(MapDto map);
|
||||||
|
|
||||||
List<MapDto> getYearCategories();
|
List<MapDto> getYearCategories();
|
||||||
|
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
/************************************************************
|
/************************************************************
|
||||||
*
|
*
|
||||||
* @packageName : io.company.localhost.RegisterService
|
* @packageName : io.company.localhost.NetmemberService
|
||||||
* @fileName : RegisterService.java
|
* @fileName : NetmemberService.java
|
||||||
* @author : 박지윤
|
* @author : 박지윤
|
||||||
* @date : 25.01.17
|
* @date : 25.01.17
|
||||||
* @description :
|
* @description :
|
||||||
@ -64,8 +64,14 @@ public class NetmemberService {
|
|||||||
int result = memberMapper.insertMember(map);
|
int result = memberMapper.insertMember(map);
|
||||||
|
|
||||||
// 선택한 색상 코드 사용 처리
|
// 선택한 색상 코드 사용 처리
|
||||||
String color = map.getString("memberCol");
|
String color = map.getString("memberCol");
|
||||||
commoncodMapper.updateColorYon(color);
|
|
||||||
|
// 색상 코드를 MapDto로 감싸서 전달
|
||||||
|
MapDto colorMap = new MapDto();
|
||||||
|
colorMap.put("color", color);
|
||||||
|
colorMap.put("type", "YON");
|
||||||
|
|
||||||
|
commoncodMapper.updateColorYon(colorMap);
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -36,8 +36,8 @@ public class commoncodService {
|
|||||||
return commoncodmapper.insertCategory(map);
|
return commoncodmapper.insertCategory(map);
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<MapDto> getColorList() {
|
public List<MapDto> getColorList(String type) {
|
||||||
return commoncodmapper.getColorList();
|
return commoncodmapper.getColorList(type);
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<MapDto> getMbtiList() {
|
public List<MapDto> getMbtiList() {
|
||||||
|
|||||||
@ -40,8 +40,12 @@
|
|||||||
CMNCODLV1 = 100
|
CMNCODLV1 = 100
|
||||||
AND
|
AND
|
||||||
CMNCODODR != 0
|
CMNCODODR != 0
|
||||||
AND
|
<if test="type == 'YON'">
|
||||||
CMNCODYON = 0
|
AND CMNCODYON = 0
|
||||||
|
</if>
|
||||||
|
<if test="type == 'YNP'">
|
||||||
|
AND CMNCODYNP = 0
|
||||||
|
</if>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="getMbtiList" resultType="Map">
|
<select id="getMbtiList" resultType="Map">
|
||||||
@ -68,9 +72,15 @@
|
|||||||
CMNCODODR != 0
|
CMNCODODR != 0
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<update id="updateColorYon" parameterType="String">
|
<update id="updateColorYon" parameterType="Map">
|
||||||
UPDATE commoncod
|
UPDATE commoncod
|
||||||
SET CMNCODYON = 1
|
SET
|
||||||
|
<if test="type == 'YON'">
|
||||||
|
CMNCODYON = 1
|
||||||
|
</if>
|
||||||
|
<if test="type == 'YNP'">
|
||||||
|
CMNCODYNP = 1
|
||||||
|
</if>
|
||||||
WHERE CMNCODVAL = #{color};
|
WHERE CMNCODVAL = #{color};
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
@ -92,5 +102,11 @@
|
|||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
<update id="updateColorYnp" parameterType="String">
|
||||||
|
UPDATE commoncod
|
||||||
|
SET CMNCODYNP = 1
|
||||||
|
WHERE CMNCODVAL = #{color};
|
||||||
|
</update>
|
||||||
|
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user