This commit is contained in:
linfso 2024-05-12 19:32:53 +08:00
parent bb1ea2fa55
commit e3c47524a2
12 changed files with 1097 additions and 0 deletions

View File

@ -0,0 +1,118 @@
/**
* @Project: emis
* @Title: EmisPrintTplController.java
* @author linfso
* @date 2024-05-12 11:28:34
* @Copyright: ShangHai Duta 2022 All rights reserved.
* @version v1.0
* @Description: <p> 快递打印模板 控制器 </p>
*/
package com.xdadan.erp.web.emis;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.xdadan.erp.common.annotation.Log;
import com.xdadan.erp.common.core.controller.BaseController;
import com.xdadan.erp.common.core.domain.AjaxResult;
import com.xdadan.erp.common.core.page.TableDataInfo;
import com.xdadan.erp.common.enums.BusinessType;
import com.xdadan.erp.common.utils.StringUtils;
import com.xdadan.erp.common.utils.poi.ExcelUtil;
import com.xdadan.erp.emis.domain.EmisPrintTpl;
import com.xdadan.erp.emis.service.IEmisPrintTplService;
/**
* 快递打印模板Controller
*
* @author linfso
* @date 2024-05-12 11:28:34
*/
@RestController
@RequestMapping("/emis/emisPrintTpl")
public class EmisPrintTplController extends BaseController
{
@Autowired
private IEmisPrintTplService emisPrintTplService;
/**
* 查询快递打印模板列表
*/
@PreAuthorize("@ss.hasPermi('emis:emisPrintTpl:list')")
@GetMapping("/list")
public TableDataInfo list(EmisPrintTpl emisPrintTpl)
{
startPage();
List<EmisPrintTpl> list = emisPrintTplService.selectEmisPrintTplList(emisPrintTpl);
return getDataTable(list);
}
/**
* 导出快递打印模板列表
*/
@PreAuthorize("@ss.hasPermi('emis:emisPrintTpl:export')")
@Log(title = "快递打印模板", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, EmisPrintTpl emisPrintTpl)
{
List<EmisPrintTpl> list = emisPrintTplService.selectEmisPrintTplList(emisPrintTpl);
ExcelUtil<EmisPrintTpl> util = new ExcelUtil<EmisPrintTpl>(EmisPrintTpl.class);
util.exportExcel(response, list, "快递打印模板数据");
}
/**
* 获取快递打印模板详细信息
*/
@PreAuthorize("@ss.hasPermi('emis:emisPrintTpl:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return AjaxResult.success(emisPrintTplService.selectEmisPrintTplById(id));
}
/**
* 新增快递打印模板
*/
@PreAuthorize("@ss.hasPermi('emis:emisPrintTpl:add')")
@Log(title = "快递打印模板", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody EmisPrintTpl emisPrintTpl)
{
return toAjax(emisPrintTplService.insertEmisPrintTpl(emisPrintTpl));
}
/**
* 修改快递打印模板
*/
@PreAuthorize("@ss.hasPermi('emis:emisPrintTpl:edit')")
@Log(title = "快递打印模板", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody EmisPrintTpl emisPrintTpl)
{
return toAjax(emisPrintTplService.updateEmisPrintTpl(emisPrintTpl));
}
/**
* 删除快递打印模板
*/
@PreAuthorize("@ss.hasPermi('emis:emisPrintTpl:remove')")
@Log(title = "快递打印模板", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(emisPrintTplService.deleteEmisPrintTplByIds(ids));
}
}

View File

