Browse Source

导航条和页面设计模块

晴为镜 1 month ago
parent
commit
c931d13cdc
18 changed files with 2234 additions and 0 deletions
  1. 6 0
      zkqy-admin/pom.xml
  2. 224 0
      zkqy-admin/src/main/java/com/zkqy/web/controller/mobilepage/MobilePageDesignDataController.java
  3. 135 0
      zkqy-admin/src/main/java/com/zkqy/web/controller/mobilepage/MobilePageNavigationBarController.java
  4. 6 0
      zkqy-common/pom.xml
  5. 7 0
      zkqy-common/src/main/java/com/zkqy/common/core/page/TableDataInfo.java
  6. 10 0
      zkqy-common/src/main/java/com/zkqy/common/utils/CollectionUtil.java
  7. 136 0
      zkqy-common/src/main/java/com/zkqy/common/utils/ProcessingSelectSqlUtil.java
  8. 219 0
      zkqy-system/src/main/java/com/zkqy/system/entity/MobilePageDesignData.java
  9. 219 0
      zkqy-system/src/main/java/com/zkqy/system/entity/MobilePageNavigationBar.java
  10. 47 0
      zkqy-system/src/main/java/com/zkqy/system/entity/dto/MobilePageDesignDataNormalDTO.java
  11. 69 0
      zkqy-system/src/main/java/com/zkqy/system/mapper/MobilePageDesignDataMapper.java
  12. 61 0
      zkqy-system/src/main/java/com/zkqy/system/mapper/MobilePageNavigationBarMapper.java
  13. 87 0
      zkqy-system/src/main/java/com/zkqy/system/service/IMobilePageDesignDataService.java
  14. 62 0
      zkqy-system/src/main/java/com/zkqy/system/service/IMobilePageNavigationBarService.java
  15. 570 0
      zkqy-system/src/main/java/com/zkqy/system/service/impl/MobilePageDesignDataServiceImpl.java
  16. 96 0
      zkqy-system/src/main/java/com/zkqy/system/service/impl/MobilePageNavigationBarServiceImpl.java
  17. 150 0
      zkqy-system/src/main/resources/mapper/mobile/MobilePageDesignDataMapper.xml
  18. 130 0
      zkqy-system/src/main/resources/mapper/mobile/MobilePageNavigationBarMapper.xml

+ 6 - 0
zkqy-admin/pom.xml

@@ -75,6 +75,12 @@
             <scope>system</scope>
             <systemPath>${project.basedir}/src/main/resources/lib/DmJdbcDriver18.jar</systemPath>
         </dependency>
+        <!--jsoup 页面分析依赖-->
+        <dependency>
+            <groupId>org.jsoup</groupId>
+            <artifactId>jsoup</artifactId>
+            <version>1.13.1</version>
+        </dependency>
 
     </dependencies>
 

+ 224 - 0
zkqy-admin/src/main/java/com/zkqy/web/controller/mobilepage/MobilePageDesignDataController.java

