smartor/src/main/resources/mapper/smartor/ServiceSubtaskPreachformMapper.xml
@@ -263,6 +263,23 @@
            </if>
    </update>
    <!-- 微信公众号已领取未填写按默认选项完成:仅更新当前子任务的当前公众号行。
         只允许从已发送(2)/已领取(3)迁移到完成(9),避免并发或重复补偿覆盖其他状态。 -->
    <update id="updateWechatPreachformComplete" parameterType="com.smartor.domain.ServiceSubtaskPreachform">
        update service_subtask_preachform
        set sendstate = '9',
            remark = case
                         when remark is null or remark = '' then #{remark}
                         else concat(remark, ',', #{remark})
                     end,
            update_time = now()
        where id = #{id}
          and subid = #{subid}
          and orgid = #{orgid}
          and preachform = #{preachform}
          and sendstate in ('2', '3')
    </update>
    <update id="deleteServiceSubtaskPreachformById" parameterType="Long">
        update service_subtask_preachform