Browse Source

提交代码

master
HY 1 year ago
parent
commit
3869708ff2
95 changed files with 5878 additions and 36 deletions
  1. +221
    -0
      admin-hanhai-vue/src/views/system/HotelCouponList.vue
  2. +32
    -2
      admin-hanhai-vue/src/views/system/HotelShopList.vue
  3. +254
    -0
      admin-hanhai-vue/src/views/system/RefundOrderList.vue
  4. +254
    -0
      admin-hanhai-vue/src/views/system/ReplaceOrderList.vue
  5. +285
    -0
      admin-hanhai-vue/src/views/system/WashOrderList.vue
  6. +149
    -0
      admin-hanhai-vue/src/views/system/modules/HotelCouponForm.vue
  7. +84
    -0
      admin-hanhai-vue/src/views/system/modules/HotelCouponModal.Style#Drawer.vue
  8. +60
    -0
      admin-hanhai-vue/src/views/system/modules/HotelCouponModal.vue
  9. +99
    -0
      admin-hanhai-vue/src/views/system/modules/WashOrderForm.vue
  10. +84
    -0
      admin-hanhai-vue/src/views/system/modules/WashOrderModal.Style#Drawer.vue
  11. +66
    -0
      admin-hanhai-vue/src/views/system/modules/WashOrderModal.vue
  12. BIN
      jeecg-boot-base/jeecg-boot-base-api/jeecg-system-cloud-api/target/jeecg-system-cloud-api-3.2.0.jar
  13. +2
    -0
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/config/shiro/ShiroConfig.java
  14. +9
    -0
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hanHaiMember/mapper/HanHaiMemberMapper.java
  15. +8
    -4
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hanHaiMember/mapper/xml/HanHaiMemberMapper.xml
  16. +8
    -0
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hanHaiMember/service/IHanHaiMemberService.java
  17. +5
    -0
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hanHaiMember/service/impl/HanHaiMemberServiceImpl.java
  18. +171
    -0
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hotelcoupon/controller/HotelCouponController.java
  19. +87
    -0
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hotelcoupon/entity/HotelCoupon.java
  20. +17
    -0
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hotelcoupon/mapper/HotelCouponMapper.java
  21. +5
    -0
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hotelcoupon/mapper/xml/HotelCouponMapper.xml
  22. +14
    -0
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hotelcoupon/service/IHotelCouponService.java
  23. +19
    -0
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hotelcoupon/service/impl/HotelCouponServiceImpl.java
  24. +216
    -0
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hotelcoupon/vue/HotelCouponList.vue
  25. +144
    -0
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hotelcoupon/vue/modules/HotelCouponForm.vue
  26. +84
    -0
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hotelcoupon/vue/modules/HotelCouponModal.Style#Drawer.vue
  27. +60
    -0
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hotelcoupon/vue/modules/HotelCouponModal.vue
  28. +61
    -0
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hotelcoupon/vue3/HotelCoupon.api.ts
  29. +108
    -0
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hotelcoupon/vue3/HotelCoupon.data.ts
  30. +162
    -0
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hotelcoupon/vue3/HotelCouponList.vue
  31. +58
    -0
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hotelcoupon/vue3/components/HotelCouponModal.vue
  32. +171
    -0
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hotelcouponlog/controller/HotelCouponLogController.java
  33. +97
    -0
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hotelcouponlog/entity/HotelCouponLog.java
  34. +17
    -0
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hotelcouponlog/mapper/HotelCouponLogMapper.java
  35. +5
    -0
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hotelcouponlog/mapper/xml/HotelCouponLogMapper.xml
  36. +14
    -0
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hotelcouponlog/service/IHotelCouponLogService.java
  37. +19
    -0
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hotelcouponlog/service/impl/HotelCouponLogServiceImpl.java
  38. +232
    -0
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hotelcouponlog/vue/HotelCouponLogList.vue
  39. +163
    -0
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hotelcouponlog/vue/modules/HotelCouponLogForm.vue
  40. +84
    -0
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hotelcouponlog/vue/modules/HotelCouponLogModal.Style#Drawer.vue
  41. +60
    -0
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hotelcouponlog/vue/modules/HotelCouponLogModal.vue
  42. +61
    -0
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hotelcouponlog/vue3/HotelCouponLog.api.ts
  43. +135
    -0
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hotelcouponlog/vue3/HotelCouponLog.data.ts
  44. +162
    -0
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hotelcouponlog/vue3/HotelCouponLogList.vue
  45. +58
    -0
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hotelcouponlog/vue3/components/HotelCouponLogModal.vue
  46. +220
    -0
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hotelorder/controller/HotelOrderController.java
  47. +3
    -1
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hotelorder/entity/HotelOrder.java
  48. +14
    -0
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hotelorder/req/DamageAuditReq.java
  49. +54
    -0
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hotelshop/controller/HotelShopController.java
  50. +4
    -0
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hotelshop/entity/HotelShop.java
  51. +13
    -0
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hotelshop/req/AuditShopReq.java
  52. +171
    -0
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hotelshoplog/controller/HotelShopLogController.java
  53. +65
    -0
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hotelshoplog/entity/HotelShopLog.java
  54. +17
    -0
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hotelshoplog/mapper/HotelShopLogMapper.java
  55. +5
    -0
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hotelshoplog/mapper/xml/HotelShopLogMapper.xml
  56. +14
    -0
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hotelshoplog/service/IHotelShopLogService.java
  57. +19
    -0
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hotelshoplog/service/impl/HotelShopLogServiceImpl.java
  58. +190
    -0
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hotelshoplog/vue/HotelShopLogList.vue
  59. +120
    -0
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hotelshoplog/vue/modules/HotelShopLogForm.vue
  60. +84
    -0
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hotelshoplog/vue/modules/HotelShopLogModal.Style#Drawer.vue
  61. +60
    -0
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hotelshoplog/vue/modules/HotelShopLogModal.vue
  62. +61
    -0
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hotelshoplog/vue3/HotelShopLog.api.ts
  63. +56
    -0
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hotelshoplog/vue3/HotelShopLog.data.ts
  64. +162
    -0
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hotelshoplog/vue3/HotelShopLogList.vue
  65. +58
    -0
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hotelshoplog/vue3/components/HotelShopLogModal.vue
  66. BIN
      jeecg-boot-base/jeecg-boot-base-core/target/classes/org/jeecg/config/shiro/ShiroConfig.class
  67. BIN
      jeecg-boot-base/jeecg-boot-base-core/target/classes/org/jeecg/modules/hanHaiMember/mapper/HanHaiMemberMapper.class
  68. +8
    -4
      jeecg-boot-base/jeecg-boot-base-core/target/classes/org/jeecg/modules/hanHaiMember/mapper/xml/HanHaiMemberMapper.xml
  69. BIN
      jeecg-boot-base/jeecg-boot-base-core/target/classes/org/jeecg/modules/hanHaiMember/service/IHanHaiMemberService.class
  70. BIN
      jeecg-boot-base/jeecg-boot-base-core/target/classes/org/jeecg/modules/hanHaiMember/service/impl/HanHaiMemberServiceImpl.class
  71. BIN
      jeecg-boot-base/jeecg-boot-base-core/target/jeecg-boot-base-core-3.2.0.jar
  72. +13
    -0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/xcx/coupon/controller/CouponController.java
  73. +12
    -0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/xcx/coupon/req/CouponPageReq.java
  74. +16
    -0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/xcx/coupon/service/ICouponService.java
  75. +39
    -0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/xcx/coupon/service/impl/CouponServiceImpl.java
  76. +2
    -0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/xcx/goods/req/JoinShoppingCartReq.java
  77. +2
    -2
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/xcx/goods/service/impl/GoodsServiceImpl.java
  78. +14
    -0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/xcx/order/controller/OrderController.java
  79. +16
    -2
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/xcx/order/req/ConfirmAcceptOrderReq.java
  80. +1
    -1
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/xcx/order/req/OrderPageReq.java
  81. +2
    -0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/xcx/order/req/OrderPayReq.java
  82. +12
    -0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/xcx/order/req/ReplaceOrderPayReq.java
  83. +15
    -0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/xcx/order/service/IOrderService.java
  84. +135
    -11
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/xcx/order/service/impl/OrderServiceImpl.java
  85. +7
    -0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/xcx/shop/controller/ShopController.java
  86. +1
    -0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/xcx/shop/req/ApplyShopReq.java
  87. +15
    -0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/xcx/shop/req/EditShopInfoReq.java
  88. +7
    -0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/xcx/shop/service/IShopService.java
  89. +29
    -3
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/xcx/shop/service/impl/ShopServiceImpl.java
  90. +6
    -0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/xcx/user/controller/UserController.java
  91. +6
    -0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/xcx/user/service/IUserService.java
  92. +4
    -0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/xcx/user/service/impl/LoginServiceImpl.java
  93. +13
    -0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/xcx/user/service/impl/UserServiceImpl.java
  94. +4
    -3
      jeecg-boot-module-system/src/main/resources/application-dev.yml
  95. +5
    -3
      jeecg-boot-module-system/src/main/resources/application-pord.yml

+ 221
- 0
admin-hanhai-vue/src/views/system/HotelCouponList.vue View File

@ -0,0 +1,221 @@
<template>
<a-card :bordered="false">
<!-- 查询区域 -->
<div class="table-page-search-wrapper">
<a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24">
</a-row>
</a-form>
</div>
<!-- 查询区域-END -->
<!-- 操作按钮区域 -->
<div class="table-operator">
<a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
<!-- <a-button type="primary" icon="download" @click="handleExportXls('hotel_coupon')">导出</a-button>-->
<!-- <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">-->
<!-- <a-button type="primary" icon="import">导入</a-button>-->
<!-- </a-upload>-->
<!-- 高级查询区域 -->
<j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query>
<a-dropdown v-if="selectedRowKeys.length > 0">
<a-menu slot="overlay">
<a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>
</a-menu>
<a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button>
</a-dropdown>
</div>
<!-- table区域-begin -->
<div>
<div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
<i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>
<a style="margin-left: 24px" @click="onClearSelected">清空</a>
</div>
<a-table
ref="table"
size="middle"
:scroll="{x:true}"
bordered
rowKey="id"
:columns="columns"
:dataSource="dataSource"
:pagination="ipagination"
:loading="loading"
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
class="j-table-force-nowrap"
@change="handleTableChange">
<template slot="htmlSlot" slot-scope="text">
<div v-html="text"></div>
</template>
<template slot="imgSlot" slot-scope="text,record">
<span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span>
<img v-else :src="getImgView(text)" :preview="record.id" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/>
</template>
<template slot="fileSlot" slot-scope="text">
<span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
<a-button
v-else
:ghost="true"
type="primary"
icon="download"
size="small"
@click="downloadFile(text)">
下载
</a-button>
</template>
<span slot="action" slot-scope="text, record">
<a @click="handleEdit(record)">编辑</a>
<a-divider type="vertical" />
<a-dropdown>
<a class="ant-dropdown-link">更多 <a-icon type="down" /></a>
<a-menu slot="overlay">
<a-menu-item>
<a @click="handleDetail(record)">详情</a>
</a-menu-item>
<a-menu-item>
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
<a>删除</a>
</a-popconfirm>
</a-menu-item>
</a-menu>
</a-dropdown>
</span>
</a-table>
</div>
<hotel-coupon-modal ref="modalForm" @ok="modalFormOk"></hotel-coupon-modal>
</a-card>
</template>
<script>
import '@/assets/less/TableExpand.less'
import { mixinDevice } from '@/utils/mixin'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import HotelCouponModal from './modules/HotelCouponModal'
import {filterMultiDictText} from '@/components/dict/JDictSelectUtil'
export default {
name: 'HotelCouponList',
mixins:[JeecgListMixin, mixinDevice],
components: {
HotelCouponModal
},
data () {
return {
description: 'hotel_coupon管理页面',
//
columns: [
{
title: '#',
dataIndex: '',
key:'rowIndex',
width:60,
align:"center",
customRender:function (t,r,index) {
return parseInt(index)+1;
}
},
{
title:'优惠券名',
align:"center",
dataIndex: 'name'
},
{
title:'图片',
align:"center",
dataIndex: 'pic',
scopedSlots: {customRender: 'imgSlot'}
},
{
title:'券额',
align:"center",
dataIndex: 'price'
},
{
title:'满多少金额',
align:"center",
dataIndex: 'conditionPrice'
},
{
title:'说明',
align:"center",
dataIndex: 'info',
scopedSlots: {customRender: 'htmlSlot'}
},
{
title:'优惠券结束时间',
align:"center",
dataIndex: 'endTime'
},
{
title:'类型',
align:"center",
dataIndex: 'type_dictText'
},
{
title:'使用类型',
align:"center",
dataIndex: 'useType_dictText'
},
{
title:'是否删除',
align:"center",
dataIndex: 'delFlag_dictText'
},
{
title: '操作',
dataIndex: 'action',
align:"center",
fixed:"right",
width:147,
scopedSlots: { customRender: 'action' }
}
],
url: {
list: "/hotelcoupon/hotelCoupon/list",
delete: "/hotelcoupon/hotelCoupon/delete",
deleteBatch: "/hotelcoupon/hotelCoupon/deleteBatch",
exportXlsUrl: "/hotelcoupon/hotelCoupon/exportXls",
importExcelUrl: "hotelcoupon/hotelCoupon/importExcel",
},
dictOptions:{},
superFieldList:[],
}
},
created() {
this.getSuperFieldList();
},
computed: {
importExcelUrl: function(){
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
},
},
methods: {
initDictConfig(){
},
getSuperFieldList(){
let fieldList=[];
fieldList.push({type:'string',value:'name',text:'优惠券名',dictCode:''})
fieldList.push({type:'string',value:'pic',text:'图片',dictCode:''})
fieldList.push({type:'BigDecimal',value:'price',text:'券额',dictCode:''})
fieldList.push({type:'BigDecimal',value:'conditionPrice',text:'满多少金额',dictCode:''})
fieldList.push({type:'string',value:'info',text:'说明',dictCode:''})
fieldList.push({type:'datetime',value:'endTime',text:'优惠券结束时间'})
fieldList.push({type:'int',value:'type',text:'类型 0指定时间 1单次',dictCode:'coupon_type'})
fieldList.push({type:'int',value:'delFlag',text:'是否删除',dictCode:'is_delete'})
this.superFieldList = fieldList
}
}
}
</script>
<style scoped>
@import '~@assets/less/common.less';
</style>

+ 32
- 2
admin-hanhai-vue/src/views/system/HotelShopList.vue View File

@ -68,12 +68,23 @@
</template>
<span slot="action" slot-scope="text, record">
<a @click="handleEdit(record)">编辑</a>
<div v-if="record.status === 0">
<a @click="handleAudit(0,record)">通过</a>
<a-divider type="vertical" />
<a @click="handleAudit(1,record)">不通过</a>
<a-divider type="vertical" />
</div>
<a-dropdown>
<a class="ant-dropdown-link">更多 <a-icon type="down" /></a>
<a-menu slot="overlay">
<a-menu-item>
<a @click="handleEdit(record)">编辑</a>
</a-menu-item>
<a-menu-item>
<a @click="handleDetail(record)">详情</a>
</a-menu-item>
@ -99,6 +110,7 @@
import { mixinDevice } from '@/utils/mixin'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import HotelShopModal from './modules/HotelShopModal'
import {httpAction} from "@api/manage";
export default {
name: 'HotelShopList',
@ -207,6 +219,7 @@
deleteBatch: "/hotelshop/hotelShop/deleteBatch",
exportXlsUrl: "/hotelshop/hotelShop/exportXls",
importExcelUrl: "hotelshop/hotelShop/importExcel",
auditUrl: "/hotelshop/hotelShop/audit"
},
dictOptions:{},
@ -227,7 +240,7 @@
getSuperFieldList(){
let fieldList=[];
fieldList.push({type:'string',value:'name',text:'商铺名',dictCode:''})
fieldList.push({type:'string',value:'userId',text:'userId',dictCode:''})
fieldList.push({type:'string',value:'userId',text:'用户编号',dictCode:''})
fieldList.push({type:'string',value:'userName',text:'店主名',dictCode:''})
fieldList.push({type:'string',value:'phone',text:'手机号',dictCode:''})
fieldList.push({type:'string',value:'latitude',text:'latitude',dictCode:''})
@ -235,6 +248,23 @@
fieldList.push({type:'string',value:'address',text:'地址',dictCode:''})
fieldList.push({type:'int',value:'delFlag',text:'delFlag',dictCode:''})
this.superFieldList = fieldList
},
handleAudit(e,obj){
let param = {
id:obj.id,
audit:e
}
console.log(e,obj)
httpAction(this.url.auditUrl,param,'post').then((res)=>{
if(res.success){
this.$message.success(res.message);
this.$emit('ok');
}else{
this.$message.warning(res.message);
}
}).finally(() => {
this.loadData(1)
})
}
}
}


+ 254
- 0
admin-hanhai-vue/src/views/system/RefundOrderList.vue View File

@ -0,0 +1,254 @@
<template>
<a-card :bordered="false">
<!-- 查询区域 -->
<div class="table-page-search-wrapper">
<a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24">
</a-row>
</a-form>
</div>
<!-- 查询区域-END -->
<!-- 操作按钮区域 -->
<div class="table-operator">
<!-- <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>-->
<!-- <a-button type="primary" icon="download" @click="handleExportXls('hotel_order')">导出</a-button>-->
<!-- <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">-->
<!-- <a-button type="primary" icon="import">导入</a-button>-->
<!-- </a-upload>-->
<!-- 高级查询区域 -->
<j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query>
<a-dropdown v-if="selectedRowKeys.length > 0">
<a-menu slot="overlay">
<a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>
</a-menu>
<a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button>
</a-dropdown>
</div>
<!-- table区域-begin -->
<div>
<div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
<i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>
<a style="margin-left: 24px" @click="onClearSelected">清空</a>
</div>
<a-table
ref="table"
size="middle"
:scroll="{x:true}"
bordered
rowKey="id"
:columns="columns"
:dataSource="dataSource"
:pagination="ipagination"
:loading="loading"
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
class="j-table-force-nowrap"
@change="handleTableChange">
<template slot="htmlSlot" slot-scope="text">
<div v-html="text"></div>
</template>
<template slot="imgSlot" slot-scope="text,record">
<span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span>
<img v-else :src="getImgView(text)" :preview="record.id" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/>
</template>
<template slot="fileSlot" slot-scope="text">
<span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
<a-button
v-else
:ghost="true"
type="primary"
icon="download"
size="small"
@click="downloadFile(text)">
下载
</a-button>
</template>
<span slot="action" slot-scope="text, record">
<a @click="handleEdit(record)">编辑</a>
<a-divider type="vertical" />
<a-dropdown>
<a class="ant-dropdown-link">更多 <a-icon type="down" /></a>
<a-menu slot="overlay">
<a-menu-item>
<a @click="handleDetail(record)">详情</a>
</a-menu-item>
<a-menu-item>
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
<a>删除</a>
</a-popconfirm>
</a-menu-item>
</a-menu>
</a-dropdown>
</span>
</a-table>
</div>
<hotel-order-modal ref="modalForm" @ok="modalFormOk"></hotel-order-modal>
</a-card>
</template>
<script>
import '@/assets/less/TableExpand.less'
import { mixinDevice } from '@/utils/mixin'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import HotelOrderModal from './modules/HotelOrderModal'
export default {
name: 'RefundOrderList',
mixins:[JeecgListMixin, mixinDevice],
components: {
HotelOrderModal
},
data () {
return {
description: '退货订单管理页面',
//
columns: [
{
title: '#',
dataIndex: '',
key:'rowIndex',
width:60,
align:"center",
customRender:function (t,r,index) {
return parseInt(index)+1;
}
},
{
title:'标题',
align:"center",
dataIndex: 'title'
},
{
title:'商品图片',
align:"center",
dataIndex: 'pic',
scopedSlots: {customRender: 'imgSlot'}
},
{
title:'客户姓名',
align:"center",
dataIndex: 'userName'
},
{
title:'客户手机号',
align:"center",
dataIndex: 'userPhone'
},
{
title:'用户地址',
align:"center",
dataIndex: 'userAddress'
},
{
title:'用户编号',
align:"center",
dataIndex: 'userId'
},
{
title:'店铺编号',
align:"center",
dataIndex: 'shopId'
},
{
title:'租赁时间',
align:"center",
dataIndex: 'leaseTime'
},
{
title:'缴纳费用',
align:"center",
dataIndex: 'payFee'
},
{
title:'押金',
align:"center",
dataIndex: 'deposit'
},
{
title:'水洗费用',
align:"center",
dataIndex: 'washPay'
},
{
title:'水洗费用',
align:"center",
dataIndex: 'rentPay'
},
{
title:'支付金额',
align:"center",
dataIndex: 'orderPay'
},
{
title:'状态',
align:"center",
dataIndex: 'status_dictText'
},
{
title:'类型',
align:"center",
dataIndex: 'type_dictText'
},
{
title:'是否删除',
align:"center",
dataIndex: 'delFlag_dictText'
},
{
title: '操作',
dataIndex: 'action',
align:"center",
fixed:"right",
width:147,
scopedSlots: { customRender: 'action' }
}
],
url: {
list: "/hotelorder/hotelOrder/refund/list",
delete: "/hotelorder/hotelOrder/delete",
deleteBatch: "/hotelorder/hotelOrder/deleteBatch",
exportXlsUrl: "/hotelorder/hotelOrder/exportXls",
importExcelUrl: "hotelorder/hotelOrder/importExcel",
},
dictOptions:{},
superFieldList:[],
}
},
created() {
this.getSuperFieldList();
},
computed: {
importExcelUrl: function(){
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
},
},
methods: {
initDictConfig(){
},
getSuperFieldList(){
let fieldList=[];
fieldList.push({type:'string',value:'title',text:'标题',dictCode:''})
fieldList.push({type:'string',value:'userName',text:'客户姓名',dictCode:''})
fieldList.push({type:'string',value:'userPhone',text:'客户手机号',dictCode:''})
fieldList.push({type:'string',value:'userId',text:'用户编号',dictCode:''})
fieldList.push({type:'string',value:'shopId',text:'店铺编号',dictCode:''})
fieldList.push({type:'int',value:'status',text:'状态',dictCode:'order_status'})
fieldList.push({type:'int',value:'type',text:'类型',dictCode:'hotel_order_type'})
fieldList.push({type:'int',value:'delFlag',text:'是否删除',dictCode:'is_delete'})
this.superFieldList = fieldList
}
}
}
</script>
<style scoped>
@import '~@assets/less/common.less';
</style>

+ 254
- 0
admin-hanhai-vue/src/views/system/ReplaceOrderList.vue View File

