wuxw
2020-02-18 1c9c4d0b6cd221e685a30b1c8aef53349d45cde0
管理员加入商户小区开发完成
3个文件已添加
7个文件已修改
213 ■■■■ 已修改文件
Api/src/main/java/com/java110/api/listener/store/ListStoresListener.java 14 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebService/src/main/java/com/java110/web/components/community/StoresCommunityComponent.java 40 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebService/src/main/java/com/java110/web/components/store/ListStoreManageComponent.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebService/src/main/java/com/java110/web/smo/community/impl/ListCommunitysSMOImpl.java 11 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebService/src/main/java/com/java110/web/smo/store/impl/ListStoreSMOImpl.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebService/src/main/resources/components/communityPackage/storesCommunity/storesCommunity.html 65 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebService/src/main/resources/components/communityPackage/storesCommunity/storesCommunity.js 57 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebService/src/main/resources/components/paginationPackage/paginationPlus/paginationPlus.html 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebService/src/main/resources/components/storePackage/listStoreManage/listStoreManage.html 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebService/src/main/resources/components/storePackage/listStoreManage/listStoreManage.js 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Api/src/main/java/com/java110/api/listener/store/ListStoresListener.java
@@ -58,7 +58,7 @@
    @Override
    protected void validate(ServiceDataFlowEvent event, JSONObject reqJson) {
        super.validatePageInfo(reqJson);
        Assert.hasKeyAndValue(reqJson, "communityId", "未包含小区信息");
        //Assert.hasKeyAndValue(reqJson, "communityId", "未包含小区信息");
    }
