| | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import javax.servlet.http.HttpSession; |
| | | import java.util.ArrayList; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * @BelongsProject: eCoWorksV3 |
| | |
| | | public AllBackMsg updateBlackList(@RequestBody T482106Entity BlackList, HttpServletRequest request, HttpServletResponse response) { |
| | | AllBackMsg msg = new AllBackMsg(); |
| | | try { |
| | | if(BlackList.getBlackId()==0){ |
| | | if (BlackList.getBlackId() == null || BlackList.getBlackId().equals(0)) { |
| | | msg.setFail("获取不到黑名单ID,请检查"); |
| | | return msg; |
| | | } |
| | |
| | | public AllBackMsg deleteBlackList(@RequestParam(defaultValue = "0") Integer blackId, HttpServletRequest request, HttpServletResponse response) { |
| | | AllBackMsg msg = new AllBackMsg(); |
| | | try { |
| | | if (blackId == 0) { |
| | | if (blackId.equals(0)) { |
| | | msg.setFail("黑名单ID获取不到"); |
| | | return msg; |
| | | } |
| | |
| | | * @return |
| | | */ |
| | | @GetMapping("/getBlackList.do") |
| | | public AllBackMsg getSignature(String search, HttpServletRequest request, HttpServletResponse response) { |
| | | public AllBackMsg getSignature(String search, @RequestParam(defaultValue = "-1") Integer type, HttpServletRequest request, HttpServletResponse response) { |
| | | AllBackMsg msg = new AllBackMsg(); |
| | | try { |
| | | HttpSession session = request.getSession(); |
| | |
| | | } |
| | | DataSourceEntity dataSource = MultiDataSource.getDataSourceMap(request);//获取数据源 |
| | | SpObserver.setDBtoInstance("_" + dataSource.getDbId()); |
| | | List<T482106Entity> list = mailBlackListIfc.getBlackList(userCode,search); |
| | | msg.setSuccess("执行成功", list); |
| | | List<T482106Entity> list = mailBlackListIfc.getBlackList(userCode, search, type); |
| | | Map<String, Object> map = new HashMap<>(); |
| | | if (list.size() > 0) { |
| | | List<T482106Entity> mail = new ArrayList<>(); |
| | | List<T482106Entity> domain = new ArrayList<>(); |
| | | for (T482106Entity t482106 : list) { |
| | | if (t482106.isBlackType()) {//true表示域名 |
| | | domain.add(t482106); |
| | | } else {//邮箱地址 |
| | | mail.add(t482106); |
| | | } |
| | | } |
| | | map.put("code", 0); |
| | | map.put("mail", mail); |
| | | map.put("domain", domain); |
| | | } else { |
| | | map.put("code", 0); |
| | | map.put("msg", "数据获取为空"); |
| | | } |
| | | msg.setSuccess("执行成功", map); |
| | | } catch (Exception e) { |
| | | msg.setFail(e.getCause() != null ? e.getCause().getMessage() : e.getMessage()); |
| | | } finally { |
| | |
| | | |
| | | |
| | | /** |
| | | * 左边结构层 |
| | | * 左边结构上层 |
| | | * |
| | | * @return |
| | | */ |
| | |
| | | } |
| | | return msg; |
| | | } |
| | | /** |
| | | * 左边结构下层 |
| | | * |
| | | * @return |
| | | */ |
| | | @GetMapping("/getEmailModuleBelow.do") |
| | | public AllBackMsg getEmailModuleBelow(HttpServletRequest request, HttpServletResponse response) throws Exception { |
| | | AllBackMsg msg = new AllBackMsg(); |
| | | try { |
| | | HttpSession session = request.getSession(); |
| | | String userCode = (String) session.getAttribute(SessionKey.USERCODE);//当前登录用户 |
| | | if (StringUtils.isBlank(userCode)) {//获取不到当前用户直接结束 |
| | | msg.setFail("获取不到用户信息"); |
| | | return msg; |
| | | } |
| | | DataSourceEntity dataSourceEntity = MultiDataSource.getDataSourceMap(request);//获取数据源信息 |
| | | SpObserver.setDBtoInstance("_" + dataSourceEntity.getDbId());//切换数据源 |
| | | List<MailModuleBelowEntity> list =emailIfc.getMailModuleBelowList(userCode); |
| | | msg.setSuccess("执行成功", list); |
| | | } catch (Exception e) { |
| | | msg.setFail(e.getCause() != null ? e.getCause().getMessage() : e.getMessage()); |
| | | } finally { |
| | | SpObserver.setDBtoInstance(); |
| | | } |
| | | return msg; |
| | | } |
| | | |
| | | /** |
| | | * 获取邮件列表(包括草稿箱,收件箱) |
| | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import javax.servlet.http.HttpSession; |
| | | import java.util.ArrayList; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | |
| | | @RestController |
| | | @RequestMapping("/crm/mail/folder") |
| | | public class MailFolder { |
| | | |
| | | /** |
| | | * 要获取rowId直接调用接口 http://yingchen.onbus.cn:9010/getRowid.do |
| | | */ |
| | | @Autowired |
| | | MailFolderIfc mailFolderIfc; |
| | | |
| | |
| | | folder.setUserName(userName); |
| | | DataSourceEntity dataSource = MultiDataSource.getDataSourceMap(request);//获取数据源 |
| | | SpObserver.setDBtoInstance("_" + dataSource.getDbId()); |
| | | mailFolderIfc.saveFolder(folder); |
| | | msg.setOk("已保存"); |
| | | String rowId = mailFolderIfc.saveFolder(folder); |
| | | Map<String, Object> map = new HashMap<>(); |
| | | if (StringUtils.isNotBlank(rowId)) { |
| | | map.put("cod", 0); |
| | | map.put("rowId", rowId); |
| | | msg.setSuccess("已保存", map); |
| | | } else { |
| | | map.put("cod", -1); |
| | | map.put("msg", "保存后返回rowId出错"); |
| | | msg.setSuccess("已保存", map); |
| | | } |
| | | } catch (Exception e) { |
| | | msg.setFail(e.getCause() != null ? e.getCause().getMessage() : e.getMessage()); |
| | | } finally { |
| | |
| | | public AllBackMsg updateFolder(@RequestBody T482107Entity folder, HttpServletRequest request, HttpServletResponse response) { |
| | | AllBackMsg msg = new AllBackMsg(); |
| | | try { |
| | | if (folder.getFolderId().equals(0)) { |
| | | if (folder.getFolderId() == null || folder.getFolderId().equals(0)) { |
| | | msg.setFail("缺少文本夹ID值,请检查"); |
| | | return msg; |
| | | } |
| | |
| | | SpObserver.setDBtoInstance("_" + dataSource.getDbId()); |
| | | List<T482107Entity> t482107Entities = mailFolderIfc.getMailFolder(userCode, search); |
| | | if (t482107Entities.size() > 0) { |
| | | //返回树结构 |
| | | msg.setSuccess("执行成功", getFolderList(t482107Entities, "")); |
| | | } |
| | | } catch (Exception e) { |
| | |
| | | folderEntity.setRowId(y.getRowId()); |
| | | folderEntity.setParentRowId(y.getParentRowId()); |
| | | folderEntity.setTreeControl(y.getTreeControl()); |
| | | folderEntity.setList(getFolderList(fo, y.getRowId())); |
| | | folderEntity.setList(getFolderList(t482107, y.getRowId())); |
| | | folder.add(folderEntity); |
| | | } |
| | | } |
| | |
| | | public AllBackMsg updateQuickText(@RequestBody T482108Entity quickText, HttpServletRequest request, HttpServletResponse response) { |
| | | AllBackMsg msg = new AllBackMsg(); |
| | | try { |
| | | if (quickText.getTextId() == 0) { |
| | | if (quickText.getTextId() == null || quickText.getTextId().equals(0)) { |
| | | msg.setFail("缺少快速文本ID值,请检查"); |
| | | return msg; |
| | | } |
| | |
| | | public AllBackMsg deleteQuickText(@RequestParam(defaultValue = "0") Integer textId, HttpServletRequest request, HttpServletResponse response) { |
| | | AllBackMsg msg = new AllBackMsg(); |
| | | try { |
| | | if (textId == 0) { |
| | | if (textId.equals(0)) { |
| | | msg.setFail("快速文本编号ID获取不到"); |
| | | return msg; |
| | | } |
| | |
| | | public AllBackMsg updateSignature(@RequestBody T482109Entity signature, HttpServletRequest request, HttpServletResponse response) { |
| | | AllBackMsg msg = new AllBackMsg(); |
| | | try { |
| | | if (signature.getSignId() == null) { |
| | | if (signature.getSignId() == null || signature.getSignId().equals(0)) { |
| | | msg.setFail("缺少SignId值,请检查"); |
| | | return msg; |
| | | } |
| | |
| | | public AllBackMsg deleteSignature(@RequestParam(defaultValue = "0") Integer signId, HttpServletRequest request, HttpServletResponse response) { |
| | | AllBackMsg msg = new AllBackMsg(); |
| | | try { |
| | | if (signId == 0) { |
| | | if (signId.equals(0)) { |
| | | msg.setFail("签名ID获取不到"); |
| | | return msg; |
| | | } |
| | |
| | | package com.yc.crm.mail.action; |
| | | |
| | | //import com.yc.crm.mail.entity.T482115Entity; |
| | | |
| | | import com.yc.crm.base.entity.T482115Entity; |
| | | import com.yc.crm.mail.service.MailTagIfc; |
| | | import com.yc.crm.mail.util.AllBackMsg; |
| | |
| | | public AllBackMsg updateTag(@RequestBody T482115Entity tag, HttpServletRequest request, HttpServletResponse response) { |
| | | AllBackMsg msg = new AllBackMsg(); |
| | | try { |
| | | if (tag.getTagId() == null) { |
| | | if (tag.getTagId() == null || tag.getTagId().equals(0)) { |
| | | msg.setFail("缺少tagId值,请检查"); |
| | | return msg; |
| | | } |
| | |
| | | public AllBackMsg deleteTag(@RequestParam(defaultValue = "0") Integer tagId, HttpServletRequest request, HttpServletResponse response) { |
| | | AllBackMsg msg = new AllBackMsg(); |
| | | try { |
| | | if (tagId == 0) { |
| | | if (tagId.equals(0)) { |
| | | msg.setFail("标签ID获取不到"); |
| | | return msg; |
| | | } |
| | |
| | | |
| | | /** |
| | | * 标签查询 |
| | | * |
| | | * @param search 搜索 |
| | | * @param request |
| | | * @param response |
| | | * @return |
| | | */ |
| | | @GetMapping("/getTagList.do") |
| | | public AllBackMsg getTagList(String search, HttpServletRequest request, HttpServletResponse response) { |
| | | public AllBackMsg getTagList(String search,@RequestParam(defaultValue = "-1") Integer type, HttpServletRequest request, HttpServletResponse response) { |
| | | AllBackMsg msg = new AllBackMsg(); |
| | | try { |
| | | HttpSession session = request.getSession(); |
| | |
| | | } |
| | | DataSourceEntity dataSource = MultiDataSource.getDataSourceMap(request);//获取数据源 |
| | | SpObserver.setDBtoInstance("_" + dataSource.getDbId()); |
| | | List<T482115Entity> list = mailTagIfc.getTagList(userCode, search); |
| | | List<T482115Entity> list = mailTagIfc.getTagList(userCode, search,type); |
| | | msg.setSuccess("执行成功", list); |
| | | } catch (Exception e) { |
| | | msg.setFail(e.getCause() != null ? e.getCause().getMessage() : e.getMessage()); |
New file |
| | |
| | | package com.yc.crm.mail.entity; |
| | | |
| | | import lombok.Data; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @BelongsProject: eCoWorksV3 |
| | | * @BelongsPackage: com.yc.crm.mail.entity |
| | | * @author: xinyb |
| | | * @CreateTime: 2024-09-23 11:32 |
| | | * @Description: |
| | | */ |
| | | @Data |
| | | public class MailModuleBelowEntity { |
| | | private String key;//key |
| | | private String name;//名称 |
| | | private Integer number = 0;//数量 |
| | | private Object list;//下节点 |
| | | |
| | | public static List<MailModuleBelowEntity> setMailInitial() { |
| | | List<MailModuleBelowEntity> list1 = new ArrayList<>(); |
| | | MailModuleBelowEntity a = new MailModuleBelowEntity(); |
| | | a.setKey("moduleBelowA"); |
| | | a.setName("文件夹"); |
| | | list1.add(a); |
| | | MailModuleBelowEntity b = new MailModuleBelowEntity(); |
| | | b.setKey("moduleBelowB"); |
| | | b.setName("标签邮件"); |
| | | list1.add(b); |
| | | MailModuleBelowEntity c = new MailModuleBelowEntity(); |
| | | c.setKey("moduleBelowC"); |
| | | c.setName("显示更多"); |
| | | list1.add(c); |
| | | return list1; |
| | | } |
| | | } |
| | |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * @BelongsProject: eCoWorksV3 |
| | |
| | | private Integer mailType;// [note: '0:草稿箱1:收件箱2:发件箱'] |
| | | private String senderName;//发件人名称 |
| | | private String sender;// [note:'发送人'] |
| | | private String senderTime;//发送时间 |
| | | private List<String> receiver = new ArrayList<>();//收件人集合 |
| | | private String receivingTime;//收件时间 |
| | | private Integer folderId = 0;// [note:'文件夹id'] |
| | | private Integer deleteFlag = 0; //[note:'是否已删除'] |
| | | private Integer readFlag = 0;// [note:'是否已读'] |
| | |
| | | private String updateTime; |
| | | private String receiveTime;// [note:'回复时间'] |
| | | private String plainText; |
| | | private String attachmentList;//附件编码 |
| | | private Map attachmentPath;//附件详情 |
| | | private String eMail; |
| | | private Integer handle;//是否待处理 1是 0不是 |
| | | private String handleTime;//待处理时间 |
| | |
| | | * @param name |
| | | * @return |
| | | */ |
| | | List<T482106Entity> getBlackList(String userCode,String search); |
| | | List<T482106Entity> getBlackList(String userCode,String search,Integer type); |
| | | } |
| | |
| | | } |
| | | |
| | | @Override |
| | | public List<T482106Entity> getBlackList(String userCode,String search) { |
| | | public List<T482106Entity> getBlackList(String userCode, String search, Integer type) { |
| | | String sql = "set nocount on \n"; |
| | | try { |
| | | sql += "select companyId,companyName,black_id,black_content,userCode,userName,create_time,update_time,black_type,DocVersion " + |
| | | "from t482106 where userCode="+GridUtils.prossSqlParm(userCode); |
| | | if (!type.equals(-1)) { |
| | | sql += " and black_type=" + type; |
| | | } |
| | | if (StringUtils.isNotBlank(search)) { |
| | | sql += " and black_content like '%" + search+"%'"; |
| | | } |
| | |
| | | * 保存邮件文件夹 |
| | | * @param quickText |
| | | */ |
| | | void saveFolder(T482107Entity folder); |
| | | String saveFolder(T482107Entity folder); |
| | | |
| | | /** |
| | | * 修改邮件文件夹 |
| | |
| | | public class MailFolderImpl extends BaseService implements MailFolderIfc { |
| | | @Transactional(rollbackFor = Exception.class) |
| | | @Override |
| | | public void saveFolder(T482107Entity folder) { |
| | | public String saveFolder(T482107Entity folder) { |
| | | String sql = "set nocount on\n"; |
| | | try { |
| | | sql += "declare @rowId varchar(40),@parentRowId varchar(40) =" + GridUtils.prossSqlParm(folder.getParentRowId()) + "\n"; |
| | | sql += "exec getXXXX @rowId output \n";//获取一个rowId |
| | | sql += "insert into t482107(companyId,companyName,folder_name,userCode,userName,sort_id,create_time,update_time,rowId,treeControl,parentRowId) " + |
| | | "values (" + GridUtils.prossSqlParm(folder.getCompanyId()) + "," + GridUtils.prossSqlParm(folder.getCompanyName()) + "," + |
| | | GridUtils.prossSqlParm(folder.getFolderName()) + "," + GridUtils.prossSqlParm(folder.getUserCode()) + "," + |
| | | GridUtils.prossSqlParm(folder.getUserName()) + "," + folder.getSortId() + ",getdate(),getdate()," + |
| | | GridUtils.prossSqlParm(folder.getRowId()) + "," + GridUtils.prossSqlParm(folder.getTreeControl()) + "," + GridUtils.prossSqlParm(folder.getParentRowId()) + ")"; |
| | | jdbcTemplate.update(sql); |
| | | GridUtils.prossSqlParm(folder.getUserName()) + "," + folder.getSortId() + ",getdate(),getdate(),@rowId," + |
| | | GridUtils.prossSqlParm(folder.getTreeControl()) + ",@parentRowId)"; |
| | | sql += "select @rowId as rowId"; |
| | | return jdbcTemplate.queryForObject(sql, String.class); |
| | | } catch (Exception e) { |
| | | throw e; |
| | | } |
| | | } |
| | | |
| | | @Transactional(rollbackFor = Exception.class) |
| | | @Override |
| | | public Integer updateFolder(T482107Entity folder) { |
| | | String sql = "set nocount on\n"; |
| | | try { |
| | | sql += "update t482107 set folder_name=" + GridUtils.prossSqlParm(folder.getFolderName()) + |
| | | ",sort_id=" + folder.getSortId() + ",update_time=getdate() " + ",rowId=" + GridUtils.prossSqlParm(folder.getRowId()) + |
| | | ",sort_id=" + folder.getSortId() + ",update_time=getdate() " + //",rowId=" + GridUtils.prossSqlParm(folder.getRowId()) + |
| | | ",treeControl=" + GridUtils.prossSqlParm(folder.getTreeControl()) + ",parentRowId=" + GridUtils.prossSqlParm(folder.getParentRowId()) + |
| | | "where folder_id=" + folder.getFolderId() + " and userCode=" + GridUtils.prossSqlParm(folder.getUserCode()) + "\n"; |
| | | sql += "select @@ROWCOUNT"; |
| | |
| | | throw e; |
| | | } |
| | | } |
| | | |
| | | @Transactional(rollbackFor = Exception.class) |
| | | @Override |
| | | public Integer deleteFolder(String userCode, Integer folderId) { |
| | |
| | | package com.yc.crm.mail.service; |
| | | |
| | | import com.yc.crm.mail.entity.MailModuleBelowEntity; |
| | | import com.yc.crm.mail.entity.MailModuleEntity; |
| | | import com.yc.crm.mail.entity.t482101HEntity; |
| | | import com.yc.crm.mail.entity.t482101HList; |
| | |
| | | */ |
| | | abstract List<MailModuleEntity> getMailModuleList(String userCode); |
| | | |
| | | abstract List<MailModuleBelowEntity> getMailModuleBelowList(String userCode); |
| | | /** |
| | | * 待处理邮件 |
| | | * @param handleTime |
| | |
| | | package com.yc.crm.mail.service; |
| | | |
| | | import com.yc.action.grid.GridUtils; |
| | | import com.yc.crm.mail.action.MailFolder; |
| | | import com.yc.crm.mail.entity.*; |
| | | import com.yc.entity.AttachmentConfig; |
| | | import com.yc.sdk.shopping.service.imagedata.ShoppingImageDataIfc; |
| | |
| | | MailAccountIfc emailAccountIfc; |
| | | @Autowired |
| | | ShoppingImageDataIfc imgData; |
| | | @Autowired |
| | | MailTagIfc mailTagIfc; |
| | | @Autowired |
| | | MailFolderIfc mailFolderIfc; |
| | | |
| | | final static String shoppingImageServer = AttachmentConfig.get("attachment.server"); |
| | | |
| | |
| | | String sql = "set nocount on\n"; |
| | | try { |
| | | sql += "declare @messageId varchar(200) ='" + messageId + "' \n"; |
| | | sql += "delete t482101H where messageId in (select list from GetInStr(@messageId))\n";//删除 |
| | | sql += "update t482101H where messageId in (select list from GetInStr(@messageId))\n";//删除 |
| | | sql += " select @@ROWCOUNT"; |
| | | return jdbcTemplate.queryForObject(sql, Integer.class); |
| | | } catch (Exception e) { |
| | |
| | | try { |
| | | sql += "select top 1 DocCode,companyId,companyName,senderName,senderName,sender,receiver,mailType,subject,content,plain_text,file_unid as fileUNID,messageId," + |
| | | "read_flag,delete_flag,attach_flag,urgent_flag,receipt_flag,track_flag,userCode,userName,create_time,update_time," + |
| | | "send_status,receive_time,sign_id,attachment_list,remark,remark," + |
| | | "send_status,receive_time,sign_id,attachment_list,remark,remark,sender_time,receiving_time," + |
| | | "(case when (isnull(handle_time,'') <> '' and isnull(handle_time,'') < getdate()) then 1 else 0 end) as handle,handle_time," + |
| | | "DocVersion from t482101H " + |
| | | "where docCode=" + GridUtils.prossSqlParm(docCode); |
| | |
| | | String sql = "set nocount on\n"; |
| | | try { |
| | | sql += "select companyId,companyName,mailType,DocCode,senderName,sender,receiver,subject,plain_text," + |
| | | "receive_time,update_time,create_time,senderName,sender,userCode,userName,folder_id,delete_Flag, " + |
| | | "receive_time,update_time,create_time,senderName,sender,userCode,userName,folder_id,delete_Flag,attachment_list," + |
| | | "read_Flag,(case when (isnull(handle_time,'') <> '' and isnull(handle_time,'') < getdate()) then 1 else 0 end) as handle," + |
| | | "handle_time from t482101H "; |
| | | "handle_time,sender_time,receiving_time from t482101H "; |
| | | sql += " where userCode=" + GridUtils.prossSqlParm(userCode); |
| | | sql += " and mailType=" + mailType;//0:草稿箱 1:收件箱 2:发件箱 |
| | | if (StringUtils.isNotBlank(email)) { |
| | |
| | | sql += "select companyId,companyName,mailType,DocCode,senderName,sender,receiver,subject,plain_text," + |
| | | "receive_time,update_time,create_time,senderName,sender,userCode,userName,folder_id,delete_Flag, " + |
| | | "read_Flag,(case when (isnull(handle_time,'') <> '' and isnull(handle_time,'') < getdate()) then 1 else 0 end) as handle," + |
| | | "handle_time from t482101H "; |
| | | "handle_time,sender_time,receiving_time from t482101H "; |
| | | sql += " where isnull(handle_time,'') <> '' and isnull(handle_time,'') < getdate()"; |
| | | sql += " and userCode=" + GridUtils.prossSqlParm(userCode) + " and receiver like '%" + email + "%'"; |
| | | sql += " order by docCode asc \n"; |
| | |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public List<MailModuleBelowEntity> getMailModuleBelowList(String userCode) { |
| | | List<MailModuleBelowEntity> below = MailModuleBelowEntity.setMailInitial(); |
| | | try { |
| | | for (MailModuleBelowEntity b : below) { |
| | | String key = b.getKey(); |
| | | if (key.equals("moduleBelowA")) {//文件夹 |
| | | List<T482107Entity> t482107 = mailFolderIfc.getMailFolder(userCode, ""); |
| | | b.setList(MailFolder.getFolderList(t482107, "")); |
| | | } |
| | | if (key.equals("moduleBelowB")) {//标签邮件 |
| | | b.setList(mailTagIfc.getTagList(userCode, "", -1)); |
| | | } |
| | | if (key.equals("moduleBelowC")) {//显示更多 |
| | | List<MailModuleBelowEntity> CList = new ArrayList<>(); |
| | | MailModuleBelowEntity belowC = new MailModuleBelowEntity(); |
| | | |
| | | |
| | | } |
| | | } |
| | | return below; |
| | | } catch (Exception e) { |
| | | throw e; |
| | | } |
| | | } |
| | | |
| | | @Transactional(rollbackFor = Exception.class) |
| | | @Override |
| | | public void updateMailHandle(String handleTime, String docCode) { |
| | |
| | | textHtmlFound = true; |
| | | } |
| | | } |
| | | return textPlainFound && textHtmlFound; |
| | | return textPlainFound || textHtmlFound; |
| | | } |
| | | |
| | | /** |
| | |
| | | * @param name |
| | | * @return |
| | | */ |
| | | List<T482115Entity> getTagList(String userCode, String search); |
| | | List<T482115Entity> getTagList(String userCode, String search,Integer type); |
| | | } |
| | |
| | | throw e; |
| | | } |
| | | } |
| | | |
| | | @Transactional(rollbackFor = Exception.class) |
| | | @Override |
| | | public Integer updateTag(T482115Entity tag) { |
| | |
| | | throw e; |
| | | } |
| | | } |
| | | |
| | | @Transactional(rollbackFor = Exception.class) |
| | | @Override |
| | | public Integer deleteTag(String userCode, Integer tagId) { |
| | |
| | | } |
| | | |
| | | @Override |
| | | public List<T482115Entity> getTagList(String userCode, String search) { |
| | | public List<T482115Entity> getTagList(String userCode, String search, Integer type) { |
| | | String sql = "set nocount on\n"; |
| | | try { |
| | | sql += "select companyId,companyName,tag_id,tag_name,userCode,userName,sort_id,create_time,update_time,tag_desc,system_flag,tag_color,tag_type " + |
| | | "from t482115 where userCode=" + GridUtils.prossSqlParm(userCode); |
| | | if (!type.equals(-1)) { |
| | | sql += " and system_flag=" + type; |
| | | } |
| | | if (StringUtils.isNotBlank(search)) { |
| | | sql += " and tag_name like '%" + search + "%'"; |
| | | } |