@ -0,0 +1,118 @@
/**
* @Project: emis
* @Title: EmisPrintTplRelController.java
* @author linfso
* @date 2024-05-12 11:28:34
* @Copyright: ShangHai Duta 2022 All rights reserved.
* @version v1.0
* @Description: <p> 快递商户关联表 控制器 </p>
*/
package com.xdadan.erp.web.emis;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.xdadan.erp.common.annotation.Log;
import com.xdadan.erp.common.core.controller.BaseController;
import com.xdadan.erp.common.core.domain.AjaxResult;
import com.xdadan.erp.common.core.page.TableDataInfo;
import com.xdadan.erp.common.enums.BusinessType;
import com.xdadan.erp.common.utils.StringUtils;
import com.xdadan.erp.common.utils.poi.ExcelUtil;
import com.xdadan.erp.emis.domain.EmisPrintTplRel;
import com.xdadan.erp.emis.service.IEmisPrintTplRelService;
/**
* 快递商户关联表Controller
*
* @author linfso
* @date 2024-05-12 11:28:34
*/
@RestController
@RequestMapping("/emis/emisPrintTplRel")
public class EmisPrintTplRelController extends BaseController
{
@Autowired
private IEmisPrintTplRelService emisPrintTplRelService;
/**
* 查询快递商户关联表列表
*/
@PreAuthorize("@ss.hasPermi('emis:emisPrintTplRel:list')")
@GetMapping("/list")
public TableDataInfo list(EmisPrintTplRel emisPrintTplRel)
{
startPage();
List<EmisPrintTplRel> list = emisPrintTplRelService.selectEmisPrintTplRelList(emisPrintTplRel);
return getDataTable(list);
}
/**
* 导出快递商户关联表列表
*/
@PreAuthorize("@ss.hasPermi('emis:emisPrintTplRel:export')")
@Log(title = "快递商户关联表", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, EmisPrintTplRel emisPrintTplRel)
{
List<EmisPrintTplRel> list = emisPrintTplRelService.selectEmisPrintTplRelList(emisPrintTplRel);
ExcelUtil<EmisPrintTplRel> util = new ExcelUtil<EmisPrintTplRel>(EmisPrintTplRel.class);
util.exportExcel(response, list, "快递商户关联表数据");
}
/**
* 获取快递商户关联表详细信息
*/
@PreAuthorize("@ss.hasPermi('emis:emisPrintTplRel:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return AjaxResult.success(emisPrintTplRelService.selectEmisPrintTplRelById(id));
}
/**
* 新增快递商户关联表
*/
@PreAuthorize("@ss.hasPermi('emis:emisPrintTplRel:add')")
@Log(title = "快递商户关联表", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody EmisPrintTplRel emisPrintTplRel)
{
return toAjax(emisPrintTplRelService.insertEmisPrintTplRel(emisPrintTplRel));
}
/**
* 修改快递商户关联表
*/
@PreAuthorize("@ss.hasPermi('emis:emisPrintTplRel:edit')")
@Log(title = "快递商户关联表", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody EmisPrintTplRel emisPrintTplRel)
{
return toAjax(emisPrintTplRelService.updateEmisPrintTplRel(emisPrintTplRel));
}
/**
* 删除快递商户关联表
*/
@PreAuthorize("@ss.hasPermi('emis:emisPrintTplRel:remove')")
@Log(title = "快递商户关联表", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(emisPrintTplRelService.deleteEmisPrintTplRelByIds(ids));
}
}

View File

@ -0,0 +1,61 @@
/**
* @Project: emis
* @Title: EmisPrintTpl.java
* @author linfso
* @date 2024-05-12 11:28:34
* @Copyright: ShangHai Duta 2022 All rights reserved.
* @version v1.0
* @Description: <p> 快递打印模板 实体类 </p>
*/
package com.xdadan.erp.emis.domain;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.xdadan.erp.common.annotation.Excel;
import com.xdadan.erp.common.core.domain.BaseEntity;
import com.xdadan.erp.common.core.domain.TreeEntity;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import lombok.Data;
/**
* @ClassName EmisPrintTpl
* @Description 快递打印模板
* @author linfso
* @date 2024-05-12 11:28:34
*/
@Data
public class EmisPrintTpl extends BaseEntity
{
private static final long serialVersionUID = 1L;
/* id */
private Long id;
/* 模版代码 */
private String code;
/* 模板名称 */
private String name;
/* 模板版本例如1.0.0 */
private String version;
/* 公共模板标识 0-私有模板 1-公共模板 */
private Integer isPublic;
/* 模板所有者 */
private Long merchId;
/* 快递类型 NONE-通用 YD-韵达 SF-顺丰 ZTO-中通 */
private String expressType;
/* 模板内容-在线模版 */
private String tplData;
/* 加密模版 */
private String tplEncData;
/* 在线pdf模版 */
private String tplPdfData;
/* 在线图片 */
private String tplPicUrl;
/* 0-初始 1-启用 2-禁用 */
private Integer status;
}

View File

