Merge remote-tracking branch 'origin/master'

zhc4dev
wangjiadong 2 years ago
commit 8e75680fc7
  1. 4
      ant-design-vue-jeecg/src/config/router.config.js
  2. 117
      ant-design-vue-jeecg/src/views/shopping/pages/chengyi.vue
  3. 5
      ant-design-vue-jeecg/src/views/shopping/pages/clothDetail.vue
  4. 29
      ant-design-vue-jeecg/src/views/shopping/pages/clothDetail1.vue
  5. 558
      ant-design-vue-jeecg/src/views/shopping/pages/placeOrder.vue
  6. 42
      ant-design-vue-jeecg/src/views/shopping/shopHome.vue
  7. 6
      jeecg-boot/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/config/shiro/ShiroConfig.java
  8. 48
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/zygoods/controller/ZyGoodsController.java
  9. 338
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/zyorders/controller/ZyOrdersController.java
  10. 51
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/zyorders/entity/Dz.java

@ -672,4 +672,8 @@ export const constantRouterMap = [
path: '/shopping/billDetail',//这里是你需要设置新窗口打开的页面的路径s path: '/shopping/billDetail',//这里是你需要设置新窗口打开的页面的路径s
component: () => import('@/views/shopping/components/billDetail'), component: () => import('@/views/shopping/components/billDetail'),
}, },
{
path: '/shopping/ClothDetail1',//这里是你需要设置新窗口打开的页面的路径s
component: () => import('@/views/shopping/pages/clothDetail1'),
},
] ]

@ -75,6 +75,7 @@
</template> </template>
<script> <script>
import Header from '../components/Header/HeaderView' import Header from '../components/Header/HeaderView'
import { httpAction, getAction } from '@/api/manage'
let compareDown = function (prop) { let compareDown = function (prop) {
return function (obj1, obj2) { return function (obj1, obj2) {
var val1 = obj1[prop]; var val1 = obj1[prop];
@ -106,89 +107,12 @@
components: {Header}, components: {Header},
data() { data() {
return { return {
url: {
cd: "/zygoods/zyGoods/cd",
cylxlist: "/zygoods/zyGoods/cylxlist",
},
// //
clothsList: [ clothsList: [],
{
id: 1,
imgUrl: require("../assets/cloth.png"),
currentPrice: 199,
historicalPrice: 799,
title: "HOODIE 运动长袖连帽卫衣套头衫",
heat: 3100,
},
{
id: 2,
imgUrl: require("../assets/cloth.png"),
currentPrice: 299,
historicalPrice: 799,
title: "HOODIE 运动长袖连帽卫衣套头衫",
heat: 3200,
},
{
id: 3,
imgUrl: require("../assets/cloth.png"),
currentPrice: 399,
historicalPrice: 799,
title: "HOODIE 运动长袖连帽卫衣套头衫",
heat: 3300,
},
{
id: 4,
imgUrl: require("../assets/cloth.png"),
currentPrice: 499,
historicalPrice: 799,
title: "HOODIE 运动长袖连帽卫衣套头衫",
heat: 3400,
},
{
id: 5,
imgUrl: require("../assets/cloth.png"),
currentPrice: 599,
historicalPrice: 799,
title: "HOODIE 运动长袖连帽卫衣套头衫",
heat: 3500,
},
{
id: 6,
imgUrl: require("../assets/cloth.png"),
currentPrice: 699,
historicalPrice: 799,
title: "HOODIE 运动长袖连帽卫衣套头衫",
heat: 3600,
},
{
id: 7,
imgUrl: require("../assets/cloth.png"),
currentPrice: 599,
historicalPrice: 799,
title: "HOODIE 运动长袖连帽卫衣套头衫",
heat: 3700,
},
{
id: 8,
imgUrl: require("../assets/cloth.png"),
currentPrice: 599,
historicalPrice: 799,
title: "HOODIE 运动长袖连帽卫衣套头衫",
heat: 3800,
},
{
id: 9,
imgUrl: require("../assets/cloth.png"),
currentPrice: 599,
historicalPrice: 799,
title: "HOODIE 运动长袖连帽卫衣套头衫",
heat: 3900,
},
{
id: 10,
imgUrl: require("../assets/cloth.png"),
currentPrice: 599,
historicalPrice: 799,
title: "HOODIE 运动长袖连帽卫衣套头衫",
heat:4000,
},
],
// //
typeData: [ typeData: [
{ {
@ -419,10 +343,17 @@
this.findIndex(indexPath) this.findIndex(indexPath)
//,this.current.id //,this.current.id
// this.clothsList // this.clothsList
getAction(this.url.cylxlist,{typeid:indexPath[1]}).then((res1) => {
if (res1.success) {
this.clothsList = res1.result;
}else{
this.$message.error(res1.message);
}
});
}, },
clothDetails(item) { clothDetails(item) {
this.$router.push({ this.$router.push({
path: "/shopping/ClothDetail", path: "/shopping/ClothDetail1",
query: { id: item.id, title: item.title ,name:this.current.name,parentName:this.current.parrentName}, query: { id: item.id, title: item.title ,name:this.current.name,parentName:this.current.parrentName},
}); });
}, },
@ -443,9 +374,23 @@
} }
}, },
mounted() { mounted() {
this.current.name = this.typeData[0].childrens[0].name getAction(this.url.cd).then((res) => {
this.current.id = this.typeData[0].childrens[0].id if (res.success) {
this.current.parrentName = this.typeData[0].name this.typeData = res.result;
this.current.name = res.result[0].childrens[0].name
this.current.id = res.result[0].childrens[0].id
this.current.parrentName = res.result[0].name
getAction(this.url.cylxlist,{typeid:res.result[0].childrens[0].id}).then((res1) => {
if (res1.success) {
this.clothsList = res1.result;
}else{
this.$message.error(res1.message);
}
});
}else{
this.$message.error(res.message);
}
});
} }
} }
</script> </script>

@ -293,6 +293,11 @@
path: "/shopping/placeOrder", path: "/shopping/placeOrder",
query: { query: {
// id: item.id,// // id: item.id,//
goodsid:this.$route.query.id,
size : this.size,
title :this.$route.query.title,
name :this.$route.query.name,
parentName : this.$route.query.parentName,
}, },
}); });
} }

