zoukankan      html  css  js  c++  java
  • impl实现

    ICMSTypeService接口

    /**
     * 修改公告类型
     * @param cmsType
     * @return
     */
    int updateCMSType(CMSType cmsType);
    

      

    CMSTypeServiceImpl实现类

    /**
     * 修改公告类型
     * @param cmsType
     * @return
     */
    @Override
    public int updateCMSType(CMSType cmsType) {
        cmsType.setUpdateBy(ShiroUtils.getLoginName());
        return cmsTypeMapper.updateCMSType(cmsType);
    }
    

      

    CMSTypeMapper接口

    /**
     * 修改公告类型
     * @param cmsType
     * @return
     */
    int updateCMSType(CMSType cmsType);
    

     

    CMSTypeMapper.xml

    <!--修改公告类型-->
    <update id="updateCMSType">
        update cms_type
        <set>
            <if test="typeName != null and typeName != ''">type_name = #{typeName},</if>
            <if test="typeSort != null and typeSort != ''">type_sort = #{typeSort},</if>
            <if test="typeDesc != null">type_desc = #{typeDesc},</if>
            <if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
            update_time = sysdate()
        </set>
        where type_id = #{typeId}
    </update>
    

      

    CMSTypeController中新增删除的单元方法

    /**
     * 删除公告类型
     */
    @RequiresPermissions("cms:type:remove")
    @Log(title = "公告管理", businessType = BusinessType.DELETE)
    @PostMapping("/remove")
    @ResponseBody
    public AjaxResult remove(String ids)
    {
        try
        {
            return toAjax(cmsTypeService.deleteCMSTypeByIds(ids));
        }
        catch (Exception e)
        {
            return error(e.getMessage());
        }
    }
    

      

     

  • 相关阅读:
    使用kubeadm部署K8S v1.17.0集群
    06Shell并发控制
    05Shell循环语句
    04Shell流程控制
    03Shell条件测试
    02Shell变量
    01Shell入门02-echo和printf
    01Shell入门01-bash Shell特性
    局域网部署ntp时间服务器
    聊聊、Mybatis集成Spring XML方式
  • 原文地址:https://www.cnblogs.com/vincentmax/p/14363169.html
Copyright © 2011-2022 走看看