@ -0,0 +1,47 @@
/**
* @Project: emis
* @Title: EmisPrintTplRel.java
* @author linfso
* @date 2024-05-12 11:28:34
* @Copyright: ShangHai Duta 2022 All rights reserved.
* @version v1.0
* @Description: <p> 快递商户关联表 实体类 </p>
*/
package com.xdadan.erp.emis.domain;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.xdadan.erp.common.annotation.Excel;
import com.xdadan.erp.common.core.domain.BaseEntity;
import com.xdadan.erp.common.core.domain.TreeEntity;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import lombok.Data;
/**
* @ClassName EmisPrintTplRel
* @Description 快递商户关联表
* @author linfso
* @date 2024-05-12 11:28:34
*/
@Data
public class EmisPrintTplRel extends BaseEntity
{
private static final long serialVersionUID = 1L;
/* id */
private Long id;
/* 商户号 */
private String merchId;
/* 模板ID */
private Long tplId;
/* 模版代码 */
private String tplCode;
/* 模板名称 */
private String tplName;
}

View File

@ -0,0 +1,70 @@
/**
* @Project: emis
* @Title: EmisPrintTplMapper.java
* @author linfso
* @date 2024-05-12 11:28:34
* @Copyright: ShangHai Doitinfo 2022 All rights reserved.
* @version v1.0
* @Description: <p> 快递打印模板 Mapper 接口 </p>
* <span style='color:red'> Warning : This file is generate by ai tools,don't edit!!! </span>
*/
package com.xdadan.erp.emis.mapper;
import java.util.List;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.xdadan.erp.emis.domain.EmisPrintTpl;
/**
* @ClassName EmisPrintTplMapper
* @Description <p> 快递打印模板 Mapper 接口 </p>
* @author linfso
* @date 2024-05-12 11:28:34
*/
public interface EmisPrintTplMapper extends BaseMapper<EmisPrintTpl>
{
/**
* 主键查询
* @param id
* @return
*/
public EmisPrintTpl selectEmisPrintTplById(Long id);
/**
* 查询列表
*
* @param emisPrintTpl
* @return 集合
*/
public List<EmisPrintTpl> selectEmisPrintTplList(EmisPrintTpl emisPrintTpl);
/**
* 新增
*
* @param emisPrintTpl
* @return
*/
public int insertEmisPrintTpl(EmisPrintTpl emisPrintTpl);
/**
* 修改
*
* @param emisPrintTpl
* @return
*/
public int updateEmisPrintTpl(EmisPrintTpl emisPrintTpl);
/**
* 删除
*
* @param id 主键
* @return 结果
*/
public int deleteEmisPrintTplById(Long id);
/**
* 批量删除
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/
public int deleteEmisPrintTplByIds(Long[] ids);
}

View File

@ -0,0 +1,70 @@
/**
* @Project: emis
* @Title: EmisPrintTplRelMapper.java
* @author linfso
* @date 2024-05-12 11:28:34
* @Copyright: ShangHai Doitinfo 2022 All rights reserved.
* @version v1.0
* @Description: <p> 快递商户关联表 Mapper 接口 </p>
* <span style='color:red'> Warning : This file is generate by ai tools,don't edit!!! </span>
*/
package com.xdadan.erp.emis.mapper;
import java.util.List;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.xdadan.erp.emis.domain.EmisPrintTplRel;
/**
* @ClassName EmisPrintTplRelMapper
* @Description <p> 快递商户关联表 Mapper 接口 </p>
* @author linfso
* @date 2024-05-12 11:28:34
*/
public interface EmisPrintTplRelMapper extends BaseMapper<EmisPrintTplRel>
{
/**
* 主键查询
* @param id
* @return
*/
public EmisPrintTplRel selectEmisPrintTplRelById(Long id);
/**
* 查询列表
*
* @param emisPrintTplRel
* @return 集合
*/
public List<EmisPrintTplRel> selectEmisPrintTplRelList(EmisPrintTplRel emisPrintTplRel);
/**
* 新增
*
* @param emisPrintTplRel
* @return
*/
public int insertEmisPrintTplRel(EmisPrintTplRel emisPrintTplRel);
/**
* 修改
*
* @param emisPrintTplRel
* @return
*/
public int updateEmisPrintTplRel(EmisPrintTplRel emisPrintTplRel);
/**
* 删除
*
* @param id 主键
* @return 结果
*/
public int deleteEmisPrintTplRelById(Long id);
/**
* 批量删除
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/
public int deleteEmisPrintTplRelByIds(Long[] ids);
}

View File

@ -0,0 +1,69 @@
/**
* @Project: emis
* @Title: EmisPrintTplRelService.java
* @author linfso
* @date 2024-05-12 11:28:34
* @Copyright: ShangHai Duta 2022 All rights reserved.
* @version v1.0
* @Description: <p> 快递商户关联表 服务类接口 </p>
*/
package com.xdadan.erp.emis.service;
import java.util.List;
import com.xdadan.erp.emis.domain.EmisPrintTplRel;
/**
* @ClassName EmisPrintTplRelService
* @Description 快递商户关联表
* @author linfso
* @date 2024-05-12 11:28:34
*/
public interface IEmisPrintTplRelService
{
/**
* 主键查询
* @param id
* @return
*/
public EmisPrintTplRel selectEmisPrintTplRelById(Long id);
/**
* 查询快递商户关联表列表
*
* @param emisPrintTplRel 快递商户关联表
* @return 快递商户关联表集合
*/
public List<EmisPrintTplRel> selectEmisPrintTplRelList(EmisPrintTplRel emisPrintTplRel);
/**
* 新增快递商户关联表
*
* @param emisPrintTplRel 快递商户关联表
* @return 结果
*/
public int insertEmisPrintTplRel(EmisPrintTplRel emisPrintTplRel);
/**
* 修改快递商户关联表
*
* @param emisPrintTplRel 快递商户关联表
* @return 结果
*/
public int updateEmisPrintTplRel(EmisPrintTplRel emisPrintTplRel);
/**
* 批量删除快递商户关联表
*
* @param ids 需要删除的快递商户关联表主键集合
* @return 结果
*/
public int deleteEmisPrintTplRelByIds(Long[] ids);
/**
* 删除快递商户关联表信息
*
* @param id 快递商户关联表主键
* @return 结果
*/
public int deleteEmisPrintTplRelById(Long id);
}

View File

@ -0,0 +1,69 @@
/**
* @Project: emis
* @Title: EmisPrintTplService.java
* @author linfso
* @date 2024-05-12 11:28:34
* @Copyright: ShangHai Duta 2022 All rights reserved.
* @version v1.0
* @Description: <p> 快递打印模板 服务类接口 </p>
*/
package com.xdadan.erp.emis.service;
import java.util.List;
import com.xdadan.erp.emis.domain.EmisPrintTpl;
/**
* @ClassName EmisPrintTplService
* @Description 快递打印模板
* @author linfso
* @date 2024-05-12 11:28:34
*/
public interface IEmisPrintTplService
{
/**
* 主键查询
* @param id
* @return
*/
public EmisPrintTpl selectEmisPrintTplById(Long id);
/**
* 查询快递打印模板列表
*
* @param emisPrintTpl 快递打印模板
* @return 快递打印模板集合
*/
public List<EmisPrintTpl> selectEmisPrintTplList(EmisPrintTpl emisPrintTpl);
/**
* 新增快递打印模板
*
* @param emisPrintTpl 快递打印模板
* @return 结果
*/
public int insertEmisPrintTpl(EmisPrintTpl emisPrintTpl);
/**
* 修改快递打印模板
*
* @param emisPrintTpl 快递打印模板
* @return 结果
*/
public int updateEmisPrintTpl(EmisPrintTpl emisPrintTpl);
/**
* 批量删除快递打印模板
*
* @param ids 需要删除的快递打印模板主键集合
* @return 结果
*/
public int deleteEmisPrintTplByIds(Long[] ids);
/**
* 删除快递打印模板信息
*
* @param id 快递打印模板主键
* @return 结果
*/
public int deleteEmisPrintTplById(Long id);
}

View File

@ -0,0 +1,104 @@
/**
* @Project: emis
* @Title: EmisPrintTplRelServiceImpl.java
* @author linfso
* @date 2024-05-12 11:28:34
* @Copyright: ShangHai Duta 2022 All rights reserved.
* @version v1.0
* @Description: <p> 快递商户关联表 实体类 </p>
*/
package com.xdadan.erp.emis.service.impl;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.xdadan.erp.emis.domain.EmisPrintTplRel;
import com.xdadan.erp.emis.mapper.EmisPrintTplRelMapper;
import com.xdadan.erp.emis.service.IEmisPrintTplRelService;
/**
* 快递商户关联表Service业务层处理
*
* @author linfso
* @date 2024-05-12 11:28:34
*/
@Service
public class EmisPrintTplRelServiceImpl implements IEmisPrintTplRelService
{
@Autowired
private EmisPrintTplRelMapper emisPrintTplRelMapper;
/**
* 查询快递商户关联表
*
* @param id 快递商户关联表主键
* @return 快递商户关联表
*/
@Override
public EmisPrintTplRel selectEmisPrintTplRelById(Long id)
{
return emisPrintTplRelMapper.selectEmisPrintTplRelById(id);
}
/**
* 查询快递商户关联表列表
*
* @param emisPrintTplRel 快递商户关联表
* @return 快递商户关联表
*/
@Override
public List<EmisPrintTplRel> selectEmisPrintTplRelList(EmisPrintTplRel emisPrintTplRel)
{
return emisPrintTplRelMapper.selectEmisPrintTplRelList(emisPrintTplRel);
}
/**
* 新增快递商户关联表
*
* @param emisPrintTplRel 快递商户关联表
* @return 结果
*/
@Override
public int insertEmisPrintTplRel(EmisPrintTplRel emisPrintTplRel)
{
return emisPrintTplRelMapper.insertEmisPrintTplRel(emisPrintTplRel);
}
/**
* 修改快递商户关联表
*
* @param emisPrintTplRel 快递商户关联表
* @return 结果
*/
@Override
public int updateEmisPrintTplRel(EmisPrintTplRel emisPrintTplRel)
{
return emisPrintTplRelMapper.updateEmisPrintTplRel(emisPrintTplRel);
}
/**
* 批量删除快递商户关联表
*
* @param ids 需要删除的快递商户关联表主键
* @return 结果
*/
@Override
public int deleteEmisPrintTplRelByIds(Long[] ids)
{
return emisPrintTplRelMapper.deleteEmisPrintTplRelByIds(ids);
}
/**
* 删除快递商户关联表信息
*
* @param id 快递商户关联表主键
* @return 结果
*/
@Override
public int deleteEmisPrintTplRelById(Long id)
{
return emisPrintTplRelMapper.deleteEmisPrintTplRelById(id);
}
}

View File

@ -0,0 +1,104 @@
/**
* @Project: emis
* @Title: EmisPrintTplServiceImpl.java
* @author linfso
* @date 2024-05-12 11:28:34
* @Copyright: ShangHai Duta 2022 All rights reserved.
* @version v1.0
* @Description: <p> 快递打印模板 实体类 </p>
*/
package com.xdadan.erp.emis.service.impl;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.xdadan.erp.emis.domain.EmisPrintTpl;
import com.xdadan.erp.emis.mapper.EmisPrintTplMapper;
import com.xdadan.erp.emis.service.IEmisPrintTplService;
/**
* 快递打印模板Service业务层处理
*
* @author linfso
* @date 2024-05-12 11:28:34
*/
@Service
public class EmisPrintTplServiceImpl implements IEmisPrintTplService
{
@Autowired
private EmisPrintTplMapper emisPrintTplMapper;
/**
* 查询快递打印模板
*
* @param id 快递打印模板主键
* @return 快递打印模板
*/
@Override
public EmisPrintTpl selectEmisPrintTplById(Long id)
{
return emisPrintTplMapper.selectEmisPrintTplById(id);
}
/**
* 查询快递打印模板列表
*
* @param emisPrintTpl 快递打印模板
* @return 快递打印模板
*/
@Override
public List<EmisPrintTpl> selectEmisPrintTplList(EmisPrintTpl emisPrintTpl)
{
return emisPrintTplMapper.selectEmisPrintTplList(emisPrintTpl);
}
/**
* 新增快递打印模板
*
* @param emisPrintTpl 快递打印模板
* @return 结果
*/
@Override
public int insertEmisPrintTpl(EmisPrintTpl emisPrintTpl)
{
return emisPrintTplMapper.insertEmisPrintTpl(emisPrintTpl);
}
/**
* 修改快递打印模板
*
* @param emisPrintTpl 快递打印模板
* @return 结果
*/
@Override
public int updateEmisPrintTpl(EmisPrintTpl emisPrintTpl)
{
return emisPrintTplMapper.updateEmisPrintTpl(emisPrintTpl);
}
/**
* 批量删除快递打印模板
*
* @param ids 需要删除的快递打印模板主键
* @return 结果
*/
@Override
public int deleteEmisPrintTplByIds(Long[] ids)
{
return emisPrintTplMapper.deleteEmisPrintTplByIds(ids);
}
/**
* 删除快递打印模板信息
*
* @param id 快递打印模板主键
* @return 结果
*/
@Override
public int deleteEmisPrintTplById(Long id)
{
return emisPrintTplMapper.deleteEmisPrintTplById(id);
}
}

View File

@ -0,0 +1,151 @@
<?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.xdadan.erp.emis.mapper.EmisPrintTplMapper">
<resultMap type="EmisPrintTpl" id="EmisPrintTplResult">
<result property="id" column="id" />
<result property="code" column="code" />
<result property="name" column="name" />
<result property="version" column="version" />
<result property="isPublic" column="is_public" />
<result property="merchId" column="merch_id" />
<result property="expressType" column="express_type" />
<result property="tplData" column="tpl_data" />
<result property="tplEncData" column="tpl_enc_data" />
<result property="tplPdfData" column="tpl_pdf_data" />
<result property="tplPicUrl" column="tpl_pic_url" />
<result property="status" column="status" />
<result property="delFlag" column="del_flag" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
<result property="remark" column="remark" />
<result property="createSite" column="create_site" />
<result property="updateSite" column="update_site" />
</resultMap>
<sql id="selectEmisPrintTplVo">
select id, code, name, version, is_public, merch_id, express_type, tpl_data, tpl_enc_data, tpl_pdf_data, tpl_pic_url, status, del_flag, create_by, create_time, update_by, update_time, remark, create_site, update_site from emis_print_tpl
</sql>
<select id="selectEmisPrintTplList" parameterType="EmisPrintTpl" resultMap="EmisPrintTplResult">
<include refid="selectEmisPrintTplVo"/>
<where>
<if test="id != null "> and id = #{id}</if>
<if test="code != null and code != ''"> and code like concat('%', #{code}, '%')</if>
<if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
<if test="version != null and version != ''"> and version like concat('%', #{version}, '%')</if>
<if test="isPublic != null "> and is_public = #{isPublic}</if>
<if test="merchId != null "> and merch_id = #{merchId}</if>
<if test="expressType != null and expressType != ''"> and express_type like concat('%', #{expressType}, '%')</if>
<if test="tplData != null and tplData != ''"> and tpl_data like concat('%', #{tplData}, '%')</if>
<if test="tplEncData != null and tplEncData != ''"> and tpl_enc_data like concat('%', #{tplEncData}, '%')</if>
<if test="tplPdfData != null and tplPdfData != ''"> and tpl_pdf_data like concat('%', #{tplPdfData}, '%')</if>
<if test="tplPicUrl != null and tplPicUrl != ''"> and tpl_pic_url like concat('%', #{tplPicUrl}, '%')</if>
<if test="status != null "> and status = #{status}</if>
<if test="delFlag != null and delFlag != ''"> and del_flag like concat('%', #{delFlag}, '%')</if>
<if test="createBy != null and createBy != ''"> and create_by like concat('%', #{createBy}, '%')</if>
<if test="createTime != null "> and create_time = #{createTime}</if>
<if test="updateBy != null and updateBy != ''"> and update_by like concat('%', #{updateBy}, '%')</if>
<if test="updateTime != null "> and update_time = #{updateTime}</if>
<if test="remark != null and remark != ''"> and remark like concat('%', #{remark}, '%')</if>
<if test="createSite != null and createSite != ''"> and create_site like concat('%', #{createSite}, '%')</if>
<if test="updateSite != null and updateSite != ''"> and update_site like concat('%', #{updateSite}, '%')</if>
</where>
order by create_time desc
</select>
<select id="selectEmisPrintTplById" parameterType="Long" resultMap="EmisPrintTplResult">
select id, code, name, version, is_public, merch_id, express_type, tpl_data, tpl_enc_data, tpl_pdf_data, tpl_pic_url, status, del_flag, create_by, create_time, update_by, update_time, remark, create_site, update_site
from emis_print_tpl a
where a.id = #{id}
</select>
<insert id="insertEmisPrintTpl" parameterType="EmisPrintTpl">
insert into emis_print_tpl
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">id,</if>
<if test="code != null and code != ''">code,</if>
<if test="name != null and name != ''">name,</if>
<if test="version != null and version != ''">version,</if>
<if test="isPublic != null">is_public,</if>
<if test="merchId != null">merch_id,</if>
<if test="expressType != null and expressType != ''">express_type,</if>
<if test="tplData != null and tplData != ''">tpl_data,</if>
<if test="tplEncData != null and tplEncData != ''">tpl_enc_data,</if>
<if test="tplPdfData != null and tplPdfData != ''">tpl_pdf_data,</if>
<if test="tplPicUrl != null and tplPicUrl != ''">tpl_pic_url,</if>
<if test="status != null">status,</if>
<if test="delFlag != null and delFlag != ''">del_flag,</if>
<if test="createBy != null and createBy != ''">create_by,</if>
<if test="createTime != null">create_time,</if>
<if test="updateBy != null and updateBy != ''">update_by,</if>
<if test="updateTime != null">update_time,</if>
<if test="remark != null and remark != ''">remark,</if>
<if test="createSite != null and createSite != ''">create_site,</if>
<if test="updateSite != null and updateSite != ''">update_site,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">#{id},</if>
<if test="code != null and code != ''">#{code},</if>
<if test="name != null and name != ''">#{name},</if>
<if test="version != null and version != ''">#{version},</if>
<if test="isPublic != null">#{isPublic},</if>
<if test="merchId != null">#{merchId},</if>
<if test="expressType != null and expressType != ''">#{expressType},</if>
<if test="tplData != null and tplData != ''">#{tplData},</if>
<if test="tplEncData != null and tplEncData != ''">#{tplEncData},</if>
<if test="tplPdfData != null and tplPdfData != ''">#{tplPdfData},</if>
<if test="tplPicUrl != null and tplPicUrl != ''">#{tplPicUrl},</if>
<if test="status != null">#{status},</if>
<if test="delFlag != null and delFlag != ''">#{delFlag},</if>
<if test="createBy != null and createBy != ''">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateBy != null and updateBy != ''">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="remark != null and remark != ''">#{remark},</if>
<if test="createSite != null and createSite != ''">#{createSite},</if>
<if test="updateSite != null and updateSite != ''">#{updateSite},</if>
</trim>
</insert>
<update id="updateEmisPrintTpl" parameterType="EmisPrintTpl">
update emis_print_tpl
<trim prefix="SET" suffixOverrides=",">
<if test="code != null and code != ''">code = #{code},</if>
<if test="name != null and name != ''">name = #{name},</if>
<if test="version != null and version != ''">version = #{version},</if>
<if test="isPublic != null">is_public = #{isPublic},</if>
<if test="merchId != null">merch_id = #{merchId},</if>
<if test="expressType != null and expressType != ''">express_type = #{expressType},</if>
<if test="tplData != null and tplData != ''">tpl_data = #{tplData},</if>
<if test="tplEncData != null and tplEncData != ''">tpl_enc_data = #{tplEncData},</if>
<if test="tplPdfData != null and tplPdfData != ''">tpl_pdf_data = #{tplPdfData},</if>
<if test="tplPicUrl != null and tplPicUrl != ''">tpl_pic_url = #{tplPicUrl},</if>
<if test="status != null">status = #{status},</if>
<if test="delFlag != null and delFlag != ''">del_flag = #{delFlag},</if>
<if test="createBy != null and createBy != ''">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="remark != null and remark != ''">remark = #{remark},</if>
<if test="createSite != null and createSite != ''">create_site = #{createSite},</if>
<if test="updateSite != null and updateSite != ''">update_site = #{updateSite},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteEmisPrintTplById" parameterType="Long">
delete from emis_print_tpl where id = #{id}
</delete>
<delete id="deleteEmisPrintTplByIds" parameterType="String">
delete from emis_print_tpl where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>

View File

@ -0,0 +1,116 @@
<?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.xdadan.erp.emis.mapper.EmisPrintTplRelMapper">
<resultMap type="EmisPrintTplRel" id="EmisPrintTplRelResult">
<result property="id" column="id" />
<result property="merchId" column="merch_id" />
<result property="tplId" column="tpl_id" />
<result property="tplCode" column="tpl_code" />
<result property="tplName" column="tpl_name" />
<result property="delFlag" column="del_flag" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
<result property="remark" column="remark" />
<result property="createSite" column="create_site" />
<result property="updateSite" column="update_site" />
</resultMap>
<sql id="selectEmisPrintTplRelVo">
select id, merch_id, tpl_id, tpl_code, tpl_name, del_flag, create_by, create_time, update_by, update_time, remark, create_site, update_site from emis_print_tpl_rel
</sql>
<select id="selectEmisPrintTplRelList" parameterType="EmisPrintTplRel" resultMap="EmisPrintTplRelResult">
<include refid="selectEmisPrintTplRelVo"/>
<where>
<if test="id != null "> and id = #{id}</if>
<if test="merchId != null and merchId != ''"> and merch_id like concat('%', #{merchId}, '%')</if>
<if test="tplId != null "> and tpl_id = #{tplId}</if>
<if test="tplCode != null and tplCode != ''"> and tpl_code like concat('%', #{tplCode}, '%')</if>
<if test="tplName != null and tplName != ''"> and tpl_name like concat('%', #{tplName}, '%')</if>
<if test="delFlag != null and delFlag != ''"> and del_flag like concat('%', #{delFlag}, '%')</if>
<if test="createBy != null and createBy != ''"> and create_by like concat('%', #{createBy}, '%')</if>
<if test="createTime != null "> and create_time = #{createTime}</if>
<if test="updateBy != null and updateBy != ''"> and update_by like concat('%', #{updateBy}, '%')</if>
<if test="updateTime != null "> and update_time = #{updateTime}</if>
<if test="remark != null and remark != ''"> and remark like concat('%', #{remark}, '%')</if>
<if test="createSite != null and createSite != ''"> and create_site like concat('%', #{createSite}, '%')</if>
<if test="updateSite != null and updateSite != ''"> and update_site like concat('%', #{updateSite}, '%')</if>
</where>
order by create_time desc
</select>
<select id="selectEmisPrintTplRelById" parameterType="Long" resultMap="EmisPrintTplRelResult">
select id, merch_id, tpl_id, tpl_code, tpl_name, del_flag, create_by, create_time, update_by, update_time, remark, create_site, update_site
from emis_print_tpl_rel a
where a.id = #{id}
</select>
<insert id="insertEmisPrintTplRel" parameterType="EmisPrintTplRel">
insert into emis_print_tpl_rel
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">id,</if>
<if test="merchId != null and merchId != ''">merch_id,</if>
<if test="tplId != null">tpl_id,</if>
<if test="tplCode != null and tplCode != ''">tpl_code,</if>
<if test="tplName != null and tplName != ''">tpl_name,</if>
<if test="delFlag != null and delFlag != ''">del_flag,</if>
<if test="createBy != null and createBy != ''">create_by,</if>
<if test="createTime != null">create_time,</if>
<if test="updateBy != null and updateBy != ''">update_by,</if>
<if test="updateTime != null">update_time,</if>
<if test="remark != null and remark != ''">remark,</if>
<if test="createSite != null and createSite != ''">create_site,</if>
<if test="updateSite != null and updateSite != ''">update_site,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">#{id},</if>
<if test="merchId != null and merchId != ''">#{merchId},</if>
<if test="tplId != null">#{tplId},</if>
<if test="tplCode != null and tplCode != ''">#{tplCode},</if>
<if test="tplName != null and tplName != ''">#{tplName},</if>
<if test="delFlag != null and delFlag != ''">#{delFlag},</if>
<if test="createBy != null and createBy != ''">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateBy != null and updateBy != ''">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="remark != null and remark != ''">#{remark},</if>
<if test="createSite != null and createSite != ''">#{createSite},</if>
<if test="updateSite != null and updateSite != ''">#{updateSite},</if>
</trim>
</insert>
<update id="updateEmisPrintTplRel" parameterType="EmisPrintTplRel">
update emis_print_tpl_rel
<trim prefix="SET" suffixOverrides=",">
<if test="merchId != null and merchId != ''">merch_id = #{merchId},</if>
<if test="tplId != null">tpl_id = #{tplId},</if>
<if test="tplCode != null and tplCode != ''">tpl_code = #{tplCode},</if>
<if test="tplName != null and tplName != ''">tpl_name = #{tplName},</if>
<if test="delFlag != null and delFlag != ''">del_flag = #{delFlag},</if>
<if test="createBy != null and createBy != ''">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="remark != null and remark != ''">remark = #{remark},</if>
<if test="createSite != null and createSite != ''">create_site = #{createSite},</if>
<if test="updateSite != null and updateSite != ''">update_site = #{updateSite},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteEmisPrintTplRelById" parameterType="Long">
delete from emis_print_tpl_rel where id = #{id}
</delete>
<delete id="deleteEmisPrintTplRelByIds" parameterType="String">
delete from emis_print_tpl_rel where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>