Explorar el Código

ljx:新增企业分类、价格指数的导入接口和模板接口;新增企业数据带分类的列表接口

ljx hace 1 mes
padre
commit
8048775aa5
Se han modificado 18 ficheros con 229 adiciones y 18 borrados
  1. 14 0
      enteprise-admin/src/main/java/com/enteprise/enterprise/controller/EnterpriseController.java
  2. 1 0
      enteprise-admin/src/main/java/com/enteprise/enterprise/dto/EnterpriseDto.java
  3. 8 0
      enteprise-admin/src/main/java/com/enteprise/enterprise/mapper/EnterpriseMapper.java
  4. 2 0
      enteprise-admin/src/main/java/com/enteprise/enterprise/service/IEnterpriseService.java
  5. 7 0
      enteprise-admin/src/main/java/com/enteprise/enterprise/service/impl/EnterpriseServiceImpl.java
  6. 32 2
      enteprise-admin/src/main/java/com/enteprise/etype/controller/EnterpriseTypeController.java
  7. 13 3
      enteprise-admin/src/main/java/com/enteprise/etype/domain/EnterpriseType.java
  8. 7 3
      enteprise-admin/src/main/java/com/enteprise/etype/mapper/EnterpriseTypeMapper.java
  9. 11 3
      enteprise-admin/src/main/java/com/enteprise/etype/service/IEnterpriseTypeService.java
  10. 40 3
      enteprise-admin/src/main/java/com/enteprise/etype/service/impl/EnterpriseTypeServiceImpl.java
  11. 30 0
      enteprise-admin/src/main/java/com/enteprise/priceindex/controller/PriceIndexController.java
  12. 1 0
      enteprise-admin/src/main/java/com/enteprise/priceindex/domain/PriceIndex.java
  13. 2 0
      enteprise-admin/src/main/java/com/enteprise/priceindex/mapper/PriceIndexMapper.java
  14. 8 0
      enteprise-admin/src/main/java/com/enteprise/priceindex/service/IPriceIndexService.java
  15. 20 0
      enteprise-admin/src/main/java/com/enteprise/priceindex/service/impl/PriceIndexServiceImpl.java
  16. 7 0
      enteprise-admin/src/main/resources/mapper/enterprise/EnterpriseMapper.xml
  17. 18 4
      enteprise-admin/src/main/resources/mapper/etype/EnterpriseTypeMapper.xml
  18. 8 0
      enteprise-admin/src/main/resources/mapper/priceindex/PriceIndexMapper.xml

+ 14 - 0
enteprise-admin/src/main/java/com/enteprise/enterprise/controller/EnterpriseController.java

@@ -2,6 +2,8 @@ package com.enteprise.enterprise.controller;
 
 import java.util.List;
 import javax.servlet.http.HttpServletResponse;
+
+import com.enteprise.enterprise.dto.EnterpriseDto;
 import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.GetMapping;
@@ -47,6 +49,18 @@ public class EnterpriseController extends BaseController
     }
 
     /**
+     * 查询enterprise列表
+     */
+    @PreAuthorize("@ss.hasPermi('enterprise:enterprise:list')")
+    @GetMapping("/tlist")
+    public TableDataInfo listWithType(Enterprise enterprise)
+    {
+        startPage();
+        List<EnterpriseDto> list = enterpriseService.selectAllWithType(enterprise);
+        return getDataTable(list);
+    }
+
+    /**
      * 导出enterprise列表
      */
     @PreAuthorize("@ss.hasPermi('enterprise:enterprise:export')")

+ 1 - 0
enteprise-admin/src/main/java/com/enteprise/enterprise/dto/EnterpriseDto.java

@@ -17,6 +17,7 @@ public class EnterpriseDto {
     @Excel(name = "行业代码")
     private String code;
 
+    @Excel(name = "分类名称")
     private String typeName;
 
     public String getTypeName() {

+ 8 - 0
enteprise-admin/src/main/java/com/enteprise/enterprise/mapper/EnterpriseMapper.java

@@ -2,6 +2,7 @@ package com.enteprise.enterprise.mapper;
 
 import java.util.List;
 import com.enteprise.enterprise.domain.Enterprise;
+import com.enteprise.enterprise.dto.EnterpriseDto;
 
 /**
  * enterpriseMapper接口
@@ -28,6 +29,13 @@ public interface EnterpriseMapper
     public List<Enterprise> selectEnterpriseList(Enterprise enterprise);
 
     /**
+     * 查询列表带分类
+     * @param enterprise
+     * @return
+     */
+    List<EnterpriseDto> selectAllWithType(Enterprise enterprise);
+
+    /**
      * 新增enterprise
      * 
      * @param enterprise enterprise

+ 2 - 0
enteprise-admin/src/main/java/com/enteprise/enterprise/service/IEnterpriseService.java

@@ -2,6 +2,7 @@ package com.enteprise.enterprise.service;
 
 import java.util.List;
 import com.enteprise.enterprise.domain.Enterprise;
+import com.enteprise.enterprise.dto.EnterpriseDto;
 
 /**
  * enterpriseService接口
@@ -27,6 +28,7 @@ public interface IEnterpriseService
      */
     public List<Enterprise> selectEnterpriseList(Enterprise enterprise);
 
+    public List<EnterpriseDto> selectAllWithType(Enterprise enterprise);
     /**
      * 新增enterprise
      * 

+ 7 - 0
enteprise-admin/src/main/java/com/enteprise/enterprise/service/impl/EnterpriseServiceImpl.java

@@ -1,6 +1,8 @@
 package com.enteprise.enterprise.service.impl;
 
 import java.util.List;
+
+import com.enteprise.enterprise.dto.EnterpriseDto;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import com.enteprise.enterprise.mapper.EnterpriseMapper;
@@ -43,6 +45,11 @@ public class EnterpriseServiceImpl implements IEnterpriseService
         return enterpriseMapper.selectEnterpriseList(enterprise);
     }
 
+    @Override
+    public List<EnterpriseDto> selectAllWithType(Enterprise enterprise) {
+        return enterpriseMapper.selectAllWithType(enterprise);
+    }
+
     /**
      * 新增enterprise
      * 

+ 32 - 2
enteprise-admin/src/main/java/com/enteprise/etype/controller/EnterpriseTypeController.java

@@ -2,6 +2,8 @@ package com.enteprise.etype.controller;
 
 import java.util.List;
 import javax.servlet.http.HttpServletResponse;
+
+import io.swagger.annotations.ApiOperation;
 import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.GetMapping;
@@ -20,6 +22,7 @@ import com.enteprise.etype.domain.EnterpriseType;
 import com.enteprise.etype.service.IEnterpriseTypeService;
 import com.enteprise.common.utils.poi.ExcelUtil;
 import com.enteprise.common.core.page.TableDataInfo;
+import org.springframework.web.multipart.MultipartFile;
 
 /**
  * etypeController
@@ -64,7 +67,7 @@ public class EnterpriseTypeController extends BaseController
      */
     @PreAuthorize("@ss.hasPermi('etype:etype:query')")
     @GetMapping(value = "/{number}")
-    public AjaxResult getInfo(@PathVariable("number") Long number)
+    public AjaxResult getInfo(@PathVariable("number") String number)
     {
         return success(enterpriseTypeService.selectEnterpriseTypeByNumber(number));
     }
@@ -97,8 +100,35 @@ public class EnterpriseTypeController extends BaseController
     @PreAuthorize("@ss.hasPermi('etype:etype:remove')")
     @Log(title = "etype", businessType = BusinessType.DELETE)
 	@DeleteMapping("/{numbers}")
-    public AjaxResult remove(@PathVariable Long[] numbers)
+    public AjaxResult remove(@PathVariable String[] numbers)
     {
+        System.out.println("");
         return toAjax(enterpriseTypeService.deleteEnterpriseTypeByNumbers(numbers));
     }
+
+    /**
+     * 导入
+     */
+    @ApiOperation("导入企业分类")
+    @Log(title = "资产信息", businessType = BusinessType.IMPORT)
+    @PreAuthorize("@ss.hasPermi('etype:etype:add')")
+    @PostMapping("/importData")
+    public AjaxResult importData(MultipartFile file) throws Exception {
+        // 获取模板工具
+        ExcelUtil<EnterpriseType> util = new ExcelUtil<>(EnterpriseType.class);
+        List<EnterpriseType> tbEnterpriseType = util.importExcel(file.getInputStream());
+        if (tbEnterpriseType.isEmpty()) {
+            return error("数据不得为空");
+        }
+        boolean result = enterpriseTypeService.batchTbEnterpriseType(tbEnterpriseType);
+        return result ? success() : error();
+    }
+
+    @ApiOperation("企业分类模板")
+    @PostMapping("/importTemplate")
+    public void importTemplate(HttpServletResponse response)
+    {
+        ExcelUtil<EnterpriseType> util = new ExcelUtil<>(EnterpriseType.class);
+        util.importTemplateExcel(response, "企业分类数据");
+    }
 }

+ 13 - 3
enteprise-admin/src/main/java/com/enteprise/etype/domain/EnterpriseType.java

@@ -15,20 +15,30 @@ public class EnterpriseType extends BaseEntity
 {
     private static final long serialVersionUID = 1L;
 
+    private int id;
+
     /** 分类编码 */
     @Excel(name = "分类编码")
-    private Long number;
+    private String number;
 
     /** 分类名称 */
     @Excel(name = "分类名称")
     private String name;
 
-    public void setNumber(Long number) 
+    public int getId() {
+        return id;
+    }
+
+    public void setId(int id) {
+        this.id = id;
+    }
+
+    public void setNumber(String number)
     {
         this.number = number;
     }
 
-    public Long getNumber() 
+    public String getNumber()
     {
         return number;
     }

+ 7 - 3
enteprise-admin/src/main/java/com/enteprise/etype/mapper/EnterpriseTypeMapper.java

@@ -17,7 +17,7 @@ public interface EnterpriseTypeMapper
      * @param number etype主键
      * @return etype
      */
-    public EnterpriseType selectEnterpriseTypeByNumber(Long number);
+    public EnterpriseType selectEnterpriseTypeByNumber(String number);
 
     /**
      * 查询etype列表
@@ -49,7 +49,7 @@ public interface EnterpriseTypeMapper
      * @param number etype主键
      * @return 结果
      */
-    public int deleteEnterpriseTypeByNumber(Long number);
+    public int deleteEnterpriseTypeByNumber(String number);
 
     /**
      * 批量删除etype
@@ -57,5 +57,9 @@ public interface EnterpriseTypeMapper
      * @param numbers 需要删除的数据主键集合
      * @return 结果
      */
-    public int deleteEnterpriseTypeByNumbers(Long[] numbers);
+    public int deleteEnterpriseTypeByNumbers(String[] numbers);
+
+
+    // 批量插入
+    void insertBatch(List<EnterpriseType> list);
 }

+ 11 - 3
enteprise-admin/src/main/java/com/enteprise/etype/service/IEnterpriseTypeService.java

@@ -17,7 +17,7 @@ public interface IEnterpriseTypeService
      * @param number etype主键
      * @return etype
      */
-    public EnterpriseType selectEnterpriseTypeByNumber(Long number);
+    public EnterpriseType selectEnterpriseTypeByNumber(String number);
 
     /**
      * 查询etype列表
@@ -35,6 +35,12 @@ public interface IEnterpriseTypeService
      */
     public int insertEnterpriseType(EnterpriseType enterpriseType);
 
+
+    /**
+     * 批量新增(导入)
+     */
+    boolean batchTbEnterpriseType(List<EnterpriseType> tbEnterpriseType);
+
     /**
      * 修改etype
      * 
@@ -49,7 +55,7 @@ public interface IEnterpriseTypeService
      * @param numbers 需要删除的etype主键集合
      * @return 结果
      */
-    public int deleteEnterpriseTypeByNumbers(Long[] numbers);
+    public int deleteEnterpriseTypeByNumbers(String[] numbers);
 
     /**
      * 删除etype信息
@@ -57,5 +63,7 @@ public interface IEnterpriseTypeService
      * @param number etype主键
      * @return 结果
      */
-    public int deleteEnterpriseTypeByNumber(Long number);
+    public int deleteEnterpriseTypeByNumber(String number);
+
+
 }

