package com.philisense.www.controller.web;

import com.philisense.www.annotation.log.OperateLog;
import com.philisense.www.common.config.CommonConst;
import com.philisense.www.controller.BaseUtilController;
import com.philisense.www.service.EbookArticlePhotosService;
import com.philisense.www.service.EbookArticleService;
import com.philisense.www.service.EbookArticleTxtService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.text.SimpleDateFormat;
import java.util.*;

@RestController
@RequestMapping(CommonConst.WEB_REST_SERVICE_PREFICX + "ebookarticle")
@Api(tags = "EbookArticleControllerForWeb|一个用来操作-{在线电子写作表}-业务模块的控制器")
public class EbookArticleControllerForWeb extends BaseUtilController {

    @Autowired
    private EbookArticleService ebookArticleService;

    @Autowired
    private EbookArticleTxtService ebookArticleTxtService;


    @Autowired
    private EbookArticlePhotosService ebookArticlePhotosService;

        /*Value("${pdf.sysFilePath}")
        private String sysFilePath = "/Users/miSter/cdn/public";

        Value("${pdf.imagesFilePath}")
        private String imagesFilePath = "/upload/images/";

        Value("${pdf.cdnPath}")
        private String cdnPath = "http://localhost:3000";*/

    private SimpleDateFormat sdf = new SimpleDateFormat("yyyy_MM_dd");


    @GetMapping("/delete")
    @ApiOperation(value = "根据-{在线电子写作表}-主键删除记录", notes = "成功返回:{\"success\":true,\"message\",\"数据删除成功\"},失败返回:{\"success\":false,\"message\",\"数据删除失败\"}")
    @ApiImplicitParam(paramType = "query", name = "recordid", value = "记录主键", required = true,  dataTypeClass = String.class)
    @OperateLog(name = "根据-{在线电子写作表}-主键删除记录", value = "delete", type = "PC")
    public Map<String, Object> deleteByPrimaryKeyForEbookArticleForWeb(HttpServletRequest request, HttpServletResponse response, @RequestParam String recordid) {
        Map<String, Object> result = new HashMap<String, Object>();
        try {
            int flag = ebookArticleService.deleteByPrimaryKey(recordid);
            if (1 <= flag) {
                result.put(DATASUCCESS, SUCCESSFLAG);
                result.put(DATAMESSAGE, DELETE_SUCCESS_MSG);
            } else {
                result.put(DATASUCCESS, ERRORFLAG);
                result.put(DATAMESSAGE, DELETE_FAIL_MSG);
            }

        } catch (Exception e) {
            result.put(DATASUCCESS, ERRORFLAG);
            result.put(DATAMESSAGE, DELETE_FAIL_MSG + e.getMessage());
        }
        return result;
    }

    @GetMapping("/get")
    @ApiOperation(value = "根据-{在线电子写作表}-主键查询记录", notes = "成功返回:{\"success\":true,\"message\",\"数据查询成功\",\"datarecord\":\"{}\"},失败返回:{\"success\":false,\"message\",\"数据查询失败\"}")
    @ApiImplicitParam(paramType = "body", name = "recordid", value = "记录主键", required = true,  dataTypeClass = String.class)
    @OperateLog(name = "根据-{在线电子写作表}-主键查询记录", value = "query", type = "PC")
    public Map<String, Object> selectByPrimaryKeyForEbookArticleForWeb(HttpServletRequest request, HttpServletResponse response, @RequestParam String recordid) {
        Map<String, Object> result = new HashMap<String, Object>();
        try {
            Map<String, Object> articlemap = ebookArticleService.selectByPrimaryKey(recordid);
            Map<String, Object> map = new HashMap<String, Object>();
            map.put("article_id", recordid);
            Map<String, Object> articletxtmap = ebookArticleTxtService.getOne(map);
            articlemap.put("txtid", articletxtmap.get("id"));
            articlemap.put("html_content", articletxtmap.get("txt"));

            result.put(DATASUCCESS, SUCCESSFLAG);
            result.put(DATAMESSAGE, QUERY_SUCCESS_MSG);
            result.put(DATARECORD, articlemap);
        } catch (Exception e) {
            result.put(DATASUCCESS, ERRORFLAG);
            result.put(DATAMESSAGE, QUERY_FAIL_MSG + e.getMessage());
        }
        return result;
    }

    @PostMapping("/insert")
    @ApiOperation(value = "根据-{在线电子写作表}-对象插入记录", notes = "成功返回:{\"success\":true,\"message\",\"数据插入成功\"},失败返回:{\"success\":false,\"message\",\"数据插入失败\"}")
    @ApiImplicitParams({
            @ApiImplicitParam(paramType = "body", name = "id", value = "文章编号", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "article_title", value = "文章标题", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "article_class_id", value = "文章分类编号", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_origin", value = "文章来源", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "article_origin_address", value = "文章来源链接", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "article_author", value = "文章作者", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "article_abstract", value = "文章摘要", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "article_content", value = "文章正文", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "article_image", value = "文章图片", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "article_keyword", value = "文章关键字", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "article_link", value = "相关文章", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "article_goods", value = "相关内容", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "article_start_time", value = "文章有效期开始时间", required = true, dataType = "Date", dataTypeClass = Date.class),
            @ApiImplicitParam(paramType = "body", name = "article_end_time", value = "文章有效期结束时间", required = true, dataType = "Date", dataTypeClass = Date.class),
            @ApiImplicitParam(paramType = "body", name = "article_publish_time", value = "文章发布时间", required = true, dataType = "Date", dataTypeClass = Date.class),
            @ApiImplicitParam(paramType = "body", name = "article_click", value = "文章点击量", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_sort", value = "文章排序0-255", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_commend_flag", value = "文章推荐标志0-未推荐，1-已推荐", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_comment_flag", value = "文章是否允许评论1-允许，0-不允许", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_verify_admin", value = "文章审核管理员", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "article_verify_time", value = "文章审核时间", required = true, dataType = "Date", dataTypeClass = Date.class),
            @ApiImplicitParam(paramType = "body", name = "article_state", value = "1-草稿、2-待审核、3-已发布、4-回收站", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_publisher_name", value = "发布者用户名 ", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "article_publisher_id", value = "发布者编号", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_type", value = "文章类型1-管理员发布，2-用户投稿", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_attachment_path", value = "文章附件路径", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "article_image_all", value = "文章全部图片", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "article_modify_time", value = "文章修改时间", required = true, dataType = "Date", dataTypeClass = Date.class),
            @ApiImplicitParam(paramType = "body", name = "article_tag", value = "文章标签", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "article_comment_count", value = "文章评论数", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_attitude_1", value = "文章心情1", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_attitude_2", value = "文章心情2", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_attitude_3", value = "文章心情3", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_attitude_4", value = "文章心情4", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_attitude_5", value = "文章心情5", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_attitude_6", value = "文章心情6", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_title_short", value = "文章短标题", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "article_attitude_flag", value = "文章态度开关1-允许，0-不允许", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_commend_image_flag", value = "文章推荐标志(图文)", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_share_count", value = "文章分享数", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_verify_reason", value = "审核失败原因", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "article_class_name", value = "文章分类名称", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "article_display", value = "文章是否显示", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_agree_count", value = "文章点赞数", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_title_link", value = "文章外部链接", required = true,  dataTypeClass = String.class)
    })
    @OperateLog(name = "根据-{在线电子写作表}-对象插入记录", value = "insert", type = "PC")
    public Map<String, Object> insertForEbookArticleForWeb(HttpServletRequest request, HttpServletResponse response, @RequestBody Map<String, Object> map) {
        Map<String, Object> result = new HashMap<String, Object>();
        try {
            String ID = UUID.randomUUID().toString().replaceAll("-", "");
            map.put("id", ID);
            map.put("article_publish_time", new Date());

            map.put("article_commend_flag", "0");
            map.put("article_link", "");
            map.put("article_tag", "");
            map.put("article_publisher_name", "");

            ebookArticleService.insert(map);

            String TXTID = UUID.randomUUID().toString().replaceAll("-", "");
            Map<String, Object> textmap = new HashMap<String, Object>();
            textmap.put("id", TXTID);
            textmap.put("article_id", ID);
            textmap.put("txt", map.get("html_content"));


            ebookArticleTxtService.insert(textmap);

            map.put("txtid", TXTID);


            result.put(DATASUCCESS, SUCCESSFLAG);
            result.put(DATAMESSAGE, INSERT_SUCCESS_MSG);
            result.put(DATARECORD, map);
        } catch (Exception e) {

            result.put(DATASUCCESS, ERRORFLAG);
            result.put(DATAMESSAGE, INSERT_FAIL_MSG + e.getMessage());
        }
        return result;
    }

    @PostMapping("/update")
    @ApiOperation(value = "根据-{在线电子写作表}-对象更新记录", notes = "成功返回:{\"success\":true,\"message\",\"数据更新成功\"},失败返回:{\"success\":false,\"message\",\"数据更新失败\"}")
    @ApiImplicitParams({
            @ApiImplicitParam(paramType = "body", name = "id", value = "文章编号", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "article_title", value = "文章标题", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "article_class_id", value = "文章分类编号", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_origin", value = "文章来源", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "article_origin_address", value = "文章来源链接", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "article_author", value = "文章作者", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "article_abstract", value = "文章摘要", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "article_content", value = "文章正文", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "article_image", value = "文章图片", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "article_keyword", value = "文章关键字", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "article_link", value = "相关文章", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "article_goods", value = "相关内容", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "article_start_time", value = "文章有效期开始时间", required = true, dataType = "Date", dataTypeClass = Date.class),
            @ApiImplicitParam(paramType = "body", name = "article_end_time", value = "文章有效期结束时间", required = true, dataType = "Date", dataTypeClass = Date.class),
            @ApiImplicitParam(paramType = "body", name = "article_publish_time", value = "文章发布时间", required = true, dataType = "Date", dataTypeClass = Date.class),
            @ApiImplicitParam(paramType = "body", name = "article_click", value = "文章点击量", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_sort", value = "文章排序0-255", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_commend_flag", value = "文章推荐标志0-未推荐，1-已推荐", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_comment_flag", value = "文章是否允许评论1-允许，0-不允许", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_verify_admin", value = "文章审核管理员", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "article_verify_time", value = "文章审核时间", required = true, dataType = "Date", dataTypeClass = Date.class),
            @ApiImplicitParam(paramType = "body", name = "article_state", value = "1-草稿、2-待审核、3-已发布、4-回收站", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_publisher_name", value = "发布者用户名 ", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "article_publisher_id", value = "发布者编号", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_type", value = "文章类型1-管理员发布，2-用户投稿", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_attachment_path", value = "文章附件路径", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "article_image_all", value = "文章全部图片", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "article_modify_time", value = "文章修改时间", required = true, dataType = "Date", dataTypeClass = Date.class),
            @ApiImplicitParam(paramType = "body", name = "article_tag", value = "文章标签", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "article_comment_count", value = "文章评论数", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_attitude_1", value = "文章心情1", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_attitude_2", value = "文章心情2", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_attitude_3", value = "文章心情3", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_attitude_4", value = "文章心情4", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_attitude_5", value = "文章心情5", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_attitude_6", value = "文章心情6", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_title_short", value = "文章短标题", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "article_attitude_flag", value = "文章态度开关1-允许，0-不允许", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_commend_image_flag", value = "文章推荐标志(图文)", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_share_count", value = "文章分享数", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_verify_reason", value = "审核失败原因", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "article_class_name", value = "文章分类名称", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "article_display", value = "文章是否显示", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_agree_count", value = "文章点赞数", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_title_link", value = "文章外部链接", required = true,  dataTypeClass = String.class)
    })
    @OperateLog(name = "根据-{在线电子写作表}-对象更新记录", value = "update", type = "PC")
    public Map<String, Object> updateForEbookArticleForWeb(HttpServletRequest request, HttpServletResponse response, @RequestBody Map<String, Object> map) {
        Map<String, Object> result = new HashMap<String, Object>();
        try {
            String ID = map.get("id") + "";
            if (ID.equals("")) {
                result.put(DATASUCCESS, ERRORFLAG);
                result.put(DATAMESSAGE, UPDATE_FAIL_MSG + "记录ID不能为空");
                return result;
            }
            Map<String, Object> temmap = ebookArticleService.selectByPrimaryKey(ID);

            if (null == temmap || temmap.size() == 0) {
                result.put(DATASUCCESS, ERRORFLAG);
                result.put(DATAMESSAGE, UPDATE_FAIL_MSG + ID + "记录不存在");
                return result;
            }

            temmap.putAll(map);

            int flag = ebookArticleService.update(temmap);

            Map<String, Object> textmap = new HashMap<String, Object>();
            textmap.put("id", map.get("txtid"));
            textmap.put("article_id", map.get("id"));
            textmap.put("txt", map.get("html_content"));

            flag = ebookArticleTxtService.update(textmap);

            temmap.put("txtid", map.get("txtid"));

            if (1 <= flag) {
                result.put(DATASUCCESS, SUCCESSFLAG);
                result.put(DATAMESSAGE, UPDATE_SUCCESS_MSG);
                result.put(DATARECORD, temmap);
            } else {
                result.put(DATASUCCESS, ERRORFLAG);
                result.put(DATAMESSAGE, UPDATE_FAIL_MSG);
            }

        } catch (Exception e) {
            result.put(DATASUCCESS, ERRORFLAG);
            result.put(DATAMESSAGE, UPDATE_FAIL_MSG + e.getMessage());
        }
        return result;
    }

    @PostMapping("/updateArticleStateById")
    @ApiOperation(value = "根据-{在线电子写作表}-对象更新记录", notes = "成功返回:{\"success\":true,\"message\",\"数据更新成功\"},失败返回:{\"success\":false,\"message\",\"数据更新失败\"}")
    @ApiImplicitParams({
            @ApiImplicitParam(paramType = "body", name = "id", value = "文章编号", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "article_title", value = "文章标题", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "article_class_id", value = "文章分类编号", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_origin", value = "文章来源", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "article_origin_address", value = "文章来源链接", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "article_author", value = "文章作者", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "article_abstract", value = "文章摘要", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "article_content", value = "文章正文", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "article_image", value = "文章图片", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "article_keyword", value = "文章关键字", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "article_link", value = "相关文章", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "article_goods", value = "相关内容", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "article_start_time", value = "文章有效期开始时间", required = true, dataType = "Date", dataTypeClass = Date.class),
            @ApiImplicitParam(paramType = "body", name = "article_end_time", value = "文章有效期结束时间", required = true, dataType = "Date", dataTypeClass = Date.class),
            @ApiImplicitParam(paramType = "body", name = "article_publish_time", value = "文章发布时间", required = true, dataType = "Date", dataTypeClass = Date.class),
            @ApiImplicitParam(paramType = "body", name = "article_click", value = "文章点击量", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_sort", value = "文章排序0-255", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_commend_flag", value = "文章推荐标志0-未推荐，1-已推荐", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_comment_flag", value = "文章是否允许评论1-允许，0-不允许", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_verify_admin", value = "文章审核管理员", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "article_verify_time", value = "文章审核时间", required = true, dataType = "Date", dataTypeClass = Date.class),
            @ApiImplicitParam(paramType = "body", name = "article_state", value = "1-草稿、2-待审核、3-已发布、4-回收站", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_publisher_name", value = "发布者用户名 ", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "article_publisher_id", value = "发布者编号", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_type", value = "文章类型1-管理员发布，2-用户投稿", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_attachment_path", value = "文章附件路径", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "article_image_all", value = "文章全部图片", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "article_modify_time", value = "文章修改时间", required = true, dataType = "Date", dataTypeClass = Date.class),
            @ApiImplicitParam(paramType = "body", name = "article_tag", value = "文章标签", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "article_comment_count", value = "文章评论数", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_attitude_1", value = "文章心情1", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_attitude_2", value = "文章心情2", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_attitude_3", value = "文章心情3", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_attitude_4", value = "文章心情4", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_attitude_5", value = "文章心情5", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_attitude_6", value = "文章心情6", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_title_short", value = "文章短标题", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "article_attitude_flag", value = "文章态度开关1-允许，0-不允许", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_commend_image_flag", value = "文章推荐标志(图文)", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_share_count", value = "文章分享数", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_verify_reason", value = "审核失败原因", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "article_class_name", value = "文章分类名称", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "article_display", value = "文章是否显示", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_agree_count", value = "文章点赞数", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_title_link", value = "文章外部链接", required = true,  dataTypeClass = String.class)
    })
    @OperateLog(name = "根据-{在线电子写作表}-对象更新记录", value = "update", type = "PC")
    public Map<String, Object> updateArticleStateByIdForEbookArticleForWeb(HttpServletRequest request, HttpServletResponse response, @RequestBody Map<String, Object> map) {
        Map<String, Object> result = new HashMap<String, Object>();
        try {
            String ID = map.get("id") + "";
            if (ID.equals("")) {
                result.put(DATASUCCESS, ERRORFLAG);
                result.put(DATAMESSAGE, UPDATE_FAIL_MSG + "记录ID不能为空");
                return result;
            }
            Map<String, Object> temmap = ebookArticleService.selectByPrimaryKey(ID);

            if (null == temmap || temmap.size() == 0) {
                result.put(DATASUCCESS, ERRORFLAG);
                result.put(DATAMESSAGE, UPDATE_FAIL_MSG + ID + "记录不存在");
                return result;
            }

            temmap.putAll(map);

            int flag = ebookArticleService.update(temmap);

            if (1 <= flag) {
                result.put(DATASUCCESS, SUCCESSFLAG);
                result.put(DATAMESSAGE, UPDATE_SUCCESS_MSG);
                result.put(DATARECORD, temmap);
            } else {
                result.put(DATASUCCESS, ERRORFLAG);
                result.put(DATAMESSAGE, UPDATE_FAIL_MSG);
            }

        } catch (Exception e) {
            result.put(DATASUCCESS, ERRORFLAG);
            result.put(DATAMESSAGE, UPDATE_FAIL_MSG + e.getMessage());
        }
        return result;
    }

    @PostMapping("/deleteByMap")
    @ApiOperation(value = "根据-{在线电子写作表}-对象Map删除记录", notes = "成功返回:{\"success\":true,\"message\",\"数据删除成功\"},失败返回:{\"success\":false,\"message\",\"数据删除失败\"}")
    @ApiImplicitParams({
            @ApiImplicitParam(paramType = "body", name = "id", value = "文章编号", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "article_title", value = "文章标题", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "article_class_id", value = "文章分类编号", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_origin", value = "文章来源", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "article_origin_address", value = "文章来源链接", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "article_author", value = "文章作者", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "article_abstract", value = "文章摘要", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "article_content", value = "文章正文", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "article_image", value = "文章图片", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "article_keyword", value = "文章关键字", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "article_link", value = "相关文章", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "article_goods", value = "相关内容", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "article_start_time", value = "文章有效期开始时间", required = true, dataType = "Date", dataTypeClass = Date.class),
            @ApiImplicitParam(paramType = "body", name = "article_end_time", value = "文章有效期结束时间", required = true, dataType = "Date", dataTypeClass = Date.class),
            @ApiImplicitParam(paramType = "body", name = "article_publish_time", value = "文章发布时间", required = true, dataType = "Date", dataTypeClass = Date.class),
            @ApiImplicitParam(paramType = "body", name = "article_click", value = "文章点击量", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_sort", value = "文章排序0-255", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_commend_flag", value = "文章推荐标志0-未推荐，1-已推荐", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_comment_flag", value = "文章是否允许评论1-允许，0-不允许", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_verify_admin", value = "文章审核管理员", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "article_verify_time", value = "文章审核时间", required = true, dataType = "Date", dataTypeClass = Date.class),
            @ApiImplicitParam(paramType = "body", name = "article_state", value = "1-草稿、2-待审核、3-已发布、4-回收站", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_publisher_name", value = "发布者用户名 ", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "article_publisher_id", value = "发布者编号", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_type", value = "文章类型1-管理员发布，2-用户投稿", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_attachment_path", value = "文章附件路径", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "article_image_all", value = "文章全部图片", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "article_modify_time", value = "文章修改时间", required = true, dataType = "Date", dataTypeClass = Date.class),
            @ApiImplicitParam(paramType = "body", name = "article_tag", value = "文章标签", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "article_comment_count", value = "文章评论数", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_attitude_1", value = "文章心情1", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_attitude_2", value = "文章心情2", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_attitude_3", value = "文章心情3", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_attitude_4", value = "文章心情4", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_attitude_5", value = "文章心情5", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_attitude_6", value = "文章心情6", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_title_short", value = "文章短标题", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "article_attitude_flag", value = "文章态度开关1-允许，0-不允许", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_commend_image_flag", value = "文章推荐标志(图文)", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_share_count", value = "文章分享数", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_verify_reason", value = "审核失败原因", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "article_class_name", value = "文章分类名称", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "article_display", value = "文章是否显示", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_agree_count", value = "文章点赞数", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_title_link", value = "文章外部链接", required = true,  dataTypeClass = String.class)
    })
    @OperateLog(name = "根据-{在线电子写作表}-对象Map删除记录", value = "delete", type = "PC")
    public Map<String, Object> deleteByMapForEbookArticleForWeb(HttpServletRequest request, HttpServletResponse response, @RequestBody Map<String, Object> map) {
        Map<String, Object> result = new HashMap<String, Object>();
        try {
            int flag = ebookArticleService.deleteByMap(map);
            if (1 <= flag) {
                result.put(DATASUCCESS, SUCCESSFLAG);
                result.put(DATAMESSAGE, DELETE_SUCCESS_MSG);
            } else {
                result.put(DATASUCCESS, ERRORFLAG);
                result.put(DATAMESSAGE, DELETE_FAIL_MSG);
            }

        } catch (Exception e) {
            result.put(DATASUCCESS, ERRORFLAG);
            result.put(DATAMESSAGE, DELETE_FAIL_MSG + e.getMessage());
        }
        return result;
    }

    @PostMapping("/updateByMap")
    @ApiOperation(value = "根据-{在线电子写作表}-对象Map更新记录", notes = "成功返回:{\"success\":true,\"message\",\"数据更新成功\"},失败返回:{\"success\":false,\"message\",\"数据更新失败\"}")
    @ApiImplicitParams({
            @ApiImplicitParam(paramType = "body", name = "id", value = "文章编号", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "article_title", value = "文章标题", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "article_class_id", value = "文章分类编号", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_origin", value = "文章来源", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "article_origin_address", value = "文章来源链接", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "article_author", value = "文章作者", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "article_abstract", value = "文章摘要", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "article_content", value = "文章正文", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "article_image", value = "文章图片", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "article_keyword", value = "文章关键字", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "article_link", value = "相关文章", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "article_goods", value = "相关内容", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "article_start_time", value = "文章有效期开始时间", required = true, dataType = "Date", dataTypeClass = Date.class),
            @ApiImplicitParam(paramType = "body", name = "article_end_time", value = "文章有效期结束时间", required = true, dataType = "Date", dataTypeClass = Date.class),
            @ApiImplicitParam(paramType = "body", name = "article_publish_time", value = "文章发布时间", required = true, dataType = "Date", dataTypeClass = Date.class),
            @ApiImplicitParam(paramType = "body", name = "article_click", value = "文章点击量", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_sort", value = "文章排序0-255", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_commend_flag", value = "文章推荐标志0-未推荐，1-已推荐", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_comment_flag", value = "文章是否允许评论1-允许，0-不允许", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_verify_admin", value = "文章审核管理员", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "article_verify_time", value = "文章审核时间", required = true, dataType = "Date", dataTypeClass = Date.class),
            @ApiImplicitParam(paramType = "body", name = "article_state", value = "1-草稿、2-待审核、3-已发布、4-回收站", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_publisher_name", value = "发布者用户名 ", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "article_publisher_id", value = "发布者编号", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_type", value = "文章类型1-管理员发布，2-用户投稿", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_attachment_path", value = "文章附件路径", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "article_image_all", value = "文章全部图片", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "article_modify_time", value = "文章修改时间", required = true, dataType = "Date", dataTypeClass = Date.class),
            @ApiImplicitParam(paramType = "body", name = "article_tag", value = "文章标签", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "article_comment_count", value = "文章评论数", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_attitude_1", value = "文章心情1", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_attitude_2", value = "文章心情2", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_attitude_3", value = "文章心情3", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_attitude_4", value = "文章心情4", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_attitude_5", value = "文章心情5", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_attitude_6", value = "文章心情6", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_title_short", value = "文章短标题", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "article_attitude_flag", value = "文章态度开关1-允许，0-不允许", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_commend_image_flag", value = "文章推荐标志(图文)", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_share_count", value = "文章分享数", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_verify_reason", value = "审核失败原因", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "article_class_name", value = "文章分类名称", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "article_display", value = "文章是否显示", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_agree_count", value = "文章点赞数", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_title_link", value = "文章外部链接", required = true,  dataTypeClass = String.class)
    })
    @OperateLog(name = "根据-{在线电子写作表}-对象Map更新记录", value = "update", type = "PC")
    public Map<String, Object> updateByMapForEbookArticleForWeb(HttpServletRequest request, HttpServletResponse response, @RequestBody Map<String, Object> map) {
        Map<String, Object> result = new HashMap<String, Object>();
        try {


            int flag = ebookArticleService.updateByMap(map);
            if (1 <= flag) {
                result.put(DATASUCCESS, SUCCESSFLAG);
                result.put(DATAMESSAGE, UPDATE_SUCCESS_MSG);
            } else {
                result.put(DATASUCCESS, ERRORFLAG);
                result.put(DATAMESSAGE, UPDATE_FAIL_MSG);
            }

        } catch (Exception e) {
            result.put(DATASUCCESS, ERRORFLAG);
            result.put(DATAMESSAGE, UPDATE_FAIL_MSG + e.getMessage());
        }
        return result;
    }

    @PostMapping("/getOne")
    @ApiOperation(value = "根据-{在线电子写作表}-对象Map查询记录", notes = "成功返回:{\"success\":true,\"message\",\"数据查询成功\",\"datarecord\":\"{}\"},失败返回:{\"success\":false,\"message\",\"数据查询失败\"}")
    @ApiImplicitParams({
            @ApiImplicitParam(paramType = "body", name = "id", value = "文章编号", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "article_title", value = "文章标题", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "article_class_id", value = "文章分类编号", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_origin", value = "文章来源", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "article_origin_address", value = "文章来源链接", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "article_author", value = "文章作者", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "article_abstract", value = "文章摘要", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "article_content", value = "文章正文", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "article_image", value = "文章图片", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "article_keyword", value = "文章关键字", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "article_link", value = "相关文章", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "article_goods", value = "相关内容", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "article_start_time", value = "文章有效期开始时间", required = true, dataType = "Date", dataTypeClass = Date.class),
            @ApiImplicitParam(paramType = "body", name = "article_end_time", value = "文章有效期结束时间", required = true, dataType = "Date", dataTypeClass = Date.class),
            @ApiImplicitParam(paramType = "body", name = "article_publish_time", value = "文章发布时间", required = true, dataType = "Date", dataTypeClass = Date.class),
            @ApiImplicitParam(paramType = "body", name = "article_click", value = "文章点击量", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_sort", value = "文章排序0-255", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_commend_flag", value = "文章推荐标志0-未推荐，1-已推荐", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_comment_flag", value = "文章是否允许评论1-允许，0-不允许", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_verify_admin", value = "文章审核管理员", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "article_verify_time", value = "文章审核时间", required = true, dataType = "Date", dataTypeClass = Date.class),
            @ApiImplicitParam(paramType = "body", name = "article_state", value = "1-草稿、2-待审核、3-已发布、4-回收站", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_publisher_name", value = "发布者用户名 ", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "article_publisher_id", value = "发布者编号", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_type", value = "文章类型1-管理员发布，2-用户投稿", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_attachment_path", value = "文章附件路径", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "article_image_all", value = "文章全部图片", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "article_modify_time", value = "文章修改时间", required = true, dataType = "Date", dataTypeClass = Date.class),
            @ApiImplicitParam(paramType = "body", name = "article_tag", value = "文章标签", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "article_comment_count", value = "文章评论数", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_attitude_1", value = "文章心情1", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_attitude_2", value = "文章心情2", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_attitude_3", value = "文章心情3", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_attitude_4", value = "文章心情4", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_attitude_5", value = "文章心情5", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_attitude_6", value = "文章心情6", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_title_short", value = "文章短标题", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "article_attitude_flag", value = "文章态度开关1-允许，0-不允许", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_commend_image_flag", value = "文章推荐标志(图文)", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_share_count", value = "文章分享数", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_verify_reason", value = "审核失败原因", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "article_class_name", value = "文章分类名称", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "article_display", value = "文章是否显示", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_agree_count", value = "文章点赞数", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_title_link", value = "文章外部链接", required = true,  dataTypeClass = String.class)
    })
    @OperateLog(name = "根据-{在线电子写作表}-对象Map查询记录", value = "query", type = "PC")
    public Map<String, Object> getOneForEbookArticleForWeb(HttpServletRequest request, HttpServletResponse response, @RequestBody Map<String, Object> map) {
        Map<String, Object> result = new HashMap<String, Object>();
        try {

            result.put(DATASUCCESS, SUCCESSFLAG);
            result.put(DATAMESSAGE, QUERY_SUCCESS_MSG);
            result.put(DATARECORD, ebookArticleService.getOne(map));
        } catch (Exception e) {
            result.put(DATASUCCESS, ERRORFLAG);
            result.put(DATAMESSAGE, QUERY_FAIL_MSG + e.getMessage());
        }
        return result;
    }

    @PostMapping("/getAll")
    @ApiOperation(value = "根据-{在线电子写作表}-对象Map查询所有记录", notes = "成功返回:{\"success\":true,\"message\",\"数据查询成功\",\"data\":\"[]\"},失败返回:{\"success\":false,\"message\",\"数据查询失败\"}")
    @ApiImplicitParams({
            @ApiImplicitParam(paramType = "body", name = "id", value = "文章编号", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "article_title", value = "文章标题", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "article_class_id", value = "文章分类编号", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_origin", value = "文章来源", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "article_origin_address", value = "文章来源链接", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "article_author", value = "文章作者", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "article_abstract", value = "文章摘要", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "article_content", value = "文章正文", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "article_image", value = "文章图片", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "article_keyword", value = "文章关键字", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "article_link", value = "相关文章", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "article_goods", value = "相关内容", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "article_start_time", value = "文章有效期开始时间", required = true, dataType = "Date", dataTypeClass = Date.class),
            @ApiImplicitParam(paramType = "body", name = "article_end_time", value = "文章有效期结束时间", required = true, dataType = "Date", dataTypeClass = Date.class),
            @ApiImplicitParam(paramType = "body", name = "article_publish_time", value = "文章发布时间", required = true, dataType = "Date", dataTypeClass = Date.class),
            @ApiImplicitParam(paramType = "body", name = "article_click", value = "文章点击量", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_sort", value = "文章排序0-255", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_commend_flag", value = "文章推荐标志0-未推荐，1-已推荐", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_comment_flag", value = "文章是否允许评论1-允许，0-不允许", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_verify_admin", value = "文章审核管理员", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "article_verify_time", value = "文章审核时间", required = true, dataType = "Date", dataTypeClass = Date.class),
            @ApiImplicitParam(paramType = "body", name = "article_state", value = "1-草稿、2-待审核、3-已发布、4-回收站", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_publisher_name", value = "发布者用户名 ", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "article_publisher_id", value = "发布者编号", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_type", value = "文章类型1-管理员发布，2-用户投稿", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_attachment_path", value = "文章附件路径", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "article_image_all", value = "文章全部图片", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "article_modify_time", value = "文章修改时间", required = true, dataType = "Date", dataTypeClass = Date.class),
            @ApiImplicitParam(paramType = "body", name = "article_tag", value = "文章标签", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "article_comment_count", value = "文章评论数", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_attitude_1", value = "文章心情1", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_attitude_2", value = "文章心情2", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_attitude_3", value = "文章心情3", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_attitude_4", value = "文章心情4", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_attitude_5", value = "文章心情5", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_attitude_6", value = "文章心情6", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_title_short", value = "文章短标题", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "article_attitude_flag", value = "文章态度开关1-允许，0-不允许", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_commend_image_flag", value = "文章推荐标志(图文)", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_share_count", value = "文章分享数", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_verify_reason", value = "审核失败原因", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "article_class_name", value = "文章分类名称", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "article_display", value = "文章是否显示", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_agree_count", value = "文章点赞数", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_title_link", value = "文章外部链接", required = true,  dataTypeClass = String.class)
    })
    @OperateLog(name = "根据-{在线电子写作表}-对象Map查询所有记录", value = "query", type = "PC")
    public Map<String, Object> getAllForEbookArticleForWeb(HttpServletRequest request, HttpServletResponse response, @RequestBody Map<String, Object> map) {
        Map<String, Object> result = new HashMap<String, Object>();
        try {

            result.put(DATASUCCESS, SUCCESSFLAG);
            result.put(DATAMESSAGE, QUERY_SUCCESS_MSG);
            result.put(DATALIST, ebookArticleService.getAll(map));
        } catch (Exception e) {
            result.put(DATASUCCESS, ERRORFLAG);
            result.put(DATAMESSAGE, QUERY_FAIL_MSG + e.getMessage());
        }
        return result;
    }

    @PostMapping("/queryPage")
    @ApiOperation(value = "根据-{在线电子写作表}-对象Map分页记录", notes = "成功返回:{\"success\":true,\"message\",\"数据查询成功\",\"data\":\"[]\"},失败返回:{\"success\":false,\"message\",\"数据查询失败\"}")
    @ApiImplicitParams({
            @ApiImplicitParam(paramType = "body", name = "id", value = "文章编号", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "article_title", value = "文章标题", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "article_class_id", value = "文章分类编号", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_origin", value = "文章来源", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "article_origin_address", value = "文章来源链接", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "article_author", value = "文章作者", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "article_abstract", value = "文章摘要", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "article_content", value = "文章正文", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "article_image", value = "文章图片", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "article_keyword", value = "文章关键字", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "article_link", value = "相关文章", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "article_goods", value = "相关内容", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "article_start_time", value = "文章有效期开始时间", required = true, dataType = "Date", dataTypeClass = Date.class),
            @ApiImplicitParam(paramType = "body", name = "article_end_time", value = "文章有效期结束时间", required = true, dataType = "Date", dataTypeClass = Date.class),
            @ApiImplicitParam(paramType = "body", name = "article_publish_time", value = "文章发布时间", required = true, dataType = "Date", dataTypeClass = Date.class),
            @ApiImplicitParam(paramType = "body", name = "article_click", value = "文章点击量", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_sort", value = "文章排序0-255", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_commend_flag", value = "文章推荐标志0-未推荐，1-已推荐", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_comment_flag", value = "文章是否允许评论1-允许，0-不允许", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_verify_admin", value = "文章审核管理员", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "article_verify_time", value = "文章审核时间", required = true, dataType = "Date", dataTypeClass = Date.class),
            @ApiImplicitParam(paramType = "body", name = "article_state", value = "1-草稿、2-待审核、3-已发布、4-回收站", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_publisher_name", value = "发布者用户名 ", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "article_publisher_id", value = "发布者编号", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_type", value = "文章类型1-管理员发布，2-用户投稿", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_attachment_path", value = "文章附件路径", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "article_image_all", value = "文章全部图片", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "article_modify_time", value = "文章修改时间", required = true, dataType = "Date", dataTypeClass = Date.class),
            @ApiImplicitParam(paramType = "body", name = "article_tag", value = "文章标签", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "article_comment_count", value = "文章评论数", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_attitude_1", value = "文章心情1", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_attitude_2", value = "文章心情2", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_attitude_3", value = "文章心情3", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_attitude_4", value = "文章心情4", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_attitude_5", value = "文章心情5", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_attitude_6", value = "文章心情6", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_title_short", value = "文章短标题", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "article_attitude_flag", value = "文章态度开关1-允许，0-不允许", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_commend_image_flag", value = "文章推荐标志(图文)", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_share_count", value = "文章分享数", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_verify_reason", value = "审核失败原因", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "article_class_name", value = "文章分类名称", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "article_display", value = "文章是否显示", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_agree_count", value = "文章点赞数", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_title_link", value = "文章外部链接", required = true,  dataTypeClass = String.class)
    })
    @OperateLog(name = "根据-{在线电子写作表}-对象Map分页记录", value = "query", type = "PC")
    public Map<String, Object> queryPageForEbookArticleForWeb(HttpServletRequest request, HttpServletResponse response, @RequestBody Map<String, Object> map) {
        Map<String, Object> result = new HashMap<String, Object>();
        try {

            int currentPage = map.get(DATACURRENT) != null ? Integer.parseInt(map.get(DATACURRENT) + "") - 1 : 0;
            int pageSize = map.get(PAGESIZE) != null ? Integer.parseInt(map.get(PAGESIZE) + "") : 10;
            int pageStart = currentPage * pageSize;

            map.put(PAGESIZE, pageSize);
            map.put(PAGESTART, pageStart);
            map.put("dynamicSql", "and article_state != 4");

            int total = ebookArticleService.count(map);
            List<Map<String, Object>> datalist = new ArrayList<Map<String, Object>>();
            if (total > 0) {
                datalist = ebookArticleService.queryPage(map);
            }
            result.put(DATASUCCESS, SUCCESSFLAG);
            result.put(DATAMESSAGE, QUERY_SUCCESS_MSG);
            result.put(DATALIST, datalist);
            Map<String, Object> pagemode = new HashMap<String, Object>();
            pagemode.put(DATATOTAL, total);
            pagemode.put(PAGESIZE, map.get(PAGESIZE) != null ? map.get(PAGESIZE) : 10);
            pagemode.put(DATACURRENT, map.get(DATACURRENT) != null ? map.get(DATACURRENT) : 0);
            result.put(PAGINATION, pagemode);
        } catch (Exception e) {
            result.put(DATASUCCESS, ERRORFLAG);
            result.put(DATAMESSAGE, QUERY_FAIL_MSG + e.getMessage());
        }
        return result;
    }

    @PostMapping("/count")
    @ApiOperation(value = "根据-{在线电子写作表}-对象Map统计查询总数记录", notes = "成功返回:{\"success\":true,\"message\",\"数据查询成功\",\"data\":\"[]\"},失败返回:{\"success\":false,\"message\",\"数据查询失败\"}")
    @ApiImplicitParams({
            @ApiImplicitParam(paramType = "body", name = "id", value = "文章编号", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "article_title", value = "文章标题", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "article_class_id", value = "文章分类编号", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_origin", value = "文章来源", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "article_origin_address", value = "文章来源链接", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "article_author", value = "文章作者", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "article_abstract", value = "文章摘要", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "article_content", value = "文章正文", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "article_image", value = "文章图片", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "article_keyword", value = "文章关键字", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "article_link", value = "相关文章", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "article_goods", value = "相关内容", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "article_start_time", value = "文章有效期开始时间", required = true, dataType = "Date", dataTypeClass = Date.class),
            @ApiImplicitParam(paramType = "body", name = "article_end_time", value = "文章有效期结束时间", required = true, dataType = "Date", dataTypeClass = Date.class),
            @ApiImplicitParam(paramType = "body", name = "article_publish_time", value = "文章发布时间", required = true, dataType = "Date", dataTypeClass = Date.class),
            @ApiImplicitParam(paramType = "body", name = "article_click", value = "文章点击量", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_sort", value = "文章排序0-255", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_commend_flag", value = "文章推荐标志0-未推荐，1-已推荐", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_comment_flag", value = "文章是否允许评论1-允许，0-不允许", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_verify_admin", value = "文章审核管理员", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "article_verify_time", value = "文章审核时间", required = true, dataType = "Date", dataTypeClass = Date.class),
            @ApiImplicitParam(paramType = "body", name = "article_state", value = "1-草稿、2-待审核、3-已发布、4-回收站", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_publisher_name", value = "发布者用户名 ", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "article_publisher_id", value = "发布者编号", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_type", value = "文章类型1-管理员发布，2-用户投稿", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_attachment_path", value = "文章附件路径", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "article_image_all", value = "文章全部图片", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "article_modify_time", value = "文章修改时间", required = true, dataType = "Date", dataTypeClass = Date.class),
            @ApiImplicitParam(paramType = "body", name = "article_tag", value = "文章标签", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "article_comment_count", value = "文章评论数", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_attitude_1", value = "文章心情1", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_attitude_2", value = "文章心情2", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_attitude_3", value = "文章心情3", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_attitude_4", value = "文章心情4", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_attitude_5", value = "文章心情5", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_attitude_6", value = "文章心情6", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_title_short", value = "文章短标题", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "article_attitude_flag", value = "文章态度开关1-允许，0-不允许", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_commend_image_flag", value = "文章推荐标志(图文)", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_share_count", value = "文章分享数", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_verify_reason", value = "审核失败原因", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "article_class_name", value = "文章分类名称", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "article_display", value = "文章是否显示", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_agree_count", value = "文章点赞数", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_title_link", value = "文章外部链接", required = true,  dataTypeClass = String.class)
    })
    @OperateLog(name = "根据-{在线电子写作表}-对象Map统计查询总数记录", value = "query", type = "PC")
    public Map<String, Object> countForEbookArticleForWeb(HttpServletRequest request, HttpServletResponse response, @RequestBody Map<String, Object> map) {
        Map<String, Object> result = new HashMap<String, Object>();
        try {

            result.put(DATASUCCESS, SUCCESSFLAG);
            result.put(DATAMESSAGE, QUERY_SUCCESS_MSG);
            result.put(DATATOTAL, ebookArticleService.count(map));
        } catch (Exception e) {
            result.put(DATASUCCESS, ERRORFLAG);
            result.put(DATAMESSAGE, QUERY_FAIL_MSG + e.getMessage());
        }
        return result;
    }

    @PostMapping("/insertBatch")
    @ApiOperation(value = "根据-{在线电子写作表}-对象Map批量插入记录", notes = "成功返回:{\"success\":true,\"message\",\"数据插入成功\"},失败返回:{\"success\":false,\"message\",\"数据插入失败\"}")
    @ApiImplicitParams({
            @ApiImplicitParam(paramType = "body", name = "id", value = "文章编号", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "article_title", value = "文章标题", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "article_class_id", value = "文章分类编号", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_origin", value = "文章来源", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "article_origin_address", value = "文章来源链接", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "article_author", value = "文章作者", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "article_abstract", value = "文章摘要", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "article_content", value = "文章正文", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "article_image", value = "文章图片", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "article_keyword", value = "文章关键字", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "article_link", value = "相关文章", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "article_goods", value = "相关内容", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "article_start_time", value = "文章有效期开始时间", required = true, dataType = "Date", dataTypeClass = Date.class),
            @ApiImplicitParam(paramType = "body", name = "article_end_time", value = "文章有效期结束时间", required = true, dataType = "Date", dataTypeClass = Date.class),
            @ApiImplicitParam(paramType = "body", name = "article_publish_time", value = "文章发布时间", required = true, dataType = "Date", dataTypeClass = Date.class),
            @ApiImplicitParam(paramType = "body", name = "article_click", value = "文章点击量", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_sort", value = "文章排序0-255", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_commend_flag", value = "文章推荐标志0-未推荐，1-已推荐", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_comment_flag", value = "文章是否允许评论1-允许，0-不允许", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_verify_admin", value = "文章审核管理员", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "article_verify_time", value = "文章审核时间", required = true, dataType = "Date", dataTypeClass = Date.class),
            @ApiImplicitParam(paramType = "body", name = "article_state", value = "1-草稿、2-待审核、3-已发布、4-回收站", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_publisher_name", value = "发布者用户名 ", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "article_publisher_id", value = "发布者编号", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_type", value = "文章类型1-管理员发布，2-用户投稿", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_attachment_path", value = "文章附件路径", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "article_image_all", value = "文章全部图片", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "article_modify_time", value = "文章修改时间", required = true, dataType = "Date", dataTypeClass = Date.class),
            @ApiImplicitParam(paramType = "body", name = "article_tag", value = "文章标签", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "article_comment_count", value = "文章评论数", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_attitude_1", value = "文章心情1", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_attitude_2", value = "文章心情2", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_attitude_3", value = "文章心情3", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_attitude_4", value = "文章心情4", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_attitude_5", value = "文章心情5", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_attitude_6", value = "文章心情6", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_title_short", value = "文章短标题", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "article_attitude_flag", value = "文章态度开关1-允许，0-不允许", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_commend_image_flag", value = "文章推荐标志(图文)", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_share_count", value = "文章分享数", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_verify_reason", value = "审核失败原因", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "article_class_name", value = "文章分类名称", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "article_display", value = "文章是否显示", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_agree_count", value = "文章点赞数", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_title_link", value = "文章外部链接", required = true,  dataTypeClass = String.class)
    })
    @OperateLog(name = "根据-{在线电子写作表}-对象Map批量插入记录", value = "insert", type = "PC")
    public Map<String, Object> insertBatchForEbookArticleForWeb(HttpServletRequest request, HttpServletResponse response, @RequestBody List<Map<String, Object>> list) {
        Map<String, Object> result = new HashMap<String, Object>();
        try {

            for (Map<String, Object> map : list) {
                map.put("id", UUID.randomUUID().toString().replaceAll("-", ""));
            }

            ebookArticleService.insertBatch(list);
            result.put(DATASUCCESS, SUCCESSFLAG);
            result.put(DATAMESSAGE, INSERT_SUCCESS_MSG);
        } catch (Exception e) {
            result.put(DATASUCCESS, ERRORFLAG);
            result.put(DATAMESSAGE, INSERT_FAIL_MSG + e.getMessage());
        }
        return result;
    }

    @PostMapping("/deleteBatch")
    @ApiOperation(value = "根据-{在线电子写作表}-对象Map批量删除记录", notes = "成功返回:{\"success\":true,\"message\",\"数据删除成功\"},失败返回:{\"success\":false,\"message\",\"数据删除失败\"}")
    @ApiImplicitParams({
            @ApiImplicitParam(paramType = "body", name = "id", value = "文章编号", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "article_title", value = "文章标题", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "article_class_id", value = "文章分类编号", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_origin", value = "文章来源", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "article_origin_address", value = "文章来源链接", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "article_author", value = "文章作者", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "article_abstract", value = "文章摘要", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "article_content", value = "文章正文", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "article_image", value = "文章图片", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "article_keyword", value = "文章关键字", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "article_link", value = "相关文章", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "article_goods", value = "相关内容", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "article_start_time", value = "文章有效期开始时间", required = true, dataType = "Date", dataTypeClass = Date.class),
            @ApiImplicitParam(paramType = "body", name = "article_end_time", value = "文章有效期结束时间", required = true, dataType = "Date", dataTypeClass = Date.class),
            @ApiImplicitParam(paramType = "body", name = "article_publish_time", value = "文章发布时间", required = true, dataType = "Date", dataTypeClass = Date.class),
            @ApiImplicitParam(paramType = "body", name = "article_click", value = "文章点击量", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_sort", value = "文章排序0-255", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_commend_flag", value = "文章推荐标志0-未推荐，1-已推荐", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_comment_flag", value = "文章是否允许评论1-允许，0-不允许", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_verify_admin", value = "文章审核管理员", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "article_verify_time", value = "文章审核时间", required = true, dataType = "Date", dataTypeClass = Date.class),
            @ApiImplicitParam(paramType = "body", name = "article_state", value = "1-草稿、2-待审核、3-已发布、4-回收站", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_publisher_name", value = "发布者用户名 ", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "article_publisher_id", value = "发布者编号", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_type", value = "文章类型1-管理员发布，2-用户投稿", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_attachment_path", value = "文章附件路径", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "article_image_all", value = "文章全部图片", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "article_modify_time", value = "文章修改时间", required = true, dataType = "Date", dataTypeClass = Date.class),
            @ApiImplicitParam(paramType = "body", name = "article_tag", value = "文章标签", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "article_comment_count", value = "文章评论数", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_attitude_1", value = "文章心情1", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_attitude_2", value = "文章心情2", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_attitude_3", value = "文章心情3", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_attitude_4", value = "文章心情4", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_attitude_5", value = "文章心情5", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_attitude_6", value = "文章心情6", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_title_short", value = "文章短标题", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "article_attitude_flag", value = "文章态度开关1-允许，0-不允许", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_commend_image_flag", value = "文章推荐标志(图文)", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_share_count", value = "文章分享数", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_verify_reason", value = "审核失败原因", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "article_class_name", value = "文章分类名称", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "article_display", value = "文章是否显示", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_agree_count", value = "文章点赞数", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_title_link", value = "文章外部链接", required = true,  dataTypeClass = String.class)
    })
    @OperateLog(name = "根据-{在线电子写作表}-对象Map批量删除记录", value = "delete", type = "PC")
    public Map<String, Object> deleteBatchForEbookArticleForWeb(HttpServletRequest request, HttpServletResponse response, @RequestBody List<Map<String, Object>> list) {
        Map<String, Object> result = new HashMap<String, Object>();
        try {
            ebookArticleService.deleteBatch(list);
            result.put(DATASUCCESS, SUCCESSFLAG);
            result.put(DATAMESSAGE, DELETE_SUCCESS_MSG);

        } catch (Exception e) {
            result.put(DATASUCCESS, ERRORFLAG);
            result.put(DATAMESSAGE, DELETE_FAIL_MSG + e.getMessage());
        }
        return result;
    }

    @PostMapping("/updateBatch")
    @ApiOperation(value = "根据-{在线电子写作表}-对象Map批量更新记录", notes = "成功返回:{\"success\":true,\"message\",\"数据更新成功\"},失败返回:{\"success\":false,\"message\",\"数据更新失败\"}")
    @ApiImplicitParams({
            @ApiImplicitParam(paramType = "body", name = "id", value = "文章编号", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "article_title", value = "文章标题", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "article_class_id", value = "文章分类编号", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_origin", value = "文章来源", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "article_origin_address", value = "文章来源链接", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "article_author", value = "文章作者", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "article_abstract", value = "文章摘要", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "article_content", value = "文章正文", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "article_image", value = "文章图片", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "article_keyword", value = "文章关键字", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "article_link", value = "相关文章", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "article_goods", value = "相关内容", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "article_start_time", value = "文章有效期开始时间", required = true, dataType = "Date", dataTypeClass = Date.class),
            @ApiImplicitParam(paramType = "body", name = "article_end_time", value = "文章有效期结束时间", required = true, dataType = "Date", dataTypeClass = Date.class),
            @ApiImplicitParam(paramType = "body", name = "article_publish_time", value = "文章发布时间", required = true, dataType = "Date", dataTypeClass = Date.class),
            @ApiImplicitParam(paramType = "body", name = "article_click", value = "文章点击量", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_sort", value = "文章排序0-255", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_commend_flag", value = "文章推荐标志0-未推荐，1-已推荐", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_comment_flag", value = "文章是否允许评论1-允许，0-不允许", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_verify_admin", value = "文章审核管理员", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "article_verify_time", value = "文章审核时间", required = true, dataType = "Date", dataTypeClass = Date.class),
            @ApiImplicitParam(paramType = "body", name = "article_state", value = "1-草稿、2-待审核、3-已发布、4-回收站", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_publisher_name", value = "发布者用户名 ", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "article_publisher_id", value = "发布者编号", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_type", value = "文章类型1-管理员发布，2-用户投稿", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_attachment_path", value = "文章附件路径", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "article_image_all", value = "文章全部图片", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "article_modify_time", value = "文章修改时间", required = true, dataType = "Date", dataTypeClass = Date.class),
            @ApiImplicitParam(paramType = "body", name = "article_tag", value = "文章标签", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "article_comment_count", value = "文章评论数", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_attitude_1", value = "文章心情1", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_attitude_2", value = "文章心情2", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_attitude_3", value = "文章心情3", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_attitude_4", value = "文章心情4", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_attitude_5", value = "文章心情5", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_attitude_6", value = "文章心情6", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_title_short", value = "文章短标题", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "article_attitude_flag", value = "文章态度开关1-允许，0-不允许", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_commend_image_flag", value = "文章推荐标志(图文)", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_share_count", value = "文章分享数", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_verify_reason", value = "审核失败原因", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "article_class_name", value = "文章分类名称", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "article_display", value = "文章是否显示", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_agree_count", value = "文章点赞数", required = true, dataType = "int", dataTypeClass = int.class),
            @ApiImplicitParam(paramType = "body", name = "article_title_link", value = "文章外部链接", required = true,  dataTypeClass = String.class)
    })
    @OperateLog(name = "根据-{在线电子写作表}-对象Map批量更新记录", value = "update", type = "PC")
    public Map<String, Object> updateBatchForEbookArticleForWeb(HttpServletRequest request, HttpServletResponse response, @RequestBody List<Map<String, Object>> list) {
        Map<String, Object> result = new HashMap<String, Object>();
        try {


            ebookArticleService.updateBatch(list);
            result.put(DATASUCCESS, SUCCESSFLAG);
            result.put(DATAMESSAGE, UPDATE_SUCCESS_MSG);

        } catch (Exception e) {
            result.put(DATASUCCESS, ERRORFLAG);
            result.put(DATAMESSAGE, UPDATE_FAIL_MSG + e.getMessage());
        }
        return result;
    }



        /*@PostMapping("/uploadSingleForEbookArticle")
        // If not @RestController, uncomment this
        //@ResponseBody
        public Map<String, Object> uploadSingleForEbookArticle(
                @RequestParam("articleid") String articleid,
                @RequestParam("file") MultipartFile uploadfile) {
                Map<String, Object> result = new HashMap<String, Object>();


                try {


                        if (uploadfile.isEmpty()) {
                                result.put(DATASUCCESS, ERRORFLAG);
                                result.put(DATAMESSAGE, UPLOAD_FAIL_MSG+"file不能为空");
                                return result;
                        }



                        String ArticleID = articleid+"";
                        if(ArticleID.equals("")){
                                result.put(DATASUCCESS, ERRORFLAG);
                                result.put(DATAMESSAGE, UPLOAD_FAIL_MSG+"记录ArticleID不能为空");
                                return result;
                        }
                        Map<String, Object> temmap = ebookArticleService.selectByPrimaryKey(ArticleID);

                        if(null== temmap || temmap.size()==0){
                                result.put(DATASUCCESS, ERRORFLAG);
                                result.put(DATAMESSAGE, UPLOAD_FAIL_MSG+ArticleID+"记录不存在");
                                return result;
                        }

                        String ID = UUID.randomUUID().toString().replaceAll("-","")+"";
                        String realpath = sysFilePath+imagesFilePath+sdf.format(new Date())+ File.separator+ArticleID;

                        File   pfile = new File(realpath);
                        if(!pfile.exists()){pfile.mkdirs();}

                        String fileName = uploadfile.getOriginalFilename();
                        String suffix = fileName.substring(fileName.lastIndexOf(".") + 1);
                        String  filepath= realpath+File.separator+ID+"."+suffix;


                        String webpath = cdnPath+imagesFilePath+sdf.format(new Date())+File.separator+ArticleID+File.separator+ID+"."+suffix;
                        byte[] bytes = uploadfile.getBytes();
                        Path path = Paths.get(filepath);
                        Files.write(path, bytes);



                        Map<String,Object> image = new HashMap<String,Object>();
                        image.put("id",ID);
                        image.put("goods_image",imagesFilePath+sdf.format(new Date())+File.separator+ArticleID+File.separator+ID+"."+suffix);
                        image.put("article_id",ID);
                        ebookArticlePhotosService.insert(image);

                        result.put(DATASUCCESS, SUCCESSFLAG);
                        result.put(DATAMESSAGE, UPLOAD_SUCCESS_MSG);
                        result.put("url",webpath);

                } catch (IOException e) {
                        result.put(DATASUCCESS, ERRORFLAG);
                        result.put(DATAMESSAGE, UPLOAD_FAIL_MSG+e.getMessage());
                }

                return result;

        }*/

    @PostMapping("/getPageProEbookArticleByLevelCode")
    @ApiOperation(value = "根据文章分类代码查询文章列表", notes = "成功返回:{\"success\":true,\"message\",\"数据查询成功\",\"data\":\"[]\"},失败返回:{\"success\":false,\"message\",\"数据查询失败\"}")
    @ApiImplicitParams({
            @ApiImplicitParam(paramType = "body", name = "articleClassId", value = "文章分类代码", required = true,  dataTypeClass = String.class)
    })
    @OperateLog(name = "根据文章分类代码查询文章列表", value = "query", type = "PC")
    public Map<String, Object> getPageProEbookArticleByLevelCode(HttpServletRequest request, HttpServletResponse response, @RequestBody Map<String, Object> map) {
        Map<String, Object> result = new HashMap<String, Object>();
        try {

            int currentPage = map.get(DATACURRENT) != null ? Integer.parseInt(map.get(DATACURRENT) + "") - 1 : 0;
            int pageSize = map.get(PAGESIZE) != null ? Integer.parseInt(map.get(PAGESIZE) + "") : 10;
            int pageStart = currentPage * pageSize;

            map.put(PAGESIZE, pageSize);
            map.put(PAGESTART, pageStart);

            int total = ebookArticleService.getCountProEbookArticleByLevelCode(map);
            List<Map<String, Object>> datalist = new ArrayList<Map<String, Object>>();
            if (total > 0) {
                datalist = ebookArticleService.getPageProEbookArticleByLevelCode(map);
            }
            result.put(DATASUCCESS, SUCCESSFLAG);
            result.put(DATAMESSAGE, QUERY_SUCCESS_MSG);
            result.put(DATALIST, datalist);
            Map<String, Object> pagemode = new HashMap<String, Object>();
            pagemode.put(DATATOTAL, total);
            pagemode.put(PAGESIZE, map.get(PAGESIZE) != null ? map.get(PAGESIZE) : 10);
            pagemode.put(DATACURRENT, map.get(DATACURRENT) != null ? map.get(DATACURRENT) : 0);
            result.put(PAGINATION, pagemode);

        } catch (Exception e) {
            result.put(DATASUCCESS, ERRORFLAG);
            result.put(DATAMESSAGE, QUERY_FAIL_MSG + e.getMessage());
        }
        return result;
    }


}
