增加动态表单自动排版配置界面的保存回显逻辑
This commit is contained in:
parent
6ea2e1f36c
commit
e47036c04e
@ -1,5 +1,8 @@
|
||||
package cn.com.tenlion.systemcard.controller.app.api.shoptemplateconfig;
|
||||
|
||||
import cn.com.tenlion.configcolumn.service.configcolumn.IConfigColumnService;
|
||||
import cn.com.tenlion.configtable.pojo.dtos.configtableoperation.ConfigTableOperationDTO;
|
||||
import cn.com.tenlion.configtable.pojo.dtos.configtableoperation.ConfigTableOperationGroupDTO;
|
||||
import cn.com.tenlion.projectconfig.util.ProjectConfigUtil;
|
||||
import cn.com.tenlion.systemcard.dao.cardtemplateuse.ICardTemplateUseDao;
|
||||
import cn.com.tenlion.systemcard.pojo.dtos.cardtemplateuse.CardTemplateUseDTO;
|
||||
@ -47,6 +50,9 @@ public class ShopTemplateConfigAppController extends DefaultBaseController {
|
||||
@Autowired
|
||||
private ICardTemplateUseService iCardTemplateUseService;
|
||||
|
||||
@Autowired
|
||||
private IConfigColumnService configColumnService;
|
||||
|
||||
@ApiOperation(value = "服务页面的跳转", notes = "服务页面的跳转接口")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "creator", value = "当前名片创建人的ID", paramType = "query")
|
||||
@ -55,32 +61,64 @@ public class ShopTemplateConfigAppController extends DefaultBaseController {
|
||||
@GetMapping("page" + ISystemConstant.RELEASE_SUFFIX + "/{userId}")
|
||||
public ModelAndView page(@PathVariable("userId") String userId) {
|
||||
ModelAndView modelAndView = new ModelAndView("shoptemplateconfig/baseinfo");
|
||||
List<String> fileList = new ArrayList<String>();
|
||||
fileList.add("8b4bc4ac-1ad0-4c12-b034-e0cb6ee755d8");
|
||||
fileList.add("fe02a4da-297e-4610-b38c-4179b2640f7d");
|
||||
modelAndView.addObject("fileList", fileList);
|
||||
|
||||
modelAndView.addObject("content", "尚未设置默认名片");
|
||||
Map<String, Object> params = requestParams();
|
||||
// 如果商店跳转开启 , 则查询商店进行跳转
|
||||
if(ProjectConfigUtil.getSwitch("shopTargetSwitch")) {
|
||||
// 如果创建了商店 , 则跳转至商店的静态页 , 如果没有创建则接着往下走
|
||||
modelAndView.setViewName("shoptemplateconfig/shoptest");
|
||||
return modelAndView;
|
||||
}
|
||||
// 如果当前访问的是系统默认名片
|
||||
CardTemplateUseDTO cardTemplateUseDTO = iCardTemplateUseService.getSystemCard();
|
||||
if(cardTemplateUseDTO != null && userId.equals(cardTemplateUseDTO.getCreator())) {
|
||||
// 显示公司介绍页面
|
||||
modelAndView.setViewName("shoptemplateconfig/companyinfo");
|
||||
// 查询当前人在栏目中发布的商家信息
|
||||
return modelAndView;
|
||||
}
|
||||
// 如果访问的是某人的名片
|
||||
CardTemplateUseDTO cardTemplateUseDTOTop = iCardTemplateUseService.getTopCard(userId);
|
||||
if(cardTemplateUseDTOTop != null && userId.equals(cardTemplateUseDTOTop.getCreator())) {
|
||||
params.put("userId", cardTemplateUseDTOTop.getCreator());
|
||||
List<ConfigTableOperationGroupDTO> list = configColumnService.listDataByCode(null, ProjectConfigUtil.getText("companyColumnCode"), params);
|
||||
if(list.size() > 0) {
|
||||
// 显示公司介绍页面
|
||||
modelAndView.setViewName("shoptemplateconfig/companyinfo");
|
||||
// 显示个人介绍页面
|
||||
List<ConfigTableOperationDTO> operationDTOList = list.get(0).getList();
|
||||
for(ConfigTableOperationDTO operationDTO : operationDTOList) {
|
||||
// 公司图片
|
||||
if("photo".equals(operationDTO.getName()) ) {
|
||||
String[] imageList = (operationDTO.getValue() + "" ).split(",");
|
||||
modelAndView.addObject("fileList", imageList);
|
||||
}
|
||||
// 公司介绍
|
||||
if("content".equals(operationDTO.getName()) ) {
|
||||
modelAndView.addObject("content", operationDTO.getValue() + "");
|
||||
}
|
||||
}
|
||||
// 查询当前人在栏目中发布的商家信息
|
||||
return modelAndView;
|
||||
}
|
||||
}
|
||||
// 如果当前访问的是系统默认名片
|
||||
CardTemplateUseDTO cardTemplateUseDTO = iCardTemplateUseService.getSystemCard();
|
||||
if(cardTemplateUseDTO != null) {
|
||||
params.put("userId", cardTemplateUseDTO.getCreator());
|
||||
List<ConfigTableOperationGroupDTO> list = configColumnService.listDataByCode(null, ProjectConfigUtil.getText("companyColumnCode"), params);
|
||||
if(list.size() > 0) {
|
||||
// 显示公司介绍页面
|
||||
modelAndView.setViewName("shoptemplateconfig/companyinfo");
|
||||
List<ConfigTableOperationDTO> operationDTOList = list.get(0).getList();
|
||||
for(ConfigTableOperationDTO operationDTO : operationDTOList) {
|
||||
// 公司图片
|
||||
if("photo".equals(operationDTO.getName()) ) {
|
||||
String[] imageList = (operationDTO.getValue() + "" ).split(",");
|
||||
modelAndView.addObject("fileList", imageList);
|
||||
}
|
||||
// 公司介绍
|
||||
if("content".equals(operationDTO.getName()) ) {
|
||||
modelAndView.addObject("content", operationDTO.getValue() + "");
|
||||
}
|
||||
}
|
||||
// 查询当前人在栏目中发布的商家信息
|
||||
return modelAndView;
|
||||
}else{
|
||||
modelAndView.addObject("content", "尚未发布公司信息");
|
||||
}
|
||||
}
|
||||
// 首次初始化没有默认名片跳转到空白页
|
||||
return modelAndView;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user