+ 40 - 3
enteprise-admin/src/main/java/com/enteprise/etype/service/impl/EnterpriseTypeServiceImpl.java

@@ -1,12 +1,17 @@
 package com.enteprise.etype.service.impl;
 
 import java.util.List;
+
+import com.enteprise.common.core.domain.entity.SysDept;
+import com.enteprise.system.mapper.SysDeptMapper;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import com.enteprise.etype.mapper.EnterpriseTypeMapper;
 import com.enteprise.etype.domain.EnterpriseType;
 import com.enteprise.etype.service.IEnterpriseTypeService;
 
+import javax.annotation.Resource;
+
 /**
  * etypeService业务层处理
  * 
@@ -19,6 +24,9 @@ public class EnterpriseTypeServiceImpl implements IEnterpriseTypeService
     @Autowired
     private EnterpriseTypeMapper enterpriseTypeMapper;
 
+    @Resource
+    private SysDeptMapper sysDeptMapper;
+
     /**
      * 查询etype
      * 
@@ -26,7 +34,7 @@ public class EnterpriseTypeServiceImpl implements IEnterpriseTypeService
      * @return etype
      */
     @Override
-    public EnterpriseType selectEnterpriseTypeByNumber(Long number)
+    public EnterpriseType selectEnterpriseTypeByNumber(String number)
     {
         return enterpriseTypeMapper.selectEnterpriseTypeByNumber(number);
     }
