门店信息

This commit is contained in:
cun-nan 2023-10-13 18:11:05 +08:00
parent c31d009ade
commit c63b6018a1
25 changed files with 833 additions and 37 deletions

View File

@ -36,6 +36,7 @@
"url": "https://gitee.com/fuint/fuint-uniapp.git"
},
"dependencies": {
"@amap/amap-jsapi-loader": "^1.0.1",
"@riophae/vue-treeselect": "0.4.0",
"axios": "0.24.0",
"clipboard": "2.0.8",
@ -45,6 +46,7 @@
"file-saver": "2.0.5",
"fuse.js": "6.4.3",
"highlight.js": "9.18.5",
"html2canvas": "^1.4.1",
"js-beautify": "1.13.0",
"js-cookie": "3.0.1",
"jsencrypt": "3.0.0-rc.1",

View File

@ -199,4 +199,10 @@
</div>
</div>
</body>
<script>
window._AMapSecurityConfig = {
// 例如 serviceHost:'http://1.1.1.1:80/_AMapService', //安全写法,前面是服务器地址
securityJsCode: "6e7d904a9f6e98a02fe4f0bb8f276f98" //测试时候的写法
};
</script>
</html>

View File

@ -0,0 +1,10 @@
import request from '@/utils/request'
// 查询省市区详细
export function getClient() {
return request({
url: '/province/region/tree',
method: 'get'
})
}

View File

@ -9,10 +9,18 @@ export function listQRCode(query) {
})
}
// 查询二维码详细
export function qrCodeInfo() {
return request({
url: '/business/storeInformation/qrCode',
method: 'get'
})
}
// 查询二维码详细
export function getQRCode(id) {
return request({
url: '/business/storeInformation/qrCode' + id,
url: '/business/storeInformation/qrCode/' + id,
method: 'get'
})
}
@ -38,7 +46,7 @@ export function updateQRCode(data) {
// 删除二维码
export function delQRCode(id) {
return request({
url: '/business/storeInformation/qrCode' + id,
url: '/business/storeInformation/qrCode/' + id,
method: 'delete'
})
}

View File

@ -0,0 +1,18 @@
import request from '@/utils/request'
// 查询店铺详细
export function ljStoreInfo() {
return request({
url: '/business/storeInformation/store',
method: 'get'
})
}
// 修改店铺信息
export function updateStore(data) {
return request({
url: '/business/storeInformation/store',
method: 'put',
data: data
})
}

View File

@ -0,0 +1,171 @@
<template>
<div>
<div style="margin: 20px 0px">
<div style="display: flex">
<p style="margin-right: 34px">省市区</p>
<el-cascader :options="options" clearable style="margin-top: 8px"></el-cascader>
</div>
<div style="display: flex">
<p style="margin-right: 20px">选择区域</p>
<div id="container" class="container" clearable style="margin-top: 15px"></div>
</div>
</div>
<p>详细地址<el-input v-model="form.address"
placeholder="请输入内容"
style="width: 50%"
></el-input></p>
</div>
</template>
<script>
import AMapLoader from "@amap/amap-jsapi-loader";
import {getClient} from "@/api/staff/client";
export default {
props:['pform'],
data(){
return {
//
map: null,
polygons: [],
//
marker: "",
//
geoCoder: null,
//
AutoComplete: null,
//
keywords: "",
//
form: {
lng: "105.602725",
lat: "37.076636",
address: "",
adcode: "", //
},
//
loading: false,
//
options: [],
option:{
value:'',
label:'',
children:[],
}
}
},
created() {
this.getOption();
},
mounted() {
this.initAMap();
},
methods:{
getOption(){
this.form = this.pform;
let _this = this;
getClient().then(response => {
this.options = response.data.list;
})
},
initAMap() {
let _this = this;
AMapLoader.load({
key: "b5abec514cab7c71cb0572765131e6fc", // WebKey load
version: "2.0", // JSAPI 1.4.15
plugins: ["AMap.Geocoder", "AMap.AutoComplete"], // 使'AMap.Scale'
}).then((AMap) => {
this.map = new AMap.Map("container", {
viewMode: "3D", //3D
zoom: 5, //
center: [_this.form.lng, _this.form.lat], //
});
//
this.geoCoder = new AMap.Geocoder({
city: "010", //
radius: 1000, //500
});
//
this.AutoComplete = new AMap.AutoComplete({ city: "全国" });
//;
this.map.on("click", (e) => {
//
this.form.lng = e.lnglat.lng;
this.form.lat = e.lnglat.lat;
//
this.removeMarker();
//
this.setMapMarker();
});
}).catch(() => {});
},
//
setMapMarker() {
//
this.map.setFitView();
this.marker = new AMap.Marker({
map: this.map,
position: [this.form.lng, this.form.lat],
});
//
this.toGeoCoder();
this.map.setFitView();
this.map.add(this.marker);
},
//
removeMarker() {
if (this.marker) {
this.map.remove(this.marker);
}
},
//
toGeoCoder() {
let lnglat = [this.form.lng, this.form.lat];
this.geoCoder.getAddress(lnglat, (status, result) => {
if (status === "complete" && result.regeocode) {
this.form.address = result.regeocode.formattedAddress;
}
});
},
//
remoteMethod(query) {
console.log(query);
if (query !== "") {
this.loading = true;
setTimeout(() => {
this.loading = false;
this.AutoComplete.search(query, (status, result) => {
this.options = result.tips;
});
}, 200);
} else {
// this.options = [];
}
},
//
currentSelect(val) {
//
if (!val) {
return;
}
this.form = {
lng: val.location.lng,
lat: val.location.lat,
address: val.district + val.address,
adcode: val.adcode,
};
//
this.removeMarker();
//
this.setMapMarker();
},
}
}
</script>
<style lang="scss" scoped>
.container {
width: 500px;
height: 300px;
}
</style>

View File

@ -448,12 +448,9 @@
</template>
<script>
import { getStaffList, getStaffInfo, updateStaffStatus, deleteStaff, saveStaff } from "@/api/staff";
import {getName} from "../../utils/fuint";
import {addStaff, delStaff, getStaff, listStaff, updateStaff} from "@/api/staff/staff";
import {getDuty, listDuty} from "@/api/staff/duty";
import {listType} from "@/api/dict/type";
import {listData} from "@/api/system/dict/data";
export default {
name: "StaffList",

View File

@ -1,59 +1,193 @@
<template>
<div>
<el-card >
<h4>收款二维码</h4>
<img class="qrcode" :src="QRImgUrl" /><br/>
<el-button class="but" type="primary">下载收款二维码</el-button>
<div class="copy">
<el-input v-model="input1">
<template slot="prepend">复制链接</template>
</el-input>
<el-card class="card">
<div slot="header" class="clearfix">
<span>{{ store.oilStationName }}({{ store.description }})</span>
</div>
<map-componment :pform="form"></map-componment>
<div style="display: flex;margin-bottom: 20px">
<span style="margin-right: 10px">店铺福利</span>
<el-checkbox-group v-model="welfare" ref="" @change="getCheckbox">
<el-checkbox
v-for="dict in dict.type.store_welfare"
:key="dict.value"
:label="dict.label"
:value="dict.value"
></el-checkbox>
</el-checkbox-group>
</div>
<el-button type="primary" @click="submitStore">保存信息</el-button>
</el-card>
<el-card >
<h4>门店二维码</h4>
<img class="qrcode" :src="QRImgUrl" /><br/>
<el-button class="but" type="primary">下载门店二维码</el-button>
<el-card class="card">
<div slot="header" class="clearfix">
<span>门店二维码</span>
</div>
<img id="collection" class="qrcode" :src="collectionImg" /><br/>
<el-button class="but" type="primary"
icon="el-icon-download"
@click="handleDownloadqrCode('collection')">
下载门店二维码
</el-button>
</el-card>
<el-card class="card">
<div slot="header" class="clearfix">
<span>收款二维码</span>
</div>
<img id="payment" class="qrcode" :src="paymentImg" /><br/>
<el-button class="but" type="primary"
icon="el-icon-download"
@click="handleDownloadqrCode('payment')">
下载收款二维码
</el-button>
</el-card>
<div class="copy">
<el-input v-model="input1">
<template slot="prepend">复制链接</template>
</el-input>
</div>
</div>
</template>
<script>
import QRCode from 'qrcode'
import html2canvas from "html2canvas";
import {listQRCode} from "@/api/staff/qrcode";
import {ljStoreInfo, updateStore} from "@/api/staff/store";
import mapComponment from "@/components/map/mapComponent.vue";
export default {
components:{
mapComponment,
},
name: "map-view",
dicts: ['store_welfare'],
props: {
data: {
type: Object
}
},
data(){
return{
QRImgUrl: '',
QRlink:'www.xxxsdnhgazregb.com'
//
collectionImg:'',
//
paymentImg:'',
qrcode: {},
store:{},
//
map: null,
polygons: [],
//
marker: "",
//
geoCoder: null,
//
AutoComplete: null,
//
keywords: "",
//
form: {
lng: "",
lat: "",
address: "",
adcode: "", //
},
//
loading: false,
//
options: [],
welfare:[],
}
},
created() {
this.getQRcode();
this.getQRCodeInfo();
this.getStore();
},
methods:{
getQRcode(){
QRCode.toDataURL(this.QRlink, { errorCorrectionLevel: 'L', margin: 2, width: 128 }, (err, url) => {
if (err) throw err
this.QRImgUrl= url
methods: {
//
getStore() {
ljStoreInfo().then(response => {
this.store = response.data
this.form.lat = this.store.latitude;
this.form.lng = this.store.longitude;
this.form.address = this.store.address;
this.welfare = this.store.welfare.split(",")
})
}
},
getCheckbox(){
this.store.welfare = this.welfare.toString();
},
submitStore(){
updateStore(this.store).then(response => {
this.$modal.msgSuccess("修改成功");
this.getStore();
})
},
//
getQRCodeInfo(){
listQRCode().then(response => {
this.qrcode = response.data.records;
this.getQRcode();
})
},
// url
getQRcode(){
let opts = {
errorCorrectionLevel: "L",//
type: "image/png",//
quality: 0.3,//
margin: 0,//
width: 180,//
height: 180,//
text: "http://www.xxx.com",//
color: {
dark: "#666666",//
light: "#fff"//
}
};
//this.QRlink url
QRCode.toDataURL(this.qrcode[0].collection, opts , (err, url) => {
if (err) throw err
//dataQRImgUrl
this.collectionImg= url
})
QRCode.toDataURL(this.qrcode[0].payment, opts , (err, url) => {
if (err) throw err
//dataQRImgUrl
this.paymentImg= url
})
},
// dom
handleDownloadqrCode(id) {
html2canvas(document.getElementById(id)).then((canvas) => {
let imgUrl = canvas.toDataURL("image/png"); // canvas base64
let a = document.createElement('a')
a.href = imgUrl;
if (id=='collection'){
a.download = "门店二维码"; //
}else {
a.download = "收款二维码"; //
}
document.body.appendChild(a);
a.click(); //
document.body.removeChild(a); //
});
},
}
}
</script>
<style lang="scss" scoped>
.card{
width: 96%;
margin: 30px auto;
}
.qrcode{
width: 180px;
height: 180px;
margin-top: 15px;
}
.but{
margin-left: 14px;
margin-top: 10px;
margin-top: 15px;
width: 180px;
}
.copy{

View File

@ -74,4 +74,9 @@ public class MtStore extends BaseEntity implements Serializable {
@ApiModelProperty("状态A有效/启用D无效")
private String status;
@ApiModelProperty("油站名称")
private String oilStationName;
@ApiModelProperty("福利信息")
private String welfare;
}

View File

@ -0,0 +1,31 @@
package com.fuint.business.storeInformation.controller;
import com.fuint.business.storeInformation.service.ILJRegionService;
import com.fuint.framework.web.BaseController;
import com.fuint.framework.web.ResponseObject;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.Map;
/**
* 省市区信息
*/
@RestController
@RequestMapping("/province/region")
public class LJRegionController extends BaseController {
@Autowired
private ILJRegionService regionService;
/**
* 查询省市级信息
* @return
*/
@GetMapping("/tree")
public ResponseObject tree(){
Map<String, Object> map = regionService.selectRegion();
return getSuccessResult(map);
}
}

View File

@ -0,0 +1,37 @@
package com.fuint.business.storeInformation.controller;
import com.fuint.business.storeInformation.entity.LJStore;
import com.fuint.business.storeInformation.entity.QRCode;
import com.fuint.business.storeInformation.service.ILJStoreService;
import com.fuint.framework.web.BaseController;
import com.fuint.framework.web.ResponseObject;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
@RestController
@RequestMapping("/business/storeInformation/store")
public class LJStoreController extends BaseController {
@Autowired
private ILJStoreService storeService;
/**
* 根据id查询门店信息
* @return
*/
@GetMapping
public ResponseObject storeInfo(){
LJStore store = storeService.selectStoreById();
return getSuccessResult(store);
}
/**
* 修改门店信息
* @param store
* @return
*/
@PutMapping
public ResponseObject edit(@Validated @RequestBody LJStore store){
return getSuccessResult(storeService.updateStore(store));
}
}

View File

@ -32,6 +32,14 @@ public class QRCodeController extends BaseController {
return getSuccessResult(list);
}
/**
* 根据店铺id查询二维码信息
* @return
*/
@GetMapping
public ResponseObject qrCodeInfo(){
return getSuccessResult(iqrCodeService.selectQRCode());
}
/**
* 根据id查询二维码信息
@ -39,7 +47,7 @@ public class QRCodeController extends BaseController {
* @return
*/
@GetMapping("/{id}")
public ResponseObject staffInfo(@PathVariable Integer id){
public ResponseObject qrCodeInfoById(@PathVariable Integer id){
QRCode qrCode = iqrCodeService.selectQRCodeById(id);
return getSuccessResult(qrCode);
}

View File

@ -0,0 +1,19 @@
package com.fuint.business.storeInformation.dot;
import com.fuint.common.dto.RegionDto;
import lombok.Data;
import java.util.List;
/**
* 地区实体类
* */
@Data
public class LJRegionDto {
private String value;
private String label;
private List<LJRegionDto> children;
}

View File

@ -0,0 +1,46 @@
package com.fuint.business.storeInformation.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import java.io.Serializable;
/**
* <p>
* 省市区数据表
* </p>
*
* Created by FSQ
* CopyRight https://www.fuint.cn
*/
@Getter
@Setter
@TableName("mt_region")
@ApiModel(value = "MtRegion对象", description = "省市区数据表")
public class LJRegion implements Serializable {
private static final long serialVersionUID = 1L;
@ApiModelProperty("区划信息ID")
@TableId(value = "ID", type = IdType.AUTO)
private Integer id;
@ApiModelProperty("区划名称")
private String name;
@ApiModelProperty("父级ID")
private Integer pid;
@ApiModelProperty("区划编码")
private String code;
@ApiModelProperty("层级(1省级 2市级 3区/县级)")
private Integer level;
}

View File

@ -0,0 +1,81 @@
package com.fuint.business.storeInformation.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fuint.repository.model.base.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import java.io.Serializable;
import java.math.BigDecimal;
/**
* 店铺表
*
* Created by FSQ
* CopyRight https://www.fuint.cn
*/
@Getter
@Setter
@TableName("mt_store")
@ApiModel(value = "MtStore对象", description = "店铺表")
public class LJStore extends BaseEntity implements Serializable {
private static final long serialVersionUID = 1L;
@ApiModelProperty("自增ID")
@TableId(value = "ID", type = IdType.AUTO)
private Integer id;
@ApiModelProperty("连锁店主键")
private Integer chainStoreId;
@ApiModelProperty("关联机构主键")
private Long contractDeptId;
@ApiModelProperty("店铺名称")
private String name;
@ApiModelProperty("商户logo")
private String logo;
@ApiModelProperty("联系人姓名")
private String contact;
@ApiModelProperty("联系电话")
private String phone;
@ApiModelProperty("地址")
private String address;
@ApiModelProperty("经度")
private String latitude;
@ApiModelProperty("维度")
private String longitude;
@ApiModelProperty("距离")
private BigDecimal distance;
@ApiModelProperty("营业时间")
private String hours;
@ApiModelProperty("营业执照")
private String license;
@ApiModelProperty("统一社会信用代码")
private String creditCode;
@ApiModelProperty("备注信息")
private String description;
@ApiModelProperty("状态A有效/启用D无效")
private String status;
@ApiModelProperty("油站名称")
private String oilStationName;
@ApiModelProperty("福利信息")
private String welfare;
}

View File

@ -0,0 +1,10 @@
package com.fuint.business.storeInformation.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.fuint.business.storeInformation.entity.LJRegion;
/**
* 省市区信息 mapper层
*/
public interface LJRegionMapper extends BaseMapper<LJRegion> {
}

View File

@ -0,0 +1,10 @@
package com.fuint.business.storeInformation.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.fuint.business.storeInformation.entity.LJStore;
/**
* 店铺表 mapper层
*/
public interface LJStoreMapper extends BaseMapper<LJStore> {
}

View File

@ -0,0 +1,17 @@
package com.fuint.business.storeInformation.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.fuint.business.storeInformation.entity.LJRegion;
import java.util.Map;
/**
* 省市区信息 业务层
*/
public interface ILJRegionService extends IService<LJRegion> {
/**
* 查询省市区信息
* @return
*/
public Map<String, Object> selectRegion();
}

View File

@ -0,0 +1,22 @@
package com.fuint.business.storeInformation.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.fuint.business.storeInformation.entity.LJStore;
/**
* 店铺信息 业务层
*/
public interface ILJStoreService extends IService<LJStore> {
/**
* 根据id查询店铺信息
* @return
*/
public LJStore selectStoreById();
/**
* 修改店铺信息
* @param store 店铺信息
* @return
*/
public int updateStore(LJStore store);
}

View File

@ -20,6 +20,12 @@ public interface IQRCodeService extends IService<QRCode> {
*/
public IPage<QRCode> selectQRCodeList(Page page, QRCode qrCode);
/**
* 根据店铺id查询二维码信息
* @return
*/
public QRCode selectQRCode();
/**
* 根据id查询二维码信息
* @param id

View File

@ -0,0 +1,111 @@
package com.fuint.business.storeInformation.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.fuint.business.storeInformation.dot.LJRegionDto;
import com.fuint.business.storeInformation.entity.LJRegion;
import com.fuint.business.storeInformation.mapper.LJRegionMapper;
import com.fuint.business.storeInformation.service.ILJRegionService;
import com.fuint.common.dto.RegionDto;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* 省市区信息 业务层
*/
@Service
public class LJRegionServiceImpl extends ServiceImpl<LJRegionMapper, LJRegion> implements ILJRegionService {
@Autowired
private LJRegionMapper regionMapper;
/**
* 查询省市区信息
* @return
*/
@Override
public Map<String, Object> selectRegion() {
Map<String, Object> params = new HashMap<>();
List<LJRegion> regionList = regionMapper.selectByMap(params);
List<RegionDto> treeData = new ArrayList<>();
List<LJRegionDto> list = new ArrayList<>();
for (LJRegion mtRegion : regionList) {
if (mtRegion.getLevel().equals(1)) {
RegionDto dto = new RegionDto();
LJRegionDto regionDto = new LJRegionDto();
dto.setId(mtRegion.getId());
dto.setName(mtRegion.getName());
dto.setCode(mtRegion.getCode());
dto.setPid(mtRegion.getPid());
dto.setLevel(mtRegion.getLevel() + "");
dto.setCity(new ArrayList<>());
regionDto.setLabel(mtRegion.getName());
regionDto.setValue(mtRegion.getCode());
regionDto.setChildren(new ArrayList<>());
treeData.add(dto);
list.add(regionDto);
}
}
for (int i = 0; i < treeData.size(); i++) {
List<RegionDto> cityArr = new ArrayList<>();
List<LJRegionDto> city = new ArrayList<>();
for (LJRegion mtRegion : regionList) {
if (treeData.get(i).getId().equals(mtRegion.getPid())) {
RegionDto dto = new RegionDto();
LJRegionDto regionDto = new LJRegionDto();
dto.setId(mtRegion.getId());
dto.setName(mtRegion.getName());
dto.setCode(mtRegion.getCode());
dto.setPid(mtRegion.getPid());
dto.setLevel(mtRegion.getLevel() + "");
regionDto.setLabel(mtRegion.getName());
regionDto.setValue(mtRegion.getCode());
List<RegionDto> regionArr = new ArrayList<>();
List<LJRegionDto> region = new ArrayList<>();
for (LJRegion mtRegion1 : regionList) {
if (mtRegion.getId().equals(mtRegion1.getPid())) {
RegionDto dto1 = new RegionDto();
LJRegionDto regionDto1 = new LJRegionDto();
dto1.setId(mtRegion1.getId());
dto1.setName(mtRegion1.getName());
dto1.setCode(mtRegion1.getCode());
dto1.setPid(mtRegion1.getPid());
dto1.setLevel(mtRegion1.getLevel() + "");
regionDto1.setLabel(mtRegion1.getName());
regionDto1.setValue(mtRegion1.getCode());
regionArr.add(dto1);
region.add(regionDto1);
}
}
dto.setRegion(regionArr);
regionDto.setChildren(region);
cityArr.add(dto);
city.add(regionDto);
}
}
treeData.get(i).setCity(cityArr);
list.get(i).setChildren(city);
}
Map<String, Object> result = new HashMap<>();
result.put("data", treeData);
result.put("list", list);
return result;
}
}

View File

@ -0,0 +1,38 @@
package com.fuint.business.storeInformation.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.fuint.business.storeInformation.entity.LJStore;
import com.fuint.business.storeInformation.mapper.LJStoreMapper;
import com.fuint.business.storeInformation.service.ILJStoreService;
import com.fuint.common.dto.AccountInfo;
import com.fuint.common.util.TokenUtil;
import org.springframework.stereotype.Service;
/**
* 店铺信息 业务层
*/
@Service
public class LJStoreServiceImpl extends ServiceImpl<LJStoreMapper, LJStore> implements ILJStoreService {
/**
* 根据id查询店铺信息
* @return
*/
@Override
public LJStore selectStoreById() {
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
Integer storeId = nowAccountInfo.getStoreId();
LJStore store = baseMapper.selectById(storeId);
return store;
}
/**
* 修改店铺信息
* @param store 店铺信息
* @return
*/
@Override
public int updateStore(LJStore store) {
int row = baseMapper.updateById(store);
return row;
}
}

View File

@ -1,5 +1,6 @@
package com.fuint.business.storeInformation.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
@ -14,7 +15,7 @@ import org.springframework.stereotype.Service;
* 门店信息 业务层
*/
@Service
public class QRCodeServiceImpl extends ServiceImpl<QRCodeMapper, QRCode> implements IQRCodeService {
public class QRCodeServiceImpl extends ServiceImpl<QRCodeMapper, QRCode> implements IQRCodeService {
/**
* 根据条件模糊查询门店信息
* @param page
@ -29,6 +30,15 @@ public class QRCodeServiceImpl extends ServiceImpl<QRCodeMapper, QRCode> implem
return baseMapper.selectQRCodeList(page,qrCode);
}
@Override
public QRCode selectQRCode() {
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
Integer storeId = nowAccountInfo.getStoreId();
QueryWrapper queryWrapper = new QueryWrapper<>();
queryWrapper.eq("store_id",storeId);
return baseMapper.selectOne(queryWrapper);
}
/**
* 根据id查询二维码信息
* @param id

View File

@ -37,7 +37,6 @@ public class ClientRegionController extends BaseController {
*/
@ApiOperation(value = "获取地区树状结构")
@RequestMapping(value = "/tree", method = RequestMethod.GET)
@CrossOrigin
public ResponseObject tree(HttpServletRequest request) {
String token = request.getHeader("Access-Token");
UserInfo userInfo = TokenUtil.getUserInfoByToken(token);