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());
        }
    }
    

      

     

  • 相关阅读:
    一个完整的SQL SERVER数据库全文索引的示例
    sqlhelper for access
    解决打开网站弹出下载文件
    18句话入门SQLServer XML
    c# winform 自动关闭messagebox 模拟回车
    jquery json
    用超级巡警批量清除被挂马的网页
    sqlhelper for sql
    SQL XML DML 数据修改
    post方法易错地方
  • 原文地址:https://www.cnblogs.com/vincentmax/p/14363169.html
Copyright © 2011-2022 走看看