@@ -0,0 +1,224 @@
+package com.zkqy.web.controller.mobilepage;
+
+import java.util.List;
+import java.util.Map;
+import javax.servlet.http.HttpServletResponse;
+
+import com.github.pagehelper.PageInfo;
+import com.zkqy.common.utils.CollectionUtil;
+import com.zkqy.common.utils.StringUtils;
+import com.zkqy.system.entity.dto.MobilePageDesignDataNormalDTO;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.PutMapping;
+import org.springframework.web.bind.annotation.DeleteMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+import com.zkqy.common.annotation.Log;
+import com.zkqy.common.core.controller.BaseController;
+import com.zkqy.common.core.domain.AjaxResult;
+import com.zkqy.common.enums.BusinessType;
+import com.zkqy.system.entity.MobilePageDesignData;
+import com.zkqy.system.service.IMobilePageDesignDataService;
+import com.zkqy.common.utils.poi.ExcelUtil;
+import com.zkqy.common.core.page.TableDataInfo;
+
+/**
+ * 页面设计Controller
+ *
+ * @author zkqy
+ * @date 2025-03-24
+ */
+@RestController
+@RequestMapping("/system/mobilePageDesignData")
+@Api(value = "/system/mobilePageDesignData", description = "页面设计-接口")
+public class MobilePageDesignDataController extends BaseController
+{
+    @Autowired
+    private IMobilePageDesignDataService mobilePageDesignDataService;
+
+    /**
+     * 查询页面设计列表
+     */
+    //@PreAuthorize("@ss.hasPermi('system:mobilePageDesignData:list')")
+    @GetMapping("/list")
+    @ApiOperation(value = "查询页面设计列表")
+    public TableDataInfo list(MobilePageDesignData mobilePageDesignData)
+    {
+        startPage();
+        List<MobilePageDesignData> list = mobilePageDesignDataService.selectMobilePageDesignDataList(mobilePageDesignData);
+        return getDataTable(list);
+    }
+
+    // 查询出所有的页面信息 
+    @GetMapping("/list/all")
+    @ApiOperation(value = "查询页面设计列表")
+    public TableDataInfo listAll()
+    {
+        MobilePageDesignData mobilePageDesignData = new MobilePageDesignData();
+        List<MobilePageDesignData> list = mobilePageDesignDataService.selectMobilePageDesignDataList(mobilePageDesignData);
+        return getDataTable(list);
+    }
+
+
+    /**
+     * 导出页面设计列表
+     */
+//    @PreAuthorize("@ss.hasPermi('system:mobilePageDesignData:export')")
+    @Log(title = "页面设计", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    @ApiOperation(value = "导出页面设计列表")
+    public void export(HttpServletResponse response, MobilePageDesignData mobilePageDesignData)
+    {
+        List<MobilePageDesignData> list = mobilePageDesignDataService.selectMobilePageDesignDataList(mobilePageDesignData);
+        ExcelUtil<MobilePageDesignData> util = new ExcelUtil<MobilePageDesignData>(MobilePageDesignData.class);
+        util.exportExcel(response, list, "页面设计数据");
+    }
+
+    /**
+     * 获取页面设计详细信息
+     */
+//    @PreAuthorize("@ss.hasPermi('system:mobilePageDesignData:query')")
+    @GetMapping(value = "/{id}")
+    @ApiOperation(value = "获取页面设计详细信息")
+    public AjaxResult getInfo(@PathVariable("id") Long id)
+    {
+        return success(mobilePageDesignDataService.selectMobilePageDesignDataById(id));
+    }
+
+    /**
+     * 新增页面设计
+     */
+//    @PreAuthorize("@ss.hasPermi('system:mobilePageDesignData:add')")
+    @Log(title = "页面设计", businessType = BusinessType.INSERT)
+    @PostMapping
+    @ApiOperation(value = "新增页面设计")
+    public AjaxResult add(@RequestBody MobilePageDesignData mobilePageDesignData)
+    {
+        int i = mobilePageDesignDataService.insertMobilePageDesignData(mobilePageDesignData);
+        //在pageOption和pageHtml中需要把id放进去
+        if (i > 0){
+            mobilePageDesignDataService.fillPageIdToHtmlData(mobilePageDesignData);
+            mobilePageDesignDataService.updateMobilePageDesignData(mobilePageDesignData);
+        }
+        return toAjax(i);
+    }
+
+    /**
+     * 修改页面设计
+     */
+//    @PreAuthorize("@ss.hasPermi('system:mobilePageDesignData:edit')")
+    @Log(title = "页面设计", businessType = BusinessType.UPDATE)
+    @PutMapping
+    @ApiOperation(value = "修改页面设计")
+    public AjaxResult edit(@RequestBody MobilePageDesignData mobilePageDesignData)
+    {
+        return toAjax(mobilePageDesignDataService.updateMobilePageDesignData(mobilePageDesignData));
+    }
+
+    /**
+     * 删除页面设计
+     */
+//    @PreAuthorize("@ss.hasPermi('system:mobilePageDesignData:remove')")
+    @Log(title = "页面设计", businessType = BusinessType.DELETE)
+    @DeleteMapping("/{ids}")
+    @ApiOperation(value = "删除页面设计")
+    public AjaxResult remove(@PathVariable Long[] ids)
+    {
+        return toAjax(mobilePageDesignDataService.deleteMobilePageDesignDataByIds(ids));
+    }
+
+    /**
+     * 移动端 获取表格页面的数据(不对结果封装),界面预览中使用
+     * 入参 表名 需要分页的参数
+     */
+    @GetMapping(value = "/muti/tableLimitInfo")
+    @ApiOperation(value = "获取表格页面的数据")
+    public TableDataInfo getMutiInfoLimit(Long pageId){
+        if (pageId == 0l || pageId == null){
+            return new TableDataInfo();
+        }
+        MobilePageDesignData mobilePageDesignData = mobilePageDesignDataService.selectMobilePageDesignDataById(pageId);
+        startPage();
+        String sql = mobilePageDesignDataService.mapToQuerySql(mobilePageDesignData.getPageJson());
+        List<Map<String,Object>> list = mobilePageDesignDataService.executeQuerySql(sql);
+        List<Map<String, Object>> underlineList = CollectionUtil.copyListMapWithCamelToUnderline(list);
+        int total = new Long(new PageInfo(list).getTotal()).intValue();
+        return new TableDataInfo(underlineList,total,200,"获取成功");
+    }
+    /**
+     * 移动端 点击新增跳转的接口
+     * 入参 需要跳转的页面的页面id
+     * 返回值 需要跳转页面的html数据
+     */
+    @GetMapping("/queryMobileClickAddData/{formId}")
+    public AjaxResult queryMobileClickAddData(@PathVariable("formId") Long id){
+        MobilePageDesignData mobilePageDesignData = mobilePageDesignDataService.selectMobilePageDesignDataById(id);
+        return success(mobilePageDesignData);
+    }
+
+    /**
+     * 移动端 点击修改跳转的接口
+     * 入参 表单页面的id,需要跳转到的页面id,主键id(这一行数据的主键id)
+     * 返回值 需要跳转页面的html数据(查询数据并保存在html中)
+     */
+    @GetMapping("/queryMobileClickUpdateData/{pageId}/{formId}/{searchId}")
+    public AjaxResult queryMobileClickUpdateData(@PathVariable("pageId") Long pageId,@PathVariable("formId") Long formId,@PathVariable("searchId") Long searchId){
+        MobilePageDesignData fromDesignData = mobilePageDesignDataService.selectMobilePageDesignDataById(pageId);
+        MobilePageDesignData toDesignData = mobilePageDesignDataService.selectMobilePageDesignDataById(formId);
+        String htmlData = mobilePageDesignDataService.fillUpdateJsonPageData(fromDesignData,toDesignData,searchId);
+        toDesignData.setHtmlData(htmlData);
+        return success(toDesignData);
+    }
+    /**
+     * 移动端 新增数据的接口
+     * 入参 需要新增的该行数据 页面id
+     * 返回值 判断是否新增成功
+     */
+    @PostMapping("/normal/insertData")
+    public AjaxResult normalInsertData(@RequestBody MobilePageDesignDataNormalDTO mobilePageDesignDataInsertDTO){
+        // 根据id获取表名或者是直接传表名 后期选一个
+        Long pageId = mobilePageDesignDataInsertDTO.getPageId();
+        String sql = mobilePageDesignDataService.mapToInsertSql(mobilePageDesignDataInsertDTO.getDataMap(),pageId);
+        if (StringUtils.isBlank(sql)){
+            return error("新增失败,请联系管理员");
+        }
+        return success(mobilePageDesignDataService.executeInsertSql(sql));
+    }
+
+    /**
+     * 移动端 保存数据的接口
+     * 入参 需要新增的该行数据
+     * 返回值 判断是否保存成功
+     */
+    @PostMapping("/normal/updateData")
+    public AjaxResult normalUpdateData(@RequestBody MobilePageDesignDataNormalDTO mobilePageDesignDataInsertDTO){
+        Long pageId = mobilePageDesignDataInsertDTO.getPageId();
+        Map<String, Object> dataMap = mobilePageDesignDataInsertDTO.getDataMap();
+        String sql = mobilePageDesignDataService.mapToUpdateSql2(dataMap,pageId);
+        return success(mobilePageDesignDataService.executeUpdateSql(sql));
+    }
+
+    /**
+     * 移动端 通用删除接口
+     * 入参 页面id 该行的id
+     * 返回值 判断是否删除成功
+     * 整体逻辑和修改差不多,因为是逻辑删除
+     */
+    @PostMapping("/normal/deleteData")
+    public AjaxResult normalDeleteData(@RequestBody MobilePageDesignDataNormalDTO mobilePageDesignDataInsertDTO){
+        // 根据id获取表名或者是直接传表名 后期选一个
+        Long pageId = mobilePageDesignDataInsertDTO.getPageId();
+        String sql = mobilePageDesignDataService.mapToDeleteSql(mobilePageDesignDataInsertDTO.getLineId(),pageId);
+        if (StringUtils.isBlank(sql)){
+            return error("删除失败,请联系管理员");
+        }
+        return success(mobilePageDesignDataService.executeUpdateSql(sql));
+    }
+
+}

+ 135 - 0
zkqy-admin/src/main/java/com/zkqy/web/controller/mobilepage/MobilePageNavigationBarController.java

@@ -0,0 +1,135 @@
+package com.zkqy.web.controller.mobilepage;
+
+import java.util.List;
+import javax.servlet.http.HttpServletResponse;
+
+import com.zkqy.system.service.IMobilePageDesignDataService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.PutMapping;
+import org.springframework.web.bind.annotation.DeleteMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+import com.zkqy.common.annotation.Log;
+import com.zkqy.common.core.controller.BaseController;
+import com.zkqy.common.core.domain.AjaxResult;
+import com.zkqy.common.enums.BusinessType;
+import com.zkqy.system.entity.MobilePageNavigationBar;
+import com.zkqy.system.service.IMobilePageNavigationBarService;
+import com.zkqy.common.utils.poi.ExcelUtil;
+import com.zkqy.common.core.page.TableDataInfo;
+
+/**
+ * 移动端页面导航条设计Controller
+ *
+ * @author zkqy
+ * @date 2025-04-07
+ */
+@RestController
+@RequestMapping("/system/mobilePageNavigationBar")
+@Api(value = "/system/mobilePageNavigationBar", description = "移动端页面导航条设计-接口")
+public class MobilePageNavigationBarController extends BaseController
+{
+    @Autowired
+    private IMobilePageNavigationBarService mobilePageNavigationBarService;
+
+    @Autowired
+    private IMobilePageDesignDataService mobilePageDesignDataService;
+
+    /**
+     * 查询移动端页面导航条设计列表
+     */
+    //@PreAuthorize("@ss.hasPermi('system:mobilePageNavigationBar:list')")
+    @GetMapping("/list")
+    @ApiOperation(value = "查询移动端页面导航条设计列表")
+    public TableDataInfo list(MobilePageNavigationBar mobilePageNavigationBar)
+    {
+        startPage();
+        List<MobilePageNavigationBar> list = mobilePageNavigationBarService.selectMobilePageNavigationBarList(mobilePageNavigationBar);
+        return getDataTable(list);
+    }
+
+    /**
+     *
+     * 1.查询当前用户移动端全部导航条数据
+     * 2.导航条对应的表单的html页面(里面要对表格的内容进行额外的加载处理)
+     */
+    @GetMapping("/list/all")
+    @ApiOperation(value = "查询移动端页面导航条设计列表")
+    public AjaxResult listAll()
+    {
+        MobilePageNavigationBar mobilePageNavigationBar = new MobilePageNavigationBar();
+        List<MobilePageNavigationBar> list = mobilePageNavigationBarService.selectMobilePageNavigationBarList(mobilePageNavigationBar);
+        //检测是否有表格数据,如果有就填充
+//        for (MobilePageNavigationBar pageNavigationBar : list) {
+//            MobilePageDesignData filledTableComponentData = mobilePageDesignDataService.getFilledTableComponentData(pageNavigationBar.getPageId());
+//            pageNavigationBar.setMobilePageDesignData(filledTableComponentData);
+//        }
+        return AjaxResult.success(list);
+    }
+    /**
+     * 导出移动端页面导航条设计列表
+     */
+//    @PreAuthorize("@ss.hasPermi('system:mobilePageNavigationBar:export')")
+    @Log(title = "移动端页面导航条设计", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    @ApiOperation(value = "导出移动端页面导航条设计列表")
+    public void export(HttpServletResponse response, MobilePageNavigationBar mobilePageNavigationBar)
+    {
+        List<MobilePageNavigationBar> list = mobilePageNavigationBarService.selectMobilePageNavigationBarList(mobilePageNavigationBar);
+        ExcelUtil<MobilePageNavigationBar> util = new ExcelUtil<MobilePageNavigationBar>(MobilePageNavigationBar.class);
+        util.exportExcel(response, list, "移动端页面导航条设计数据");
+    }
+
+    /**
+     * 获取移动端页面导航条设计详细信息
+     */
+//    @PreAuthorize("@ss.hasPermi('system:mobilePageNavigationBar:query')")
+    @GetMapping(value = "/{id}")
+    @ApiOperation(value = "获取移动端页面导航条设计详细信息")
+    public AjaxResult getInfo(@PathVariable("id") Long id)
+    {
+        return success(mobilePageNavigationBarService.selectMobilePageNavigationBarById(id));
+    }
+
+    /**
+     * 新增移动端页面导航条设计
+     */
+//    @PreAuthorize("@ss.hasPermi('system:mobilePageNavigationBar:add')")
+    @Log(title = "移动端页面导航条设计", businessType = BusinessType.INSERT)
+    @PostMapping
+    @ApiOperation(value = "新增移动端页面导航条设计")
+    public AjaxResult add(@RequestBody MobilePageNavigationBar mobilePageNavigationBar)
+    {
+        return toAjax(mobilePageNavigationBarService.insertMobilePageNavigationBar(mobilePageNavigationBar));
+    }
+
+    /**
+     * 修改移动端页面导航条设计
+     */
+//    @PreAuthorize("@ss.hasPermi('system:mobilePageNavigationBar:edit')")
+    @Log(title = "移动端页面导航条设计", businessType = BusinessType.UPDATE)
+    @PutMapping
+    @ApiOperation(value = "修改移动端页面导航条设计")
+    public AjaxResult edit(@RequestBody MobilePageNavigationBar mobilePageNavigationBar)
+    {
+        return toAjax(mobilePageNavigationBarService.updateMobilePageNavigationBar(mobilePageNavigationBar));
+    }
+
+    /**
+     * 删除移动端页面导航条设计
+     */
+//    @PreAuthorize("@ss.hasPermi('system:mobilePageNavigationBar:remove')")
+    @Log(title = "移动端页面导航条设计", businessType = BusinessType.DELETE)
+    @DeleteMapping("/{ids}")
+    @ApiOperation(value = "删除移动端页面导航条设计")
+    public AjaxResult remove(@PathVariable Long[] ids)
+    {
+        return toAjax(mobilePageNavigationBarService.deleteMobilePageNavigationBarByIds(ids));
+    }
+}

+ 6 - 0
zkqy-common/pom.xml

@@ -177,6 +177,12 @@
             <version>2.5.0</version>
             <scope>compile</scope>
         </dependency>
+        <!--jsoup 页面分析依赖-->
+        <dependency>
+            <groupId>org.jsoup</groupId>
+            <artifactId>jsoup</artifactId>
+            <version>1.13.1</version>
+        </dependency>
 
     </dependencies>
 

+ 7 - 0
zkqy-common/src/main/java/com/zkqy/common/core/page/TableDataInfo.java

@@ -42,6 +42,13 @@ public class TableDataInfo implements Serializable
         this.rows = list;
         this.total = total;
     }
+    public TableDataInfo(List<?> list, int total,int code,String msg)
+    {
+        this.rows = list;
+        this.total = total;
+        this.code = code;
+        this.msg = msg;
+    }
 
     public long getTotal()
     {

+ 10 - 0
zkqy-common/src/main/java/com/zkqy/common/utils/CollectionUtil.java

@@ -28,5 +28,15 @@ public class CollectionUtil {
         }
         return null;
     }
+    // 复制集合,将驼峰转换成下划线
+    public static List<Map<String, Object>> copyListMapWithCamelToUnderline(List<Map<String, Object>> maps) {
+        List<Map<String, Object>> resMap = new ArrayList<>();
+        for (Map<String, Object> map : maps) {
+            HashMap<String, Object> tempMap = new HashMap<>();
+            map.forEach((s, o) -> tempMap.put(StringUtils.toUnderScoreCase(s),o));
+            resMap.add(tempMap);
+        }
+        return resMap;
+    }
 
 }

+ 136 - 0
zkqy-common/src/main/java/com/zkqy/common/utils/ProcessingSelectSqlUtil.java

