Commit ea2ea592 by 陶光胜

Merge branch 'developer' of…

Merge branch 'developer' of http://115.159.76.241/base_platform_enterprise/gic-platform-enterprise into developer
parents 25a53fcb 7aebefcf
......@@ -133,7 +133,7 @@ public enum AppletPageTypeEnum {
if (pageType == null) {
return false;
}
if (AppletPageTypeEnum.INTEGRAL_SERVICE.getType() == pageType) {
if (AppletPageTypeEnum.INTEGRAL_SERVICE.getCode() == pageType) {
return true;
}
return false;
......
......@@ -95,6 +95,13 @@ public interface AppletCustomPageApiService {
ServiceResponse<Void> setSerialNumber(Integer pageId, Integer serialNumber);
/**
* 复制页面
* @param pageId
* @return
*/
ServiceResponse<Void> copyPage(Integer pageId);
/**
* 开启
* @Title: enable

* @Description:
......
......@@ -31,6 +31,8 @@ import org.springframework.transaction.annotation.Transactional;
import org.springframework.transaction.interceptor.TransactionAspectSupport;
import java.util.*;
import java.util.stream.Collectors;
/**
*
* @ClassName: AppletCustomPageApiServiceImpl
......@@ -367,6 +369,29 @@ public class AppletCustomPageApiServiceImpl implements AppletCustomPageApiServic
return ServiceResponse.success();
}
@Transactional(rollbackFor = Exception.class)
@Override
public ServiceResponse<Void> copyPage(Integer pageId) {
TabAppletCustomPage record = exist(pageId);
TabAppletCustomPage copy = EntityUtil.changeEntityNew(TabAppletCustomPage.class, record);
//新增一个
copy.setPageId(null);
//未发布
copy.setStatus(2);
Integer newPageId = appletCustomPageService.save(copy);
//复制组件数据
List<TabAppletPageComponent> componentList = appletPageComponentService.listByPageId(pageId);
if (CollectionUtils.isNotEmpty(componentList)) {
List<TabAppletPageComponent> copyComponent = componentList.stream().map(e -> {
e.setPageId(newPageId);
e.setComponentId(null);
return e;
}).collect(Collectors.toList());
appletPageComponentService.saveFetch(copyComponent);
}
return ServiceResponse.success();
}
@Override
public ServiceResponse<String> enable(Integer pageId) {
TabAppletCustomPage record = exist(pageId);
......
......@@ -86,6 +86,12 @@ public class CustomPageController {
return OperationResultUtils.operationResult(result, "设置页面序号");
}
@RequestMapping("/copy-page")
public RestResponse copyPage(Integer pageId) {
ServiceResponse<Void> result = appletCustomPageApiService.copyPage(pageId);
return OperationResultUtils.operationResult(result, "复制页面");
}
@RequestMapping("/delete")
public RestResponse delete(Integer pageId) {
ServiceResponse<String> result = appletCustomPageApiService.delete(pageId);
......
......@@ -265,7 +265,13 @@ public class IndexModuleController {
return RestResponse.success(data);
}
/**
* 首页-会员概览-左侧趋势
* @param type
* @param cardAreaId
* @param brandId
* @return
*/
@RequestMapping("list-member-data")
public RestResponse listMember(Integer type, Long cardAreaId, Integer brandId){
Integer enterpriseId = UserDetailUtils.getUserDetail().getEnterpriseId();
......
......@@ -52,6 +52,9 @@ public class MemberDataVO implements Serializable {
}
public String getDate() {
if (date == null) {
return dateData;
}
return date;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment