parent
f298959388
commit
659df35446
9
pom.xml
9
pom.xml
|
|
@ -20,7 +20,7 @@
|
|||
<spring-cloud.version>2020.0.4</spring-cloud.version>
|
||||
<spring-cloud-alibaba.version>2021.1</spring-cloud-alibaba.version>
|
||||
<alibaba.nacos.version>2.0.3</alibaba.nacos.version>
|
||||
<spring-boot-admin.version>2.5.4</spring-boot-admin.version>
|
||||
<spring-boot-admin.version>2.6.0</spring-boot-admin.version>
|
||||
<spring-boot.mybatis>2.2.0</spring-boot.mybatis>
|
||||
<swagger.fox.version>3.0.0</swagger.fox.version>
|
||||
<swagger.core.version>1.6.2</swagger.core.version>
|
||||
|
|
@ -50,6 +50,7 @@
|
|||
<bean-searcher.version>3.5.1</bean-searcher.version>
|
||||
<oshi.version>5.7.1</oshi.version>
|
||||
<webmagic.version>0.7.5</webmagic.version>
|
||||
<spring-cloud-alicloud-oss.version>2.2.0.RELEASE</spring-cloud-alicloud-oss.version>
|
||||
|
||||
</properties>
|
||||
|
||||
|
|
@ -131,6 +132,12 @@
|
|||
<scope>import</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.alibaba.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-alicloud-oss</artifactId>
|
||||
<version>${spring-cloud-alicloud-oss.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- Alibaba Nacos 配置 -->
|
||||
<dependency>
|
||||
<groupId>com.alibaba.nacos</groupId>
|
||||
|
|
|
|||
|
|
@ -26,24 +26,6 @@ export function addArticle(data) {
|
|||
})
|
||||
}
|
||||
|
||||
//上传图片
|
||||
export function uploadImg(data){
|
||||
return request({
|
||||
url: '/file/upload',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
//删除图片
|
||||
export function removeImg(url){
|
||||
return request({
|
||||
url: '/file/remove',
|
||||
method: 'delete',
|
||||
params: url
|
||||
})
|
||||
}
|
||||
|
||||
// 修改英语文章
|
||||
export function updateArticle(data) {
|
||||
return request({
|
||||
|
|
|
|||
|
|
@ -0,0 +1,21 @@
|
|||
//通用的api接口
|
||||
|
||||
import request from '@/utils/request'
|
||||
|
||||
//上传图片
|
||||
export function uploadImg(data){
|
||||
return request({
|
||||
url: '/file/upload',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
//删除图片
|
||||
export function removeImg(url){
|
||||
return request({
|
||||
url: '/file/remove',
|
||||
method: 'delete',
|
||||
params: url
|
||||
})
|
||||
}
|
||||
|
|
@ -0,0 +1,48 @@
|
|||
import request from '@/utils/request'
|
||||
|
||||
// 获取品牌分页数据
|
||||
export function getBrandList(data) {
|
||||
return request({
|
||||
url: '/mall-product/product/brand/list',
|
||||
method: 'get',
|
||||
params:data
|
||||
})
|
||||
}
|
||||
|
||||
// 新增品牌信息
|
||||
export function addBrand(data) {
|
||||
return request({
|
||||
url: '/mall-product/product/brand/save',
|
||||
method: 'post',
|
||||
data:data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改品牌信息
|
||||
export function editBrand(data) {
|
||||
return request({
|
||||
url: '/mall-product/product/brand/update',
|
||||
method: 'put',
|
||||
data:data
|
||||
})
|
||||
}
|
||||
|
||||
// 获取品牌信息
|
||||
export function getBrand(id) {
|
||||
return request({
|
||||
url: '/mall-product/product/brand/info/'+id,
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
|
||||
//删除品牌信息
|
||||
export function delBrand(ids) {
|
||||
return request({
|
||||
url: '/mall-product/product/brand/delete',
|
||||
method: 'delete',
|
||||
data:ids
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
|
@ -68,7 +68,6 @@ export default class SocketService {
|
|||
};
|
||||
// 得到服务端发送过来的数据
|
||||
this.ws.onmessage = (msg) => {
|
||||
console.log("从服务端获取到了数据");
|
||||
// 真正服务端发送过来的原始数据时在msg中的data字段
|
||||
const recvData = JSON.parse(msg.data);
|
||||
console.log(recvData)
|
||||
|
|
|
|||
|
|
@ -41,7 +41,8 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import {addArticle, uploadImg, removeImg} from "@/api/business/english/article";
|
||||
import {addArticle} from "@/api/business/english/article";
|
||||
import {removeImg, uploadImg} from "@/api/common";
|
||||
|
||||
export default {
|
||||
name: "ArticleAdd",
|
||||
|
|
|
|||
|
|
@ -0,0 +1,149 @@
|
|||
<template>
|
||||
<el-dialog
|
||||
:title="!dataForm.id ? '新增' : '修改'"
|
||||
:close-on-click-modal="false"
|
||||
:visible.sync="visible"
|
||||
>
|
||||
<el-form
|
||||
:model="dataForm"
|
||||
:rules="dataRule"
|
||||
ref="dataForm"
|
||||
@keyup.enter.native="dataFormSubmit()"
|
||||
label-width="140px"
|
||||
>
|
||||
<el-form-item label="品牌名" prop="name">
|
||||
<el-input v-model="dataForm.name" placeholder="品牌名"></el-input>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="品牌logo地址" prop="logo">
|
||||
<single-upload v-model="dataForm.logo"></single-upload>
|
||||
</el-form-item>-->
|
||||
<el-form-item label="介绍" prop="descript">
|
||||
<el-input v-model="dataForm.descript" placeholder="介绍"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="显示状态" prop="showStatus">
|
||||
<el-switch
|
||||
v-model="dataForm.showStatus"
|
||||
active-color="#13ce66"
|
||||
inactive-color="#ff4949"
|
||||
:active-value="1"
|
||||
:inactive-value="0"
|
||||
></el-switch>
|
||||
</el-form-item>
|
||||
<el-form-item label="检索首字母" prop="firstLetter">
|
||||
<el-input v-model="dataForm.firstLetter" placeholder="检索首字母"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="排序" prop="sort">
|
||||
<el-input-number v-model.number="dataForm.sort" :min="1" :max="9999" label="描述文字"></el-input-number>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="visible = false">取消</el-button>
|
||||
<el-button type="primary" @click="dataFormSubmit()">确定</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
// import SingleUpload from "@/components/upload/singleUpload";
|
||||
import {addBrand, editBrand, getBrand} from "@/api/mall/product/brand";
|
||||
|
||||
export default {
|
||||
// components: { SingleUpload },
|
||||
data() {
|
||||
return {
|
||||
visible: false,
|
||||
dataForm: {
|
||||
brandId: 0,
|
||||
name: "",
|
||||
logo: "",
|
||||
descript: "",
|
||||
showStatus: 1,
|
||||
firstLetter: "",
|
||||
sort: 0
|
||||
},
|
||||
dataRule: {
|
||||
name: [{ required: true, message: "品牌名不能为空", trigger: "blur" }],
|
||||
/*logo: [
|
||||
{ required: true, message: "品牌logo地址不能为空", trigger: "blur" }
|
||||
],*/
|
||||
descript: [
|
||||
{ required: true, message: "介绍不能为空", trigger: "blur" }
|
||||
],
|
||||
showStatus: [
|
||||
{
|
||||
required: true,
|
||||
message: "显示状态[0-不显示;1-显示]不能为空",
|
||||
trigger: "blur"
|
||||
}
|
||||
],
|
||||
firstLetter: [
|
||||
{
|
||||
validator: (rule, value, callback) => {
|
||||
if (value === "") {
|
||||
callback(new Error("首字母必须填写"));
|
||||
} else if (!/^[a-zA-Z]$/.test(value)) {
|
||||
callback(new Error("首字母必须a-z或者A-Z之间"));
|
||||
} else {
|
||||
callback();
|
||||
}
|
||||
},
|
||||
trigger: "blur"
|
||||
}
|
||||
],
|
||||
sort: [
|
||||
{
|
||||
validator: (rule, value, callback) => {
|
||||
if (value === "") {
|
||||
callback(new Error("排序字段必须填写"));
|
||||
} else if (!Number.isInteger(value) || value<0) {
|
||||
callback(new Error("排序必须是一个大于等于0的整数"));
|
||||
} else {
|
||||
callback();
|
||||
}
|
||||
},
|
||||
trigger: "blur"
|
||||
}
|
||||
]
|
||||
}
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
init(id) {
|
||||
this.dataForm.brandId = id;
|
||||
this.visible = true;
|
||||
this.$nextTick(() => {
|
||||
this.$refs["dataForm"].resetFields();
|
||||
if (this.dataForm.brandId) {
|
||||
getBrand(this.dataForm.brandId).then(res =>{
|
||||
this.dataForm = res.data
|
||||
})
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
// 表单提交
|
||||
dataFormSubmit() {
|
||||
this.$refs["dataForm"].validate(valid => {
|
||||
if (valid) {
|
||||
this.$modal.loading("请稍候...");
|
||||
if (!this.dataForm.brandId) {
|
||||
addBrand(this.dataForm).then(res =>{
|
||||
this.$modal.notifySuccess("添加成功");
|
||||
this.visible = false;
|
||||
this.$emit("refreshDataList");
|
||||
this.$modal.closeLoading()
|
||||
})
|
||||
}else {
|
||||
editBrand(this.dataForm).then(res =>{
|
||||
this.$modal.notifySuccess("修改成功");
|
||||
this.visible = false;
|
||||
this.$emit("refreshDataList");
|
||||
this.$modal.closeLoading()
|
||||
})
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
|
@ -0,0 +1,238 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataList()">
|
||||
<el-form-item>
|
||||
<el-input size="mini" v-model="dataForm.key" placeholder="参数名" clearable></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button-group>
|
||||
<el-button size="mini" @click="getDataList()">查询</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
size="mini"
|
||||
@click="addOrUpdateHandle()"
|
||||
>新增
|
||||
</el-button>
|
||||
<el-button
|
||||
type="danger"
|
||||
size="mini"
|
||||
@click="deleteHandle()"
|
||||
:disabled="dataListSelections.length <= 0"
|
||||
>批量删除
|
||||
</el-button>
|
||||
</el-button-group>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-table
|
||||
:data="dataList"
|
||||
border
|
||||
v-loading="dataListLoading"
|
||||
@selection-change="selectionChangeHandle"
|
||||
style="width: 100%;"
|
||||
>
|
||||
<el-table-column type="selection" header-align="center" align="center" width="50"></el-table-column>
|
||||
<el-table-column prop="name" header-align="center" align="center" label="品牌名"></el-table-column>
|
||||
<el-table-column prop="logo" header-align="center" align="center" label="品牌logo地址">
|
||||
<template slot-scope="scope">
|
||||
<img :src="scope.row.logo" style="width: 100px; height: 80px" alt=""/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="descript" header-align="center" align="center" label="介绍"></el-table-column>
|
||||
<el-table-column prop="showStatus" header-align="center" align="center" label="显示状态">
|
||||
<template slot-scope="scope">
|
||||
<el-switch
|
||||
v-model="scope.row.showStatus"
|
||||
active-color="#13ce66"
|
||||
inactive-color="#ff4949"
|
||||
:active-value="1"
|
||||
:inactive-value="0"
|
||||
@change="updateBrandStatus(scope.row)"
|
||||
></el-switch>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="firstLetter" header-align="center" align="center" label="检索首字母"></el-table-column>
|
||||
<el-table-column prop="sort" header-align="center" align="center" label="排序"></el-table-column>
|
||||
<el-table-column fixed="right" header-align="center" align="center" width="250" label="操作">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="text" size="small" @click="updateCatelogHandle(scope.row.brandId)">关联分类</el-button>
|
||||
<el-button type="text" size="small" @click="addOrUpdateHandle(scope.row.brandId)">修改</el-button>
|
||||
<el-button type="text" size="small" @click="deleteHandle(scope.row.brandId)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="totalPage>0"
|
||||
:total="totalPage"
|
||||
:page.sync="pageIndex"
|
||||
:limit.sync="pageSize"
|
||||
@pagination="getDataList"
|
||||
/>
|
||||
|
||||
|
||||
<!-- 弹窗, 新增 / 修改 -->
|
||||
<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList"></add-or-update>
|
||||
|
||||
<el-dialog title="关联分类" :visible.sync="cateRelationDialogVisible" width="30%">
|
||||
<el-popover placement="right-end" v-model="popCatelogSelectVisible">
|
||||
<category-cascader :catelogPath.sync="catelogPath"></category-cascader>
|
||||
<div style="text-align: right; margin: 0">
|
||||
<el-button size="mini" type="text" @click="popCatelogSelectVisible = false">取消</el-button>
|
||||
<el-button type="primary" size="mini" @click="addCatelogSelect">确定</el-button>
|
||||
</div>
|
||||
<el-button slot="reference">新增关联</el-button>
|
||||
</el-popover>
|
||||
<el-table :data="cateRelationTableData" style="width: 100%">
|
||||
<el-table-column prop="id" label="#"></el-table-column>
|
||||
<el-table-column prop="brandName" label="品牌名"></el-table-column>
|
||||
<el-table-column prop="catelogName" label="分类名"></el-table-column>
|
||||
<el-table-column fixed="right" header-align="center" align="center" label="操作">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
type="text"
|
||||
size="small"
|
||||
@click="deleteCateRelationHandle(scope.row.id,scope.row.brandId)"
|
||||
>移除
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="cateRelationDialogVisible = false">取 消</el-button>
|
||||
<el-button type="primary" @click="cateRelationDialogVisible = false">确 定</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import AddOrUpdate from "./brand-add-or-update";
|
||||
import {editBrand, getBrandList,delBrand} from "@/api/mall/product/brand";
|
||||
// import CategoryCascader from "../common/category-cascader";
|
||||
export default {
|
||||
name: "Brand",
|
||||
data() {
|
||||
return {
|
||||
dataForm: {
|
||||
key: ""
|
||||
},
|
||||
brandId: 0,
|
||||
catelogPath: [],
|
||||
dataList: [],
|
||||
cateRelationTableData: [],
|
||||
pageIndex: 1,
|
||||
pageSize: 10,
|
||||
totalPage: 0,
|
||||
dataListLoading: false,
|
||||
dataListSelections: [],
|
||||
addOrUpdateVisible: false,
|
||||
cateRelationDialogVisible: false,
|
||||
popCatelogSelectVisible: false
|
||||
};
|
||||
},
|
||||
components: {
|
||||
AddOrUpdate,
|
||||
// CategoryCascader
|
||||
},
|
||||
created() {
|
||||
this.getDataList();
|
||||
},
|
||||
methods: {
|
||||
addCatelogSelect() {
|
||||
this.popCatelogSelectVisible = false;
|
||||
this.$http({
|
||||
url: this.$http.adornUrl("/product/categorybrandrelation/save"),
|
||||
method: "post",
|
||||
data: this.$http.adornData({
|
||||
brandId: this.brandId,
|
||||
catelogId: this.catelogPath[this.catelogPath.length - 1]
|
||||
}, false)
|
||||
}).then(({data}) => {
|
||||
this.getCateRelation();
|
||||
});
|
||||
},
|
||||
deleteCateRelationHandle(id, brandId) {
|
||||
this.$http({
|
||||
url: this.$http.adornUrl("/product/categorybrandrelation/delete"),
|
||||
method: "post",
|
||||
data: this.$http.adornData([id], false)
|
||||
}).then(({data}) => {
|
||||
this.getCateRelation();
|
||||
});
|
||||
},
|
||||
updateCatelogHandle(brandId) {
|
||||
this.cateRelationDialogVisible = true;
|
||||
this.brandId = brandId;
|
||||
this.getCateRelation();
|
||||
},
|
||||
getCateRelation() {
|
||||
this.$http({
|
||||
url: this.$http.adornUrl("/product/categorybrandrelation/catelog/list"),
|
||||
method: "get",
|
||||
params: this.$http.adornParams({
|
||||
brandId: this.brandId
|
||||
})
|
||||
}).then(({data}) => {
|
||||
this.cateRelationTableData = data.data;
|
||||
});
|
||||
},
|
||||
|
||||
|
||||
// 获取数据列表
|
||||
getDataList() {
|
||||
this.dataListLoading = true;
|
||||
let params = {
|
||||
page: this.pageIndex,
|
||||
limit: this.pageSize,
|
||||
key: this.dataForm.key
|
||||
}
|
||||
getBrandList(params).then(res => {
|
||||
this.dataListLoading = false;
|
||||
this.totalPage = res.page.totalCount;
|
||||
this.dataList = res.page.list;
|
||||
})
|
||||
},
|
||||
|
||||
updateBrandStatus(data) {
|
||||
//发送请求修改状态
|
||||
editBrand(data).then(res => {
|
||||
this.$modal.notifySuccess("修改成功");
|
||||
})
|
||||
},
|
||||
|
||||
// 多选
|
||||
selectionChangeHandle(val) {
|
||||
this.dataListSelections = val;
|
||||
},
|
||||
// 新增 / 修改
|
||||
addOrUpdateHandle(id) {
|
||||
this.addOrUpdateVisible = true;
|
||||
this.$nextTick(() => {
|
||||
this.$refs.addOrUpdate.init(id);
|
||||
});
|
||||
},
|
||||
// 删除
|
||||
deleteHandle(id) {
|
||||
var ids = id ? [id] : this.dataListSelections.map(item => {
|
||||
return item.brandId;
|
||||
});
|
||||
this.$confirm(
|
||||
`确定对[id=${ids.join(",")}]进行[${id ? "删除" : "批量删除"}]操作?`,
|
||||
"提示",
|
||||
{
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}
|
||||
).then(() => {
|
||||
this.$modal.loading("请稍候...");
|
||||
delBrand(ids).then(res => {
|
||||
this.$modal.notifySuccess("删除成功");
|
||||
this.getDataList();
|
||||
this.$modal.closeLoading()
|
||||
})
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
|
@ -142,13 +142,18 @@ export default {
|
|||
this.menus = res.page;
|
||||
})
|
||||
},
|
||||
|
||||
|
||||
batchDelete() {
|
||||
let catIds = [];
|
||||
let checkedNodes = this.$refs.menuTree.getCheckedNodes();
|
||||
for (let i = 0; i < checkedNodes.length; i++) {
|
||||
catIds.push(checkedNodes[i].catId);
|
||||
}
|
||||
if (catIds.length===0) {
|
||||
this.$modal.notifyWarning("请选择删除内容")
|
||||
return
|
||||
}
|
||||
|
||||
this.$confirm(`是否批量删除菜单?`, "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
|
|
|
|||
|
|
@ -1,19 +1,14 @@
|
|||
package com.xjs.mall.product.controller;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Map;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import com.xjs.mall.product.entity.BrandEntity;
|
||||
import com.xjs.mall.product.service.BrandService;
|
||||
import com.xjs.utils.PageUtils;
|
||||
import com.xjs.utils.R;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Map;
|
||||
|
||||
|
||||
|
||||
|
|
@ -33,7 +28,7 @@ public class BrandController {
|
|||
/**
|
||||
* 列表
|
||||
*/
|
||||
@RequestMapping("/list")
|
||||
@GetMapping("/list")
|
||||
public R list(@RequestParam Map<String, Object> params){
|
||||
PageUtils page = brandService.queryPage(params);
|
||||
|
||||
|
|
@ -44,17 +39,17 @@ public class BrandController {
|
|||
/**
|
||||
* 信息
|
||||
*/
|
||||
@RequestMapping("/info/{brandId}")
|
||||
@GetMapping("/info/{brandId}")
|
||||
public R info(@PathVariable("brandId") Long brandId){
|
||||
BrandEntity brand = brandService.getById(brandId);
|
||||
|
||||
return R.ok().put("brand", brand);
|
||||
return R.ok().put("data", brand);
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存
|
||||
*/
|
||||
@RequestMapping("/save")
|
||||
@PostMapping("/save")
|
||||
public R save(@RequestBody BrandEntity brand){
|
||||
brandService.save(brand);
|
||||
|
||||
|
|
@ -64,7 +59,7 @@ public class BrandController {
|
|||
/**
|
||||
* 修改
|
||||
*/
|
||||
@RequestMapping("/update")
|
||||
@PutMapping("/update")
|
||||
public R update(@RequestBody BrandEntity brand){
|
||||
brandService.updateById(brand);
|
||||
|
||||
|
|
@ -74,7 +69,7 @@ public class BrandController {
|
|||
/**
|
||||
* 删除
|
||||
*/
|
||||
@RequestMapping("/delete")
|
||||
@DeleteMapping("/delete")
|
||||
public R delete(@RequestBody Long[] brandIds){
|
||||
brandService.removeByIds(Arrays.asList(brandIds));
|
||||
|
||||
|
|
|
|||
|
|
@ -90,7 +90,9 @@ public class CategoryController {
|
|||
@ApiOperation("删除")
|
||||
@Log(title = "商品分类", businessType = BusinessType.DELETE)
|
||||
public R delete(@RequestBody Long[] catIds) {
|
||||
|
||||
if (catIds == null || catIds.length == 0) {
|
||||
return R.error("请选择删除的分类");
|
||||
}
|
||||
categoryService.removeMenuByIds(Arrays.asList(catIds));
|
||||
|
||||
return R.ok();
|
||||
|
|
|
|||
|
|
@ -1,18 +1,18 @@
|
|||
package com.xjs.mall.product.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 品牌
|
||||
*
|
||||
* @author xiejs
|
||||
* @email 1294405880@qq.com
|
||||
* @date 2022-03-15 10:16:53
|
||||
* @since 2022-03-15 10:16:53
|
||||
*/
|
||||
@Data
|
||||
@TableName("pms_brand")
|
||||
|
|
@ -22,7 +22,7 @@ public class BrandEntity implements Serializable {
|
|||
/**
|
||||
* 品牌id
|
||||
*/
|
||||
@TableId
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
private Long brandId;
|
||||
/**
|
||||
* 品牌名
|
||||
|
|
|
|||
|
|
@ -0,0 +1,29 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<parent>
|
||||
<artifactId>xjs-project-mall</artifactId>
|
||||
<groupId>com.xjs</groupId>
|
||||
<version>3.3.0</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<name>第三方服务</name>
|
||||
|
||||
<artifactId>mall-third-party</artifactId>
|
||||
|
||||
<properties>
|
||||
<maven.compiler.source>11</maven.compiler.source>
|
||||
<maven.compiler.target>11</maven.compiler.target>
|
||||
</properties>
|
||||
|
||||
|
||||
<dependencies>
|
||||
<!--阿里云存储-->
|
||||
<dependency>
|
||||
<groupId>com.alibaba.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-alicloud-oss</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
</project>
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
package com.xjs.mall.thirdparty;
|
||||
|
||||
import com.baomidou.dynamic.datasource.spring.boot.autoconfigure.DynamicDataSourceAutoConfiguration;
|
||||
import com.baomidou.mybatisplus.autoconfigure.MybatisPlusAutoConfiguration;
|
||||
import com.ruoyi.common.security.annotation.EnableCustomConfig;
|
||||
import com.ruoyi.common.security.annotation.EnableRyFeignClients;
|
||||
import com.ruoyi.common.swagger.annotation.EnableCustomSwagger2;
|
||||
import io.seata.spring.boot.autoconfigure.SeataAutoConfiguration;
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
|
||||
|
||||
/**
|
||||
* 商城Product启动器
|
||||
* @author xiejs
|
||||
* @since 2022-03-15
|
||||
*/
|
||||
@SpringBootApplication(exclude ={DataSourceAutoConfiguration.class,
|
||||
SeataAutoConfiguration.class,
|
||||
MybatisPlusAutoConfiguration.class,
|
||||
DynamicDataSourceAutoConfiguration.class} )
|
||||
@EnableCustomConfig
|
||||
@EnableCustomSwagger2
|
||||
@EnableRyFeignClients
|
||||
public class MallThirdPartyApp {
|
||||
public static void main(String[] args) {
|
||||
SpringApplication.run(MallThirdPartyApp.class, args);
|
||||
}
|
||||
}
|
||||
29
xjs-business/xjs-project-mall/mall-third-party/src/main/resources/bootstrap.yml
vendored
Normal file
29
xjs-business/xjs-project-mall/mall-third-party/src/main/resources/bootstrap.yml
vendored
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
# Tomcat
|
||||
server:
|
||||
port: 9986
|
||||
|
||||
# Spring
|
||||
spring:
|
||||
application:
|
||||
# 应用名称
|
||||
name: xjs-mall-third-party
|
||||
profiles:
|
||||
# 环境配置
|
||||
active: dev
|
||||
cloud:
|
||||
nacos:
|
||||
discovery:
|
||||
# 服务注册地址
|
||||
server-addr: 127.0.0.1:8848
|
||||
config:
|
||||
# 配置中心地址
|
||||
server-addr: 127.0.0.1:8848
|
||||
# 配置文件格式
|
||||
file-extension: yml
|
||||
# 共享配置
|
||||
shared-configs:
|
||||
- application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
|
||||
#配置组
|
||||
group: xjs
|
||||
#命名空间
|
||||
namespace: xjs-666
|
||||
81
xjs-business/xjs-project-mall/mall-third-party/src/main/resources/logback.xml
vendored
Normal file
81
xjs-business/xjs-project-mall/mall-third-party/src/main/resources/logback.xml
vendored
Normal file
|
|
@ -0,0 +1,81 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<configuration scan="true" scanPeriod="60 seconds" debug="false">
|
||||
<!-- 日志存放路径 -->
|
||||
<property name="log.path" value="logs/xjs-mall/third-party"/>
|
||||
<!-- 日志输出格式 -->
|
||||
<property name="log.pattern" value="%d{HH:mm:ss.SSS} [%thread] %-5level %logger{20} - [%method,%line] - %msg%n" />
|
||||
|
||||
<!-- 控制台输出 -->
|
||||
<appender name="console" class="ch.qos.logback.core.ConsoleAppender">
|
||||
<encoder>
|
||||
<pattern>${log.pattern}</pattern>
|
||||
</encoder>
|
||||
</appender>
|
||||
|
||||
<!-- 系统日志输出 -->
|
||||
<appender name="file_info" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
<file>${log.path}/info.log</file>
|
||||
<!-- 循环政策:基于时间创建日志文件 -->
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
||||
<!-- 日志文件名格式 -->
|
||||
<fileNamePattern>${log.path}/info.%d{yyyy-MM-dd}.log</fileNamePattern>
|
||||
<!-- 日志最大的历史 60天 -->
|
||||
<maxHistory>60</maxHistory>
|
||||
</rollingPolicy>
|
||||
<encoder>
|
||||
<pattern>${log.pattern}</pattern>
|
||||
</encoder>
|
||||
<filter class="ch.qos.logback.classic.filter.LevelFilter">
|
||||
<!-- 过滤的级别 -->
|
||||
<level>INFO</level>
|
||||
<!-- 匹配时的操作:接收(记录) -->
|
||||
<onMatch>ACCEPT</onMatch>
|
||||
<!-- 不匹配时的操作:拒绝(不记录) -->
|
||||
<onMismatch>DENY</onMismatch>
|
||||
</filter>
|
||||
</appender>
|
||||
|
||||
<appender name="file_error" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
<file>${log.path}/error.log</file>
|
||||
<!-- 循环政策:基于时间创建日志文件 -->
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
||||
<!-- 日志文件名格式 -->
|
||||
<fileNamePattern>${log.path}/error.%d{yyyy-MM-dd}.log</fileNamePattern>
|
||||
<!-- 日志最大的历史 60天 -->
|
||||
<maxHistory>60</maxHistory>
|
||||
</rollingPolicy>
|
||||
<encoder>
|
||||
<pattern>${log.pattern}</pattern>
|
||||
</encoder>
|
||||
<filter class="ch.qos.logback.classic.filter.LevelFilter">
|
||||
<!-- 过滤的级别 -->
|
||||
<level>ERROR</level>
|
||||
<!-- 匹配时的操作:接收(记录) -->
|
||||
<onMatch>ACCEPT</onMatch>
|
||||
<!-- 不匹配时的操作:拒绝(不记录) -->
|
||||
<onMismatch>DENY</onMismatch>
|
||||
</filter>
|
||||
</appender>
|
||||
|
||||
<!-- 系统模块日志级别控制 -->
|
||||
<logger name="com.xjs" level="info" />
|
||||
<!--打印feign DEBUG日志-->
|
||||
<logger name="com.xjs.common.client" level="debug"/>
|
||||
<!-- Spring日志级别控制 -->
|
||||
<logger name="org.springframework" level="warn" />
|
||||
|
||||
<!-- 打开 Bean Searcher 的 SQL 日志 -->
|
||||
<logger name="com.ejlchina.searcher.implement.DefaultSqlExecutor" level="DEBUG" additivity="false">
|
||||
<appender-ref ref="console" />
|
||||
</logger>
|
||||
|
||||
<root level="info">
|
||||
<appender-ref ref="console" />
|
||||
</root>
|
||||
|
||||
<!--系统操作日志-->
|
||||
<root level="info">
|
||||
<appender-ref ref="file_info" />
|
||||
<appender-ref ref="file_error" />
|
||||
</root>
|
||||
</configuration>
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<!--
|
||||
This is the JRebel configuration file. It maps the running application to your IDE workspace, enabling JRebel reloading for this project.
|
||||
Refer to https://manuals.jrebel.com/jrebel/standalone/config.html for more information.
|
||||
-->
|
||||
<application generated-by="intellij" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.zeroturnaround.com" xsi:schemaLocation="http://www.zeroturnaround.com http://update.zeroturnaround.com/jrebel/rebel-2_3.xsd">
|
||||
|
||||
<id>mall-third-party</id>
|
||||
|
||||
<classpath>
|
||||
<dir name="D:/Dev/IdeaPerject/GitHub/Cloud/xjs-business/xjs-project-mall/mall-third-party/target/classes">
|
||||
</dir>
|
||||
</classpath>
|
||||
|
||||
</application>
|
||||
|
|
@ -16,6 +16,7 @@
|
|||
<module>mall-member</module>
|
||||
<module>mall-coupon</module>
|
||||
<module>renren-generator</module>
|
||||
<module>mall-third-party</module>
|
||||
</modules>
|
||||
<packaging>pom</packaging>
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue