修改结构
This commit is contained in:
parent
cb58463319
commit
f33447e4f2
|
@ -0,0 +1,327 @@
|
||||||
|
package com.hzya.frame.sys.businessFile.controller;
|
||||||
|
|
||||||
|
import com.github.pagehelper.PageInfo;
|
||||||
|
import com.hzya.frame.page.PageAttribute;
|
||||||
|
import com.hzya.frame.sys.businessFile.entity.BusinessFileEntity;
|
||||||
|
import com.hzya.frame.sys.businessFile.service.IBusinessFileService;
|
||||||
|
import com.hzya.frame.sys.file.download.service.IFileDownloadService;
|
||||||
|
import com.hzya.frame.web.action.DefaultController;
|
||||||
|
import com.hzya.frame.web.action.SessionContext;
|
||||||
|
import com.hzya.frame.web.entity.JsonResultEntity;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Controller;
|
||||||
|
import org.springframework.web.bind.annotation.PathVariable;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMethod;
|
||||||
|
import org.springframework.web.bind.annotation.ResponseBody;
|
||||||
|
import org.springframework.web.servlet.ModelAndView;
|
||||||
|
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.nio.charset.StandardCharsets;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.zip.ZipOutputStream;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description: 文件业务关系 controller
|
||||||
|
* @tableName: sys_business_file
|
||||||
|
* @entityName: BusinessFileEntity
|
||||||
|
* 包含:
|
||||||
|
* 1、分页查询(queryPaged)
|
||||||
|
* 2、index页面(goIndexPage)
|
||||||
|
* 3、新增页面(goAddPage)
|
||||||
|
* 4、新增信息保存(save)
|
||||||
|
* 5、修改页面(goEditPage)
|
||||||
|
* 6、修改信息保存(update)
|
||||||
|
* 7、信息查看(goShowPage)
|
||||||
|
* 8、删除信息(delete)
|
||||||
|
* @author: gjh
|
||||||
|
* @history: 1.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Controller("sys_business_file")
|
||||||
|
@RequestMapping("/sys/business/file/BusinessFileController")
|
||||||
|
public class BusinessFileController extends DefaultController {
|
||||||
|
@Autowired
|
||||||
|
protected IBusinessFileService businessfileService;
|
||||||
|
@Autowired
|
||||||
|
private IFileDownloadService fileDownloadService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 文件业务关系分页信息
|
||||||
|
**/
|
||||||
|
@RequestMapping(value = "queryPaged")
|
||||||
|
@ResponseBody
|
||||||
|
public PageAttribute<BusinessFileEntity> queryPaged(BusinessFileEntity entity) throws Exception {
|
||||||
|
PageAttribute<BusinessFileEntity> page = null;
|
||||||
|
try {
|
||||||
|
page = businessfileService.queryPaged(entity);
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
return page;
|
||||||
|
}
|
||||||
|
|
||||||
|
@RequestMapping(value = "queryList")
|
||||||
|
@ResponseBody
|
||||||
|
public List<BusinessFileEntity> queryList(BusinessFileEntity entity) throws Exception {
|
||||||
|
List<BusinessFileEntity> list = null;
|
||||||
|
try {
|
||||||
|
list = businessfileService.query(entity);
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 跳转到文件业务关系的index页面
|
||||||
|
**/
|
||||||
|
@RequestMapping(value = "goIndexPage", method = RequestMethod.GET)
|
||||||
|
public ModelAndView goIndexPage() {
|
||||||
|
ModelAndView view = new ModelAndView();
|
||||||
|
/**这里根据实际的需要填写需要传到前台的对象**/
|
||||||
|
//view.addObject(attributeName, attributeValue);
|
||||||
|
/**这里是返回对应的页面路径**/
|
||||||
|
view.setViewName("/sys/businessFile/businessFile/list");
|
||||||
|
return view;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 跳转到文件业务关系信息新增页面
|
||||||
|
**/
|
||||||
|
@RequestMapping(value = "goAddPage")
|
||||||
|
public ModelAndView goAddPage() {
|
||||||
|
ModelAndView view = new ModelAndView();
|
||||||
|
/**这里根据实际的需要填写需要传到前台的对象**/
|
||||||
|
//view.addObject(attributeName, attributeValue);
|
||||||
|
/**这里是返回对应的页面路径**/
|
||||||
|
view.setViewName("/sys/businessFile/businessFile/add");
|
||||||
|
return view;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 文件业务关系新增信息保存
|
||||||
|
**/
|
||||||
|
@RequestMapping(value = "save", method = RequestMethod.POST)
|
||||||
|
@ResponseBody
|
||||||
|
public JsonResultEntity save(BusinessFileEntity entity) {
|
||||||
|
try {
|
||||||
|
businessfileService.save(entity);
|
||||||
|
return getSuccessMessageEntity("保存成功", "save");
|
||||||
|
} catch (Exception e) {
|
||||||
|
logger.error("save", e);
|
||||||
|
e.printStackTrace();
|
||||||
|
return getFailureMessageEntity("保存失败!" + e.getMessage(), "save");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 跳转到文件业务关系信息修改页面
|
||||||
|
**/
|
||||||
|
@RequestMapping(value = "edit/{id}")
|
||||||
|
public ModelAndView goEditPage(@PathVariable("id") Long id) {
|
||||||
|
ModelAndView view = new ModelAndView();
|
||||||
|
/**这里根据实际的需要填写需要传到前台的对象**/
|
||||||
|
BusinessFileEntity entity = businessfileService.get(id);
|
||||||
|
view.addObject("entity", entity);
|
||||||
|
/**这里是返回对应的页面路径**/
|
||||||
|
view.setViewName("/sys/businessFile/businessFile/edit");
|
||||||
|
return view;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 文件业务关系修改信息保存
|
||||||
|
**/
|
||||||
|
@RequestMapping(value = "update", method = RequestMethod.POST)
|
||||||
|
@ResponseBody
|
||||||
|
public JsonResultEntity update(BusinessFileEntity entity) {
|
||||||
|
try {
|
||||||
|
businessfileService.update(entity);
|
||||||
|
return getSuccessMessageEntity("更新成功!", "update");
|
||||||
|
} catch (Exception e) {
|
||||||
|
logger.error("update", e);
|
||||||
|
e.printStackTrace();
|
||||||
|
return getFailureMessageEntity("更新失败!" + e.getMessage(), "update");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 跳转到文件业务关系信息查看
|
||||||
|
**/
|
||||||
|
@RequestMapping(value = "show/{id}")
|
||||||
|
public ModelAndView goShowPage(@PathVariable("id") Long id) {
|
||||||
|
ModelAndView view = new ModelAndView();
|
||||||
|
/**这里根据实际的需要填写需要传到前台的对象**/
|
||||||
|
BusinessFileEntity entity = businessfileService.get(id);
|
||||||
|
view.addObject("entity", entity);
|
||||||
|
/**这里是返回对应的页面路径**/
|
||||||
|
view.setViewName("/sys/businessFile/businessFile/show");
|
||||||
|
return view;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除文件业务关系信息
|
||||||
|
**/
|
||||||
|
@RequestMapping(value = "delete", method = RequestMethod.POST)
|
||||||
|
@ResponseBody
|
||||||
|
public JsonResultEntity delete(Long id) {
|
||||||
|
try {
|
||||||
|
return getSuccessMessageEntity("删除成功!", "delete");
|
||||||
|
} catch (Exception e) {
|
||||||
|
logger.error("delete", e);
|
||||||
|
e.printStackTrace();
|
||||||
|
return getFailureMessageEntity("删除失败!" + e.getMessage(), "delete");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 业务附件批量保存,通过JSON字符串传入保存参数
|
||||||
|
**/
|
||||||
|
@RequestMapping(value = "saveBusinessFile", method = RequestMethod.POST)
|
||||||
|
@ResponseBody
|
||||||
|
public JsonResultEntity saveBusinessFile(BusinessFileEntity entity) {
|
||||||
|
try {
|
||||||
|
entity = businessfileService.saveBatchBusinessFile(entity);
|
||||||
|
return getSuccessMessageEntity("保存成功!" );
|
||||||
|
} catch (Exception e) {
|
||||||
|
logger.error("save", e);
|
||||||
|
e.printStackTrace();
|
||||||
|
return getFailureMessageEntity("保存失败!" + e.getMessage(), "delete");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 业务附件批量保存
|
||||||
|
**/
|
||||||
|
@RequestMapping(value = "saveBatchBusinessFile", method = RequestMethod.POST)
|
||||||
|
@ResponseBody
|
||||||
|
public JsonResultEntity saveBatchBusinessFile(BusinessFileEntity entity) {
|
||||||
|
try {
|
||||||
|
entity = businessfileService.saveBusinessFile(entity);
|
||||||
|
return getSuccessMessageEntity("保存成功!" );
|
||||||
|
} catch (Exception e) {
|
||||||
|
logger.error("save", e);
|
||||||
|
e.printStackTrace();
|
||||||
|
return getFailureMessageEntity("保存失败!" + e.getMessage(), "delete");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 业务附件批量保存
|
||||||
|
**/
|
||||||
|
@RequestMapping(value = "validateTicketFiles", method = RequestMethod.POST)
|
||||||
|
@ResponseBody
|
||||||
|
public JsonResultEntity validateTicketFiles(BusinessFileEntity entity) {
|
||||||
|
try {
|
||||||
|
entity = businessfileService.validateTicketFiles(entity);
|
||||||
|
return getSuccessMessageEntity("验证成功!" );
|
||||||
|
} catch (Exception e) {
|
||||||
|
logger.error("save", e);
|
||||||
|
e.printStackTrace();
|
||||||
|
return getFailureMessageEntity(e.getMessage(), "validate");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@RequestMapping(value = "listQueryBusinessFilesByGroup", method = RequestMethod.POST)
|
||||||
|
@ResponseBody
|
||||||
|
public List<BusinessFileEntity> listQueryBusinessFilesByGroup(BusinessFileEntity entity) {
|
||||||
|
List<BusinessFileEntity> listQueryBusinessFilesByGroup = businessfileService.listQueryBusinessFilesByGroup(entity);
|
||||||
|
return listQueryBusinessFilesByGroup;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/***
|
||||||
|
* 根据单票ID下载所有的附件
|
||||||
|
* @param entity
|
||||||
|
* @param response
|
||||||
|
*/
|
||||||
|
@RequestMapping(value = "ticketFilesDownloadToZip")
|
||||||
|
public void ticketFilesDownloadToZip(BusinessFileEntity entity, HttpServletResponse response) {
|
||||||
|
ZipOutputStream out = null;
|
||||||
|
response.setContentType("APPLICATION/OCTET-STREAM");
|
||||||
|
String zipName = entity.getZipName() + ".zip";
|
||||||
|
try {
|
||||||
|
zipName = new String(zipName.getBytes(StandardCharsets.UTF_8), "iso8859-1");
|
||||||
|
response.setHeader("Content-Disposition", "attachment; filename=" + zipName);
|
||||||
|
out = new ZipOutputStream(response.getOutputStream());
|
||||||
|
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
} finally {
|
||||||
|
try {
|
||||||
|
out.close();
|
||||||
|
} catch (IOException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 文件业务关系分页信息
|
||||||
|
**/
|
||||||
|
@RequestMapping(value = "queryBusinessFileByServiceType")
|
||||||
|
@ResponseBody
|
||||||
|
public List<BusinessFileEntity> queryBusinessFileByServiceType(BusinessFileEntity entity) throws Exception {
|
||||||
|
List<BusinessFileEntity> businessFileEntityList = null;
|
||||||
|
try {
|
||||||
|
businessFileEntityList = businessfileService.queryBusinessFileByServiceType(entity);
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
return businessFileEntityList;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 跳转到国内清关文件文件上传页面
|
||||||
|
**/
|
||||||
|
@RequestMapping(value = "goDomesticUploadPage/{id}")
|
||||||
|
public ModelAndView goDomesticUploadPage(@PathVariable("id") Long id) {
|
||||||
|
ModelAndView view = new ModelAndView();
|
||||||
|
/** 传入整个单票对象*/
|
||||||
|
|
||||||
|
/** 获取当前登陆人的服务项*/
|
||||||
|
|
||||||
|
/**这里是返回对应的页面路径**/
|
||||||
|
view.setViewName("/sys/businessFile/businessFile/add");
|
||||||
|
return view;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 跳转制作保函列表页面
|
||||||
|
**/
|
||||||
|
@RequestMapping(value = "goTicketFileDocumentsIndexPage", method = RequestMethod.GET)
|
||||||
|
public ModelAndView goTicketFileDocumentsIndexPage(Long ticket_id, Long business_id, String business_type, boolean fileFlag) {
|
||||||
|
ModelAndView view = new ModelAndView();
|
||||||
|
/**这里根据实际的需要填写需要传到前台的对象**/
|
||||||
|
view.addObject("business_type", "guarantee");
|
||||||
|
/**这里是返回对应的页面路径**/
|
||||||
|
|
||||||
|
view.setViewName("/sys/businessFile/businessFile/documents");
|
||||||
|
return view;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 业务附件批量保存
|
||||||
|
**/
|
||||||
|
@RequestMapping(value = "saveBusinessFileToGuarantee", method = RequestMethod.POST)
|
||||||
|
@ResponseBody
|
||||||
|
public JsonResultEntity saveBusinessFileToGuarantee(BusinessFileEntity entity) {
|
||||||
|
try {
|
||||||
|
entity = businessfileService.saveBusinessFileToGuarantee(entity);
|
||||||
|
return getSuccessMessageEntity("保存成功!" );
|
||||||
|
} catch (Exception e) {
|
||||||
|
logger.error("save", e);
|
||||||
|
e.printStackTrace();
|
||||||
|
return getFailureMessageEntity("保存失败!" + e.getMessage(), "delete");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
|
@ -0,0 +1,28 @@
|
||||||
|
package com.hzya.frame.sys.businessFile.dao;
|
||||||
|
import com.hzya.frame.basedao.dao.IBaseDao;
|
||||||
|
import com.hzya.frame.sys.businessFile.entity.BusinessFileEntity;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description: 文件业务关系 dao
|
||||||
|
* @tableName: sys_business_file
|
||||||
|
* @entityName: BusinessFileEntity
|
||||||
|
* @author: gjh
|
||||||
|
* @history: 1.0
|
||||||
|
*/
|
||||||
|
public interface IBusinessFileDao extends IBaseDao<BusinessFileEntity , Long> {
|
||||||
|
/***
|
||||||
|
* 根据业务条件获取根据单证编号分组的附件列表
|
||||||
|
* @param entity
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<BusinessFileEntity> listQueryBusinessFiles(BusinessFileEntity entity);
|
||||||
|
|
||||||
|
/****
|
||||||
|
* 根据服务项类型列表获取附件列表
|
||||||
|
* @param entity
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<BusinessFileEntity> queryBusinessFileByServiceType(BusinessFileEntity entity);
|
||||||
|
}
|
|
@ -0,0 +1,29 @@
|
||||||
|
package com.hzya.frame.sys.businessFile.dao.impl;
|
||||||
|
|
||||||
|
import com.hzya.frame.basedao.dao.MybatisGenericDao;
|
||||||
|
import com.hzya.frame.sys.businessFile.dao.IBusinessFileDao;
|
||||||
|
import com.hzya.frame.sys.businessFile.entity.BusinessFileEntity;
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description: 文件业务关系 dao
|
||||||
|
* @tableName: sys_business_file
|
||||||
|
* @entityName: BusinessFileEntity
|
||||||
|
* @author: gjh
|
||||||
|
* @history:1.0
|
||||||
|
*/
|
||||||
|
@Repository("sys_business_filedao")
|
||||||
|
public class BusinessFileDaoImpl extends MybatisGenericDao<BusinessFileEntity, Long> implements IBusinessFileDao {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<BusinessFileEntity> listQueryBusinessFiles(BusinessFileEntity entity) {
|
||||||
|
return super.queryList(entity, "com.hzya.frame.sys.businessFile.entity.BusinessFileEntity.BusinessFileEntity_list_base_group");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<BusinessFileEntity> queryBusinessFileByServiceType(BusinessFileEntity entity) {
|
||||||
|
return super.queryList(entity, "com.hzya.frame.sys.businessFile.entity.BusinessFileEntity.BusinessFileEntity_queryBusinessFileByServiceType");
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,321 @@
|
||||||
|
package com.hzya.frame.sys.businessFile.entity;
|
||||||
|
|
||||||
|
|
||||||
|
import com.hzya.frame.web.entity.BaseEntity;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description: 文件业务关系
|
||||||
|
* @tableName: sys_business_file
|
||||||
|
* @entityName: BusinessFileEntity
|
||||||
|
* @author: gjh
|
||||||
|
* @history: 1.0
|
||||||
|
*/
|
||||||
|
public class BusinessFileEntity extends BaseEntity {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 附件表生成的唯一新名称
|
||||||
|
*/
|
||||||
|
private String file_save_name;
|
||||||
|
/**
|
||||||
|
* 业务表ID(应用表,)
|
||||||
|
*/
|
||||||
|
private String business_id;
|
||||||
|
/****
|
||||||
|
* 业务类型 1、应用
|
||||||
|
* @content:
|
||||||
|
* @author 👻👻👻👻👻👻👻👻 gjh
|
||||||
|
* @date 2023-10-09 8:19
|
||||||
|
* @param
|
||||||
|
* @return
|
||||||
|
**/
|
||||||
|
private String business_type;
|
||||||
|
/**
|
||||||
|
* 单票ID
|
||||||
|
*/
|
||||||
|
private Long ticket_id;
|
||||||
|
/**
|
||||||
|
* 附件类型
|
||||||
|
*/
|
||||||
|
private String file_type;
|
||||||
|
/**
|
||||||
|
* 附件名称
|
||||||
|
*/
|
||||||
|
private String file_name;
|
||||||
|
/**
|
||||||
|
* 上传人名称
|
||||||
|
*/
|
||||||
|
private String upload_user;
|
||||||
|
/**
|
||||||
|
* 单证号码
|
||||||
|
*/
|
||||||
|
private String file_number;
|
||||||
|
/**
|
||||||
|
* 单证名称
|
||||||
|
*/
|
||||||
|
private String documents_name;
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
private String remark;
|
||||||
|
/**
|
||||||
|
* 关联查询文件路径
|
||||||
|
*/
|
||||||
|
private String file_path;
|
||||||
|
/**
|
||||||
|
* 关联查询单票号码
|
||||||
|
*/
|
||||||
|
private String ticket_code;
|
||||||
|
/**
|
||||||
|
* 接收打包下载的文件集合
|
||||||
|
*/
|
||||||
|
private List<BusinessFileEntity> businessFileEntityList;
|
||||||
|
/**
|
||||||
|
* JSON数据字符串
|
||||||
|
*/
|
||||||
|
private String jsonDataStr;
|
||||||
|
/**
|
||||||
|
* 打包下载的名称
|
||||||
|
*/
|
||||||
|
private String zipName;
|
||||||
|
//附件数量
|
||||||
|
private Long file_count;
|
||||||
|
/**
|
||||||
|
* 单票服务项List的类型查询条件集合
|
||||||
|
*/
|
||||||
|
private List<String> ticketAllServiceEntities;
|
||||||
|
/**
|
||||||
|
* 接收字符串
|
||||||
|
*/
|
||||||
|
private String ticketAllJsonStr;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据服务项,查询特定的附件
|
||||||
|
*/
|
||||||
|
private List<String> business_type_list;
|
||||||
|
/**
|
||||||
|
* 附件集合
|
||||||
|
*/
|
||||||
|
private String fileInfo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据服务项,查询特定的附件
|
||||||
|
*/
|
||||||
|
public List<String> getBusiness_type_list() {
|
||||||
|
return business_type_list;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据服务项,查询特定的附件
|
||||||
|
*/
|
||||||
|
public void setBusiness_type_list(List<String> business_type_list) {
|
||||||
|
this.business_type_list = business_type_list;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 附件表生成的唯一新名称
|
||||||
|
*/
|
||||||
|
public String getFile_save_name() {
|
||||||
|
return file_save_name;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 附件表生成的唯一新名称
|
||||||
|
*/
|
||||||
|
public void setFile_save_name(String file_save_name) {
|
||||||
|
this.file_save_name = file_save_name;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 业务表ID(合同,预报,单票,国际物流)
|
||||||
|
*/
|
||||||
|
public String getBusiness_id() {
|
||||||
|
return business_id;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 业务表ID(合同,预报,单票,国际物流)
|
||||||
|
*/
|
||||||
|
public void setBusiness_id(String business_id) {
|
||||||
|
this.business_id = business_id;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 业务类型(contract/合同prediction/预报changeOrder /纯换单customsClearance /报关报检unboxing/纯开箱单shipSeal/船司盖章harbourSeal /港区盖章)
|
||||||
|
*/
|
||||||
|
public String getBusiness_type() {
|
||||||
|
return business_type;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 业务类型(contract/合同prediction/预报changeOrder /纯换单customsClearance /报关报检unboxing/纯开箱单shipSeal/船司盖章harbourSeal /港区盖章)
|
||||||
|
*/
|
||||||
|
public void setBusiness_type(String business_type) {
|
||||||
|
this.business_type = business_type;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 单票ID
|
||||||
|
*/
|
||||||
|
public Long getTicket_id() {
|
||||||
|
return ticket_id;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 单票ID
|
||||||
|
*/
|
||||||
|
public void setTicket_id(Long ticket_id) {
|
||||||
|
this.ticket_id = ticket_id;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 附件类型
|
||||||
|
*/
|
||||||
|
public String getFile_type() {
|
||||||
|
return file_type;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 附件类型
|
||||||
|
*/
|
||||||
|
public void setFile_type(String file_type) {
|
||||||
|
this.file_type = file_type;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 附件名称
|
||||||
|
*/
|
||||||
|
public String getFile_name() {
|
||||||
|
return file_name;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 附件名称
|
||||||
|
*/
|
||||||
|
public void setFile_name(String file_name) {
|
||||||
|
this.file_name = file_name;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 上传人名称
|
||||||
|
*/
|
||||||
|
public String getUpload_user() {
|
||||||
|
return upload_user;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 上传人名称
|
||||||
|
*/
|
||||||
|
public void setUpload_user(String upload_user) {
|
||||||
|
this.upload_user = upload_user;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 单证号码
|
||||||
|
*/
|
||||||
|
public String getFile_number() {
|
||||||
|
return file_number;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 单证号码
|
||||||
|
*/
|
||||||
|
public void setFile_number(String file_number) {
|
||||||
|
this.file_number = file_number;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
public String getRemark() {
|
||||||
|
return remark;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
public void setRemark(String remark) {
|
||||||
|
this.remark = remark;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTicket_code() {
|
||||||
|
return ticket_code;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTicket_code(String ticket_code) {
|
||||||
|
this.ticket_code = ticket_code;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<BusinessFileEntity> getBusinessFileEntityList() {
|
||||||
|
return businessFileEntityList;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setBusinessFileEntityList(List<BusinessFileEntity> businessFileEntityList) {
|
||||||
|
this.businessFileEntityList = businessFileEntityList;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getFile_path() {
|
||||||
|
return file_path;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setFile_path(String file_path) {
|
||||||
|
this.file_path = file_path;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getFile_count() {
|
||||||
|
return file_count;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setFile_count(Long file_count) {
|
||||||
|
this.file_count = file_count;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDocuments_name() {
|
||||||
|
return documents_name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDocuments_name(String documents_name) {
|
||||||
|
this.documents_name = documents_name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<String> getTicketAllServiceEntities() {
|
||||||
|
return ticketAllServiceEntities;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTicketAllServiceEntities(List<String> ticketAllServiceEntities) {
|
||||||
|
this.ticketAllServiceEntities = ticketAllServiceEntities;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTicketAllJsonStr() {
|
||||||
|
return ticketAllJsonStr;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTicketAllJsonStr(String ticketAllJsonStr) {
|
||||||
|
this.ticketAllJsonStr = ticketAllJsonStr;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getJsonDataStr() {
|
||||||
|
return jsonDataStr;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setJsonDataStr(String jsonDataStr) {
|
||||||
|
this.jsonDataStr = jsonDataStr;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getZipName() {
|
||||||
|
return zipName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setZipName(String zipName) {
|
||||||
|
this.zipName = zipName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getFileInfo() {
|
||||||
|
return fileInfo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setFileInfo(String fileInfo) {
|
||||||
|
this.fileInfo = fileInfo;
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,377 @@
|
||||||
|
<?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.hzya.frame.sys.businessFile.dao.impl.BusinessFileDaoImpl">
|
||||||
|
<resultMap id="get-BusinessFileEntity-result" type="com.hzya.frame.sys.businessFile.entity.BusinessFileEntity">
|
||||||
|
<!--唯一标识码 -->
|
||||||
|
<result property="id" column="id" />
|
||||||
|
<!--附件表生成的唯一新名称 -->
|
||||||
|
<result property="file_save_name" column="file_save_name" />
|
||||||
|
<!--业务表ID(合同,预报,单票,国际物流) -->
|
||||||
|
<result property="business_id" column="business_id" />
|
||||||
|
<!--业务类型(contract/合同prediction/预报changeOrder /纯换单customsClearance /报关报检unboxing/纯开箱单shipSeal/船司盖章harbourSeal /港区盖章) -->
|
||||||
|
<result property="business_type" column="business_type" />
|
||||||
|
<!--单票ID -->
|
||||||
|
<result property="ticket_id" column="ticket_id" />
|
||||||
|
<!--附件类型 -->
|
||||||
|
<result property="file_type" column="file_type" />
|
||||||
|
<!--附件名称 -->
|
||||||
|
<result property="file_name" column="file_name" />
|
||||||
|
<!--上传人名称 -->
|
||||||
|
<result property="upload_user" column="upload_user" />
|
||||||
|
<!--创建人 -->
|
||||||
|
<result property="create_user_id" column="create_user_id" />
|
||||||
|
<!--创建时间 -->
|
||||||
|
<result property="create_time" column="create_time" />
|
||||||
|
<!--修改人 -->
|
||||||
|
<result property="modify_user_id" column="modify_user_id" />
|
||||||
|
<!--修改时间 -->
|
||||||
|
<result property="modify_time" column="modify_time" />
|
||||||
|
<!--状态 -->
|
||||||
|
<result property="sts" column="sts" />
|
||||||
|
<!--单证号码 -->
|
||||||
|
<result property="file_number" column="file_number" />
|
||||||
|
<!--单证名称 -->
|
||||||
|
<result property="documents_name" column="documents_name" />
|
||||||
|
<!--备注 -->
|
||||||
|
<result property="remark" column="remark" />
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<sql id="BusinessFileEntity_Base_Column_List">
|
||||||
|
id,
|
||||||
|
file_save_name,
|
||||||
|
business_id,
|
||||||
|
business_type,
|
||||||
|
ticket_id,
|
||||||
|
file_type,
|
||||||
|
file_name,
|
||||||
|
upload_user,
|
||||||
|
create_user_id,
|
||||||
|
create_time,
|
||||||
|
modify_user_id,
|
||||||
|
modify_time,
|
||||||
|
sts,
|
||||||
|
file_number,
|
||||||
|
documents_name,
|
||||||
|
remark
|
||||||
|
</sql>
|
||||||
|
<!-- 分组查询-->
|
||||||
|
<sql id="BusinessFileEntity_Base_Column_List_group">
|
||||||
|
COUNT(1) as file_count,
|
||||||
|
file_save_name,
|
||||||
|
business_id,
|
||||||
|
business_type,
|
||||||
|
ticket_id,
|
||||||
|
file_type,
|
||||||
|
file_name,
|
||||||
|
upload_user,
|
||||||
|
create_user_id,
|
||||||
|
create_time,
|
||||||
|
modify_user_id,
|
||||||
|
modify_time,
|
||||||
|
sts,
|
||||||
|
file_number,
|
||||||
|
documents_name,
|
||||||
|
remark
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<!--通过ID获取数据 -->
|
||||||
|
<select id="BusinessFileEntity_get" resultMap="get-BusinessFileEntity-result">
|
||||||
|
select
|
||||||
|
<include refid="BusinessFileEntity_Base_Column_List" />
|
||||||
|
from sys_business_file where id = #{ id } and sts='Y'
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<!-- 查询 采用==查询 -->
|
||||||
|
<select id="BusinessFileEntity_list_base" resultMap="get-BusinessFileEntity-result" parameterType="com.hzya.frame.sys.businessFile.entity.BusinessFileEntity">
|
||||||
|
select
|
||||||
|
<include refid="BusinessFileEntity_Base_Column_List" />
|
||||||
|
from sys_business_file
|
||||||
|
<trim prefix="where" prefixOverrides="and">
|
||||||
|
<if test="id != null ">id=#{id}</if>
|
||||||
|
<if test="file_save_name != null and file_save_name !='' "> and file_save_name = #{file_save_name}</if>
|
||||||
|
<if test="business_id != null and business_id !='' "> and business_id = #{business_id}</if>
|
||||||
|
<if test="business_type != null and business_type !='' "> and business_type = #{business_type}</if>
|
||||||
|
<if test="ticket_id != null "> and ticket_id = #{ticket_id}</if>
|
||||||
|
<if test="file_type != null and file_type !='' "> and file_type = #{file_type}</if>
|
||||||
|
<if test="file_name != null and file_name !='' "> and file_name = #{file_name}</if>
|
||||||
|
<if test="upload_user != null and upload_user !='' "> and upload_user = #{upload_user}</if>
|
||||||
|
<if test="create_user_id != null "> and create_user_id = #{create_user_id}</if>
|
||||||
|
<if test="create_time != null "> and create_time = #{create_time}</if>
|
||||||
|
<if test="modify_user_id != null "> and modify_user_id = #{modify_user_id}</if>
|
||||||
|
<if test="modify_time != null "> and modify_time = #{modify_time}</if>
|
||||||
|
<if test="sts != null and sts !='' "> and sts = #{sts}</if>
|
||||||
|
<if test="file_number != null and file_number !='' "> and file_number = #{file_number}</if>
|
||||||
|
<if test="documents_name != null and documents_name !='' "> and documents_name = #{documents_name}</if>
|
||||||
|
<if test="remark != null and remark !='' "> and remark = #{remark}</if>
|
||||||
|
and sts='Y'
|
||||||
|
</trim>
|
||||||
|
<if test=" sort =='' "> order by id desc</if>
|
||||||
|
<if test=" sort !='' and sort!=null and order !='' and order!=null ">order by ${sort} ${order}</if>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<!-- 根据单证编号查询列表-->
|
||||||
|
<select id="BusinessFileEntity_list_base_group" resultMap="get-BusinessFileEntity-result" parameterType="com.hzya.frame.sys.businessFile.entity.BusinessFileEntity">
|
||||||
|
select
|
||||||
|
<include refid="BusinessFileEntity_Base_Column_List_group" />
|
||||||
|
from sys_business_file
|
||||||
|
<trim prefix="where" prefixOverrides="and">
|
||||||
|
<if test="id != null ">id=#{id}</if>
|
||||||
|
<if test="file_save_name != null and file_save_name !='' "> and file_save_name = #{file_save_name}</if>
|
||||||
|
<if test="business_id != null and business_id !='' "> and business_id = #{business_id}</if>
|
||||||
|
<if test="business_type != null and business_type !='' "> and business_type = #{business_type}</if>
|
||||||
|
<if test="ticket_id != null "> and ticket_id = #{ticket_id}</if>
|
||||||
|
<if test="file_type != null and file_type !='' "> and file_type = #{file_type}</if>
|
||||||
|
<if test="file_name != null and file_name !='' "> and file_name = #{file_name}</if>
|
||||||
|
<if test="upload_user != null and upload_user !='' "> and upload_user = #{upload_user}</if>
|
||||||
|
<if test="create_user_id != null "> and create_user_id = #{create_user_id}</if>
|
||||||
|
<if test="create_time != null "> and create_time = #{create_time}</if>
|
||||||
|
<if test="modify_user_id != null "> and modify_user_id = #{modify_user_id}</if>
|
||||||
|
<if test="modify_time != null "> and modify_time = #{modify_time}</if>
|
||||||
|
<if test="sts != null and sts !='' "> and sts = #{sts}</if>
|
||||||
|
<if test="file_number != null and file_number !='' "> and file_number = #{file_number}</if>
|
||||||
|
<if test="documents_name != null and documents_name !='' "> and documents_name = #{documents_name}</if>
|
||||||
|
<if test="remark != null and remark !='' "> and remark = #{remark}</if>
|
||||||
|
and sts='Y'
|
||||||
|
</trim>
|
||||||
|
GROUP BY file_number ,documents_name,business_id,business_type
|
||||||
|
<if test=" sort =='' "> order by id desc</if>
|
||||||
|
<if test=" sort !='' and sort!=null and order !='' and order!=null ">order by ${sort} ${order}</if>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<!-- 根据服务项列表获取附件列表-->
|
||||||
|
<select id="BusinessFileEntity_queryBusinessFileByServiceType" resultMap="get-BusinessFileEntity-result" parameterType="com.hzya.frame.sys.businessFile.entity.BusinessFileEntity">
|
||||||
|
select
|
||||||
|
<include refid="BusinessFileEntity_Base_Column_List" />
|
||||||
|
from sys_business_file
|
||||||
|
<trim prefix="where" prefixOverrides="and">
|
||||||
|
<if test="id != null ">id=#{id}</if>
|
||||||
|
<if test="file_save_name != null and file_save_name !='' "> and file_save_name = #{file_save_name}</if>
|
||||||
|
<if test="business_id != null and business_id !='' "> and business_id = #{business_id}</if>
|
||||||
|
<if test="business_type != null and business_type !='' "> and business_type = #{business_type}</if>
|
||||||
|
<if test="ticket_id != null "> and ticket_id = #{ticket_id}</if>
|
||||||
|
<if test="file_type != null and file_type !='' "> and file_type = #{file_type}</if>
|
||||||
|
<if test="ticketAllServiceEntities != null and ticketAllServiceEntities.size() > 0 ">
|
||||||
|
and
|
||||||
|
<foreach collection="ticketAllServiceEntities" index="index" item="item" open="(" separator="or" close=")">
|
||||||
|
(business_type = #{item} )
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
|
<if test="file_name != null and file_name !='' "> and file_name = #{file_name}</if>
|
||||||
|
<if test="upload_user != null and upload_user !='' "> and upload_user = #{upload_user}</if>
|
||||||
|
<if test="create_user_id != null "> and create_user_id = #{create_user_id}</if>
|
||||||
|
<if test="create_time != null "> and create_time = #{create_time}</if>
|
||||||
|
<if test="modify_user_id != null "> and modify_user_id = #{modify_user_id}</if>
|
||||||
|
<if test="modify_time != null "> and modify_time = #{modify_time}</if>
|
||||||
|
<if test="sts != null and sts !='' "> and sts = #{sts}</if>
|
||||||
|
<if test="file_number != null and file_number !='' "> and file_number = #{file_number}</if>
|
||||||
|
<if test="documents_name != null and documents_name !='' "> and documents_name = #{documents_name}</if>
|
||||||
|
<if test="remark != null and remark !='' "> and remark = #{remark}</if>
|
||||||
|
and sts='Y'
|
||||||
|
</trim>
|
||||||
|
<if test=" sort =='' "> order by id desc</if>
|
||||||
|
<if test=" sort !='' and sort!=null and order !='' and order!=null ">order by ${sort} ${order}</if>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<!-- 查询符合条件的数量 -->
|
||||||
|
<select id="BusinessFileEntity_count" resultType="Integer" parameterType="com.hzya.frame.sys.businessFile.entity.BusinessFileEntity">
|
||||||
|
select count(1) from sys_business_file
|
||||||
|
<trim prefix="where" prefixOverrides="and">
|
||||||
|
<if test="id != null ">id = #{id}</if>
|
||||||
|
<if test="file_save_name != null and file_save_name !='' "> and file_save_name = #{file_save_name} </if>
|
||||||
|
<if test="business_id != null and business_id !='' "> and business_id = #{business_id} </if>
|
||||||
|
<if test="business_type != null and business_type !='' "> and business_type = #{business_type} </if>
|
||||||
|
<if test="ticket_id != null "> and ticket_id = #{ticket_id} </if>
|
||||||
|
<if test="file_type != null and file_type !='' "> and file_type = #{file_type} </if>
|
||||||
|
<if test="file_name != null and file_name !='' "> and file_name = #{file_name} </if>
|
||||||
|
<if test="upload_user != null and upload_user !='' "> and upload_user = #{upload_user} </if>
|
||||||
|
<if test="create_user_id != null "> and create_user_id = #{create_user_id} </if>
|
||||||
|
<if test="create_time != null "> and create_time = #{create_time} </if>
|
||||||
|
<if test="modify_user_id != null "> and modify_user_id = #{modify_user_id} </if>
|
||||||
|
<if test="modify_time != null "> and modify_time = #{modify_time} </if>
|
||||||
|
<if test="sts != null and sts !='' "> and sts = #{sts} </if>
|
||||||
|
<if test="file_number != null and file_number !='' "> and file_number = #{file_number} </if>
|
||||||
|
<if test="documents_name != null and documents_name !='' "> and documents_name = #{documents_name} </if>
|
||||||
|
<if test="remark != null and remark !='' "> and remark = #{remark} </if>
|
||||||
|
and sts='Y'
|
||||||
|
</trim>
|
||||||
|
<if test=" sort =='' "> order by id desc</if>
|
||||||
|
<if test=" sort !='' and sort!=null and order !='' and order!=null "> order by ${sort} ${order}</if>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<!-- 分页查询列表 采用like格式 -->
|
||||||
|
<select id="BusinessFileEntity_list_like" resultMap="get-BusinessFileEntity-result" parameterType="com.hzya.frame.sys.businessFile.entity.BusinessFileEntity">
|
||||||
|
select
|
||||||
|
<include refid="BusinessFileEntity_Base_Column_List" />
|
||||||
|
from sys_business_file
|
||||||
|
<trim prefix="where" prefixOverrides="and">
|
||||||
|
<if test="id != null ">id = #{id}</if>
|
||||||
|
<if test="file_save_name != null and file_save_name !='' "> and file_save_name like concat('%',#{file_save_name},'%') </if>
|
||||||
|
<if test="business_id != null and business_id !='' "> and business_id = #{business_id} </if>
|
||||||
|
<if test="business_type != null and business_type !='' "> and business_type like concat('%',#{business_type},'%') </if>
|
||||||
|
<if test="ticket_id != null "> and ticket_id = #{ticket_id}</if>
|
||||||
|
<if test="file_type != null and file_type !='' "> and file_type like concat('%',#{file_type},'%') </if>
|
||||||
|
<if test="file_name != null and file_name !='' "> and file_name like concat('%',#{file_name},'%') </if>
|
||||||
|
<if test="upload_user != null and upload_user !='' "> and upload_user like concat('%',#{upload_user},'%') </if>
|
||||||
|
<if test="create_user_id != null "> and create_user_id = #{create_user_id}</if>
|
||||||
|
<if test="create_time != null and create_time !='' "> and create_time like concat('%',#{create_time},'%') </if>
|
||||||
|
<if test="modify_user_id != null "> and modify_user_id = #{modify_user_id}</if>
|
||||||
|
<if test="modify_time != null and modify_time !='' "> and modify_time like concat('%',#{modify_time},'%') </if>
|
||||||
|
<if test="sts != null and sts !='' "> and sts like concat('%',#{sts},'%') </if>
|
||||||
|
<if test="file_number != null and file_number !='' "> and file_number like concat('%',#{file_number},'%') </if>
|
||||||
|
<if test="documents_name != null and documents_name !='' "> and documents_name like concat('%',#{documents_name},'%') </if>
|
||||||
|
<if test="remark != null and remark !='' "> and remark like concat('%',#{remark},'%') </if>
|
||||||
|
|
||||||
|
<if test="business_type_list !=null and business_type_list.size > 0">
|
||||||
|
and (
|
||||||
|
<!-- 根据服务项查找 -->
|
||||||
|
<foreach collection="business_type_list" index="index" item="item" open="(" separator="or"
|
||||||
|
close=")">
|
||||||
|
business_type LIKE concat('%',#{item},'%')
|
||||||
|
</foreach>
|
||||||
|
)
|
||||||
|
</if>
|
||||||
|
<!-- 登陆人及下级人员 -->
|
||||||
|
<if test="subUserIdList != null and subUserIdList.size > 0">
|
||||||
|
and (
|
||||||
|
<foreach collection="subUserIdList" index="index" item="item" separator="or">
|
||||||
|
create_user_id = #{item}
|
||||||
|
</foreach>
|
||||||
|
)
|
||||||
|
</if>
|
||||||
|
and sts='Y'
|
||||||
|
</trim>
|
||||||
|
<if test=" sort =='' "> order by id desc</if>
|
||||||
|
<if test=" sort !='' and sort!=null and order !='' and order!=null ">order by ${sort} ${order}</if>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<!-- 查询列表 字段采用or格式 -->
|
||||||
|
<select id="BusinessFileEntity_list_or" resultMap="get-BusinessFileEntity-result" parameterType="com.hzya.frame.sys.businessFile.entity.BusinessFileEntity">
|
||||||
|
select
|
||||||
|
<include refid="BusinessFileEntity_Base_Column_List" />
|
||||||
|
from sys_business_file
|
||||||
|
<trim prefix="where" prefixOverrides="or">
|
||||||
|
<if test="id != null ">id = #{id}</if>
|
||||||
|
<if test="file_save_name != null and file_save_name !='' "> or file_save_name = #{file_save_name} </if>
|
||||||
|
<if test="business_id != null and business_id !='' "> or business_id = #{business_id} </if>
|
||||||
|
<if test="business_type != null and business_type !='' "> or business_type = #{business_type} </if>
|
||||||
|
<if test="ticket_id != null "> or ticket_id = #{ticket_id}</if>
|
||||||
|
<if test="file_type != null and file_type !='' "> or file_type = #{file_type} </if>
|
||||||
|
<if test="file_name != null and file_name !='' "> or file_name = #{file_name} </if>
|
||||||
|
<if test="upload_user != null and upload_user !='' "> or upload_user = #{upload_user} </if>
|
||||||
|
<if test="create_user_id != null "> or create_user_id = #{create_user_id}</if>
|
||||||
|
<if test="create_time != null and create_time !='' "> or create_time = #{create_time} </if>
|
||||||
|
<if test="modify_user_id != null "> or modify_user_id = #{modify_user_id}</if>
|
||||||
|
<if test="modify_time != null and modify_time !='' "> or modify_time = #{modify_time} </if>
|
||||||
|
<if test="sts != null and sts !='' "> or sts = #{sts} </if>
|
||||||
|
<if test="file_number != null and file_number !='' "> or file_number = #{file_number} </if>
|
||||||
|
<if test="documents_name != null and documents_name !='' "> or documents_name = #{documents_name} </if>
|
||||||
|
<if test="remark != null and remark !='' "> or remark = #{remark} </if>
|
||||||
|
and sts='Y'
|
||||||
|
</trim>
|
||||||
|
<if test=" sort =='' "> order by id desc</if>
|
||||||
|
<if test=" sort !='' and sort!=null and order !='' and order!=null ">order by ${sort} ${order}</if>
|
||||||
|
</select>
|
||||||
|
<!-- 新增 -->
|
||||||
|
<insert id="entity_insert" parameterType="com.hzya.frame.sys.businessFile.entity.BusinessFileEntity">
|
||||||
|
insert into sys_business_file(
|
||||||
|
<trim suffix="" suffixOverrides=",">
|
||||||
|
<if test="id != null and id !='' "> id, </if>
|
||||||
|
<if test="file_save_name != null and file_save_name !='' "> file_save_name, </if>
|
||||||
|
<if test="business_id != null and business_id !='' "> business_id, </if>
|
||||||
|
<if test="business_type != null and business_type !='' "> business_type, </if>
|
||||||
|
<if test="ticket_id != null ">ticket_id,</if>
|
||||||
|
<if test="file_type != null and file_type !='' "> file_type, </if>
|
||||||
|
<if test="file_name != null and file_name !='' "> file_name, </if>
|
||||||
|
<if test="upload_user != null and upload_user !='' "> upload_user, </if>
|
||||||
|
<if test="create_user_id != null ">create_user_id,</if>
|
||||||
|
<if test="modify_user_id != null ">modify_user_id,</if>
|
||||||
|
<if test="file_number != null and file_number !='' "> file_number, </if>
|
||||||
|
<if test="documents_name != null and documents_name !='' "> documents_name, </if>
|
||||||
|
<if test="remark != null and remark !='' "> remark, </if>
|
||||||
|
create_time,
|
||||||
|
modify_time,
|
||||||
|
sts
|
||||||
|
</trim>
|
||||||
|
)values
|
||||||
|
(
|
||||||
|
<trim suffix="" suffixOverrides=",">
|
||||||
|
<if test="id != null and id !='' "> #{id}, </if>
|
||||||
|
<if test="file_save_name != null and file_save_name !='' "> #{file_save_name}, </if>
|
||||||
|
<if test="business_id != null and business_id !='' "> #{business_id}, </if>
|
||||||
|
<if test="business_type != null and business_type !='' "> #{business_type}, </if>
|
||||||
|
<if test="ticket_id != null ">#{ticket_id},</if>
|
||||||
|
<if test="file_type != null and file_type !='' "> #{file_type}, </if>
|
||||||
|
<if test="file_name != null and file_name !='' "> #{file_name}, </if>
|
||||||
|
<if test="upload_user != null and upload_user !='' "> #{upload_user}, </if>
|
||||||
|
<if test="create_user_id != null ">#{create_user_id},</if>
|
||||||
|
<if test="modify_user_id != null ">#{modify_user_id},</if>
|
||||||
|
<if test="file_number != null and file_number !='' "> #{file_number}, </if>
|
||||||
|
<if test="documents_name != null and documents_name !='' "> #{documents_name}, </if>
|
||||||
|
<if test="remark != null and remark !='' "> #{remark}, </if>
|
||||||
|
<if test="create_time != null "> #{create_time} ,</if>
|
||||||
|
<if test="create_time == null "> now(),</if>
|
||||||
|
<if test="modify_time != null "> #{modify_time},</if>
|
||||||
|
<if test="modify_time == null "> now(),</if>
|
||||||
|
'Y'
|
||||||
|
</trim>
|
||||||
|
)
|
||||||
|
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
<!-- 修改 -->
|
||||||
|
<update id="BusinessFileEntity_update" parameterType="com.hzya.frame.sys.businessFile.entity.BusinessFileEntity">
|
||||||
|
update sys_business_file set
|
||||||
|
<trim suffix="" suffixOverrides=",">
|
||||||
|
<if test="file_save_name != null and file_save_name !='' "> file_save_name = #{file_save_name},</if>
|
||||||
|
<if test="business_id != null and business_id !='' "> business_id = #{business_id},</if>
|
||||||
|
<if test="business_type != null and business_type !='' "> business_type = #{business_type},</if>
|
||||||
|
<if test="ticket_id != null ">ticket_id = #{ticket_id},</if>
|
||||||
|
<if test="file_type != null and file_type !='' "> file_type = #{file_type},</if>
|
||||||
|
<if test="file_name != null and file_name !='' "> file_name = #{file_name},</if>
|
||||||
|
<if test="upload_user != null and upload_user !='' "> upload_user = #{upload_user},</if>
|
||||||
|
<if test="create_user_id != null ">create_user_id = #{create_user_id},</if>
|
||||||
|
<if test="modify_user_id != null ">modify_user_id = #{modify_user_id},</if>
|
||||||
|
<if test="file_number != null and file_number !='' "> file_number = #{file_number},</if>
|
||||||
|
<if test="documents_name != null and documents_name !='' "> documents_name = #{documents_name},</if>
|
||||||
|
<if test="remark != null and remark !='' "> remark = #{remark},</if>
|
||||||
|
<if test="modify_time != null "> modify_time =#{modify_time} </if>
|
||||||
|
<if test="modify_time == null "> modify_time = now()</if>
|
||||||
|
</trim>
|
||||||
|
where id = #{id}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<!-- 逻辑删除 -->
|
||||||
|
<update id="BusinessFileEntity_logicDelete" parameterType="com.hzya.frame.sys.businessFile.entity.BusinessFileEntity">
|
||||||
|
update sys_business_file set
|
||||||
|
sts='N',modify_time = now(),modify_user_id = #{modify_user_id} where
|
||||||
|
id = #{id}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<!-- 逻辑删除多条件 -->
|
||||||
|
<update id="BusinessFileEntity_logicDelete_Multi_Condition" parameterType="com.hzya.frame.sys.businessFile.entity.BusinessFileEntity">
|
||||||
|
update sys_business_file set
|
||||||
|
sts='N',modify_time = now(),modify_user_id = #{modify_user_id}
|
||||||
|
<trim prefix="where" prefixOverrides="and">
|
||||||
|
<if test="id != null ">id=#{id}</if>
|
||||||
|
<if test="file_save_name != null and file_save_name !='' "> and file_save_name = #{file_save_name}</if>
|
||||||
|
<if test="business_id != null and business_id !='' "> and business_id = #{business_id}</if>
|
||||||
|
<if test="business_type != null and business_type !='' "> and business_type = #{business_type}</if>
|
||||||
|
<if test="ticket_id != null "> and ticket_id = #{ticket_id}</if>
|
||||||
|
<if test="file_type != null and file_type !='' "> and file_type = #{file_type}</if>
|
||||||
|
<if test="file_name != null and file_name !='' "> and file_name = #{file_name}</if>
|
||||||
|
<if test="upload_user != null and upload_user !='' "> and upload_user = #{upload_user}</if>
|
||||||
|
<if test="create_user_id != null "> and create_user_id = #{create_user_id}</if>
|
||||||
|
<if test="create_time != null and create_time !='' "> and create_time = #{create_time}</if>
|
||||||
|
<if test="modify_user_id != null "> and modify_user_id = #{modify_user_id}</if>
|
||||||
|
<if test="modify_time != null and modify_time !='' "> and modify_time = #{modify_time}</if>
|
||||||
|
<if test="sts != null and sts !='' "> and sts = #{sts}</if>
|
||||||
|
<if test="file_number != null and file_number !='' "> and file_number = #{file_number}</if>
|
||||||
|
<if test="remark != null and remark !='' "> and remark = #{remark}</if>
|
||||||
|
</trim>
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<!-- 物理删除 -->
|
||||||
|
<delete id="BusinessFileEntity_delete" parameterType="com.hzya.frame.sys.businessFile.entity.BusinessFileEntity">
|
||||||
|
delete from sys_business_file where id =#{id}
|
||||||
|
</delete>
|
||||||
|
</mapper>
|
|
@ -0,0 +1,73 @@
|
||||||
|
package com.hzya.frame.sys.businessFile.service;
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import com.hzya.frame.basedao.service.IBaseService;
|
||||||
|
import com.hzya.frame.sys.businessFile.entity.BusinessFileEntity;
|
||||||
|
import com.hzya.frame.web.entity.JsonResultEntity;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description: 文件业务关系 service
|
||||||
|
* @tableName: sys_business_file
|
||||||
|
* @entityName: BusinessFileEntity
|
||||||
|
* @author: gjh
|
||||||
|
* @history: 1.0
|
||||||
|
*/
|
||||||
|
public interface IBusinessFileService extends IBaseService<BusinessFileEntity,Long> {
|
||||||
|
/***
|
||||||
|
* 保存业务表和文件表的关系
|
||||||
|
* @content:
|
||||||
|
* @author 👻👻👻👻👻👻👻👻 gjh
|
||||||
|
* @date 2023-10-09 8:32
|
||||||
|
* @param
|
||||||
|
* @return com.hzya.frame.sys.businessFile.entity.BusinessFileEntity
|
||||||
|
**/
|
||||||
|
BusinessFileEntity saveBusinessFile(BusinessFileEntity requestData);
|
||||||
|
/***
|
||||||
|
* 保存业务表和文件表的关系
|
||||||
|
* @content:
|
||||||
|
* @author 👻👻👻👻👻👻👻👻 gjh
|
||||||
|
* @date 2023-10-09 8:32
|
||||||
|
* @param
|
||||||
|
* @return com.hzya.frame.sys.businessFile.entity.BusinessFileEntity
|
||||||
|
**/
|
||||||
|
JsonResultEntity saveBusinessFileByJsonObj(JSONObject requestData);
|
||||||
|
|
||||||
|
/***
|
||||||
|
* 批量保存文件业务相关信息
|
||||||
|
* @param entity
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
BusinessFileEntity saveBatchBusinessFile(BusinessFileEntity entity) throws Exception;
|
||||||
|
|
||||||
|
|
||||||
|
/***
|
||||||
|
* 根据业务条件获取根据单证编号分组的附件列表
|
||||||
|
* @param entity
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<BusinessFileEntity> listQueryBusinessFilesByGroup(BusinessFileEntity entity);
|
||||||
|
|
||||||
|
/***
|
||||||
|
* 根据服务项类型获取附件列表
|
||||||
|
* @param entity
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<BusinessFileEntity> queryBusinessFileByServiceType(BusinessFileEntity entity);
|
||||||
|
|
||||||
|
/***
|
||||||
|
* 验证单票是否有附件可以下载
|
||||||
|
* @param entity
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
BusinessFileEntity validateTicketFiles(BusinessFileEntity entity);
|
||||||
|
|
||||||
|
/****
|
||||||
|
* @Content: 保存保函附件
|
||||||
|
* @Author guojh
|
||||||
|
* @Date 2019/5/16 19:16
|
||||||
|
* @Param [entity]
|
||||||
|
* @return com.hzya.frame.sys.businessFile.entity.BusinessFileEntity
|
||||||
|
**/
|
||||||
|
BusinessFileEntity saveBusinessFileToGuarantee(BusinessFileEntity entity);
|
||||||
|
}
|
|
@ -0,0 +1,204 @@
|
||||||
|
package com.hzya.frame.sys.businessFile.service.impl;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSON;
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import com.hzya.frame.basedao.service.impl.BaseService;
|
||||||
|
import com.hzya.frame.sys.businessFile.dao.IBusinessFileDao;
|
||||||
|
import com.hzya.frame.sys.businessFile.entity.BusinessFileEntity;
|
||||||
|
import com.hzya.frame.sys.businessFile.service.IBusinessFileService;
|
||||||
|
import com.hzya.frame.sys.file.upload.entity.FileResultEntity;
|
||||||
|
import com.hzya.frame.sys.file.upload.entity.FileUploadEntity;
|
||||||
|
import com.hzya.frame.sys.file.upload.service.IFileUploadService;
|
||||||
|
import com.hzya.frame.uuid.UUIDLong;
|
||||||
|
import com.hzya.frame.web.action.SessionContext;
|
||||||
|
import com.hzya.frame.web.entity.BaseResult;
|
||||||
|
import com.hzya.frame.web.entity.JsonResultEntity;
|
||||||
|
import com.hzya.frame.web.exception.BaseSystemException;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.mock.web.MockMultipartFile;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.io.File;
|
||||||
|
import java.io.FileInputStream;
|
||||||
|
import java.io.InputStream;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description: 文件业务关系 service
|
||||||
|
* @tableName: sys_business_file
|
||||||
|
* @entityName: BusinessFileEntity
|
||||||
|
* @author: gjh
|
||||||
|
* @history: 1.0
|
||||||
|
*/
|
||||||
|
@Service(value = "sys_business_fileService")
|
||||||
|
public class BusinessFileServiceImpl extends BaseService<BusinessFileEntity, Long> implements IBusinessFileService {
|
||||||
|
protected IBusinessFileDao businessfileDao;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IFileUploadService fileUploadService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
public void setBusinessFileDao(IBusinessFileDao dao) {
|
||||||
|
|
||||||
|
this.businessfileDao = dao;
|
||||||
|
this.dao = dao;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public BusinessFileEntity saveBusinessFile(BusinessFileEntity entity) {
|
||||||
|
entity.setId(String.valueOf(UUIDLong.longUUID()));
|
||||||
|
businessfileDao.save(entity);
|
||||||
|
return entity;
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
public JsonResultEntity saveBusinessFileByJsonObj(JSONObject requestData) {
|
||||||
|
String jsonStr = requestData.getString("jsonStr");
|
||||||
|
BusinessFileEntity entity = JSON.parseObject(jsonStr,BusinessFileEntity.class);
|
||||||
|
entity.setId(String.valueOf(UUIDLong.longUUID()));
|
||||||
|
businessfileDao.save(entity);
|
||||||
|
|
||||||
|
return BaseResult.getSuccessMessageEntity("保存成功",entity);
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
public BusinessFileEntity saveBatchBusinessFile(BusinessFileEntity entity) throws Exception {
|
||||||
|
/** 获取传入的文件集合*/
|
||||||
|
List<BusinessFileEntity> entityBusinessFileEntityList = null;
|
||||||
|
String jsonStr = entity.getJsonDataStr();
|
||||||
|
|
||||||
|
if (jsonStr != null && !"".equals(jsonStr)) {
|
||||||
|
BusinessFileEntity businessFileEntity = JSON.parseObject(jsonStr, BusinessFileEntity.class);
|
||||||
|
entity.setTicket_id(businessFileEntity.getTicket_id() == null ? entity.getTicket_id() : businessFileEntity.getTicket_id());
|
||||||
|
entity.setBusiness_type(businessFileEntity.getBusiness_type());
|
||||||
|
entityBusinessFileEntityList = businessFileEntity.getBusinessFileEntityList();
|
||||||
|
} else {
|
||||||
|
entityBusinessFileEntityList = entity.getBusinessFileEntityList();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (null != entityBusinessFileEntityList && entityBusinessFileEntityList.size() > 0) {
|
||||||
|
// UserEntity userEntity = SessionContext.getCurrentUser();
|
||||||
|
for (BusinessFileEntity businessFileEntity : entityBusinessFileEntityList) {
|
||||||
|
|
||||||
|
String file_business_id = businessFileEntity.getBusiness_id();
|
||||||
|
//如果businessFileEntity内的business_id 与主表传入的不一致,说明需要重新上传附件
|
||||||
|
if (null != file_business_id && !"".equals(file_business_id) && !file_business_id.equals(entity.getBusiness_id())) {
|
||||||
|
|
||||||
|
String fileSaveName = businessFileEntity.getFile_save_name();
|
||||||
|
FileUploadEntity oldFileEntity = new FileUploadEntity();
|
||||||
|
oldFileEntity.setFilesavename(fileSaveName);
|
||||||
|
List<FileUploadEntity> fileUploadEntityList = fileUploadService.query(oldFileEntity);
|
||||||
|
if (fileUploadEntityList.size() > 0) {
|
||||||
|
oldFileEntity = fileUploadEntityList.get(0);
|
||||||
|
} else {
|
||||||
|
throw new BaseSystemException("获取历史附件错误,请联系管理员!");
|
||||||
|
}
|
||||||
|
String oldPath = oldFileEntity.getFilepath() + "/" + fileSaveName;
|
||||||
|
//根据老文件获取文件,写到新的文件夹下面
|
||||||
|
File oldFile = new File(oldPath);
|
||||||
|
//获取流
|
||||||
|
InputStream in = new FileInputStream(oldFile);
|
||||||
|
//创建文件
|
||||||
|
MockMultipartFile mockMultipartFile = new MockMultipartFile(oldFileEntity.getFilename(), oldFileEntity.getFilename(), oldFileEntity.getType(), in);
|
||||||
|
|
||||||
|
FileResultEntity fileResultEntity = new FileResultEntity();
|
||||||
|
fileResultEntity.setBusiness_id(Long.valueOf(entity.getBusiness_id()));
|
||||||
|
fileResultEntity.setTicket_id(entity.getTicket_id());
|
||||||
|
fileResultEntity.setBusiness_type(entity.getBusiness_type());
|
||||||
|
fileResultEntity = fileUploadService.fileUpload(mockMultipartFile, fileResultEntity);
|
||||||
|
FileUploadEntity fileUploadEntity = (FileUploadEntity) fileResultEntity.getAttribute();
|
||||||
|
businessFileEntity.setFile_save_name(fileUploadEntity.getFilesavename());
|
||||||
|
businessFileEntity.setFile_name(oldFileEntity.getFilename());
|
||||||
|
businessFileEntity.setId(null);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
businessFileEntity.setBusiness_id(entity.getBusiness_id());
|
||||||
|
businessFileEntity.setBusiness_type(entity.getBusiness_type());
|
||||||
|
businessFileEntity.setFile_number(entity.getFile_number());
|
||||||
|
businessFileEntity.setTicket_id(businessFileEntity.getTicket_id() == null ? entity.getTicket_id() : businessFileEntity.getTicket_id());
|
||||||
|
businessFileEntity.setDocuments_name(entity.getDocuments_name());
|
||||||
|
// businessFileEntity.setCreate_user_id(userEntity.getId());
|
||||||
|
// businessFileEntity.setUpload_user(userEntity.getView_name());
|
||||||
|
// businessFileEntity.setModify_user_id(userEntity.getId());
|
||||||
|
businessfileDao.saveOrUpdate(businessFileEntity);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return entity;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<BusinessFileEntity> listQueryBusinessFilesByGroup(BusinessFileEntity entity) {
|
||||||
|
return businessfileDao.listQueryBusinessFiles(entity);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<BusinessFileEntity> queryBusinessFileByServiceType(BusinessFileEntity entity) {
|
||||||
|
/** 返回的附件集合*/
|
||||||
|
List<BusinessFileEntity> returnBusinessFiles = new ArrayList<BusinessFileEntity>();
|
||||||
|
String str = entity.getTicketAllJsonStr();
|
||||||
|
|
||||||
|
List<String> ticketAllServiceEntities = null;
|
||||||
|
if (null == str || "".equals(str)) {
|
||||||
|
return returnBusinessFiles;
|
||||||
|
} else {
|
||||||
|
ticketAllServiceEntities = JSON.parseArray(str, String.class);
|
||||||
|
}
|
||||||
|
if (null == ticketAllServiceEntities || ticketAllServiceEntities.size() == 0) {
|
||||||
|
return returnBusinessFiles;
|
||||||
|
} else {
|
||||||
|
entity.setTicketAllServiceEntities(ticketAllServiceEntities);
|
||||||
|
returnBusinessFiles = businessfileDao.queryBusinessFileByServiceType(entity);
|
||||||
|
}
|
||||||
|
|
||||||
|
return returnBusinessFiles;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public BusinessFileEntity validateTicketFiles(BusinessFileEntity entity) {
|
||||||
|
Long ticket_id = entity.getTicket_id();
|
||||||
|
|
||||||
|
/** 根据单票的ID获取单票下的所有的附件*/
|
||||||
|
BusinessFileEntity queryBusinessFileEntity = new BusinessFileEntity();
|
||||||
|
queryBusinessFileEntity.setTicket_id(ticket_id);
|
||||||
|
List<BusinessFileEntity> entityBusinessFileEntityList = businessfileDao.query(queryBusinessFileEntity);
|
||||||
|
if (entityBusinessFileEntityList.size() == 0) {
|
||||||
|
throw new BaseSystemException("单票ID:" + ticket_id + "未查询到可打包下载的附件!");
|
||||||
|
}
|
||||||
|
entity.setBusinessFileEntityList(entityBusinessFileEntityList);
|
||||||
|
|
||||||
|
return entity;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public BusinessFileEntity saveBusinessFileToGuarantee(BusinessFileEntity entity) {
|
||||||
|
/** 获取当前登陆人*/
|
||||||
|
/** 获取file转成的集合JSON字符串*/
|
||||||
|
String fileInfo = entity.getFileInfo();
|
||||||
|
/** 转成对象*/
|
||||||
|
BusinessFileEntity businessFileEntity = JSON.parseObject(fileInfo, BusinessFileEntity.class);
|
||||||
|
/** 获取file集合*/
|
||||||
|
List<BusinessFileEntity> businessFileEntityList = businessFileEntity.getBusinessFileEntityList();
|
||||||
|
if (null != businessFileEntityList && businessFileEntityList.size() > 0) {
|
||||||
|
for (BusinessFileEntity fileEntity : businessFileEntityList) {
|
||||||
|
// if (fileEntity.getId() == null) {
|
||||||
|
// fileEntity.setCreate_user_id(userEntity.getId());
|
||||||
|
// fileEntity.setModify_user_id(userEntity.getId());
|
||||||
|
// fileEntity.setOrg_id(userEntity.getOrg_id());
|
||||||
|
// fileEntity.setCompany_org_id(userEntity.getCompany_org_id());
|
||||||
|
// fileEntity.setBusiness_type(entity.getBusiness_type());
|
||||||
|
// fileEntity.setBusiness_id(entity.getBusiness_id());
|
||||||
|
// fileEntity.setUpload_user(userEntity.getView_name());
|
||||||
|
// businessfileDao.saveOrUpdate(fileEntity);
|
||||||
|
// }
|
||||||
|
}
|
||||||
|
entity.setBusinessFileEntityList(businessFileEntityList);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
return entity;
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,278 @@
|
||||||
|
<?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.hzya.frame.sys.dictionaryshopNew.dao.impl.SysDictionaryshopNewMapperImpl">
|
||||||
|
<resultMap id="get-entity-result" type="com.hzya.frame.sys.dictionaryshopNew.entity.SysDictionaryshopNew">
|
||||||
|
<!--唯一标识码 -->
|
||||||
|
<result property="id" column="id" />
|
||||||
|
<!--表名 -->
|
||||||
|
<result property="tabName" column="tab_name" />
|
||||||
|
<!--列名 -->
|
||||||
|
<result property="columnName" column="column_name" />
|
||||||
|
<!--列说明 -->
|
||||||
|
<result property="columnContent" column="column_content" />
|
||||||
|
<!--列值 -->
|
||||||
|
<result property="columnValue" column="column_value" />
|
||||||
|
<!--列数字值用于比较数据字典大小 -->
|
||||||
|
<result property="columnNumValue" column="column_num_value" />
|
||||||
|
<!--如果数据字典上下级,通过连接上级id,当前表id -->
|
||||||
|
<result property="upId" column="up_id" />
|
||||||
|
<!--备注 -->
|
||||||
|
<result property="memo" column="memo" />
|
||||||
|
<!--使用状态,1 使用,2 不使用 -->
|
||||||
|
<result property="usedSts" column="used_sts" />
|
||||||
|
<!--排序 -->
|
||||||
|
<result property="sorts" column="sorts" />
|
||||||
|
<!--所属组织机构 -->
|
||||||
|
<result property="orgId" column="org_id" />
|
||||||
|
<!--创建人 -->
|
||||||
|
<result property="createUserId" column="create_user_id" />
|
||||||
|
<!--创建时间 -->
|
||||||
|
<result property="createTime" column="create_time" />
|
||||||
|
<!--修改人 -->
|
||||||
|
<result property="modifyUserId" column="modify_user_id" />
|
||||||
|
<!--修改时间 -->
|
||||||
|
<result property="modifyTime" column="modify_time" />
|
||||||
|
<!--状态 -->
|
||||||
|
<result property="sts" column="sts" />
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<sql id="Base_Column_List">
|
||||||
|
id,
|
||||||
|
tab_name,
|
||||||
|
column_name,
|
||||||
|
column_content,
|
||||||
|
column_value,
|
||||||
|
column_num_value,
|
||||||
|
up_id,
|
||||||
|
memo,
|
||||||
|
used_sts,
|
||||||
|
sorts,
|
||||||
|
org_id,
|
||||||
|
create_user_id,
|
||||||
|
create_time,
|
||||||
|
modify_user_id,
|
||||||
|
modify_time,
|
||||||
|
sts
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<!--通过ID获取数据 -->
|
||||||
|
<select id="entity_get" resultMap="get-entity-result">
|
||||||
|
select
|
||||||
|
<include refid="Base_Column_List" />
|
||||||
|
from sys_dictionaryshop_new where id = #{ id } and sts='Y'
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<!-- 查询 采用==查询 -->
|
||||||
|
<select id="entity_list_base" resultMap="get-entity-result" parameterType="com.hzya.frame.sys.dictionaryshopNew.entity.SysDictionaryshopNew">
|
||||||
|
select
|
||||||
|
<include refid="Base_Column_List" />
|
||||||
|
from sys_dictionaryshop_new
|
||||||
|
<trim prefix="where" prefixOverrides="and">
|
||||||
|
<if test="id != null and id !='' ">id = #{id} </if>
|
||||||
|
<if test="tabName != null and tabName !='' "> and tab_name = #{tabName}</if>
|
||||||
|
<if test="columnName != null and columnName !='' "> and column_name = #{columnName}</if>
|
||||||
|
<if test="columnContent != null and columnContent !='' "> and column_content = #{columnContent}</if>
|
||||||
|
<if test="columnValue != null and columnValue !='' "> and column_value = #{columnValue}</if>
|
||||||
|
<if test="columnNumValue != null "> and column_num_value = #{columnNumValue}</if>
|
||||||
|
<if test="upId != null "> and up_id = #{upId}</if>
|
||||||
|
<if test="memo != null and memo !='' "> and memo = #{memo}</if>
|
||||||
|
<if test="usedSts != null and usedSts !='' "> and used_sts = #{usedSts}</if>
|
||||||
|
<if test="sorts != null "> and sorts = #{sorts}</if>
|
||||||
|
<if test="orgId != null and orgId !='' "> and org_id = #{orgId}</if>
|
||||||
|
<if test="createUserId != null and createUserId !='' "> and create_user_id = #{createUserId}</if>
|
||||||
|
<if test="createTime != null "> and create_time = #{createTime}</if>
|
||||||
|
<if test="modifyUserId != null and modifyUserId !='' "> and modify_user_id = #{modifyUserId}</if>
|
||||||
|
<if test="modifyTime != null "> and modify_time = #{modifyTime}</if>
|
||||||
|
<if test="sts != null and sts !='' "> and sts = #{sts}</if>
|
||||||
|
</trim>
|
||||||
|
<if test=" sort == null or sort =='' "> order by sorts asc</if>
|
||||||
|
<if test=" sort !='' and sort!=null and order !='' and order!=null ">order by ${sort} ${order}</if>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<!-- 查询符合条件的数量 -->
|
||||||
|
<select id="entity_count" resultType="Integer" parameterType="com.hzya.frame.sys.dictionaryshopNew.entity.SysDictionaryshopNew">
|
||||||
|
select count(1) from sys_dictionaryshop_new
|
||||||
|
<trim prefix="where" prefixOverrides="and">
|
||||||
|
<if test="id != null and id !='' ">id = #{id} </if>
|
||||||
|
<if test="tabName != null and tabName !='' "> and tab_name = #{tabName}</if>
|
||||||
|
<if test="columnName != null and columnName !='' "> and column_name = #{columnName}</if>
|
||||||
|
<if test="columnContent != null and columnContent !='' "> and column_content = #{columnContent}</if>
|
||||||
|
<if test="columnValue != null and columnValue !='' "> and column_value = #{columnValue}</if>
|
||||||
|
<if test="columnNumValue != null "> and column_num_value = #{columnNumValue}</if>
|
||||||
|
<if test="upId != null "> and up_id = #{upId}</if>
|
||||||
|
<if test="memo != null and memo !='' "> and memo = #{memo}</if>
|
||||||
|
<if test="usedSts != null and usedSts !='' "> and used_sts = #{usedSts}</if>
|
||||||
|
<if test="sorts != null "> and sorts = #{sorts}</if>
|
||||||
|
<if test="orgId != null and orgId !='' "> and org_id = #{orgId}</if>
|
||||||
|
<if test="createUserId != null and createUserId !='' "> and create_user_id = #{createUserId}</if>
|
||||||
|
<if test="createTime != null "> and create_time = #{createTime}</if>
|
||||||
|
<if test="modifyUserId != null and modifyUserId !='' "> and modify_user_id = #{modifyUserId}</if>
|
||||||
|
<if test="modifyTime != null "> and modify_time = #{modifyTime}</if>
|
||||||
|
<if test="sts != null and sts !='' "> and sts = #{sts}</if>
|
||||||
|
</trim>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<!-- 分页查询列表 采用like格式 -->
|
||||||
|
<select id="entity_list_like" resultMap="get-entity-result" parameterType="com.hzya.frame.sys.dictionaryshopNew.entity.SysDictionaryshopNew">
|
||||||
|
select
|
||||||
|
<include refid="Base_Column_List" />
|
||||||
|
from sys_dictionaryshop_new
|
||||||
|
<trim prefix="where" prefixOverrides="and">
|
||||||
|
<if test="id != null and id !='' "> id like concat('%',#{id},'%') </if>
|
||||||
|
<if test="tabName != null and tabName !='' "> and tab_name like concat('%',#{tabName},'%') </if>
|
||||||
|
<if test="columnName != null and columnName !='' "> and column_name like concat('%',#{columnName},'%') </if>
|
||||||
|
<if test="columnContent != null and columnContent !='' "> and column_content like concat('%',#{columnContent},'%') </if>
|
||||||
|
<if test="columnValue != null and columnValue !='' "> and column_value like concat('%',#{columnValue},'%') </if>
|
||||||
|
<if test="columnNumValue != null "> and column_num_value = #{columnNumValue}</if>
|
||||||
|
<if test="upId != null "> and up_id = #{upId}</if>
|
||||||
|
<if test="memo != null and memo !='' "> and memo like concat('%',#{memo},'%') </if>
|
||||||
|
<if test="usedSts != null and usedSts !='' "> and used_sts like concat('%',#{usedSts},'%') </if>
|
||||||
|
<if test="sorts != null "> and sorts = #{sorts}</if>
|
||||||
|
<if test="orgId != null and orgId !='' "> and org_id like concat('%',#{orgId},'%') </if>
|
||||||
|
<if test="createUserId != null and createUserId !='' "> and create_user_id like concat('%',#{createUserId},'%') </if>
|
||||||
|
<if test="createTime != null and createTime !='' "> and create_time like concat('%',#{createTime},'%') </if>
|
||||||
|
<if test="modifyUserId != null and modifyUserId !='' "> and modify_user_id like concat('%',#{modifyUserId},'%') </if>
|
||||||
|
<if test="modifyTime != null and modifyTime !='' "> and modify_time like concat('%',#{modifyTime},'%') </if>
|
||||||
|
<if test="sts != null and sts !='' "> and sts like concat('%',#{sts},'%') </if>
|
||||||
|
</trim>
|
||||||
|
<if test=" sort == null or sort =='' "> order by sorts asc</if>
|
||||||
|
<if test=" sort !='' and sort!=null and order !='' and order!=null ">order by ${sort} ${order}</if>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<!-- 查询列表 字段采用or格式 -->
|
||||||
|
<select id="entity_list_or" resultMap="get-entity-result" parameterType="com.hzya.frame.sys.dictionaryshopNew.entity.SysDictionaryshopNew">
|
||||||
|
select
|
||||||
|
<include refid="Base_Column_List" />
|
||||||
|
from sys_dictionaryshop_new
|
||||||
|
<trim prefix="where" prefixOverrides="or">
|
||||||
|
<if test="id != null and id !='' ">id = #{id} </if>
|
||||||
|
<if test="tabName != null and tabName !='' "> or tab_name = #{tabName} </if>
|
||||||
|
<if test="columnName != null and columnName !='' "> or column_name = #{columnName} </if>
|
||||||
|
<if test="columnContent != null and columnContent !='' "> or column_content = #{columnContent} </if>
|
||||||
|
<if test="columnValue != null and columnValue !='' "> or column_value = #{columnValue} </if>
|
||||||
|
<if test="columnNumValue != null "> or column_num_value = #{columnNumValue}</if>
|
||||||
|
<if test="upId != null "> or up_id = #{upId}</if>
|
||||||
|
<if test="memo != null and memo !='' "> or memo = #{memo} </if>
|
||||||
|
<if test="usedSts != null and usedSts !='' "> or used_sts = #{usedSts} </if>
|
||||||
|
<if test="sorts != null "> or sorts = #{sorts}</if>
|
||||||
|
<if test="orgId != null and orgId !='' "> or org_id = #{orgId} </if>
|
||||||
|
<if test="createUserId != null and createUserId !='' "> or create_user_id = #{createUserId} </if>
|
||||||
|
<if test="createTime != null and createTime !='' "> or create_time = #{createTime} </if>
|
||||||
|
<if test="modifyUserId != null and modifyUserId !='' "> or modify_user_id = #{modifyUserId} </if>
|
||||||
|
<if test="modifyTime != null and modifyTime !='' "> or modify_time = #{modifyTime} </if>
|
||||||
|
<if test="sts != null and sts !='' "> or sts = #{sts} </if>
|
||||||
|
</trim>
|
||||||
|
<if test=" sort == null or sort =='' "> order by sorts asc</if>
|
||||||
|
<if test=" sort !='' and sort!=null and order !='' and order!=null ">order by ${sort} ${order}</if>
|
||||||
|
</select>
|
||||||
|
<!-- 新增 -->
|
||||||
|
<insert id="entity_insert" parameterType="com.hzya.frame.sys.dictionaryshopNew.entity.SysDictionaryshopNew">
|
||||||
|
insert into sys_dictionaryshop_new(
|
||||||
|
<trim suffix="" suffixOverrides=",">
|
||||||
|
<if test="id != null and id !='' "> id, </if>
|
||||||
|
<if test="tabName != null and tabName !='' "> tab_name, </if>
|
||||||
|
<if test="columnName != null and columnName !='' "> column_name, </if>
|
||||||
|
<if test="columnContent != null and columnContent !='' "> column_content, </if>
|
||||||
|
<if test="columnValue != null and columnValue !='' "> column_value, </if>
|
||||||
|
<if test="columnNumValue != null ">column_num_value,</if>
|
||||||
|
<if test="upId != null ">up_id,</if>
|
||||||
|
<if test="memo != null and memo !='' "> memo, </if>
|
||||||
|
<if test="usedSts != null and usedSts !='' "> used_sts, </if>
|
||||||
|
<if test="sorts != null ">sorts,</if>
|
||||||
|
<if test="orgId != null and orgId !='' "> org_id, </if>
|
||||||
|
<if test="createUserId != null and createUserId !='' "> create_user_id, </if>
|
||||||
|
<if test="createTime != null ">create_time,</if>
|
||||||
|
<if test="modifyUserId != null and modifyUserId !='' "> modify_user_id, </if>
|
||||||
|
<if test="modifyTime != null ">modify_time,</if>
|
||||||
|
<if test="sts != null and sts !='' "> sts, </if>
|
||||||
|
</trim>
|
||||||
|
)values
|
||||||
|
(
|
||||||
|
<trim suffix="" suffixOverrides=",">
|
||||||
|
<if test="id != null and id !='' "> #{id}, </if>
|
||||||
|
<if test="tabName != null and tabName !='' "> #{tabName}, </if>
|
||||||
|
<if test="columnName != null and columnName !='' "> #{columnName}, </if>
|
||||||
|
<if test="columnContent != null and columnContent !='' "> #{columnContent}, </if>
|
||||||
|
<if test="columnValue != null and columnValue !='' "> #{columnValue}, </if>
|
||||||
|
<if test="columnNumValue != null ">#{columnNumValue},</if>
|
||||||
|
<if test="upId != null ">#{upId},</if>
|
||||||
|
<if test="memo != null and memo !='' "> #{memo}, </if>
|
||||||
|
<if test="usedSts != null and usedSts !='' "> #{usedSts}, </if>
|
||||||
|
<if test="sorts != null ">#{sorts},</if>
|
||||||
|
<if test="orgId != null and orgId !='' "> #{orgId}, </if>
|
||||||
|
<if test="createUserId != null and createUserId !='' "> #{createUserId}, </if>
|
||||||
|
<if test="createTime != null ">#{createTime},</if>
|
||||||
|
<if test="modifyUserId != null and modifyUserId !='' "> #{modifyUserId}, </if>
|
||||||
|
<if test="modifyTime != null ">#{modifyTime},</if>
|
||||||
|
<if test="sts != null and sts !='' "> #{sts}, </if>
|
||||||
|
</trim>
|
||||||
|
)
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
<!-- 修改 -->
|
||||||
|
<update id="entity_update" parameterType="com.hzya.frame.sys.dictionaryshopNew.entity.SysDictionaryshopNew">
|
||||||
|
update sys_dictionaryshop_new set
|
||||||
|
<trim suffix="" suffixOverrides=",">
|
||||||
|
<if test="tabName != null and tabName !='' "> tab_name = #{tabName},</if>
|
||||||
|
<if test="columnName != null and columnName !='' "> column_name = #{columnName},</if>
|
||||||
|
<if test="columnContent != null and columnContent !='' "> column_content = #{columnContent},</if>
|
||||||
|
<if test="columnValue != null and columnValue !='' "> column_value = #{columnValue},</if>
|
||||||
|
<if test="columnNumValue != null ">column_num_value = #{columnNumValue},</if>
|
||||||
|
<if test="upId != null ">up_id = #{upId},</if>
|
||||||
|
<if test="memo != null and memo !='' "> memo = #{memo},</if>
|
||||||
|
<if test="usedSts != null and usedSts !='' "> used_sts = #{usedSts},</if>
|
||||||
|
<if test="sorts != null ">sorts = #{sorts},</if>
|
||||||
|
<if test="orgId != null and orgId !='' "> org_id = #{orgId},</if>
|
||||||
|
<if test="createUserId != null and createUserId !='' "> create_user_id = #{createUserId},</if>
|
||||||
|
<if test="createTime != null ">create_time = #{createTime},</if>
|
||||||
|
<if test="modifyUserId != null and modifyUserId !='' "> modify_user_id = #{modifyUserId},</if>
|
||||||
|
<if test="modifyTime != null ">modify_time = #{modifyTime},</if>
|
||||||
|
<if test="sts != null and sts !='' "> sts = #{sts},</if>
|
||||||
|
</trim>
|
||||||
|
where id = #{id}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<!-- 逻辑删除 -->
|
||||||
|
<update id="entity_logicDelete" parameterType="com.hzya.frame.sys.dictionaryshopNew.entity.SysDictionaryshopNew">
|
||||||
|
update sys_dictionaryshop_new set
|
||||||
|
sts='N',modify_time = now(),modify_user_id = #{modifyUserId} where
|
||||||
|
id = #{id}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<!-- 逻辑删除多条件 -->
|
||||||
|
<update id="entity_logicDelete_Multi_Condition" parameterType="com.hzya.frame.sys.dictionaryshopNew.entity.SysDictionaryshopNew">
|
||||||
|
update sys_dictionaryshop_new set
|
||||||
|
sts='N',modify_time = now(),modify_user_id = #{modifyUserId}
|
||||||
|
<trim prefix="where" prefixOverrides="and">
|
||||||
|
<if test="id != null and id !='' ">id = #{id} </if>
|
||||||
|
<if test="tabName != null and tabName !='' "> and tab_name = #{tabName}</if>
|
||||||
|
<if test="columnName != null and columnName !='' "> and column_name = #{columnName}</if>
|
||||||
|
<if test="columnContent != null and columnContent !='' "> and column_content = #{columnContent}</if>
|
||||||
|
<if test="columnValue != null and columnValue !='' "> and column_value = #{columnValue}</if>
|
||||||
|
<if test="columnNumValue != null "> and column_num_value = #{columnNumValue}</if>
|
||||||
|
<if test="upId != null "> and up_id = #{upId}</if>
|
||||||
|
<if test="memo != null and memo !='' "> and memo = #{memo}</if>
|
||||||
|
<if test="usedSts != null and usedSts !='' "> and used_sts = #{usedSts}</if>
|
||||||
|
<if test="sorts != null "> and sorts = #{sorts}</if>
|
||||||
|
<if test="orgId != null and orgId !='' "> and org_id = #{orgId}</if>
|
||||||
|
<if test="createUserId != null and createUserId !='' "> and create_user_id = #{createUserId}</if>
|
||||||
|
<if test="createTime != null and createTime !='' "> and create_time = #{createTime}</if>
|
||||||
|
<if test="modifyUserId != null and modifyUserId !='' "> and modify_user_id = #{modifyUserId}</if>
|
||||||
|
<if test="modifyTime != null and modifyTime !='' "> and modify_time = #{modifyTime}</if>
|
||||||
|
<if test="sts != null and sts !='' "> and sts = #{sts}</if>
|
||||||
|
</trim>
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<!-- 物理删除 -->
|
||||||
|
<delete id="entity_delete" parameterType="com.hzya.frame.sys.dictionaryshopNew.entity.SysDictionaryshopNew">
|
||||||
|
delete from sys_dictionaryshop_new where id =#{id}
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
|
||||||
|
<!--通过ID获取数据 -->
|
||||||
|
<select id="entity_get_by_value" resultMap="get-entity-result" parameterType="com.hzya.frame.sys.dictionaryshopNew.entity.SysDictionaryshopNew">
|
||||||
|
select
|
||||||
|
<include refid="Base_Column_List" />
|
||||||
|
from sys_dictionaryshop_new where tab_name = #{tabName} and column_name = #{columnName} and column_value = #{columnValue} and sts='Y'
|
||||||
|
</select>
|
||||||
|
</mapper>
|
|
@ -0,0 +1,189 @@
|
||||||
|
<?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.hzya.frame.sys.productVersion.dao.impl.SysProductVersionMapperImpl">
|
||||||
|
<resultMap id="get-entity-result" type="com.hzya.frame.sys.productVersion.entity.SysProductVersion">
|
||||||
|
<!--主键 -->
|
||||||
|
<result property="id" column="ID" />
|
||||||
|
<!--产品id -->
|
||||||
|
<result property="productId" column="product_id" />
|
||||||
|
<!--版本号 -->
|
||||||
|
<result property="versionNumber" column="version_number" />
|
||||||
|
<!--版本说明 -->
|
||||||
|
<result property="versionDescription" column="version_description" />
|
||||||
|
<!--排序号 -->
|
||||||
|
<result property="sorts" column="sorts" />
|
||||||
|
<!--组织机构ID -->
|
||||||
|
<result property="orgId" column="org_id" />
|
||||||
|
<!--状态 1有效 0无效 -->
|
||||||
|
<result property="sts" column="sts" />
|
||||||
|
<!--创建人ID -->
|
||||||
|
<result property="createUserId" column="create_user_id" />
|
||||||
|
<!--创建时间ID -->
|
||||||
|
<result property="createTime" column="create_time" />
|
||||||
|
<!--修改时间 -->
|
||||||
|
<result property="modifyTime" column="modify_time" />
|
||||||
|
<!--修改人ID -->
|
||||||
|
<result property="modifyUserId" column="modify_user_id" />
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<sql id="Sysproductversion_Base_Column_List">
|
||||||
|
ID as id,
|
||||||
|
product_id as product_id,
|
||||||
|
version_number as version_number,
|
||||||
|
version_description as version_description,
|
||||||
|
sorts as sorts,
|
||||||
|
org_id as org_id,
|
||||||
|
sts as sts,
|
||||||
|
create_user_id as create_user_id,
|
||||||
|
create_time as create_time,
|
||||||
|
modify_time as modify_time,
|
||||||
|
modify_user_id as modify_user_id
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<!--通过ID获取数据 -->
|
||||||
|
<select id="entity_get" resultMap="get-entity-result">
|
||||||
|
select
|
||||||
|
<include refid="Sysproductversion_Base_Column_List" />
|
||||||
|
from sys_product_version where sts = 'Y' and id = #{id}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<!-- 查询 采用==查询 -->
|
||||||
|
<select id="entity_list_base" resultMap="get-entity-result" parameterType="com.hzya.frame.sys.productVersion.entity.SysProductVersion">
|
||||||
|
select
|
||||||
|
<include refid="Sysproductversion_Base_Column_List" />
|
||||||
|
from sys_product_version
|
||||||
|
<trim prefix="where" prefixOverrides="and">
|
||||||
|
<if test="id != null ">ID= #{id} </if>
|
||||||
|
<if test="productId != null and productId !='' "> and product_id = #{productId} </if>
|
||||||
|
<if test="versionNumber != null and versionNumber !='' "> and version_number = #{versionNumber}</if>
|
||||||
|
<if test="versionDescription != null and versionDescription !='' "> and version_description = #{versionDescription}</if>
|
||||||
|
<if test="sorts != null "> and sorts = #{sorts}</if>
|
||||||
|
<if test="orgId != null and orgId !='' "> and org_id = #{orgId}</if>
|
||||||
|
<if test="sts != null and sts !='' "> and sts = #{sts}</if>
|
||||||
|
<if test="createUserId != null and createUserId !='' "> and create_user_id = #{createUserId}</if>
|
||||||
|
<if test="createTime != null and createTime !='' "> and create_time = #{createTime}</if>
|
||||||
|
<if test="modifyTime != null and modifyTime !='' "> and modify_time = #{modifyTime}</if>
|
||||||
|
<if test="modifyUserId != null and modifyUserId !='' "> and modify_user_id = #{modifyUserId}</if>
|
||||||
|
</trim>
|
||||||
|
order by sorts asc
|
||||||
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<!-- 分页查询列表 采用like格式 -->
|
||||||
|
<select id="entity_list_like" resultMap="get-entity-result" parameterType="com.hzya.frame.sys.productVersion.entity.SysProductVersion">
|
||||||
|
select
|
||||||
|
<include refid="Sysproductversion_Base_Column_List" />
|
||||||
|
from sys_product_version
|
||||||
|
<trim prefix="where" prefixOverrides="and">
|
||||||
|
<if test="id != null ">ID = #{id}</if>
|
||||||
|
<if test="productId != null and productId !='' "> and product_id like concat('%',#{productId},'%') </if>
|
||||||
|
<if test="versionNumber != null and versionNumber !='' "> and version_number like concat('%',#{versionNumber},'%') </if>
|
||||||
|
<if test="versionDescription != null and versionDescription !='' "> and version_description like concat('%',#{versionDescription},'%') </if>
|
||||||
|
<if test="sorts != null "> and sorts like concat('%', #{sorts},'%')</if>
|
||||||
|
<if test="orgId != null and orgId !='' "> and org_id like concat('%', #{orgId},'%')</if>
|
||||||
|
<if test="sts != null and sts !='' "> and sts like concat('%', #{sts},'%')</if>
|
||||||
|
<if test="createUserId != null and createUserId !='' "> and create_user_id like concat('%', #{createUserId},'%')</if>
|
||||||
|
<if test="createTime != null and createTime !='' "> and create_time like concat('%', #{createTime},'%')</if>
|
||||||
|
<if test="modifyTime != null and modifyTime !='' "> and modify_time like concat('%', #{modifyTime},'%')</if>
|
||||||
|
<if test="modifyUserId != null and modifyUserId !='' "> and modify_user_id like concat('%', #{modifyUserId},'%')</if>
|
||||||
|
</trim>
|
||||||
|
order by sorts asc
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<!-- 查询列表 字段采用or格式 -->
|
||||||
|
<select id="entity_list_or" resultMap="get-entity-result" parameterType="com.hzya.frame.sys.productVersion.entity.SysProductVersion">
|
||||||
|
select
|
||||||
|
<include refid="Sysproductversion_Base_Column_List" />
|
||||||
|
from sys_product_version
|
||||||
|
<trim prefix="where" prefixOverrides="or">
|
||||||
|
<if test="id != null ">ID = #{id}</if>
|
||||||
|
<if test="productId != null and productId !='' "> or product_id = #{productId} </if>
|
||||||
|
<if test="versionNumber != null and versionNumber !='' "> or version_number = #{versionNumber} </if>
|
||||||
|
<if test="versionDescription != null and versionDescription !='' "> or version_description = #{versionDescription} </if>
|
||||||
|
<if test="sorts != null "> or sorts = #{sorts}</if>
|
||||||
|
<if test="orgId != null and orgId !='' "> or org_id = #{orgId}</if>
|
||||||
|
<if test="sts != null and sts !='' "> or sts = #{sts}</if>
|
||||||
|
<if test="createUserId != null and createUserId !='' "> or create_user_id = #{createUserId}</if>
|
||||||
|
<if test="createTime != null and createTime !='' "> or create_time = #{createTime}</if>
|
||||||
|
<if test="modifyTime != null and modifyTime !='' "> or modify_time = #{modifyTime}</if>
|
||||||
|
<if test="modifyUserId != null and modifyUserId !='' "> or modify_user_id = #{modifyUserId}</if>
|
||||||
|
</trim>
|
||||||
|
order by sorts asc
|
||||||
|
</select>
|
||||||
|
<!-- 新增 -->
|
||||||
|
<insert id="entity_insert" parameterType="com.hzya.frame.sys.productVersion.entity.SysProductVersion">
|
||||||
|
insert into sys_product_version(
|
||||||
|
<trim suffix="" suffixOverrides=",">
|
||||||
|
<if test="id != null ">ID,</if>
|
||||||
|
<if test="productId != null and productId !='' "> product_id, </if>
|
||||||
|
<if test="versionNumber != null and versionNumber !='' "> version_number, </if>
|
||||||
|
<if test="versionDescription != null and versionDescription !='' "> version_description, </if>
|
||||||
|
<if test="sorts != null ">sorts,</if>
|
||||||
|
<if test="orgId != null ">org_id,</if>
|
||||||
|
<if test="sts != null ">sts,</if>
|
||||||
|
<if test="createUserId != null ">create_user_id,</if>
|
||||||
|
<if test="createTime != null ">create_time,</if>
|
||||||
|
<if test="modifyTime != null ">modify_time,</if>
|
||||||
|
<if test="modifyUserId != null ">modify_user_id,</if>
|
||||||
|
</trim>
|
||||||
|
)values
|
||||||
|
(
|
||||||
|
<trim suffix="" suffixOverrides=",">
|
||||||
|
<if test="id != null ">#{id},</if>
|
||||||
|
<if test="productId != null and productId !='' "> #{productId}, </if>
|
||||||
|
<if test="versionNumber != null and versionNumber !='' "> #{versionNumber}, </if>
|
||||||
|
<if test="versionDescription != null and versionDescription !='' "> #{versionDescription}, </if>
|
||||||
|
<if test="sorts != null ">#{sorts},</if>
|
||||||
|
<if test="orgId != null ">#{orgId},</if>
|
||||||
|
<if test="sts != null ">#{sts},</if>
|
||||||
|
<if test="createUserId != null ">#{createUserId},</if>
|
||||||
|
<if test="createTime != null ">#{createTime},</if>
|
||||||
|
<if test="modifyTime != null ">#{modifyTime},</if>
|
||||||
|
<if test="modifyUserId != null ">#{modifyUserId},</if>
|
||||||
|
</trim>
|
||||||
|
)
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
<!-- 修改 -->
|
||||||
|
<update id="entity_update" parameterType="com.hzya.frame.sys.productVersion.entity.SysProductVersion">
|
||||||
|
update sys_product_version set
|
||||||
|
<trim suffix="" suffixOverrides=",">
|
||||||
|
<if test="id != null ">ID = #{id},</if>
|
||||||
|
<if test="productId != null and productId !='' "> product_id = #{productId},</if>
|
||||||
|
<if test="versionNumber != null and versionNumber !='' "> version_number = #{versionNumber},</if>
|
||||||
|
<if test="versionDescription != null and versionDescription !='' "> version_description = #{versionDescription},</if>
|
||||||
|
<if test="sorts != null ">sorts = #{sorts},</if>
|
||||||
|
<if test="orgId != null ">org_id = #{orgId},</if>
|
||||||
|
<if test="sts != null ">sts = #{sts},</if>
|
||||||
|
<if test="createUserId != null ">create_user_id = #{createUserId},</if>
|
||||||
|
<if test="createTime != null ">create_time = #{createTime},</if>
|
||||||
|
<if test="modifyTime != null ">modify_time = #{modifyTime},</if>
|
||||||
|
<if test="modifyUserId != null ">modify_user_id = #{modifyUserId},</if>
|
||||||
|
</trim>
|
||||||
|
where id = #{id}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- 修改 -->
|
||||||
|
<!-- 逻辑删除多条件 -->
|
||||||
|
<update id="logicDelete_Multi_Condition" parameterType="com.hzya.frame.sys.productVersion.entity.SysProductVersion">
|
||||||
|
update sys_product_version set
|
||||||
|
sts='N',modify_time = #{modifyTime} ,modify_user_id = #{modifyUserId}
|
||||||
|
<trim prefix="where" prefixOverrides="and">
|
||||||
|
<if test="id != null ">and ID = #{id}</if>
|
||||||
|
<if test="productId != null and productId !='' "> and product_id = #{productId}</if>
|
||||||
|
<if test="versionNumber != null and versionNumber !='' "> and version_number = #{versionNumber}</if>
|
||||||
|
<if test="versionDescription != null and versionDescription !='' "> and version_description = #{versionDescription}</if>
|
||||||
|
<if test="sorts != null ">and sorts = #{sorts}</if>
|
||||||
|
<if test="orgId != null ">and org_id = #{orgId}</if>
|
||||||
|
<if test="sts != null ">and sts = #{sts}</if>
|
||||||
|
<if test="createUserId != null ">and create_user_id = #{createUserId}</if>
|
||||||
|
<if test="createTime != null ">and create_time = #{createTime}</if>
|
||||||
|
</trim>
|
||||||
|
</update>
|
||||||
|
<!-- 物理删除 -->
|
||||||
|
<delete id="entity_delete" parameterType="com.hzya.frame.sys.productVersion.entity.SysProductVersion">
|
||||||
|
delete from sys_product_version where id =#{id}
|
||||||
|
</delete>
|
||||||
|
</mapper>
|
223
service/src/main/java/com/hzya/frame/sys/thirdparty/api/test/entity/IPaymentOrderService.xml
vendored
Normal file
223
service/src/main/java/com/hzya/frame/sys/thirdparty/api/test/entity/IPaymentOrderService.xml
vendored
Normal file
|
@ -0,0 +1,223 @@
|
||||||
|
<?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.hzya.frame.sys.thirdparty.api.test.dao.impl.SysThirdpartyapiTestMapperImpl">
|
||||||
|
<resultMap id="get-entity-result" type="com.hzya.frame.sys.thirdparty.api.test.entity.SysThirdpartyapiTest">
|
||||||
|
<!--唯一标识码 -->
|
||||||
|
<result property="id" column="id" />
|
||||||
|
<!--接口id -->
|
||||||
|
<result property="thirdpartyApiId" column="thirdparty_api_id" />
|
||||||
|
<!--应用系统 -->
|
||||||
|
<result property="productName" column="product_name" />
|
||||||
|
<!--用例名称 -->
|
||||||
|
<result property="useCaseName" column="use_case_name" />
|
||||||
|
<!--排序号 -->
|
||||||
|
<result property="sorts" column="sorts" />
|
||||||
|
<!--创建人id -->
|
||||||
|
<result property="orgId" column="org_id" />
|
||||||
|
<!--状态(Y正常N删除) -->
|
||||||
|
<result property="sts" column="sts" />
|
||||||
|
<!--创建时间 -->
|
||||||
|
<result property="createTime" column="create_time" />
|
||||||
|
<!--创建人id -->
|
||||||
|
<result property="createUserId" column="create_user_id" />
|
||||||
|
<!--修改时间 -->
|
||||||
|
<result property="modifyTime" column="modify_time" />
|
||||||
|
<!--修改人id -->
|
||||||
|
<result property="modifyUserId" column="modify_user_id" />
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<sql id="Base_Column_List">
|
||||||
|
id,
|
||||||
|
thirdparty_api_id,
|
||||||
|
product_name,
|
||||||
|
use_case_name,
|
||||||
|
sorts,
|
||||||
|
org_id,
|
||||||
|
sts,
|
||||||
|
create_time,
|
||||||
|
create_user_id,
|
||||||
|
modify_time,
|
||||||
|
modify_user_id
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<!--通过ID获取数据 -->
|
||||||
|
<select id="entity_get" resultMap="get-entity-result">
|
||||||
|
select
|
||||||
|
<include refid="Base_Column_List" />
|
||||||
|
from sys_thirdparty_api_test where id = #{ id } and sts='Y'
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<!-- 查询 采用==查询 -->
|
||||||
|
<select id="entity_list_base" resultMap="get-entity-result" parameterType="com.hzya.frame.sys.thirdparty.api.test.entity.SysThirdpartyapiTest">
|
||||||
|
select
|
||||||
|
<include refid="Base_Column_List" />
|
||||||
|
from sys_thirdparty_api_test
|
||||||
|
<trim prefix="where" prefixOverrides="and">
|
||||||
|
<if test="id != null and id !='' ">id = #{id} </if>
|
||||||
|
<if test="thirdpartyApiId != null and thirdpartyApiId !='' "> and thirdparty_api_id = #{thirdpartyApiId}</if>
|
||||||
|
<if test="productName != null and productName !='' "> and product_name = #{productName}</if>
|
||||||
|
<if test="useCaseName != null and useCaseName !='' "> and use_case_name = #{useCaseName}</if>
|
||||||
|
<if test="sorts != null "> and sorts = #{sorts}</if>
|
||||||
|
<if test="orgId != null and orgId !='' "> and org_id = #{orgId}</if>
|
||||||
|
<if test="sts != null and sts !='' "> and sts = #{sts}</if>
|
||||||
|
<if test="createTime != null "> and create_time = #{createTime}</if>
|
||||||
|
<if test="createUserId != null and createUserId !='' "> and create_user_id = #{createUserId}</if>
|
||||||
|
<if test="modifyTime != null "> and modify_time = #{modifyTime}</if>
|
||||||
|
<if test="modifyUserId != null and modifyUserId !='' "> and modify_user_id = #{modifyUserId}</if>
|
||||||
|
</trim>
|
||||||
|
<if test=" sort == null or sort =='' "> order by sorts asc</if>
|
||||||
|
<if test=" sort !='' and sort!=null and order !='' and order!=null ">order by ${sort} ${order}</if>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<!-- 查询符合条件的数量 -->
|
||||||
|
<select id="entity_count" resultType="Integer" parameterType="com.hzya.frame.sys.thirdparty.api.test.entity.SysThirdpartyapiTest">
|
||||||
|
select count(1) from sys_thirdparty_api_test
|
||||||
|
<trim prefix="where" prefixOverrides="and">
|
||||||
|
<if test="id != null and id !='' ">id = #{id} </if>
|
||||||
|
<if test="thirdpartyApiId != null and thirdpartyApiId !='' "> and thirdparty_api_id = #{thirdpartyApiId}</if>
|
||||||
|
<if test="productName != null and productName !='' "> and product_name = #{productName}</if>
|
||||||
|
<if test="useCaseName != null and useCaseName !='' "> and use_case_name = #{useCaseName}</if>
|
||||||
|
<if test="sorts != null "> and sorts = #{sorts}</if>
|
||||||
|
<if test="orgId != null and orgId !='' "> and org_id = #{orgId}</if>
|
||||||
|
<if test="sts != null and sts !='' "> and sts = #{sts}</if>
|
||||||
|
<if test="createTime != null "> and create_time = #{createTime}</if>
|
||||||
|
<if test="createUserId != null and createUserId !='' "> and create_user_id = #{createUserId}</if>
|
||||||
|
<if test="modifyTime != null "> and modify_time = #{modifyTime}</if>
|
||||||
|
<if test="modifyUserId != null and modifyUserId !='' "> and modify_user_id = #{modifyUserId}</if>
|
||||||
|
</trim>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<!-- 分页查询列表 采用like格式 -->
|
||||||
|
<select id="entity_list_like" resultMap="get-entity-result" parameterType="com.hzya.frame.sys.thirdparty.api.test.entity.SysThirdpartyapiTest">
|
||||||
|
select
|
||||||
|
<include refid="Base_Column_List" />
|
||||||
|
from sys_thirdparty_api_test
|
||||||
|
<trim prefix="where" prefixOverrides="and">
|
||||||
|
<if test="id != null and id !='' "> id like concat('%',#{id},'%') </if>
|
||||||
|
<if test="thirdpartyApiId != null and thirdpartyApiId !='' "> and thirdparty_api_id like concat('%',#{thirdpartyApiId},'%') </if>
|
||||||
|
<if test="productName != null and productName !='' "> and product_name like concat('%',#{productName},'%') </if>
|
||||||
|
<if test="useCaseName != null and useCaseName !='' "> and use_case_name like concat('%',#{useCaseName},'%') </if>
|
||||||
|
<if test="sorts != null "> and sorts = #{sorts}</if>
|
||||||
|
<if test="orgId != null and orgId !='' "> and org_id like concat('%',#{orgId},'%') </if>
|
||||||
|
<if test="sts != null and sts !='' "> and sts like concat('%',#{sts},'%') </if>
|
||||||
|
<if test="createTime != null and createTime !='' "> and create_time like concat('%',#{createTime},'%') </if>
|
||||||
|
<if test="createUserId != null and createUserId !='' "> and create_user_id like concat('%',#{createUserId},'%') </if>
|
||||||
|
<if test="modifyTime != null and modifyTime !='' "> and modify_time like concat('%',#{modifyTime},'%') </if>
|
||||||
|
<if test="modifyUserId != null and modifyUserId !='' "> and modify_user_id like concat('%',#{modifyUserId},'%') </if>
|
||||||
|
</trim>
|
||||||
|
<if test=" sort == null or sort =='' "> order by sorts asc</if>
|
||||||
|
<if test=" sort !='' and sort!=null and order !='' and order!=null ">order by ${sort} ${order}</if>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<!-- 查询列表 字段采用or格式 -->
|
||||||
|
<select id="entity_list_or" resultMap="get-entity-result" parameterType="com.hzya.frame.sys.thirdparty.api.test.entity.SysThirdpartyapiTest">
|
||||||
|
select
|
||||||
|
<include refid="Base_Column_List" />
|
||||||
|
from sys_thirdparty_api_test
|
||||||
|
<trim prefix="where" prefixOverrides="or">
|
||||||
|
<if test="id != null and id !='' ">id = #{id} </if>
|
||||||
|
<if test="thirdpartyApiId != null and thirdpartyApiId !='' "> or thirdparty_api_id = #{thirdpartyApiId} </if>
|
||||||
|
<if test="productName != null and productName !='' "> or product_name = #{productName} </if>
|
||||||
|
<if test="useCaseName != null and useCaseName !='' "> or use_case_name = #{useCaseName} </if>
|
||||||
|
<if test="sorts != null "> or sorts = #{sorts}</if>
|
||||||
|
<if test="orgId != null and orgId !='' "> or org_id = #{orgId} </if>
|
||||||
|
<if test="sts != null and sts !='' "> or sts = #{sts} </if>
|
||||||
|
<if test="createTime != null and createTime !='' "> or create_time = #{createTime} </if>
|
||||||
|
<if test="createUserId != null and createUserId !='' "> or create_user_id = #{createUserId} </if>
|
||||||
|
<if test="modifyTime != null and modifyTime !='' "> or modify_time = #{modifyTime} </if>
|
||||||
|
<if test="modifyUserId != null and modifyUserId !='' "> or modify_user_id = #{modifyUserId} </if>
|
||||||
|
</trim>
|
||||||
|
<if test=" sort == null or sort =='' "> order by sorts asc</if>
|
||||||
|
<if test=" sort !='' and sort!=null and order !='' and order!=null ">order by ${sort} ${order}</if>
|
||||||
|
</select>
|
||||||
|
<!-- 新增 -->
|
||||||
|
<insert id="entity_insert" parameterType="com.hzya.frame.sys.thirdparty.api.test.entity.SysThirdpartyapiTest">
|
||||||
|
insert into sys_thirdparty_api_test(
|
||||||
|
<trim suffix="" suffixOverrides=",">
|
||||||
|
<if test="id != null and id !='' "> id, </if>
|
||||||
|
<if test="thirdpartyApiId != null and thirdpartyApiId !='' "> thirdparty_api_id, </if>
|
||||||
|
<if test="productName != null and productName !='' "> product_name, </if>
|
||||||
|
<if test="useCaseName != null and useCaseName !='' "> use_case_name, </if>
|
||||||
|
<if test="sorts != null ">sorts,</if>
|
||||||
|
<if test="orgId != null and orgId !='' "> org_id, </if>
|
||||||
|
<if test="sts != null and sts !='' "> sts, </if>
|
||||||
|
<if test="createTime != null ">create_time,</if>
|
||||||
|
<if test="createUserId != null and createUserId !='' "> create_user_id, </if>
|
||||||
|
<if test="modifyTime != null ">modify_time,</if>
|
||||||
|
<if test="modifyUserId != null and modifyUserId !='' "> modify_user_id, </if>
|
||||||
|
</trim>
|
||||||
|
)values
|
||||||
|
(
|
||||||
|
<trim suffix="" suffixOverrides=",">
|
||||||
|
<if test="id != null and id !='' "> #{id}, </if>
|
||||||
|
<if test="thirdpartyApiId != null and thirdpartyApiId !='' "> #{thirdpartyApiId}, </if>
|
||||||
|
<if test="productName != null and productName !='' "> #{productName}, </if>
|
||||||
|
<if test="useCaseName != null and useCaseName !='' "> #{useCaseName}, </if>
|
||||||
|
<if test="sorts != null ">#{sorts},</if>
|
||||||
|
<if test="orgId != null and orgId !='' "> #{orgId}, </if>
|
||||||
|
<if test="sts != null and sts !='' "> #{sts}, </if>
|
||||||
|
<if test="createTime != null ">#{createTime},</if>
|
||||||
|
<if test="createUserId != null and createUserId !='' "> #{createUserId}, </if>
|
||||||
|
<if test="modifyTime != null ">#{modifyTime},</if>
|
||||||
|
<if test="modifyUserId != null and modifyUserId !='' "> #{modifyUserId}, </if>
|
||||||
|
</trim>
|
||||||
|
)
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
<!-- 修改 -->
|
||||||
|
<update id="entity_update" parameterType="com.hzya.frame.sys.thirdparty.api.test.entity.SysThirdpartyapiTest">
|
||||||
|
update sys_thirdparty_api_test set
|
||||||
|
<trim suffix="" suffixOverrides=",">
|
||||||
|
<if test="thirdpartyApiId != null and thirdpartyApiId !='' "> thirdparty_api_id = #{thirdpartyApiId},</if>
|
||||||
|
<if test="productName != null and productName !='' "> product_name = #{productName},</if>
|
||||||
|
<if test="useCaseName != null and useCaseName !='' "> use_case_name = #{useCaseName},</if>
|
||||||
|
<if test="sorts != null ">sorts = #{sorts},</if>
|
||||||
|
<if test="orgId != null and orgId !='' "> org_id = #{orgId},</if>
|
||||||
|
<if test="sts != null and sts !='' "> sts = #{sts},</if>
|
||||||
|
<if test="createTime != null ">create_time = #{createTime},</if>
|
||||||
|
<if test="createUserId != null and createUserId !='' "> create_user_id = #{createUserId},</if>
|
||||||
|
<if test="modifyTime != null ">modify_time = #{modifyTime},</if>
|
||||||
|
<if test="modifyUserId != null and modifyUserId !='' "> modify_user_id = #{modifyUserId},</if>
|
||||||
|
</trim>
|
||||||
|
where id = #{id}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<!-- 逻辑删除 -->
|
||||||
|
<update id="entity_logicDelete" parameterType="com.hzya.frame.sys.thirdparty.api.test.entity.SysThirdpartyapiTest">
|
||||||
|
update sys_thirdparty_api_test set
|
||||||
|
sts='N',modify_time = now(),modify_user_id = #{modifyUserId} where
|
||||||
|
id = #{id}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<!-- 逻辑删除多条件 -->
|
||||||
|
<update id="entity_logicDelete_Multi_Condition" parameterType="com.hzya.frame.sys.thirdparty.api.test.entity.SysThirdpartyapiTest">
|
||||||
|
update sys_thirdparty_api_test set
|
||||||
|
sts='N',modify_time = now(),modify_user_id = #{modifyUserId}
|
||||||
|
<trim prefix="where" prefixOverrides="and">
|
||||||
|
<if test="id != null and id !='' ">id = #{id} </if>
|
||||||
|
<if test="thirdpartyApiId != null and thirdpartyApiId !='' "> and thirdparty_api_id = #{thirdpartyApiId}</if>
|
||||||
|
<if test="productName != null and productName !='' "> and product_name = #{productName}</if>
|
||||||
|
<if test="useCaseName != null and useCaseName !='' "> and use_case_name = #{useCaseName}</if>
|
||||||
|
<if test="sorts != null "> and sorts = #{sorts}</if>
|
||||||
|
<if test="orgId != null and orgId !='' "> and org_id = #{orgId}</if>
|
||||||
|
<if test="sts != null and sts !='' "> and sts = #{sts}</if>
|
||||||
|
<if test="createTime != null and createTime !='' "> and create_time = #{createTime}</if>
|
||||||
|
<if test="createUserId != null and createUserId !='' "> and create_user_id = #{createUserId}</if>
|
||||||
|
</trim>
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<!-- 物理删除 -->
|
||||||
|
<delete id="entity_delete" parameterType="com.hzya.frame.sys.thirdparty.api.test.entity.SysThirdpartyapiTest">
|
||||||
|
delete from sys_thirdparty_api_test where id =#{id}
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
<!-- 逻辑删除多条件 -->
|
||||||
|
<update id="delect_by_ThirdpartyApiId" parameterType="java.lang.String">
|
||||||
|
update sys_thirdparty_api_test set
|
||||||
|
sts='N',modify_time = now()
|
||||||
|
WHERE thirdparty_api_id in
|
||||||
|
<foreach item="ids" collection="list" open="(" separator="," close=")">
|
||||||
|
#{ids}
|
||||||
|
</foreach>
|
||||||
|
</update>
|
||||||
|
</mapper>
|
|
@ -0,0 +1,191 @@
|
||||||
|
<?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.hzya.frame.sys.userModule.dao.impl.UserModuleMapperImpl">
|
||||||
|
<resultMap id="get-entity-result" type="com.hzya.frame.sys.userModule.entity.UserModule">
|
||||||
|
<!--主键ID -->
|
||||||
|
<result property="id" column="id" />
|
||||||
|
<!--模块ID -->
|
||||||
|
<result property="moduleId" column="module_id" />
|
||||||
|
<!--用户ID -->
|
||||||
|
<result property="userId" column="user_id" />
|
||||||
|
<!--创建人ID -->
|
||||||
|
<result property="createUserId" column="create_user_id" />
|
||||||
|
<!--创建时间 -->
|
||||||
|
<result property="createTime" column="create_time" />
|
||||||
|
<!--修改人ID -->
|
||||||
|
<result property="modifyUserId" column="modify_user_id" />
|
||||||
|
<!--修改人时间 -->
|
||||||
|
<result property="modifyTime" column="modify_time" />
|
||||||
|
<!--状态(Y正常N删除) -->
|
||||||
|
<result property="sts" column="sts" />
|
||||||
|
<!--组织机构 -->
|
||||||
|
<result property="orgId" column="org_id" />
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<sql id="Base_Column_List">
|
||||||
|
id,
|
||||||
|
module_id,
|
||||||
|
user_id,
|
||||||
|
create_user_id,
|
||||||
|
create_time,
|
||||||
|
modify_user_id,
|
||||||
|
modify_time,
|
||||||
|
sts,
|
||||||
|
org_id
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<!--通过ID获取数据 -->
|
||||||
|
<select id="entity_get" resultMap="get-entity-result">
|
||||||
|
select
|
||||||
|
<include refid="Base_Column_List" />
|
||||||
|
from sys_user_module where id = #{ id } and sts='Y'
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<!-- 查询 采用==查询 -->
|
||||||
|
<select id="entity_list_base" resultMap="get-entity-result" parameterType="com.hzya.frame.sys.userModule.entity.UserModule">
|
||||||
|
select
|
||||||
|
<include refid="Base_Column_List" />
|
||||||
|
from sys_user_module
|
||||||
|
<trim prefix="where" prefixOverrides="and">
|
||||||
|
<if test="id != null and id !='' ">id = #{id} </if>
|
||||||
|
<if test="moduleId != null "> and module_id = #{moduleId}</if>
|
||||||
|
<if test="userId != null "> and user_id = #{userId}</if>
|
||||||
|
<if test="createUserId != null and createUserId !='' "> and create_user_id = #{createUserId}</if>
|
||||||
|
<if test="createTime != null "> and create_time = #{createTime}</if>
|
||||||
|
<if test="modifyUserId != null and modifyUserId !='' "> and modify_user_id = #{modifyUserId}</if>
|
||||||
|
<if test="modifyTime != null "> and modify_time = #{modifyTime}</if>
|
||||||
|
<if test="sts != null and sts !='' "> and sts = #{sts}</if>
|
||||||
|
<if test="orgId != null and orgId !='' "> and org_id = #{orgId}</if>
|
||||||
|
</trim>
|
||||||
|
<if test=" sort == null or sort =='' "> order by sorts asc</if>
|
||||||
|
<if test=" sort !='' and sort!=null and order !='' and order!=null ">order by ${sort} ${order}</if>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<!-- 查询符合条件的数量 -->
|
||||||
|
<select id="entity_count" resultType="Integer" parameterType="com.hzya.frame.sys.userModule.entity.UserModule">
|
||||||
|
select count(1) from sys_user_module
|
||||||
|
<trim prefix="where" prefixOverrides="and">
|
||||||
|
<if test="id != null and id !='' ">id = #{id} </if>
|
||||||
|
<if test="moduleId != null "> and module_id = #{moduleId}</if>
|
||||||
|
<if test="userId != null "> and user_id = #{userId}</if>
|
||||||
|
<if test="createUserId != null and createUserId !='' "> and create_user_id = #{createUserId}</if>
|
||||||
|
<if test="createTime != null "> and create_time = #{createTime}</if>
|
||||||
|
<if test="modifyUserId != null and modifyUserId !='' "> and modify_user_id = #{modifyUserId}</if>
|
||||||
|
<if test="modifyTime != null "> and modify_time = #{modifyTime}</if>
|
||||||
|
<if test="sts != null and sts !='' "> and sts = #{sts}</if>
|
||||||
|
<if test="orgId != null and orgId !='' "> and org_id = #{orgId}</if>
|
||||||
|
</trim>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<!-- 分页查询列表 采用like格式 -->
|
||||||
|
<select id="entity_list_like" resultMap="get-entity-result" parameterType="com.hzya.frame.sys.userModule.entity.UserModule">
|
||||||
|
select
|
||||||
|
<include refid="Base_Column_List" />
|
||||||
|
from sys_user_module
|
||||||
|
<trim prefix="where" prefixOverrides="and">
|
||||||
|
<if test="id != null and id !='' "> id like concat('%',#{id},'%') </if>
|
||||||
|
<if test="moduleId != null "> and module_id = #{moduleId}</if>
|
||||||
|
<if test="userId != null "> and user_id = #{userId}</if>
|
||||||
|
<if test="createUserId != null and createUserId !='' "> and create_user_id like concat('%',#{createUserId},'%') </if>
|
||||||
|
<if test="createTime != null and createTime !='' "> and create_time like concat('%',#{createTime},'%') </if>
|
||||||
|
<if test="modifyUserId != null and modifyUserId !='' "> and modify_user_id like concat('%',#{modifyUserId},'%') </if>
|
||||||
|
<if test="modifyTime != null and modifyTime !='' "> and modify_time like concat('%',#{modifyTime},'%') </if>
|
||||||
|
<if test="sts != null and sts !='' "> and sts like concat('%',#{sts},'%') </if>
|
||||||
|
<if test="orgId != null and orgId !='' "> and org_id like concat('%',#{orgId},'%') </if>
|
||||||
|
</trim>
|
||||||
|
<if test=" sort == null or sort =='' "> order by sorts asc</if>
|
||||||
|
<if test=" sort !='' and sort!=null and order !='' and order!=null ">order by ${sort} ${order}</if>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<!-- 查询列表 字段采用or格式 -->
|
||||||
|
<select id="entity_list_or" resultMap="get-entity-result" parameterType="com.hzya.frame.sys.userModule.entity.UserModule">
|
||||||
|
select
|
||||||
|
<include refid="Base_Column_List" />
|
||||||
|
from sys_user_module
|
||||||
|
<trim prefix="where" prefixOverrides="or">
|
||||||
|
<if test="id != null and id !='' ">id = #{id} </if>
|
||||||
|
<if test="moduleId != null "> or module_id = #{moduleId}</if>
|
||||||
|
<if test="userId != null "> or user_id = #{userId}</if>
|
||||||
|
<if test="createUserId != null and createUserId !='' "> or create_user_id = #{createUserId} </if>
|
||||||
|
<if test="createTime != null and createTime !='' "> or create_time = #{createTime} </if>
|
||||||
|
<if test="modifyUserId != null and modifyUserId !='' "> or modify_user_id = #{modifyUserId} </if>
|
||||||
|
<if test="modifyTime != null and modifyTime !='' "> or modify_time = #{modifyTime} </if>
|
||||||
|
<if test="sts != null and sts !='' "> or sts = #{sts} </if>
|
||||||
|
<if test="orgId != null and orgId !='' "> or org_id = #{orgId} </if>
|
||||||
|
</trim>
|
||||||
|
<if test=" sort == null or sort =='' "> order by sorts asc</if>
|
||||||
|
<if test=" sort !='' and sort!=null and order !='' and order!=null ">order by ${sort} ${order}</if>
|
||||||
|
</select>
|
||||||
|
<!-- 新增 -->
|
||||||
|
<insert id="entity_insert" parameterType="com.hzya.frame.sys.userModule.entity.UserModule">
|
||||||
|
insert into sys_user_module(
|
||||||
|
<trim suffix="" suffixOverrides=",">
|
||||||
|
<if test="id != null and id !='' "> id, </if>
|
||||||
|
<if test="moduleId != null ">module_id,</if>
|
||||||
|
<if test="userId != null ">user_id,</if>
|
||||||
|
<if test="createUserId != null and createUserId !='' "> create_user_id, </if>
|
||||||
|
<if test="createTime != null ">create_time,</if>
|
||||||
|
<if test="modifyUserId != null and modifyUserId !='' "> modify_user_id, </if>
|
||||||
|
<if test="modifyTime != null ">modify_time,</if>
|
||||||
|
<if test="sts != null and sts !='' "> sts, </if>
|
||||||
|
<if test="orgId != null and orgId !='' "> org_id, </if>
|
||||||
|
</trim>
|
||||||
|
)values
|
||||||
|
(
|
||||||
|
<trim suffix="" suffixOverrides=",">
|
||||||
|
<if test="id != null and id !='' "> #{id}, </if>
|
||||||
|
<if test="moduleId != null ">#{moduleId},</if>
|
||||||
|
<if test="userId != null ">#{userId},</if>
|
||||||
|
<if test="createUserId != null and createUserId !='' "> #{createUserId}, </if>
|
||||||
|
<if test="createTime != null ">#{createTime},</if>
|
||||||
|
<if test="modifyUserId != null and modifyUserId !='' "> #{modifyUserId}, </if>
|
||||||
|
<if test="modifyTime != null ">#{modifyTime},</if>
|
||||||
|
<if test="sts != null and sts !='' "> #{sts}, </if>
|
||||||
|
<if test="orgId != null and orgId !='' "> #{orgId}, </if>
|
||||||
|
</trim>
|
||||||
|
)
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
<!-- 修改 -->
|
||||||
|
<update id="entity_update" parameterType="com.hzya.frame.sys.userModule.entity.UserModule">
|
||||||
|
update sys_user_module set
|
||||||
|
<trim suffix="" suffixOverrides=",">
|
||||||
|
<if test="moduleId != null ">module_id = #{moduleId},</if>
|
||||||
|
<if test="userId != null ">user_id = #{userId},</if>
|
||||||
|
<if test="createUserId != null and createUserId !='' "> create_user_id = #{createUserId},</if>
|
||||||
|
<if test="createTime != null ">create_time = #{createTime},</if>
|
||||||
|
<if test="modifyUserId != null and modifyUserId !='' "> modify_user_id = #{modifyUserId},</if>
|
||||||
|
<if test="modifyTime != null ">modify_time = #{modifyTime},</if>
|
||||||
|
<if test="sts != null and sts !='' "> sts = #{sts},</if>
|
||||||
|
<if test="orgId != null and orgId !='' "> org_id = #{orgId},</if>
|
||||||
|
</trim>
|
||||||
|
where id = #{id}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<!-- 逻辑删除 -->
|
||||||
|
<update id="entity_logicDelete" parameterType="com.hzya.frame.sys.userModule.entity.UserModule">
|
||||||
|
update sys_user_module set
|
||||||
|
sts='N',modify_time = now(),modify_user_id = #{modifyUserId} where
|
||||||
|
id = #{id}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<!-- 逻辑删除多条件 -->
|
||||||
|
<update id="entity_logicDelete_Multi_Condition" parameterType="com.hzya.frame.sys.userModule.entity.UserModule">
|
||||||
|
update sys_user_module set
|
||||||
|
sts='N',modify_time = now(),modify_user_id = #{modifyUserId}
|
||||||
|
<trim prefix="where" prefixOverrides="and">
|
||||||
|
<if test="id != null and id !='' ">id = #{id} </if>
|
||||||
|
<if test="moduleId != null "> and module_id = #{moduleId}</if>
|
||||||
|
<if test="userId != null "> and user_id = #{userId}</if>
|
||||||
|
<if test="createUserId != null and createUserId !='' "> and create_user_id = #{createUserId}</if>
|
||||||
|
<if test="createTime != null and createTime !='' "> and create_time = #{createTime}</if>
|
||||||
|
<if test="sts != null and sts !='' "> and sts = #{sts}</if>
|
||||||
|
<if test="orgId != null and orgId !='' "> and org_id = #{orgId}</if>
|
||||||
|
</trim>
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<!-- 物理删除 -->
|
||||||
|
<delete id="entity_delete" parameterType="com.hzya.frame.sys.userModule.entity.UserModule">
|
||||||
|
delete from sys_user_module where id =#{id}
|
||||||
|
</delete>
|
||||||
|
</mapper>
|
|
@ -0,0 +1,185 @@
|
||||||
|
<?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.hzya.frame.sys.userRole.dao.impl.UserRoleMapperImpl">
|
||||||
|
<resultMap id="get-entity-result" type="com.hzya.frame.sys.userRole.entity.UserRole">
|
||||||
|
<!--唯一标识码 -->
|
||||||
|
<result property="id" column="id" />
|
||||||
|
<!--人员id -->
|
||||||
|
<result property="userId" column="user_id" />
|
||||||
|
<!--角色ID -->
|
||||||
|
<result property="roleId" column="role_id" />
|
||||||
|
<!--创建人id -->
|
||||||
|
<result property="createUserId" column="create_user_id" />
|
||||||
|
<!--创建时间 -->
|
||||||
|
<result property="createTime" column="create_time" />
|
||||||
|
<!--修改人id -->
|
||||||
|
<result property="modifyUserId" column="modify_user_id" />
|
||||||
|
<!--修改时间 -->
|
||||||
|
<result property="modifyTime" column="modify_time" />
|
||||||
|
<!--状态(Y正常N删除) -->
|
||||||
|
<result property="sts" column="sts" />
|
||||||
|
<!--组织机构ID -->
|
||||||
|
<result property="orgId" column="org_id" />
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<sql id="Base_Column_List">
|
||||||
|
id,
|
||||||
|
user_id,
|
||||||
|
role_id,
|
||||||
|
create_user_id,
|
||||||
|
create_time,
|
||||||
|
modify_user_id,
|
||||||
|
modify_time,
|
||||||
|
sts,
|
||||||
|
org_id
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<!--通过ID获取数据 -->
|
||||||
|
<select id="entity_get" resultMap="get-entity-result">
|
||||||
|
select
|
||||||
|
<include refid="Base_Column_List" />
|
||||||
|
from sys_user_role where id = #{ id } and sts='Y'
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<!-- 查询 采用==查询 -->
|
||||||
|
<select id="entity_list_base" resultMap="get-entity-result" parameterType="com.hzya.frame.sys.userRole.entity.UserRole">
|
||||||
|
select
|
||||||
|
<include refid="Base_Column_List" />
|
||||||
|
from sys_user_role
|
||||||
|
<trim prefix="where" prefixOverrides="and">
|
||||||
|
<if test="id != null and id !='' ">id = #{id} </if>
|
||||||
|
<if test="userId != null and userId !='' "> and user_id = #{userId}</if>
|
||||||
|
<if test="roleId != null and roleId !='' "> and role_id = #{roleId}</if>
|
||||||
|
<if test="createUserId != null and createUserId !='' "> and create_user_id = #{createUserId}</if>
|
||||||
|
<if test="createTime != null "> and create_time = #{createTime}</if>
|
||||||
|
<if test="modifyUserId != null and modifyUserId !='' "> and modify_user_id = #{modifyUserId}</if>
|
||||||
|
<if test="modifyTime != null "> and modify_time = #{modifyTime}</if>
|
||||||
|
<if test="sts != null and sts !='' "> and sts = #{sts}</if>
|
||||||
|
<if test="orgId != null and orgId !='' "> and org_id = #{orgId}</if>
|
||||||
|
</trim>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<!-- 查询符合条件的数量 -->
|
||||||
|
<select id="entity_count" resultType="Integer" parameterType="com.hzya.frame.sys.userRole.entity.UserRole">
|
||||||
|
select count(1) from sys_user_role
|
||||||
|
<trim prefix="where" prefixOverrides="and">
|
||||||
|
<if test="id != null and id !='' ">id = #{id} </if>
|
||||||
|
<if test="userId != null and userId !='' "> and user_id = #{userId}</if>
|
||||||
|
<if test="roleId != null and roleId !='' "> and role_id = #{roleId}</if>
|
||||||
|
<if test="createUserId != null and createUserId !='' "> and create_user_id = #{createUserId}</if>
|
||||||
|
<if test="createTime != null "> and create_time = #{createTime}</if>
|
||||||
|
<if test="modifyUserId != null and modifyUserId !='' "> and modify_user_id = #{modifyUserId}</if>
|
||||||
|
<if test="modifyTime != null "> and modify_time = #{modifyTime}</if>
|
||||||
|
<if test="sts != null and sts !='' "> and sts = #{sts}</if>
|
||||||
|
<if test="orgId != null and orgId !='' "> and org_id = #{orgId}</if>
|
||||||
|
</trim>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<!-- 分页查询列表 采用like格式 -->
|
||||||
|
<select id="entity_list_like" resultMap="get-entity-result" parameterType="com.hzya.frame.sys.userRole.entity.UserRole">
|
||||||
|
select
|
||||||
|
<include refid="Base_Column_List" />
|
||||||
|
from sys_user_role
|
||||||
|
<trim prefix="where" prefixOverrides="and">
|
||||||
|
<if test="id != null and id !='' "> id like concat('%',#{id},'%') </if>
|
||||||
|
<if test="userId != null and userId !='' "> and user_id like concat('%',#{userId},'%') </if>
|
||||||
|
<if test="roleId != null and roleId !='' "> and role_id like concat('%',#{roleId},'%') </if>
|
||||||
|
<if test="createUserId != null and createUserId !='' "> and create_user_id like concat('%',#{createUserId},'%') </if>
|
||||||
|
<if test="createTime != null and createTime !='' "> and create_time like concat('%',#{createTime},'%') </if>
|
||||||
|
<if test="modifyUserId != null and modifyUserId !='' "> and modify_user_id like concat('%',#{modifyUserId},'%') </if>
|
||||||
|
<if test="modifyTime != null and modifyTime !='' "> and modify_time like concat('%',#{modifyTime},'%') </if>
|
||||||
|
<if test="sts != null and sts !='' "> and sts like concat('%',#{sts},'%') </if>
|
||||||
|
<if test="orgId != null and orgId !='' "> and org_id like concat('%',#{orgId},'%') </if>
|
||||||
|
</trim>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<!-- 查询列表 字段采用or格式 -->
|
||||||
|
<select id="entity_list_or" resultMap="get-entity-result" parameterType="com.hzya.frame.sys.userRole.entity.UserRole">
|
||||||
|
select
|
||||||
|
<include refid="Base_Column_List" />
|
||||||
|
from sys_user_role
|
||||||
|
<trim prefix="where" prefixOverrides="or">
|
||||||
|
<if test="id != null and id !='' ">id = #{id} </if>
|
||||||
|
<if test="userId != null and userId !='' "> or user_id = #{userId} </if>
|
||||||
|
<if test="roleId != null and roleId !='' "> or role_id = #{roleId} </if>
|
||||||
|
<if test="createUserId != null and createUserId !='' "> or create_user_id = #{createUserId} </if>
|
||||||
|
<if test="createTime != null and createTime !='' "> or create_time = #{createTime} </if>
|
||||||
|
<if test="modifyUserId != null and modifyUserId !='' "> or modify_user_id = #{modifyUserId} </if>
|
||||||
|
<if test="modifyTime != null and modifyTime !='' "> or modify_time = #{modifyTime} </if>
|
||||||
|
<if test="sts != null and sts !='' "> or sts = #{sts} </if>
|
||||||
|
<if test="orgId != null and orgId !='' "> or org_id = #{orgId} </if>
|
||||||
|
</trim>
|
||||||
|
</select>
|
||||||
|
<!-- 新增 -->
|
||||||
|
<insert id="entity_insert" parameterType="com.hzya.frame.sys.userRole.entity.UserRole">
|
||||||
|
insert into sys_user_role(
|
||||||
|
<trim suffix="" suffixOverrides=",">
|
||||||
|
<if test="id != null and id !='' "> id, </if>
|
||||||
|
<if test="userId != null and userId !='' "> user_id, </if>
|
||||||
|
<if test="roleId != null and roleId !='' "> role_id, </if>
|
||||||
|
<if test="createUserId != null and createUserId !='' "> create_user_id, </if>
|
||||||
|
<if test="createTime != null ">create_time,</if>
|
||||||
|
<if test="modifyUserId != null and modifyUserId !='' "> modify_user_id, </if>
|
||||||
|
<if test="modifyTime != null ">modify_time,</if>
|
||||||
|
<if test="sts != null and sts !='' "> sts, </if>
|
||||||
|
<if test="orgId != null and orgId !='' "> org_id, </if>
|
||||||
|
</trim>
|
||||||
|
)values
|
||||||
|
(
|
||||||
|
<trim suffix="" suffixOverrides=",">
|
||||||
|
<if test="id != null and id !='' "> #{id}, </if>
|
||||||
|
<if test="userId != null and userId !='' "> #{userId}, </if>
|
||||||
|
<if test="roleId != null and roleId !='' "> #{roleId}, </if>
|
||||||
|
<if test="createUserId != null and createUserId !='' "> #{createUserId}, </if>
|
||||||
|
<if test="createTime != null ">#{createTime},</if>
|
||||||
|
<if test="modifyUserId != null and modifyUserId !='' "> #{modifyUserId}, </if>
|
||||||
|
<if test="modifyTime != null ">#{modifyTime},</if>
|
||||||
|
<if test="sts != null and sts !='' "> #{sts}, </if>
|
||||||
|
<if test="orgId != null and orgId !='' "> #{orgId}, </if>
|
||||||
|
</trim>
|
||||||
|
)
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
<!-- 修改 -->
|
||||||
|
<update id="entity_update" parameterType="com.hzya.frame.sys.userRole.entity.UserRole">
|
||||||
|
update sys_user_role set
|
||||||
|
<trim suffix="" suffixOverrides=",">
|
||||||
|
<if test="userId != null and userId !='' "> user_id = #{userId},</if>
|
||||||
|
<if test="roleId != null and roleId !='' "> role_id = #{roleId},</if>
|
||||||
|
<if test="createUserId != null and createUserId !='' "> create_user_id = #{createUserId},</if>
|
||||||
|
<if test="createTime != null ">create_time = #{createTime},</if>
|
||||||
|
<if test="modifyUserId != null and modifyUserId !='' "> modify_user_id = #{modifyUserId},</if>
|
||||||
|
<if test="modifyTime != null ">modify_time = #{modifyTime},</if>
|
||||||
|
<if test="sts != null and sts !='' "> sts = #{sts},</if>
|
||||||
|
<if test="orgId != null and orgId !='' "> org_id = #{orgId},</if>
|
||||||
|
</trim>
|
||||||
|
where id = #{id}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<!-- 逻辑删除 -->
|
||||||
|
<update id="entity_logicDelete" parameterType="com.hzya.frame.sys.userRole.entity.UserRole">
|
||||||
|
update sys_user_role set
|
||||||
|
sts='N',modify_time = now(),modify_user_id = #{modifyUserId} where
|
||||||
|
id = #{id}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<!-- 逻辑删除多条件 -->
|
||||||
|
<update id="entity_logicDelete_Multi_Condition" parameterType="com.hzya.frame.sys.userRole.entity.UserRole">
|
||||||
|
update sys_user_role set
|
||||||
|
sts='N',modify_time = now(),modify_user_id = #{modifyUserId}
|
||||||
|
<trim prefix="where" prefixOverrides="and">
|
||||||
|
<if test="id != null and id !='' ">id = #{id} </if>
|
||||||
|
<if test="userId != null and userId !='' "> and user_id = #{userId}</if>
|
||||||
|
<if test="roleId != null and roleId !='' "> and role_id = #{roleId}</if>
|
||||||
|
<if test="createUserId != null and createUserId !='' "> and create_user_id = #{createUserId}</if>
|
||||||
|
<if test="createTime != null and createTime !='' "> and create_time = #{createTime}</if>
|
||||||
|
<if test="sts != null and sts !='' "> and sts = #{sts}</if>
|
||||||
|
<if test="orgId != null and orgId !='' "> and org_id = #{orgId}</if>
|
||||||
|
</trim>
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<!-- 物理删除 -->
|
||||||
|
<delete id="entity_delete" parameterType="com.hzya.frame.sys.userRole.entity.UserRole">
|
||||||
|
delete from sys_user_role where id =#{id}
|
||||||
|
</delete>
|
||||||
|
</mapper>
|
Loading…
Reference in New Issue