4 changed files with 89 additions and 0 deletions
			
			
		@ -0,0 +1,18 @@ | 
				
			|||
package com.epmet.dao; | 
				
			|||
 | 
				
			|||
import com.epmet.commons.mybatis.dao.BaseDao; | 
				
			|||
import com.epmet.entity.TagScopeEntity; | 
				
			|||
import org.apache.ibatis.annotations.Mapper; | 
				
			|||
import org.apache.ibatis.annotations.Param; | 
				
			|||
 | 
				
			|||
/** | 
				
			|||
 * 标签应用范围表 | 
				
			|||
 * | 
				
			|||
 * @author generator generator@elink-cn.com | 
				
			|||
 * @since v1.0.0 2023-03-02 | 
				
			|||
 */ | 
				
			|||
@Mapper | 
				
			|||
public interface TagScopeDao extends BaseDao<TagScopeEntity> { | 
				
			|||
 | 
				
			|||
    int deleteByTagId(@Param("tagId") String tagId, @Param("customerId") String customerId); | 
				
			|||
} | 
				
			|||
@ -0,0 +1,45 @@ | 
				
			|||
package com.epmet.entity; | 
				
			|||
 | 
				
			|||
import com.baomidou.mybatisplus.annotation.TableName; | 
				
			|||
import com.epmet.commons.mybatis.entity.BaseEpmetEntity; | 
				
			|||
import lombok.Data; | 
				
			|||
import lombok.EqualsAndHashCode; | 
				
			|||
 | 
				
			|||
/** | 
				
			|||
 * 标签应用范围表 | 
				
			|||
 * | 
				
			|||
 * @author generator generator@elink-cn.com | 
				
			|||
 * @since v1.0.0 2023-03-02 | 
				
			|||
 */ | 
				
			|||
@Data | 
				
			|||
@EqualsAndHashCode(callSuper=false) | 
				
			|||
@TableName("tag_scope") | 
				
			|||
public class TagScopeEntity extends BaseEpmetEntity { | 
				
			|||
 | 
				
			|||
	private static final long serialVersionUID = 1L; | 
				
			|||
 | 
				
			|||
    /** | 
				
			|||
     * 客户ID(0302因烟台需求增加此表) | 
				
			|||
     */ | 
				
			|||
	private String customerId; | 
				
			|||
 | 
				
			|||
    /** | 
				
			|||
     * 标签ID | 
				
			|||
     */ | 
				
			|||
	private String tagId; | 
				
			|||
 | 
				
			|||
    /** | 
				
			|||
     * 应用范围,这里只能是社区id | 
				
			|||
     */ | 
				
			|||
	private String agencyId; | 
				
			|||
 | 
				
			|||
	/** | 
				
			|||
	 * agency_id全路径,包含自身 | 
				
			|||
	 */ | 
				
			|||
	private String orgIdPath; | 
				
			|||
 | 
				
			|||
	/** | 
				
			|||
	 * 组织名称 | 
				
			|||
	 */ | 
				
			|||
	private String agencyName; | 
				
			|||
} | 
				
			|||
@ -0,0 +1,24 @@ | 
				
			|||
<?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="com.epmet.dao.TagScopeDao"> | 
				
			|||
 | 
				
			|||
    <resultMap type="com.epmet.entity.TagScopeEntity" id="tagScopeMap"> | 
				
			|||
        <result property="id" column="ID"/> | 
				
			|||
        <result property="customerId" column="CUSTOMER_ID"/> | 
				
			|||
        <result property="tagId" column="TAG_ID"/> | 
				
			|||
        <result property="agencyId" column="AGENCY_ID"/> | 
				
			|||
        <result property="delFlag" column="DEL_FLAG"/> | 
				
			|||
        <result property="revision" column="REVISION"/> | 
				
			|||
        <result property="createdBy" column="CREATED_BY"/> | 
				
			|||
        <result property="createdTime" column="CREATED_TIME"/> | 
				
			|||
        <result property="updatedBy" column="UPDATED_BY"/> | 
				
			|||
        <result property="updatedTime" column="UPDATED_TIME"/> | 
				
			|||
    </resultMap> | 
				
			|||
 | 
				
			|||
    <delete id="deleteByTagId" parameterType="map"> | 
				
			|||
        delete from tag_scope | 
				
			|||
       where TAG_ID=#{tagId} | 
				
			|||
         and CUSTOMER_ID=#{customerId} | 
				
			|||
    </delete> | 
				
			|||
</mapper> | 
				
			|||
					Loading…
					
					
				
		Reference in new issue