jyy
2021-01-26 2c25c956ee0dc781500c70c7479c36f8b58f3445
1、修改文章bug
10 files modified
149 ■■■■ changed files
zq-erp/pom.xml 2 ●●● patch | view | raw | blame | history
zq-erp/src/main/java/com/matrix/system/app/action/ApiKnowledgeAction.java 5 ●●●● patch | view | raw | blame | history
zq-erp/src/main/java/com/matrix/system/app/action/ApiServiceOrderAction.java 2 ●●● patch | view | raw | blame | history
zq-erp/src/main/java/com/matrix/system/hive/action/ArticleController.java 8 ●●●● patch | view | raw | blame | history
zq-erp/src/main/java/com/matrix/system/hive/bean/Article.java 10 ●●●● patch | view | raw | blame | history
zq-erp/src/main/java/com/matrix/system/hive/dao/ArticleDao.java 1 ●●●● patch | view | raw | blame | history
zq-erp/src/main/resources/mybatis/mapper/hive/ArticleDao.xml 35 ●●●● patch | view | raw | blame | history
zq-erp/src/main/resources/mybatis/mapper/hive/ArticleTypeDao.xml 2 ●●● patch | view | raw | blame | history
zq-erp/src/main/resources/templates/views/admin/hive/operate/trainingMaterialsManage-form.html 71 ●●●●● patch | view | raw | blame | history
zq-xcx/project.config.json 13 ●●●● patch | view | raw | blame | history
zq-erp/pom.xml
@@ -391,10 +391,10 @@
                    <exclude>config/xcx/*</exclude>
                    <!--
                    <exclude>config/config.json</exclude>
                    <exclude>config/application.properties</exclude>
                    <exclude>config/system.properties</exclude>
                    -->
zq-erp/src/main/java/com/matrix/system/app/action/ApiKnowledgeAction.java
@@ -4,9 +4,11 @@
import com.matrix.core.pojo.PaginationVO;
import com.matrix.system.app.dto.ArticleListDto;
import com.matrix.system.hive.action.BaseController;
import com.matrix.system.hive.action.util.QueryUtil;
import com.matrix.system.hive.bean.Article;
import com.matrix.system.hive.bean.ArticleType;
import com.matrix.system.hive.bean.SysShopInfo;
import com.matrix.system.hive.dao.ArticleDao;
import com.matrix.system.hive.dao.SysShopInfoDao;
import com.matrix.system.hive.service.ArticleService;
import com.matrix.system.hive.service.ArticleTypeService;
@@ -27,6 +29,7 @@
    @Autowired
    private ArticleTypeService articleTypeService;
    @Autowired
    private ArticleService articleService;
@@ -35,7 +38,6 @@
    public AjaxResult findKnowledgeType() {
        ArticleType type = new ArticleType();
        type.setCompanyId(getMe().getCompanyId());
        type.setParentId(0L);
        return AjaxResult.buildSuccessInstance(articleTypeService.findByModel(type));
    }
@@ -47,6 +49,7 @@
        pageVo.setLimit(articleListDto.getPageSize());
        Article article = new Article();
        QueryUtil.setQueryLimitCom(article);
        article.setTypeId(articleListDto.getTypeId());
        return AjaxResult.buildSuccessInstance(articleService.findApiArticleListInPage(article, pageVo));
    }
zq-erp/src/main/java/com/matrix/system/app/action/ApiServiceOrderAction.java
@@ -20,6 +20,7 @@
import com.matrix.system.common.bean.SysUsers;
import com.matrix.system.common.tools.DataAuthUtil;
import com.matrix.system.constance.Dictionary;
import com.matrix.system.hive.action.util.QueryUtil;
import com.matrix.system.hive.bean.SysBeauticianState;
import com.matrix.system.hive.bean.SysProjServices;
import com.matrix.system.hive.bean.SysProjUse;
@@ -213,7 +214,6 @@
        if (!DataAuthUtil.hasAllShopAuth()) {
            SysUsers user = WebUtil.getSessionAttribute(MatrixConstance.LOGIN_KEY);
            orderListDto.setShopId(user.getShopId());
            orderListDto.setUserId(user.getSuId());
        }
        return AjaxResult.buildSuccessInstance(projServicesService.findApiServiceOrderListInPage(orderListDto, pageVo), projServicesService.findApiServiceOrderListTotal(orderListDto));
    }
zq-erp/src/main/java/com/matrix/system/hive/action/ArticleController.java
@@ -49,7 +49,7 @@
    AjaxResult showList(Article article, PaginationVO pageVo) {
        article.setType(Dictionary.ARTICEL_TYPE_NAME_SCWZ);
        SysUsers users = WebUtil.getSessionAttribute(MatrixConstance.LOGIN_KEY);
        article.setShopId(users.getShopId());
        article.setCompanyId(users.getCompanyId());
        return showList(currentService, article, pageVo);
    }
    
@@ -61,7 +61,7 @@
        article.setType(Dictionary.ARTICEL_TYPE_NAME_MDXY);
        SysUsers users = WebUtil.getSessionAttribute(MatrixConstance.LOGIN_KEY);
        article.setShopId(users.getShopId());
        article.setCompanyId(users.getCompanyId());
        return showList(currentService, article, pageVo);
        //return new AjaxResult(AjaxResult.STATUS_SUCCESS, currentService.findInPage(article, pageVo),currentService.findTotal(article));
    }
@@ -73,7 +73,7 @@
    public @ResponseBody AjaxResult queryAll(Article article, PaginationVO pageVo) {
        article.setType(Dictionary.ARTICEL_TYPE_NAME_WXXMWZ);
        SysUsers users = WebUtil.getSessionAttribute(MatrixConstance.LOGIN_KEY);
        article.setShopId(users.getShopId());
        article.setCompanyId(users.getCompanyId());
        return showList(currentService, article, pageVo);
        //return new AjaxResult(AjaxResult.STATUS_SUCCESS, currentService.findInPage(article, pageVo),currentService.findTotal(article));
    }
@@ -99,7 +99,7 @@
       @RemoveRequestToken
    public @ResponseBody AjaxResult addOrModify(Article article) {
        SysUsers users = WebUtil.getSessionAttribute(MatrixConstance.LOGIN_KEY);
        article.setShopId(users.getShopId());
        article.setCompanyId(users.getCompanyId());
        if (article.getId() != null) {
            return modify(currentService, article, "文章");
        } else {
zq-erp/src/main/java/com/matrix/system/hive/bean/Article.java
@@ -96,14 +96,14 @@
     */
    private Integer commentNum;
    private Long shopId;
    private Long companyId;
    public Long getShopId() {
        return shopId;
    public Long getCompanyId() {
        return companyId;
    }
    public void setShopId(Long shopId) {
        this.shopId = shopId;
    public void setCompanyId(Long companyId) {
        this.companyId = companyId;
    }
    public Integer getCommentNum() {
zq-erp/src/main/java/com/matrix/system/hive/dao/ArticleDao.java
@@ -2,6 +2,7 @@
import com.matrix.core.pojo.PaginationVO;
import com.matrix.system.hive.bean.Article;
import com.matrix.system.hive.bean.ArticleType;
import org.apache.ibatis.annotations.Param;
import java.util.List;
zq-erp/src/main/resources/mybatis/mapper/hive/ArticleDao.xml
@@ -16,7 +16,7 @@
            <result property="sort" column="sort" />
            <result property="createtiem" column="createtiem" />
            <result property="url" column="url" />
        <result property="shopId" column="shop_id"/>
        <result property="companyId" column="company_id"/>
            
            
            <result property="articleTypeName" column="article_type_name" />
@@ -43,7 +43,7 @@
            url,
            like_number,
            classify,
            shop_id
            company_id
        )
    VALUES (
            #{id},
@@ -59,7 +59,7 @@
            #{url},
            #{likeNumber},
            #{classify},
            #{shopId}
            #{companyId}
    )
    </insert>
    
@@ -143,7 +143,7 @@
            url,
            classify,
            like_number,
            shop_id,
            company_id,
            (select article_type_name from article_type c where type_id = c.id) articleTypeName,
            (select type from article_type c where type_id = c.id) type
        from article
@@ -188,8 +188,8 @@
            <if test="record.likeNumber != null and record.likeNumber !='' ">
                and like_number = #{record.likeNumber}
            </if>
            <if test="record.shopId != null and record.shopId !='' ">
                and shop_id = #{record.shopId}
            <if test="record.companyId != null and record.companyId !='' ">
                and company_id = #{record.companyId}
            </if>
            <if test="record.type != null and record.type !='' ">
                and (select type from article_type c where type_id = c.id) = #{record.type}
@@ -228,7 +228,7 @@
            url,
            classify,
            like_number,
            shop_id,
            company_id,
            (select article_type_name from article_type c where type_id = c.id) articleTypeName,
            (select type from article_type c where type_id = c.id) type
        from article
@@ -279,8 +279,8 @@
            <if test="record.articleTypeName != null and record.url !='' ">
                and (select article_type_name from article_type c where type_id = c.id) = #{record.articleTypeName}
            </if>
            <if test="record.shopId != null and record.shopId !='' ">
                and shop_id = #{record.shopId}
            <if test="record.companyId != null and record.companyId !='' ">
                and company_id = #{record.companyId}
            </if>
        </if>
        order by type_id,sort,createtiem desc
@@ -338,8 +338,8 @@
            <if test="record.articleTypeName != null and record.url !='' ">
                and (select article_type_name from article_type c where type_id = c.id) = #{record.articleTypeName}
            </if>
            <if test="record.shopId != null and record.shopId !='' ">
                and shop_id = #{record.shopId}
            <if test="record.companyId != null and record.companyId !='' ">
                and company_id = #{record.companyId}
            </if>
        </if>
    </select>
@@ -360,11 +360,13 @@
            url,
            like_number,
            classify,
            shop_id,
            company_id,
           (select article_type_name from article_type c where type_id = c.id) articleTypeName<!-- 所属门店名称 -->
        from article
        where  id=#{id} 
    </select>    
    
    
    <!-- 根据对象查询-->
@@ -383,7 +385,7 @@
            a.url,
            a.classify,
            a.like_number,
            a.shop_id,
            a.company_id,
           (select article_type_name from article_type c where a.type_id = c.id) articleTypeName,<!-- 所属门店名称 -->
           (select count(*) from article_comment ac where ac.article_id=a.id) commentNum
        from article a
@@ -431,8 +433,8 @@
            <if test="record.articleTypeName != null and record.url !='' ">
                and (select article_type_name from article_type c where a.type_id = c.id) = #{record.articleTypeName}
            </if>
            <if test="record.shopId != null and record.shopId !='' ">
                and a.shop_id = #{record.shopId}
            <if test="record.companyId != null and record.companyId !='' ">
                and a.company_id = #{record.companyId}
            </if>
        </if>
        order by type_id,sort,createtiem desc
@@ -441,7 +443,7 @@
    <select id="selectApiArticleListInPage" resultMap="ArticleMap">
        select * from article a
        inner join article_type b on a.type_id=b.id
        where  a.type_id=#{record.typeId} or find_in_set(#{record.typeId}, b.parent_ids)
        where a.company_id=#{record.companyId} and  (a.type_id=#{record.typeId} or find_in_set(#{record.typeId}, b.parent_ids))
        order by a.createtiem desc
        <if test="pageVo !=null"><!-- 判断pageVo对象是否为空 -->
            <if test="pageVo.offset >=0  and pageVo.limit >0">
@@ -451,4 +453,5 @@
        </if>
    </select>
</mapper>
zq-erp/src/main/resources/mybatis/mapper/hive/ArticleTypeDao.xml
@@ -232,7 +232,7 @@
            <if test="record.articleTypeName != null and record.articleTypeName !='' ">
                and article_type_name = #{record.articleTypeName}
            </if>
            <if test="record.parentId != null and record.parentId !='' ">
            <if test="record.parentId != null or record.parentId ==0 ">
                and parent_id = #{record.parentId}
            </if>
            <if test="record.sort != null and record.sort !='' ">
zq-erp/src/main/resources/templates/views/admin/hive/operate/trainingMaterialsManage-form.html
@@ -13,14 +13,14 @@
            th:src="@{/js/plugin/jquery-2.1.4.min.js}"></script>
    <script type="text/javascript" th:src="@{/js/systools/MBase.js}"></script>
    <!-- 富文本编辑器 -->
    <link rel="stylesheet"
          th:href="@{/plugin/kindeditor/themes/default/default.css}"/>
    <link rel="stylesheet"
          th:href="@{/plugin/kindeditor/plugins/code/prettify.css}"/>
    <script th:src="@{/plugin/kindeditor/kindeditor.js}"></script>
    <script th:src="@{/plugin/kindeditor/lang/zh_CN.js}"></script>
    <script
            th:src="@{/plugin/kindeditor/plugins/code/prettify.js}"></script>
    <script type="text/javascript" charset="utf-8"
            th:src="@{/plugin/beditor/ueditor.config.js}"></script>
    <script type="text/javascript" charset="utf-8"
            th:src="@{/plugin/beditor/ueditor.all.js}">
    </script>
    <script type="text/javascript" charset="utf-8"
            th:src="@{/plugin/beditor/lang/zh-cn/zh-cn.js}"></script>
    <style type="text/css">
        #projBox {
            max-height: 400px;
@@ -58,10 +58,10 @@
                       th:value="${obj?.title }" datatype="*" nullmsg="标题不能为空">
            </div>
            <div class="Validform_checktip"></div>
            <label class="col-sm-2 control-label">排序<span class="text-danger">*</span></label>
            <label class="col-sm-2 control-label">排序</label>
            <div class="col-sm-3">
                <input autocomplete="off"   type="text" class="form-control" name="sort"
                       th:value="${obj?.sort }" datatype="n" nullmsg="序号不能为空"
                       th:value="${obj?.sort }" datatype="n"      ignore="ignore"
                       errormsg="序号只能为数字">
            </div>
            <div class="Validform_checktip"></div>
@@ -86,10 +86,16 @@
            <div class="col-sm-3">
                    <div th:if="${obj ne null }" class="checkbox checkbox-inline">
                        <input autocomplete="off"    name="isPublish" type="radio" id="inlineCheckbox1" value="是"   >
                        <input autocomplete="off"   th:if="${obj.isPublish eq '是' }"  checked   name="isPublish" type="radio" id="inlineCheckbox1" value="是"    >
                        <input autocomplete="off"   th:if="${obj.isPublish eq '否' }"     name="isPublish" type="radio" id="inlineCheckbox1" value="是"    >
                        <label for="inlineCheckbox1">是 </label> &nbsp;&nbsp;
                        <input autocomplete="off"    name="isPublish" type="radio" id="inlineCheckbox2" value="否">
                        <input autocomplete="off"    th:if="${obj.isPublish eq '是' }"  name="isPublish" type="radio" id="inlineCheckbox2" value="否">
                        <input autocomplete="off"    th:if="${obj.isPublish eq '否' }" checked name="isPublish" type="radio" id="inlineCheckbox2" value="否">
                        <label for="inlineCheckbox2">否 </label>
                    </div>
                    <div  th:if="${obj eq null }" class="checkbox checkbox-inline">
@@ -105,30 +111,11 @@
        <div class="form-group">
            <label class="col-sm-2 control-label">文章内容</label>
            <div class="col-sm-8">
                <textarea name="content" id="artcontent" th:text="${obj?.content}">
                </textarea>
                <script style="width: 100%; height: 500px" id="artcontent" name="content"
                        type="text/plain" th:utext="${obj?.content}" ></script>
            </div>
            <div class="Validform_checktip"></div>
        </div>
        <!--
                <div class="form-group">
                    <label class="col-sm-2 control-label">上传图片</label>
                    <div class="col-sm-9">
                        <input autocomplete="off"   onclick="MTools.chooesFile('#fileText')"
                            class="input-text upload-url radius form-control" type="text" id="showFileName"
                            readonly style="width: 30%;display: inline;">
                            <a onclick="MTools.chooesFile('#fileText')" class="btn btn-success radius">
                            <i class="fa fa-cloud-upload"></i> 浏览文件 </a>
                            <input autocomplete="off"   type="button" class='btn btn-success radius'
                            onclick="MTools.upFile('#submitBtn')" value="上传">
                             <a id="selectInServices" class="btn btn-success radius">
                             <i class="fa fa-cloud"></i> 远程图库
                        </a>
                    </div>
                </div> -->
        <div class="form-group ">
            <div class="col-sm-12 text-center">
@@ -143,11 +130,14 @@
<script type="text/javascript" th:src="@{/js/systools/MJsBase.js}"></script>
<script th:inline="javascript">
    var obj=[[${obj}]];
    var editor = null;
    //百度编辑器
    var ue = {};
    var myForm=MForm.initForm({
        invokeUrl:basePath+"/admin/article/addOrModify",
        beforeSubmit:function(){
            editor.sync();
        },
        afterSubmit:function(){
            parent.myGrid.serchData();
@@ -156,11 +146,10 @@
    $(function() {
        $(".select2").select2({'width':'100%'});
        MUI.createEdit("content", '100%', '400px', 'editor');
        MUI.openServiceImgSpace(function(url) {
            $("#img_1").attr("src", url).show();
            $("#hiddenImg").val(url);
        }, "#selectInServices");
        //初始化编辑器
        ue = UE.getEditor('artcontent');
        initFunctionList();
    });
@@ -185,7 +174,7 @@
    function autoZy() {
        var text = editor.text();
        var text = ue.getContentTxt();
        $("#zy-input").val(text.substring(0, 100));
    }
    function cleanZy() {
zq-xcx/project.config.json
@@ -45,17 +45,10 @@
  "simulatorType": "wechat",
  "simulatorPluginLibVersion": {},
  "condition": {
    "search": {
      "list": []
    },
    "conversation": {
      "list": []
    },
    "plugin": {
      "list": []
    },
    "game": {
      "currentL": -1,
      "list": []
    },
    "gamePlugin": {
@@ -216,6 +209,12 @@
          "pathName": "pages/shalong/shalongDetail",
          "query": "id=6",
          "scene": null
        },
        {
          "name": "pages/yuyue/showYyInfo",
          "pathName": "pages/yuyue/showYyInfo",
          "query": "id=3004",
          "scene": null
        }
      ]
    }