@ -0,0 +1,254 @@
<template>
<a-card :bordered="false">
<!-- 查询区域 -->
<div class="table-page-search-wrapper">
<a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24">
</a-row>
</a-form>
</div>
<!-- 查询区域-END -->
<!-- 操作按钮区域 -->
<div class="table-operator">
<!-- <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>-->
<!-- <a-button type="primary" icon="download" @click="handleExportXls('hotel_order')">导出</a-button>-->
<!-- <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">-->
<!-- <a-button type="primary" icon="import">导入</a-button>-->
<!-- </a-upload>-->
<!-- 高级查询区域 -->
<j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query>
<a-dropdown v-if="selectedRowKeys.length > 0">
<a-menu slot="overlay">
<a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>
</a-menu>
<a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button>
</a-dropdown>
</div>
<!-- table区域-begin -->
<div>
<div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
<i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>
<a style="margin-left: 24px" @click="onClearSelected">清空</a>
</div>
<a-table
ref="table"
size="middle"
:scroll="{x:true}"
bordered
rowKey="id"
:columns="columns"
:dataSource="dataSource"
:pagination="ipagination"
:loading="loading"
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
class="j-table-force-nowrap"
@change="handleTableChange">
<template slot="htmlSlot" slot-scope="text">
<div v-html="text"></div>
</template>
<template slot="imgSlot" slot-scope="text,record">
<span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span>
<img v-else :src="getImgView(text)" :preview="record.id" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/>
</template>
<template slot="fileSlot" slot-scope="text">
<span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
<a-button
v-else
:ghost="true"
type="primary"
icon="download"
size="small"
@click="downloadFile(text)">
下载
</a-button>
</template>
<span slot="action" slot-scope="text, record">
<a @click="handleEdit(record)">编辑</a>
<a-divider type="vertical" />
<a-dropdown>
<a class="ant-dropdown-link">更多 <a-icon type="down" /></a>
<a-menu slot="overlay">
<a-menu-item>
<a @click="handleDetail(record)">详情</a>
</a-menu-item>
<a-menu-item>
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
<a>删除</a>
</a-popconfirm>
</a-menu-item>
</a-menu>
</a-dropdown>
</span>
</a-table>
</div>
<hotel-order-modal ref="modalForm" @ok="modalFormOk"></hotel-order-modal>
</a-card>
</template>
<script>
import '@/assets/less/TableExpand.less'
import { mixinDevice } from '@/utils/mixin'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import HotelOrderModal from './modules/HotelOrderModal'
export default {
name: 'ReplaceOrderList',
mixins:[JeecgListMixin, mixinDevice],
components: {
HotelOrderModal
},
data () {
return {
description: '换货订单管理页面',
//
columns: [
{
title: '#',
dataIndex: '',
key:'rowIndex',
width:60,
align:"center",
customRender:function (t,r,index) {
return parseInt(index)+1;
}
},
{
title:'标题',
align:"center",
dataIndex: 'title'
},
{
title:'商品图片',
align:"center",
dataIndex: 'pic',
scopedSlots: {customRender: 'imgSlot'}
},
{
title:'客户姓名',
align:"center",
dataIndex: 'userName'
},
{
title:'客户手机号',
align:"center",
dataIndex: 'userPhone'
},
{
title:'用户地址',
align:"center",
dataIndex: 'userAddress'
},
{
title:'用户编号',
align:"center",
dataIndex: 'userId'
},
{
title:'店铺编号',
align:"center",
dataIndex: 'shopId'
},
{
title:'租赁时间',
align:"center",
dataIndex: 'leaseTime'
},
{
title:'缴纳费用',
align:"center",
dataIndex: 'payFee'
},
{
title:'押金',
align:"center",
dataIndex: 'deposit'
},
{
title:'水洗费用',
align:"center",
dataIndex: 'washPay'
},
{
title:'水洗费用',
align:"center",
dataIndex: 'rentPay'
},
{
title:'支付金额',
align:"center",
dataIndex: 'orderPay'
},
{
title:'状态',
align:"center",
dataIndex: 'status_dictText'
},
{
title:'类型',
align:"center",
dataIndex: 'type_dictText'
},
{
title:'是否删除',
align:"center",
dataIndex: 'delFlag_dictText'
},
{
title: '操作',
dataIndex: 'action',
align:"center",
fixed:"right",
width:147,
scopedSlots: { customRender: 'action' }
}
],
url: {
list: "/hotelorder/hotelOrder/replace/list",
delete: "/hotelorder/hotelOrder/delete",
deleteBatch: "/hotelorder/hotelOrder/deleteBatch",
exportXlsUrl: "/hotelorder/hotelOrder/exportXls",
importExcelUrl: "hotelorder/hotelOrder/importExcel",
},
dictOptions:{},
superFieldList:[],
}
},
created() {
this.getSuperFieldList();
},
computed: {
importExcelUrl: function(){
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
},
},
methods: {
initDictConfig(){
},
getSuperFieldList(){
let fieldList=[];
fieldList.push({type:'string',value:'title',text:'标题',dictCode:''})
fieldList.push({type:'string',value:'userName',text:'客户姓名',dictCode:''})
fieldList.push({type:'string',value:'userPhone',text:'客户手机号',dictCode:''})
fieldList.push({type:'string',value:'userId',text:'用户编号',dictCode:''})
fieldList.push({type:'string',value:'shopId',text:'店铺编号',dictCode:''})
fieldList.push({type:'int',value:'status',text:'状态',dictCode:'order_status'})
fieldList.push({type:'int',value:'type',text:'类型',dictCode:'hotel_order_type'})
fieldList.push({type:'int',value:'delFlag',text:'是否删除',dictCode:'is_delete'})
this.superFieldList = fieldList
}
}
}
</script>
<style scoped>
@import '~@assets/less/common.less';
</style>

+ 285
- 0
admin-hanhai-vue/src/views/system/WashOrderList.vue View File

@ -0,0 +1,285 @@
<template>
<a-card :bordered="false">
<!-- 查询区域 -->
<div class="table-page-search-wrapper">
<a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24">
</a-row>
</a-form>
</div>
<!-- 查询区域-END -->
<!-- 操作按钮区域 -->
<div class="table-operator">
<!-- <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>-->
<!-- <a-button type="primary" icon="download" @click="handleExportXls('hotel_order')">导出</a-button>-->
<!-- <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">-->
<!-- <a-button type="primary" icon="import">导入</a-button>-->
<!-- </a-upload>-->
<!-- 高级查询区域 -->
<j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query>
<a-dropdown v-if="selectedRowKeys.length > 0">
<a-menu slot="overlay">
<a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>
</a-menu>
<a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button>
</a-dropdown>
</div>
<!-- table区域-begin -->
<div>
<div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
<i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>
<a style="margin-left: 24px" @click="onClearSelected">清空</a>
</div>
<a-table
ref="table"
size="middle"
:scroll="{x:true}"
bordered
rowKey="id"
:columns="columns"
:dataSource="dataSource"
:pagination="ipagination"
:loading="loading"
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
class="j-table-force-nowrap"
@change="handleTableChange">
<template slot="htmlSlot" slot-scope="text">
<div v-html="text"></div>
</template>
<template slot="imgSlot" slot-scope="text,record">
<span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span>
<img v-else :src="getImgView(text)" :preview="record.id" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/>
</template>
<template slot="fileSlot" slot-scope="text">
<span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
<a-button
v-else
:ghost="true"
type="primary"
icon="download"
size="small"
@click="downloadFile(text)">
下载
</a-button>
</template>
<span slot="action" slot-scope="text, record">
<!-- <a @click="handleEdit(record)">编辑</a>-->
<!-- <a-divider type="vertical" />-->
<div v-if="record.status === 16">
<a @click="handleAudit(0,record)">通过</a>
<a-divider type="vertical" />
<a @click="handleAudit2(1,record)">不通过</a>
<a-divider type="vertical" />
</div>
<a-dropdown>
<a class="ant-dropdown-link">更多 <a-icon type="down" /></a>
<a-menu slot="overlay">
<a-menu-item>
<a @click="handleDetail(record)">详情</a>
</a-menu-item>
<a-menu-item>
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
<a>删除</a>
</a-popconfirm>
</a-menu-item>
</a-menu>
</a-dropdown>
</span>
</a-table>
</div>
<hotel-order-modal ref="modalForm" @ok="modalFormOk"></hotel-order-modal>
<wash-order-modal ref="modalForm2" @ok="modalFormOk"></wash-order-modal>
</a-card>
</template>
<script>
import '@/assets/less/TableExpand.less'
import { mixinDevice } from '@/utils/mixin'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import HotelOrderModal from './modules/HotelOrderModal'
import WashOrderModal from './modules/WashOrderModal'
import {httpAction} from "@api/manage";
export default {
name: 'WashOrderList',
mixins:[JeecgListMixin, mixinDevice],
components: {
HotelOrderModal,
WashOrderModal
},
data () {
return {
description: '水洗订单管理页面',
//
columns: [
{
title: '#',
dataIndex: '',
key:'rowIndex',
width:60,
align:"center",
customRender:function (t,r,index) {
return parseInt(index)+1;
}
},
{
title:'标题',
align:"center",
dataIndex: 'title'
},
{
title:'商品图片',
align:"center",
dataIndex: 'pic',
scopedSlots: {customRender: 'imgSlot'}
},
{
title:'客户姓名',
align:"center",
dataIndex: 'userName'
},
{
title:'客户手机号',
align:"center",
dataIndex: 'userPhone'
},
{
title:'用户地址',
align:"center",
dataIndex: 'userAddress'
},
{
title:'用户编号',
align:"center",
dataIndex: 'userId'
},
{
title:'店铺编号',
align:"center",
dataIndex: 'shopId'
},
{
title:'租赁时间',
align:"center",
dataIndex: 'leaseTime'
},
{
title:'缴纳费用',
align:"center",
dataIndex: 'payFee'
},
{
title:'押金',
align:"center",
dataIndex: 'deposit'
},
{
title:'水洗费用',
align:"center",
dataIndex: 'washPay'
},
{
title:'水洗费用',
align:"center",
dataIndex: 'rentPay'
},
{
title:'支付金额',
align:"center",
dataIndex: 'orderPay'
},
{
title:'状态',
align:"center",
dataIndex: 'status_dictText'
},
{
title:'类型',
align:"center",
dataIndex: 'type_dictText'
},
{
title:'是否删除',
align:"center",
dataIndex: 'delFlag_dictText'
},
{
title: '操作',
dataIndex: 'action',
align:"center",
fixed:"right",
width:147,
scopedSlots: { customRender: 'action' }
}
],
url: {
list: "/hotelorder/hotelOrder/wash/list",
delete: "/hotelorder/hotelOrder/delete",
deleteBatch: "/hotelorder/hotelOrder/deleteBatch",
exportXlsUrl: "/hotelorder/hotelOrder/exportXls",
importExcelUrl: "hotelorder/hotelOrder/importExcel",
damageAuditUrl: "/hotelorder/hotelOrder/damage/audit"
},
dictOptions:{},
superFieldList:[],
}
},
created() {
this.getSuperFieldList();
},
computed: {
importExcelUrl: function(){
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
},
},
methods: {
initDictConfig(){
},
getSuperFieldList(){
let fieldList=[];
fieldList.push({type:'string',value:'title',text:'标题',dictCode:''})
fieldList.push({type:'string',value:'userName',text:'客户姓名',dictCode:''})
fieldList.push({type:'string',value:'userPhone',text:'客户手机号',dictCode:''})
fieldList.push({type:'string',value:'userId',text:'用户编号',dictCode:''})
fieldList.push({type:'string',value:'shopId',text:'店铺编号',dictCode:''})
// fieldList.push({type:'int',value:'status',text:'',dictCode:'order_status'})
// fieldList.push({type:'int',value:'type',text:'',dictCode:'hotel_order_type'})
// fieldList.push({type:'int',value:'delFlag',text:'',dictCode:'is_delete'})
this.superFieldList = fieldList
},
handleAudit(e,obj){
obj.audit = e;
this.$refs.modalForm2.audit(obj);
this.$refs.modalForm2.title = "审核";
this.$refs.modalForm2.disableSubmit = false;
console.log(obj)
},
handleAudit2(e,obj){
obj.audit = e;
httpAction(this.url.damageAuditUrl,obj,'post').then((res)=>{
if(res.success){
this.$message.success(res.message);
this.$emit('ok');
}else{
this.$message.warning(res.message);
}
}).finally(() => {
this.loadData();
})
}
}
}
</script>
<style scoped>
@import '~@assets/less/common.less';
</style>

+ 149
- 0
admin-hanhai-vue/src/views/system/modules/HotelCouponForm.vue View File

@ -0,0 +1,149 @@
<template>
<a-spin :spinning="confirmLoading">
<j-form-container :disabled="formDisabled">
<a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail">
<a-row>
<a-col :span="24">
<a-form-model-item label="优惠券名" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="name">
<a-input v-model="model.name" placeholder="请输入优惠券名" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="图片" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="pic">
<j-image-upload isMultiple v-model="model.pic" ></j-image-upload>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="券额" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="price">
<a-input-number v-model="model.price" placeholder="请输入券额" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="满多少金额" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="conditionPrice">
<a-input-number v-model="model.conditionPrice" placeholder="请输入满多少金额" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="说明" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="info">
<j-editor v-model="model.info" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="优惠券结束时间" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="endTime">
<j-date placeholder="请选择优惠券结束时间" v-model="model.endTime" :show-time="true" date-format="YYYY-MM-DD HH:mm:ss" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="类型" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="type">
<j-dict-select-tag type="list" v-model="model.type" dictCode="coupon_type" placeholder="请选择类型" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="使用类型" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="useType">
<j-dict-select-tag type="list" v-model="model.useType" dictCode="coupon_use_type" placeholder="请选择使用类型" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="是否删除" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="delFlag">
<j-dict-select-tag type="radio" v-model="model.delFlag" dictCode="is_delete" placeholder="请选择是否删除" />
</a-form-model-item>
</a-col>
</a-row>
</a-form-model>
</j-form-container>
</a-spin>
</template>
<script>
import { httpAction, getAction } from '@/api/manage'
import { validateDuplicateValue } from '@/utils/util'
export default {
name: 'HotelCouponForm',
components: {
},
props: {
//
disabled: {
type: Boolean,
default: false,
required: false
}
},
data () {
return {
model:{
type:0,
delFlag:0,
},
labelCol: {
xs: { span: 24 },
sm: { span: 5 },
},
wrapperCol: {
xs: { span: 24 },
sm: { span: 16 },
},
confirmLoading: false,
validatorRules: {
delFlag: [
{ required: true, message: '请输入是否删除!'},
],
},
url: {
add: "/hotelcoupon/hotelCoupon/add",
edit: "/hotelcoupon/hotelCoupon/edit",
queryById: "/hotelcoupon/hotelCoupon/queryById"
}
}
},
computed: {
formDisabled(){
return this.disabled
},
},
created () {
//model
this.modelDefault = JSON.parse(JSON.stringify(this.model));
},
methods: {
add () {
this.edit(this.modelDefault);
},
edit (record) {
this.model = Object.assign({}, record);
this.visible = true;
},
submitForm () {
const that = this;
//
this.$refs.form.validate(valid => {
if (valid) {
that.confirmLoading = true;
let httpurl = '';
let method = '';
if(!this.model.id){
httpurl+=this.url.add;
method = 'post';
}else{
httpurl+=this.url.edit;
method = 'put';
}
httpAction(httpurl,this.model,method).then((res)=>{
if(res.success){
that.$message.success(res.message);
that.$emit('ok');
}else{
that.$message.warning(res.message);
}
}).finally(() => {
that.confirmLoading = false;
})
}
})
},
}
}
</script>

+ 84
- 0
admin-hanhai-vue/src/views/system/modules/HotelCouponModal.Style#Drawer.vue View File

@ -0,0 +1,84 @@
<template>
<a-drawer
:title="title"
:width="width"
placement="right"
:closable="false"
@close="close"
destroyOnClose
:visible="visible">
<hotel-coupon-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></hotel-coupon-form>
<div class="drawer-footer">
<a-button @click="handleCancel" style="margin-bottom: 0;">关闭</a-button>
<a-button v-if="!disableSubmit" @click="handleOk" type="primary" style="margin-bottom: 0;">提交</a-button>
</div>
</a-drawer>
</template>
<script>
import HotelCouponForm from './HotelCouponForm'
export default {
name: 'HotelCouponModal',
components: {
HotelCouponForm
},
data () {
return {
title:"操作",
width:800,
visible: false,
disableSubmit: false
}
},
methods: {
add () {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.add();
})
},
edit (record) {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.edit(record);
});
},
close () {
this.$emit('close');
this.visible = false;
},
submitCallback(){
this.$emit('ok');
this.visible = false;
},
handleOk () {
this.$refs.realForm.submitForm();
},
handleCancel () {
this.close()
}
}
}
</script>
<style lang="less" scoped>
/** Button按钮间距 */
.ant-btn {
margin-left: 30px;
margin-bottom: 30px;
float: right;
}
.drawer-footer{
position: absolute;
bottom: -8px;
width: 100%;
border-top: 1px solid #e8e8e8;
padding: 10px 16px;
text-align: right;
left: 0;
background: #fff;
border-radius: 0 0 2px 2px;
}
</style>

+ 60
- 0
admin-hanhai-vue/src/views/system/modules/HotelCouponModal.vue View File

@ -0,0 +1,60 @@
<template>
<j-modal
:title="title"
:width="width"
:visible="visible"
switchFullscreen
@ok="handleOk"
:okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
@cancel="handleCancel"
cancelText="关闭">
<hotel-coupon-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></hotel-coupon-form>
</j-modal>
</template>
<script>
import HotelCouponForm from './HotelCouponForm'
export default {
name: 'HotelCouponModal',
components: {
HotelCouponForm
},
data () {
return {
title:'',
width:800,
visible: false,
disableSubmit: false
}
},
methods: {
add () {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.add();
})
},
edit (record) {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.edit(record);
})
},
close () {
this.$emit('close');
this.visible = false;
},
handleOk () {
this.$refs.realForm.submitForm();
},
submitCallback(){
this.$emit('ok');
this.visible = false;
},
handleCancel () {
this.close()
}
}
}
</script>

+ 99
- 0
admin-hanhai-vue/src/views/system/modules/WashOrderForm.vue View File

@ -0,0 +1,99 @@
<template>
<a-spin :spinning="confirmLoading">
<j-form-container :disabled="formDisabled">
<a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail">
<a-row>
<a-col :span="24">
<a-form-model-item label="金额" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="refundPrice">
<a-input v-model="model.refundPrice" placeholder="请输入金额" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="审核" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="audit">
<j-dict-select-tag type="radio" v-model="model.audit" dictCode="is_delete" placeholder="请选择是否审核" />
</a-form-model-item>
</a-col>
</a-row>
</a-form-model>
</j-form-container>
</a-spin>
</template>
<script>
import { httpAction, getAction } from '@/api/manage'
import { validateDuplicateValue } from '@/utils/util'
export default {
name: 'WashOrderForm',
components: {
},
props: {
//
disabled: {
type: Boolean,
default: false,
required: false
}
},
data () {
return {
model:{
delFlag:0,
},
labelCol: {
xs: { span: 24 },
sm: { span: 5 },
},
wrapperCol: {
xs: { span: 24 },
sm: { span: 16 },
},
confirmLoading: false,
url: {
add: "/hotelorder/hotelOrder/add",
edit: "/hotelorder/hotelOrder/edit",
queryById: "/hotelorder/hotelOrder/queryById",
audit: "/hotelorder/hotelOrder/damage/audit"
}
}
},
computed: {
formDisabled(){
return this.disabled
},
},
created () {
//model
this.modelDefault = JSON.parse(JSON.stringify(this.model));
},
methods: {
add () {
this.edit(this.modelDefault);
},
edit (record) {
this.model = Object.assign({}, record);
this.visible = true;
},
audit (record) {
this.model = Object.assign({}, record);
this.visible = true;
},
submitForm () {
const that = this;
that.confirmLoading = true;
httpAction(that.url.audit,this.model,'post').then((res)=>{
if(res.success){
that.$message.success(res.message);
that.$emit('ok');
}else{
that.$message.warning(res.message);
}
}).finally(() => {
that.confirmLoading = false;
})
},
}
}
</script>

+ 84
- 0
admin-hanhai-vue/src/views/system/modules/WashOrderModal.Style#Drawer.vue View File

@ -0,0 +1,84 @@
<template>
<a-drawer
:title="title"
:width="width"
placement="right"
:closable="false"
@close="close"
destroyOnClose
:visible="visible">
<hotel-order-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></hotel-order-form>
<div class="drawer-footer">
<a-button @click="handleCancel" style="margin-bottom: 0;">关闭</a-button>
<a-button v-if="!disableSubmit" @click="handleOk" type="primary" style="margin-bottom: 0;">提交</a-button>
</div>
</a-drawer>
</template>
<script>
import HotelOrderForm from './WashOrderForm'
export default {
name: 'WashOrderModal',
components: {
HotelOrderForm
},
data () {
return {
title:"操作",
width:800,
visible: false,
disableSubmit: false
}
},
methods: {
add () {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.add();
})
},
edit (record) {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.edit(record);
});
},
close () {
this.$emit('close');
this.visible = false;
},
submitCallback(){
this.$emit('ok');
this.visible = false;
},
handleOk () {
this.$refs.realForm.submitForm();
},
handleCancel () {
this.close()
}
}
}
</script>
<style lang="less" scoped>
/** Button按钮间距 */
.ant-btn {
margin-left: 30px;
margin-bottom: 30px;
float: right;
}
.drawer-footer{
position: absolute;
bottom: -8px;
width: 100%;
border-top: 1px solid #e8e8e8;
padding: 10px 16px;
text-align: right;
left: 0;
background: #fff;
border-radius: 0 0 2px 2px;
}
</style>

+ 66
- 0
admin-hanhai-vue/src/views/system/modules/WashOrderModal.vue View File

@ -0,0 +1,66 @@
<template>
<j-modal
:title="title"
:width="width"
:visible="visible"
switchFullscreen
@ok="handleOk"
:okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
@cancel="handleCancel"
cancelText="关闭">
<wash-order-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></wash-order-form>
</j-modal>
</template>
<script>
import WashOrderForm from './WashOrderForm'
export default {
name: 'WashOrderModal',
components: {
WashOrderForm
},
data () {
return {
title:'',
width:800,
visible: false,
disableSubmit: false
}
},
methods: {
add () {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.add();
})
},
edit (record) {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.edit(record);
})
},
audit (record) {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.audit(record);
})
},
close () {
this.$emit('close');
this.visible = false;
},
handleOk () {
this.$refs.realForm.submitForm();
},
submitCallback(){
this.$emit('ok');
this.visible = false;
},
handleCancel () {
this.close()
}
}
}
</script>

BIN
jeecg-boot-base/jeecg-boot-base-api/jeecg-system-cloud-api/target/jeecg-system-cloud-api-3.2.0.jar View File


+ 2
- 0
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/config/shiro/ShiroConfig.java View File

@ -80,6 +80,8 @@ public class ShiroConfig {
filterChainDefinitionMap.put("/login/login", "anon");//分类接口
filterChainDefinitionMap.put("/conf/customer", "anon");//分类接口
filterChainDefinitionMap.put("/order/notify", "anon");//支付回调接口
filterChainDefinitionMap.put("/user/custom", "anon");//支付回调接口
filterChainDefinitionMap.put("/order/replace/notify", "anon");//支付回调接口
filterChainDefinitionMap.put("/sys/oss/file/upload", "anon"); //图片上传验证放开
filterChainDefinitionMap.put("/sys/common/upload", "anon"); //图片上传验证放开


+ 9
- 0
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hanHaiMember/mapper/HanHaiMemberMapper.java View File

@ -5,6 +5,7 @@ import java.util.List;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;
import org.jeecg.modules.hanHaiMember.entity.HanHaiMember;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.jeecg.modules.hanHaiMember.resp.MyUserResp;
@ -35,4 +36,12 @@ public interface HanHaiMemberMapper extends BaseMapper<HanHaiMember> {
*/
ShopIndexResp getShopIndex(@Param("userId") String userId,@Param("shopId") String shopId);
/**
* 修改用户id
* @param oldId
* @param newId
* @return
*/
Integer updateUserId(@Param("oldId") String oldId,@Param("newId") String newId);
}

+ 8
- 4
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hanHaiMember/mapper/xml/HanHaiMemberMapper.xml View File

@ -9,10 +9,14 @@
<select id="getShopIndex" resultType="org.jeecg.modules.hanHaiMember.resp.ShopIndexResp">
select (select count(1) from han_hai_member where shop_id = #{shopId}) user,
(select count(1) from hotel_order where shop_id = #{userId} and del_flag = 0 and status in (0,1,2) and type = 0) lease,
(select count(1) from hotel_order where shop_id = #{userId} and del_flag = 0 and status in (0,1,2) and type = 1) wash,
(select count(1) from hotel_order where shop_id = #{userId} and del_flag = 0 and status in (0,1,2) and type = 2) worn,
(select count(1) from hotel_order where shop_id = #{userId} and del_flag = 0 and status in (0,1,2) and type = 3) refund
(select count(1) from hotel_order where shop_id = #{userId} and del_flag = 0 and status in (1,2,15) and type = 0) lease,
(select count(1) from hotel_order where shop_id = #{userId} and del_flag = 0 and status in (4,5,6,15,16) and type = 1) wash,
(select count(1) from hotel_order where shop_id = #{userId} and del_flag = 0 and status in (7,8,9,10,15) and type = 2) worn,
(select count(1) from hotel_order where shop_id = #{userId} and del_flag = 0 and status in (11,12,13,14,15) and type = 3) refund
</select>
<update id="updateUserId">
UPDATE han_hai_member SET id = #{newId} WHERE id = #{oldId}
</update>
</mapper>

+ 8
- 0
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hanHaiMember/service/IHanHaiMemberService.java View File

@ -19,4 +19,12 @@ public interface IHanHaiMemberService extends IService<HanHaiMember> {
IPage<MyUserResp> getMyUser(Page<MyUserResp> page, String shopId);
ShopIndexResp getShopIndex(String userId, String shopId);
/**
* 修改用户id
* @param oldId 老id
* @param newId 新id
* @return
*/
Integer updateUserId(@Param("oldId") String oldId,@Param("newId") String newId);
}

+ 5
- 0
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hanHaiMember/service/impl/HanHaiMemberServiceImpl.java View File

@ -30,4 +30,9 @@ public class HanHaiMemberServiceImpl extends ServiceImpl<HanHaiMemberMapper, Han
public ShopIndexResp getShopIndex(String userId, String shopId) {
return baseMapper.getShopIndex(userId, shopId);
}
@Override
public Integer updateUserId(String oldId, String newId) {
return baseMapper.updateUserId(oldId, newId);
}
}

+ 171
- 0
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hotelcoupon/controller/HotelCouponController.java View File

@ -0,0 +1,171 @@
package org.jeecg.modules.hotelcoupon.controller;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.net.URLDecoder;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.system.query.QueryGenerator;
import org.jeecg.common.util.oConvertUtils;
import org.jeecg.modules.hotelcoupon.entity.HotelCoupon;
import org.jeecg.modules.hotelcoupon.service.IHotelCouponService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import lombok.extern.slf4j.Slf4j;
import org.jeecgframework.poi.excel.ExcelImportUtil;
import org.jeecgframework.poi.excel.def.NormalExcelConstants;
import org.jeecgframework.poi.excel.entity.ExportParams;
import org.jeecgframework.poi.excel.entity.ImportParams;
import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
import org.jeecg.common.system.base.controller.JeecgController;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.multipart.MultipartHttpServletRequest;
import org.springframework.web.servlet.ModelAndView;
import com.alibaba.fastjson.JSON;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.jeecg.common.aspect.annotation.AutoLog;
/**
* @Description: hotel_coupon
* @Author: jeecg-boot
* @Date: 2024-10-14
* @Version: V1.0
*/
@Api(tags="hotel_coupon")
@RestController
@RequestMapping("/hotelcoupon/hotelCoupon")
@Slf4j
public class HotelCouponController extends JeecgController<HotelCoupon, IHotelCouponService> {
@Autowired
private IHotelCouponService hotelCouponService;
/**
* 分页列表查询
*
* @param hotelCoupon
* @param pageNo
* @param pageSize
* @param req
* @return
*/
//@AutoLog(value = "hotel_coupon-分页列表查询")
@ApiOperation(value="hotel_coupon-分页列表查询", notes="hotel_coupon-分页列表查询")
@GetMapping(value = "/list")
public Result<IPage<HotelCoupon>> queryPageList(HotelCoupon hotelCoupon,
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
HttpServletRequest req) {
QueryWrapper<HotelCoupon> queryWrapper = QueryGenerator.initQueryWrapper(hotelCoupon, req.getParameterMap());
Page<HotelCoupon> page = new Page<HotelCoupon>(pageNo, pageSize);
IPage<HotelCoupon> pageList = hotelCouponService.page(page, queryWrapper);
return Result.OK(pageList);
}
/**
* 添加
*
* @param hotelCoupon
* @return
*/
@AutoLog(value = "hotel_coupon-添加")
@ApiOperation(value="hotel_coupon-添加", notes="hotel_coupon-添加")
@PostMapping(value = "/add")
public Result<String> add(@RequestBody HotelCoupon hotelCoupon) {
hotelCouponService.save(hotelCoupon);
return Result.OK("添加成功!");
}
/**
* 编辑
*
* @param hotelCoupon
* @return
*/
@AutoLog(value = "hotel_coupon-编辑")
@ApiOperation(value="hotel_coupon-编辑", notes="hotel_coupon-编辑")
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
public Result<String> edit(@RequestBody HotelCoupon hotelCoupon) {
hotelCouponService.updateById(hotelCoupon);
return Result.OK("编辑成功!");
}
/**
* 通过id删除
*
* @param id
* @return
*/
@AutoLog(value = "hotel_coupon-通过id删除")
@ApiOperation(value="hotel_coupon-通过id删除", notes="hotel_coupon-通过id删除")
@DeleteMapping(value = "/delete")
public Result<String> delete(@RequestParam(name="id",required=true) String id) {
hotelCouponService.removeById(id);
return Result.OK("删除成功!");
}
/**
* 批量删除
*
* @param ids
* @return
*/
@AutoLog(value = "hotel_coupon-批量删除")
@ApiOperation(value="hotel_coupon-批量删除", notes="hotel_coupon-批量删除")
@DeleteMapping(value = "/deleteBatch")
public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
this.hotelCouponService.removeByIds(Arrays.asList(ids.split(",")));
return Result.OK("批量删除成功!");
}
/**
* 通过id查询
*
* @param id
* @return
*/
//@AutoLog(value = "hotel_coupon-通过id查询")
@ApiOperation(value="hotel_coupon-通过id查询", notes="hotel_coupon-通过id查询")
@GetMapping(value = "/queryById")
public Result<HotelCoupon> queryById(@RequestParam(name="id",required=true) String id) {
HotelCoupon hotelCoupon = hotelCouponService.getById(id);
if(hotelCoupon==null) {
return Result.error("未找到对应数据");
}
return Result.OK(hotelCoupon);
}
/**
* 导出excel
*
* @param request
* @param hotelCoupon
*/
@RequestMapping(value = "/exportXls")
public ModelAndView exportXls(HttpServletRequest request, HotelCoupon hotelCoupon) {
return super.exportXls(request, hotelCoupon, HotelCoupon.class, "hotel_coupon");
}
/**
* 通过excel导入数据
*
* @param request
* @param response
* @return
*/
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
return super.importExcel(request, response, HotelCoupon.class);
}
}

+ 87
- 0
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hotelcoupon/entity/HotelCoupon.java View File

@ -0,0 +1,87 @@
package org.jeecg.modules.hotelcoupon.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: hotel_coupon
* @Author: jeecg-boot
* @Date: 2024-10-14
* @Version: V1.0
*/
@Data
@TableName("hotel_coupon")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="hotel_coupon对象", description="hotel_coupon")
public class HotelCoupon implements Serializable {
private static final long serialVersionUID = 1L;
/**id*/
@TableId(type = IdType.ASSIGN_ID)
@ApiModelProperty(value = "id")
private java.lang.String id;
/**优惠券名*/
@Excel(name = "优惠券名", width = 15)
@ApiModelProperty(value = "优惠券名")
private java.lang.String name;
/**图片*/
@Excel(name = "图片", width = 15)
@ApiModelProperty(value = "图片")
private java.lang.String pic;
/**券额*/
@Excel(name = "券额", width = 15)
@ApiModelProperty(value = "券额")
private java.math.BigDecimal price;
/**满多少金额*/
@Excel(name = "满多少金额", width = 15)
@ApiModelProperty(value = "满多少金额")
private java.math.BigDecimal conditionPrice;
/**说明*/
@Excel(name = "说明", width = 15)
@ApiModelProperty(value = "说明")
private java.lang.String info;
/**优惠券结束时间*/
@Excel(name = "优惠券结束时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "优惠券结束时间")
private java.util.Date endTime;
/**类型 0指定时间 1单次*/
@Excel(name = "类型 0指定时间 1单次", width = 15, dicCode = "coupon_type")
@Dict(dicCode = "coupon_type")
@ApiModelProperty(value = "类型 0指定时间 1单次")
private java.lang.Integer type;
/**是否删除*/
@Excel(name = "是否删除", width = 15, dicCode = "is_delete")
@Dict(dicCode = "is_delete")
@ApiModelProperty(value = "是否删除")
private java.lang.Integer delFlag;
/**createTime*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "createTime")
private java.util.Date createTime;
/**updateTime*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "updateTime")
private java.util.Date updateTime;
/**使用类型 0押金 1租金 2水洗*/
@Dict(dicCode = "coupon_use_type")
private Integer useType;
}

+ 17
- 0
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hotelcoupon/mapper/HotelCouponMapper.java View File

@ -0,0 +1,17 @@
package org.jeecg.modules.hotelcoupon.mapper;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import org.jeecg.modules.hotelcoupon.entity.HotelCoupon;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* @Description: hotel_coupon
* @Author: jeecg-boot
* @Date: 2024-10-14
* @Version: V1.0
*/
public interface HotelCouponMapper extends BaseMapper<HotelCoupon> {
}

+ 5
- 0
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hotelcoupon/mapper/xml/HotelCouponMapper.xml View File

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="org.jeecg.modules.hotelcoupon.mapper.HotelCouponMapper">
</mapper>

+ 14
- 0
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hotelcoupon/service/IHotelCouponService.java View File

@ -0,0 +1,14 @@
package org.jeecg.modules.hotelcoupon.service;
import org.jeecg.modules.hotelcoupon.entity.HotelCoupon;
import com.baomidou.mybatisplus.extension.service.IService;
/**
* @Description: hotel_coupon
* @Author: jeecg-boot
* @Date: 2024-10-14
* @Version: V1.0
*/
public interface IHotelCouponService extends IService<HotelCoupon> {
}

+ 19
- 0
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hotelcoupon/service/impl/HotelCouponServiceImpl.java View File

@ -0,0 +1,19 @@
package org.jeecg.modules.hotelcoupon.service.impl;
import org.jeecg.modules.hotelcoupon.entity.HotelCoupon;
import org.jeecg.modules.hotelcoupon.mapper.HotelCouponMapper;
import org.jeecg.modules.hotelcoupon.service.IHotelCouponService;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
/**
* @Description: hotel_coupon
* @Author: jeecg-boot
* @Date: 2024-10-14
* @Version: V1.0
*/
@Service
public class HotelCouponServiceImpl extends ServiceImpl<HotelCouponMapper, HotelCoupon> implements IHotelCouponService {
}

+ 216
- 0
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hotelcoupon/vue/HotelCouponList.vue View File

@ -0,0 +1,216 @@
<template>
<a-card :bordered="false">
<!-- 查询区域 -->
<div class="table-page-search-wrapper">
<a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24">
</a-row>
</a-form>
</div>
<!-- 查询区域-END -->
<!-- 操作按钮区域 -->
<div class="table-operator">
<a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
<a-button type="primary" icon="download" @click="handleExportXls('hotel_coupon')">导出</a-button>
<a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
<a-button type="primary" icon="import">导入</a-button>
</a-upload>
<!-- 高级查询区域 -->
<j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query>
<a-dropdown v-if="selectedRowKeys.length > 0">
<a-menu slot="overlay">
<a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>
</a-menu>
<a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button>
</a-dropdown>
</div>
<!-- table区域-begin -->
<div>
<div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
<i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>
<a style="margin-left: 24px" @click="onClearSelected">清空</a>
</div>
<a-table
ref="table"
size="middle"
:scroll="{x:true}"
bordered
rowKey="id"
:columns="columns"
:dataSource="dataSource"
:pagination="ipagination"
:loading="loading"
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
class="j-table-force-nowrap"
@change="handleTableChange">
<template slot="htmlSlot" slot-scope="text">
<div v-html="text"></div>
</template>
<template slot="imgSlot" slot-scope="text,record">
<span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span>
<img v-else :src="getImgView(text)" :preview="record.id" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/>
</template>
<template slot="fileSlot" slot-scope="text">
<span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
<a-button
v-else
:ghost="true"
type="primary"
icon="download"
size="small"
@click="downloadFile(text)">
下载
</a-button>
</template>
<span slot="action" slot-scope="text, record">
<a @click="handleEdit(record)">编辑</a>
<a-divider type="vertical" />
<a-dropdown>
<a class="ant-dropdown-link">更多 <a-icon type="down" /></a>
<a-menu slot="overlay">
<a-menu-item>
<a @click="handleDetail(record)">详情</a>
</a-menu-item>
<a-menu-item>
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
<a>删除</a>
</a-popconfirm>
</a-menu-item>
</a-menu>
</a-dropdown>
</span>
</a-table>
</div>
<hotel-coupon-modal ref="modalForm" @ok="modalFormOk"></hotel-coupon-modal>
</a-card>
</template>
<script>
import '@/assets/less/TableExpand.less'
import { mixinDevice } from '@/utils/mixin'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import HotelCouponModal from './modules/HotelCouponModal'
import {filterMultiDictText} from '@/components/dict/JDictSelectUtil'
export default {
name: 'HotelCouponList',
mixins:[JeecgListMixin, mixinDevice],
components: {
HotelCouponModal
},
data () {
return {
description: 'hotel_coupon管理页面',
//
columns: [
{
title: '#',
dataIndex: '',
key:'rowIndex',
width:60,
align:"center",
customRender:function (t,r,index) {
return parseInt(index)+1;
}
},
{
title:'优惠券名',
align:"center",
dataIndex: 'name'
},
{
title:'图片',
align:"center",
dataIndex: 'pic',
scopedSlots: {customRender: 'imgSlot'}
},
{
title:'券额',
align:"center",
dataIndex: 'price'
},
{
title:'满多少金额',
align:"center",
dataIndex: 'conditionPrice'
},
{
title:'说明',
align:"center",
dataIndex: 'info',
scopedSlots: {customRender: 'htmlSlot'}
},
{
title:'优惠券结束时间',
align:"center",
dataIndex: 'endTime'
},
{
title:'类型 0指定时间 1单次',
align:"center",
dataIndex: 'type_dictText'
},
{
title:'是否删除',
align:"center",
dataIndex: 'delFlag_dictText'
},
{
title: '操作',
dataIndex: 'action',
align:"center",
fixed:"right",
width:147,
scopedSlots: { customRender: 'action' }
}
],
url: {
list: "/hotelcoupon/hotelCoupon/list",
delete: "/hotelcoupon/hotelCoupon/delete",
deleteBatch: "/hotelcoupon/hotelCoupon/deleteBatch",
exportXlsUrl: "/hotelcoupon/hotelCoupon/exportXls",
importExcelUrl: "hotelcoupon/hotelCoupon/importExcel",
},
dictOptions:{},
superFieldList:[],
}
},
created() {
this.getSuperFieldList();
},
computed: {
importExcelUrl: function(){
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
},
},
methods: {
initDictConfig(){
},
getSuperFieldList(){
let fieldList=[];
fieldList.push({type:'string',value:'name',text:'优惠券名',dictCode:''})
fieldList.push({type:'string',value:'pic',text:'图片',dictCode:''})
fieldList.push({type:'BigDecimal',value:'price',text:'券额',dictCode:''})
fieldList.push({type:'BigDecimal',value:'conditionPrice',text:'满多少金额',dictCode:''})
fieldList.push({type:'string',value:'info',text:'说明',dictCode:''})
fieldList.push({type:'datetime',value:'endTime',text:'优惠券结束时间'})
fieldList.push({type:'int',value:'type',text:'类型 0指定时间 1单次',dictCode:'coupon_type'})
fieldList.push({type:'int',value:'delFlag',text:'是否删除',dictCode:'is_delete'})
this.superFieldList = fieldList
}
}
}
</script>
<style scoped>
@import '~@assets/less/common.less';
</style>

+ 144
- 0
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hotelcoupon/vue/modules/HotelCouponForm.vue View File

@ -0,0 +1,144 @@
<template>
<a-spin :spinning="confirmLoading">
<j-form-container :disabled="formDisabled">
<a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail">
<a-row>
<a-col :span="24">
<a-form-model-item label="优惠券名" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="name">
<a-input v-model="model.name" placeholder="请输入优惠券名" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="图片" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="pic">
<j-image-upload isMultiple v-model="model.pic" ></j-image-upload>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="券额" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="price">
<a-input-number v-model="model.price" placeholder="请输入券额" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="满多少金额" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="conditionPrice">
<a-input-number v-model="model.conditionPrice" placeholder="请输入满多少金额" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="说明" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="info">
<j-editor v-model="model.info" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="优惠券结束时间" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="endTime">
<j-date placeholder="请选择优惠券结束时间" v-model="model.endTime" :show-time="true" date-format="YYYY-MM-DD HH:mm:ss" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="类型" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="type">
<j-dict-select-tag type="list" v-model="model.type" dictCode="coupon_type" placeholder="请选择类型" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="是否删除" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="delFlag">
<j-dict-select-tag type="radio" v-model="model.delFlag" dictCode="is_delete" placeholder="请选择是否删除" />
</a-form-model-item>
</a-col>
</a-row>
</a-form-model>
</j-form-container>
</a-spin>
</template>
<script>
import { httpAction, getAction } from '@/api/manage'
import { validateDuplicateValue } from '@/utils/util'
export default {
name: 'HotelCouponForm',
components: {
},
props: {
//
disabled: {
type: Boolean,
default: false,
required: false
}
},
data () {
return {
model:{
type:0,
delFlag:0,
},
labelCol: {
xs: { span: 24 },
sm: { span: 5 },
},
wrapperCol: {
xs: { span: 24 },
sm: { span: 16 },
},
confirmLoading: false,
validatorRules: {
delFlag: [
{ required: true, message: '请输入是否删除!'},
],
},
url: {
add: "/hotelcoupon/hotelCoupon/add",
edit: "/hotelcoupon/hotelCoupon/edit",
queryById: "/hotelcoupon/hotelCoupon/queryById"
}
}
},
computed: {
formDisabled(){
return this.disabled
},
},
created () {
//model
this.modelDefault = JSON.parse(JSON.stringify(this.model));
},
methods: {
add () {
this.edit(this.modelDefault);
},
edit (record) {
this.model = Object.assign({}, record);
this.visible = true;
},
submitForm () {
const that = this;
//
this.$refs.form.validate(valid => {
if (valid) {
that.confirmLoading = true;
let httpurl = '';
let method = '';
if(!this.model.id){
httpurl+=this.url.add;
method = 'post';
}else{
httpurl+=this.url.edit;
method = 'put';
}
httpAction(httpurl,this.model,method).then((res)=>{
if(res.success){
that.$message.success(res.message);
that.$emit('ok');
}else{
that.$message.warning(res.message);
}
}).finally(() => {
that.confirmLoading = false;
})
}
})
},
}
}
</script>

+ 84
- 0
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hotelcoupon/vue/modules/HotelCouponModal.Style#Drawer.vue View File

@ -0,0 +1,84 @@
<template>
<a-drawer
:title="title"
:width="width"
placement="right"
:closable="false"
@close="close"
destroyOnClose
:visible="visible">
<hotel-coupon-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></hotel-coupon-form>
<div class="drawer-footer">
<a-button @click="handleCancel" style="margin-bottom: 0;">关闭</a-button>
<a-button v-if="!disableSubmit" @click="handleOk" type="primary" style="margin-bottom: 0;">提交</a-button>
</div>
</a-drawer>
</template>
<script>
import HotelCouponForm from './HotelCouponForm'
export default {
name: 'HotelCouponModal',
components: {
HotelCouponForm
},
data () {
return {
title:"操作",
width:800,
visible: false,
disableSubmit: false
}
},
methods: {
add () {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.add();
})
},
edit (record) {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.edit(record);
});
},
close () {
this.$emit('close');
this.visible = false;
},
submitCallback(){
this.$emit('ok');
this.visible = false;
},
handleOk () {
this.$refs.realForm.submitForm();
},
handleCancel () {
this.close()
}
}
}
</script>
<style lang="less" scoped>
/** Button按钮间距 */
.ant-btn {
margin-left: 30px;
margin-bottom: 30px;
float: right;
}
.drawer-footer{
position: absolute;
bottom: -8px;
width: 100%;
border-top: 1px solid #e8e8e8;
padding: 10px 16px;
text-align: right;
left: 0;
background: #fff;
border-radius: 0 0 2px 2px;
}
</style>

+ 60
- 0
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hotelcoupon/vue/modules/HotelCouponModal.vue View File

@ -0,0 +1,60 @@
<template>
<j-modal
:title="title"
:width="width"
:visible="visible"
switchFullscreen
@ok="handleOk"
:okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
@cancel="handleCancel"
cancelText="关闭">
<hotel-coupon-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></hotel-coupon-form>
</j-modal>
</template>
<script>
import HotelCouponForm from './HotelCouponForm'
export default {
name: 'HotelCouponModal',
components: {
HotelCouponForm
},
data () {
return {
title:'',
width:800,
visible: false,
disableSubmit: false
}
},
methods: {
add () {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.add();
})
},
edit (record) {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.edit(record);
})
},
close () {
this.$emit('close');
this.visible = false;
},
handleOk () {
this.$refs.realForm.submitForm();
},
submitCallback(){
this.$emit('ok');
this.visible = false;
},
handleCancel () {
this.close()
}
}
}
</script>

+ 61
- 0
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hotelcoupon/vue3/HotelCoupon.api.ts View File

@ -0,0 +1,61 @@
import {defHttp} from '/@/utils/http/axios';
import {Modal} from 'ant-design-vue';
enum Api {
list = '/hotelcoupon/hotelCoupon/list',
save='/hotelcoupon/hotelCoupon/add',
edit='/hotelcoupon/hotelCoupon/edit',
deleteOne = '/hotelcoupon/hotelCoupon/delete',
deleteBatch = '/hotelcoupon/hotelCoupon/deleteBatch',
importExcel = '/hotelcoupon/hotelCoupon/importExcel',
exportXls = '/hotelcoupon/hotelCoupon/exportXls',
}
/**
* api
* @param params
*/
export const getExportUrl = Api.exportXls;
/**
* api
*/
export const getImportUrl = Api.importExcel;
/**
*
* @param params
*/
export const list = (params) =>
defHttp.get({url: Api.list, params});
/**
*
*/
export const deleteOne = (params,handleSuccess) => {
return defHttp.delete({url: Api.deleteOne, params}, {joinParamsToUrl: true}).then(() => {
handleSuccess();
});
}
/**
*
* @param params
*/
export const batchDelete = (params, handleSuccess) => {
Modal.confirm({
title: '确认删除',
content: '是否删除选中数据',
okText: '确认',
cancelText: '取消',
onOk: () => {
return defHttp.delete({url: Api.deleteBatch, data: params}, {joinParamsToUrl: true}).then(() => {
handleSuccess();
});
}
});
}
/**
*
* @param params
*/
export const saveOrUpdate = (params, isUpdate) => {
let url = isUpdate ? Api.edit : Api.save;
return defHttp.post({url: url, params});
}

+ 108
- 0
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hotelcoupon/vue3/HotelCoupon.data.ts View File

@ -0,0 +1,108 @@
import {BasicColumn} from '/@/components/Table';
import {FormSchema} from '/@/components/Table';
import { rules} from '/@/utils/helper/validator';
import { render } from '/@/utils/common/renderUtils';
//列表数据
export const columns: BasicColumn[] = [
{
title: '优惠券名',
align:"center",
dataIndex: 'name'
},
{
title: '图片',
align:"center",
dataIndex: 'pic',
customRender:render.renderAvatar,
},
{
title: '券额',
align:"center",
dataIndex: 'price'
},
{
title: '满多少金额',
align:"center",
dataIndex: 'conditionPrice'
},
{
title: '说明',
align:"center",
dataIndex: 'info',
slots: { customRender: 'htmlSlot' },
},
{
title: '优惠券结束时间',
align:"center",
dataIndex: 'endTime'
},
{
title: '类型 0指定时间 1单次',
align:"center",
dataIndex: 'type_dictText'
},
{
title: '是否删除',
align:"center",
dataIndex: 'delFlag_dictText'
},
];
//查询数据
export const searchFormSchema: FormSchema[] = [
];
//表单数据
export const formSchema: FormSchema[] = [
{
label: '优惠券名',
field: 'name',
component: 'Input',
},
{
label: '图片',
field: 'pic',
component: 'JImageUpload',
componentProps:{
},
},
{
label: '券额',
field: 'price',
component: 'InputNumber',
},
{
label: '满多少金额',
field: 'conditionPrice',
component: 'InputNumber',
},
{
label: '说明',
field: 'info',
component: 'JCodeEditor', //TODO String后缀暂未添加
},
{
label: '优惠券结束时间',
field: 'endTime',
component: 'Input',
},
{
label: '类型 0指定时间 1单次',
field: 'type',
component: 'JDictSelectTag',
componentProps:{
dictCode:"coupon_type"
},
},
{
label: '是否删除',
field: 'delFlag',
component: 'JDictSelectTag',
componentProps:{
dictCode:"is_delete"
},
dynamicRules: ({model,schema}) => {
return [
{ required: true, message: '请输入是否删除!'},
];
},
},
];

+ 162
- 0
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hotelcoupon/vue3/HotelCouponList.vue View File

@ -0,0 +1,162 @@
<template>
<div>
<!--引用表格-->
<BasicTable @register="registerTable" :rowSelection="rowSelection">
<!--插槽:table标题-->
<template #tableTitle>
<a-button type="primary" @click="handleAdd" preIcon="ant-design:plus-outlined"> 新增</a-button>
<a-button type="primary" preIcon="ant-design:export-outlined" @click="onExportXls"> 导出</a-button>
<j-upload-button type="primary" preIcon="ant-design:import-outlined" @click="onImportXls">导入</j-upload-button>
<a-dropdown v-if="checkedKeys.length > 0">
<template #overlay>
<a-menu>
<a-menu-item key="1" @click="batchHandleDelete">
<Icon icon="ant-design:delete-outlined"></Icon>
删除
</a-menu-item>
</a-menu>
</template>
<a-button>批量操作
<Icon icon="mdi:chevron-down"></Icon>
</a-button>
</a-dropdown>
</template>
<!--操作栏-->
<template #action="{ record }">
<TableAction :actions="getTableAction(record)" :dropDownActions="getDropDownAction(record)"/>
</template>
<!--字段回显插槽-->
<template #htmlSlot="{text}">
<div v-html="text"></div>
</template>
<template #fileSlot="{text}">
<span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
<a-button v-else :ghost="true" type="primary" preIcon="ant-design:download-outlined" size="small" @click="downloadFile(text)">下载</a-button>
</template>
</BasicTable>
<!-- 表单区域 -->
<HotelCouponModal @register="registerModal" @success="handleSuccess"></HotelCouponModal>
</div>
</template>
<script lang="ts" name="hotelcoupon-hotelCoupon" setup>
import {ref, computed, unref} from 'vue';
import {BasicTable, useTable, TableAction} from '/@/components/Table';
import {useModal} from '/@/components/Modal';
import { useListPage } from '/@/hooks/system/useListPage'
import HotelCouponModal from './components/HotelCouponModal.vue'
import {columns, searchFormSchema} from './hotelCoupon.data';
import {list, deleteOne, batchDelete, getImportUrl,getExportUrl} from './hotelCoupon.api';
const checkedKeys = ref<Array<string | number>>([]);
//model
const [registerModal, {openModal}] = useModal();
//table
const { prefixCls,tableContext,onExportXls,onImportXls } = useListPage({
tableProps:{
title: 'hotel_coupon',
api: list,
columns,
canResize:false,
formConfig: {
labelWidth: 120,
schemas: searchFormSchema,
autoSubmitOnEnter:true,
showAdvancedButton:true,
fieldMapToTime: [
],
},
actionColumn: {
width: 120,
},
},
exportConfig: {
name:"hotel_coupon",
url: getExportUrl,
},
importConfig: {
url: getImportUrl
},
})
const [registerTable, {reload},{ rowSelection, selectedRowKeys }] = tableContext
/**
* 新增事件
*/
function handleAdd() {
openModal(true, {
isUpdate: false,
showFooter: true,
});
}
/**
* 编辑事件
*/
function handleEdit(record: Recordable) {
openModal(true, {
record,
isUpdate: true,
showFooter: true,
});
}
/**
* 详情
*/
function handleDetail(record: Recordable) {
openModal(true, {
record,
isUpdate: true,
showFooter: false,
});
}
/**
* 删除事件
*/
async function handleDelete(record) {
await deleteOne({id: record.id}, reload);
}
/**
* 批量删除事件
*/
async function batchHandleDelete() {
await batchDelete({ids: checkedKeys.value}, reload);
}
/**
* 成功回调
*/
function handleSuccess() {
reload();
}
/**
* 操作栏
*/
function getTableAction(record){
return [
{
label: '编辑',
onClick: handleEdit.bind(null, record),
}
]
}
/**
* 下拉操作栏
*/
function getDropDownAction(record){
return [
{
label: '详情',
onClick: handleDetail.bind(null, record),
}, {
label: '删除',
popConfirm: {
title: '是否确认删除',
confirm: handleDelete.bind(null, record),
}
}
]
}
</script>
<style scoped>
</style>

+ 58
- 0
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hotelcoupon/vue3/components/HotelCouponModal.vue View File

@ -0,0 +1,58 @@
<template>
<BasicModal v-bind="$attrs" @register="registerModal" :title="title" @ok="handleSubmit">
<BasicForm @register="registerForm"/>
</BasicModal>
</template>
<script lang="ts" setup>
import {ref, computed, unref} from 'vue';
import {BasicModal, useModalInner} from '/@/components/Modal';
import {BasicForm, useForm} from '/@/components/Form/index';
import {formSchema} from '../hotelCoupon.data';
import {saveOrUpdate} from '../hotelCoupon.api';
// Emits
const emit = defineEmits(['register','success']);
const isUpdate = ref(true);
//
const [registerForm, {setProps,resetFields, setFieldsValue, validate}] = useForm({
labelWidth: 150,
schemas: formSchema,
showActionButtonGroup: false,
});
//
const [registerModal, {setModalProps, closeModal}] = useModalInner(async (data) => {
//
await resetFields();
setModalProps({confirmLoading: false,showCancelBtn:!!data?.showFooter,showOkBtn:!!data?.showFooter});
isUpdate.value = !!data?.isUpdate;
if (unref(isUpdate)) {
//
await setFieldsValue({
...data.record,
});
}
//
setProps({ disabled: !data?.showFooter })
});
//
const title = computed(() => (!unref(isUpdate) ? '新增' : '编辑'));
//
async function handleSubmit(v) {
try {
let values = await validate();
setModalProps({confirmLoading: true});
//
await saveOrUpdate(values, isUpdate.value);
//
closeModal();
//
emit('success');
} finally {
setModalProps({confirmLoading: false});
}
}
</script>
<style lang="less" scoped>
</style>

+ 171
- 0
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hotelcouponlog/controller/HotelCouponLogController.java View File

@ -0,0 +1,171 @@
package org.jeecg.modules.hotelcouponlog.controller;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.net.URLDecoder;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.system.query.QueryGenerator;
import org.jeecg.common.util.oConvertUtils;
import org.jeecg.modules.hotelcouponlog.entity.HotelCouponLog;
import org.jeecg.modules.hotelcouponlog.service.IHotelCouponLogService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import lombok.extern.slf4j.Slf4j;
import org.jeecgframework.poi.excel.ExcelImportUtil;
import org.jeecgframework.poi.excel.def.NormalExcelConstants;
import org.jeecgframework.poi.excel.entity.ExportParams;
import org.jeecgframework.poi.excel.entity.ImportParams;
import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
import org.jeecg.common.system.base.controller.JeecgController;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.multipart.MultipartHttpServletRequest;
import org.springframework.web.servlet.ModelAndView;
import com.alibaba.fastjson.JSON;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.jeecg.common.aspect.annotation.AutoLog;
/**
* @Description: hotel_coupon_log
* @Author: jeecg-boot
* @Date: 2024-10-14
* @Version: V1.0
*/
@Api(tags="hotel_coupon_log")
@RestController
@RequestMapping("/hotelcouponlog/hotelCouponLog")
@Slf4j
public class HotelCouponLogController extends JeecgController<HotelCouponLog, IHotelCouponLogService> {
@Autowired
private IHotelCouponLogService hotelCouponLogService;
/**
* 分页列表查询
*
* @param hotelCouponLog
* @param pageNo
* @param pageSize
* @param req
* @return
*/
//@AutoLog(value = "hotel_coupon_log-分页列表查询")
@ApiOperation(value="hotel_coupon_log-分页列表查询", notes="hotel_coupon_log-分页列表查询")
@GetMapping(value = "/list")
public Result<IPage<HotelCouponLog>> queryPageList(HotelCouponLog hotelCouponLog,
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
HttpServletRequest req) {
QueryWrapper<HotelCouponLog> queryWrapper = QueryGenerator.initQueryWrapper(hotelCouponLog, req.getParameterMap());
Page<HotelCouponLog> page = new Page<HotelCouponLog>(pageNo, pageSize);
IPage<HotelCouponLog> pageList = hotelCouponLogService.page(page, queryWrapper);
return Result.OK(pageList);
}
/**
* 添加
*
* @param hotelCouponLog
* @return
*/
@AutoLog(value = "hotel_coupon_log-添加")
@ApiOperation(value="hotel_coupon_log-添加", notes="hotel_coupon_log-添加")
@PostMapping(value = "/add")
public Result<String> add(@RequestBody HotelCouponLog hotelCouponLog) {
hotelCouponLogService.save(hotelCouponLog);
return Result.OK("添加成功!");
}
/**
* 编辑
*
* @param hotelCouponLog
* @return
*/
@AutoLog(value = "hotel_coupon_log-编辑")
@ApiOperation(value="hotel_coupon_log-编辑", notes="hotel_coupon_log-编辑")
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
public Result<String> edit(@RequestBody HotelCouponLog hotelCouponLog) {
hotelCouponLogService.updateById(hotelCouponLog);
return Result.OK("编辑成功!");
}
/**
* 通过id删除
*
* @param id
* @return
*/
@AutoLog(value = "hotel_coupon_log-通过id删除")
@ApiOperation(value="hotel_coupon_log-通过id删除", notes="hotel_coupon_log-通过id删除")
@DeleteMapping(value = "/delete")
public Result<String> delete(@RequestParam(name="id",required=true) String id) {
hotelCouponLogService.removeById(id);
return Result.OK("删除成功!");
}
/**
* 批量删除
*
* @param ids
* @return
*/
@AutoLog(value = "hotel_coupon_log-批量删除")
@ApiOperation(value="hotel_coupon_log-批量删除", notes="hotel_coupon_log-批量删除")
@DeleteMapping(value = "/deleteBatch")
public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
this.hotelCouponLogService.removeByIds(Arrays.asList(ids.split(",")));
return Result.OK("批量删除成功!");
}
/**
* 通过id查询
*
* @param id
* @return
*/
//@AutoLog(value = "hotel_coupon_log-通过id查询")
@ApiOperation(value="hotel_coupon_log-通过id查询", notes="hotel_coupon_log-通过id查询")
@GetMapping(value = "/queryById")
public Result<HotelCouponLog> queryById(@RequestParam(name="id",required=true) String id) {
HotelCouponLog hotelCouponLog = hotelCouponLogService.getById(id);
if(hotelCouponLog==null) {
return Result.error("未找到对应数据");
}
return Result.OK(hotelCouponLog);
}
/**
* 导出excel
*
* @param request
* @param hotelCouponLog
*/
@RequestMapping(value = "/exportXls")
public ModelAndView exportXls(HttpServletRequest request, HotelCouponLog hotelCouponLog) {
return super.exportXls(request, hotelCouponLog, HotelCouponLog.class, "hotel_coupon_log");
}
/**
* 通过excel导入数据
*
* @param request
* @param response
* @return
*/
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
return super.importExcel(request, response, HotelCouponLog.class);
}
}

+ 97
- 0
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hotelcouponlog/entity/HotelCouponLog.java View File

@ -0,0 +1,97 @@
package org.jeecg.modules.hotelcouponlog.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: hotel_coupon_log
* @Author: jeecg-boot
* @Date: 2024-10-14
* @Version: V1.0
*/
@Data
@TableName("hotel_coupon_log")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="hotel_coupon_log对象", description="hotel_coupon_log")
public class HotelCouponLog implements Serializable {
private static final long serialVersionUID = 1L;
/**id*/
@TableId(type = IdType.ASSIGN_ID)
@ApiModelProperty(value = "id")
private java.lang.String id;
/**优惠券编号*/
@Excel(name = "优惠券编号", width = 15)
@ApiModelProperty(value = "优惠券编号")
private java.lang.String couponId;
/**用户编号*/
@Excel(name = "用户编号", width = 15)
@ApiModelProperty(value = "用户编号")
private java.lang.String userId;
/**优惠券名*/
@Excel(name = "优惠券名", width = 15)
@ApiModelProperty(value = "优惠券名")
private java.lang.String couponName;
/**图片*/
@Excel(name = "图片", width = 15)
@ApiModelProperty(value = "图片")
private java.lang.String pic;
/**券额*/
@Excel(name = "券额", width = 15)
@ApiModelProperty(value = "券额")
private java.math.BigDecimal price;
/**满足多少金额*/
@Excel(name = "满足多少金额", width = 15)
@ApiModelProperty(value = "满足多少金额")
private java.math.BigDecimal conditionPrice;
/**结束时间*/
@Excel(name = "结束时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "结束时间")
private java.util.Date endTime;
/**类型 0指定时间 1单次使用*/
@Excel(name = "类型 0指定时间 1单次使用", width = 15, dicCode = "coupon_type")
@Dict(dicCode = "coupon_type")
@ApiModelProperty(value = "类型 0指定时间 1单次使用")
private java.lang.Integer type;
/**状态 0未使用 1已使用*/
@Excel(name = "状态 0未使用 1已使用", width = 15, dicCode = "coupon_log_status")
@Dict(dicCode = "coupon_log_status")
@ApiModelProperty(value = "状态 0未使用 1已使用")
private java.lang.Integer status;
/**是否删除*/
@Excel(name = "是否删除", width = 15, dicCode = "is_delete")
@Dict(dicCode = "is_delete")
@ApiModelProperty(value = "是否删除")
private java.lang.Integer delFlag;
/**创建时间*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "创建时间")
private java.util.Date createTime;
/**修改时间*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "修改时间")
private java.util.Date updateTime;
/**使用类型 0押金 1租金 2水洗*/
@Dict(dicCode = "coupon_use_type")
private Integer useType;
private String orderLogId;
}

+ 17
- 0
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hotelcouponlog/mapper/HotelCouponLogMapper.java View File

@ -0,0 +1,17 @@
package org.jeecg.modules.hotelcouponlog.mapper;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import org.jeecg.modules.hotelcouponlog.entity.HotelCouponLog;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* @Description: hotel_coupon_log
* @Author: jeecg-boot
* @Date: 2024-10-14
* @Version: V1.0
*/
public interface HotelCouponLogMapper extends BaseMapper<HotelCouponLog> {
}

+ 5
- 0
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hotelcouponlog/mapper/xml/HotelCouponLogMapper.xml View File

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="org.jeecg.modules.hotelcouponlog.mapper.HotelCouponLogMapper">
</mapper>

+ 14
- 0
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hotelcouponlog/service/IHotelCouponLogService.java View File

@ -0,0 +1,14 @@
package org.jeecg.modules.hotelcouponlog.service;
import org.jeecg.modules.hotelcouponlog.entity.HotelCouponLog;
import com.baomidou.mybatisplus.extension.service.IService;
/**
* @Description: hotel_coupon_log
* @Author: jeecg-boot
* @Date: 2024-10-14
* @Version: V1.0
*/
public interface IHotelCouponLogService extends IService<HotelCouponLog> {
}

+ 19
- 0
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hotelcouponlog/service/impl/HotelCouponLogServiceImpl.java View File

@ -0,0 +1,19 @@
package org.jeecg.modules.hotelcouponlog.service.impl;
import org.jeecg.modules.hotelcouponlog.entity.HotelCouponLog;
import org.jeecg.modules.hotelcouponlog.mapper.HotelCouponLogMapper;
import org.jeecg.modules.hotelcouponlog.service.IHotelCouponLogService;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
/**
* @Description: hotel_coupon_log
* @Author: jeecg-boot
* @Date: 2024-10-14
* @Version: V1.0
*/
@Service
public class HotelCouponLogServiceImpl extends ServiceImpl<HotelCouponLogMapper, HotelCouponLog> implements IHotelCouponLogService {
}

+ 232
- 0
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hotelcouponlog/vue/HotelCouponLogList.vue View File

@ -0,0 +1,232 @@
<template>
<a-card :bordered="false">
<!-- 查询区域 -->
<div class="table-page-search-wrapper">
<a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24">
</a-row>
</a-form>
</div>
<!-- 查询区域-END -->
<!-- 操作按钮区域 -->
<div class="table-operator">
<a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
<!-- <a-button type="primary" icon="download" @click="handleExportXls('hotel_coupon_log')">导出</a-button>-->
<!-- <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">-->
<!-- <a-button type="primary" icon="import">导入</a-button>-->
<!-- </a-upload>-->
<!-- 高级查询区域 -->
<j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query>
<a-dropdown v-if="selectedRowKeys.length > 0">
<a-menu slot="overlay">
<a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>
</a-menu>
<a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button>
</a-dropdown>
</div>
<!-- table区域-begin -->
<div>
<div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
<i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>
<a style="margin-left: 24px" @click="onClearSelected">清空</a>
</div>
<a-table
ref="table"
size="middle"
:scroll="{x:true}"
bordered
rowKey="id"
:columns="columns"
:dataSource="dataSource"
:pagination="ipagination"
:loading="loading"
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
class="j-table-force-nowrap"
@change="handleTableChange">
<template slot="htmlSlot" slot-scope="text">
<div v-html="text"></div>
</template>
<template slot="imgSlot" slot-scope="text,record">
<span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span>
<img v-else :src="getImgView(text)" :preview="record.id" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/>
</template>
<template slot="fileSlot" slot-scope="text">
<span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
<a-button
v-else
:ghost="true"
type="primary"
icon="download"
size="small"
@click="downloadFile(text)">
下载
</a-button>
</template>
<span slot="action" slot-scope="text, record">
<a @click="handleEdit(record)">编辑</a>
<a-divider type="vertical" />
<a-dropdown>
<a class="ant-dropdown-link">更多 <a-icon type="down" /></a>
<a-menu slot="overlay">
<a-menu-item>
<a @click="handleDetail(record)">详情</a>
</a-menu-item>
<a-menu-item>
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
<a>删除</a>
</a-popconfirm>
</a-menu-item>
</a-menu>
</a-dropdown>
</span>
</a-table>
</div>
<hotel-coupon-log-modal ref="modalForm" @ok="modalFormOk"></hotel-coupon-log-modal>
</a-card>
</template>
<script>
import '@/assets/less/TableExpand.less'
import { mixinDevice } from '@/utils/mixin'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import HotelCouponLogModal from './modules/HotelCouponLogModal'
import {filterMultiDictText} from '@/components/dict/JDictSelectUtil'
export default {
name: 'HotelCouponLogList',
mixins:[JeecgListMixin, mixinDevice],
components: {
HotelCouponLogModal
},
data () {
return {
description: 'hotel_coupon_log管理页面',
//
columns: [
{
title: '#',
dataIndex: '',
key:'rowIndex',
width:60,
align:"center",
customRender:function (t,r,index) {
return parseInt(index)+1;
}
},
{
title:'优惠券编号',
align:"center",
dataIndex: 'couponId'
},
{
title:'用户编号',
align:"center",
dataIndex: 'userId'
},
{
title:'优惠券名',
align:"center",
dataIndex: 'couponName'
},
{
title:'图片',
align:"center",
dataIndex: 'pic',
scopedSlots: {customRender: 'imgSlot'}
},
{
title:'券额',
align:"center",
dataIndex: 'price'
},
{
title:'满足多少金额',
align:"center",
dataIndex: 'conditionPrice'
},
{
title:'结束时间',
align:"center",
dataIndex: 'endTime'
},
{
title:'类型',
align:"center",
dataIndex: 'type_dictText'
},
{
title:'使用类型',
align:"center",
dataIndex: 'useType_dictText'
},
{
title:'状态',
align:"center",
dataIndex: 'status_dictText'
},
{
title:'是否删除',
align:"center",
dataIndex: 'delFlag_dictText'
},
{
title: '操作',
dataIndex: 'action',
align:"center",
fixed:"right",
width:147,
scopedSlots: { customRender: 'action' }
}
],
url: {
list: "/hotelcouponlog/hotelCouponLog/list",
delete: "/hotelcouponlog/hotelCouponLog/delete",
deleteBatch: "/hotelcouponlog/hotelCouponLog/deleteBatch",
exportXlsUrl: "/hotelcouponlog/hotelCouponLog/exportXls",
importExcelUrl: "hotelcouponlog/hotelCouponLog/importExcel",
},
dictOptions:{},
superFieldList:[],
}
},
created() {
this.getSuperFieldList();
},
computed: {
importExcelUrl: function(){
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
},
},
methods: {
initDictConfig(){
},
getSuperFieldList(){
let fieldList=[];
fieldList.push({type:'string',value:'couponId',text:'优惠券编号',dictCode:''})
fieldList.push({type:'string',value:'userId',text:'用户编号',dictCode:''})
fieldList.push({type:'string',value:'couponName',text:'优惠券名',dictCode:''})
fieldList.push({type:'string',value:'pic',text:'图片',dictCode:''})
fieldList.push({type:'BigDecimal',value:'price',text:'券额',dictCode:''})
fieldList.push({type:'BigDecimal',value:'conditionPrice',text:'满足多少金额',dictCode:''})
fieldList.push({type:'datetime',value:'endTime',text:'结束时间'})
fieldList.push({type:'int',value:'type',text:'类型 0指定时间 1单次使用',dictCode:'coupon_type'})
fieldList.push({type:'int',value:'status',text:'状态 0未使用 1已使用',dictCode:'coupon_log_status'})
fieldList.push({type:'int',value:'delFlag',text:'是否删除',dictCode:'is_delete'})
this.superFieldList = fieldList
}
}
}
</script>
<style scoped>
@import '~@assets/less/common.less';
</style>

+ 163
- 0
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hotelcouponlog/vue/modules/HotelCouponLogForm.vue View File

@ -0,0 +1,163 @@
<template>
<a-spin :spinning="confirmLoading">
<j-form-container :disabled="formDisabled">
<a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail">
<a-row>
<a-col :span="24">
<a-form-model-item label="优惠券编号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="couponId">
<a-input v-model="model.couponId" placeholder="请输入优惠券编号" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="用户编号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="userId">
<a-input v-model="model.userId" placeholder="请输入用户编号" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="优惠券名" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="couponName">
<a-input v-model="model.couponName" placeholder="请输入优惠券名" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="图片" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="pic">
<j-image-upload isMultiple v-model="model.pic" ></j-image-upload>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="券额" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="price">
<a-input-number v-model="model.price" placeholder="请输入券额" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="满足多少金额" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="conditionPrice">
<a-input-number v-model="model.conditionPrice" placeholder="请输入满足多少金额" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="结束时间" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="endTime">
<j-date placeholder="请选择结束时间" v-model="model.endTime" :show-time="true" date-format="YYYY-MM-DD HH:mm:ss" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="类型" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="type">
<j-dict-select-tag type="list" v-model="model.type" dictCode="coupon_type" placeholder="请选择类型" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="使用类型" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="useType">
<j-dict-select-tag type="list" v-model="model.useType" dictCode="coupon_type" placeholder="请选择使用类型" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="状态" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="status">
<j-dict-select-tag type="radio" v-model="model.status" dictCode="coupon_log_status" placeholder="请选择状态" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="是否删除" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="delFlag">
<j-dict-select-tag type="radio" v-model="model.delFlag" dictCode="is_delete" placeholder="请选择是否删除" />
</a-form-model-item>
</a-col>
</a-row>
</a-form-model>
</j-form-container>
</a-spin>
</template>
<script>
import { httpAction, getAction } from '@/api/manage'
import { validateDuplicateValue } from '@/utils/util'
export default {
name: 'HotelCouponLogForm',
components: {
},
props: {
//
disabled: {
type: Boolean,
default: false,
required: false
}
},
data () {
return {
model:{
type:0,
status:0,
delFlag:0,
},
labelCol: {
xs: { span: 24 },
sm: { span: 5 },
},
wrapperCol: {
xs: { span: 24 },
sm: { span: 16 },
},
confirmLoading: false,
validatorRules: {
status: [
{ required: true, message: '请输入状态 0未使用 1已使用!'},
],
delFlag: [
{ required: true, message: '请输入是否删除!'},
],
},
url: {
add: "/hotelcouponlog/hotelCouponLog/add",
edit: "/hotelcouponlog/hotelCouponLog/edit",
queryById: "/hotelcouponlog/hotelCouponLog/queryById"
}
}
},
computed: {
formDisabled(){
return this.disabled
},
},
created () {
//model
this.modelDefault = JSON.parse(JSON.stringify(this.model));
},
methods: {
add () {
this.edit(this.modelDefault);
},
edit (record) {
this.model = Object.assign({}, record);
this.visible = true;
},
submitForm () {
const that = this;
//
this.$refs.form.validate(valid => {
if (valid) {
that.confirmLoading = true;
let httpurl = '';
let method = '';
if(!this.model.id){
httpurl+=this.url.add;
method = 'post';
}else{
httpurl+=this.url.edit;
method = 'put';
}
httpAction(httpurl,this.model,method).then((res)=>{
if(res.success){
that.$message.success(res.message);
that.$emit('ok');
}else{
that.$message.warning(res.message);
}
}).finally(() => {
that.confirmLoading = false;
})
}
})
},
}
}
</script>

+ 84
- 0
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hotelcouponlog/vue/modules/HotelCouponLogModal.Style#Drawer.vue View File

@ -0,0 +1,84 @@
<template>
<a-drawer
:title="title"
:width="width"
placement="right"
:closable="false"
@close="close"
destroyOnClose
:visible="visible">
<hotel-coupon-log-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></hotel-coupon-log-form>
<div class="drawer-footer">
<a-button @click="handleCancel" style="margin-bottom: 0;">关闭</a-button>
<a-button v-if="!disableSubmit" @click="handleOk" type="primary" style="margin-bottom: 0;">提交</a-button>
</div>
</a-drawer>
</template>
<script>
import HotelCouponLogForm from './HotelCouponLogForm'
export default {
name: 'HotelCouponLogModal',
components: {
HotelCouponLogForm
},
data () {
return {
title:"操作",
width:800,
visible: false,
disableSubmit: false
}
},
methods: {
add () {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.add();
})
},
edit (record) {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.edit(record);
});
},
close () {
this.$emit('close');
this.visible = false;
},
submitCallback(){
this.$emit('ok');
this.visible = false;
},
handleOk () {
this.$refs.realForm.submitForm();
},
handleCancel () {
this.close()
}
}
}
</script>
<style lang="less" scoped>
/** Button按钮间距 */
.ant-btn {
margin-left: 30px;
margin-bottom: 30px;
float: right;
}
.drawer-footer{
position: absolute;
bottom: -8px;
width: 100%;
border-top: 1px solid #e8e8e8;
padding: 10px 16px;
text-align: right;
left: 0;
background: #fff;
border-radius: 0 0 2px 2px;
}
</style>

+ 60
- 0
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hotelcouponlog/vue/modules/HotelCouponLogModal.vue View File

@ -0,0 +1,60 @@
<template>
<j-modal
:title="title"
:width="width"
:visible="visible"
switchFullscreen
@ok="handleOk"
:okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
@cancel="handleCancel"
cancelText="关闭">
<hotel-coupon-log-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></hotel-coupon-log-form>
</j-modal>
</template>
<script>
import HotelCouponLogForm from './HotelCouponLogForm'
export default {
name: 'HotelCouponLogModal',
components: {
HotelCouponLogForm
},
data () {
return {
title:'',
width:800,
visible: false,
disableSubmit: false
}
},
methods: {
add () {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.add();
})
},
edit (record) {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.edit(record);
})
},
close () {
this.$emit('close');
this.visible = false;
},
handleOk () {
this.$refs.realForm.submitForm();
},
submitCallback(){
this.$emit('ok');
this.visible = false;
},
handleCancel () {
this.close()
}
}
}
</script>

+ 61
- 0
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hotelcouponlog/vue3/HotelCouponLog.api.ts View File

@ -0,0 +1,61 @@
import {defHttp} from '/@/utils/http/axios';
import {Modal} from 'ant-design-vue';
enum Api {
list = '/hotelcouponlog/hotelCouponLog/list',
save='/hotelcouponlog/hotelCouponLog/add',
edit='/hotelcouponlog/hotelCouponLog/edit',
deleteOne = '/hotelcouponlog/hotelCouponLog/delete',
deleteBatch = '/hotelcouponlog/hotelCouponLog/deleteBatch',
importExcel = '/hotelcouponlog/hotelCouponLog/importExcel',
exportXls = '/hotelcouponlog/hotelCouponLog/exportXls',
}
/**
* api
* @param params
*/
export const getExportUrl = Api.exportXls;
/**
* api
*/
export const getImportUrl = Api.importExcel;
/**
*
* @param params
*/
export const list = (params) =>
defHttp.get({url: Api.list, params});
/**
*
*/
export const deleteOne = (params,handleSuccess) => {
return defHttp.delete({url: Api.deleteOne, params}, {joinParamsToUrl: true}).then(() => {
handleSuccess();
});
}
/**
*
* @param params
*/
export const batchDelete = (params, handleSuccess) => {
Modal.confirm({
title: '确认删除',
content: '是否删除选中数据',
okText: '确认',
cancelText: '取消',
onOk: () => {
return defHttp.delete({url: Api.deleteBatch, data: params}, {joinParamsToUrl: true}).then(() => {
handleSuccess();
});
}
});
}
/**
*
* @param params
*/
export const saveOrUpdate = (params, isUpdate) => {
let url = isUpdate ? Api.edit : Api.save;
return defHttp.post({url: url, params});
}

+ 135
- 0
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hotelcouponlog/vue3/HotelCouponLog.data.ts View File

@ -0,0 +1,135 @@
import {BasicColumn} from '/@/components/Table';
import {FormSchema} from '/@/components/Table';
import { rules} from '/@/utils/helper/validator';
import { render } from '/@/utils/common/renderUtils';
//列表数据
export const columns: BasicColumn[] = [
{
title: '优惠券编号',
align:"center",
dataIndex: 'couponId'
},
{
title: '用户编号',
align:"center",
dataIndex: 'userId'
},
{
title: '优惠券名',
align:"center",
dataIndex: 'couponName'
},
{
title: '图片',
align:"center",
dataIndex: 'pic',
customRender:render.renderAvatar,
},
{
title: '券额',
align:"center",
dataIndex: 'price'
},
{
title: '满足多少金额',
align:"center",
dataIndex: 'conditionPrice'
},
{
title: '结束时间',
align:"center",
dataIndex: 'endTime'
},
{
title: '类型 0指定时间 1单次使用',
align:"center",
dataIndex: 'type_dictText'
},
{
title: '状态 0未使用 1已使用',
align:"center",
dataIndex: 'status_dictText'
},
{
title: '是否删除',
align:"center",
dataIndex: 'delFlag_dictText'
},
];
//查询数据
export const searchFormSchema: FormSchema[] = [
];
//表单数据
export const formSchema: FormSchema[] = [
{
label: '优惠券编号',
field: 'couponId',
component: 'Input',
},
{
label: '用户编号',
field: 'userId',
component: 'Input',
},
{
label: '优惠券名',
field: 'couponName',
component: 'Input',
},
{
label: '图片',
field: 'pic',
component: 'JImageUpload',
componentProps:{
},
},
{
label: '券额',
field: 'price',
component: 'InputNumber',
},
{
label: '满足多少金额',
field: 'conditionPrice',
component: 'InputNumber',
},
{
label: '结束时间',
field: 'endTime',
component: 'Input',
},
{
label: '类型 0指定时间 1单次使用',
field: 'type',
component: 'JDictSelectTag',
componentProps:{
dictCode:"coupon_type"
},
},
{
label: '状态 0未使用 1已使用',
field: 'status',
component: 'JDictSelectTag',
componentProps:{
dictCode:"coupon_log_status"
},
dynamicRules: ({model,schema}) => {
return [
{ required: true, message: '请输入状态 0未使用 1已使用!'},
];
},
},
{
label: '是否删除',
field: 'delFlag',
component: 'JDictSelectTag',
componentProps:{
dictCode:"is_delete"
},
dynamicRules: ({model,schema}) => {
return [
{ required: true, message: '请输入是否删除!'},
];
},
},
];

+ 162
- 0
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hotelcouponlog/vue3/HotelCouponLogList.vue View File

@ -0,0 +1,162 @@
<template>
<div>
<!--引用表格-->
<BasicTable @register="registerTable" :rowSelection="rowSelection">
<!--插槽:table标题-->
<template #tableTitle>
<a-button type="primary" @click="handleAdd" preIcon="ant-design:plus-outlined"> 新增</a-button>
<a-button type="primary" preIcon="ant-design:export-outlined" @click="onExportXls"> 导出</a-button>
<j-upload-button type="primary" preIcon="ant-design:import-outlined" @click="onImportXls">导入</j-upload-button>
<a-dropdown v-if="checkedKeys.length > 0">
<template #overlay>
<a-menu>
<a-menu-item key="1" @click="batchHandleDelete">
<Icon icon="ant-design:delete-outlined"></Icon>
删除
</a-menu-item>
</a-menu>
</template>
<a-button>批量操作
<Icon icon="mdi:chevron-down"></Icon>
</a-button>
</a-dropdown>
</template>
<!--操作栏-->
<template #action="{ record }">
<TableAction :actions="getTableAction(record)" :dropDownActions="getDropDownAction(record)"/>
</template>
<!--字段回显插槽-->
<template #htmlSlot="{text}">
<div v-html="text"></div>
</template>
<template #fileSlot="{text}">
<span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
<a-button v-else :ghost="true" type="primary" preIcon="ant-design:download-outlined" size="small" @click="downloadFile(text)">下载</a-button>
</template>
</BasicTable>
<!-- 表单区域 -->
<HotelCouponLogModal @register="registerModal" @success="handleSuccess"></HotelCouponLogModal>
</div>
</template>
<script lang="ts" name="hotelcouponlog-hotelCouponLog" setup>
import {ref, computed, unref} from 'vue';
import {BasicTable, useTable, TableAction} from '/@/components/Table';
import {useModal} from '/@/components/Modal';
import { useListPage } from '/@/hooks/system/useListPage'
import HotelCouponLogModal from './components/HotelCouponLogModal.vue'
import {columns, searchFormSchema} from './hotelCouponLog.data';
import {list, deleteOne, batchDelete, getImportUrl,getExportUrl} from './hotelCouponLog.api';
const checkedKeys = ref<Array<string | number>>([]);
//model
const [registerModal, {openModal}] = useModal();
//table
const { prefixCls,tableContext,onExportXls,onImportXls } = useListPage({
tableProps:{
title: 'hotel_coupon_log',
api: list,
columns,
canResize:false,
formConfig: {
labelWidth: 120,
schemas: searchFormSchema,
autoSubmitOnEnter:true,
showAdvancedButton:true,
fieldMapToTime: [
],
},
actionColumn: {
width: 120,
},
},
exportConfig: {
name:"hotel_coupon_log",
url: getExportUrl,
},
importConfig: {
url: getImportUrl
},
})
const [registerTable, {reload},{ rowSelection, selectedRowKeys }] = tableContext
/**
* 新增事件
*/
function handleAdd() {
openModal(true, {
isUpdate: false,
showFooter: true,
});
}
/**
* 编辑事件
*/
function handleEdit(record: Recordable) {
openModal(true, {
record,
isUpdate: true,
showFooter: true,
});
}
/**
* 详情
*/
function handleDetail(record: Recordable) {
openModal(true, {
record,
isUpdate: true,
showFooter: false,
});
}
/**
* 删除事件
*/
async function handleDelete(record) {
await deleteOne({id: record.id}, reload);
}
/**
* 批量删除事件
*/
async function batchHandleDelete() {
await batchDelete({ids: checkedKeys.value}, reload);
}
/**
* 成功回调
*/
function handleSuccess() {
reload();
}
/**
* 操作栏
*/
function getTableAction(record){
return [
{
label: '编辑',
onClick: handleEdit.bind(null, record),
}
]
}
/**
* 下拉操作栏
*/
function getDropDownAction(record){
return [
{
label: '详情',
onClick: handleDetail.bind(null, record),
}, {
label: '删除',
popConfirm: {
title: '是否确认删除',
confirm: handleDelete.bind(null, record),
}
}
]
}
</script>
<style scoped>
</style>

+ 58
- 0
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hotelcouponlog/vue3/components/HotelCouponLogModal.vue View File

@ -0,0 +1,58 @@
<template>
<BasicModal v-bind="$attrs" @register="registerModal" :title="title" @ok="handleSubmit">
<BasicForm @register="registerForm"/>
</BasicModal>
</template>
<script lang="ts" setup>
import {ref, computed, unref} from 'vue';
import {BasicModal, useModalInner} from '/@/components/Modal';
import {BasicForm, useForm} from '/@/components/Form/index';
import {formSchema} from '../hotelCouponLog.data';
import {saveOrUpdate} from '../hotelCouponLog.api';
// Emits
const emit = defineEmits(['register','success']);
const isUpdate = ref(true);
//
const [registerForm, {setProps,resetFields, setFieldsValue, validate}] = useForm({
labelWidth: 150,
schemas: formSchema,
showActionButtonGroup: false,
});
//
const [registerModal, {setModalProps, closeModal}] = useModalInner(async (data) => {
//
await resetFields();
setModalProps({confirmLoading: false,showCancelBtn:!!data?.showFooter,showOkBtn:!!data?.showFooter});
isUpdate.value = !!data?.isUpdate;
if (unref(isUpdate)) {
//
await setFieldsValue({
...data.record,
});
}
//
setProps({ disabled: !data?.showFooter })
});
//
const title = computed(() => (!unref(isUpdate) ? '新增' : '编辑'));
//
async function handleSubmit(v) {
try {
let values = await validate();
setModalProps({confirmLoading: true});
//
await saveOrUpdate(values, isUpdate.value);
//
closeModal();
//
emit('success');
} finally {
setModalProps({confirmLoading: false});
}
}
</script>
<style lang="less" scoped>
</style>

+ 220
- 0
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hotelorder/controller/HotelOrderController.java View File

@ -1,5 +1,6 @@
package org.jeecg.modules.hotelorder.controller;
import java.math.BigDecimal;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
@ -7,12 +8,22 @@ import java.util.stream.Collectors;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.net.URLDecoder;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.exception.JeecgBootException;
import org.jeecg.common.system.query.QueryGenerator;
import org.jeecg.common.util.oConvertUtils;
import org.jeecg.modules.hotelbalancelog.entity.HotelBalanceLog;
import org.jeecg.modules.hotelbalancelog.service.IHotelBalanceLogService;
import org.jeecg.modules.hotelconf.service.IHotelConfService;
import org.jeecg.modules.hotelleaselog.entity.HotelLeaseLog;
import org.jeecg.modules.hotelleaselog.service.IHotelLeaseLogService;
import org.jeecg.modules.hotelmemberaccount.entity.HotelMemberAccount;
import org.jeecg.modules.hotelmemberaccount.service.IHotelMemberAccountService;
import org.jeecg.modules.hotelorder.entity.HotelOrder;
import org.jeecg.modules.hotelorder.req.DamageAuditReq;
import org.jeecg.modules.hotelorder.service.IHotelOrderService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
@ -20,6 +31,8 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import lombok.extern.slf4j.Slf4j;
import org.jeecg.modules.hotelshop.entity.HotelShop;
import org.jeecg.modules.hotelshop.service.IHotelShopService;
import org.jeecgframework.poi.excel.ExcelImportUtil;
import org.jeecgframework.poi.excel.def.NormalExcelConstants;
import org.jeecgframework.poi.excel.entity.ExportParams;
@ -27,6 +40,7 @@ import org.jeecgframework.poi.excel.entity.ImportParams;
import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
import org.jeecg.common.system.base.controller.JeecgController;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.multipart.MultipartHttpServletRequest;
@ -49,6 +63,16 @@ import org.jeecg.common.aspect.annotation.AutoLog;
public class HotelOrderController extends JeecgController<HotelOrder, IHotelOrderService> {
@Autowired
private IHotelOrderService hotelOrderService;
@Resource
private IHotelShopService hotelShopService;
@Resource
private IHotelMemberAccountService hotelMemberAccountService;
@Resource
private IHotelConfService hotelConfService;
@Resource
private IHotelBalanceLogService hotelBalanceLogService;
@Resource
private IHotelLeaseLogService hotelLeaseLogService;
/**
* 分页列表查询
@ -71,6 +95,75 @@ public class HotelOrderController extends JeecgController<HotelOrder, IHotelOrde
IPage<HotelOrder> pageList = hotelOrderService.page(page, queryWrapper);
return Result.OK(pageList);
}
/**
* 水洗分页列表查询
*
* @param hotelOrder
* @param pageNo
* @param pageSize
* @param req
* @return
*/
//@AutoLog(value = "hotel_order-分页列表查询")
@ApiOperation(value="水洗分页列表查询", notes="水洗分页列表查询")
@GetMapping(value = "/wash/list")
public Result<IPage<HotelOrder>> queryPageWashList(HotelOrder hotelOrder,
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
HttpServletRequest req) {
QueryWrapper<HotelOrder> queryWrapper = QueryGenerator.initQueryWrapper(hotelOrder, req.getParameterMap());
queryWrapper.eq("type",1);
Page<HotelOrder> page = new Page<HotelOrder>(pageNo, pageSize);
IPage<HotelOrder> pageList = hotelOrderService.page(page, queryWrapper);
return Result.OK(pageList);
}
/**
* 换货分页列表查询
*
* @param hotelOrder
* @param pageNo
* @param pageSize
* @param req
* @return
*/
//@AutoLog(value = "hotel_order-分页列表查询")
@ApiOperation(value="换货分页列表查询", notes="换货分页列表查询")
@GetMapping(value = "/replace/list")
public Result<IPage<HotelOrder>> queryPageReplaceList(HotelOrder hotelOrder,
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
HttpServletRequest req) {
QueryWrapper<HotelOrder> queryWrapper = QueryGenerator.initQueryWrapper(hotelOrder, req.getParameterMap());
queryWrapper.eq("type",2);
Page<HotelOrder> page = new Page<HotelOrder>(pageNo, pageSize);
IPage<HotelOrder> pageList = hotelOrderService.page(page, queryWrapper);
return Result.OK(pageList);
}
/**
* 退货分页列表查询
*
* @param hotelOrder
* @param pageNo
* @param pageSize
* @param req
* @return
*/
//@AutoLog(value = "hotel_order-分页列表查询")
@ApiOperation(value="退货分页列表查询", notes="退货分页列表查询")
@GetMapping(value = "/refund/list")
public Result<IPage<HotelOrder>> queryPageRefundList(HotelOrder hotelOrder,
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
HttpServletRequest req) {
QueryWrapper<HotelOrder> queryWrapper = QueryGenerator.initQueryWrapper(hotelOrder, req.getParameterMap());
queryWrapper.eq("type",3);
Page<HotelOrder> page = new Page<HotelOrder>(pageNo, pageSize);
IPage<HotelOrder> pageList = hotelOrderService.page(page, queryWrapper);
return Result.OK(pageList);
}
/**
* 添加
@ -168,4 +261,131 @@ public class HotelOrderController extends JeecgController<HotelOrder, IHotelOrde
return super.importExcel(request, response, HotelOrder.class);
}
/**
* 水洗破损上报审核
*
* @param hotelOrder3
* @return
*/
@Transactional(rollbackFor = Exception.class)
@AutoLog(value = "水洗破损上报审核")
@ApiOperation(value="水洗破损上报审核", notes="水洗破损上报审核")
@RequestMapping(value = "/damage/audit", method = {RequestMethod.PUT,RequestMethod.POST})
public Result<String> damageAudit(@RequestBody HotelOrder hotelOrder3) {
HotelOrder hotelOrder = new HotelOrder();
hotelOrder.setId(hotelOrder3.getId());
HotelLeaseLog hotelLeaseLog = hotelLeaseLogService.lambdaQuery()
.eq(HotelLeaseLog::getDelFlag, 0)
.eq(HotelLeaseLog::getId, hotelOrder3.getLeaseId())
.one();
HotelShop hotelShop = hotelShopService.lambdaQuery()
.eq(HotelShop::getDelFlag, 0)
.eq(HotelShop::getUserId, hotelOrder3.getShopId())
.one();
HotelLeaseLog hotelLeaseLog2 = new HotelLeaseLog();
if(hotelOrder3.getAudit() == 0){
if(hotelOrder3.getNum() > hotelOrder3.getRefundNum()){
hotelOrder.setStatus(6);
hotelLeaseLog2.setUserId(hotelLeaseLog.getUserId());
hotelLeaseLog2.setShopId(hotelLeaseLog.getShopId());
hotelLeaseLog2.setOrderId(hotelLeaseLog.getOrderId());
hotelLeaseLog2.setGoodsId(hotelLeaseLog.getGoodsId());
hotelLeaseLog2.setSkuId(hotelLeaseLog.getSkuId());
hotelLeaseLog2.setGoodsName(hotelLeaseLog.getGoodsName());
hotelLeaseLog2.setGoodsPic(hotelLeaseLog.getGoodsPic());
hotelLeaseLog2.setSku(hotelLeaseLog.getSku());
hotelLeaseLog2.setStatus(1);
hotelLeaseLog2.setNum(hotelOrder3.getRefundNum());
hotelLeaseLog2.setPrice(hotelLeaseLog.getPrice());
hotelLeaseLog2.setCategoryId(hotelLeaseLog.getCategoryId());
hotelLeaseLogService.save(hotelLeaseLog2);
HotelLeaseLog hotelLeaseLog1 = new HotelLeaseLog();
hotelLeaseLog1.setId(hotelLeaseLog.getId());
hotelLeaseLog1.setNum(hotelLeaseLog.getNum()-hotelOrder3.getRefundNum());
hotelLeaseLogService.updateById(hotelLeaseLog1);
}else{
HotelMemberAccount hotelMemberAccount = hotelMemberAccountService.lambdaQuery()
.eq(HotelMemberAccount::getDelFlag, 0)
.eq(HotelMemberAccount::getUserId, hotelShop.getUserId())
.one();
BigDecimal platformServiceRate = new BigDecimal(hotelConfService.getConf("platformServiceRate"));
BigDecimal platformServicePrice = hotelOrder.getOrderPay().multiply(platformServiceRate);
BigDecimal shopPrice = hotelOrder.getOrderPay().multiply(hotelShop.getRate());
BigDecimal price = hotelMemberAccount.getShopBalance().add(shopPrice);
HotelMemberAccount hotelMemberAccount1 = new HotelMemberAccount();
hotelMemberAccount1.setId(hotelMemberAccount.getId());
hotelMemberAccount1.setShopBalance(price);
hotelMemberAccountService.updateById(hotelMemberAccount1);
HotelBalanceLog hotelBalanceLog = new HotelBalanceLog();
hotelBalanceLog.setUserId(hotelShop.getUserId());
hotelBalanceLog.setBalance(shopPrice);
hotelBalanceLog.setUserBalance(hotelMemberAccount.getShopBalance());
hotelBalanceLog.setType(2);
hotelBalanceLog.setTitle("佣金到账");
hotelBalanceLog.setPayType(1);
hotelBalanceLog.setPlatformServicePrice(platformServicePrice);
hotelBalanceLog.setOrderId(hotelOrder3.getId());
hotelBalanceLogService.save(hotelBalanceLog);
HotelLeaseLog hotelLeaseLog1 = new HotelLeaseLog();
hotelLeaseLog1.setId(hotelLeaseLog.getId());
hotelLeaseLog1.setStatus(1);
hotelLeaseLogService.updateById(hotelLeaseLog1);
hotelOrder.setStatus(15);
}
HotelOrder hotelOrder1 = new HotelOrder();
hotelOrder1.setReason(hotelOrder3.getReason());
hotelOrder1.setRefundNum(hotelOrder3.getRefundNum());
hotelOrder1.setReasonPrice(hotelOrder3.getReasonPrice());
hotelOrder1.setType(2);
hotelOrder1.setReasonInfo(hotelOrder3.getReasonInfo());
hotelOrder1.setReasonPic(hotelOrder3.getReasonPic());
hotelOrder1.setReasonPhone(hotelOrder3.getReasonPhone());
hotelOrder1.setUserId(hotelOrder3.getUserId());
hotelOrder1.setShopId(hotelLeaseLog.getShopId());
hotelOrder1.setGoodsId(hotelLeaseLog.getGoodsId());
hotelOrder1.setGoodsName(hotelLeaseLog.getGoodsName());
hotelOrder1.setSkuId(hotelLeaseLog.getSkuId());
hotelOrder1.setSku(hotelLeaseLog.getSku());
hotelOrder1.setPic(hotelLeaseLog.getGoodsPic());
hotelOrder1.setStatus(7);
hotelOrder1.setLeaseId(hotelOrder3.getNum() > hotelOrder3.getRefundNum()?hotelLeaseLog2.getId():hotelLeaseLog.getId());
hotelOrder1.setUserName(hotelShop.getUserName());
hotelOrder1.setUserPhone(hotelShop.getPhone());
hotelOrder1.setUserAddress(hotelShop.getAddress());
hotelOrder1.setShopId(hotelShop.getUserId());
hotelOrderService.save(hotelOrder1);
}else{
hotelOrder.setStatus(5);
}
hotelOrderService.updateById(hotelOrder);
return Result.OK("编辑成功!");
}
}

+ 3
- 1
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hotelorder/entity/HotelOrder.java View File

@ -111,7 +111,7 @@ public class HotelOrder implements Serializable {
@ApiModelProperty(value = "状态 \n" +
"租赁订单:0待支付 1待发货 2待收货 \n" +
"水洗订单:3待支付 4水洗店接单 5水洗店检查\n" +
"6开始清洗 \n" +
"6开始清洗 16 待平台审核\n" +
"换货订单:7待回收 8待发货 9平台待收货\n" +
"10平台检查损失待用户支付\n" +
"退货订单:11待回收 12待发货 13平台待收货\n" +
@ -175,5 +175,7 @@ public class HotelOrder implements Serializable {
private String LeaseId;
@TableField(exist = false)
private List<HotelOrderFlow> hotelOrderFlows;
@TableField(exist = false)
private Integer audit;
}

+ 14
- 0
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hotelorder/req/DamageAuditReq.java View File

@ -0,0 +1,14 @@
package org.jeecg.modules.hotelorder.req;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.jeecg.modules.hotelorder.entity.HotelOrder;
@Data
public class DamageAuditReq {
/**审核 0通过 1不通过*/
private Integer audit;
private HotelOrder hotelOrder;
}

+ 54
- 0
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hotelshop/controller/HotelShopController.java View File

@ -22,6 +22,7 @@ import org.jeecg.modules.hanHaiMember.service.IHanHaiMemberService;
import org.jeecg.modules.hotelmemberaccount.entity.HotelMemberAccount;
import org.jeecg.modules.hotelmemberaccount.service.IHotelMemberAccountService;
import org.jeecg.modules.hotelshop.entity.HotelShop;
import org.jeecg.modules.hotelshop.req.AuditShopReq;
import org.jeecg.modules.hotelshop.service.IHotelShopService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
@ -29,6 +30,8 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import lombok.extern.slf4j.Slf4j;
import org.jeecg.modules.hotelshoplog.entity.HotelShopLog;
import org.jeecg.modules.hotelshoplog.service.IHotelShopLogService;
import org.jeecgframework.poi.excel.ExcelImportUtil;
import org.jeecgframework.poi.excel.def.NormalExcelConstants;
import org.jeecgframework.poi.excel.entity.ExportParams;
@ -62,6 +65,8 @@ public class HotelShopController extends JeecgController<HotelShop, IHotelShopSe
private IHanHaiMemberService hanHaiMemberService;
@Resource
private IHotelMemberAccountService hotelMemberAccountService;
@Resource
private IHotelShopLogService hotelShopLogService;
/**
* 分页列表查询
@ -208,4 +213,53 @@ public class HotelShopController extends JeecgController<HotelShop, IHotelShopSe
return super.importExcel(request, response, HotelShop.class);
}
/**
* 审核
*
* @param
* @return
*/
@AutoLog(value = "hotel_shop-审核")
@RequestMapping(value = "/audit", method = {RequestMethod.POST})
public Result<String> audit(@RequestBody AuditShopReq auditShopReq) {
HotelShop hotelShop = hotelShopService.lambdaQuery()
.eq(HotelShop::getId, auditShopReq.getId())
.one();
HanHaiMember haiMember = hanHaiMemberService.lambdaQuery()
.eq(HanHaiMember::getId, hotelShop.getUserId())
.one();
HotelMemberAccount hotelMemberAccount1 = hotelMemberAccountService.lambdaQuery()
.eq(HotelMemberAccount::getDelFlag, 0)
.eq(HotelMemberAccount::getUserId, haiMember.getId())
.one();
HotelShop hotelShop1 = new HotelShop();
hotelShop1.setId(hotelShop.getId());
if(auditShopReq.getAudit() == 0){
String uid = IdWorker.getIdStr();
hotelShop1.setUserId(uid);
hotelShop1.setNewId(uid);
hotelShop1.setStatus(1);
hanHaiMemberService.updateUserId(haiMember.getId(),uid);
HotelMemberAccount hotelMemberAccount = new HotelMemberAccount();
hotelMemberAccount.setId(hotelMemberAccount1.getId());
hotelMemberAccount.setUserId(uid);
hotelMemberAccountService.updateById(hotelMemberAccount);
HotelShopLog hotelShopLog = new HotelShopLog();
hotelShopLog.setOldId(haiMember.getId());
hotelShopLog.setNewId(uid);
hotelShopLog.setShopId(hotelShop.getId());
hotelShopLogService.save(hotelShopLog);
}else{
hotelShop1.setStatus(2);
}
hotelShopService.updateById(hotelShop1);
return Result.OK("成功!");
}
}

+ 4
- 0
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hotelshop/entity/HotelShop.java View File

@ -99,4 +99,8 @@ public class HotelShop implements Serializable {
private BigDecimal rate;
@TableField(exist = false)
private String password;
/**酒店用户id*/
private String oldId;
/**水洗店用户id*/
private String newId;
}

+ 13
- 0
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hotelshop/req/AuditShopReq.java View File

@ -0,0 +1,13 @@
package org.jeecg.modules.hotelshop.req;
import lombok.Data;
@Data
public class AuditShopReq {
/**店铺id*/
private String id;
/**0审核通过 1审核不通过*/
private Integer audit;
}

+ 171
- 0
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hotelshoplog/controller/HotelShopLogController.java View File

@ -0,0 +1,171 @@
package org.jeecg.modules.hotelshoplog.controller;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.net.URLDecoder;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.system.query.QueryGenerator;
import org.jeecg.common.util.oConvertUtils;
import org.jeecg.modules.hotelshoplog.entity.HotelShopLog;
import org.jeecg.modules.hotelshoplog.service.IHotelShopLogService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import lombok.extern.slf4j.Slf4j;
import org.jeecgframework.poi.excel.ExcelImportUtil;
import org.jeecgframework.poi.excel.def.NormalExcelConstants;
import org.jeecgframework.poi.excel.entity.ExportParams;
import org.jeecgframework.poi.excel.entity.ImportParams;
import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
import org.jeecg.common.system.base.controller.JeecgController;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.multipart.MultipartHttpServletRequest;
import org.springframework.web.servlet.ModelAndView;
import com.alibaba.fastjson.JSON;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.jeecg.common.aspect.annotation.AutoLog;
/**
* @Description: hotel_shop_log
* @Author: jeecg-boot
* @Date: 2024-10-12
* @Version: V1.0
*/
@Api(tags="hotel_shop_log")
@RestController
@RequestMapping("/hotelshoplog/hotelShopLog")
@Slf4j
public class HotelShopLogController extends JeecgController<HotelShopLog, IHotelShopLogService> {
@Autowired
private IHotelShopLogService hotelShopLogService;
/**
* 分页列表查询
*
* @param hotelShopLog
* @param pageNo
* @param pageSize
* @param req
* @return
*/
//@AutoLog(value = "hotel_shop_log-分页列表查询")
@ApiOperation(value="hotel_shop_log-分页列表查询", notes="hotel_shop_log-分页列表查询")
@GetMapping(value = "/list")
public Result<IPage<HotelShopLog>> queryPageList(HotelShopLog hotelShopLog,
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
HttpServletRequest req) {
QueryWrapper<HotelShopLog> queryWrapper = QueryGenerator.initQueryWrapper(hotelShopLog, req.getParameterMap());
Page<HotelShopLog> page = new Page<HotelShopLog>(pageNo, pageSize);
IPage<HotelShopLog> pageList = hotelShopLogService.page(page, queryWrapper);
return Result.OK(pageList);
}
/**
* 添加
*
* @param hotelShopLog
* @return
*/
@AutoLog(value = "hotel_shop_log-添加")
@ApiOperation(value="hotel_shop_log-添加", notes="hotel_shop_log-添加")
@PostMapping(value = "/add")
public Result<String> add(@RequestBody HotelShopLog hotelShopLog) {
hotelShopLogService.save(hotelShopLog);
return Result.OK("添加成功!");
}
/**
* 编辑
*
* @param hotelShopLog
* @return
*/
@AutoLog(value = "hotel_shop_log-编辑")
@ApiOperation(value="hotel_shop_log-编辑", notes="hotel_shop_log-编辑")
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
public Result<String> edit(@RequestBody HotelShopLog hotelShopLog) {
hotelShopLogService.updateById(hotelShopLog);
return Result.OK("编辑成功!");
}
/**
* 通过id删除
*
* @param id
* @return
*/
@AutoLog(value = "hotel_shop_log-通过id删除")
@ApiOperation(value="hotel_shop_log-通过id删除", notes="hotel_shop_log-通过id删除")
@DeleteMapping(value = "/delete")
public Result<String> delete(@RequestParam(name="id",required=true) String id) {
hotelShopLogService.removeById(id);
return Result.OK("删除成功!");
}
/**
* 批量删除
*
* @param ids
* @return
*/
@AutoLog(value = "hotel_shop_log-批量删除")
@ApiOperation(value="hotel_shop_log-批量删除", notes="hotel_shop_log-批量删除")
@DeleteMapping(value = "/deleteBatch")
public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
this.hotelShopLogService.removeByIds(Arrays.asList(ids.split(",")));
return Result.OK("批量删除成功!");
}
/**
* 通过id查询
*
* @param id
* @return
*/
//@AutoLog(value = "hotel_shop_log-通过id查询")
@ApiOperation(value="hotel_shop_log-通过id查询", notes="hotel_shop_log-通过id查询")
@GetMapping(value = "/queryById")
public Result<HotelShopLog> queryById(@RequestParam(name="id",required=true) String id) {
HotelShopLog hotelShopLog = hotelShopLogService.getById(id);
if(hotelShopLog==null) {
return Result.error("未找到对应数据");
}
return Result.OK(hotelShopLog);
}
/**
* 导出excel
*
* @param request
* @param hotelShopLog
*/
@RequestMapping(value = "/exportXls")
public ModelAndView exportXls(HttpServletRequest request, HotelShopLog hotelShopLog) {
return super.exportXls(request, hotelShopLog, HotelShopLog.class, "hotel_shop_log");
}
/**
* 通过excel导入数据
*
* @param request
* @param response
* @return
*/
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
return super.importExcel(request, response, HotelShopLog.class);
}
}

+ 65
- 0
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hotelshoplog/entity/HotelShopLog.java View File