@@ -52,9 +60,38 @@ public class EnterpriseTypeServiceImpl implements IEnterpriseTypeService
     @Override
     public int insertEnterpriseType(EnterpriseType enterpriseType)
     {
+        // 1. 校验数据(例如检查分类编码是否重复)
+
+        if (enterpriseType.getNumber() == null || enterpriseType.getName() == null) {
+            throw new RuntimeException("分类编码或名称为空!");
+        }
+        // 检查数据库是否已存在相同编码
+        EnterpriseType exist = enterpriseTypeMapper.selectEnterpriseTypeByNumber(enterpriseType.getNumber());
+        if (exist != null) {
+            throw new RuntimeException("分类编码 " + enterpriseType.getNumber() + " 已存在!");
+        }
+
         return enterpriseTypeMapper.insertEnterpriseType(enterpriseType);
     }
 
+    @Override
+    public boolean batchTbEnterpriseType(List<EnterpriseType> tbEnterpriseType) {
+        // 1. 校验数据(检查分类编码是否重复)
+        for (EnterpriseType enterpriseType : tbEnterpriseType) {
+            if (enterpriseType.getNumber() == null || enterpriseType.getName() == null) {
+                throw new RuntimeException("分类编码或名称为空!");
+            }
+            // 检查数据库是否已存在相同编码
+            EnterpriseType exist = enterpriseTypeMapper.selectEnterpriseTypeByNumber(enterpriseType.getNumber());
+            if (exist != null) {
+                throw new RuntimeException("分类编码 " + enterpriseType.getNumber() + " 已存在!");
+            }
+        }
+        // 2. 批量插入数据库
+        enterpriseTypeMapper.insertBatch(tbEnterpriseType);
+        return false;
+    }
+
     /**
      * 修改etype
      * 
@@ -74,7 +111,7 @@ public class EnterpriseTypeServiceImpl implements IEnterpriseTypeService
      * @return 结果
      */
     @Override
-    public int deleteEnterpriseTypeByNumbers(Long[] numbers)
+    public int deleteEnterpriseTypeByNumbers(String[] numbers)
     {
         return enterpriseTypeMapper.deleteEnterpriseTypeByNumbers(numbers);
     }
@@ -86,7 +123,7 @@ public class EnterpriseTypeServiceImpl implements IEnterpriseTypeService
      * @return 结果
      */
     @Override