@@ -0,0 +1,136 @@
+package com.zkqy.common.utils;
+
+import lombok.Builder;
+import lombok.Data;
+
+import java.util.List;
+import java.util.stream.Collectors;
+
+/**
+ * 由client端同步过来,最新同步日期 2025/4/14
+ */
+@Data
+public class ProcessingSelectSqlUtil {
+
+    private List<String> columns; //所有的列名
+
+    private String labelColumn; //label列
+    private String valueColumn; //value列
+    private String tableName;   //表名
+    private String querySql; //后续的查询条件sql
+
+    @Builder
+    public ProcessingSelectSqlUtil(List<String> columns, String labelColumn, String valueColumn, String tableName) {
+        this.columns = columns;
+        this.labelColumn = labelColumn;
+        this.valueColumn = valueColumn;
+        this.tableName = tableName;
+    }
+    @Builder
+    public ProcessingSelectSqlUtil(List<String> columns, String labelColumn, String valueColumn, String tableName,String querySql) {
+        this.columns = columns;
+        this.labelColumn = labelColumn;
+        this.valueColumn = valueColumn;
+        this.tableName = tableName;
+        this.querySql = querySql;
+    }
+    @Builder
+    public ProcessingSelectSqlUtil(String tableName) {
+        this.tableName = tableName;
+    }
+
+
+
+    /**
+     * 处理 label  和  value 中间拼接
+     * @return
+     */
+    public  String getSelectLabelValue(){
+        return columns.stream().map(
+                column -> {
+                    if (column.equals(valueColumn)) {
+                        System.out.println("Matched valueColumn: " + column);
+                        return column+","+ column + " as value";
+                    }
+                    if (column.equals(labelColumn)) {
+                        System.out.println("Matched labelColumn: " + column);
+                        return column+","+ column + " as label";
+                    }
+                    return column;
+                }
+        ).collect(Collectors.joining(","));
+    };
+
+
+    /**
+     * 处理别名拼接
+     * @return
+     */
+    public   String getSelectAll(){
+        return columns.stream().map(
+                column -> new StringBuilder(column).append(" as ")
+                        .append(tableName).append("_").append(column).toString()
+        ).collect(Collectors.joining(","));
+    };
+
+
+    /**
+     * 构建完整的SQL查询
+     * @return 完整的 SQL 查询字符串
+     */
+    public String buildFullLabelValueQuery() {
+        String selectPart = getSelectLabelValue();
+        return new StringBuilder("SELECT ")
+                .append(selectPart)
+                .append(" FROM ")
+                .append("{DBNAME}.")
+                .append(tableName)
+                .toString();
+    }
+
+    /**
+     * 构建完整的SQL查询
+     * @return 完整的 SQL 查询字符串
+     */
+    public String buildFullAllQuery() {
+        String selectPart = getSelectAll();
+        return new StringBuilder("SELECT ")
+                .append(selectPart)
+                .append(" FROM ")
+                .append(tableName)
+                .toString();
+    }
+
+    public String buildFullAllNoAs() {
+        //这里不用 as 作为转换
+        StringBuilder selectPartBuilder = new StringBuilder();
+        for (int i = 0; i < columns.size(); i++) {
+            selectPartBuilder.append(columns.get(i));
+            if (i < columns.size() - 1) {
+                selectPartBuilder.append(",");
+            }
+        }
+        String selectPart = selectPartBuilder.toString();
+        // 入参有问题
+        if (selectPart.endsWith(",")){
+            return "";
+        }
+        return new StringBuilder("SELECT ")
+                .append(selectPart)
+                .append(" FROM ")
+                .append(tableName)
+                .toString();
+    }
+    //这里直接返回下划线的返回结果就可以了
+    public String buildFullAllQueryWithQuerySQL() {
+        return new StringBuilder(buildFullAllNoAs())
+                .append(" where ").append(querySql)
+                .toString();
+    }
+    public String buildFullSelectAllQuerySql(){
+        return new StringBuilder("select *")
+                .append(" FROM  ")
+                .append(tableName)
+                .toString();
+    }
+}

+ 219 - 0
zkqy-system/src/main/java/com/zkqy/system/entity/MobilePageDesignData.java

@@ -0,0 +1,219 @@
+package com.zkqy.system.entity;
+
+import com.zkqy.common.core.domain.BaseEntity;
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+import com.zkqy.common.annotation.Excel;
+
+/**
+ * 新新页面设计对象 mobile_page_design_data
+ * 
+ * @author zkqy
+ * @date 2025-03-24
+ */
+public class MobilePageDesignData extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** 主键 */
+    private Long id;
+
+    /** 名称 */
+    @Excel(name = "名称")
+    private String name;
+
+    /** 页面json数据 */
+    @Excel(name = "组件生成规则")
+    private String pageJson;
+
+    /** 页面options数据 */
+    @Excel(name = "表单配置规则")
+    private String pageOptions;
+
+    /** 预览链接 */
+    @Excel(name = "预览链接")
+    private String pageLink;
+
+    @Excel(name = "组件数据")
+    private String componentData;
+
+    // URI编码后的数据,实际使用需要解码
+    @Excel(name = "html数据")
+    private String htmlData;
+
+    /** 创建者id */
+    @Excel(name = "创建者id")
+    private Long createById;
+
+    /** 更新者id */
+    @Excel(name = "更新者id")
+    private Long updateById;
+
+    /** 删除标志(0代表存在 2代表删除) */
+    private String delFlag;
+
+    /** 数据条审批状态(默认字段 0:已提交、1:已通过、2:不通过、3:未提交、4:驳回、5:审批中) */
+    @Excel(name = "数据条审批状态", readConverterExp = "默=认字段,0=:已提交、1:已通过、2:不通过、3:未提交、4:驳回、5:审批中")
+    private String dataApprovalStatus;
+
+    /** 流程编号 */
+    @Excel(name = "流程编号")
+    private String processKey;
+
+    /** 任务编码 */
+    @Excel(name = "任务编码")
+    private String taskProcessKey;
+
+    /** 任务节点编码 */
+    @Excel(name = "任务节点编码")
+    private String taskNodeKey;
+
+    public void setId(Long id) 
+    {
+        this.id = id;
+    }
+
+    public Long getId() 
+    {
+        return id;
+    }
+    public void setName(String name) 
+    {
+        this.name = name;
+    }
+
+    public String getName() 
+    {
+        return name;
+    }
+    public void setPageJson(String pageJson) 
+    {
+        this.pageJson = pageJson;
+    }
+
+    public String getPageJson() 
+    {
+        return pageJson;
+    }
+    public void setPageOptions(String pageOptions) 
+    {
+        this.pageOptions = pageOptions;
+    }
+
+    public String getPageOptions() 
+    {
+        return pageOptions;
+    }
+    public void setPageLink(String pageLink) 
+    {
+        this.pageLink = pageLink;
+    }
+
+    public String getPageLink() 
+    {
+        return pageLink;
+    }
+    public void setCreateById(Long createById) 
+    {
+        this.createById = createById;
+    }
+
+    public Long getCreateById() 
+    {
+        return createById;
+    }
+    public void setUpdateById(Long updateById) 
+    {
+        this.updateById = updateById;
+    }
+
+    public Long getUpdateById() 
+    {
+        return updateById;
+    }
+    public void setDelFlag(String delFlag) 
+    {
+        this.delFlag = delFlag;
+    }
+
+    public String getDelFlag() 
+    {
+        return delFlag;
+    }
+    public void setDataApprovalStatus(String dataApprovalStatus) 
+    {
+        this.dataApprovalStatus = dataApprovalStatus;
+    }
+
+    public String getDataApprovalStatus() 
+    {
+        return dataApprovalStatus;
+    }
+    public void setProcessKey(String processKey) 
+    {
+        this.processKey = processKey;
+    }
+
+    public String getProcessKey() 
+    {
+        return processKey;
+    }
+    public void setTaskProcessKey(String taskProcessKey) 
+    {
+        this.taskProcessKey = taskProcessKey;
+    }
+
+    public String getTaskProcessKey() 
+    {
+        return taskProcessKey;
+    }
+    public void setTaskNodeKey(String taskNodeKey) 
+    {
+        this.taskNodeKey = taskNodeKey;
+    }
+
+    public String getTaskNodeKey() 
+    {
+        return taskNodeKey;
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+            .append("id", getId())
+            .append("name", getName())
+            .append("pageJson", getPageJson())
+            .append("pageOptions", getPageOptions())
+            .append("pageLink", getPageLink())
+            .append("remark", getRemark())
+            .append("createById", getCreateById())
+            .append("createBy", getCreateBy())
+            .append("createTime", getCreateTime())
+            .append("updateById", getUpdateById())
+            .append("updateBy", getUpdateBy())
+            .append("updateTime", getUpdateTime())
+            .append("delFlag", getDelFlag())
+            .append("dataApprovalStatus", getDataApprovalStatus())
+            .append("processKey", getProcessKey())
+            .append("taskProcessKey", getTaskProcessKey())
+            .append("taskNodeKey", getTaskNodeKey())
+            .toString();
+    }
+
+    public String getComponentData() {
+        return componentData;
+    }
+
+    public void setComponentData(String componentData) {
+        this.componentData = componentData;
+    }
+
+    public String getHtmlData() {
+        return htmlData;
+    }
+
+    public void setHtmlData(String htmlData) {
+        this.htmlData = htmlData;
+    }
+
+}

+ 219 - 0
zkqy-system/src/main/java/com/zkqy/system/entity/MobilePageNavigationBar.java

@@ -0,0 +1,219 @@
+package com.zkqy.system.entity;
+
+import com.zkqy.common.core.domain.BaseEntity;
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+import com.zkqy.common.annotation.Excel;
+
+/**
+ * 移动端页面导航条设计对象 mobile_page_navigation_bar
+ * 
+ * @author zkqy
+ * @date 2025-04-07
+ */
+public class MobilePageNavigationBar extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** 主键 */
+    private Long id;
+
+    /** 导航条名称 */
+    @Excel(name = "导航条名称")
+    private String name;
+
+    /** 导航条类型 */
+    @Excel(name = "导航条类型")
+    private String type;
+
+    /** 导航条顺序 */
+    @Excel(name = "导航条顺序")
+    private String barOrder;
+
+    /** 绑定页面id */
+    @Excel(name = "绑定页面id")
+    private Long pageId;
+
+    /** 绑定页面名称 */
+    @Excel(name = "绑定页面名称")
+    private String pageName;
+
+    /** 创建者id */
+    @Excel(name = "创建者id")
+    private Long createById;
+
+    /** 更新者id */
+    @Excel(name = "更新者id")
+    private Long updateById;
+
+    /** 删除标志(0代表存在 2代表删除) */
+    private String delFlag;
+
+    /** 数据条审批状态(默认字段 0:已提交、1:已通过、2:不通过、3:未提交、4:驳回、5:审批中) */
+    @Excel(name = "数据条审批状态", readConverterExp = "默=认字段,0=:已提交、1:已通过、2:不通过、3:未提交、4:驳回、5:审批中")
+    private String dataApprovalStatus;
+
+    /** 流程编号 */
+    @Excel(name = "流程编号")
+    private String processKey;
+
+    /** 任务编码 */
+    @Excel(name = "任务编码")
+    private String taskProcessKey;
+
+    /** 任务节点编码 */
+    @Excel(name = "任务节点编码")
+    private String taskNodeKey;
+
+    private MobilePageDesignData mobilePageDesignData;
+
+    public void setId(Long id) 
+    {
+        this.id = id;
+    }
+
+    public Long getId() 
+    {
+        return id;
+    }
+    public void setName(String name) 
+    {
+        this.name = name;
+    }
+
+    public String getName() 
+    {
+        return name;
+    }
+    public void setType(String type) 
+    {
+        this.type = type;
+    }
+
+    public String getType() 
+    {
+        return type;
+    }
+    public void setBarOrder(String barOrder) 
+    {
+        this.barOrder = barOrder;
+    }
+
+    public String getBarOrder() 
+    {
+        return barOrder;
+    }
+    public void setPageId(Long pageId) 
+    {
+        this.pageId = pageId;
+    }
+
+    public Long getPageId() 
+    {
+        return pageId;
+    }
+    public void setPageName(String pageName) 
+    {
+        this.pageName = pageName;
+    }
+
+    public String getPageName() 
+    {
+        return pageName;
+    }
+    public void setCreateById(Long createById) 
+    {
+        this.createById = createById;
+    }
+
+    public Long getCreateById() 
+    {
+        return createById;
+    }
+    public void setUpdateById(Long updateById) 
+    {
+        this.updateById = updateById;
+    }
+
+    public Long getUpdateById() 
+    {
+        return updateById;
+    }
+    public void setDelFlag(String delFlag) 
+    {
+        this.delFlag = delFlag;
+    }
+
+    public String getDelFlag() 
+    {
+        return delFlag;
+    }
+    public void setDataApprovalStatus(String dataApprovalStatus) 
+    {
+        this.dataApprovalStatus = dataApprovalStatus;
+    }
+
+    public String getDataApprovalStatus() 
+    {
+        return dataApprovalStatus;
+    }
+    public void setProcessKey(String processKey) 
+    {
+        this.processKey = processKey;
+    }
+
+    public String getProcessKey() 
+    {
+        return processKey;
+    }
+    public void setTaskProcessKey(String taskProcessKey) 
+    {
+        this.taskProcessKey = taskProcessKey;
+    }
+
+    public String getTaskProcessKey() 
+    {
+        return taskProcessKey;
+    }
+    public void setTaskNodeKey(String taskNodeKey) 
+    {
+        this.taskNodeKey = taskNodeKey;
+    }
+
+    public String getTaskNodeKey() 
+    {
+        return taskNodeKey;
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+            .append("id", getId())
+            .append("name", getName())
+            .append("type", getType())
+            .append("barOrder", getBarOrder())
+            .append("pageId", getPageId())
+            .append("pageName", getPageName())
+            .append("remark", getRemark())
+            .append("createById", getCreateById())
+            .append("createBy", getCreateBy())
+            .append("createTime", getCreateTime())
+            .append("updateById", getUpdateById())
+            .append("updateBy", getUpdateBy())
+            .append("updateTime", getUpdateTime())
+            .append("delFlag", getDelFlag())
+            .append("dataApprovalStatus", getDataApprovalStatus())
+            .append("processKey", getProcessKey())
+            .append("taskProcessKey", getTaskProcessKey())
+            .append("taskNodeKey", getTaskNodeKey())
+            .toString();
+    }
+
+    public MobilePageDesignData getMobilePageDesignData() {
+        return mobilePageDesignData;
+    }
+
+    public void setMobilePageDesignData(MobilePageDesignData mobilePageDesignData) {
+        this.mobilePageDesignData = mobilePageDesignData;
+    }
+}

+ 47 - 0
zkqy-system/src/main/java/com/zkqy/system/entity/dto/MobilePageDesignDataNormalDTO.java

@@ -0,0 +1,47 @@
+package com.zkqy.system.entity.dto;
+
+import java.util.Map;
+
+public class MobilePageDesignDataNormalDTO {
+
+
+    private Map<String,Object> dataMap;
+
+    private String tableName;
+
+    private Long lineId;
+
+    private Long pageId;
+
+    public Map<String, Object> getDataMap() {
+        return dataMap;
+    }
+
+    public void setDataMap(Map<String, Object> dataMap) {
+        this.dataMap = dataMap;
+    }
+
+    public String getTableName() {
+        return tableName;
+    }
+
+    public void setTableName(String tableName) {
+        this.tableName = tableName;
+    }
+
+    public Long getLineId() {
+        return lineId;
+    }
+
+    public void setLineId(Long lineId) {
+        this.lineId = lineId;
+    }
+
+    public Long getPageId() {
+        return pageId;
+    }
+
+    public void setPageId(Long pageId) {
+        this.pageId = pageId;
+    }
+}

+ 69 - 0
zkqy-system/src/main/java/com/zkqy/system/mapper/MobilePageDesignDataMapper.java

@@ -0,0 +1,69 @@
+package com.zkqy.system.mapper;
+
+import java.util.List;
+import java.util.Map;
+
+import com.zkqy.system.entity.MobilePageDesignData;
+import org.apache.ibatis.annotations.Param;
+
+/**
+ * 新新页面设计Mapper接口
+ * 
+ * @author zkqy
+ * @date 2025-03-24
+ */
+public interface MobilePageDesignDataMapper 
+{
+    /**
+     * 查询新新页面设计
+     * 
+     * @param id 新新页面设计主键
+     * @return 新新页面设计
+     */
+    public MobilePageDesignData selectMobilePageDesignDataById(Long id);
+
+    /**
+     * 查询新新页面设计列表
+     * 
+     * @param mobilePageDesignData 新新页面设计
+     * @return 新新页面设计集合
+     */
+    public List<MobilePageDesignData> selectMobilePageDesignDataList(MobilePageDesignData mobilePageDesignData);
+
+    /**
+     * 新增新新页面设计
+     * 
+     * @param mobilePageDesignData 新新页面设计
+     * @return 结果
+     */
+    public int insertMobilePageDesignData(MobilePageDesignData mobilePageDesignData);
+
+    /**
+     * 修改新新页面设计
+     * 
+     * @param mobilePageDesignData 新新页面设计
+     * @return 结果
+     */
+    public int updateMobilePageDesignData(MobilePageDesignData mobilePageDesignData);
+
+    /**
+     * 删除新新页面设计
+     * 
+     * @param id 新新页面设计主键
+     * @return 结果
+     */
+    public int deleteMobilePageDesignDataById(Long id);
+
+    /**
+     * 批量删除新新页面设计
+     * 
+     * @param ids 需要删除的数据主键集合
+     * @return 结果
+     */
+    public int deleteMobilePageDesignDataByIds(Long[] ids);
+
+    List<Map<String, Object>> executeQuerySql(@Param("executeSql") String executeSql);
+    int executeUpdateSql(@Param("executeSql") String executeSql);
+    int executeInsertSql(@Param("executeSql") String executeSql);
+    int executeDeleteSql(@Param("executeSql") String executeSql);
+}

+ 61 - 0
zkqy-system/src/main/java/com/zkqy/system/mapper/MobilePageNavigationBarMapper.java

@@ -0,0 +1,61 @@
+package com.zkqy.system.mapper;
+
+import java.util.List;
+import com.zkqy.system.entity.MobilePageNavigationBar;
+
+/**
+ * 移动端页面导航条设计Mapper接口
+ * 
+ * @author zkqy
+ * @date 2025-04-07
+ */
+public interface MobilePageNavigationBarMapper 
+{
+    /**
+     * 查询移动端页面导航条设计
+     * 
+     * @param id 移动端页面导航条设计主键
+     * @return 移动端页面导航条设计
+     */
+    public MobilePageNavigationBar selectMobilePageNavigationBarById(Long id);
+
+    /**
+     * 查询移动端页面导航条设计列表
+     * 
+     * @param mobilePageNavigationBar 移动端页面导航条设计
+     * @return 移动端页面导航条设计集合
+     */
+    public List<MobilePageNavigationBar> selectMobilePageNavigationBarList(MobilePageNavigationBar mobilePageNavigationBar);
+
+    /**
+     * 新增移动端页面导航条设计
+     * 
+     * @param mobilePageNavigationBar 移动端页面导航条设计
+     * @return 结果
+     */
+    public int insertMobilePageNavigationBar(MobilePageNavigationBar mobilePageNavigationBar);
+
+    /**
+     * 修改移动端页面导航条设计
+     * 
+     * @param mobilePageNavigationBar 移动端页面导航条设计
+     * @return 结果
+     */
+    public int updateMobilePageNavigationBar(MobilePageNavigationBar mobilePageNavigationBar);
+
+    /**
+     * 删除移动端页面导航条设计
+     * 
+     * @param id 移动端页面导航条设计主键
+     * @return 结果
+     */
+    public int deleteMobilePageNavigationBarById(Long id);
+
+    /**
+     * 批量删除移动端页面导航条设计
+     * 
+     * @param ids 需要删除的数据主键集合
+     * @return 结果
+     */
+    public int deleteMobilePageNavigationBarByIds(Long[] ids);
+}

+ 87 - 0
zkqy-system/src/main/java/com/zkqy/system/service/IMobilePageDesignDataService.java

@@ -0,0 +1,87 @@
+package com.zkqy.system.service;
+
+import java.util.List;
+import java.util.Map;
+
+import com.zkqy.system.entity.MobilePageDesignData;
+import com.zkqy.system.entity.MobilePageNavigationBar;
+
+/**
+ * 新新页面设计Service接口
+ * 
+ * @author zkqy
+ * @date 2025-03-24
+ */
+public interface IMobilePageDesignDataService 
+{
+    /**
+     * 查询新新页面设计
+     * 
+     * @param id 新新页面设计主键
+     * @return 新新页面设计
+     */
+    public MobilePageDesignData selectMobilePageDesignDataById(Long id);
+
+    /**
+     * 查询新新页面设计列表
+     * 
+     * @param mobilePageDesignData 新新页面设计
+     * @return 新新页面设计集合
+     */
+    public List<MobilePageDesignData> selectMobilePageDesignDataList(MobilePageDesignData mobilePageDesignData);
+
+    /**
+     * 新增新新页面设计
+     * 
+     * @param mobilePageDesignData 新新页面设计
+     * @return 结果
+     */
+    public int insertMobilePageDesignData(MobilePageDesignData mobilePageDesignData);
+
+    /**
+     * 修改新新页面设计
+     * 
+     * @param mobilePageDesignData 新新页面设计
+     * @return 结果
+     */
+    public int updateMobilePageDesignData(MobilePageDesignData mobilePageDesignData);
+
+    /**
+     * 批量删除新新页面设计
+     * 
+     * @param ids 需要删除的新新页面设计主键集合
+     * @return 结果
+     */
+    public int deleteMobilePageDesignDataByIds(Long[] ids);
+
+    /**
+     * 删除新新页面设计信息
+     * 
+     * @param id 新新页面设计主键
+     * @return 结果
+     */
+    public int deleteMobilePageDesignDataById(Long id);
+
+    String getTableNameByPageOptions(String pageOptions);
+
+    List<Map<String, Object>> executeQuerySql(String fullQuerySql);
+
+    int executeUpdateSql(String fullQuerySql);
+
+    int executeInsertSql(String fullQuerySql);
+
+    int executeDeleteSql(String fullQuerySql);
+
+    String fillUpdateJsonPageData(MobilePageDesignData fromDesignData, MobilePageDesignData toDesignData, Long searchId);
+
+    String mapToInsertSql(Map<String, Object> dataMap, Long pageId);
+
+    String mapToUpdateSql2(Map<String, Object> dataMap, Long pageId);
+
+    String mapToDeleteSql(Long lineId, Long pageId);
+
+    String mapToQuerySql(String pageJson);
+
+    void fillPageIdToHtmlData(MobilePageDesignData mobilePageDesignData);
+
+}

+ 62 - 0
zkqy-system/src/main/java/com/zkqy/system/service/IMobilePageNavigationBarService.java

@@ -0,0 +1,62 @@
+package com.zkqy.system.service;
+
+import java.util.List;
+import com.zkqy.system.entity.MobilePageNavigationBar;
+
+
+/**
+ * 移动端页面导航条设计Service接口
+ * 
+ * @author zkqy
+ * @date 2025-04-07
+ */
+public interface IMobilePageNavigationBarService 
+{
+    /**
+     * 查询移动端页面导航条设计
+     * 
+     * @param id 移动端页面导航条设计主键
+     * @return 移动端页面导航条设计
+     */
+    public MobilePageNavigationBar selectMobilePageNavigationBarById(Long id);
+
+    /**
+     * 查询移动端页面导航条设计列表
+     * 
+     * @param mobilePageNavigationBar 移动端页面导航条设计
+     * @return 移动端页面导航条设计集合
+     */
+    public List<MobilePageNavigationBar> selectMobilePageNavigationBarList(MobilePageNavigationBar mobilePageNavigationBar);
+
+    /**
+     * 新增移动端页面导航条设计
+     * 
+     * @param mobilePageNavigationBar 移动端页面导航条设计
+     * @return 结果
+     */
+    public int insertMobilePageNavigationBar(MobilePageNavigationBar mobilePageNavigationBar);
+
+    /**
+     * 修改移动端页面导航条设计
+     * 
+     * @param mobilePageNavigationBar 移动端页面导航条设计
+     * @return 结果
+     */
+    public int updateMobilePageNavigationBar(MobilePageNavigationBar mobilePageNavigationBar);
+
+    /**
+     * 批量删除移动端页面导航条设计
+     * 
+     * @param ids 需要删除的移动端页面导航条设计主键集合
+     * @return 结果
+     */
+    public int deleteMobilePageNavigationBarByIds(Long[] ids);
+
+    /**
+     * 删除移动端页面导航条设计信息
+     * 
+     * @param id 移动端页面导航条设计主键
+     * @return 结果
+     */
+    public int deleteMobilePageNavigationBarById(Long id);
+}

+ 570 - 0
zkqy-system/src/main/java/com/zkqy/system/service/impl/MobilePageDesignDataServiceImpl.java

@@ -0,0 +1,570 @@
+package com.zkqy.system.service.impl;
+
+import java.io.UnsupportedEncodingException;
+import java.net.URLDecoder;
+import java.net.URLEncoder;
+import java.util.*;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+import java.util.stream.Collectors;
+
+import com.alibaba.fastjson2.JSON;
+import com.alibaba.fastjson2.JSONArray;
+import com.alibaba.fastjson2.JSONObject;
+import com.zkqy.common.utils.CollectionUtil;
+import com.zkqy.common.utils.DateUtils;
+import com.zkqy.common.utils.StringUtils;
+import com.zkqy.system.entity.vo.MobilePageDesignDataSubTableVo;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import com.zkqy.system.mapper.MobilePageDesignDataMapper;
+import com.zkqy.system.entity.MobilePageDesignData;
+import com.zkqy.system.service.IMobilePageDesignDataService;
+import org.jsoup.select.Elements;
+import org.jsoup.Jsoup;
+import org.jsoup.nodes.Document;
+import org.jsoup.nodes.Element;
+
+/**
+ * 新新页面设计Service业务层处理
+ * 
+ * @author zkqy
+ * @date 2025-03-24
+ */
+@Service
+public class MobilePageDesignDataServiceImpl implements IMobilePageDesignDataService 
+{
+    private static final Logger log = LoggerFactory.getLogger(MobilePageDesignDataServiceImpl.class);
+    private static final String TABLE_TYPE = "zkqyTable";
+    @Autowired
+    private MobilePageDesignDataMapper mobilePageDesignDataMapper;
+
+    /**
+     * 查询新新页面设计
+     * 
+     * @param id 新新页面设计主键
+     * @return 新新页面设计
+     */
+    @Override
+    public MobilePageDesignData selectMobilePageDesignDataById(Long id)
+    {
+        return mobilePageDesignDataMapper.selectMobilePageDesignDataById(id);
+    }
+
+    /**
+     * 查询新新页面设计列表
+     * 
+     * @param mobilePageDesignData 新新页面设计
+     * @return 新新页面设计
+     */
+    @Override
+    public List<MobilePageDesignData> selectMobilePageDesignDataList(MobilePageDesignData mobilePageDesignData)
+    {
+        return mobilePageDesignDataMapper.selectMobilePageDesignDataList(mobilePageDesignData);
+    }
+
+    /**
+     * 新增新新页面设计
+     * 
+     * @param mobilePageDesignData 新新页面设计
+     * @return 结果
+     */
+    @Override
+    public int insertMobilePageDesignData(MobilePageDesignData mobilePageDesignData)
+    {
+        mobilePageDesignData.setCreateTime(DateUtils.getNowDate());
+        return mobilePageDesignDataMapper.insertMobilePageDesignData(mobilePageDesignData);
+    }
+
+    /**
+     * 修改新新页面设计
+     * 
+     * @param mobilePageDesignData 新新页面设计
+     * @return 结果
+     */
+    @Override
+    public int updateMobilePageDesignData(MobilePageDesignData mobilePageDesignData)
+    {
+        mobilePageDesignData.setUpdateTime(DateUtils.getNowDate());
+        return mobilePageDesignDataMapper.updateMobilePageDesignData(mobilePageDesignData);
+    }
+
+    /**
+     * 批量删除新新页面设计
+     * 
+     * @param ids 需要删除的新新页面设计主键
+     * @return 结果
+     */
+    @Override
+    public int deleteMobilePageDesignDataByIds(Long[] ids)
+    {
+        return mobilePageDesignDataMapper.deleteMobilePageDesignDataByIds(ids);
+    }
+
+    /**
+     * 删除新新页面设计信息
+     * 
+     * @param id 新新页面设计主键
+     * @return 结果
+     */
+    @Override
+    public int deleteMobilePageDesignDataById(Long id)
+    {
+        return mobilePageDesignDataMapper.deleteMobilePageDesignDataById(id);
+    }
+
+    @Override
+    public String getTableNameByPageOptions(String pageOptions) {
+        JSONObject jsonObject = JSONObject.parseObject(pageOptions);
+        JSONObject formJsonObject = jsonObject.getJSONObject("form");
+        if (formJsonObject == null){
+            return "";
+        }
+        String o = (String) formJsonObject.get("formInDatabase");
+        if (StringUtils.isBlank(o)){
+            return "";
+        }
+        return o;
+    }
+
+    @Override
+    public List<Map<String, Object>> executeQuerySql(String fullQuerySql) {
+        return mobilePageDesignDataMapper.executeQuerySql(fullQuerySql);
+    }
+    @Override
+    public int executeUpdateSql(String fullQuerySql) {
+        return mobilePageDesignDataMapper.executeUpdateSql(fullQuerySql);
+    }
+
+    @Override
+    public int executeInsertSql(String fullQuerySql) {
+        return mobilePageDesignDataMapper.executeInsertSql(fullQuerySql);
+    }
+    @Override
+    public int executeDeleteSql(String fullQuerySql) {
+        return mobilePageDesignDataMapper.executeDeleteSql(fullQuerySql);
+    }
+
+
+    @Override
+    public String fillUpdateJsonPageData(MobilePageDesignData fromDesignData,MobilePageDesignData toDesignData, Long searchId) {
+        //得到列名 + 表名
+        String primaryTable = findPrimaryTableByPageJson(fromDesignData.getPageJson());
+        String querySqlWhere = String.format(" and %s.id = %d",primaryTable,searchId);
+        String pageJson = toDesignData.getPageJson();
+        JSONArray columns = JSONArray.parseArray(pageJson);
+        // 构建SELECT部分
+        String selectSql = buildSelectClause(columns);
+        // 构建FROM和JOIN部分
+        String fromSql = buildFromClause(columns);
+        // 构建where部分
+        String whereSql = " where " + primaryTable +".del_flag='0'";
+        String querySql = selectSql + " " + fromSql + whereSql ;
+
+        if (StringUtils.isBlank(querySql)){
+            return "输入框绑定字段有问题";
+        }
+        List<Map<String, Object>> mapsList = mobilePageDesignDataMapper.executeQuerySql(querySql);
+        List<Map<String, Object>> mapListUnderLine = CollectionUtil.copyListMapWithCamelToUnderline(mapsList);
+        //因为有id传参,这里只会有1条数据
+        Map<String, Object> maps = mapListUnderLine.get(0);
+        //先解析html,然后往html里面填数据,这里的html需要解码才能使用
+        String htmlDecode = null;
+        try {
+            htmlDecode = URLDecoder.decode(toDesignData.getHtmlData(),"UTF-8");
+        } catch (UnsupportedEncodingException e) {
+            log.info("html的解码失败");
+            throw new RuntimeException(e);
+        }
+        Document doc = Jsoup.parse(htmlDecode);
+        Elements scripts = doc.select("script");
+
+        for (Element script : scripts) {
+            String scriptContent = script.html();
+            if (scriptContent.contains("rule: formCreate.parseJson")) {
+                // 提取rule部分 这里后期可能提取方式会变。
+                int startIndex = scriptContent.indexOf("rule: formCreate.parseJson('") + "rule: formCreate.parseJson('".length();
+                int endIndex = scriptContent.indexOf("')", startIndex);
+                String oldRuleJson = scriptContent.substring(startIndex, endIndex);
+                // 里面的每一个对象代表着每一个组件
+                JSONArray jsonArray = JSONArray.parseArray(oldRuleJson);
+                for (int i = 0; i < jsonArray.size(); i++) {
+                    JSONObject jsonObject = jsonArray.getJSONObject(i);
+                    String field = (String) jsonObject.get("searchValue");
+                    if (field == null || field.equals("")){
+                        continue;
+                    }
+                    //从结果的map中遍历,得到结果
+//                    for (Map<String, String> map : maps) {
+                    Object fieldValue = maps.get(field);
+                    if (fieldValue != null && !String.valueOf(fieldValue).equals("")&& StringUtils.isNotBlank(String.valueOf(fieldValue))){
+                        jsonObject.put("value",fieldValue);
+                    }
+//                    }
+                }
+                //替换html的rule数据
+                htmlDecode = htmlDecode.replace(
+                        "rule: formCreate.parseJson('" + oldRuleJson + "')",
+                        "rule: formCreate.parseJson('" + jsonArray + "')"
+                );
+            }
+        }
+        if (StringUtils.isBlank(htmlDecode)){
+            return toDesignData.getHtmlData();
+        }
+        String htmlEncode = "";
+        // 结果加密返回
+        try {
+            htmlEncode = URLEncoder.encode(htmlDecode, "UTF-8");
+            htmlEncode = htmlEncode.replaceAll("\\+", "%20");
+        } catch (UnsupportedEncodingException e) {
+            System.out.println("html加密失败");
+            throw new RuntimeException(e);
+        }
+        return htmlEncode;
+    }
+
+
+    @Override
+    public String mapToInsertSql(Map<String, Object> dataMap, Long pageId) {
+        MobilePageDesignData mobilePageDesignData = selectMobilePageDesignDataById(pageId);
+        String pageJson = mobilePageDesignData.getPageJson();
+        JSONArray pageConfigs = JSON.parseArray(pageJson);
+        for (JSONObject pageConfig : pageConfigs.toJavaList(JSONObject.class)) {
+            JSONArray columns = pageConfig.getJSONArray("columns");
+            String primaryTableName = findPrimaryTable(columns);
+            Map<String, MobilePageDesignDataSubTableVo> subTableMap = findSubTableMap(columns);
+            // 得到哪几个表需要新增数据 根据数据封装成新的map
+            /// key为表名,value为对应字段以及值
+            Map<String, Map<String, Object>> resultMap = new HashMap<>();
+
+            for (Map.Entry<String, Object> entry : dataMap.entrySet()) {
+                String key = entry.getKey();
+                Object value = entry.getValue();
+
+                // 按第一个下划线分割key
+                int underscoreIndex = key.indexOf('@');
+                if (underscoreIndex > 0) {
+                    String prefix = key.substring(0, underscoreIndex);
+                    resultMap.computeIfAbsent(prefix, k -> new HashMap<>())
+                            .put(key.substring(underscoreIndex + 1), value);
+                }
+            }
+            //构建 构建insert
+            StringBuilder sqlBuilder = new StringBuilder();
+            Map<String, Object> primaryMap = resultMap.get(primaryTableName);
+            resultMap.remove(primaryTableName);
+            List<String> extraList = new ArrayList<>();
+            for (Map.Entry<String, Map<String, Object>> entry : resultMap.entrySet()) {
+                String tableName = entry.getKey(); // 如 "stu"
+                Map<String, Object> fieldMap = entry.getValue();
+
+                // 收集字段名和值(不再截断字段名前缀)
+                List<String> fields = new ArrayList<>();
+                List<String> values = new ArrayList<>();
+
+                for (Map.Entry<String, Object> fieldEntry : fieldMap.entrySet()) {
+                    String fieldName = fieldEntry.getKey(); // 直接使用完整字段名,如 "stu_name"
+                    Object fieldValue = fieldEntry.getValue();
+                    fields.add(fieldName);
+                    values.add(processFieldValue(fieldValue));
+                }
+                // 构建 INSERT SQL
+                sqlBuilder.append("INSERT INTO ")
+                        .append("{DBNAME}.").append(tableName)
+                        .append(" (")
+                        .append(String.join(", ", fields))
+                        .append(") VALUES (")
+                        .append(String.join(", ", values))
+                        .append(");\n");
+                MobilePageDesignDataSubTableVo subTableVo = subTableMap.get(tableName);
+                // 得到最新的一个id,最后主表关联的时候会用到
+                extraList.add(subTableVo.getPrimaryKey());
+                sqlBuilder.append("SET @").append(subTableVo.getPrimaryKey()).append("= LAST_INSERT_ID();\n");
+            }
+            sqlBuilder.append(generateInsertSql(primaryTableName, primaryMap, extraList));
+            return sqlBuilder.toString();
+        }
+        return null;
+    }
+
+    public String mapToUpdateSql2(Map<String, Object> dataMap, Long pageId){
+        // 查找出所有需要修改的子表 和 主表
+        MobilePageDesignData mobilePageDesignData = selectMobilePageDesignDataById(pageId);
+        String pageJson = mobilePageDesignData.getPageJson();
+        JSONArray pageConfigs = JSON.parseArray(pageJson);
+        String fullUpdateSql = "";
+        for (JSONObject pageConfig : pageConfigs.toJavaList(JSONObject.class)) {
+            JSONArray columns = pageConfig.getJSONArray("columns");
+            String primaryTable = findPrimaryTable(columns);
+            Map<String, MobilePageDesignDataSubTableVo> subTableMap = findSubTableMap(columns);
+            // 分三段拼接出 update set 和 where 语法
+            List<String> collect = subTableMap.keySet().stream().collect(Collectors.toList());
+            StringBuilder update = new StringBuilder("UPDATE ")
+                    .append("{DBNAME}.").append(primaryTable);
+            collect.forEach(tableName -> update.append(",").append("{DBNAME}.").append(tableName));
+            String updateSql = update.toString();
+            //从datamap中提取出 where判断的id
+            Number id = (Number) dataMap.get(primaryTable + "@id");
+            dataMap.remove(primaryTable + "@id");
+            Map<String, Object> stringObjectMap = convertKeysFromFirstUnderLineToDot(dataMap);
+            String setSql = " SET " + stringObjectMap.entrySet().stream()
+                    .map(entry -> entry.getKey() + "='" + entry.getValue()+"'")
+                    .collect(Collectors.joining(", ")); // 自动处理逗号分隔
+            // 拼接 where条件 (关联的表 + 主键该行的id)
+            String idSql = primaryTable +".id" +"=" + id;
+            String whereSql = subTableMap.entrySet().stream()
+                    .map(entry -> primaryTable + "." + entry.getValue().getPrimaryKey() +
+                            "=" + entry.getKey() + "." + entry.getValue().getSubKey())
+                    .collect(Collectors.joining(" and ")) ;
+            whereSql = " where " + (StringUtils.isBlank(whereSql) ? idSql : whereSql + " and " + idSql);
+            fullUpdateSql = updateSql + setSql + whereSql;
+        }
+        return fullUpdateSql;
+    }
+
+    @Override
+    public String mapToDeleteSql(Long lineId, Long pageId) {
+        // 查找出所有需要修改的子表 和 主表
+        MobilePageDesignData mobilePageDesignData = selectMobilePageDesignDataById(pageId);
+        String pageJson = mobilePageDesignData.getPageJson();
+        JSONArray pageConfigs = JSON.parseArray(pageJson);
+        String fullUpdateSql = "";
+        for (JSONObject pageConfig : pageConfigs.toJavaList(JSONObject.class)) {
+            JSONArray columns = pageConfig.getJSONArray("columns");
+            String primaryTable = findPrimaryTable(columns);
+            Map<String, MobilePageDesignDataSubTableVo> subTableMap = findSubTableMap(columns);
+            // 分三段拼接出 update set 和 where 语法
+            List<String> collect = subTableMap.keySet().stream().collect(Collectors.toList());
+            StringBuilder update = new StringBuilder("UPDATE ")
+                    .append("{DBNAME}.").append(primaryTable);
+            collect.forEach(tableName -> update.append(",").append("{DBNAME}.").append(tableName));
+            String updateSql = update.toString();
+            String DELFLAG = ".del_flag = '2' ";
+            String setSQL = " SET " + primaryTable + DELFLAG + " ";
+            subTableMap.entrySet().stream()
+                    .map(entry -> setSQL + entry.getKey() + DELFLAG)
+                    .collect(Collectors.joining(", "));
+            // 拼接 where条件 (关联的表 + 主键该行的id)
+            String idSql = primaryTable +".id" +"=" + lineId;
+            String whereSql = subTableMap.entrySet().stream()
+                    .map(entry -> primaryTable + "." + entry.getValue().getPrimaryKey() +
+                            "=" + entry.getKey() + "." + entry.getValue().getSubKey())
+                    .collect(Collectors.joining(" and "));
+            whereSql = " where " + (StringUtils.isBlank(whereSql) ? idSql : whereSql + " and " + idSql);
+            fullUpdateSql = updateSql + setSQL + whereSql;
+        }
+        return fullUpdateSql;
+    }
+
+    @Override
+    public String mapToQuerySql(String pageJson) {
+        JSONArray pageConfigs = JSON.parseArray(pageJson);
+        String querySql = "";
+        for (JSONObject pageConfig : pageConfigs.toJavaList(JSONObject.class)) {
+            JSONArray columns = pageConfig.getJSONArray("columns");
+            if (columns == null || columns.isEmpty()) {
+                continue;
+            }
+
+            // 构建SELECT部分
+            String selectSql = buildSelectClause(columns);
+            // 构建FROM和JOIN部分
+            String fromSql = buildFromClause(columns);
+            // 构建where部分
+            String primaryTable = findPrimaryTable(columns);
+            String whereSql = " where " + primaryTable +".del_flag='0'";
+            querySql = selectSql + " " + fromSql + whereSql ;
+        }
+        return querySql;
+    }
+
+    @Override
+    public void fillPageIdToHtmlData(MobilePageDesignData mobilePageDesignData) {
+        Long id = mobilePageDesignData.getId();
+        String htmlData = mobilePageDesignData.getHtmlData();
+        htmlData = URLDecoder.decode(htmlData);
+        Pattern pattern = Pattern.compile("options:\\s*formCreate\\.parseJson\\('(.*?)'\\)");
+        Matcher matcher = pattern.matcher(htmlData);
+
+        if (!matcher.find()) {
+            throw new IllegalArgumentException("无法在HTML中找到options JSON");
+        }
+
+        String oldJsonStr = matcher.group(1);
+        JSONObject jsonObject = JSONObject.parseObject(oldJsonStr);
+        JSONObject form = jsonObject.getJSONObject("form");
+        form.put("pageId",id);
+        jsonObject.put("form",form);
+        String newJsonStr = jsonObject.toString();
+        String newHtmlData = htmlData.replace(oldJsonStr,newJsonStr);
+        String encodeHtml = "";
+        try {
+            encodeHtml = URLEncoder.encode(newHtmlData, "UTF-8");
+            encodeHtml = encodeHtml.replaceAll("\\+", "%20");
+        } catch (UnsupportedEncodingException e) {
+            throw new RuntimeException(e);
+        }
+        mobilePageDesignData.setHtmlData(encodeHtml);
+        // 给pageOption里面也加上
+        mobilePageDesignData.setPageOptions(newJsonStr);
+    }
+
+    private  String buildSelectClause(JSONArray columns) {
+        StringBuilder selectBuilder = new StringBuilder("select ");
+        for (int i = 0; i < columns.size(); i++) {
+            JSONObject column = columns.getJSONObject(i);
+            String tableName = column.getString("tableName");
+            String showValue = column.getString("showValue");
+            String searchValue = column.getString("searchValue");
+            selectBuilder.append("{DBNAME}.").append(tableName).append(".").append(showValue)
+                    .append(" as '").append(searchValue).append("'");
+            if (i < columns.size() - 1) {
+                selectBuilder.append(",");
+            }
+        }
+        return selectBuilder.toString();
+    }
+
+    private  String buildFromClause(JSONArray columns) {
+        String primaryTable = findPrimaryTable(columns);
+        if (primaryTable == null) {
+            return ""; // 或者抛出异常,根据业务需求决定
+        }
+
+        StringBuilder fromBuilder = new StringBuilder(" from ").append("{DBNAME}.").append(primaryTable);
+
+        for (JSONObject column : columns.toJavaList(JSONObject.class)) {
+            String tableType = column.getString("tableType");
+            if (!"sub".equals(tableType)) {
+                continue;
+            }
+
+            String tableName = column.getString("tableName");
+            String subKey = column.getString("subKey");
+            String primaryKey = column.getString("primaryKey");
+
+            fromBuilder.append(" left join ")
+                    .append("{DBNAME}.").append(tableName)
+                    .append(" on ")
+                    .append(tableName).append(".").append(subKey)
+                    .append("=")
+                    .append(primaryTable).append(".").append(primaryKey)
+                    .append(" AND ").append(tableName).append(".del_flag = '0'");
+        }
+        return fromBuilder.toString();
+    }
+
+    private String buildWhereClause(JSONArray columns){
+        StringBuilder whereBuilder = new StringBuilder();
+        HashSet<String> tableSet = new HashSet<>();
+        for (JSONObject column : columns.toJavaList(JSONObject.class)) {
+            String tableName = column.getString("tableName");
+            tableSet.add(tableName);
+        }
+        String conditions = tableSet.stream()
+                .map(tableName -> "{DBNAME}." + tableName + ".del_flag = '0'")
+                .collect(Collectors.joining(" AND "));
+        whereBuilder.append(" where ").append(conditions);
+        return whereBuilder.toString();
+    }
+    private String findPrimaryTableByPageJson(String pageJson) {
+        String primaryTable = "";
+        JSONArray pageConfigs = JSON.parseArray(pageJson);
+        for (JSONObject pageConfig : pageConfigs.toJavaList(JSONObject.class)) {
+            JSONArray columns = pageConfig.getJSONArray("columns");
+            primaryTable = findPrimaryTable(columns);
+        }
+        return primaryTable;
+    }
+
+    // 根据内部的columns获取主表
+    private String findPrimaryTable(JSONArray columns) {
+        for (JSONObject column : columns.toJavaList(JSONObject.class)) {
+            if ("primary".equals(column.getString("tableType"))) {
+                return column.getString("tableName");
+            }
+        }
+        return null;
+    }
+    // 根据内部的columns获取子表以及需要关联的主键id和字段
+    public Map<String, MobilePageDesignDataSubTableVo> findSubTableMap(JSONArray columns) {
+        Map<String, MobilePageDesignDataSubTableVo> result = new HashMap<>();
+        for (int i = 0; i < columns.size(); i++) {
+            JSONObject column = columns.getJSONObject(i);
+            // 只处理 tableType 为 "sub" 的列
+            if ("sub".equals(column.getString("tableType"))) {
+                String tableName = column.getString("tableName");
+                // 如果该表名尚未存入结果,则添加
+                if (!result.containsKey(tableName)) {
+                    MobilePageDesignDataSubTableVo subTableVo = new MobilePageDesignDataSubTableVo();
+                    subTableVo.setSubKey(column.getString("subKey"));
+                    subTableVo.setPrimaryKey(column.getString("primaryKey"));
+                    result.put(tableName, subTableVo);
+                }
+            }
+        }
+        return result;
+    }
+    public static String generateInsertSql(
+            String tableName,
+            Map<String, Object> dataMap,
+            List<String> extraFields) {
+
+        // 合并所有字段名(dataMap 的 key + extraFields)
+        List<String> allFields = new ArrayList<>(dataMap.keySet());
+        allFields.addAll(extraFields);
+
+        // 处理值:
+        // 1. dataMap 的值直接处理
+        // 2. extraFields 的值前加 @
+        List<String> allValues = new ArrayList<>();
+        for (Object value : dataMap.values()) {
+            allValues.add(processFieldValue(value));
+        }
+        for (String field : extraFields) {
+            allValues.add("@" + field); // 额外字段的值加 @
+        }
+
+        // 构建 SQL
+        return String.format(
+                "INSERT INTO %s (%s) VALUES (%s);",
+                "{DBNAME}."+ tableName,
+                String.join(", ", allFields),
+                String.join(", ", allValues)
+        );
+    }
+    private static String processFieldValue(Object value) {
+        if (value == null) {
+            return "NULL";
+        }
+        // 基本类型处理
+        if (value instanceof String) {
+            return "'" + escapeSqlString(value.toString()) + "'";
+        } else if (value instanceof Number || value instanceof Boolean) {
+            return value.toString();
+        }
+        return "NULL";
+    }
+    private static String escapeSqlString(String str) {
+        return str.replace("'", "''");
+    }
+    public Map<String, Object> convertKeysFromFirstUnderLineToDot(Map<String, Object> dataMap) {
+        Map<String, Object> convertedMap = new HashMap<>();
+        for (Map.Entry<String, Object> entry : dataMap.entrySet()) {
+            String originalKey = entry.getKey();
+            String convertedKey = convertKey(originalKey);
+            convertedMap.put(convertedKey, entry.getValue());
+        }
+        return convertedMap;
+    }
+    private String convertKey(String key) {
+        int firstUnderscoreIndex = key.indexOf('@');
+        if (firstUnderscoreIndex != -1) {
+            return key.substring(0, firstUnderscoreIndex) + "." + key.substring(firstUnderscoreIndex + 1);
+        }
+        return key; // 如果没有下划线,保持原样
+    }
+}

