parent
eef228aabb
commit
4528a2d677
11 changed files with 369 additions and 135 deletions
@ -0,0 +1,40 @@ |
|||||||
|
/** |
||||||
|
* The MIT License (MIT) |
||||||
|
* Copyright (c) 2012-present 铭软科技(mingsoft.net) |
||||||
|
* Permission is hereby granted, free of charge, to any person obtaining a copy of |
||||||
|
* this software and associated documentation files (the "Software"), to deal in |
||||||
|
* the Software without restriction, including without limitation the rights to |
||||||
|
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of |
||||||
|
* the Software, and to permit persons to whom the Software is furnished to do so, |
||||||
|
* subject to the following conditions: |
||||||
|
|
||||||
|
* The above copyright notice and this permission notice shall be included in all |
||||||
|
* copies or substantial portions of the Software. |
||||||
|
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
||||||
|
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS |
||||||
|
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR |
||||||
|
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER |
||||||
|
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN |
||||||
|
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
||||||
|
*/ |
||||||
|
|
||||||
|
|
||||||
|
package net.mingsoft.cms.biz; |
||||||
|
|
||||||
|
import net.mingsoft.base.biz.IBaseBiz; |
||||||
|
import net.mingsoft.cms.entity.CmsSignEntity; |
||||||
|
import net.mingsoft.cms.entity.PhoneContactsEntity; |
||||||
|
|
||||||
|
import java.util.List; |
||||||
|
|
||||||
|
|
||||||
|
/** |
||||||
|
* 分类业务 |
||||||
|
* @author 铭飞开发团队 |
||||||
|
* 创建日期:2019-11-28 15:12:32<br/> |
||||||
|
* 历史修订:<br/> |
||||||
|
*/ |
||||||
|
public interface ICmsSignBiz extends IBaseBiz<CmsSignEntity> { |
||||||
|
|
||||||
|
} |
||||||
@ -0,0 +1,41 @@ |
|||||||
|
/** |
||||||
|
* The MIT License (MIT) |
||||||
|
* Copyright (c) 2012-present 铭软科技(mingsoft.net) |
||||||
|
* Permission is hereby granted, free of charge, to any person obtaining a copy of |
||||||
|
* this software and associated documentation files (the "Software"), to deal in |
||||||
|
* the Software without restriction, including without limitation the rights to |
||||||
|
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of |
||||||
|
* the Software, and to permit persons to whom the Software is furnished to do so, |
||||||
|
* subject to the following conditions: |
||||||
|
|
||||||
|
* The above copyright notice and this permission notice shall be included in all |
||||||
|
* copies or substantial portions of the Software. |
||||||
|
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
||||||
|
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS |
||||||
|
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR |
||||||
|
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER |
||||||
|
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN |
||||||
|
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
||||||
|
*/ |
||||||
|
|
||||||
|
|
||||||
|
package net.mingsoft.cms.dao; |
||||||
|
|
||||||
|
import net.mingsoft.base.dao.IBaseDao; |
||||||
|
import net.mingsoft.cms.entity.CmsSignEntity; |
||||||
|
import net.mingsoft.cms.entity.PhoneContactsEntity; |
||||||
|
import org.springframework.stereotype.Component; |
||||||
|
|
||||||
|
import java.util.List; |
||||||
|
|
||||||
|
/** |
||||||
|
* 分类持久层 |
||||||
|
* @author 铭飞开发团队 |
||||||
|
* 创建日期:2024-03-20 15:12:32<br/> |
||||||
|
* 历史修订:<br/> |
||||||
|
*/ |
||||||
|
@Component("cmsSignDao") |
||||||
|
public interface ICmsSignDao extends IBaseDao<CmsSignEntity> { |
||||||
|
|
||||||
|
} |
||||||
@ -0,0 +1,83 @@ |
|||||||
|
<?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="net.mingsoft.cms.dao.ICmsSignDao"> |
||||||
|
|
||||||
|
<resultMap id="resultMap" type="net.mingsoft.cms.entity.CmsSignEntity"> |
||||||
|
<id column="id" property="id" /><!--编号 --> |
||||||
|
<result column="content_id" property="contentId" /><!--关联文章Id --> |
||||||
|
<result column="manager_name" property="managerName" /><!--用户名 --> |
||||||
|
<result column="create_by" property="createBy" /><!--创建人 --> |
||||||
|
<result column="create_date" property="createDate" /><!--创建时间 --> |
||||||
|
<result column="update_by" property="updateBy" /><!--修改人 --> |
||||||
|
<result column="update_date" property="updateDate" /><!--修改时间 --> |
||||||
|
<result column="del" property="del" /><!--删除标记 --> |
||||||
|
</resultMap> |
||||||
|
|
||||||
|
|
||||||
|
<!--更新--> |
||||||
|
<update id="updateEntity" parameterType="net.mingsoft.cms.entity.CmsSignEntity"> |
||||||
|
update cms_sign |
||||||
|
<set> |
||||||
|
<if test="contentId != null and contentId != ''">content_id=#{contentId},</if> |
||||||
|
<if test="managerName != null and managerName != ''">manager_name=#{managerName},</if> |
||||||
|
<if test="createBy > 0">create_by=#{createBy},</if> |
||||||
|
<if test="createDate != null">create_date=#{createDate},</if> |
||||||
|
<if test="updateBy > 0">update_by=#{updateBy},</if> |
||||||
|
<if test="updateDate != null">update_date=#{updateDate},</if> |
||||||
|
<if test="del != null">del=#{del},</if> |
||||||
|
</set> |
||||||
|
where id = #{id} |
||||||
|
</update> |
||||||
|
|
||||||
|
<!--根据id获取--> |
||||||
|
<select id="getEntity" resultMap="resultMap" parameterType="int"> |
||||||
|
select * from cms_sign where id=#{id} |
||||||
|
</select> |
||||||
|
|
||||||
|
<!--根据实体获取--> |
||||||
|
<select id="getByEntity" resultMap="resultMap" parameterType="net.mingsoft.cms.entity.CmsSignEntity"> |
||||||
|
select * from cms_sign |
||||||
|
<where> |
||||||
|
<if test="contentId != null and contentId != ''">and content_id=#{contentId}</if> |
||||||
|
<if test="managerName != null and managerName != ''">and manager_name=#{managerName}</if> |
||||||
|
<if test="createBy > 0"> and create_by=#{createBy} </if> |
||||||
|
<if test="createDate != null"> and create_date=#{createDate} </if> |
||||||
|
<if test="updateBy > 0"> and update_by=#{updateBy} </if> |
||||||
|
<if test="updateDate != null"> and update_date=#{updateDate} </if> |
||||||
|
<if test="del != null"> and del=#{del} </if> |
||||||
|
</where> |
||||||
|
</select> |
||||||
|
|
||||||
|
<!--删除--> |
||||||
|
<delete id="deleteEntity" parameterType="int"> |
||||||
|
delete from cms_sign where id=#{id} |
||||||
|
</delete> |
||||||
|
|
||||||
|
<!--批量删除--> |
||||||
|
<delete id="delete" > |
||||||
|
delete from cms_sign |
||||||
|
<where> |
||||||
|
id in <foreach collection="ids" item="item" index="index" |
||||||
|
open="(" separator="," close=")">#{item}</foreach> |
||||||
|
</where> |
||||||
|
</delete> |
||||||
|
<!--查询全部--> |
||||||
|
<select id="queryAll" resultMap="resultMap"> |
||||||
|
select * from cms_sign order by id desc |
||||||
|
</select> |
||||||
|
<!--条件查询--> |
||||||
|
<select id="query" resultMap="resultMap"> |
||||||
|
select * from cms_sign |
||||||
|
<where> |
||||||
|
<if test="contentId != null and contentId != ''"> and content_id=#{contentId}</if> |
||||||
|
<if test="managerName != null and managerName != ''">and manager_name=#{managerName}</if> |
||||||
|
<if test="createBy > 0"> and create_by=#{createBy} </if> |
||||||
|
<if test="createDate != null"> and create_date=#{createDate} </if> |
||||||
|
<if test="updateBy > 0"> and update_by=#{updateBy} </if> |
||||||
|
<if test="updateDate != null"> and update_date=#{updateDate} </if> |
||||||
|
<if test="del != null"> and del=#{del} </if> |
||||||
|
<include refid="net.mingsoft.base.dao.IBaseDao.sqlWhere"></include> |
||||||
|
</where> |
||||||
|
</select> |
||||||
|
|
||||||
|
</mapper> |
||||||
Loading…
Reference in new issue