-    public int deleteEnterpriseTypeByNumber(Long number)
+    public int deleteEnterpriseTypeByNumber(String number)
     {
         return enterpriseTypeMapper.deleteEnterpriseTypeByNumber(number);
     }

+ 30 - 0
enteprise-admin/src/main/java/com/enteprise/priceindex/controller/PriceIndexController.java

@@ -2,6 +2,9 @@ package com.enteprise.priceindex.controller;
 
 import java.util.List;
 import javax.servlet.http.HttpServletResponse;
+
+import com.enteprise.etype.domain.EnterpriseType;
+import io.swagger.annotations.ApiOperation;
 import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.GetMapping;
@@ -20,6 +23,7 @@ import com.enteprise.priceindex.domain.PriceIndex;
 import com.enteprise.priceindex.service.IPriceIndexService;
 import com.enteprise.common.utils.poi.ExcelUtil;
 import com.enteprise.common.core.page.TableDataInfo;
+import org.springframework.web.multipart.MultipartFile;
 
 /**
  * priceindexController
@@ -101,4 +105,30 @@ public class PriceIndexController extends BaseController
     {
         return toAjax(priceIndexService.deletePriceIndexByIds(ids));
     }
+
+    /**
+     * 导入
+     */
+    @ApiOperation("导入价格指数")
+    @Log(title = "价格指数", businessType = BusinessType.IMPORT)
+    @PreAuthorize("@ss.hasPermi('priceindex:priceindex:add')")
+    @PostMapping("/importData")
+    public AjaxResult importData(MultipartFile file) throws Exception {
+        // 获取模板工具
+        ExcelUtil<PriceIndex> util = new ExcelUtil<>(PriceIndex.class);
+        List<PriceIndex> list = util.importExcel(file.getInputStream());
+        if (list.isEmpty()) {
+            return error("数据不得为空");
+        }
+        boolean result = priceIndexService.batchTbPriceIndex(list);
+        return result ? success() : error();
+    }
+
+    @ApiOperation("价格指数模板")
+    @PostMapping("/importTemplate")
+    public void importTemplate(HttpServletResponse response)
+    {
+        ExcelUtil<PriceIndex> util = new ExcelUtil<>(PriceIndex.class);
+        util.importTemplateExcel(response, "价格指数数据");
+    }
 }

+ 1 - 0
enteprise-admin/src/main/java/com/enteprise/priceindex/domain/PriceIndex.java

@@ -16,6 +16,7 @@ public class PriceIndex extends BaseEntity
     private static final long serialVersionUID = 1L;
 
     /** 代码 */
+    @Excel(name = "代码")
     private Long id;
 
     /** 名称 */

+ 2 - 0
enteprise-admin/src/main/java/com/enteprise/priceindex/mapper/PriceIndexMapper.java

@@ -58,4 +58,6 @@ public interface PriceIndexMapper
      * @return 结果
      */
     public int deletePriceIndexByIds(Long[] ids);
+
+    void insertBatch(List<PriceIndex> list);
 }

+ 8 - 0
enteprise-admin/src/main/java/com/enteprise/priceindex/service/IPriceIndexService.java

@@ -1,6 +1,8 @@
 package com.enteprise.priceindex.service;
 
 import java.util.List;
+
+import com.enteprise.etype.domain.EnterpriseType;
 import com.enteprise.priceindex.domain.PriceIndex;
 
 /**
@@ -36,6 +38,11 @@ public interface IPriceIndexService
     public int insertPriceIndex(PriceIndex priceIndex);
 
     /**
+     * 批量新增(导入)
+     */
+    boolean batchTbPriceIndex(List<PriceIndex> list);
+
+    /**
      * 修改priceindex
      * 
      * @param priceIndex priceindex
@@ -58,4 +65,5 @@ public interface IPriceIndexService
      * @return 结果
      */
     public int deletePriceIndexById(Long id);
+
 }

+ 20 - 0
enteprise-admin/src/main/java/com/enteprise/priceindex/service/impl/PriceIndexServiceImpl.java

@@ -1,6 +1,8 @@
 package com.enteprise.priceindex.service.impl;
 
 import java.util.List;
+
+import com.enteprise.etype.domain.EnterpriseType;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import com.enteprise.priceindex.mapper.PriceIndexMapper;
@@ -55,6 +57,24 @@ public class PriceIndexServiceImpl implements IPriceIndexService
         return priceIndexMapper.insertPriceIndex(priceIndex);
     }
 
+    @Override
+    public boolean batchTbPriceIndex(List<PriceIndex> list) {
+        //校验数据
+        for (PriceIndex PriceIndex : list) {
+            if (PriceIndex.getId() == null || PriceIndex.getName() == null) {
+                throw new RuntimeException("代码或名称为空!");
+            }
+            // 检查数据库是否已存在相同ID
+            PriceIndex exist = priceIndexMapper.selectPriceIndexById(PriceIndex.getId());
+            if (exist != null) {
+                throw new RuntimeException("代码 " + PriceIndex.getId() + " 已存在!");
+            }
+        }
+        //批量导入
+        priceIndexMapper.insertBatch(list);
+        return false;
+    }
+
     /**
      * 修改priceindex
      * 

+ 7 - 0
enteprise-admin/src/main/resources/mapper/enterprise/EnterpriseMapper.xml

@@ -63,4 +63,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             #{id}
         </foreach>
     </delete>
+
+    <select id="selectAllWithType" parameterType="Enterprise">
+        SELECT a.id, a.enterprise_name enterpriseName, a.location, a.code, b.name typeName
+        from enterprise a
+        left join enterprise_type b
+        on a.type_num = b.number
+    </select>
 </mapper>

+ 18 - 4
enteprise-admin/src/main/resources/mapper/etype/EnterpriseTypeMapper.xml

@@ -5,10 +5,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 <mapper namespace="com.enteprise.etype.mapper.EnterpriseTypeMapper">
     
     <resultMap type="EnterpriseType" id="EnterpriseTypeResult">
-        <result property="number"    column="number"    />
+        <result property="id"  column="id"/>
+        <result property="number"    column="number"   />
         <result property="name"    column="name"    />
+
     </resultMap>
 
+
+
     <sql id="selectEnterpriseTypeVo">
         select number, name from enterprise_type
     </sql>
@@ -21,7 +25,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         </where>
     </select>
     
-    <select id="selectEnterpriseTypeByNumber" parameterType="Long" resultMap="EnterpriseTypeResult">
+    <select id="selectEnterpriseTypeByNumber" parameterType="String" resultMap="EnterpriseTypeResult">
         <include refid="selectEnterpriseTypeVo"/>
         where number = #{number}
     </select>
@@ -42,11 +46,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         update enterprise_type
         <trim prefix="SET" suffixOverrides=",">
             <if test="name != null">name = #{name},</if>
+            <if test="number != null">number = #{number},</if>
         </trim>
-        where number = #{number}
+        where id = #{id}
     </update>
 
-    <delete id="deleteEnterpriseTypeByNumber" parameterType="Long">
+    <delete id="deleteEnterpriseTypeByNumber" parameterType="String">
         delete from enterprise_type where number = #{number}
     </delete>
 
@@ -56,4 +61,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             #{number}
         </foreach>
     </delete>
+
+
+    <!-- 批量插入 -->
+    <insert id="insertBatch">
+        INSERT INTO enterprise_type (number, name) VALUES
+        <foreach collection="list" item="item" separator=",">
+            (#{item.number}, #{item.name})
+        </foreach>
+    </insert>
 </mapper>

+ 8 - 0
enteprise-admin/src/main/resources/mapper/priceindex/PriceIndexMapper.xml

@@ -80,4 +80,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             #{id}
         </foreach>
     </delete>
+
+    <!-- 批量插入 -->
+    <insert id="insertBatch">
+        INSERT INTO price_index (id, name, month, year, unit, creator, index) VALUES
+        <foreach collection="list" item="item" separator=",">
+            (#{item.id}, #{item.name}, #{item.month}, #{item.year}, #{item.unit}, #{item.creator}, #{item.index})
+        </foreach>
+    </insert>
 </mapper>