InfoTest.java 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. package com.caimei.info;
  2. import com.caimei.modules.coupon.dao.CmCouponVipDao;
  3. import com.caimei.modules.coupon.entity.CmVipCoupon;
  4. import com.caimei.modules.landing.domain.CmBrandLanding;
  5. import com.caimei.modules.landing.mapper.CmBrandLandingMapper;
  6. import com.caimei.modules.order.entity.NewShopOrder;
  7. import com.caimei.modules.order.service.NewShopOrderService;
  8. import com.caimei.modules.product.dao.CmOrganizeProductInfoMapper;
  9. import com.caimei.modules.sys.utils.SMSUtils;
  10. import org.junit.Test;
  11. import org.springframework.beans.factory.annotation.Autowired;
  12. import com.caimei.modules.info.entity.Info;
  13. import com.caimei.modules.info.service.InfoService;
  14. import com.thinkgem.jeesite.common.test.SpringTransactionalContextTests;
  15. import com.thinkgem.jeesite.common.utils.Encodes;
  16. import com.thinkgem.jeesite.common.utils.StringUtils;
  17. import com.thinkgem.jeesite.test.service.InfomationService;
  18. import java.io.UnsupportedEncodingException;
  19. import java.util.List;
  20. public class InfoTest extends SpringTransactionalContextTests {
  21. @Autowired
  22. private InfomationService infomationService;
  23. @Autowired
  24. CmOrganizeProductInfoMapper cmOrganizeProductInfoMapper;
  25. @Autowired
  26. NewShopOrderService newShopOrderService;
  27. @Autowired
  28. private InfoService infoService;
  29. @Autowired
  30. private CmBrandLandingMapper cmBrandLandingMapper;
  31. @Autowired
  32. private CmCouponVipDao dao;
  33. @Test
  34. public void test(){
  35. // SMSUtils.sendSms(4, "17708413951", "【采美365】系统已为你分配机构客户,请及时跟进。机构名称【" + "newCmClub.getName()" + "】,联系人【" + "newCmClub.getLinkMan()" + "】,手机号【" + "15600000000" + "】,上一任销售【" + "etName()" + "】。");
  36. // NewShopOrder cmShopOrderByShopOrderID = newShopOrderService.getCmShopOrderByShopOrderID("29352");
  37. // System.out.println(cmShopOrderByShopOrderID);
  38. // CmBrandLanding cmBrandLanding = new CmBrandLanding();
  39. // cmBrandLanding.setType("not=1,2");
  40. // cmBrandLandingMapper.selectCmBrandLandingList(cmBrandLanding);
  41. // cmOrganizeProductInfoMapper.getCmOrganizeProductInfoList(null);
  42. // String str = "/pages/goods/goods-classify?classType=2&id=1038&title=%E7%8E%BB%E5%B0%BF%E9%85%B8%EF%BC%88%E5%B0%8F%E5%88%86%E5%AD%90%EF%BC%89";
  43. // String decode="";
  44. // try {
  45. // decode = java.net.URLDecoder.decode(str,"UTF-8");
  46. // } catch (UnsupportedEncodingException e) {
  47. // e.printStackTrace();
  48. // }
  49. // System.out.println(decode);
  50. // Info info = infoService.get("228");
  51. // String infoContent=Encodes.unescapeHtml(info.getInfoContent());
  52. // //infoContent=Encodes.urlDecode(infoContent);
  53. //// Document doc = Jsoup.parse(infoContent);
  54. //// Elements links = doc.getElementsByTag("div");
  55. //// for (Element link : links) {
  56. //// //page-break-after: always;
  57. //// String linkSrc = link.attr("style");
  58. //// if(StringUtils.equals(linkSrc, "page-break-after: always;")){
  59. ////
  60. //// }
  61. //// }
  62. //
  63. // String a="<div style=\"page-break-after: always;\">\r\n\t<span style=\"display: none;\"> </span></div>";
  64. // //String[] split = StringUtils.split(infoContent,a);
  65. // String[] split=StringUtils.splitByWholeSeparator(infoContent, a);
  66. // System.out.println(split[0]);
  67. // System.out.println("-------------------------------------------------------");
  68. // System.out.println(split[1]);
  69. }
  70. }