@ -1,6 +1,6 @@
<template> <template>
<!-- 服装详情页--> <!-- 服装详情页-->
<div class="clothDetails"> <div class="clothDetails1">
<Header fontColor="#000"></Header> <Header fontColor="#000"></Header>
<div class="jz menu d-flex"> <div class="jz menu d-flex">
<el-breadcrumb separator="/"> <el-breadcrumb separator="/">
@ -27,7 +27,7 @@
<a-carousel arrows dots-class="slick-dots slick-thumb" > <a-carousel arrows dots-class="slick-dots slick-thumb" >
<template slot="customPaging" slot-scope="props" > <template slot="customPaging" slot-scope="props" >
<a v-for="(item,index) in baseUrl" :key="index"> <a v-for="(item,index) in baseUrl" :key="index">
<!-- <img v-for="(item,index) in baseUrl" :key="index" :src="item" />--> <!-- <img v-for="(item,index) in baseUrl" :key="index" :src="item" />-->
<img :src="item" /> <img :src="item" />
</a> </a>
</template> </template>
@ -73,8 +73,8 @@
</span> </span>
</el-dialog> </el-dialog>
<div class="sizeDiv"> <div class="sizeDiv">
<!-- <div class="sizeDiv d-flex" id="sizeDiv">--> <!-- <div class="sizeDiv d-flex" id="sizeDiv">-->
<!-- <span class="item f_16" v-for="(item,index) in sizeList" :key="index" @click="chooseSize(item,index)">{{item.size}}</span>--> <!-- <span class="item f_16" v-for="(item,index) in sizeList" :key="index" @click="chooseSize(item,index)">{{item.size}}</span>-->
<el-radio-group v-model="size" size="small" @change="sizeChange"> <el-radio-group v-model="size" size="small" @change="sizeChange">
<el-radio-button v-for="(item,index) in sizeList" :key="index" :label="item.size" :disabled="!item.flag" ></el-radio-button> <el-radio-button v-for="(item,index) in sizeList" :key="index" :label="item.size" :disabled="!item.flag" ></el-radio-button>
</el-radio-group> </el-radio-group>
@ -151,7 +151,7 @@
import Footer from "../components/Footer/FooterView" import Footer from "../components/Footer/FooterView"
import { httpAction, getAction } from '@/api/manage' import { httpAction, getAction } from '@/api/manage'
export default { export default {
name: "clothDetail", name: "clothDetail1",
components: { Header,Footer }, components: { Header,Footer },
data() { data() {
return { return {
@ -293,6 +293,11 @@
path: "/shopping/placeOrder", path: "/shopping/placeOrder",
query: { query: {
// id: item.id,// // id: item.id,//
goodsid:this.$route.query.id,
size : this.size,
title :this.$route.query.title,
name :this.$route.query.name,
parentName : this.$route.query.parentName,
}, },
}); });
} }
@ -334,7 +339,7 @@
}; };
</script> </script>
<style> <style>
.clothDetails .cytj { .clothDetails1 .cytj {
border-bottom: 2px solid #000; border-bottom: 2px solid #000;
} }
@ -348,7 +353,7 @@
#btn02{ #btn02{
display: none; display: none;
} }
.clothDetails { .clothDetails1 {
.menu{ .menu{
justify-content: space-between; justify-content: space-between;
padding-top: 100px; padding-top: 100px;
@ -500,10 +505,10 @@
} }
.selected{ .selected{
.title{ .title{
border-left: 5px solid #746957; border-left: 5px solid #746957;
height: 40px; height: 40px;
line-height: 40px; line-height: 40px;
padding-left: 25px; padding-left: 25px;
margin-bottom: 50px; margin-bottom: 50px;
} }
.selectedCloth{ .selectedCloth{

@ -1,23 +1,23 @@
<template> <template>
<!-- 订单详情--> <!-- 订单详情-->
<div class="placeOrder"> <div class="placeOrder">
<Header fontColor="#000"></Header> <Header fontColor="#000"></Header>
<div style="padding-top: 88px"></div> <div style="padding-top: 88px"></div>
<div class="orderMain"> <div class="orderMain">
<div class="jz"> <div class="jz">
<!-- <el-breadcrumb class="breadcrumb" separator="/">--> <!-- <el-breadcrumb class="breadcrumb" separator="/">-->
<!-- <el-breadcrumb-item :to="{ path: '/shopping/person' }">个人中心</el-breadcrumb-item>--> <!-- <el-breadcrumb-item :to="{ path: '/shopping/person' }">个人中心</el-breadcrumb-item>-->
<!-- <el-breadcrumb-item :to="{ path: '/shopping/person' }">全部订单</el-breadcrumb-item>--> <!-- <el-breadcrumb-item :to="{ path: '/shopping/person' }">全部订单</el-breadcrumb-item>-->
<!-- <el-breadcrumb-item>订单详情</el-breadcrumb-item>--> <!-- <el-breadcrumb-item>订单详情</el-breadcrumb-item>-->
<!-- </el-breadcrumb>--> <!-- </el-breadcrumb>-->
<div class="d-flex"> <div class="d-flex">
<div class="l"> <div class="l">
<div class="card"> <div class="card">
<p class="f_24">待支付</p> <p class="f_24">待支付</p>
<!-- <p class="f_24" v-if="!this.model.pay">待支付</p>--> <!-- <p class="f_24" v-if="!this.model.pay">待支付</p>-->
<!-- <p class="f_24" v-if="!this.model.receipt && this.model.pay">待收货</p>--> <!-- <p class="f_24" v-if="!this.model.receipt && this.model.pay">待收货</p>-->
<!-- <p class="f_24" v-if="this.model.receipt">已完成</p>--> <!-- <p class="f_24" v-if="this.model.receipt">已完成</p>-->
<!-- <a class="c_333 f_12" v-if="this.model.receipt">查看发票详情</a>--> <!-- <a class="c_333 f_12" v-if="this.model.receipt">查看发票详情</a>-->
</div> </div>
<div class="steps"> <div class="steps">
<a-steps direction="vertical" size="small" :current="current"> <a-steps direction="vertical" size="small" :current="current">
@ -62,34 +62,36 @@
<a-button <a-button
class="defaultAddr" class="defaultAddr"
style="padding-top: 10px;word-wrap: break-word; style="padding-top: 10px;word-wrap: break-word;
overflow-wrap: break-word; overflow-wrap: break-word;
white-space: normal; white-space: normal;
height: auto; height: auto;
margin-bottom:10px; margin-bottom:10px;
text-align:left; text-align:left;
overflow: hidden;" v-for="(item,index) in addrList" :key="index" @click="chooseAddr(item)" > overflow: hidden;" >
<p class="text">{{item.addr1}}</p> <j-area-linkage disabled type="cascader" v-model="defaultAddr.addr1" placeholder="请选择省市区"/>
<p class="text">{{item.addr2}}</p> <p class="text f_12">{{defaultAddr.addr2}}</p>
<p class="text d-flex"><span>463000</span><span v-if="item.flag">默认地址</span></p> <p class="text d-flex f_14"><span>{{defaultAddr.postCode}}</span><span v-if="defaultAddr.flag">默认地址</span></p>
</a-button> </a-button>
<!-- <p class="headline">已发货</p>--> <a-button @click="showModal">选择其他地址</a-button>
<!-- <p class="text">您的订单已经发出</p>-->
<!-- <p class="headline">尊享免费配送您的物流单号</p>-->
<!-- <p class="text">4263882788397</p>-->
</div> </div>
<div class="orderList "> <div class="orderList ">
<div class="item d-flex"> <div class="item d-flex">
<div class="img"> <div class="img">
<img src="../assets/cloth001.png"> <img :src="tp">
</div> </div>
<div class="info"> <div class="info">
<p class="f_14 c_333 headline">商品名商品名商品名商品名商品</p> <p class="f_14 c_333 headline">{{this.dingdaninfo.goodsName}}</p>
<p class="d-flex">款式<span>衬衫</span></p> <p class="d-flex">款式<span>{{this.dingdaninfo.styleNames}}</span></p>
<p class="d-flex">尺码<span>XXL</span></p> <p class="d-flex">尺码<span>{{this.dingdaninfo.modelNumber}}</span></p>
<p class="d-flex">主辅料<span>主料1辅料2辅料3辅料4辅料5辅料6</span></p> <p class="d-flex">主辅料<span>{{this.dingdaninfo.name}}</span></p>
</div> </div>
<div class="right d-flex f_14 c_333"> <div class="right d-flex f_14 c_333">
<span>1</span><span>2478</span><span>2478</span> <span>
<el-input-number style="width: 80px" controls-position="right" size="mini" v-model="dingdaninfo.num" @change="handleChange" :min="1"></el-input-number>
</span>
<span>{{this.dingdaninfo.price}}</span>
<span>{{this.dingdaninfo.total}}</span>
</div> </div>
</div> </div>
</div> </div>
@ -98,39 +100,157 @@
<p class="d-flex"> <p class="d-flex">
<span class="leftSide f_20" style="font-weight:500">购买人</span> <span class="leftSide f_20" style="font-weight:500">购买人</span>
<span class="midst f_16">小记</span> <span class="midst f_16">小记</span>
<span class="rightSide f_16" style="font-weight:500">4,956</span> <span class="rightSide f_16" style="font-weight:500">{{this.dingdaninfo.total}}</span>
</p> </p>
<p class="d-flex"> <p class="d-flex">
<span class="leftSide f_18">王贰</span> <span class="leftSide f_18">{{this.dingdaninfo.buyer}}</span>
<span class="midst f_16">运费总计</span> <span class="midst f_16">运费总计</span>
<span class="rightSide f_16" style="font-weight:500">0</span> <span class="rightSide f_16" style="font-weight:500">{{this.dingdaninfo.fare}}</span>
</p> </p>
<p class="d-flex"> <p class="d-flex">
<span class="leftSide"></span> <span class="leftSide"></span>
<span class="midst f_20" style="font-weight:600">总计</span> <span class="midst f_20" style="font-weight:600">总计</span>
<span class="rightSide f_20" style="font-weight:600">4,956</span> <span class="rightSide f_20" style="font-weight:600">{{this.dingdaninfo.all}}</span>
</p> </p>
</div> </div>
</div> </div>
</div> </div>
<div class="btn"> <div class="btn">
<a class="c_fff f_16" @click="handleBack">返回</a> <a class="c_fff f_16" @click="handleBack">返回</a>
<a class="c_fff f_16">提交</a> <a class="c_fff f_16" @click="tj()">提交</a>
</div> </div>
</div> </div>
</div> </div>
<a-modal :width="800" v-model="visible" title="选择其他地址" @ok="handleOk" @cancel="handleCancel">
<a-radio-group v-model="value" @change="onChange">
<a-radio :style="radioStyle" v-for="(item,index) in formInline" :key="index" :value="item.id">
<div style="display: flex;align-items: center">
<j-area-linkage type="cascader" v-model="item.addr1" placeholder="请选择省市区" style="margin-right: 20px"/>
<span style="margin-right: 20px;word-wrap: break-word;
overflow-wrap: break-word;
white-space: normal;">{{item.addr2}}</span><span>{{item.postCode}}</span>
</div>
</a-radio>
</a-radio-group>
</a-modal>
<a-modal v-model="visible2" class="toPay">
<template slot="title">
<div class="c_1B f_20" style="text-align: center;padding: 5px;font-weight: 500">支付宝支付</div>
</template>
<div class="d-flex"
style="
width: 450px;
padding: 30px 10px;
margin: 0 auto;">
<div class="l"
style="
width: 120px;
height: 120px;
background-color: grey;
margin-right: 20px;" @click="zhifu">
</div>
<div class="r" style="width:290px">
<p class="f_16 c_4B">总计: {{this.dingdaninfo.all}}</p>
<p class="f_14 c_4B">请使用支付宝扫描左图二维码进行支付</p>
<p class="f_14 c_4B">请您在15分钟内付款以免订单被取消如有疑问请联系客服</p>
<p class="f_14 c_4B">订单发货后您将收到订单发货通知短信</p>
</div>
</div>
<template slot="footer">
<div class="d-flex" style="justify-content: center;align-items:center">
<a-button style="margin-right: 30px;border:none;font-size: 12px">手机不在身边 登录账号付款</a-button>
<a-button style="font-size: 12px" size="small" @click="handleCancel">
返回
</a-button>
</div>
</template>
</a-modal>
<Footer></Footer> <Footer></Footer>
</div> </div>
</template> </template>
<script> <script>
import Header from "../components/Header/HeaderView"; import Header from "../components/Header/HeaderView";
import Footer from "../components/Footer/FooterView" import Footer from "../components/Footer/FooterView"
import { httpAction, getAction } from '@/api/manage'
export default { export default {
name: "placeOrder", name: "placeOrder",
components: { Header,Footer }, components: { Header,Footer },
data() { data() {
return { return {
url: {
xd: "/zyorders/zyOrders/xd",
dzlist: "/zyorders/zyOrders/dzlist",
TJorder: "/zyorders/zyOrders/TJorder",
zf: "/zyorders/zyOrders/zf",
},
ordersid:"",
tp:"../assets/cloth001.png",
dingdaninfo:{
orderNum:111111,
createTime:'2022-08-19',
goodsName:'男士职业正装外套',
styleNames:'test01',
modelNumber:'S',
name:'白色素面布',
typeName:'有纺树脂衬',
num:1,
price:2478,
total:2478,
buyer:'张三',
fare:0,//
all:0//
},//
value: 1,//id
radioAddr:{
},//
radioStyle: {
display: 'flex',
alignItems:'center'
},
current:0,// current:0,//
visible:false,//
visible2:false,//
//
formInline: [
{
id:134325,
user: false,
addr1:'210521',
addr2:'黄淮学院南校区学府花园26号楼弹窗1',
postCode:'463800',
flag:false//
},
{
id:2432,
user: false,
addr1:'210521',
addr2:'黄淮学院南校区学府花园26号楼弹窗2',
postCode:'463800',
flag:false
},
{
id:324345,
user: false,
addr1:'210521',
addr2:'黄淮学院南校区学府花园26号楼弹窗3',
postCode:'463800',
flag:false
},
{
id:424365,
user: false,
addr1:'210521',
addr2:'黄淮学院南校区学府花园26号楼弹窗4',
postCode:'463800',
flag:false
},
],
model:{ model:{
id:'',//id id:'',//id
orderNum:'1111111',// orderNum:'1111111',//
@ -138,37 +258,107 @@
pay:false,// pay:false,//
// receipt:false // receipt:false
}, },
addrList:[// //
{ defaultAddr:{
id:1, id:'1',
addr1:'河南省 驻马店市 驿城区', addr1:'210521',
addr2:'黄淮学院南校区学府花园26号楼3602', addr2:'黄淮学院南校区学府花园26号楼默认1',
flag:true// flag:true,//
}, postCode:'463800',
{ },
id:2,
addr1:'河南省 驻马店市 驿城区',
addr2:'黄淮学院南校区学府花园26号楼3601',
flag:false
}
]
}; };
}, },
methods:{ methods:{
chooseAddr(item){ tj(){
console.log(item) getAction(this.url.TJorder,{OrdersNum:this.model.orderNum,goodsid:this.$route.query.goodsid,goodsNum:this.dingdaninfo.num}).then((res1) => {
if (res1.success) {
this.ordersid = res1.result;
//console.log(res1.result)
this.visible2 = true;
}else{
this.$message.error(res1.message);
}
});
},
zhifu() {
getAction(this.url.zf,{ordersid:this.ordersid,goodsid:this.$route.query.goodsid}).then((res1) => {
if (res1.success) {
this.$notification['success']({
message: '支付成功!',
description:
'自动为您跳转首页中...',
});
let that = this
setTimeout(function(){
that.$router.push({
path: "/shopping/shopHome",
query: {
// id: item.id,
},
});
},2000);
}else{
this.$message.error(res1.message);
}
});
},
handleChange(value) {
this.dingdaninfo.total = this.dingdaninfo.price*value
this.dingdaninfo.all = this.dingdaninfo.total + this.dingdaninfo.fare
},
onChange(e) {
this.radioAddr = this.formInline.find(object => object.id == e.target.value)
this.value = e.target.value
},
showModal() {
this.visible = true;
},
handleOk(e) {
this.visible = false;
if(JSON.stringify(this.radioAddr) !== "{}"){
this.defaultAddr = this.radioAddr
}
},
handleCancel(e) {
this.visible = false;
this.visible2 = false;
}, },
handleBack(){ handleBack(){
this.$router.push({ this.$router.push({
path: "/shopping/ClothDetail", path: "/shopping/ClothDetail",
query: { query: { id: this.$route.query.goodsid, title: this.$route.query.title ,name:this.$route.query.name,parentName:this.$route.query.parentName},
// id: item.id,
},
}); });
} }
}, },
mounted() { mounted() {
this.dingdaninfo.all = this.dingdaninfo.total + this.dingdaninfo.fare;
getAction(this.url.dzlist).then((res) => {
if (res.success) {
//console.log(res.result);
this.formInline = res.result;
}else{
this.$message.error(res.message);
}
});
getAction(this.url.xd,{goodsid:this.$route.query.goodsid}).then((res1) => {
if (res1.success) {
//console.log(res1.result)
this.model.orderTime = res1.result.dqsj;
this.model.orderNum = res1.result.orderNum;
this.defaultAddr = res1.result.address;
this.dingdaninfo.buyer = res1.result.gmr;
this.dingdaninfo.goodsName = res1.result.spmc;
this.dingdaninfo.styleNames=res1.result.spks;
this.dingdaninfo.modelNumber=this.$route.query.size;
this.dingdaninfo.name=res1.result.zfl;
this.dingdaninfo.price=res1.result.spjg;
this.tp=res1.result.sptp;
this.dingdaninfo.total = res1.result.spjg;
this.dingdaninfo.all = res1.result.spjg;
}else{
this.$message.error(res1.message);
}
});
}, },
}; };
</script> </script>
@ -179,156 +369,180 @@
</style> </style>
<style lang="less" scoped> <style lang="less" scoped>
@import '../assets/common.css'; @import '../assets/common.css';
.orderMain{ .j-area-linkage /deep/ .area-select{
background: #F6F6F6; background-color: #fff;
padding-bottom: 100px; border: none;
padding-top: 50px; span{
.jz{ padding-left: 0;
.breadcrumb{ font-size: 12px;
padding-top: 50px; color:#313131;
padding-bottom: 50px; cursor:auto;
font-weight: 500;
}
i{
display: none;
} }
.d-flex{ }
justify-content: space-between; .ant-radio-group /deep/ .area-cascader-wrap{
.l{ height:40px;
width: 300px; .area-select{
.card{ height: 40px;
.area-selected-trigger{
height: 40px;line-height:40px;
padding: 0;
}
}
}
.orderMain{
background: #F6F6F6;
padding-bottom: 100px;
padding-top: 50px;
.jz{
.breadcrumb{
padding-top: 50px;
padding-bottom: 50px;
}
.d-flex{
justify-content: space-between;
.l{
width: 300px; width: 300px;
height: 157px; .card{
background: #FFFFFF; width: 300px;
margin-bottom: 20px; height: 157px;
text-align: center; background: #FFFFFF;
padding-top: 40px;
.f_24{
color: #C8A985;
margin-bottom: 20px; margin-bottom: 20px;
} text-align: center;
.f_12{ padding-top: 40px;
padding: 5px 14px; .f_24{
border: 1px solid #333333;
}
}
.steps{
width: 300px;
height: 736px;
background: #FFFFFF;
padding: 32px 55px;
}
}
.r{
width: 1110px;
height: 913px;
background: #FFFFFF;
padding: 54px 48px;
.title{
padding-bottom: 15px;
border-bottom: 1px solid #DADADA;
.line{
margin-left: 10px;
margin-right: 10px;
}
.right{
width: 25%;
span{
color: #C8A985; color: #C8A985;
margin-bottom: 20px;
}
.f_12{
padding: 5px 14px;
border: 1px solid #333333;
} }
} }
} .steps{
.orderDiv{ width: 300px;
padding-bottom: 20px; /*height: 736px;*/
border-bottom: 1px solid #DADADA; background: #FFFFFF;
.orderAddr{ padding: 32px 55px;
width: 25%;
color: #333;
font-size: 16px;
p{
margin-bottom: 10px;
}
.headline{
font-weight: 500;
color: #C8A985;
margin-top: 30px;
}
.text{
font-weight: 400;
} }
} }
.orderList{ .r{
width: 75%; width: 1110px;
.item{ /*height: 913px;*/
padding-top: 30px; background: #FFFFFF;
padding: 54px 48px;
.title{
padding-bottom: 15px;
border-bottom: 1px solid #DADADA; border-bottom: 1px solid #DADADA;
&:last-of-type{ .line{
border: none; margin-left: 10px;
margin-right: 10px;
} }
.img{ .right{
width: 23.33%; width: 25%;
img{ span{
width: 180px; color: #C8A985;
height: 180px;
} }
} }
.info{ }
width: 43.33%; .orderDiv{
padding-right: 15px; padding-bottom: 20px;
border-bottom: 1px solid #DADADA;
.orderAddr{
width: 25%;
color: #333;
font-size: 16px;
p{
margin-bottom: 10px;
}
.headline{ .headline{
font-weight: 500; font-weight: 500;
color: #C8A985;
margin-top: 30px;
} }
p{ .text{
span{ font-weight: 400;
margin-left: 10px;
display: inline-block;
width: 75%;
}
} }
} }
.right{ .orderList{
width: 33.33%; width: 75%;
font-weight: 500; .item{
} padding-top: 30px;
} border-bottom: 1px solid #DADADA;
&:last-of-type{
border: none;
}
.img{
width: 23.33%;
img{
width: 180px;
height: 180px;
}
}
.info{
width: 43.33%;
padding-right: 15px;
.headline{
font-weight: 500;
}
p{
span{
margin-left: 10px;
display: inline-block;
width: 75%;
}
}
}
.right{
width: 33.33%;
font-weight: 500;
}
}
}} }}
.heji{ .heji{
padding: 30px 20px; padding: 30px 20px;
p{ p{
span{ span{
width: 20%; width: 20%;
color: #333; color: #333;
} }
.leftSide{ .leftSide{
text-align: left; text-align: left;
} }
.midst{ .midst{
text-align: center; text-align: center;
} }
.rightSide{ .rightSide{
text-align: right; text-align: right;
}
} }
} }
} }
} }
} }
.btn{
a{
display: inline-block;
width: 284px;
height: 56px;
background: #1B1B1B;
line-height: 56px;
margin-right: 20px;
}
&:hover{
color: red;
}
text-align: center;
margin-top: 60px;
}
} }
.btn{
a{
display: inline-block;
width: 284px;
height: 56px;
background: #1B1B1B;
line-height: 56px;
margin-right: 20px;
}
&:hover{
color: red;
}
text-align: center;
margin-top: 60px;
}
}
</style> </style>

@ -86,7 +86,7 @@
<div slot="nextArrow" slot-scope="props" class="custom-slick-arrow" style="right: 10px"> <div slot="nextArrow" slot-scope="props" class="custom-slick-arrow" style="right: 10px">
<a-icon type="right-circle" /> <a-icon type="right-circle" />
</div> </div>
<div class="box" v-for="(item, index) in clothList2" :key="index"> <div class="box" v-for="(item, index) in clothList2" :key="index" @click="tjspxq1(item.id,item.title)">
<img :src="item.imgUrl" alt="" /> <img :src="item.imgUrl" alt="" />
<p class="box1">{{item.title}}</p> <p class="box1">{{item.title}}</p>
<p class="box2">{{item.time}}</p> <p class="box2">{{item.time}}</p>
@ -121,6 +121,7 @@
class="item d-flex" class="item d-flex"
v-for="(item, index) in nanzhuang" v-for="(item, index) in nanzhuang"
:key="index" :key="index"
@click="tjspxq(item.id,item.title2)"
> >
<img :src="item.imgUrl" alt="" /> <img :src="item.imgUrl" alt="" />
<p class="title_6"> <p class="title_6">
@ -138,7 +139,7 @@
</div> </div>
</div> </div>
<div class="more d-flex"> <div class="more d-flex">
<router-link to="/shopping/clothType">更多男装</router-link> <router-link to="/shopping/clothType">更多类型</router-link>
<img src="./assets/youjiantou.png" alt="" /> <img src="./assets/youjiantou.png" alt="" />
</div> </div>
</el-tab-pane> </el-tab-pane>
@ -148,6 +149,7 @@
class="item d-flex" class="item d-flex"
v-for="(item, index) in nvzhuang" v-for="(item, index) in nvzhuang"
:key="index" :key="index"
@click="tjspxq(item.id,item.title2)"
> >
<img :src="item.imgUrl" alt="" /> <img :src="item.imgUrl" alt="" />
<p> <p>
@ -165,7 +167,7 @@
</div> </div>
</div> </div>
<div class="more d-flex"> <div class="more d-flex">
<router-link to="/shopping/clothType">更多女装</router-link> <router-link to="/shopping/clothType">更多类型</router-link>
<img src="./assets/youjiantou.png" alt="" /> <img src="./assets/youjiantou.png" alt="" />
</div> </div>
</el-tab-pane> </el-tab-pane>
@ -175,6 +177,7 @@
class="item d-flex" class="item d-flex"
v-for="(item, index) in tongzhuang" v-for="(item, index) in tongzhuang"
:key="index" :key="index"
@click="tjspxq(item.id,item.title2)"
> >
<img :src="item.imgUrl" alt="" /> <img :src="item.imgUrl" alt="" />
<p> <p>
@ -192,7 +195,7 @@
</div> </div>
</div> </div>
<div class="more d-flex"> <div class="more d-flex">
<router-link to="/shopping/clothType">更多童装</router-link> <router-link to="/shopping/clothType">更多类型</router-link>
<img src="./assets/youjiantou.png" alt="" /> <img src="./assets/youjiantou.png" alt="" />
</div> </div>
</el-tab-pane> </el-tab-pane>
@ -217,6 +220,7 @@
zxdz: "/zygoods/zyGoods/zxdz", zxdz: "/zygoods/zyGoods/zxdz",
tjsp: "/zygoods/zyGoods/tjsp", tjsp: "/zygoods/zyGoods/tjsp",
fzlx: "/zygoods/zyGoods/fzlx", fzlx: "/zygoods/zyGoods/fzlx",
tjspxq: "/zygoods/zyGoods/tjspxq",
}, },
// //
imgList: [ imgList: [
@ -655,10 +659,38 @@
} }
}) })
}, },
methods:{
tjspxq(id,title){
getAction(this.url.tjspxq,{id:id}).then((res) => {
if (res.success) {
console.log(res.result)
this.$router.push({
path: "/shopping/ClothDetail",
query: { id: id, title: title ,name:res.result.name,parentName:res.result.parentName},
});
}else{
this.$message.error(res.message);
}
})
},
tjspxq1(id,title){
getAction(this.url.tjspxq,{id:id}).then((res) => {
if (res.success) {
console.log(res.result)
this.$router.push({
path: "/shopping/ClothDetail1",
query: { id: id, title: title ,name:res.result.name,parentName:res.result.parentName},
});
}else{
this.$message.error(res.message);
}
})
},
},
} }
</script> </script>
<style scoped> <style scoped>
@import './assets/common.css' @import './assets/common.css';
</style> </style>
<style scoped> <style scoped>
.box { .box {

@ -163,6 +163,12 @@ public class ShiroConfig {
filterChainDefinitionMap.put("/zygoods/zyGoods/cd","anon"); filterChainDefinitionMap.put("/zygoods/zyGoods/cd","anon");
filterChainDefinitionMap.put("/zygoods/zyGoods/lxlist","anon"); filterChainDefinitionMap.put("/zygoods/zyGoods/lxlist","anon");
filterChainDefinitionMap.put("/zygoods/zyGoods/lxlistxq","anon"); filterChainDefinitionMap.put("/zygoods/zyGoods/lxlistxq","anon");
//filterChainDefinitionMap.put("/zyorders/zyOrders/xd","anon");
//filterChainDefinitionMap.put("/zyorders/zyOrders/dzlist","anon");
//filterChainDefinitionMap.put("/zyorders/zyOrders/orderXD","anon");
//filterChainDefinitionMap.put("/zyorders/zyOrders/TJorder","anon");
//filterChainDefinitionMap.put("/zyorders/zyOrders/zf","anon");
//filterChainDefinitionMap.put("/zygoods/zyGoods/cylxlist","anon");
//filterChainDefinitionMap.put("/actTask/**", "anon"); //filterChainDefinitionMap.put("/actTask/**", "anon");
//filterChainDefinitionMap.put("/actProcessIns/**", "anon"); //filterChainDefinitionMap.put("/actProcessIns/**", "anon");

@ -750,6 +750,34 @@ public class ZyGoodsController extends JeecgController<ZyGoods, IZyGoodsService>
} }
return Result.OK(listsp); return Result.OK(listsp);
} }
/**
* 商城接口成衣推荐查询
*
* @param zyGoods
* @param req
* @return
*/
@AutoLog(value = "成衣推荐查询")
@ApiOperation(value="成衣推荐查询", notes="成衣推荐查询")
@GetMapping(value = "/cylxlist")
public Result<?> cylxlist(ZyGoods zyGoods,HttpServletRequest req,@RequestParam(name="typeid",required=true) String typeid) {
QueryWrapper<ZyGoods> queryWrapper = QueryGenerator.initQueryWrapper(zyGoods, req.getParameterMap());
queryWrapper.eq("cloths_type_id",typeid);
queryWrapper.eq("recommend",1);
List<ZyGoods> pageList = zyGoodsService.list(queryWrapper);
List<FzlxSp> listsp = new ArrayList<>();
for (int i = 0 ; i < pageList.size() ; i++){
FzlxSp fzlxSp = new FzlxSp();
fzlxSp.setId(pageList.get(i).getId());
fzlxSp.setImgUrl("http://localhost:10085/jeecg-boot/sys/common/static/"+pageList.get(i).getDefaultPicture());
fzlxSp.setCurrentPrice(pageList.get(i).getPromotionPrice());
fzlxSp.setHistoricalPrice(pageList.get(i).getUnitPrice());
fzlxSp.setTitle(pageList.get(i).getGoodsName());
fzlxSp.setHeat(pageList.get(i).getClick());
listsp.add(fzlxSp);
}
return Result.OK(listsp);
}
/** /**
* 商城接口服装详情 * 商城接口服装详情
* @param req * @param req
@ -761,6 +789,8 @@ public class ZyGoodsController extends JeecgController<ZyGoods, IZyGoodsService>
public Result<?> lxlistxq(HttpServletRequest req,@RequestParam(name="id",required=true) String id) { public Result<?> lxlistxq(HttpServletRequest req,@RequestParam(name="id",required=true) String id) {
Map<String,Object> mapgoods = new HashMap<>(); Map<String,Object> mapgoods = new HashMap<>();
ZyGoods zyGoods = zyGoodsService.getById(id); ZyGoods zyGoods = zyGoodsService.getById(id);
zyGoods.setClick((Integer.parseInt(zyGoods.getClick())+1)+"");
zyGoodsService.updateById(zyGoods);
mapgoods.put("zyGoods",zyGoods); mapgoods.put("zyGoods",zyGoods);
String[] baseUrl = zyGoods.getGoodsPicture().split(","); String[] baseUrl = zyGoods.getGoodsPicture().split(",");
String str = ""; String str = "";
@ -794,4 +824,22 @@ public class ZyGoodsController extends JeecgController<ZyGoods, IZyGoodsService>
return Result.OK(mapgoods); return Result.OK(mapgoods);
} }
/**
* 首页推荐商品详情查询
*
* @param req
* @return
*/
@AutoLog(value = "推荐商品详情查询")
@ApiOperation(value="推荐商品详情查询", notes="推荐商品详情查询")
@GetMapping(value = "/tjspxq")
public Result<?> tjspxq(HttpServletRequest req,@RequestParam(name="id",required=true) String id) {
ZyGoods zyGoods = zyGoodsService.getById(id);
ZyClothsType zyclothsType = zyClothsTypeService.getById(zyGoods.getClothsTypeId());
Map<String,Object> map = new HashMap<>();
map.put("name",zyclothsType.getTypeName());
map.put("parentName",zyclothsType.getTypeIdName());
return Result.OK(map);
}
} }