+ 96 - 0
zkqy-system/src/main/java/com/zkqy/system/service/impl/MobilePageNavigationBarServiceImpl.java

@@ -0,0 +1,96 @@
+package com.zkqy.system.service.impl;
+
+import java.util.List;
+import com.zkqy.common.utils.DateUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import com.zkqy.system.mapper.MobilePageNavigationBarMapper;
+import com.zkqy.system.entity.MobilePageNavigationBar;
+import com.zkqy.system.service.IMobilePageNavigationBarService;
+
+/**
+ * 移动端页面导航条设计Service业务层处理
+ * 
+ * @author zkqy
+ * @date 2025-04-07
+ */
+@Service
+public class MobilePageNavigationBarServiceImpl implements IMobilePageNavigationBarService 
+{
+    @Autowired
+    private MobilePageNavigationBarMapper mobilePageNavigationBarMapper;
+
+    /**
+     * 查询移动端页面导航条设计
+     * 
+     * @param id 移动端页面导航条设计主键
+     * @return 移动端页面导航条设计
+     */
+    @Override
+    public MobilePageNavigationBar selectMobilePageNavigationBarById(Long id)
+    {
+        return mobilePageNavigationBarMapper.selectMobilePageNavigationBarById(id);
+    }
+
+    /**
+     * 查询移动端页面导航条设计列表
+     * 
+     * @param mobilePageNavigationBar 移动端页面导航条设计
+     * @return 移动端页面导航条设计
+     */
+    @Override
+    public List<MobilePageNavigationBar> selectMobilePageNavigationBarList(MobilePageNavigationBar mobilePageNavigationBar)
+    {
+        return mobilePageNavigationBarMapper.selectMobilePageNavigationBarList(mobilePageNavigationBar);
+    }
+
+    /**
+     * 新增移动端页面导航条设计
+     * 
+     * @param mobilePageNavigationBar 移动端页面导航条设计
+     * @return 结果
+     */
+    @Override
+    public int insertMobilePageNavigationBar(MobilePageNavigationBar mobilePageNavigationBar)
+    {
+        mobilePageNavigationBar.setCreateTime(DateUtils.getNowDate());
+        return mobilePageNavigationBarMapper.insertMobilePageNavigationBar(mobilePageNavigationBar);
+    }
+
+    /**
+     * 修改移动端页面导航条设计
+     * 
+     * @param mobilePageNavigationBar 移动端页面导航条设计
+     * @return 结果
+     */
+    @Override
+    public int updateMobilePageNavigationBar(MobilePageNavigationBar mobilePageNavigationBar)
+    {
+        mobilePageNavigationBar.setUpdateTime(DateUtils.getNowDate());
+        return mobilePageNavigationBarMapper.updateMobilePageNavigationBar(mobilePageNavigationBar);
+    }
+
+    /**
+     * 批量删除移动端页面导航条设计
+     * 
+     * @param ids 需要删除的移动端页面导航条设计主键
+     * @return 结果
+     */
+    @Override
+    public int deleteMobilePageNavigationBarByIds(Long[] ids)
+    {
+        return mobilePageNavigationBarMapper.deleteMobilePageNavigationBarByIds(ids);
+    }
+
+    /**
+     * 删除移动端页面导航条设计信息
+     * 
+     * @param id 移动端页面导航条设计主键
+     * @return 结果
+     */
+    @Override
+    public int deleteMobilePageNavigationBarById(Long id)
+    {
+        return mobilePageNavigationBarMapper.deleteMobilePageNavigationBarById(id);
+    }
+}

+ 150 - 0
zkqy-system/src/main/resources/mapper/mobile/MobilePageDesignDataMapper.xml