@ -0,0 +1,65 @@
package org.jeecg.modules.hotelshoplog.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: hotel_shop_log
* @Author: jeecg-boot
* @Date: 2024-10-12
* @Version: V1.0
*/
@Data
@TableName("hotel_shop_log")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="hotel_shop_log对象", description="hotel_shop_log")
public class HotelShopLog implements Serializable {
private static final long serialVersionUID = 1L;
/**id*/
@TableId(type = IdType.ASSIGN_ID)
@ApiModelProperty(value = "id")
private java.lang.String id;
/**老用户id*/
@Excel(name = "老用户id", width = 15)
@ApiModelProperty(value = "老用户id")
private java.lang.String oldId;
/**新用户Id*/
@Excel(name = "新用户Id", width = 15)
@ApiModelProperty(value = "新用户Id")
private java.lang.String newId;
/**水洗店id*/
@Excel(name = "水洗店id", width = 15)
@ApiModelProperty(value = "水洗店id")
private java.lang.String shopId;
/**是否删除*/
@Excel(name = "是否删除", width = 15, dicCode = "is_delete")
@Dict(dicCode = "is_delete")
@ApiModelProperty(value = "是否删除")
private java.lang.Integer delFlag;
/**createTime*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "createTime")
private java.util.Date createTime;
/**updateTime*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "updateTime")
private java.util.Date updateTime;
}

+ 17
- 0
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hotelshoplog/mapper/HotelShopLogMapper.java View File

@ -0,0 +1,17 @@
package org.jeecg.modules.hotelshoplog.mapper;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import org.jeecg.modules.hotelshoplog.entity.HotelShopLog;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* @Description: hotel_shop_log
* @Author: jeecg-boot
* @Date: 2024-10-12
* @Version: V1.0
*/
public interface HotelShopLogMapper extends BaseMapper<HotelShopLog> {
}

+ 5
- 0
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hotelshoplog/mapper/xml/HotelShopLogMapper.xml View File

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="org.jeecg.modules.hotelshoplog.mapper.HotelShopLogMapper">
</mapper>

+ 14
- 0
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hotelshoplog/service/IHotelShopLogService.java View File

@ -0,0 +1,14 @@
package org.jeecg.modules.hotelshoplog.service;
import org.jeecg.modules.hotelshoplog.entity.HotelShopLog;
import com.baomidou.mybatisplus.extension.service.IService;
/**
* @Description: hotel_shop_log
* @Author: jeecg-boot
* @Date: 2024-10-12
* @Version: V1.0
*/
public interface IHotelShopLogService extends IService<HotelShopLog> {
}

+ 19
- 0
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hotelshoplog/service/impl/HotelShopLogServiceImpl.java View File

@ -0,0 +1,19 @@
package org.jeecg.modules.hotelshoplog.service.impl;
import org.jeecg.modules.hotelshoplog.entity.HotelShopLog;
import org.jeecg.modules.hotelshoplog.mapper.HotelShopLogMapper;
import org.jeecg.modules.hotelshoplog.service.IHotelShopLogService;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
/**
* @Description: hotel_shop_log
* @Author: jeecg-boot
* @Date: 2024-10-12
* @Version: V1.0
*/
@Service
public class HotelShopLogServiceImpl extends ServiceImpl<HotelShopLogMapper, HotelShopLog> implements IHotelShopLogService {
}

+ 190
- 0
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hotelshoplog/vue/HotelShopLogList.vue View File

@ -0,0 +1,190 @@
<template>
<a-card :bordered="false">
<!-- 查询区域 -->
<div class="table-page-search-wrapper">
<a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24">
</a-row>
</a-form>
</div>
<!-- 查询区域-END -->
<!-- 操作按钮区域 -->
<div class="table-operator">
<a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
<a-button type="primary" icon="download" @click="handleExportXls('hotel_shop_log')">导出</a-button>
<a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
<a-button type="primary" icon="import">导入</a-button>
</a-upload>
<!-- 高级查询区域 -->
<j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query>
<a-dropdown v-if="selectedRowKeys.length > 0">
<a-menu slot="overlay">
<a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>
</a-menu>
<a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button>
</a-dropdown>
</div>
<!-- table区域-begin -->
<div>
<div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
<i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>
<a style="margin-left: 24px" @click="onClearSelected">清空</a>
</div>
<a-table
ref="table"
size="middle"
:scroll="{x:true}"
bordered
rowKey="id"
:columns="columns"
:dataSource="dataSource"
:pagination="ipagination"
:loading="loading"
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
class="j-table-force-nowrap"
@change="handleTableChange">
<template slot="htmlSlot" slot-scope="text">
<div v-html="text"></div>
</template>
<template slot="imgSlot" slot-scope="text,record">
<span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span>
<img v-else :src="getImgView(text)" :preview="record.id" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/>
</template>
<template slot="fileSlot" slot-scope="text">
<span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
<a-button
v-else
:ghost="true"
type="primary"
icon="download"
size="small"
@click="downloadFile(text)">
下载
</a-button>
</template>
<span slot="action" slot-scope="text, record">
<a @click="handleEdit(record)">编辑</a>
<a-divider type="vertical" />
<a-dropdown>
<a class="ant-dropdown-link">更多 <a-icon type="down" /></a>
<a-menu slot="overlay">
<a-menu-item>
<a @click="handleDetail(record)">详情</a>
</a-menu-item>
<a-menu-item>
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
<a>删除</a>
</a-popconfirm>
</a-menu-item>
</a-menu>
</a-dropdown>
</span>
</a-table>
</div>
<hotel-shop-log-modal ref="modalForm" @ok="modalFormOk"></hotel-shop-log-modal>
</a-card>
</template>
<script>
import '@/assets/less/TableExpand.less'
import { mixinDevice } from '@/utils/mixin'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import HotelShopLogModal from './modules/HotelShopLogModal'
import {filterMultiDictText} from '@/components/dict/JDictSelectUtil'
export default {
name: 'HotelShopLogList',
mixins:[JeecgListMixin, mixinDevice],
components: {
HotelShopLogModal
},
data () {
return {
description: 'hotel_shop_log管理页面',
//
columns: [
{
title: '#',
dataIndex: '',
key:'rowIndex',
width:60,
align:"center",
customRender:function (t,r,index) {
return parseInt(index)+1;
}
},
{
title:'老用户id',
align:"center",
dataIndex: 'oldId'
},
{
title:'新用户Id',
align:"center",
dataIndex: 'newId'
},
{
title:'水洗店id',
align:"center",
dataIndex: 'shopId'
},
{
title:'是否删除',
align:"center",
dataIndex: 'delFlag_dictText'
},
{
title: '操作',
dataIndex: 'action',
align:"center",
fixed:"right",
width:147,
scopedSlots: { customRender: 'action' }
}
],
url: {
list: "/hotelshoplog/hotelShopLog/list",
delete: "/hotelshoplog/hotelShopLog/delete",
deleteBatch: "/hotelshoplog/hotelShopLog/deleteBatch",
exportXlsUrl: "/hotelshoplog/hotelShopLog/exportXls",
importExcelUrl: "hotelshoplog/hotelShopLog/importExcel",
},
dictOptions:{},
superFieldList:[],
}
},
created() {
this.getSuperFieldList();
},
computed: {
importExcelUrl: function(){
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
},
},
methods: {
initDictConfig(){
},
getSuperFieldList(){
let fieldList=[];
fieldList.push({type:'string',value:'oldId',text:'老用户id',dictCode:''})
fieldList.push({type:'string',value:'newId',text:'新用户Id',dictCode:''})
fieldList.push({type:'string',value:'shopId',text:'水洗店id',dictCode:''})
fieldList.push({type:'int',value:'delFlag',text:'是否删除',dictCode:'is_delete'})
this.superFieldList = fieldList
}
}
}
</script>
<style scoped>
@import '~@assets/less/common.less';
</style>

+ 120
- 0
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hotelshoplog/vue/modules/HotelShopLogForm.vue View File

@ -0,0 +1,120 @@
<template>
<a-spin :spinning="confirmLoading">
<j-form-container :disabled="formDisabled">
<a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail">
<a-row>
<a-col :span="24">
<a-form-model-item label="老用户id" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="oldId">
<a-input v-model="model.oldId" placeholder="请输入老用户id" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="新用户Id" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="newId">
<a-input v-model="model.newId" placeholder="请输入新用户Id" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="水洗店id" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="shopId">
<a-input v-model="model.shopId" placeholder="请输入水洗店id" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="是否删除" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="delFlag">
<j-dict-select-tag type="radio" v-model="model.delFlag" dictCode="is_delete" placeholder="请选择是否删除" />
</a-form-model-item>
</a-col>
</a-row>
</a-form-model>
</j-form-container>
</a-spin>
</template>
<script>
import { httpAction, getAction } from '@/api/manage'
import { validateDuplicateValue } from '@/utils/util'
export default {
name: 'HotelShopLogForm',
components: {
},
props: {
//
disabled: {
type: Boolean,
default: false,
required: false
}
},
data () {
return {
model:{
delFlag:0,
},
labelCol: {
xs: { span: 24 },
sm: { span: 5 },
},
wrapperCol: {
xs: { span: 24 },
sm: { span: 16 },
},
confirmLoading: false,
validatorRules: {
},
url: {
add: "/hotelshoplog/hotelShopLog/add",
edit: "/hotelshoplog/hotelShopLog/edit",
queryById: "/hotelshoplog/hotelShopLog/queryById"
}
}
},
computed: {
formDisabled(){
return this.disabled
},
},
created () {
//model
this.modelDefault = JSON.parse(JSON.stringify(this.model));
},
methods: {
add () {
this.edit(this.modelDefault);
},
edit (record) {
this.model = Object.assign({}, record);
this.visible = true;
},
submitForm () {
const that = this;
//
this.$refs.form.validate(valid => {
if (valid) {
that.confirmLoading = true;
let httpurl = '';
let method = '';
if(!this.model.id){
httpurl+=this.url.add;
method = 'post';
}else{
httpurl+=this.url.edit;
method = 'put';
}
httpAction(httpurl,this.model,method).then((res)=>{
if(res.success){
that.$message.success(res.message);
that.$emit('ok');
}else{
that.$message.warning(res.message);
}
}).finally(() => {
that.confirmLoading = false;
})
}
})
},
}
}
</script>

+ 84
- 0
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hotelshoplog/vue/modules/HotelShopLogModal.Style#Drawer.vue View File

@ -0,0 +1,84 @@
<template>
<a-drawer
:title="title"
:width="width"
placement="right"
:closable="false"
@close="close"
destroyOnClose
:visible="visible">
<hotel-shop-log-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></hotel-shop-log-form>
<div class="drawer-footer">
<a-button @click="handleCancel" style="margin-bottom: 0;">关闭</a-button>
<a-button v-if="!disableSubmit" @click="handleOk" type="primary" style="margin-bottom: 0;">提交</a-button>
</div>
</a-drawer>
</template>
<script>
import HotelShopLogForm from './HotelShopLogForm'
export default {
name: 'HotelShopLogModal',
components: {
HotelShopLogForm
},
data () {
return {
title:"操作",
width:800,
visible: false,
disableSubmit: false
}
},
methods: {
add () {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.add();
})
},
edit (record) {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.edit(record);
});
},
close () {
this.$emit('close');
this.visible = false;
},
submitCallback(){
this.$emit('ok');
this.visible = false;
},
handleOk () {
this.$refs.realForm.submitForm();
},
handleCancel () {
this.close()
}
}
}
</script>
<style lang="less" scoped>
/** Button按钮间距 */
.ant-btn {
margin-left: 30px;
margin-bottom: 30px;
float: right;
}
.drawer-footer{
position: absolute;
bottom: -8px;
width: 100%;
border-top: 1px solid #e8e8e8;
padding: 10px 16px;
text-align: right;
left: 0;
background: #fff;
border-radius: 0 0 2px 2px;
}
</style>

+ 60
- 0
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hotelshoplog/vue/modules/HotelShopLogModal.vue View File

@ -0,0 +1,60 @@
<template>
<j-modal
:title="title"
:width="width"
:visible="visible"
switchFullscreen
@ok="handleOk"
:okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
@cancel="handleCancel"
cancelText="关闭">
<hotel-shop-log-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></hotel-shop-log-form>
</j-modal>
</template>
<script>
import HotelShopLogForm from './HotelShopLogForm'
export default {
name: 'HotelShopLogModal',
components: {
HotelShopLogForm
},
data () {
return {
title:'',
width:800,
visible: false,
disableSubmit: false
}
},
methods: {
add () {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.add();
})
},
edit (record) {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.edit(record);
})
},
close () {
this.$emit('close');
this.visible = false;
},
handleOk () {
this.$refs.realForm.submitForm();
},
submitCallback(){
this.$emit('ok');
this.visible = false;
},
handleCancel () {
this.close()
}
}
}
</script>

+ 61
- 0
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hotelshoplog/vue3/HotelShopLog.api.ts View File

@ -0,0 +1,61 @@
import {defHttp} from '/@/utils/http/axios';
import {Modal} from 'ant-design-vue';
enum Api {
list = '/hotelshoplog/hotelShopLog/list',
save='/hotelshoplog/hotelShopLog/add',
edit='/hotelshoplog/hotelShopLog/edit',
deleteOne = '/hotelshoplog/hotelShopLog/delete',
deleteBatch = '/hotelshoplog/hotelShopLog/deleteBatch',
importExcel = '/hotelshoplog/hotelShopLog/importExcel',
exportXls = '/hotelshoplog/hotelShopLog/exportXls',
}
/**
* api
* @param params
*/
export const getExportUrl = Api.exportXls;
/**
* api
*/
export const getImportUrl = Api.importExcel;
/**
*
* @param params
*/
export const list = (params) =>
defHttp.get({url: Api.list, params});
/**
*
*/
export const deleteOne = (params,handleSuccess) => {
return defHttp.delete({url: Api.deleteOne, params}, {joinParamsToUrl: true}).then(() => {
handleSuccess();
});
}
/**
*
* @param params
*/
export const batchDelete = (params, handleSuccess) => {
Modal.confirm({
title: '确认删除',
content: '是否删除选中数据',
okText: '确认',
cancelText: '取消',
onOk: () => {
return defHttp.delete({url: Api.deleteBatch, data: params}, {joinParamsToUrl: true}).then(() => {
handleSuccess();
});
}
});
}
/**
*
* @param params
*/
export const saveOrUpdate = (params, isUpdate) => {
let url = isUpdate ? Api.edit : Api.save;
return defHttp.post({url: url, params});
}

+ 56
- 0
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hotelshoplog/vue3/HotelShopLog.data.ts View File

@ -0,0 +1,56 @@
import {BasicColumn} from '/@/components/Table';
import {FormSchema} from '/@/components/Table';
import { rules} from '/@/utils/helper/validator';
import { render } from '/@/utils/common/renderUtils';
//列表数据
export const columns: BasicColumn[] = [
{
title: '老用户id',
align:"center",
dataIndex: 'oldId'
},
{
title: '新用户Id',
align:"center",
dataIndex: 'newId'
},
{
title: '水洗店id',
align:"center",
dataIndex: 'shopId'
},
{
title: '是否删除',
align:"center",
dataIndex: 'delFlag_dictText'
},
];
//查询数据
export const searchFormSchema: FormSchema[] = [
];
//表单数据
export const formSchema: FormSchema[] = [
{
label: '老用户id',
field: 'oldId',
component: 'Input',
},
{
label: '新用户Id',
field: 'newId',
component: 'Input',
},
{
label: '水洗店id',
field: 'shopId',
component: 'Input',
},
{
label: '是否删除',
field: 'delFlag',
component: 'JDictSelectTag',
componentProps:{
dictCode:"is_delete"
},
},
];

+ 162
- 0
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hotelshoplog/vue3/HotelShopLogList.vue View File

@ -0,0 +1,162 @@
<template>
<div>
<!--引用表格-->
<BasicTable @register="registerTable" :rowSelection="rowSelection">
<!--插槽:table标题-->
<template #tableTitle>
<a-button type="primary" @click="handleAdd" preIcon="ant-design:plus-outlined"> 新增</a-button>
<a-button type="primary" preIcon="ant-design:export-outlined" @click="onExportXls"> 导出</a-button>
<j-upload-button type="primary" preIcon="ant-design:import-outlined" @click="onImportXls">导入</j-upload-button>
<a-dropdown v-if="checkedKeys.length > 0">
<template #overlay>
<a-menu>
<a-menu-item key="1" @click="batchHandleDelete">
<Icon icon="ant-design:delete-outlined"></Icon>
删除
</a-menu-item>
</a-menu>
</template>
<a-button>批量操作
<Icon icon="mdi:chevron-down"></Icon>
</a-button>
</a-dropdown>
</template>
<!--操作栏-->
<template #action="{ record }">
<TableAction :actions="getTableAction(record)" :dropDownActions="getDropDownAction(record)"/>
</template>
<!--字段回显插槽-->
<template #htmlSlot="{text}">
<div v-html="text"></div>
</template>
<template #fileSlot="{text}">
<span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
<a-button v-else :ghost="true" type="primary" preIcon="ant-design:download-outlined" size="small" @click="downloadFile(text)">下载</a-button>
</template>
</BasicTable>
<!-- 表单区域 -->
<HotelShopLogModal @register="registerModal" @success="handleSuccess"></HotelShopLogModal>
</div>
</template>
<script lang="ts" name="hotelshoplog-hotelShopLog" setup>
import {ref, computed, unref} from 'vue';
import {BasicTable, useTable, TableAction} from '/@/components/Table';
import {useModal} from '/@/components/Modal';
import { useListPage } from '/@/hooks/system/useListPage'
import HotelShopLogModal from './components/HotelShopLogModal.vue'
import {columns, searchFormSchema} from './hotelShopLog.data';
import {list, deleteOne, batchDelete, getImportUrl,getExportUrl} from './hotelShopLog.api';
const checkedKeys = ref<Array<string | number>>([]);
//model
const [registerModal, {openModal}] = useModal();
//table
const { prefixCls,tableContext,onExportXls,onImportXls } = useListPage({
tableProps:{
title: 'hotel_shop_log',
api: list,
columns,
canResize:false,
formConfig: {
labelWidth: 120,
schemas: searchFormSchema,
autoSubmitOnEnter:true,
showAdvancedButton:true,
fieldMapToTime: [
],
},
actionColumn: {
width: 120,
},
},
exportConfig: {
name:"hotel_shop_log",
url: getExportUrl,
},
importConfig: {
url: getImportUrl
},
})
const [registerTable, {reload},{ rowSelection, selectedRowKeys }] = tableContext
/**
* 新增事件
*/
function handleAdd() {
openModal(true, {
isUpdate: false,
showFooter: true,
});
}
/**
* 编辑事件
*/
function handleEdit(record: Recordable) {
openModal(true, {
record,
isUpdate: true,
showFooter: true,
});
}
/**
* 详情
*/
function handleDetail(record: Recordable) {
openModal(true, {
record,
isUpdate: true,
showFooter: false,
});
}
/**
* 删除事件
*/
async function handleDelete(record) {
await deleteOne({id: record.id}, reload);
}
/**
* 批量删除事件
*/
async function batchHandleDelete() {
await batchDelete({ids: checkedKeys.value}, reload);
}
/**
* 成功回调
*/
function handleSuccess() {
reload();
}
/**
* 操作栏
*/
function getTableAction(record){
return [
{
label: '编辑',
onClick: handleEdit.bind(null, record),
}
]
}
/**
* 下拉操作栏
*/
function getDropDownAction(record){
return [
{
label: '详情',
onClick: handleDetail.bind(null, record),
}, {
label: '删除',
popConfirm: {
title: '是否确认删除',
confirm: handleDelete.bind(null, record),
}
}
]
}
</script>
<style scoped>
</style>

+ 58
- 0
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hotelshoplog/vue3/components/HotelShopLogModal.vue View File

@ -0,0 +1,58 @@
<template>
<BasicModal v-bind="$attrs" @register="registerModal" :title="title" @ok="handleSubmit">
<BasicForm @register="registerForm"/>
</BasicModal>
</template>
<script lang="ts" setup>
import {ref, computed, unref} from 'vue';
import {BasicModal, useModalInner} from '/@/components/Modal';
import {BasicForm, useForm} from '/@/components/Form/index';
import {formSchema} from '../hotelShopLog.data';
import {saveOrUpdate} from '../hotelShopLog.api';
// Emits
const emit = defineEmits(['register','success']);
const isUpdate = ref(true);
//
const [registerForm, {setProps,resetFields, setFieldsValue, validate}] = useForm({
labelWidth: 150,
schemas: formSchema,
showActionButtonGroup: false,
});
//
const [registerModal, {setModalProps, closeModal}] = useModalInner(async (data) => {
//
await resetFields();
setModalProps({confirmLoading: false,showCancelBtn:!!data?.showFooter,showOkBtn:!!data?.showFooter});
isUpdate.value = !!data?.isUpdate;
if (unref(isUpdate)) {
//
await setFieldsValue({
...data.record,
});
}
//
setProps({ disabled: !data?.showFooter })
});
//
const title = computed(() => (!unref(isUpdate) ? '新增' : '编辑'));
//
async function handleSubmit(v) {
try {
let values = await validate();
setModalProps({confirmLoading: true});
//
await saveOrUpdate(values, isUpdate.value);
//
closeModal();
//
emit('success');
} finally {
setModalProps({confirmLoading: false});
}
}
</script>
<style lang="less" scoped>
</style>

BIN
jeecg-boot-base/jeecg-boot-base-core/target/classes/org/jeecg/config/shiro/ShiroConfig.class View File


BIN
jeecg-boot-base/jeecg-boot-base-core/target/classes/org/jeecg/modules/hanHaiMember/mapper/HanHaiMemberMapper.class View File


+ 8
- 4
jeecg-boot-base/jeecg-boot-base-core/target/classes/org/jeecg/modules/hanHaiMember/mapper/xml/HanHaiMemberMapper.xml View File

