-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[#10172] Improved ambiguous classpath of mybatis mapper
- Loading branch information
Showing
13 changed files
with
339 additions
and
291 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
...c/main/resources/batch-mybatis-config.xml → .../resources/batch/batch-mybatis-config.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
17 changes: 17 additions & 0 deletions
17
...sources/mapper/alarm/PinotAlarmMapper.xml → ...sources/alarm/mapper/PinotAlarmMapper.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
.../resources/pinot-alarm-mybatis-config.xml → ...rces/alarm/pinot-alarm-mybatis-config.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
132 changes: 66 additions & 66 deletions
132
...src/main/resources/mapper/AlarmMapper.xml → ...main/resources/web/mapper/AlarmMapper.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,66 +1,66 @@ | ||
<?xml version="1.0" encoding="UTF-8" ?> | ||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | ||
|
||
<mapper namespace="com.navercorp.pinpoint.web.dao.AlarmDao"> | ||
|
||
<insert id="insertRule" parameterType="Rule" useGeneratedKeys="true" keyProperty="ruleId"> | ||
INSERT INTO alarm_rule (application_id, service_type, checker_name, threshold, user_group_id, sms_send, email_send, webhook_send, notes) | ||
VALUES | ||
(#{applicationId}, #{serviceType}, #{checkerName}, #{threshold}, #{userGroupId}, #{smsSend}, #{emailSend}, #{webhookSend}, #{notes}) | ||
</insert> | ||
|
||
<insert id="insertRuleExceptWebhookSend" parameterType="Rule" useGeneratedKeys="true" keyProperty="ruleId"> | ||
INSERT INTO alarm_rule (application_id, service_type, checker_name, threshold, user_group_id, sms_send, email_send, notes) | ||
VALUES | ||
(#{applicationId}, #{serviceType}, #{checkerName}, #{threshold}, #{userGroupId}, #{smsSend}, #{emailSend}, #{notes}) | ||
</insert> | ||
|
||
<delete id="deleteRule" parameterType="Rule"> | ||
DELETE | ||
FROM alarm_rule | ||
WHERE rule_id = #{ruleId} | ||
</delete> | ||
|
||
<select id="selectRuleByUserGroupId" resultType="Rule"> | ||
SELECT * | ||
FROM alarm_rule | ||
WHERE user_group_id = #{userGroupId} | ||
</select> | ||
|
||
<select id="selectRuleByApplicationId" resultType="Rule"> | ||
SELECT * | ||
FROM alarm_rule | ||
WHERE application_id = #{applicationId} | ||
</select> | ||
|
||
<select id="selectApplicationId" resultType="string"> | ||
SELECT DISTINCT(application_id) | ||
FROM alarm_rule | ||
</select> | ||
|
||
<update id="updateRule"> | ||
UPDATE alarm_rule | ||
SET application_id = #{applicationId}, service_type = #{serviceType}, checker_name = #{checkerName}, threshold = #{threshold}, user_group_id = #{userGroupId}, sms_send = #{smsSend}, email_send = #{emailSend}, webhook_send = #{webhookSend}, notes = #{notes} | ||
WHERE rule_id = #{ruleId} | ||
</update> | ||
|
||
|
||
<update id="updateRuleExceptWebhookSend"> | ||
UPDATE alarm_rule | ||
SET application_id = #{applicationId}, service_type = #{serviceType}, checker_name = #{checkerName}, threshold = #{threshold}, user_group_id = #{userGroupId}, sms_send = #{smsSend}, email_send = #{emailSend}, notes = #{notes} | ||
WHERE rule_id = #{ruleId} | ||
</update> | ||
|
||
<update id="updateUserGroupIdOfRule" parameterType="UserGroup"> | ||
UPDATE alarm_rule | ||
SET user_group_id = #{id} | ||
WHERE user_group_id = (SELECT id FROM user_group WHERE number = #{number}) | ||
</update> | ||
|
||
<delete id="deleteCheckerResult" parameterType="string"> | ||
DELETE | ||
FROM alarm_history | ||
WHERE rule_id = #{ruleId} | ||
</delete> | ||
|
||
</mapper> | ||
<?xml version="1.0" encoding="UTF-8" ?> | ||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | ||
|
||
<mapper namespace="com.navercorp.pinpoint.web.dao.AlarmDao"> | ||
|
||
<insert id="insertRule" parameterType="Rule" useGeneratedKeys="true" keyProperty="ruleId"> | ||
INSERT INTO alarm_rule (application_id, service_type, checker_name, threshold, user_group_id, sms_send, email_send, webhook_send, notes) | ||
VALUES | ||
(#{applicationId}, #{serviceType}, #{checkerName}, #{threshold}, #{userGroupId}, #{smsSend}, #{emailSend}, #{webhookSend}, #{notes}) | ||
</insert> | ||
|
||
<insert id="insertRuleExceptWebhookSend" parameterType="Rule" useGeneratedKeys="true" keyProperty="ruleId"> | ||
INSERT INTO alarm_rule (application_id, service_type, checker_name, threshold, user_group_id, sms_send, email_send, notes) | ||
VALUES | ||
(#{applicationId}, #{serviceType}, #{checkerName}, #{threshold}, #{userGroupId}, #{smsSend}, #{emailSend}, #{notes}) | ||
</insert> | ||
|
||
<delete id="deleteRule" parameterType="Rule"> | ||
DELETE | ||
FROM alarm_rule | ||
WHERE rule_id = #{ruleId} | ||
</delete> | ||
|
||
<select id="selectRuleByUserGroupId" resultType="Rule"> | ||
SELECT * | ||
FROM alarm_rule | ||
WHERE user_group_id = #{userGroupId} | ||
</select> | ||
|
||
<select id="selectRuleByApplicationId" resultType="Rule"> | ||
SELECT * | ||
FROM alarm_rule | ||
WHERE application_id = #{applicationId} | ||
</select> | ||
|
||
<select id="selectApplicationId" resultType="string"> | ||
SELECT DISTINCT(application_id) | ||
FROM alarm_rule | ||
</select> | ||
|
||
<update id="updateRule"> | ||
UPDATE alarm_rule | ||
SET application_id = #{applicationId}, service_type = #{serviceType}, checker_name = #{checkerName}, threshold = #{threshold}, user_group_id = #{userGroupId}, sms_send = #{smsSend}, email_send = #{emailSend}, webhook_send = #{webhookSend}, notes = #{notes} | ||
WHERE rule_id = #{ruleId} | ||
</update> | ||
|
||
|
||
<update id="updateRuleExceptWebhookSend"> | ||
UPDATE alarm_rule | ||
SET application_id = #{applicationId}, service_type = #{serviceType}, checker_name = #{checkerName}, threshold = #{threshold}, user_group_id = #{userGroupId}, sms_send = #{smsSend}, email_send = #{emailSend}, notes = #{notes} | ||
WHERE rule_id = #{ruleId} | ||
</update> | ||
|
||
<update id="updateUserGroupIdOfRule" parameterType="UserGroup"> | ||
UPDATE alarm_rule | ||
SET user_group_id = #{id} | ||
WHERE user_group_id = (SELECT id FROM user_group WHERE number = #{number}) | ||
</update> | ||
|
||
<delete id="deleteCheckerResult" parameterType="string"> | ||
DELETE | ||
FROM alarm_history | ||
WHERE rule_id = #{ruleId} | ||
</delete> | ||
|
||
</mapper> |
Oops, something went wrong.