물건정보 갱신일 수정 API 개발
This commit is contained in:
parent
8c42932f8b
commit
db10023a63
@ -93,6 +93,13 @@ public class ObjectController {
|
|||||||
return objectService.updateObject(objectRequest);
|
return objectService.updateObject(objectRequest);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Operation(description = "물건정보 갱신일을 수정한다.")
|
||||||
|
@PutMapping("/update-object-date")
|
||||||
|
@ResponseStatus(HttpStatus.CREATED)
|
||||||
|
public void updateObjectLastEditDate(@RequestBody ObjectRequest objectRequest) throws Exception {
|
||||||
|
objectService.updateObjectLastEditDate(objectRequest);
|
||||||
|
}
|
||||||
|
|
||||||
@Operation(description = "물건정보을 삭제한다.")
|
@Operation(description = "물건정보을 삭제한다.")
|
||||||
@DeleteMapping("/{objectNo}")
|
@DeleteMapping("/{objectNo}")
|
||||||
@ResponseStatus(HttpStatus.NO_CONTENT)
|
@ResponseStatus(HttpStatus.NO_CONTENT)
|
||||||
|
|||||||
@ -49,6 +49,9 @@ public interface ObjectMapper {
|
|||||||
// 물건정보 수정
|
// 물건정보 수정
|
||||||
public int updateObject(ObjectRequest objectRequest);
|
public int updateObject(ObjectRequest objectRequest);
|
||||||
|
|
||||||
|
// 물건정보 갱신일 수정
|
||||||
|
public int updateObjectLastEditDate(ObjectRequest objectRequest);
|
||||||
|
|
||||||
// 물건정보 삭제
|
// 물건정보 삭제
|
||||||
public int deleteObject(ObjectRequest objectRequest);
|
public int deleteObject(ObjectRequest objectRequest);
|
||||||
|
|
||||||
|
|||||||
@ -398,6 +398,28 @@ public class ObjectService {
|
|||||||
return objectResponse;
|
return objectResponse;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 물건정보 갱신일 수정
|
||||||
|
*
|
||||||
|
* @param objectRequest
|
||||||
|
* @throws Exception
|
||||||
|
*/
|
||||||
|
public void updateObjectLastEditDate(ObjectRequest objectRequest) throws Exception {
|
||||||
|
// Validation
|
||||||
|
if (StringUtils.isEmpty(objectRequest.getObjectNo())) {
|
||||||
|
throw new QcastException(
|
||||||
|
ErrorCode.INVALID_INPUT_VALUE,
|
||||||
|
message.getMessage("common.message.required.data", "Object No"));
|
||||||
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
// object 갱신일 수정
|
||||||
|
objectMapper.updateObjectLastEditDate(objectRequest);
|
||||||
|
} catch (Exception e) {
|
||||||
|
throw new QcastException(ErrorCode.INTERNAL_SERVER_ERROR);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 물건정보 삭제
|
* 물건정보 삭제
|
||||||
*
|
*
|
||||||
|
|||||||
@ -632,6 +632,28 @@
|
|||||||
WHERE OBJECT_NO = #{objectNo}
|
WHERE OBJECT_NO = #{objectNo}
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
|
<update id="updateObjectLastEditDate" parameterType="com.interplug.qcast.biz.object.dto.ObjectRequest">
|
||||||
|
/* sqlid : com.interplug.qcast.biz.object.updateObjectLastEditDate */
|
||||||
|
UPDATE T_OBJECT
|
||||||
|
SET
|
||||||
|
OBJECT_NO = #{objectNo}
|
||||||
|
<if test='standardWindSpeedId != null and standardWindSpeedId != ""'>
|
||||||
|
, STANDARD_WIND_SPEED_ID = #{standardWindSpeedId}
|
||||||
|
</if>
|
||||||
|
<if test='verticalSnowCover != null and verticalSnowCover != ""'>
|
||||||
|
, VERTICAL_SNOW_COVER = #{verticalSnowCover}
|
||||||
|
</if>
|
||||||
|
<if test='surfaceType != null and surfaceType != ""'>
|
||||||
|
, SURFACE_TYPE = #{surfaceType}
|
||||||
|
</if>
|
||||||
|
<if test='installHeight != null and installHeight != ""'>
|
||||||
|
, INSTALL_HEIGHT = #{installHeight}
|
||||||
|
</if>
|
||||||
|
, LAST_EDIT_DATETIME = GETDATE()
|
||||||
|
, LAST_EDIT_USER = #{userId}
|
||||||
|
WHERE OBJECT_NO = #{objectNo}
|
||||||
|
</update>
|
||||||
|
|
||||||
<update id="updateObjectDelivery" parameterType="com.interplug.qcast.biz.object.dto.ObjectRequest">
|
<update id="updateObjectDelivery" parameterType="com.interplug.qcast.biz.object.dto.ObjectRequest">
|
||||||
/* sqlid : com.interplug.qcast.biz.object.updateObjectDelivery */
|
/* sqlid : com.interplug.qcast.biz.object.updateObjectDelivery */
|
||||||
UPDATE A SET
|
UPDATE A SET
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user