diff --git a/antd-ova/config/router.config.js b/antd-ova/config/router.config.js
index ca35b49c37225b2bf6494c562de1e296eb5bf6c8..ebd0b69c64d4043a51a189acba4ffcfafc3fc1b2 100644
--- a/antd-ova/config/router.config.js
+++ b/antd-ova/config/router.config.js
@@ -39,23 +39,32 @@ export default [
},{
path: '/system/role/add/:id',
component: './System/Role/edit/Index'
- }
- ]
- },{
- path: '/seller',
- name: 'seller',
- routes:[
- {
- path:'/seller/member',
- name: 'member',
- component: './Seller/Member/Index'
- },
+ },{
+ path: '/goods',
+ name: "goods",
+ routes: [
{
- path:'/seller/member/:id',
- name: 'member.detail',
- hideInMenu: 'true',
- component: './Seller/Member/Detail'
- }
+ path:'/goods/list',
+ name: 'goodslist',
+ component: "./Goods/List",
+ },{
+ path: '/goods/create',
+ component: './Goods/Create',
+ },{
+ path: '/seller',
+ name: 'seller',
+ routes:[
+ {
+ path:'/seller/member',
+ name: 'member',
+ component: './Seller/Member/Index'
+ },
+ {
+ path:'/seller/member/:id',
+ name: 'member.detail',
+ hideInMenu: 'true',
+ component: './Seller/Member/Detail'
+ }
]
},
{
diff --git a/antd-ova/package.json b/antd-ova/package.json
index 50f3160fd30a7dce0ac1b5af247a10151d720857..5261bc12f806c2f05f83cfb66776c68d6a3110e3 100644
--- a/antd-ova/package.json
+++ b/antd-ova/package.json
@@ -51,6 +51,7 @@
"axios": "^0.19.0",
"bizcharts": "^3.4.3",
"bizcharts-plugin-slider": "^2.1.1-beta.1",
+ "braft-editor": "^2.3.8",
"classnames": "^2.2.6",
"dva": "^2.4.1",
"enquire-js": "^0.2.1",
diff --git a/antd-ova/src/OvaConfig.js b/antd-ova/src/OvaConfig.js
index 6c6db6c5a09de46214496a67799292c8539fabda..fd338de0f0d86ef0e4b2d567308b5e1bb92e72ad 100644
--- a/antd-ova/src/OvaConfig.js
+++ b/antd-ova/src/OvaConfig.js
@@ -1,7 +1,7 @@
module.exports = {
OvaBase: '/ova',
- OvaServiceApi: 'http://user1.ova.com:8088/ova-api',
+ OvaServiceApi: 'http://localhost:8088/ova-api',
OvaUploadApi: '/ova-api/fileupload',
// OvaDownloadApi: 'http://www.qiniuimage.jt-lee.cn',
}
diff --git a/antd-ova/src/custom/BraftEditor.js b/antd-ova/src/custom/BraftEditor.js
new file mode 100644
index 0000000000000000000000000000000000000000..8b4796cfedb53f862ac8c1a2ad0b8eb655705782
--- /dev/null
+++ b/antd-ova/src/custom/BraftEditor.js
@@ -0,0 +1,65 @@
+import 'braft-editor/dist/index.css';
+// import 'prismjs/components/prism-java'
+
+import BraftEditor from 'braft-editor'
+import styles from "./BraftEditor.less";
+
+import { PureComponent } from 'react';
+import { Upload } from 'antd';
+import { ContentUtils } from 'braft-utils'
+import { ImageUtils } from 'braft-finder'
+
+export default class CustomerBraftEditor extends PureComponent {
+
+ state = {
+ editorState: BraftEditor.createEditorState(this.props.value)
+ }
+
+ handleChange = (editorState) => {
+ this.setState({ editorState });
+ this.props.onChange(editorState.toHTML());
+ }
+
+ uploadHandler = (param) => {
+ if (!param.file) {
+ return false
+ }
+
+ this.setState({
+ editorState: ContentUtils.insertMedias(this.state.editorState, [{
+ type: 'IMAGE',
+ url: URL.createObjectURL
+ }])
+ })
+
+ }
+
+ render() {
+
+ const extendControls = [
+ {
+ key: 'antd-uploader',
+ type: 'component',
+ component: (
+
+ * 获取当前线程下jdbctemplate
+ */
+public class OvaJdbcTemplate {
+
+ public static JdbcTemplate get() {
+ DataSource dataSource = DataSourceCache.dataSourceMap.get(TenantContextHolder.getTenant());
+ return new JdbcTemplate(dataSource);
+ }
+
+}
diff --git a/ova-boot/ova-root/src/main/java/cn/ova/init/InitData.java b/ova-boot/ova-root/src/main/java/cn/ova/init/InitData.java
index b4cd6379cdb07775bf1dcc8aa0008ba6105ea987..1437335a34b9e8a872aef95228efcdb300bed4eb 100644
--- a/ova-boot/ova-root/src/main/java/cn/ova/init/InitData.java
+++ b/ova-boot/ova-root/src/main/java/cn/ova/init/InitData.java
@@ -3,6 +3,7 @@ package cn.ova.init;
import cn.ova.core.util.Address;
import cn.ova.core.util.AddressCache;
import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.boot.CommandLineRunner;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Component;
@@ -20,6 +21,7 @@ import java.util.stream.Collectors;
@Component
public class InitData implements CommandLineRunner {
@Autowired
+ @Qualifier("masterJdbcTemplate")
JdbcTemplate template;
@Override
diff --git a/ova-boot/ova-seller/src/main/java/cn/ova/dto/goods/GoodsCreator.java b/ova-boot/ova-seller/src/main/java/cn/ova/dto/goods/GoodsCreator.java
new file mode 100644
index 0000000000000000000000000000000000000000..40090b8feaa4ca7e75a9080e80696a4738657289
--- /dev/null
+++ b/ova-boot/ova-seller/src/main/java/cn/ova/dto/goods/GoodsCreator.java
@@ -0,0 +1,25 @@
+package cn.ova.dto.goods;
+
+import cn.ova.entity.tenant.goods.OvaGoodsStock;
+import lombok.Data;
+
+import java.math.BigDecimal;
+import java.util.List;
+
+/**
+ * @author lijiantao
+ * @date 2019-11-18
+ * @description
+ */
+@Data
+public class GoodsCreator {
+ private Long goodsId;
+ private Long cateId;
+ private String cateName; //由父分类和子分类拼接 比如 鞋类 - 男鞋
+ private String name;
+ private String detail;
+ private String img;
+ private BigDecimal stockQuantity;
+
+ private List