|
@@ -116,8 +116,8 @@ public class CmBaikeProductController extends BaseController {
|
|
|
cmBaikeType.setTypeSort(cmBaikeProduct.getCommodityType());
|
|
|
cmBaikeType.setStatus(1);
|
|
|
//去除义项名,词条概述格式
|
|
|
-// cmBaikeProduct.setAlias(removerFormat(cmBaikeProduct.getAlias()));
|
|
|
-// cmBaikeProduct.setDiscription(removerFormat(cmBaikeProduct.getDiscription()));
|
|
|
+ cmBaikeProduct.setAlias(removerFormat(cmBaikeProduct.getAlias()));
|
|
|
+ cmBaikeProduct.setDiscription(removerFormat(cmBaikeProduct.getDiscription()));
|
|
|
// 分类列表
|
|
|
List<CmBaikeType> typeList = cmBaikeTypeService.findList(cmBaikeType);
|
|
|
// 商品类型
|
|
@@ -125,11 +125,11 @@ public class CmBaikeProductController extends BaseController {
|
|
|
// 参数列表
|
|
|
List<CmBaikeProductParam> paramList = cmBaikeProductDao.findParamList(cmBaikeProduct.getId());
|
|
|
//去除信息栏内容格式
|
|
|
-// if(null!=paramList&¶mList.size()>0){
|
|
|
-// for (CmBaikeProductParam cp:paramList) {
|
|
|
-// cp.setContent(removerFormat(cp.getContent()));
|
|
|
-// }
|
|
|
-// }
|
|
|
+ if(null!=paramList&¶mList.size()>0){
|
|
|
+ for (CmBaikeProductParam cp:paramList) {
|
|
|
+ cp.setContent(removerFormat(cp.getContent()));
|
|
|
+ }
|
|
|
+ }
|
|
|
cmBaikeProduct.setParamList(paramList);
|
|
|
// 产品/仪器认证图片列表
|
|
|
List<String> authImageList = cmBaikeProductDao.findImageList(cmBaikeProduct.getId(), 1);
|
|
@@ -157,13 +157,13 @@ public class CmBaikeProductController extends BaseController {
|
|
|
//正文
|
|
|
List<CmBaikeTextInfo> textInfo = cmBaikeProductDao.getTextInfo(cmBaikeProduct.getId());
|
|
|
//去除正文内容格式
|
|
|
-// if(null!=textInfo&&textInfo.size()>0){
|
|
|
-// for (CmBaikeTextInfo ct:textInfo) {
|
|
|
-// if(null!=ct.getDictionaryType()&&ct.getDictionaryType()==3){
|
|
|
-// ct.setDictionaryContent(removerFormat(ct.getDictionaryContent()));
|
|
|
-// }
|
|
|
-// }
|
|
|
-// }
|
|
|
+ if(null!=textInfo&&textInfo.size()>0){
|
|
|
+ for (CmBaikeTextInfo ct:textInfo) {
|
|
|
+ if(null!=ct.getDictionaryType()&&ct.getDictionaryType()==3){
|
|
|
+ ct.setDictionaryContent(removerFormat(ct.getDictionaryContent()));
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
cmBaikeProduct.setTextInfolist(textInfo);
|
|
|
//参考资料
|
|
|
if(StringUtils.isNotEmpty(cmBaikeProduct.getId())){
|
|
@@ -387,9 +387,7 @@ public class CmBaikeProductController extends BaseController {
|
|
|
*/
|
|
|
public String removerFormat(String chara){
|
|
|
if(StringUtils.isNotEmpty(chara)){
|
|
|
- Pattern p=Pattern.compile("\\s*|\t|\r|\n");
|
|
|
- Matcher m=p.matcher(chara);
|
|
|
- chara=m.replaceAll("");
|
|
|
+ chara=chara.replaceAll("\n","<br/>");
|
|
|
}
|
|
|
return chara;
|
|
|
}
|
|
@@ -411,19 +409,19 @@ public class CmBaikeProductController extends BaseController {
|
|
|
@RequestMapping(value = "check")
|
|
|
public String checkInfo(CmBaikeProduct cmBaikeProduct,Model model) {
|
|
|
//去除义项名,词条概述格式
|
|
|
-// cmBaikeProduct.setAlias(removerFormat(cmBaikeProduct.getAlias()));
|
|
|
-// cmBaikeProduct.setDiscription(removerFormat(cmBaikeProduct.getDiscription()));
|
|
|
+ cmBaikeProduct.setAlias(removerFormat(cmBaikeProduct.getAlias()));
|
|
|
+ cmBaikeProduct.setDiscription(removerFormat(cmBaikeProduct.getDiscription()));
|
|
|
model.addAttribute("cmBaikeProduct", cmBaikeProduct);
|
|
|
// 商品类型
|
|
|
String commodityType = cmBaikeProduct.getCommodityType() == 1 ? "产品" : "仪器";
|
|
|
// 参数列表
|
|
|
List<CmBaikeProductParam> paramList = cmBaikeProductDao.findParamList(cmBaikeProduct.getId());
|
|
|
//去除信息栏内容格式
|
|
|
-// if(null!=paramList&¶mList.size()>0){
|
|
|
-// for (CmBaikeProductParam cp:paramList) {
|
|
|
-// cp.setContent(removerFormat(cp.getContent()));
|
|
|
-// }
|
|
|
-// }
|
|
|
+ if(null!=paramList&¶mList.size()>0){
|
|
|
+ for (CmBaikeProductParam cp:paramList) {
|
|
|
+ cp.setContent(removerFormat(cp.getContent()));
|
|
|
+ }
|
|
|
+ }
|
|
|
cmBaikeProduct.setParamList(paramList);
|
|
|
// 产品/仪器认证图片列表
|
|
|
List<String> authImageList = cmBaikeProductDao.findImageList(cmBaikeProduct.getId(), 1);
|
|
@@ -442,13 +440,13 @@ public class CmBaikeProductController extends BaseController {
|
|
|
//正文
|
|
|
List<CmBaikeTextInfo> textInfo = cmBaikeProductDao.getTextInfo(cmBaikeProduct.getId());
|
|
|
//去除正文内容格式
|
|
|
-// if(null!=textInfo&&textInfo.size()>0){
|
|
|
-// for (CmBaikeTextInfo ct:textInfo) {
|
|
|
-// if(null!=ct.getDictionaryType()&&ct.getDictionaryType()==3){
|
|
|
-// ct.setDictionaryContent(removerFormat(ct.getDictionaryContent()));
|
|
|
-// }
|
|
|
-// }
|
|
|
-// }
|
|
|
+ if(null!=textInfo&&textInfo.size()>0){
|
|
|
+ for (CmBaikeTextInfo ct:textInfo) {
|
|
|
+ if(null!=ct.getDictionaryType()&&ct.getDictionaryType()==3){
|
|
|
+ ct.setDictionaryContent(removerFormat(ct.getDictionaryContent()));
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
cmBaikeProduct.setTextInfolist(textInfo);
|
|
|
//参考资料
|
|
|
if(StringUtils.isNotEmpty(cmBaikeProduct.getId())){
|
|
@@ -516,8 +514,8 @@ public class CmBaikeProductController extends BaseController {
|
|
|
@RequestMapping(value = "toAuditPage")
|
|
|
public String toAuditPage(CmBaikeProduct cmBaikeProduct,Model model) {
|
|
|
//去除义项名,词条概述格式
|
|
|
-// cmBaikeProduct.setAlias(removerFormat(cmBaikeProduct.getAlias()));
|
|
|
-// cmBaikeProduct.setDiscription(removerFormat(cmBaikeProduct.getDiscription()));
|
|
|
+ cmBaikeProduct.setAlias(removerFormat(cmBaikeProduct.getAlias()));
|
|
|
+ cmBaikeProduct.setDiscription(removerFormat(cmBaikeProduct.getDiscription()));
|
|
|
model.addAttribute("cmBaikeProduct", cmBaikeProduct);
|
|
|
cmBaikeProduct.setPublishSource(2);
|
|
|
// 商品类型
|
|
@@ -525,11 +523,11 @@ public class CmBaikeProductController extends BaseController {
|
|
|
// 参数列表
|
|
|
List<CmBaikeProductParam> paramList = cmBaikeProductDao.findParamList(cmBaikeProduct.getId());
|
|
|
//去除信息栏内容格式
|
|
|
-// if(null!=paramList&¶mList.size()>0){
|
|
|
-// for (CmBaikeProductParam cp:paramList) {
|
|
|
-// cp.setContent(removerFormat(cp.getContent()));
|
|
|
-// }
|
|
|
-// }
|
|
|
+ if(null!=paramList&¶mList.size()>0){
|
|
|
+ for (CmBaikeProductParam cp:paramList) {
|
|
|
+ cp.setContent(removerFormat(cp.getContent()));
|
|
|
+ }
|
|
|
+ }
|
|
|
cmBaikeProduct.setParamList(paramList);
|
|
|
// 产品/仪器认证图片列表
|
|
|
List<String> authImageList = cmBaikeProductDao.findImageList(cmBaikeProduct.getId(), 1);
|
|
@@ -561,13 +559,13 @@ public class CmBaikeProductController extends BaseController {
|
|
|
//正文
|
|
|
List<CmBaikeTextInfo> textInfo = cmBaikeProductDao.getTextInfo(cmBaikeProduct.getId());
|
|
|
//去除正文内容格式
|
|
|
-// if(null!=textInfo&&textInfo.size()>0){
|
|
|
-// for (CmBaikeTextInfo ct:textInfo) {
|
|
|
-// if(null!=ct.getDictionaryType()&&ct.getDictionaryType()==3){
|
|
|
-// ct.setDictionaryContent(removerFormat(ct.getDictionaryContent()));
|
|
|
-// }
|
|
|
-// }
|
|
|
-// }
|
|
|
+ if(null!=textInfo&&textInfo.size()>0){
|
|
|
+ for (CmBaikeTextInfo ct:textInfo) {
|
|
|
+ if(null!=ct.getDictionaryType()&&ct.getDictionaryType()==3){
|
|
|
+ ct.setDictionaryContent(removerFormat(ct.getDictionaryContent()));
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
cmBaikeProduct.setTextInfolist(textInfo);
|
|
|
//参考资料
|
|
|
if(StringUtils.isNotEmpty(cmBaikeProduct.getId())){
|