@ -1,22 +1,30 @@
package org.jeecg.modules.demo.zyorders.controller; package org.jeecg.modules.demo.zyorders.controller;
import java.util.Arrays; import java.text.SimpleDateFormat;
import java.util.Date; import java.util.*;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import java.io.IOException; import java.io.IOException;
import java.io.UnsupportedEncodingException; import java.io.UnsupportedEncodingException;
import java.net.URLDecoder; import java.net.URLDecoder;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import org.apache.shiro.SecurityUtils;
import org.jeecg.common.api.vo.Result; import org.jeecg.common.api.vo.Result;
import org.jeecg.common.system.query.QueryGenerator; import org.jeecg.common.system.query.QueryGenerator;
import org.jeecg.common.system.vo.LoginUser;
import org.jeecg.common.util.oConvertUtils; import org.jeecg.common.util.oConvertUtils;
import org.jeecg.modules.demo.accessories.service.IZyAccessoriesService;
import org.jeecg.modules.demo.base.service.IZyClothsTypeService;
import org.jeecg.modules.demo.customerinvoice.entity.CustomerInvoice; import org.jeecg.modules.demo.customerinvoice.entity.CustomerInvoice;
import org.jeecg.modules.demo.customerinvoice.service.ICustomerInvoiceService; import org.jeecg.modules.demo.customerinvoice.service.ICustomerInvoiceService;
import org.jeecg.modules.demo.customermeasure.entity.CustomerMeasure;
import org.jeecg.modules.demo.customermeasure.service.ICustomerMeasureService;
import org.jeecg.modules.demo.customerpayment.entity.CustomerPayment;
import org.jeecg.modules.demo.customerpayment.service.ICustomerPaymentService;
import org.jeecg.modules.demo.customerreceivingaddress.entity.CustomerReceivingAddress; import org.jeecg.modules.demo.customerreceivingaddress.entity.CustomerReceivingAddress;
import org.jeecg.modules.demo.customerreceivingaddress.service.ICustomerReceivingAddressService; import org.jeecg.modules.demo.customerreceivingaddress.service.ICustomerReceivingAddressService;
import org.jeecg.modules.demo.fabric.service.IZyFabricService;
import org.jeecg.modules.demo.goodsaccessories.entity.GoodsAccessories; import org.jeecg.modules.demo.goodsaccessories.entity.GoodsAccessories;
import org.jeecg.modules.demo.goodsaccessories.service.IGoodsAccessoriesService; import org.jeecg.modules.demo.goodsaccessories.service.IGoodsAccessoriesService;
import org.jeecg.modules.demo.goodsfabric.entity.GoodsFabric; import org.jeecg.modules.demo.goodsfabric.entity.GoodsFabric;
@ -34,6 +42,9 @@ import org.jeecg.modules.demo.ordergoodsmodule.entity.OrderGoodsModule;
import org.jeecg.modules.demo.ordergoodsmodule.service.IOrderGoodsModuleService; import org.jeecg.modules.demo.ordergoodsmodule.service.IOrderGoodsModuleService;
import org.jeecg.modules.demo.zyaccessories.entity.ZyStyleAccessories; import org.jeecg.modules.demo.zyaccessories.entity.ZyStyleAccessories;
import org.jeecg.modules.demo.zyaccessories.service.IZyStyleAccessoriesService; import org.jeecg.modules.demo.zyaccessories.service.IZyStyleAccessoriesService;
import org.jeecg.modules.demo.zygoods.entity.Dz;
import org.jeecg.modules.demo.zygoods.entity.FzlxSp;
import org.jeecg.modules.demo.zygoods.entity.Tcsp;
import org.jeecg.modules.demo.zygoods.entity.ZyGoods; import org.jeecg.modules.demo.zygoods.entity.ZyGoods;
import org.jeecg.modules.demo.zygoods.service.IZyGoodsService; import org.jeecg.modules.demo.zygoods.service.IZyGoodsService;
import org.jeecg.modules.demo.zyorders.entity.ZyOrders; import org.jeecg.modules.demo.zyorders.entity.ZyOrders;
@ -45,6 +56,11 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.jeecg.modules.system.entity.SysDepart;
import org.jeecg.modules.system.entity.SysUser;
import org.jeecg.modules.system.service.ISysDepartService;
import org.jeecg.modules.system.service.ISysUserService;
import org.jeecg.modules.zyclothsstyle.service.IZyClothsStyleService;
import org.jeecg.modules.zystylefabric.entity.ZyStyleFabric; import org.jeecg.modules.zystylefabric.entity.ZyStyleFabric;
import org.jeecg.modules.zystylefabric.service.IZyStyleFabricService; import org.jeecg.modules.zystylefabric.service.IZyStyleFabricService;
import org.jeecg.modules.zystylemodule.entity.ZyStyleModule; import org.jeecg.modules.zystylemodule.entity.ZyStyleModule;
@ -85,6 +101,8 @@ public class ZyOrdersController extends JeecgController<ZyOrders, IZyOrdersServi
@Autowired @Autowired
private ICustomerInvoiceService iCustomerInvoiceService; private ICustomerInvoiceService iCustomerInvoiceService;
@Autowired @Autowired
private ICustomerPaymentService iCustomerPaymentService;
@Autowired
private IZyGoodsService zyGoodsService; private IZyGoodsService zyGoodsService;
@Autowired @Autowired
private IOrderGoodsModuleService orderGoodsModuleService; private IOrderGoodsModuleService orderGoodsModuleService;
@ -98,6 +116,19 @@ public class ZyOrdersController extends JeecgController<ZyOrders, IZyOrdersServi
private IGoodsFabricService goodsFabricService; private IGoodsFabricService goodsFabricService;
@Autowired @Autowired
private IGoodsAccessoriesService goodsAccessoriesService; private IGoodsAccessoriesService goodsAccessoriesService;
@Autowired
private IZyClothsStyleService zyClothsStyleService;
@Autowired
private IZyFabricService zyFabricService;
@Autowired
private IZyAccessoriesService zyAccessoriesService;
@Autowired
private ISysDepartService sysDepartService;
@Autowired
private ISysUserService sysUserService;
@Autowired
private ICustomerMeasureService iCustomerMeasureService;
/** /**
* 订单和订单商品接口 * 订单和订单商品接口
@ -430,4 +461,303 @@ public class ZyOrdersController extends JeecgController<ZyOrders, IZyOrdersServi
return super.importExcel(request, response, ZyOrders.class); return super.importExcel(request, response, ZyOrders.class);
} }
/**
* 商城接口下单
*
* @param req
* @return
*/
@AutoLog(value = "下单")
@ApiOperation(value="下单", notes="下单")
@GetMapping(value = "/xd")
public Result<?> xd(@RequestParam(name="goodsid",required=true) String goodsid,HttpServletRequest req) {
//这里方便获取当前登陆信息
LoginUser loginUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
//这里获取当前登陆的id
String userid = loginUser.getId();
//这里获取当前登陆的真实姓名
String rlname = loginUser.getRealname();
ZyGoods zyGoods = zyGoodsService.getById(goodsid);
Map<String,Object> map = new HashMap<>();
Date d = new Date();
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
map.put("dqsj",sdf.format(d));
map.put("orderNum",getOrdersNum());
//默认地址
CustomerReceivingAddress customerReceivingAddress = new CustomerReceivingAddress();
QueryWrapper<CustomerReceivingAddress> queryWrappercra = QueryGenerator.initQueryWrapper(customerReceivingAddress, req.getParameterMap());
queryWrappercra.eq("user_id",userid);
queryWrappercra.orderByAsc("sort");
List<CustomerReceivingAddress> listcra = iCustomerReceivingAddressService.list(queryWrappercra);
Dz dz = new Dz();
dz.setId(listcra.get(0).getId());
dz.setAddr1(listcra.get(0).getCityId());
dz.setAddr2(listcra.get(0).getAddress());
dz.setPostCode(listcra.get(0).getZipCode());
dz.setFlag(false);
map.put("address",dz);
map.put("gmr",rlname);
map.put("spmc",zyGoods.getGoodsName());
map.put("spjg",zyGoods.getUnitPrice());
map.put("spks",zyClothsStyleService.getById(zyGoods.getStyleId()).getStyleNames());
//主辅料
GoodsFabric goodsFabric = new GoodsFabric();
QueryWrapper<GoodsFabric> queryWrappergf = QueryGenerator.initQueryWrapper(goodsFabric, req.getParameterMap());
queryWrappergf.eq("goods_id",goodsid);
List<GoodsFabric> listgf = goodsFabricService.list(queryWrappergf);
String zlstr = "";
for(int i = 0 ; i < listgf.size() ; i++){
zlstr = zlstr + zyFabricService.getById(listgf.get(i).getFabricId()).getName()+",";
}
GoodsAccessories goodsAccessories = new GoodsAccessories();
QueryWrapper<GoodsAccessories> queryWrapperga = QueryGenerator.initQueryWrapper(goodsAccessories, req.getParameterMap());
queryWrapperga.eq("goods_id",goodsid);
List<GoodsAccessories> listga = goodsAccessoriesService.list(queryWrapperga);
String flstr = "";
for(int k = 0 ; k < listga.size() ; k++){
flstr = flstr + zyAccessoriesService.getById(listga.get(k).getAccessoriesId()).getContents()+",";
}
map.put("zfl",zlstr+flstr.substring(0,flstr.length()-1));
map.put("sptp","http://localhost:10085/jeecg-boot/sys/common/static/"+zyGoods.getDefaultPicture());
return Result.OK(map);
}
/**
* 获取地址列表
*
* @param req
* @return
*/
@AutoLog(value = "地址列表")
@ApiOperation(value="地址列表", notes="地址列表")
@GetMapping(value = "/dzlist")
public Result<?> dzlist(HttpServletRequest req) {
//这里方便获取当前登陆信息
LoginUser loginUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
//这里获取当前登陆的id
String userid = loginUser.getId();
CustomerReceivingAddress customerReceivingAddress = new CustomerReceivingAddress();
QueryWrapper<CustomerReceivingAddress> queryWrappercra = QueryGenerator.initQueryWrapper(customerReceivingAddress, req.getParameterMap());
queryWrappercra.eq("user_id",userid);
List<CustomerReceivingAddress> listcra = iCustomerReceivingAddressService.list(queryWrappercra);
List<Dz> listdz = new ArrayList<>();
for (int i = 0 ; i < listcra.size(); i++){
Dz dz = new Dz();
dz.setId(listcra.get(i).getId());
dz.setAddr1(listcra.get(i).getCityId());
dz.setAddr2(listcra.get(i).getAddress());
dz.setPostCode(listcra.get(i).getZipCode());
dz.setFlag(false);
listdz.add(dz);
}
return Result.OK(listdz);
}
/**
* 订单下单数据交互
*
* @param
* @return
*/
@AutoLog(value = "订单下单数据交互")
@ApiOperation(value="订单下单数据交互", notes="订单下单数据交互")
@GetMapping(value = "/orderXD")
public String orderXD(ZyOrdersJk zyOrdersJk,List<OrderGoodsJk> orderGoodsJkList,HttpServletRequest req,String OrdersNum) {
Double actual_payment = 0.00;
Double money = 0.00;
for(int i = 0 ; i < orderGoodsJkList.size() ; i++){
ZyGoods zyGoods = zyGoodsService.getById(orderGoodsJkList.get(i).getGoodsId());
money = money + zyGoods.getUnitPrice()*orderGoodsJkList.get(i).getGoodsNum();
actual_payment = actual_payment + zyGoods.getPromotionPrice()*orderGoodsJkList.get(i).getGoodsNum();
}
ZyOrders zyOrders = new ZyOrders();
zyOrders.setIschild(0);
zyOrders.setOrderTime(new Date());
zyOrders.setOrdersNum(OrdersNum);
zyOrders.setMoney(money);
zyOrders.setFreight(zyOrdersJk.getFreight());
zyOrders.setPromotionPrice(money-actual_payment);
zyOrders.setActualPayment(actual_payment);
//交货期先为空
//zyOrders.setDeliveryTime(zyOrdersJk.getDeliveryTime());
zyOrders.setOrdersType(zyOrdersJk.getOrdersType());
zyOrders.setUserId(zyOrdersJk.getUserId());
CustomerPayment customerPayment = new CustomerPayment();
QueryWrapper<CustomerPayment> queryWrappercp = QueryGenerator.initQueryWrapper(customerPayment, req.getParameterMap());
queryWrappercp.eq("user_id",zyOrdersJk.getUserId());
queryWrappercp.orderByAsc("sort");
List<CustomerPayment>listcp = iCustomerPaymentService.list(queryWrappercp);
zyOrders.setPaymentMethod(Integer.parseInt(listcp.get(0).getPaymentType()));
zyOrders.setPaymentStatus(0);
zyOrders.setAccountNo(listcp.get(0).getAccountNo());
zyOrders.setBankDeposit(listcp.get(0).getBankDeposit());
zyOrders.setGoodsQuantity(zyOrdersJk.getGoodsQuantity());
CustomerReceivingAddress customerReceivingAddress = iCustomerReceivingAddressService.getById(zyOrdersJk.getAddressId());
zyOrders.setCityId(customerReceivingAddress.getCityId());
zyOrders.setAddress(customerReceivingAddress.getAddress());
zyOrders.setZipCode(customerReceivingAddress.getZipCode());
zyOrders.setReceiver(zyOrdersJk.getReceiver());
zyOrders.setMobile(customerReceivingAddress.getMobile());
CustomerInvoice customerInvoice = iCustomerInvoiceService.getById(zyOrdersJk.getInvoiceId());
zyOrders.setInvoiceCustomerType(Integer.parseInt(customerInvoice.getCustomerType()));
zyOrders.setInvoiceType(Integer.parseInt(customerInvoice.getInvoiceType()));
zyOrders.setTaxIdentificationNumber(customerInvoice.getTaxIdentificationNumber());
zyOrders.setAddressBilling(customerInvoice.getAddress());
zyOrders.setTelephone(customerInvoice.getTelephone());
zyOrders.setBankPublic(customerInvoice.getBankDeposit());
zyOrders.setAccountNumber(customerInvoice.getAccountNumber());
zyOrders.setSalesEnterpriseId(zyOrdersJk.getSalesEnterpriseId());
zyOrders.setSalespersonId(zyOrdersJk.getSalespersonId());
//物流企业先空着
//zyOrders.setLogisticsEnterprisesId(zyOrdersJk.getLogisticsEnterprisesId());
zyOrders.setDeliveryStatus(0);
zyOrdersService.save(zyOrders);
for(int j = 0 ; j < orderGoodsJkList.size() ; j++){
ZyGoods zyGoods = zyGoodsService.getById(orderGoodsJkList.get(j).getGoodsId());
OrderGoods orderGoods = new OrderGoods();
orderGoods.setOrdersId(zyOrders.getId());
orderGoods.setGoodsId(orderGoodsJkList.get(j).getGoodsId());
orderGoods.setGoodsNum(orderGoodsJkList.get(j).getGoodsNum());
orderGoods.setGoodsCode(zyGoods.getGoodsCode());
orderGoods.setGoodsName(zyGoods.getGoodsName());
orderGoods.setGoodsIntr(zyGoods.getGoodsIntr());
orderGoods.setCustomized(zyGoods.getCustomized());
orderGoods.setMeasureId(orderGoodsJkList.get(j).getMeasureId());
orderGoods.setGoodsPicture(zyGoods.getGoodsPicture());
orderGoods.setDefaultPicture(zyGoods.getDefaultPicture());
orderGoods.setGoodsVideo(zyGoods.getGoodsVideo());
orderGoods.setClothsTypeId(zyGoods.getClothsTypeId());
orderGoods.setStyleId(zyGoods.getStyleId());
orderGoods.setModelId(zyGoods.getModelId());
orderGoods.setUnit(zyGoods.getUnit());
orderGoods.setNumber(zyGoods.getNumber());
orderGoods.setUnitPrice(zyGoods.getUnitPrice());
orderGoods.setDiscount(zyGoods.getDiscount());
orderGoods.setPromotionPrice(zyGoods.getPromotionPrice());
orderGoods.setRecommend(zyGoods.getRecommend());
orderGoods.setPlaceOrigin(zyGoods.getPlaceOrigin());
orderGoods.setStatus(zyGoods.getStatus());
orderGoods.setTotalPrice(zyGoods.getUnitPrice()*orderGoodsJkList.get(j).getGoodsNum());
orderGoods.setPayTotalPrice(zyGoods.getPromotionPrice()*orderGoodsJkList.get(j).getGoodsNum());
orderGoodsService.save(orderGoods);
GoodsModule goodsModule = new GoodsModule();
QueryWrapper<GoodsModule> queryWrapperzsm = QueryGenerator.initQueryWrapper(goodsModule, req.getParameterMap());
queryWrapperzsm.eq("goods_id",zyGoods.getId());
queryWrapperzsm.eq("style_id",zyGoods.getStyleId());
List<GoodsModule> listzsm = goodsModuleService.list(queryWrapperzsm);
for (int k = 0 ; k < listzsm.size() ; k++){
OrderGoodsModule orderGoodsModule = new OrderGoodsModule();
orderGoodsModule.setOrderGoodsId(orderGoods.getId());
orderGoodsModule.setGoodsId(zyGoods.getId());
orderGoodsModule.setStyleId(zyGoods.getStyleId());
orderGoodsModule.setStyleModuleId(listzsm.get(k).getStyleModuleId());
orderGoodsModule.setModuleId(listzsm.get(k).getModuleId());
orderGoodsModuleService.save(orderGoodsModule);
}
GoodsFabric goodsFabric = new GoodsFabric();
QueryWrapper<GoodsFabric> queryWrapperzsf = QueryGenerator.initQueryWrapper(goodsFabric, req.getParameterMap());
queryWrapperzsf.eq("goods_id",zyGoods.getId());
List<GoodsFabric> listzsf = goodsFabricService.list(queryWrapperzsf);
for (int o = 0 ; o < listzsf.size() ; o++){
OrderGoodsFabric orderGoodsFabric = new OrderGoodsFabric();
orderGoodsFabric.setOrderGoodsId(orderGoods.getId());
orderGoodsFabric.setGoodsId(zyGoods.getId());
orderGoodsFabric.setFabricId(listzsf.get(o).getFabricId());
orderGoodsFabricService.save(orderGoodsFabric);
}
GoodsAccessories goodsAccessories = new GoodsAccessories();
QueryWrapper<GoodsAccessories> queryWrapperzsa = QueryGenerator.initQueryWrapper(goodsAccessories, req.getParameterMap());
queryWrapperzsa.eq("goods_id",zyGoods.getId());
List<GoodsAccessories> listzsa = goodsAccessoriesService.list(queryWrapperzsa);
for (int p = 0 ; p < listzsa.size() ; p++){
OrderGoodsAccessories orderGoodsAccessories = new OrderGoodsAccessories();
orderGoodsAccessories.setOrderGoodsId(orderGoods.getId());
orderGoodsAccessories.setGoodsId(zyGoods.getId());
orderGoodsAccessories.setAccessoriesId(listzsa.get(p).getAccessoriesId());
orderGoodsAccessoriesService.save(orderGoodsAccessories);
}
}
return zyOrders.getId();
}
/**
* 提交商品订单
*
* @param
* @return
*/
@AutoLog(value = "提交商品订单")
@ApiOperation(value="提交商品订单", notes="提交商品订单")
@GetMapping(value = "/TJorder")
public Result<?> TJorder(@RequestParam(name="OrdersNum",required=true) String OrdersNum,HttpServletRequest req,@RequestParam(name="goodsid",required=true) String goodsid,@RequestParam(name="goodsNum",required=true) String goodsNum) {
//这里方便获取当前登陆信息
LoginUser loginUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
//这里获取当前登陆的id
String userid = loginUser.getId();
ZyOrdersJk zyOrdersJk = new ZyOrdersJk();
zyOrdersJk.setFreight(0.0);
zyOrdersJk.setOrdersType(0);
zyOrdersJk.setUserId(userid);
zyOrdersJk.setGoodsQuantity(1);
CustomerReceivingAddress customerReceivingAddress = new CustomerReceivingAddress();
QueryWrapper<CustomerReceivingAddress> queryWrappercra = QueryGenerator.initQueryWrapper(customerReceivingAddress, req.getParameterMap());
queryWrappercra.eq("user_id",userid);
queryWrappercra.orderByAsc("sort");
List<CustomerReceivingAddress> listcra = iCustomerReceivingAddressService.list(queryWrappercra);
zyOrdersJk.setAddressId(listcra.get(0).getId());
zyOrdersJk.setReceiver(userid);
CustomerInvoice customerInvoice = new CustomerInvoice();
QueryWrapper<CustomerInvoice> queryWrapperci = QueryGenerator.initQueryWrapper(customerInvoice, req.getParameterMap());
queryWrapperci.eq("user_id",userid);
queryWrapperci.orderByAsc("sort");
List<CustomerInvoice> listci = iCustomerInvoiceService.list(queryWrapperci);
zyOrdersJk.setInvoiceId(listci.get(0).getId());
SysDepart sysDepart = new SysDepart();
QueryWrapper<SysDepart> queryWrappersd = QueryGenerator.initQueryWrapper(sysDepart, req.getParameterMap());
queryWrappersd.eq("org_category","4");
queryWrappersd.orderByAsc("depart_order");
List<SysDepart> listsd = sysDepartService.list(queryWrappersd);
zyOrdersJk.setSalesEnterpriseId(listsd.get(0).getId());
SysUser sysUser = new SysUser();
QueryWrapper<SysUser> queryWrappersu = QueryGenerator.initQueryWrapper(sysUser, req.getParameterMap());
queryWrappersu.eq("org_code",listsd.get(0).getOrgCode());
List<SysUser> listsu = sysUserService.list(queryWrappersu);
zyOrdersJk.setSalespersonId(listsu.get(0).getId());
zyOrdersJk.setDeliveryStatus(0);
List<OrderGoodsJk> orderGoodsJkList = new ArrayList<>();
OrderGoodsJk orderGoodsJk = new OrderGoodsJk();
orderGoodsJk.setGoodsId(goodsid);
orderGoodsJk.setGoodsNum(Integer.parseInt(goodsNum));
CustomerMeasure customerMeasure = new CustomerMeasure();
QueryWrapper<CustomerMeasure> queryWrappercm = QueryGenerator.initQueryWrapper(customerMeasure, req.getParameterMap());
queryWrappercm.eq("user_id",userid);
queryWrappercm.orderByAsc("sort");
List<CustomerMeasure> listcm = iCustomerMeasureService.list(queryWrappercm);
orderGoodsJk.setMeasureId(listcm.get(0).getId());
orderGoodsJkList.add(orderGoodsJk);
String orderid = orderXD(zyOrdersJk,orderGoodsJkList,req,OrdersNum);
return Result.OK(orderid);
}
/**
* 支付
*
* @param req
* @return
*/
@AutoLog(value = "支付")
@ApiOperation(value="支付", notes="支付")
@GetMapping(value = "/zf")
public Result<?> zf(@RequestParam(name="ordersid",required=true) String ordersid,@RequestParam(name="goodsid",required=true) String goodsid,HttpServletRequest req) {
ZyOrders zyOrders = zyOrdersService.getById(ordersid);
zyOrders.setPaymentStatus(1);
zyOrders.setPaymentTime(new Date());
zyOrders.setDeliveryStatus(1);
zyOrdersService.updateById(zyOrders);
ZyGoods zyGoods = zyGoodsService.getById(goodsid);
zyGoods.setNum(zyGoods.getNum()+1);
zyGoodsService.updateById(zyGoods);
return Result.OK("支付成功");
}
} }

@ -0,0 +1,51 @@
package org.jeecg.modules.demo.zygoods.entity;
import java.io.Serializable;
import java.io.UnsupportedEncodingException;
import java.util.Date;
import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.jeecg.common.aspect.annotation.Dict;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
/**
* @Description: 商品表
* @Author: jeecg-boot
* @Date: 2022-12-07
* @Version: V1.0
*/
@Data
public class Dz implements Serializable {
private static final long serialVersionUID = 1L;
/**主键*/
@TableId(type = IdType.ASSIGN_ID)
@ApiModelProperty(value = "主键")
private java.lang.String id;
/**省市区*/
@Excel(name = "省市区", width = 15)
@ApiModelProperty(value = "省市区")
private java.lang.String addr1;
/**地址*/
@Excel(name = "地址", width = 15)
@ApiModelProperty(value = "地址")
private java.lang.String addr2;
/**邮编*/
@Excel(name = "邮编", width = 15)
@ApiModelProperty(value = "邮编")
private java.lang.String postCode;
/**默认地址*/
@Excel(name = "默认地址", width = 15)
@ApiModelProperty(value = "默认地址")
private java.lang.Boolean flag;
}
Loading…
Cancel
Save