insert into plc_policy_cmd(plc_policy_id, policyType, base_time_type,
starttime1, bright1, color1,
endtime1, end_bright1, end_color1,
starttime2, bright2, color2,
endtime2, end_bright2, end_color2,
starttime3, bright3, color3,
endtime3, end_bright3, end_color3,
starttime4, bright4, color4,
endtime4, end_bright4, end_color4,
starttime5, bright5, color5,
endtime5, end_bright5, end_color5,
starttime6, bright6, color6,
endtime6, end_bright6, end_color6,
weekly,
lighter_mask)
values (#{plcPolicyId},#{policyType},#{baseTimeType},
#{startTime1},#{bright1},#{color1},
#{endTime1},#{endBright1},#{endColor1},
#{startTime2},#{bright2},#{color2},
#{endTime2},#{endBright2},#{endColor2},
#{startTime3},#{bright3},#{color3},
#{endTime3},#{endBright3},#{endColor3},
#{startTime4},#{bright4},#{color4},
#{endTime4},#{endBright4},#{endColor4},
#{startTime5},#{bright5},#{color5},
#{endTime5},#{endBright5},#{endColor5},
#{startTime6},#{bright6},#{color6},
#{endTime6},#{endBright6},#{endColor6},
#{weekly},
#{lighterMask})
insert into plc_policy_cmd(plc_policy_id, policyType, base_time_type,
sunrise, start_delay_time, start_bright, start_color,
sunset, end_delay_time, end_bright, end_color,
weekly,
lighter_mask)
values (#{plcPolicyId},#{policyType},#{baseTimeType},
#{sunrise},#{startDelayTime},#{startBright},#{startColor},
#{sunset},#{endDelayTime},#{endBright},#{endColor},
#{weekly},
#{lighterMask})
delete
from plc_policy_cmd
where plc_policy_id = #{plcPolicyId};