@@ -0,0 +1,150 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.zkqy.system.mapper.MobilePageDesignDataMapper">
+    
+    <resultMap type="com.zkqy.system.entity.MobilePageDesignData" id="MobilePageDesignDataResult">
+        <result property="id"    column="id"    />
+        <result property="name"    column="name"    />
+        <result property="pageJson"    column="page_json"    />
+        <result property="pageOptions"    column="page_options"    />
+        <result property="pageLink"    column="page_link"    />
+        <result property="componentData"    column="component_data"    />
+        <result property="htmlData"    column="html_data"    />
+        <result property="remark"    column="remark"    />
+        <result property="createById"    column="create_by_id"    />
+        <result property="createBy"    column="create_by"    />
+        <result property="createTime"    column="create_time"    />
+        <result property="updateById"    column="update_by_id"    />
+        <result property="updateBy"    column="update_by"    />
+        <result property="updateTime"    column="update_time"    />
+        <result property="delFlag"    column="del_flag"    />
+        <result property="dataApprovalStatus"    column="data_approval_status"    />
+        <result property="processKey"    column="process_key"    />
+        <result property="taskProcessKey"    column="task_process_key"    />
+        <result property="taskNodeKey"    column="task_node_key"    />
+
+    </resultMap>
+
+    <sql id="selectMobilePageDesignDataVo">
+        select id, name, page_json, page_options, page_link,component_data,html_data, remark, create_by_id, create_by, create_time, update_by_id, update_by, update_time, del_flag, data_approval_status, process_key, task_process_key, task_node_key from mobile_page_design_data
+    </sql>
+
+    <select id="selectMobilePageDesignDataList" parameterType="com.zkqy.system.entity.MobilePageDesignData" resultMap="MobilePageDesignDataResult">
+        <include refid="selectMobilePageDesignDataVo"/>
+        <where>  
+            <if test="name != null  and name != ''"> and name like concat('%', #{name}, '%')</if>
+            <if test="pageJson != null  and pageJson != ''"> and page_json = #{pageJson}</if>
+            <if test="pageOptions != null  and pageOptions != ''"> and page_options = #{pageOptions}</if>
+            <if test="pageLink != null  and pageLink != ''"> and page_link = #{pageLink}</if>
+            <if test="componentData != null  and componentData != ''"> and component_data = #{componentData}</if>
+            <if test="htmlData != null  and htmlData != ''"> and html_data = #{htmlData}</if>
+            <if test="createById != null "> and create_by_id = #{createById}</if>
+            <if test="updateById != null "> and update_by_id = #{updateById}</if>
+            <if test="dataApprovalStatus != null  and dataApprovalStatus != ''"> and data_approval_status = #{dataApprovalStatus}</if>
+            <if test="processKey != null  and processKey != ''"> and process_key = #{processKey}</if>
+            <if test="taskProcessKey != null  and taskProcessKey != ''"> and task_process_key = #{taskProcessKey}</if>
+            <if test="taskNodeKey != null  and taskNodeKey != ''"> and task_node_key = #{taskNodeKey}</if>
+        </where>
+        order by create_time desc
+    </select>
+    
+    <select id="selectMobilePageDesignDataById" parameterType="Long" resultMap="MobilePageDesignDataResult">
+        <include refid="selectMobilePageDesignDataVo"/>
+        where id = #{id}
+    </select>
+        
+    <insert id="insertMobilePageDesignData" parameterType="com.zkqy.system.entity.MobilePageDesignData" useGeneratedKeys="true" keyProperty="id">
+        insert into mobile_page_design_data
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="name != null">name,</if>
+            <if test="pageJson != null">page_json,</if>
+            <if test="pageOptions != null">page_options,</if>
+            <if test="pageLink != null">page_link,</if>
+            <if test="componentData != null">component_data,</if>
+            <if test="htmlData != null">html_data,</if>
+            <if test="remark != null">remark,</if>
+            <if test="createById != null">create_by_id,</if>
+            <if test="createBy != null">create_by,</if>
+            <if test="createTime != null">create_time,</if>
+            <if test="updateById != null">update_by_id,</if>
+            <if test="updateBy != null">update_by,</if>
+            <if test="updateTime != null">update_time,</if>
+            <if test="delFlag != null">del_flag,</if>
+            <if test="dataApprovalStatus != null">data_approval_status,</if>
+            <if test="processKey != null">process_key,</if>
+            <if test="taskProcessKey != null">task_process_key,</if>
+            <if test="taskNodeKey != null">task_node_key,</if>
+         </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="name != null">#{name},</if>
+            <if test="pageJson != null">#{pageJson},</if>
+            <if test="pageOptions != null">#{pageOptions},</if>
+            <if test="pageLink != null">#{pageLink},</if>
+            <if test="componentData != null">#{componentData},</if>
+            <if test="htmlData != null">#{htmlData},</if>
+            <if test="remark != null">#{remark},</if>
+            <if test="createById != null">#{createById},</if>
+            <if test="createBy != null">#{createBy},</if>
+            <if test="createTime != null">#{createTime},</if>
+            <if test="updateById != null">#{updateById},</if>
+            <if test="updateBy != null">#{updateBy},</if>
+            <if test="updateTime != null">#{updateTime},</if>
+            <if test="delFlag != null">#{delFlag},</if>
+            <if test="dataApprovalStatus != null">#{dataApprovalStatus},</if>
+            <if test="processKey != null">#{processKey},</if>
+            <if test="taskProcessKey != null">#{taskProcessKey},</if>
+            <if test="taskNodeKey != null">#{taskNodeKey},</if>
+         </trim>
+    </insert>
+    <insert id="executeInsertSql">
+        ${executeSql}
+    </insert>
+
+    <update id="updateMobilePageDesignData" parameterType="com.zkqy.system.entity.MobilePageDesignData">
+        update mobile_page_design_data
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="name != null">name = #{name},</if>
+            <if test="pageJson != null">page_json = #{pageJson},</if>
+            <if test="pageOptions != null">page_options = #{pageOptions},</if>
+            <if test="pageLink != null">page_link = #{pageLink},</if>
+            <if test="componentData != null">component_data = #{componentData},</if>
+            <if test="htmlData != null">html_data = #{htmlData},</if>
+            <if test="remark != null">remark = #{remark},</if>
+            <if test="createById != null">create_by_id = #{createById},</if>
+            <if test="createBy != null">create_by = #{createBy},</if>
+            <if test="createTime != null">create_time = #{createTime},</if>
+            <if test="updateById != null">update_by_id = #{updateById},</if>
+            <if test="updateBy != null">update_by = #{updateBy},</if>
+            <if test="updateTime != null">update_time = #{updateTime},</if>
+            <if test="delFlag != null">del_flag = #{delFlag},</if>
+            <if test="dataApprovalStatus != null">data_approval_status = #{dataApprovalStatus},</if>
+            <if test="processKey != null">process_key = #{processKey},</if>
+            <if test="taskProcessKey != null">task_process_key = #{taskProcessKey},</if>
+            <if test="taskNodeKey != null">task_node_key = #{taskNodeKey},</if>
+        </trim>
+        where id = #{id}
+    </update>
+    <update id="executeUpdateSql">
+        ${executeSql}
+    </update>
+
+    <select id="executeQuerySql"  resultType="java.util.HashMap">
+        ${executeSql}
+    </select>
+
+    <delete id="deleteMobilePageDesignDataById" parameterType="Long">
+        delete from mobile_page_design_data where id = #{id}
+    </delete>
+
+    <delete id="deleteMobilePageDesignDataByIds" parameterType="String">
+        delete from mobile_page_design_data where id in 
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </delete>
+    <delete id="executeDeleteSql">
+        ${executeSql}
+    </delete>
+</mapper>

+ 130 - 0
zkqy-system/src/main/resources/mapper/mobile/MobilePageNavigationBarMapper.xml

@@ -0,0 +1,130 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.zkqy.system.mapper.MobilePageNavigationBarMapper">
+    
+    <resultMap type="com.zkqy.system.entity.MobilePageNavigationBar" id="MobilePageNavigationBarResult">
+        <result property="id"    column="id"    />
+        <result property="name"    column="name"    />
+        <result property="type"    column="type"    />
+        <result property="barOrder"    column="bar_order"    />
+        <result property="pageId"    column="page_id"    />
+        <result property="pageName"    column="page_name"    />
+        <result property="remark"    column="remark"    />
+        <result property="createById"    column="create_by_id"    />
+        <result property="createBy"    column="create_by"    />
+        <result property="createTime"    column="create_time"    />
+        <result property="updateById"    column="update_by_id"    />
+        <result property="updateBy"    column="update_by"    />
+        <result property="updateTime"    column="update_time"    />
+        <result property="delFlag"    column="del_flag"    />
+        <result property="dataApprovalStatus"    column="data_approval_status"    />
+        <result property="processKey"    column="process_key"    />
+        <result property="taskProcessKey"    column="task_process_key"    />
+        <result property="taskNodeKey"    column="task_node_key"    />
+    </resultMap>
+
+    <sql id="selectMobilePageNavigationBarVo">
+        select id, name, type, bar_order, page_id, page_name, remark, create_by_id, create_by, create_time, update_by_id, update_by, update_time, del_flag, data_approval_status, process_key, task_process_key, task_node_key from mobile_page_navigation_bar
+    </sql>
+
+    <select id="selectMobilePageNavigationBarList" parameterType="com.zkqy.system.entity.MobilePageNavigationBar" resultMap="MobilePageNavigationBarResult">
+        <include refid="selectMobilePageNavigationBarVo"/>
+        <where>  
+            <if test="name != null  and name != ''"> and name like concat('%', #{name}, '%')</if>
+            <if test="type != null  and type != ''"> and type = #{type}</if>
+            <if test="barOrder != null  and barOrder != ''"> and bar_order = #{barOrder}</if>
+            <if test="pageId != null "> and page_id = #{pageId}</if>
+            <if test="pageName != null  and pageName != ''"> and page_name like concat('%', #{pageName}, '%')</if>
+            <if test="createById != null "> and create_by_id = #{createById}</if>
+            <if test="updateById != null "> and update_by_id = #{updateById}</if>
+            <if test="dataApprovalStatus != null  and dataApprovalStatus != ''"> and data_approval_status = #{dataApprovalStatus}</if>
+            <if test="processKey != null  and processKey != ''"> and process_key = #{processKey}</if>
+            <if test="taskProcessKey != null  and taskProcessKey != ''"> and task_process_key = #{taskProcessKey}</if>
+            <if test="taskNodeKey != null  and taskNodeKey != ''"> and task_node_key = #{taskNodeKey}</if>
+        </where>
+    </select>
+    
+    <select id="selectMobilePageNavigationBarById" parameterType="Long" resultMap="MobilePageNavigationBarResult">
+        <include refid="selectMobilePageNavigationBarVo"/>
+        where id = #{id}
+    </select>
+        
+    <insert id="insertMobilePageNavigationBar" parameterType="com.zkqy.system.entity.MobilePageNavigationBar" useGeneratedKeys="true" keyProperty="id">
+        insert into mobile_page_navigation_bar
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="name != null">name,</if>
+            <if test="type != null">type,</if>
+            <if test="barOrder != null">bar_order,</if>
+            <if test="pageId != null">page_id,</if>
+            <if test="pageName != null">page_name,</if>
+            <if test="remark != null">remark,</if>
+            <if test="createById != null">create_by_id,</if>
+            <if test="createBy != null">create_by,</if>
+            <if test="createTime != null">create_time,</if>
+            <if test="updateById != null">update_by_id,</if>
+            <if test="updateBy != null">update_by,</if>
+            <if test="updateTime != null">update_time,</if>
+            <if test="delFlag != null">del_flag,</if>
+            <if test="dataApprovalStatus != null">data_approval_status,</if>
+            <if test="processKey != null">process_key,</if>
+            <if test="taskProcessKey != null">task_process_key,</if>
+            <if test="taskNodeKey != null">task_node_key,</if>
+         </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="name != null">#{name},</if>
+            <if test="type != null">#{type},</if>
+            <if test="barOrder != null">#{barOrder},</if>
+            <if test="pageId != null">#{pageId},</if>
+            <if test="pageName != null">#{pageName},</if>
+            <if test="remark != null">#{remark},</if>
+            <if test="createById != null">#{createById},</if>
+            <if test="createBy != null">#{createBy},</if>
+            <if test="createTime != null">#{createTime},</if>
+            <if test="updateById != null">#{updateById},</if>
+            <if test="updateBy != null">#{updateBy},</if>
+            <if test="updateTime != null">#{updateTime},</if>
+            <if test="delFlag != null">#{delFlag},</if>
+            <if test="dataApprovalStatus != null">#{dataApprovalStatus},</if>
+            <if test="processKey != null">#{processKey},</if>
+            <if test="taskProcessKey != null">#{taskProcessKey},</if>
+            <if test="taskNodeKey != null">#{taskNodeKey},</if>
+         </trim>
+    </insert>
+
+    <update id="updateMobilePageNavigationBar" parameterType="com.zkqy.system.entity.MobilePageNavigationBar">
+        update mobile_page_navigation_bar
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="name != null">name = #{name},</if>
+            <if test="type != null">type = #{type},</if>
+            <if test="barOrder != null">bar_order = #{barOrder},</if>
+            <if test="pageId != null">page_id = #{pageId},</if>
+            <if test="pageName != null">page_name = #{pageName},</if>
+            <if test="remark != null">remark = #{remark},</if>
+            <if test="createById != null">create_by_id = #{createById},</if>
+            <if test="createBy != null">create_by = #{createBy},</if>
+            <if test="createTime != null">create_time = #{createTime},</if>
+            <if test="updateById != null">update_by_id = #{updateById},</if>
+            <if test="updateBy != null">update_by = #{updateBy},</if>
+            <if test="updateTime != null">update_time = #{updateTime},</if>
+            <if test="delFlag != null">del_flag = #{delFlag},</if>
+            <if test="dataApprovalStatus != null">data_approval_status = #{dataApprovalStatus},</if>
+            <if test="processKey != null">process_key = #{processKey},</if>
+            <if test="taskProcessKey != null">task_process_key = #{taskProcessKey},</if>
+            <if test="taskNodeKey != null">task_node_key = #{taskNodeKey},</if>
+        </trim>
+        where id = #{id}
+    </update>
+
+    <delete id="deleteMobilePageNavigationBarById" parameterType="Long">
+        delete from mobile_page_navigation_bar where id = #{id}
+    </delete>
+
+    <delete id="deleteMobilePageNavigationBarByIds" parameterType="String">
+        delete from mobile_page_navigation_bar where id in 
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </delete>
+</mapper>