@@ -95,16 +95,16 @@
        storeAttrDto.setStoreIds(getStoreIds(stores));
        List<StoreAttrDto> storeAttrDtos = storeInnerServiceSMOImpl.getStoreAttrs(storeAttrDto);
        for(ApiStoreDataVo storeDataVo : stores){
            for(StoreAttrDto tmpStoreAttrDto: storeAttrDtos){
                if(!storeDataVo.getStoreId().equals(tmpStoreAttrDto.getStoreId())){
        for (ApiStoreDataVo storeDataVo : stores) {
            for (StoreAttrDto tmpStoreAttrDto : storeAttrDtos) {
                if (!storeDataVo.getStoreId().equals(tmpStoreAttrDto.getStoreId())) {
                    continue;
                }
                if("100201903001".equals(tmpStoreAttrDto.getSpecCd())){
                if ("100201903001".equals(tmpStoreAttrDto.getSpecCd())) {
                    storeDataVo.setArtificialPerson(tmpStoreAttrDto.getValue());
                }else if("100201903003".equals(tmpStoreAttrDto.getSpecCd())){
                } else if ("100201903003".equals(tmpStoreAttrDto.getSpecCd())) {
                    storeDataVo.setEstablishment(tmpStoreAttrDto.getValue());
                }else if("100201903005".equals(tmpStoreAttrDto.getSpecCd())){
                } else if ("100201903005".equals(tmpStoreAttrDto.getSpecCd())) {
                    storeDataVo.setBusinessScope(tmpStoreAttrDto.getValue());
                }
            }
WebService/src/main/java/com/java110/web/components/community/StoresCommunityComponent.java
New file
@@ -0,0 +1,40 @@
package com.java110.web.components.community;
import com.java110.core.context.IPageData;
import com.java110.web.smo.community.IListCommunitysSMO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Component;
/**
 * 小区组件管理类
 *
 * add by wuxw
 *
 * 2019-06-29
 */
@Component("storesCommunity")
public class StoresCommunityComponent {
    @Autowired
    private IListCommunitysSMO listCommunitysSMOImpl;
    /**
     * 查询小区列表
     * @param pd 页面数据封装
     * @return 返回 ResponseEntity 对象
     */
    public ResponseEntity<String> listMyCommunity(IPageData pd){
        return listCommunitysSMOImpl.listCommunitys(pd);
    }
    public IListCommunitysSMO getListCommunitysSMOImpl() {
        return listCommunitysSMOImpl;
    }
    public void setListCommunitysSMOImpl(IListCommunitysSMO listCommunitysSMOImpl) {
        this.listCommunitysSMOImpl = listCommunitysSMOImpl;
    }
}
WebService/src/main/java/com/java110/web/components/store/ListStoreManageComponent.java
@@ -16,7 +16,7 @@
 * <p>
 * 2019-06-29
 */
@Component("listStoreManageManage")
@Component("listStoreManage")
public class ListStoreManageComponent {
    @Autowired
WebService/src/main/java/com/java110/web/smo/community/impl/ListCommunitysSMOImpl.java
@@ -44,12 +44,13 @@
    protected ResponseEntity<String> doBusinessProcess(IPageData pd, JSONObject paramIn) {
        ComponentValidateResult result = super.validateStoreStaffCommunityRelationship(pd, restTemplate);
        Map paramMap = BeanConvertUtil.beanCovertMap(result);
        paramIn.putAll(paramMap);
        if(!paramIn.containsKey("storeId")) {
            Map paramMap = BeanConvertUtil.beanCovertMap(result);
            paramIn.putAll(paramMap);
        }
        if(!StoreTypeConstant.STORE_TYPE_SYSTEM_MANAGER.equals(result.getStoreTypeCd())) {
            paramIn.put("memberId", result.getStoreId());
        if(!StoreTypeConstant.STORE_TYPE_SYSTEM_MANAGER.equals(result.getStoreTypeCd()) || paramIn.containsKey("storeId")) {
            paramIn.put("memberId", paramIn.getString("storeId"));
        }
        String apiUrl = ServiceConstant.SERVICE_API_URL + "/api/community.listCommunitys" + mapToUrlParam(paramIn);
WebService/src/main/java/com/java110/web/smo/store/impl/ListStoreSMOImpl.java
@@ -47,8 +47,8 @@
            throw new IllegalArgumentException("您当前没有权限访问");
        }
        Map paramMap = BeanConvertUtil.beanCovertMap(result);
        paramIn.putAll(paramMap);
//        Map paramMap = BeanConvertUtil.beanCovertMap(result);
//        paramIn.putAll(paramMap);
        String apiUrl = ServiceConstant.SERVICE_API_URL + "/api/store.listStores" + mapToUrlParam(paramIn);
WebService/src/main/resources/components/communityPackage/storesCommunity/storesCommunity.html
New file
@@ -0,0 +1,65 @@
<div id = "storesCommunityModel" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true" >
    <div class="modal-dialog modal-lg">
        <div class="modal-content">
            <div class="modal-header">
                <h3 class="modal-title" id="addPrivilegeModalLabel">商户小区</h3>
            </div>
            <div class="modal-body">
                <div class=" row">
                    <div class="col-lg-12">
                        <div class="ibox ">
                            <div class="row">
                                <div class="col-sm-7 m-b-xs">
                                </div>
                                <div class="col-sm-5">
                                    <div class="input-group">
                                        <input placeholder="输入小区名称" v-model="storesCommunityInfo.searchCommunityName" type="text" class="form-control form-control-sm">
                                        <span class="input-group-append">
                                                <button type="button" class="btn btn-sm btn-primary" v-on:click="listMyCommunity(1,10)">查询</button>
                                            </span>
                                    </div>
                                </div>
                            </div>
                            <div class="table-responsive" style="margin-top:15px">
                                <table class="table table-striped">
                                    <thead>
                                        <tr>
                                            <th>小区ID</th>
                                            <th data-hide="phone">名称</th>
                                            <th data-hide="phone">地址</th>
                                            <th data-hide="phone">状态</th>
                                        </tr>
                                    </thead>
                                    <tbody>
                                        <tr v-for="community in storesCommunityInfo.communityInfo">
                                            <td>
                                                {{community.communityId}}
                                            </td>
                                            <td>
                                                {{community.name}}
                                            </td>
                                            <td>
                                                {{community.address}}
                                            </td>
                                            <td>
                                                {{community.stateName}}
                                            </td>
                                        </tr>
                                    </tbody>
                                </table>
                            </div>
                            <vc:create
                                    name="paginationPlus"
                                    namespace="storesCommunity"
                            ></vc:create>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
WebService/src/main/resources/components/communityPackage/storesCommunity/storesCommunity.js
New file
@@ -0,0 +1,57 @@
(function(vc){
    var DEFAULT_PAGE = 1;
    var DEFAULT_ROWS = 10;
    vc.extends({
        data:{
            storesCommunityInfo:{
                communityInfo:[],
                errorInfo:'',
                searchCommunityName:'',
                storeId:''
            }
        },
         _initMethod:function(){
         },
         _initEvent:function(){
            vc.on('storesCommunity','openStoresCommunity',function(_params){
                $('#storesCommunityModel').modal('show');
                vc.component.storesCommunityInfo.searchCommunityName = '';
                vc.component.storesCommunityInfo.storeId = _params.storeId;
                vc.component.listMyCommunity(DEFAULT_PAGE,DEFAULT_ROWS);
            });
             vc.on('storesCommunity','paginationPlus', 'page_event', function (_currentPage) {
                vc.component.listMyCommunity(_currentPage, DEFAULT_ROWS);
            });
        },
        methods:{
            listMyCommunity:function(_page,_row){
                    var param = {
                        params:{
                            communityName:vc.component.storesCommunityInfo.searchCommunityName,
                            storeId:vc.component.storesCommunityInfo.storeId,
                            page:_page,
                            row:_row
                        }
                   }
                   //发送get请求
                   vc.http.get('storesCommunity',
                                'listMyCommunity',
                                 param,
                                 function(json,res){
                                    var _communityInfo =JSON.parse(json);
                                    vc.component.storesCommunityInfo.communityInfo = _communityInfo.communitys
                                    vc.emit('storesCommunity','paginationPlus', 'init', {
                                        total: _communityInfo.records,
                                        currentPage: _page
                                    });
                                 },function(errInfo,error){
                                    console.log('请求失败处理');
                                 }
                   );
             }
        }
    });
})(window.vc);
WebService/src/main/resources/components/paginationPackage/paginationPlus/paginationPlus.html
@@ -1,19 +1,19 @@
<nav aria-label="Page navigation example" v-if="this.paginationPlusInfo.total != 0">
    <ul class="pagination justify-content-end">
        <li class="page-item" v-bind:class="{disabled:this.paginationPlusInfo.currentPage == 1}">
            <a class="page-link" v-on:click="current(1)"> « </a>
            <a class="page-link" v-on:click="this.current(1)"> « </a>
        </li>
        <li class="page-item" v-bind:class="{disabled:this.paginationPlusInfo.currentPage == 1}">
            <a class="page-link" v-on:click="previous()"> ‹ </a>
            <a class="page-link" v-on:click="this.previous()"> ‹ </a>
        </li>
        <li class="page-item" v-for="pageInfo in this.paginationPlusInfo.pageList" v-bind:class="{active:pageInfo.currentPage}">
            <a class="page-link" v-on:click="current(pageInfo.page)">{{pageInfo.pageView}}</a>
            <a class="page-link" v-on:click="this.current(pageInfo.page)">{{pageInfo.pageView}}</a>
        </li>
        <li class="page-item" v-bind:class="{disabled:this.paginationPlusInfo.currentPage == this.paginationPlusInfo.total}">
            <a class="page-link" v-on:click="next()"> › </a>
            <a class="page-link" v-on:click="this.next()"> › </a>
        </li>
        <li class="page-item" v-bind:class="{disabled:this.paginationPlusInfo.currentPage == this.paginationPlusInfo.total}">
            <a class="page-link" v-on:click="current(this.paginationPlusInfo.total)"> » </a>
            <a class="page-link" v-on:click="this.current(this.paginationPlusInfo.total)"> » </a>
        </li>
        <span class="total" style="line-height: 30px;margin-left: 10px;" v-if="this.paginationPlusInfo.dataCount != 0">共 {{this.paginationPlusInfo.dataCount}} 条</span>
    </ul>
WebService/src/main/resources/components/storePackage/listStoreManage/listStoreManage.html
@@ -78,7 +78,7 @@
                            <td class="text-right">
                                <div class="btn-group">
                                    <button class="btn-white btn btn-xs"
                                            v-on:click="_openEditListStoreModel(listStore)">隶属小区
                                            v-on:click="_openStoresCommunityModel(listStore)">隶属小区
                                    </button>
                                </div>
                            </td>
@@ -99,4 +99,6 @@
        </div>
    </div>
    <vc:create name="storesCommunity"></vc:create>
</div>
WebService/src/main/resources/components/storePackage/listStoreManage/listStoreManage.js
@@ -46,7 +46,7 @@
                        var _listStoreManageInfo = JSON.parse(json);
                        vc.component.listStoreManageInfo.total = _listStoreManageInfo.total;
                        vc.component.listStoreManageInfo.records = _listStoreManageInfo.records;
                        vc.component.listStoreManageInfo.listStores = _listStoreManageInfo.listStores;
                        vc.component.listStoreManageInfo.listStores = _listStoreManageInfo.stores;
                        vc.emit('pagination', 'init', {
                            total: vc.component.listStoreManageInfo.records,
                            currentPage: _page
@@ -56,8 +56,8 @@
                    }
                );
            },
            _openDeleteListStoreModel: function (_listStore) {
                vc.emit('deleteListStore', 'openDeleteListStoreModal', _listStore);
            _openStoresCommunityModel: function (_listStore) {
                vc.emit('storesCommunity','openStoresCommunity', _listStore);
            },
            _queryListStoreMethod: function () {
                vc.component._listListStores(DEFAULT_PAGE, DEFAULT_ROWS);