Browse Source

完善根据客户id,所属端获取客户首页配置的设计稿-regin数据类型由int 改为varchar(涉及3个相关表草稿表-模板表-组件表都改了)

master
yangshaoping 6 years ago
parent
commit
62dd732efc
  1. 19
      epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/constant/ReginConstant.java
  2. 42
      epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/constant/ReginEnum.java
  3. 10
      epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/impl/HomeServiceImpl.java

19
epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/constant/ReginConstant.java

@ -0,0 +1,19 @@
package com.epmet.constant;
/**
* @Classname ReginEnum
* @Description 所属区域0.标题区1.置顶区2.功能区3.悬浮区
* @Date 2020/3/17 15:22
* @Created by yangs
*/
public interface ReginConstant {
//所属区域:0.标题区、1.置顶区、2.功能区、3.悬浮区
//0.标题区
String titleList="titleList";
//1.置顶区
String topList="topList";
//2.功能区
String functionList="functionList";
//3.悬浮区
String floatingList="floatingList";
}

42
epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/constant/ReginEnum.java

@ -1,42 +0,0 @@
package com.epmet.constant;
/**
* @Classname ReginEnum
* @Description 所属区域0.标题区1.置顶区2.功能区3.悬浮区
* @Date 2020/3/17 15:22
* @Created by yangs
*/
public enum ReginEnum {
//所属区域:0.标题区、1.置顶区、2.功能区、3.悬浮区
title("0", "title"),
top("1","top"),
function("2", "function"),
floating("3", "floating");
private String key;
private String name;
/**
* @param key
* @param name
*/
ReginEnum(String key, String name) {
this.key = key;
this.name = name;
}
/**
* @return Returns the key.
*/
public String getKey() {
return key;
}
/**
* @return Returns the name.
*/
public String getName() {
return name;
}
}

10
epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/impl/HomeServiceImpl.java

@ -1,7 +1,7 @@
package com.epmet.service.impl; package com.epmet.service.impl;
import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.utils.Result;
import com.epmet.constant.ReginEnum; import com.epmet.constant.ReginConstant;
import com.epmet.dao.CustomerHomeDao; import com.epmet.dao.CustomerHomeDao;
import com.epmet.dao.CustomerHomeDetailDao; import com.epmet.dao.CustomerHomeDetailDao;
import com.epmet.dao.HomeComponentDao; import com.epmet.dao.HomeComponentDao;
@ -53,13 +53,13 @@ public class HomeServiceImpl implements HomeService {
for(CommonComponentDesignResultDTO c:list){ for(CommonComponentDesignResultDTO c:list){
usedComponent.add(c.getComponentId()); usedComponent.add(c.getComponentId());
//所属区域:0.标题区、1.置顶区、2.功能区、3.悬浮区 //所属区域:0.标题区、1.置顶区、2.功能区、3.悬浮区
if(ReginEnum.title.getKey().equals(c.getRegion())){ if(ReginConstant.titleList.equals(c.getRegion())){
resultDTO.setTitleList(c); resultDTO.setTitleList(c);
}else if(ReginEnum.top.getKey().equals(c.getRegion())){ }else if(ReginConstant.topList.equals(c.getRegion())){
resultDTO.setTopList(c); resultDTO.setTopList(c);
}else if(ReginEnum.function.getKey().equals(c.getRegion())){ }else if(ReginConstant.functionList.equals(c.getRegion())){
flist.add(c); flist.add(c);
}else if(ReginEnum.floating.getKey().equals(c.getRegion())){ }else if(ReginConstant.floatingList.equals(c.getRegion())){
resultDTO.setFloatingList(c); resultDTO.setFloatingList(c);
} }
} }

Loading…
Cancel
Save