@ -9,10 +9,14 @@
<select id="getShopIndex" resultType="org.jeecg.modules.hanHaiMember.resp.ShopIndexResp">
select (select count(1) from han_hai_member where shop_id = #{shopId}) user,
(select count(1) from hotel_order where shop_id = #{userId} and del_flag = 0 and status in (0,1,2) and type = 0) lease,
(select count(1) from hotel_order where shop_id = #{userId} and del_flag = 0 and status in (0,1,2) and type = 1) wash,
(select count(1) from hotel_order where shop_id = #{userId} and del_flag = 0 and status in (0,1,2) and type = 2) worn,
(select count(1) from hotel_order where shop_id = #{userId} and del_flag = 0 and status in (0,1,2) and type = 3) refund
(select count(1) from hotel_order where shop_id = #{userId} and del_flag = 0 and status in (1,2,15) and type = 0) lease,
(select count(1) from hotel_order where shop_id = #{userId} and del_flag = 0 and status in (4,5,6,15,16) and type = 1) wash,
(select count(1) from hotel_order where shop_id = #{userId} and del_flag = 0 and status in (7,8,9,10,15) and type = 2) worn,
(select count(1) from hotel_order where shop_id = #{userId} and del_flag = 0 and status in (11,12,13,14,15) and type = 3) refund
</select>
<update id="updateUserId">
UPDATE han_hai_member SET id = #{newId} WHERE id = #{oldId}
</update>
</mapper>

BIN
jeecg-boot-base/jeecg-boot-base-core/target/classes/org/jeecg/modules/hanHaiMember/service/IHanHaiMemberService.class View File


BIN
jeecg-boot-base/jeecg-boot-base-core/target/classes/org/jeecg/modules/hanHaiMember/service/impl/HanHaiMemberServiceImpl.class View File


BIN
jeecg-boot-base/jeecg-boot-base-core/target/jeecg-boot-base-core-3.2.0.jar View File


+ 13
- 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/xcx/coupon/controller/CouponController.java View File

@ -0,0 +1,13 @@
package org.jeecg.modules.xcx.coupon.controller;
import io.swagger.annotations.Api;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@Api(tags = "优惠券接口")
@Slf4j
@RestController
@RequestMapping("/coupon")
public class CouponController {
}

+ 12
- 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/xcx/coupon/req/CouponPageReq.java View File

@ -0,0 +1,12 @@
package org.jeecg.modules.xcx.coupon.req;
import lombok.Data;
@Data
public class CouponPageReq {
private Integer pageNo = 1;
private Integer pageSize = 10;
private String token;
}

+ 16
- 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/xcx/coupon/service/ICouponService.java View File

@ -0,0 +1,16 @@
package org.jeecg.modules.xcx.coupon.service;
import org.jeecg.common.api.vo.Result;
import org.jeecg.modules.xcx.coupon.req.CouponPageReq;
public interface ICouponService {
/**
* 优惠券分页接口
* @param couponPageReq
* @return
*/
Result<?> couponPage(CouponPageReq couponPageReq);
}

+ 39
- 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/xcx/coupon/service/impl/CouponServiceImpl.java View File

@ -0,0 +1,39 @@
package org.jeecg.modules.xcx.coupon.service.impl;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import lombok.extern.slf4j.Slf4j;
import org.jeecg.common.api.vo.Result;
import org.jeecg.config.shiro.ShiroRealm;
import org.jeecg.modules.hanHaiMember.entity.HanHaiMember;
import org.jeecg.modules.hotelcouponlog.entity.HotelCouponLog;
import org.jeecg.modules.hotelcouponlog.service.IHotelCouponLogService;
import org.jeecg.modules.xcx.coupon.req.CouponPageReq;
import org.jeecg.modules.xcx.coupon.service.ICouponService;
import org.jeecgframework.codegenerate.a.a;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
@Slf4j
@Service
public class CouponServiceImpl implements ICouponService {
@Resource
private IHotelCouponLogService hotelCouponLogService;
@Resource
private ShiroRealm shiroRealm;
@Override
public Result<?> couponPage(CouponPageReq couponPageReq) {
HanHaiMember hanHaiMember = shiroRealm.checkUserTokenIsEffectHanHaiAccount(couponPageReq.getToken());
Page<HotelCouponLog> page = new Page<>(couponPageReq.getPageNo(), couponPageReq.getPageSize());
Page<HotelCouponLog> hotelCouponLogPage = hotelCouponLogService.lambdaQuery()
.eq(HotelCouponLog::getDelFlag, 0)
.eq(HotelCouponLog::getStatus, 0)
.eq(HotelCouponLog::getUserId, hanHaiMember.getId())
.orderByDesc(HotelCouponLog::getCreateTime)
.page(page);
return Result.OK(hotelCouponLogPage);
}
}

+ 2
- 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/xcx/goods/req/JoinShoppingCartReq.java View File

@ -12,6 +12,8 @@ public class JoinShoppingCartReq {
@ApiModelProperty(value = "规格id")
private String skuId;
private String token;
@ApiModelProperty(value = "数量")
private Integer num = 1;
}

+ 2
- 2
jeecg-boot-module-system/src/main/java/org/jeecg/modules/xcx/goods/service/impl/GoodsServiceImpl.java View File

@ -132,11 +132,11 @@ public class GoodsServiceImpl implements IGoodsService {
hotelShoppingCat.setGoodsId(hotelGoods.getId());
hotelShoppingCat.setSkuId(hotelGoodsSku.getId());
hotelShoppingCat.setUserId(hanHaiMember.getId());
hotelShoppingCat.setNum(1);
hotelShoppingCat.setNum(joinShoppingCartReq.getNum());
hotelShoppingCatService.save(hotelShoppingCat);
}else{
hotelShoppingCat.setId(hotelShoppingCat1.getId());
hotelShoppingCat.setNum(hotelShoppingCat1.getNum() + 1);
hotelShoppingCat.setNum(hotelShoppingCat1.getNum() + joinShoppingCartReq.getNum());
hotelShoppingCatService.updateById(hotelShoppingCat1);
}


+ 14
- 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/xcx/order/controller/OrderController.java View File

@ -88,4 +88,18 @@ public class OrderController {
return orderService.confirmAcceptOrder(confirmAcceptOrderReq);
}
@ApiOperation(value = "换货支付")
@PostMapping("/replace/pay")
public Result<?> replaceOrderPay(HttpServletRequest request,ReplaceOrderPayReq replaceOrderPayReq){
replaceOrderPayReq.setToken(TokenUtils.getTokenByRequest(request));
return orderService.replaceOrderPay(replaceOrderPayReq);
}
@PostMapping("/replace/notify")
public Object replaceOrderNotify(String requestBody){
return orderService.replaceOrderNotify(requestBody);
}
}

+ 16
- 2
jeecg-boot-module-system/src/main/java/org/jeecg/modules/xcx/order/req/ConfirmAcceptOrderReq.java View File

@ -2,6 +2,7 @@ package org.jeecg.modules.xcx.order.req;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.Value;
@Data
public class ConfirmAcceptOrderReq {
@ -10,8 +11,21 @@ public class ConfirmAcceptOrderReq {
/**订单id*/
@ApiModelProperty(value = "订单id")
private String id;
/**0确认接单 0确认 1不确认*/
@ApiModelProperty(value = "0确认接单 0确认 1不确认")
/**0确认接单 1确认正常 2破损上报*/
@ApiModelProperty(value = "0确认接单 1确认正常 2破损上报")
private Integer flag = 0;
/**商品id*/
@ApiModelProperty(value = "商品id")
private String goodsId;
/**退货数量*/
@ApiModelProperty(value = "退货数量")
private Integer num;
/**详细说明*/
@ApiModelProperty(value = "详细说明")
private String info;
/**图片、视频*/
@ApiModelProperty(value = "图片、视频")
private String pic;
}

+ 1
- 1
jeecg-boot-module-system/src/main/java/org/jeecg/modules/xcx/order/req/OrderPageReq.java View File

@ -12,7 +12,7 @@ public class OrderPageReq {
@ApiModelProperty(value = "订单类型 0租赁 1水洗 2破损 3退货")
private Integer type;
@ApiModelProperty(value = "用户Id")
private String userId;
private String uid;
private String token;
}

+ 2
- 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/xcx/order/req/OrderPayReq.java View File

@ -8,6 +8,8 @@ public class OrderPayReq {
@ApiModelProperty(value = "orderLogId")
private String id;
@ApiModelProperty(value = "优惠券id")
private String couponId;
private String token;
}

+ 12
- 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/xcx/order/req/ReplaceOrderPayReq.java View File

@ -0,0 +1,12 @@
package org.jeecg.modules.xcx.order.req;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@Data
public class ReplaceOrderPayReq {
private String token;
@ApiModelProperty(value = "订单id")
private String id;
}

+ 15
- 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/xcx/order/service/IOrderService.java View File

@ -82,4 +82,19 @@ public interface IOrderService {
* @return
*/
Result<?> cancelOrder(CancelOrderReq cancelOrderReq);
/**
* 换货订单支付接口
* @param replaceOrderPayReq
* @return
*/
Result<?> replaceOrderPay(ReplaceOrderPayReq replaceOrderPayReq);
/**
* 换货订单支付回调
* @param requestBody
* @return
*/
Object replaceOrderNotify(String requestBody);
}

+ 135
- 11
jeecg-boot-module-system/src/main/java/org/jeecg/modules/xcx/order/service/impl/OrderServiceImpl.java View File

@ -27,6 +27,8 @@ import org.jeecg.modules.hotelcategory.entity.HotelCategory;
import org.jeecg.modules.hotelcategory.service.IHotelCategoryService;
import org.jeecg.modules.hotelconf.entity.HotelConf;
import org.jeecg.modules.hotelconf.service.IHotelConfService;
import org.jeecg.modules.hotelcouponlog.entity.HotelCouponLog;
import org.jeecg.modules.hotelcouponlog.service.IHotelCouponLogService;
import org.jeecg.modules.hotelgoods.entity.HotelGoods;
import org.jeecg.modules.hotelgoods.service.IHotelGoodsService;
import org.jeecg.modules.hotelgoodssku.entity.HotelGoodsSku;
@ -83,6 +85,8 @@ public class OrderServiceImpl implements IOrderService {
private IHotelConfService hotelConfService;
@Value("${weixin.orderNotifyUrl}")
private String orderNotifyUrl;
@Value("${weixin.replaceOrderNotifyUrl}")
private String replaceOrderNotifyUrl;
@Resource
private IHotelOrderLogService hotelOrderLogService;
@Resource
@ -95,6 +99,8 @@ public class OrderServiceImpl implements IOrderService {
private IHotelCategoryService hotelCategoryService;
@Resource
private IHotelOrderFlowService hotelOrderFlowService;
@Resource
private IHotelCouponLogService hotelCouponLogService;
@ -104,19 +110,23 @@ public class OrderServiceImpl implements IOrderService {
Page<HotelOrder> page = new Page<>(orderPageReq.getPageNo(), orderPageReq.getPageSize());
LambdaQueryChainWrapper<HotelOrder> queryChainWrapper = hotelOrderService.lambdaQuery();
queryChainWrapper.eq(HotelOrder::getDelFlag , 0);
if(StringUtils.isBlank(orderPageReq.getUserId())){
if(StringUtils.isBlank(orderPageReq.getUid())){
queryChainWrapper.and(ew->ew.eq(HotelOrder::getUserId,hanHaiMember.getId()).or().eq(HotelOrder::getShopId,hanHaiMember.getId()));
}else{
HotelShop hotelShop = hotelShopService.lambdaQuery()
.eq(HotelShop::getDelFlag, 0)
.eq(HotelShop::getUserId, hanHaiMember.getId())
.one();
HanHaiMember haiMember = hanHaiMemberService.lambdaQuery()
.eq(HanHaiMember::getId, orderPageReq.getUserId())
.eq(HanHaiMember::getShopId, hanHaiMember.getId())
.eq(HanHaiMember::getId, orderPageReq.getUid())
.eq(HanHaiMember::getShopId, hotelShop.getId())
.one();
if(haiMember == null){
throw new JeecgBootException("数据错误,请刷新重试");
}
queryChainWrapper.eq(HotelOrder::getUserId,orderPageReq.getUserId());
queryChainWrapper.eq(HotelOrder::getUserId,orderPageReq.getUid());
}
@ -518,6 +528,28 @@ public class OrderServiceImpl implements IOrderService {
.eq(HotelOrderLog::getIsPay, 0)
.one();
HotelCouponLog hotelCouponLog = hotelCouponLogService.lambdaQuery()
.eq(HotelCouponLog::getDelFlag, 0)
.eq(HotelCouponLog::getUserId, hanHaiMember.getId())
.eq(HotelCouponLog::getId, orderPayReq.getCouponId())
.one();
HttpServletRequest req = SpringContextUtils.getHttpServletRequest();
BigDecimal multiply = BigDecimal.ZERO;
if(hotelCouponLog != null){
if(hotelOrderLog.getOrderPay().compareTo(hotelCouponLog.getConditionPrice()) >= 0){
multiply = hotelOrderLog.getOrderPay().subtract(hotelCouponLog.getPrice());
HotelCouponLog hotelCouponLog1 = new HotelCouponLog();
hotelCouponLog1.setId(hotelCouponLog.getId());
hotelCouponLog1.setOrderLogId(hotelOrderLog.getId());
hotelCouponLogService.updateById(hotelCouponLog1);
}
}
multiply = multiply.multiply(new BigDecimal(100));
// HotelOrder hotelOrder = hotelOrderService.lambdaQuery()
// .eq(HotelOrder::getDelFlag, 0)
// .eq(HotelOrder::getId, orderPayReq.getId())
@ -528,8 +560,7 @@ public class OrderServiceImpl implements IOrderService {
// .eq(HotelGoods::getId, hotelOrder.getGoodsId())
// .one();
HttpServletRequest req = SpringContextUtils.getHttpServletRequest();
BigDecimal multiply = hotelOrderLog.getOrderPay().multiply(new BigDecimal(100));
Object order = mpWxPayService.createOrder("酒店桌布", oConvertUtils.getIpAddrByRequest(req), hotelOrderLog.getId(), multiply.intValue(), hotelOrderLog.getId(), hanHaiMember.getAppletOpenid(),orderNotifyUrl,"{}");
return Result.OK(order);
@ -538,6 +569,11 @@ public class OrderServiceImpl implements IOrderService {
@Override
public Object orderNotify(String requestBody) {
WxPayOrderNotifyResult notify = mpWxPayService.notify(requestBody);
//对比outTradeNo进行业务处理
if (notify == null){
//会继续通知
return "FAIL";
}
String outTradeNo = notify.getOutTradeNo();
System.err.println(outTradeNo);
HotelOrderLog hotelOrderLog = hotelOrderLogService.lambdaQuery()
@ -555,6 +591,20 @@ public class OrderServiceImpl implements IOrderService {
System.err.println("订单未找到");
return "FAIL";
}
HotelCouponLog hotelCouponLog = hotelCouponLogService.lambdaQuery()
.eq(HotelCouponLog::getDelFlag, 0)
.eq(HotelCouponLog::getStatus, 0)
.eq(HotelCouponLog::getOrderLogId, hotelOrderLog.getId())
.one();
if(hotelCouponLog != null){
HotelCouponLog hotelCouponLog1 = new HotelCouponLog();
hotelCouponLog1.setId(hotelCouponLog.getId());
hotelCouponLog1.setStatus(1);
hotelCouponLogService.updateById(hotelCouponLog1);
}
List<HotelOrder> hotelOrders = new ArrayList<>();
ArrayList<HotelLeaseLog> hotelLeaseLogs = new ArrayList<>();
Integer type = 0;
@ -642,11 +692,7 @@ public class OrderServiceImpl implements IOrderService {
hotelOrderService.updateBatchById(hotelOrders);
//对比outTradeNo进行业务处理
if (notify == null){
//会继续通知
return "FAIL";
}
//不再通知该结果
return "SUCCESS";
}
@ -804,6 +850,22 @@ public class OrderServiceImpl implements IOrderService {
break;
}
}else if(confirmAcceptOrderReq.getFlag() == 2){/*破损换布流程*/
HotelShop hotelShop = hotelShopService.lambdaQuery()
.eq(HotelShop::getDelFlag, 0)
.eq(HotelShop::getStatus, 1)
.eq(HotelShop::getUserId, hanHaiMember.getId())
.one();
if(hotelShop == null){
throw new JeecgBootException("数据错误");
}
hotelOrder1.setStatus(16);
hotelOrder1.setReason("破损换布");
hotelOrder1.setRefundNum(confirmAcceptOrderReq.getNum());
hotelOrder1.setReasonInfo(confirmAcceptOrderReq.getInfo());
hotelOrder1.setReasonPic(confirmAcceptOrderReq.getPic());
hotelOrder1.setReasonPhone(hotelShop.getPhone());
}
@ -827,6 +889,68 @@ public class OrderServiceImpl implements IOrderService {
return null;
}
@Override
public Result<?> replaceOrderPay(ReplaceOrderPayReq replaceOrderPayReq) {
HanHaiMember hanHaiMember = shiroRealm.checkUserTokenIsEffectHanHaiAccount(replaceOrderPayReq.getToken());
HotelOrder hotelOrder = hotelOrderService.lambdaQuery()
.eq(HotelOrder::getDelFlag, 0)
.eq(HotelOrder::getType, 2)
.eq(HotelOrder::getStatus, 10)
.eq(HotelOrder::getUserId,hanHaiMember.getId())
.eq(HotelOrder::getId, replaceOrderPayReq.getId())
.one();
if(hotelOrder == null){
throw new JeecgBootException("数据错误,请稍后重试");
}
HttpServletRequest req = SpringContextUtils.getHttpServletRequest();
BigDecimal multiply = hotelOrder.getReasonPrice().multiply(new BigDecimal(100));
Object order = mpWxPayService.createOrder("酒店桌布换货", oConvertUtils.getIpAddrByRequest(req), hotelOrder.getId(), multiply.intValue(), hotelOrder.getId(), hanHaiMember.getAppletOpenid(),replaceOrderNotifyUrl,"{}");
return Result.OK(order);
}
@Override
public Object replaceOrderNotify(String requestBody) {
WxPayOrderNotifyResult notify = mpWxPayService.notify(requestBody);
//对比outTradeNo进行业务处理
if (notify == null){
//会继续通知
return "FAIL";
}
String outTradeNo = notify.getOutTradeNo();
System.err.println(outTradeNo);
HotelOrder hotelOrder = hotelOrderService.lambdaQuery()
.eq(HotelOrder::getDelFlag, 0)
.eq(HotelOrder::getId, outTradeNo)
.one();
if(hotelOrder.getStatus() == 15){
return "SUCCESS";
}
HotelOrder hotelOrder2 = new HotelOrder();
hotelOrder2.setId(hotelOrder.getId());
hotelOrder2.setStatus(15);
hotelOrderService.updateById(hotelOrder2);
HotelLeaseLog hotelLeaseLog = hotelLeaseLogService.lambdaQuery()
.eq(HotelLeaseLog::getDelFlag, 0)
.eq(HotelLeaseLog::getId, hotelOrder.getId())
.one();
HotelLeaseLog hotelLeaseLog2 = new HotelLeaseLog();
hotelLeaseLog2.setId(hotelLeaseLog.getId());
hotelLeaseLog2.setStatus(0);
hotelLeaseLogService.updateById(hotelLeaseLog2);
//不再通知该结果
return "SUCCESS";
}
public Object testPay(String id){
HotelOrder hotelOrder = hotelOrderService.lambdaQuery()
.eq(HotelOrder::getDelFlag, 0)


+ 7
- 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/xcx/shop/controller/ShopController.java View File

@ -77,4 +77,11 @@ public class ShopController {
bindWxReq.setToken(TokenUtils.getTokenByRequest(request));
return shopService.bindWx(bindWxReq);
}
@ApiOperation(value = "修改店铺信息")
@PostMapping("/edit/info")
public Result<?> editShopInfo(HttpServletRequest request, EditShopInfoReq editShopInfoReq){
editShopInfoReq.setToken(TokenUtils.getTokenByRequest(request));
return shopService.editShopInfo(editShopInfoReq);
}
}

+ 1
- 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/xcx/shop/req/ApplyShopReq.java View File

@ -21,6 +21,7 @@ public class ApplyShopReq {
private String address;
private String password;
private String token;
private String pic;
}

+ 15
- 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/xcx/shop/req/EditShopInfoReq.java View File

@ -0,0 +1,15 @@
package org.jeecg.modules.xcx.shop.req;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@Data
public class EditShopInfoReq {
private String token;
@ApiModelProperty(value = "店铺图像")
private String pic;
@ApiModelProperty(value = "店铺名")
private String name;
}

+ 7
- 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/xcx/shop/service/IShopService.java View File

@ -63,4 +63,11 @@ public interface IShopService {
Result<?> bindWx(BindWxReq bindWxReq);
/**
* 修改店铺信息
* @param editShopInfoReq
* @return
*/
Result<?> editShopInfo(EditShopInfoReq editShopInfoReq);
}

+ 29
- 3
jeecg-boot-module-system/src/main/java/org/jeecg/modules/xcx/shop/service/impl/ShopServiceImpl.java View File

@ -100,6 +100,7 @@ public class ShopServiceImpl implements IShopService {
String encrypt = PasswordUtil.encrypt(applyShopReq.getPassword(), applyShopReq.getPhone(), salt);
HanHaiMember hanHaiMember1 = new HanHaiMember();
hanHaiMember1.setId(hanHaiMember.getId());
hanHaiMember1.setPhone(applyShopReq.getPhone());
hanHaiMember1.setPassword(encrypt);
hanHaiMember1.setPasswordSalt(salt);
hanHaiMemberService.updateById(hanHaiMember1);
@ -113,6 +114,8 @@ public class ShopServiceImpl implements IShopService {
hotelShop1.setLongitude(applyShopReq.getLongitude());
hotelShop1.setAddress(applyShopReq.getAddress());
hotelShop1.setStatus(0);
hotelShop1.setOldId(hanHaiMember.getId());
hotelShop1.setPic(applyShopReq.getPic());
hotelShopService.save(hotelShop1);
return Result.OK();
@ -134,7 +137,7 @@ public class ShopServiceImpl implements IShopService {
if(applyWithdrawalReq.getMoney() == null || applyWithdrawalReq.getMoney().compareTo(BigDecimal.ZERO) <= 0){
throw new JeecgBootException("请填写正确的提现金额");
}
if(applyWithdrawalReq.getMoney().compareTo(hotelMemberAccount.getShopBalance()) == -1){
if(applyWithdrawalReq.getMoney().compareTo(hotelMemberAccount.getShopBalance()) == 1){
throw new JeecgBootException("提现金额不能大于余额");
}
if(StringUtils.isBlank(applyWithdrawalReq.getName())){
@ -169,7 +172,7 @@ public class ShopServiceImpl implements IShopService {
hotelBalanceLog.setBankCard(applyWithdrawalReq.getBankCard());
hotelBalanceLog.setBankAddress(applyWithdrawalReq.getBankAddress());
hotelBalanceLogService.save(hotelBalanceLog);
return null;
return Result.OK();
}
@Override
@ -213,7 +216,7 @@ public class ShopServiceImpl implements IShopService {
if(hotelShop == null){
return Result.OK();
}
ShopIndexResp shopIndex = hanHaiMemberService.getShopIndex(hanHaiMember.getId(), hotelShop.getId());
ShopIndexResp shopIndex = hanHaiMemberService.getShopIndex(hotelShop.getUserId(), hotelShop.getId());
return Result.OK(shopIndex);
}
@ -283,4 +286,27 @@ public class ShopServiceImpl implements IShopService {
return Result.OK();
}
@Override
public Result<?> editShopInfo(EditShopInfoReq editShopInfoReq) {
HanHaiMember hanHaiMember = shiroRealm.checkUserTokenIsEffectHanHaiAccount(editShopInfoReq.getToken());
HotelShop hotelShop = hotelShopService.lambdaQuery()
.eq(HotelShop::getDelFlag, 0)
.eq(HotelShop::getUserId, hanHaiMember.getId())
.one();
HotelShop hotelShop1 = new HotelShop();
hotelShop1.setId(hotelShop.getId());
if(StringUtils.isNotBlank(editShopInfoReq.getPic())){
hotelShop1.setPic(editShopInfoReq.getPic());
}
if(StringUtils.isNotBlank(editShopInfoReq.getName())){
hotelShop1.setName(editShopInfoReq.getName());
}
hotelShopService.updateById(hotelShop1);
return Result.OK();
}
}

+ 6
- 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/xcx/user/controller/UserController.java View File

@ -45,5 +45,11 @@ public class UserController {
return userService.myLeasePage(myLeasePageReq);
}
@ApiOperation(value = "客服")
@GetMapping("/custom")
public Result<?> getCustom(){
return userService.getCustom();
}
}

+ 6
- 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/xcx/user/service/IUserService.java View File

@ -28,4 +28,10 @@ public interface IUserService {
*/
Result<?> myLeasePage(MyLeasePageReq myLeasePageReq);
/**
* 获取客服
* @return
*/
Result<?> getCustom();
}

+ 4
- 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/xcx/user/service/impl/LoginServiceImpl.java View File

@ -165,8 +165,12 @@ public class LoginServiceImpl implements ILoginService {
HotelShop hotelShop = hotelShopService.lambdaQuery()
.eq(HotelShop::getDelFlag, 0)
.eq(HotelShop::getStatus,1)
.eq(HotelShop::getUserId, hanHaiMember.getId())
.one();
if(hotelShop == null){
throw new JeecgBootException("您还不是水洗店,无法使用账号密码登录!");
}
hanHaiMember.setShop(hotelShop);
String token = JwtUtil.sign(hanHaiMember.getPhone(), hanHaiMember.getPassword());
redisUtil.set(CommonConstant.PREFIX_USER_TOKEN + token, token);


+ 13
- 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/xcx/user/service/impl/UserServiceImpl.java View File

@ -7,6 +7,7 @@ import org.jeecg.common.api.vo.Result;
import org.jeecg.config.shiro.ShiroRealm;
import org.jeecg.modules.hanHaiMember.entity.HanHaiMember;
import org.jeecg.modules.hanHaiMember.service.IHanHaiMemberService;
import org.jeecg.modules.hotelconf.service.IHotelConfService;
import org.jeecg.modules.hotelleaselog.entity.HotelLeaseLog;
import org.jeecg.modules.hotelleaselog.service.IHotelLeaseLogService;
import org.jeecg.modules.hotelmemberaccount.entity.HotelMemberAccount;
@ -19,6 +20,8 @@ import org.jeecg.modules.xcx.user.service.IUserService;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.HashMap;
import java.util.Map;
@Service
public class UserServiceImpl implements IUserService {
@ -33,6 +36,8 @@ public class UserServiceImpl implements IUserService {
private IHotelLeaseLogService hotelLeaseLogService;
@Resource
private IHotelShopService hotelShopService;
@Resource
private IHotelConfService hotelConfService;
@Override
public Result<?> getUserInfo(String token) {
@ -85,4 +90,12 @@ public class UserServiceImpl implements IUserService {
return Result.OK(hotelLeaseLogPage);
}
@Override
public Result<?> getCustom() {
Map<String, Object> map = new HashMap<>();
String customerService = hotelConfService.getConf("customerService");
map.put("phone",customerService);
return Result.OK(map);
}
}

+ 4
- 3
jeecg-boot-module-system/src/main/resources/application-dev.yml View File

@ -134,7 +134,7 @@ spring:
# connectionProperties: druid.stat.mergeSql\=true;druid.stat.slowSqlMillis\=5000
datasource:
master:
url: jdbc:mysql://127.0.0.1:3306/hotel-api?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai&autoReconnect=true&failOverReadOnly=false
url: jdbc:mysql://124.220.65.222:3306/hotel-api?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai&autoReconnect=true&failOverReadOnly=false
username: root
password: m`A_E+`m
driver-class-name: com.mysql.cj.jdbc.Driver
@ -147,7 +147,7 @@ spring:
#redis 配置
redis:
database: 0
host: 127.0.0.1
host: 124.220.65.222
lettuce:
pool:
max-active: -1 #最大连接数据库连接数,设 -1 为没有限制
@ -333,4 +333,5 @@ third-app:
weixin:
mpAppId: wxad5b3d20a75974c0
mpAppSecret: 3b60a80c8e673986dd42f3cd6f2cf6b1
orderNotifyUrl: https://hotel.java996.icu/hotel/order/notify
orderNotifyUrl: https://hotel.java996.icu/hotel/order/notify
replaceOrderNotifyUrl: https://hotel.java996.icu/hotel/order/replace/notify

+ 5
- 3
jeecg-boot-module-system/src/main/resources/application-pord.yml View File

@ -1,5 +1,5 @@
server:
port: 8000
port: 8081
tomcat:
max-swallow-size: -1
error:
@ -169,6 +169,7 @@ mybatis-plus:
# 默认数据库表下划线命名
table-underline: true
configuration:
# 这个配置会将执行的sql打印出来,在开发或测试的时候可以用
# log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
# 返回类型为Map,显示null对应的字段
@ -330,5 +331,6 @@ third-app:
agent-id: ??
weixin:
mpAppId: wx15be4225a7e41a1e
mpAppSecret: 0fdb77429ffdf206c151af76a663041c
mpAppId: wxad5b3d20a75974c0
mpAppSecret: 3b60a80c8e673986dd42f3cd6f2cf6b1
orderNotifyUrl: https://hotel.java996.icu/hotel/order/notify

Loading…
Cancel
Save