| | |
| | | export function findAll (data) { |
| | | return request.post('/business/member/findAll', data) |
| | | } |
| | | |
| | | export function updateShop (data) { |
| | | return request.post('/business/member/updateShop', data) |
| | | } |
| | | export function updateIntegral (data) { |
| | | return request.post('/business/member/updateIntegral', data) |
| | | } |
| | | |
| | | export function updateById (data) { |
| | | return request.post('/business/member/updateById', data) |
| | | } |
| | | export function exportExcel (data) { |
| | | return request.post('/business/member/exportExcelList', data, { |
| | | trim: true, |
| | | download: true |
| | | }) |
| | | } |
| | |
| | | trim: true |
| | | }) |
| | | } |
| | | export function allList (data) { |
| | | return request.post('/business/shop/findAll', data, { |
| | | trim: true |
| | | }) |
| | | } |
| | | |
| | | // å建 |
| | | export function create (data) { |
| | |
| | | export function updateById (data) { |
| | | return request.post('/business/shop/updateById', data) |
| | | } |
| | | |
| | | // ä¿®æ¹ |
| | | export function updateIsRecById (data) { |
| | | return request.post('/business/shop/updateIsRecById', data) |
| | | } |
| | | export function setGoodsPrice (data) { |
| | | return request.post('/business/shop/setGoodsPrice', data) |
| | | } |
| | | |
| | | // å é¤ |
| | | export function deleteById (id) { |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | import request from '../../utils/request' |
| | | |
| | | // æ¥è¯¢ |
| | | export function fetchList (data) { |
| | | return request.post('/business/userAction/page', data, { |
| | | trim: true |
| | | }) |
| | | } |
| | | |
| | | // 导åºExcel |
| | | export function exportExcel (data) { |
| | | return request.post('/business/userAction/exportExcel', data, { |
| | | trim: true, |
| | | download: true |
| | | }) |
| | | } |
| | |
| | | this.api.create(this.form) |
| | | .then((res) => { |
| | | this.visible = false |
| | | this.$tip.apiSuccess(res || 'æ°å»ºæå') |
| | | if (res && res.length > 8) { |
| | | this.$tip.apiSuccess(res) |
| | | } else { |
| | | this.$tip.apiSuccess('æ°å»ºæå') |
| | | } |
| | | this.$emit('success') |
| | | }) |
| | | .catch(e => { |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <GlobalWindow |
| | | :title="title" |
| | | width="60%" |
| | | :visible.sync="visible" |
| | | :confirm-working="isWorking" |
| | | @confirm="confirm" |
| | | > |
| | | <p class="tip-warn" style="margin: 30px;"><i class="el-icon-warning"></i>æä½è¯´æï¼ç§¯åå¢å æåå°åä¼å¨æ¶è´¹è
端å±ç¤ºï¼è¯·è°¨æ
æä½ï¼</p> |
| | | <el-form :model="form" ref="form" :rules="rules" label-width="100px" label-suffix="ï¼" inline> |
| | | <el-form-item label="å½åä½é¢" > |
| | | <span class="green" ><b>{{info.integral}}</b></span> |
| | | </el-form-item> |
| | | <el-form-item label="è°æ´æ¹å¼" prop="type" > |
| | | <el-radio-group v-model="form.type"> |
| | | <el-radio :value="0" :label="0">å¢å </el-radio> |
| | | <el-radio :value="1" :label="1">åå°</el-radio> |
| | | </el-radio-group> |
| | | </el-form-item> |
| | | <el-form-item label="æ°é" prop="num" > |
| | | <el-input v-model="form.num" type="number" placeholder="请è¾å
¥æ°é" ></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="夿³¨" prop="remark" > |
| | | <el-input v-model="form.remark" type="textarea" placeholder="请è¾å
¥å¤æ³¨" ></el-input> |
| | | </el-form-item> |
| | | </el-form> |
| | | </GlobalWindow> |
| | | </template> |
| | | |
| | | <script> |
| | | import BaseOpera from '@/components/base/BaseOpera' |
| | | import GlobalWindow from '@/components/common/GlobalWindow' |
| | | import { allList as shopList } from '@/api/business/shop' |
| | | export default { |
| | | name: 'OperaChangeShopWindow', |
| | | extends: BaseOpera, |
| | | components: { GlobalWindow }, |
| | | data () { |
| | | return { |
| | | searchLoading: false, |
| | | info:{}, |
| | | // è¡¨åæ°æ® |
| | | form: { |
| | | memberId: null, |
| | | remark: null, |
| | | num: null, |
| | | type: 0 |
| | | }, |
| | | rules: { |
| | | type: [ |
| | | { required: true, message: 'è¯·éæ©è°æ´æ¹å¼' } |
| | | ], |
| | | num: [ |
| | | { required: true, message: '请è¾å
¥è°æ´æ°é' } |
| | | ] |
| | | } |
| | | } |
| | | }, |
| | | created () { |
| | | this.config({ |
| | | api: '/business/member', |
| | | 'field.id': 'id' |
| | | }) |
| | | }, |
| | | methods: { |
| | | confirm () { |
| | | this.$refs.form.validate((valid) => { |
| | | if (!valid) { |
| | | return |
| | | } |
| | | this.isWorking = true |
| | | this.api.updateIntegral(this.form) |
| | | .then(() => { |
| | | this.visible = false |
| | | this.$tip.apiSuccess('æä½æå') |
| | | this.$emit('success') |
| | | }) |
| | | .catch(e => { |
| | | this.$tip.apiFailed(e) |
| | | }) |
| | | .finally(() => { |
| | | this.isWorking = false |
| | | }) |
| | | }) |
| | | }, |
| | | open (title, target) { |
| | | this.title = title |
| | | this.visible = true |
| | | this.info = target |
| | | this.form.type = 0 |
| | | this.form.memberId = target.id |
| | | this.form.num = null |
| | | this.form.remark = null |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | @import "@/assets/style/alertstyle.scss"; |
| | | ::v-deep .el-form-item__content { |
| | | flex: 0.6; |
| | | } |
| | | </style> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <GlobalWindow |
| | | :title="title" |
| | | width="80%" |
| | | :visible.sync="visible" |
| | | > |
| | | <div style="display: block;"> |
| | | <TableLayout > |
| | | <!-- è¡¨æ ¼åå页 --> |
| | | <template v-slot:table-wrap> |
| | | <el-table |
| | | v-loading="isWorking.search" |
| | | :data="tableData.list" |
| | | stripe |
| | | border |
| | | @selection-change="handleSelectionChange" |
| | | > |
| | | <el-table-column prop="beforeInfo" label="åæ´å" fixed align="center" min-width="150px"> </el-table-column> |
| | | <el-table-column prop="afterInfo" label="åæ´å" fixed align="center" min-width="150px"> </el-table-column> |
| | | <el-table-column prop="remark" label="夿³¨" align="center" min-width="300px"></el-table-column> |
| | | <el-table-column prop="createName" label="æä½äºº" align="center" min-width="100px"></el-table-column> |
| | | <el-table-column prop="createDate" label="æä½æ¶é´" align="center" min-width="150px"></el-table-column> |
| | | </el-table> |
| | | <pagination |
| | | @size-change="handleSizeChange" |
| | | @current-change="handlePageChange" |
| | | :pagination="tableData.pagination" |
| | | > |
| | | </pagination> |
| | | </template> |
| | | </TableLayout> |
| | | </div> |
| | | <template v-slot:footer> |
| | | <el-button @click="visible=false">è¿å</el-button> |
| | | </template> |
| | | </GlobalWindow> |
| | | </template> |
| | | |
| | | <script> |
| | | import GlobalWindow from '@/components/common/GlobalWindow' |
| | | import BaseTable from '@/components/base/BaseTable' |
| | | import TableLayout from '@/layouts/TableLayout' |
| | | import Pagination from '@/components/common/Pagination' |
| | | export default { |
| | | name: 'OperaChangeShopRecordWindow', |
| | | extends: BaseTable, |
| | | components: { GlobalWindow, TableLayout, Pagination }, |
| | | data () { |
| | | return { |
| | | title: '', |
| | | visible: false, |
| | | // æç´¢ |
| | | searchForm: { |
| | | memberId: '', |
| | | type: 0 |
| | | } |
| | | } |
| | | }, |
| | | |
| | | created () { |
| | | this.config({ |
| | | module: 'ç¨æ·æä½è®°å½è¡¨ä¿¡æ¯è¡¨', |
| | | api: '/business/userAction', |
| | | 'field.id': 'id', |
| | | 'field.main': 'id' |
| | | }) |
| | | }, |
| | | methods: { |
| | | open (title, goods) { |
| | | this.title = title |
| | | this.visible = true |
| | | this.searchForm.memberId = goods.id |
| | | this.search() |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | <style scoped> |
| | | .table-pagination{ |
| | | position: fixed !important; |
| | | bottom: 50px; |
| | | } |
| | | .header-b{ |
| | | display: inline-block; |
| | | font-size: 16px; |
| | | font-weight: bold; |
| | | } |
| | | .header-blue{ |
| | | display: inline-block; |
| | | font-size: 12px; |
| | | border: 1px solid #216EEE; |
| | | padding: 2px 10px; |
| | | margin-left: 20px; |
| | | color: #216EEE; |
| | | border-radius: 5px ; |
| | | } |
| | | .header-btn{ |
| | | display: inline-block; |
| | | border: none; |
| | | padding: 2px 10px; |
| | | margin-left: 20px; |
| | | } |
| | | .info-item{ |
| | | display: flex; |
| | | width: 100%; |
| | | margin: 15px; |
| | | } |
| | | .info-item-a{ |
| | | flex: 1; |
| | | font-size: 14px; |
| | | |
| | | } |
| | | .info-item-a span{ |
| | | font-weight: 600; |
| | | } |
| | | .info-item-a .btn{ |
| | | font-size: 12px !important; |
| | | cursor: pointer !important; |
| | | } |
| | | </style> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <GlobalWindow |
| | | :title="title" |
| | | width="60%" |
| | | :visible.sync="visible" |
| | | :confirm-working="isWorking" |
| | | @confirm="confirm" |
| | | > |
| | | <p class="tip-warn" style="margin: 30px;"><i class="el-icon-warning"></i>æä½è¯´æï¼è¯¥æä½åªé对已ç»å®ç»éåçå®¢æ·ææï¼</p> |
| | | <el-form :model="form" ref="form" :rules="rules" label-suffix="ï¼" inline> |
| | | <el-form-item label="å½åå·²ç»å®çç»éå" label-width="200px" > |
| | | <span>{{form.shopName}}</span> |
| | | </el-form-item> |
| | | <el-form-item label="éæ©æ°çç»éå" label-width="200px" prop="bindShopId" > |
| | | <el-select v-model="form.bindShopId" clearable filterable placeholder="è¯·éæ©ä¼æ å¸" > |
| | | <el-option v-for="item in shops" :key="item.id" :label="item.name" :value="item.id"> </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-form> |
| | | </GlobalWindow> |
| | | </template> |
| | | |
| | | <script> |
| | | import BaseOpera from '@/components/base/BaseOpera' |
| | | import GlobalWindow from '@/components/common/GlobalWindow' |
| | | import { allList as shopList } from '@/api/business/shop' |
| | | export default { |
| | | name: 'OperaChangeShopWindow', |
| | | extends: BaseOpera, |
| | | components: { GlobalWindow }, |
| | | data () { |
| | | return { |
| | | searchLoading: false, |
| | | users: [], |
| | | // è¡¨åæ°æ® |
| | | oldId:null, |
| | | form: { |
| | | id: null, |
| | | shopName: null, |
| | | bindShopId: null |
| | | }, |
| | | shops: [], |
| | | rules: { |
| | | bindShopId: [ |
| | | { required: true, message: 'è¯·éæ©æ°çç»éå' } |
| | | ] |
| | | } |
| | | } |
| | | }, |
| | | created () { |
| | | this.config({ |
| | | api: '/business/member', |
| | | 'field.id': 'id' |
| | | }) |
| | | }, |
| | | methods: { |
| | | confirm () { |
| | | this.$refs.form.validate((valid) => { |
| | | if (!valid) { |
| | | return |
| | | } |
| | | this.isWorking = true |
| | | this.api.updateShop(this.form) |
| | | .then(() => { |
| | | this.visible = false |
| | | this.$tip.apiSuccess('æä½æå') |
| | | this.$emit('success') |
| | | }) |
| | | .catch(e => { |
| | | this.$tip.apiFailed(e) |
| | | }) |
| | | .finally(() => { |
| | | this.isWorking = false |
| | | }) |
| | | }) |
| | | }, |
| | | getShopList () { |
| | | shopList({ status: 0 }) |
| | | .then(res => { |
| | | if (res) { |
| | | this.shops = res || [] |
| | | } |
| | | }) |
| | | }, |
| | | open (title, target) { |
| | | this.title = title |
| | | this.visible = true |
| | | this.oldId=target.bindShopId |
| | | this.form.id = target.id |
| | | this.form.shopName = target.shopName |
| | | this.form.bindShopId = null |
| | | this.getShopList() |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | @import "@/assets/style/alertstyle.scss"; |
| | | ::v-deep .el-form-item__content { |
| | | flex: 0.6; |
| | | } |
| | | ::v-deep .el-select { |
| | | width: 100%; |
| | | .el-input__inner { |
| | | width: 100%; |
| | | } |
| | | } |
| | | </style> |
| | |
| | | :visible.sync="visible" |
| | | @confirm="confirm" |
| | | > |
| | | <TableLayout :permissions="['business:goods:query']"> |
| | | <TableLayout> |
| | | <!-- æç´¢è¡¨å --> |
| | | <el-form ref="searchForm" slot="search-form" :model="searchForm" label-width="100px" style="display: block;" > |
| | | <el-form-item label="" prop="name" label-width="5px" style="display: inline-block;margin-right: 30px;"> |
| | |
| | | components: { GlobalWindow, TableLayout, Pagination }, |
| | | data () { |
| | | return { |
| | | activeName: 'first', |
| | | title: '', |
| | | visible: false, |
| | | tabelHeight: null, |
| | | // æç´¢ |
| | | searchForm: { |
| | | name: '', |
| | | categoryId: '', |
| | | brandId: '', |
| | | type: '0', // å¹³å°åå |
| | | status: '', |
| | | isrec: '', |
| | | labels: '' |
| | | id: '', |
| | | bindShopId: '' |
| | | }, |
| | | labels: [], |
| | | serials: [], |
| | | brands: [], |
| | | selectGoods: [] |
| | | shops: [] |
| | | } |
| | | }, |
| | | mounted() { |
| | | window.addEventListener('resize', this.handleResize); |
| | | }, |
| | | beforeDestroy() { |
| | | window.removeEventListener('resize', this.handleResize); |
| | | }, |
| | | created () { |
| | | this.config({ |
| | |
| | | :confirm-working="isWorking" |
| | | @confirm="confirm" |
| | | > |
| | | <p class="tip-warn" style="margin: 30px;"><i class="el-icon-warning"></i>æä½è¯´æï¼å®ååæ¾ä¸ååæ¾æ»æ°éå¶ï¼å®å忾伿 å¸ä¸è®¡å
¥ä¼æ å¸å·²åæ¾ç»è®¡</p> |
| | | <el-form :model="form" ref="form" :rules="rules" label-width="120px" label-suffix="ï¼" inline> |
| | | <el-form-item label="åæ¾å¯¹è±¡" prop="addType" > |
| | | <el-radio-group v-model="form.addType" @change="changeType"> |
| | |
| | | <template> |
| | | <GlobalAlertWindow |
| | | :title="title" |
| | | :visible.sync="visible" |
| | | :confirm-working="isWorking" |
| | | @confirm="confirm" |
| | | <GlobalWindow |
| | | :title="title" |
| | | width="100%" |
| | | :visible.sync="visible" |
| | | > |
| | | <el-descriptions direction="horizontal" labelClassName="descriptions-label" :column="1"> |
| | | <el-descriptions-item label="ä¼åæµç§°">{{ form.nickName }}</el-descriptions-item> |
| | | <el-descriptions-item label="çå®å§å">{{ form.name }}</el-descriptions-item> |
| | | <el-descriptions-item label="ææºå·">{{ form.phone }}</el-descriptions-item> |
| | | <el-descriptions-item label="身份è¯å·">{{ form.idcard }}</el-descriptions-item> |
| | | <el-descriptions-item label="æ§å«">{{ form.sex==0?'ç·':form.sex==1?'女':'æªç¥' }}</el-descriptions-item> |
| | | <el-descriptions-item label="å°åº">{{ form.addr }}</el-descriptions-item> |
| | | <el-descriptions-item label="ä¸å¥è¯ä»ç»">{{ form.info }}</el-descriptions-item> |
| | | </el-descriptions> |
| | | <div slot="footer"></div> |
| | | </GlobalAlertWindow> |
| | | <div style="display: block"> |
| | | <div class="header"> |
| | | <div class="header-b">ç¨æ·ä¿¡æ¯</div> |
| | | <div v-if="info.phone!=null && info.phone!=''" class="header-blue">å·²ææææºå·</div> |
| | | </div> |
| | | <div class="info-item"> |
| | | <div class="info-item-a">微信openidï¼<span>{{info.openId}}</span></div> |
| | | <div class="info-item-a">æµç§°ï¼<span>{{info.nickname}}</span></div> |
| | | <div class="info-item-a">客æ·å§åï¼<span>{{info.name}}</span></div> |
| | | </div> |
| | | <div class="info-item"> |
| | | <div class="info-item-a">ææææºå·ï¼<span>{{info.phone}}</span></div> |
| | | <div class="info-item-a">å
³èç»éåï¼<span>{{info.shopName}}</span> <span class="blue btn" @click="showChangeRecord">åæ´è®°å½</span></div> |
| | | <div class="info-item-a"></div> |
| | | </div> |
| | | <div class="info-item"></div> |
| | | </div> |
| | | <div style="display: block"> |
| | | <div class="header"> |
| | | <div class="header-b">积åæç»</div> |
| | | <div v-if="info.phone!=null && info.phone!=''" class="header-btn"> |
| | | <el-button style="display: inline" type="primary" @click="changeIntegral">积åè°æ´</el-button> |
| | | </div> |
| | | </div> |
| | | <TableLayout > |
| | | <!-- è¡¨æ ¼åå页 --> |
| | | <template v-slot:table-wrap> |
| | | <div > |
| | | <div style="float: left; margin-bottom: 20px;width:50%;"> |
| | | <div class="info-item"> |
| | | <div class="info-item-a">ç°æç§¯åï¼<span>{{info.integral || 0}}</span></div> |
| | | <div class="info-item-a">累计积åï¼<span>{{info.totalIntegral||0}}</span></div> |
| | | </div> |
| | | </div> |
| | | <div style="float: right; margin-bottom: 20px;"> |
| | | <el-select v-model="searchForm.type" placeholder="å
¨é¨" clearable @change="search" style="width: 120px;" > |
| | | <el-option :key="0" :value="0" label="è·å¾" ></el-option> |
| | | <el-option :key="1" :value="1" label="æ£é¤" ></el-option> |
| | | </el-select> |
| | | <el-button @click="search" type="ç¹å»å·æ°" icon="el-icon-refresh" style="margin-left: 10px;" ></el-button> |
| | | </div> |
| | | </div> |
| | | <el-table |
| | | v-loading="isWorking.search" |
| | | :data="tableData.list" |
| | | stripe |
| | | border |
| | | @selection-change="handleSelectionChange" |
| | | > |
| | | <el-table-column prop="type" label="è·å¾/æ£é¤" align="center" min-width="150px"> |
| | | <template slot-scope="{row}"> |
| | | {{ row.saleType == 1?'æ£é¤':'è·å¾'}} |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="num" label="æ°é" fixed align="center" min-width="100px"> </el-table-column> |
| | | <el-table-column prop="strObjType" label="æ¶è´¹ç±»å" align="center" min-width="100px"></el-table-column> |
| | | <el-table-column prop="orderCode" label="å
³è订å" align="center" min-width="150px"></el-table-column> |
| | | <el-table-column prop="remark" label="夿³¨" align="center" min-width="200px"></el-table-column> |
| | | <el-table-column prop="createDate" label="å卿¶é´" align="center" min-width="200px"></el-table-column> |
| | | </el-table> |
| | | <pagination |
| | | @size-change="handleSizeChange" |
| | | @current-change="handlePageChange" |
| | | :pagination="tableData.pagination" |
| | | > |
| | | </pagination> |
| | | </template> |
| | | </TableLayout> |
| | | </div> |
| | | <template v-slot:footer> |
| | | <el-button @click="visible=false">è¿å</el-button> |
| | | </template> |
| | | <OperaChangeShopRecordWindow ref="OperaChangeShopRecordWindow"/> |
| | | <OperaChangeIntegralWindow ref="OperaChangeIntegralWindow" @success="successBiz"/> |
| | | </GlobalWindow> |
| | | </template> |
| | | |
| | | <script> |
| | | import BaseOpera from '@/components/base/BaseOpera' |
| | | import GlobalAlertWindow from '@/components/common/GlobalAlertWindow' |
| | | import GlobalWindow from '@/components/common/GlobalWindow' |
| | | import BaseTable from '@/components/base/BaseTable' |
| | | import TableLayout from '@/layouts/TableLayout' |
| | | import Pagination from '@/components/common/Pagination' |
| | | import OperaChangeShopRecordWindow from '@/components/business/OperaChangeShopRecordWindow' |
| | | import OperaChangeIntegralWindow from '@/components/business/OperaChangeIntegralWindow' |
| | | export default { |
| | | name: 'OperaCouponWindow', |
| | | extends: BaseOpera, |
| | | components: { GlobalAlertWindow }, |
| | | name: 'OperaShopGoodsWindow', |
| | | extends: BaseTable, |
| | | components: { GlobalWindow, TableLayout, Pagination, OperaChangeShopRecordWindow,OperaChangeIntegralWindow }, |
| | | data () { |
| | | |
| | | return { |
| | | getDate: [], |
| | | // è¡¨åæ°æ® |
| | | form: { |
| | | id: null, |
| | | name: '', |
| | | nickName: '', |
| | | sex: '', |
| | | addr: '', |
| | | phone: '', |
| | | idcard: '', |
| | | info: '' |
| | | }, |
| | | |
| | | title: '', |
| | | visible: false, |
| | | tabelHeight: null, |
| | | info: {}, |
| | | // æç´¢ |
| | | searchForm: { |
| | | memberId: '', |
| | | userType: 0, |
| | | type: null |
| | | } |
| | | } |
| | | }, |
| | | |
| | | created () { |
| | | this.config({ |
| | | api: '/business/coupon', |
| | | 'field.id': 'id' |
| | | module: 'ç¨æ·ä¿¡æ¯è¡¨', |
| | | api: '/business/integral', |
| | | 'field.id': 'id', |
| | | 'field.main': 'id' |
| | | }) |
| | | }, |
| | | methods: { |
| | | |
| | | }, |
| | | successBiz(){ |
| | | this.handlePageChange() |
| | | this.$emit('success') |
| | | }, |
| | | showChangeRecord () { |
| | | if (this.info) { |
| | | this.$refs.OperaChangeShopRecordWindow.open('客æ·ç»éååæ´è®°å½', this.info) |
| | | } |
| | | }, |
| | | changeIntegral () { |
| | | if (this.info) { |
| | | this.$refs.OperaChangeIntegralWindow.open('客æ·ç§¯åè°æ´', this.info) |
| | | } |
| | | }, |
| | | open (title, goods) { |
| | | this.title = title |
| | | this.visible = true |
| | | this.info = goods |
| | | this.searchForm.memberId = goods.id |
| | | this.search() |
| | | }, |
| | | handleClick (val) { |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | <style scoped> |
| | | .table-pagination{ |
| | | position: fixed !important; |
| | | bottom: 50px; |
| | | } |
| | | .header-b{ |
| | | display: inline-block; |
| | | font-size: 16px; |
| | | font-weight: bold; |
| | | } |
| | | .header-blue{ |
| | | display: inline-block; |
| | | font-size: 12px; |
| | | border: 1px solid #216EEE; |
| | | padding: 2px 10px; |
| | | margin-left: 20px; |
| | | color: #216EEE; |
| | | border-radius: 5px ; |
| | | } |
| | | .header-btn{ |
| | | display: inline-block; |
| | | border: none; |
| | | padding: 2px 10px; |
| | | margin-left: 20px; |
| | | } |
| | | .info-item{ |
| | | display: flex; |
| | | width: 100%; |
| | | margin: 15px; |
| | | } |
| | | .info-item-a{ |
| | | flex: 1; |
| | | font-size: 14px; |
| | | |
| | | <style lang="scss"> |
| | | .descriptions-label { |
| | | width: 80px; |
| | | text-align: right !important; |
| | | display: block !important;; |
| | | } |
| | | .info-item-a span{ |
| | | font-weight: 600; |
| | | } |
| | | .info-item-a .btn{ |
| | | font-size: 12px !important; |
| | | cursor: pointer !important; |
| | | } |
| | | </style> |
| | | |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <GlobalWindow |
| | | :title="title" |
| | | width="80%" |
| | | :visible.sync="visible" |
| | | > |
| | | <TableLayout > |
| | | <!-- æç´¢è¡¨å --> |
| | | <el-form ref="searchForm" slot="search-form" :model="searchForm" label-width="10px" style="display: block;" > |
| | | <el-form-item label="" prop="name" style="display: inline-block;margin-right: 30px;"> |
| | | <el-input v-model="searchForm.name" placeholder="请è¾å
¥åç§°" @keypress.enter.native="search"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="" prop="code" style="display: inline-block;margin-right: 30px;"> |
| | | <el-input v-model="searchForm.code" placeholder="请è¾å
¥é¨åºID" @keypress.enter.native="search"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="" prop="saleType" style="display: inline-block;margin-right: 30px;"> |
| | | <!-- 0æ£å¸¸ 1ç¦ç¨ --> |
| | | <el-select v-model="searchForm.saleType" placeholder="é宿¨¡å¼" @change="search" > |
| | | <el-option :key="0" :value="0" label="å¹³å°éºè´§" ></el-option> |
| | | <el-option :key="1" :value="1" label="èªä¸»éè´" ></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="" prop="status" style="display: inline-block;margin-right: 30px;"> |
| | | <!-- 0æ£å¸¸ 1ç¦ç¨ --> |
| | | <el-select v-model="searchForm.status" placeholder="è¯·éæ©ç¶æ" @change="search" > |
| | | <el-option :key="0" :value="0" label="æ£å¸¸" ></el-option> |
| | | <el-option :key="1" :value="1" label="ç¦ç¨" ></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <section> |
| | | <el-button type="primary" @click="search">æç´¢</el-button> |
| | | <el-button @click="reset">éç½®</el-button> |
| | | </section> |
| | | </el-form> |
| | | <!-- è¡¨æ ¼åå页 --> |
| | | <template v-slot:table-wrap> |
| | | <div :style="'display: flex;height:'+tabelHeight+'px;'"> |
| | | <el-table |
| | | v-loading="isWorking.search" |
| | | :data="tableData.list" |
| | | stripe |
| | | border |
| | | @selection-change="handleSelectionChange" |
| | | > |
| | | <!-- <el-table-column type="selection" width="55"></el-table-column> --> |
| | | <el-table-column prop="name" label="åç§°" fixed align="center" min-width="100px"> </el-table-column> |
| | | <el-table-column prop="code" label="é¨åºID" align="center" min-width="100px"></el-table-column> |
| | | <el-table-column prop="bigAreaName" label="æå±åºå" align="center" min-width="100px"></el-table-column> |
| | | <el-table-column prop="areaFullName" label="çå¸åº" align="center" min-width="150px" show-overflow-tooltip> |
| | | <template slot-scope="{row}"> |
| | | <span v-if="row.areas!=null">{{(row.areas.provinceName||'') + (row.areas.cityName||'') + (row.areas.name||'')}}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="saleType" label="é宿¨¡å¼" align="center" min-width="150px"> |
| | | <template slot-scope="{row}"> |
| | | {{ row.saleType == 1?'èªä¸»éè´':'å¹³å°éºè´§'}} |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="status" label="ç¶æ" align="center" min-width="100px" fixed="right"> |
| | | <template slot-scope="{row}"> |
| | | {{ row.status == 1?'ç¦ç¨':'æ£å¸¸'}} |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="price" label="éå®ä»·" align="center" min-width="100px" fixed="right"> |
| | | {{ price}} |
| | | </el-table-column> |
| | | <el-table-column prop="goodsPrice" label="ä¾è´§ä»·" align="center" min-width="100px" fixed="right"> |
| | | <template slot-scope="scope"> |
| | | <el-input v-if="scope.row.isPriceSelected" v-model="scope.row.goodsPrice" |
| | | @focus="focusEvent(scope.row,scope.$index,scope.column)" |
| | | @blur="blurEvent(scope.row,scope.$index,scope.column)" v-focus></el-input> |
| | | <p style="cursor: pointer" class="blue" title="ç¹å»ç¼è¾" @click="cellClick(scope.row, scope.column)" v-else>{{scope.row.goodsPrice || 'æªè®¾ç½®' }}</p> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | <pagination |
| | | @size-change="handleSizeChange" |
| | | @current-change="handlePageChange" |
| | | :pagination="tableData.pagination" |
| | | > |
| | | </pagination> |
| | | </div> |
| | | </template> |
| | | </TableLayout> |
| | | <template v-slot:footer> |
| | | <el-button @click="visible=false">è¿å</el-button> |
| | | </template> |
| | | </GlobalWindow> |
| | | </template> |
| | | |
| | | <script> |
| | | import GlobalWindow from '@/components/common/GlobalWindow' |
| | | import BaseTable from '@/components/base/BaseTable' |
| | | import TableLayout from '@/layouts/TableLayout' |
| | | import Pagination from '@/components/common/Pagination' |
| | | export default { |
| | | name: 'OperaShopGoodsWindow', |
| | | extends: BaseTable, |
| | | components: { GlobalWindow, TableLayout, Pagination }, |
| | | data () { |
| | | return { |
| | | activeName: 'first', |
| | | title: '', |
| | | price : null, |
| | | visible: false, |
| | | tabelHeight: null, |
| | | // æç´¢ |
| | | searchForm: { |
| | | name: '', |
| | | goodsId: null, |
| | | username: '', |
| | | status: '', |
| | | saleType: '', |
| | | isrec: '' |
| | | } |
| | | } |
| | | }, |
| | | mounted () { |
| | | window.addEventListener('resize', this.handleResize) |
| | | }, |
| | | beforeDestroy () { |
| | | window.removeEventListener('resize', this.handleResize) |
| | | }, |
| | | created () { |
| | | this.config({ |
| | | module: 'ååä¿¡æ¯è¡¨', |
| | | api: '/business/shop', |
| | | 'field.id': 'id', |
| | | 'field.main': 'id' |
| | | }) |
| | | this.handleResize() |
| | | }, |
| | | directives: { |
| | | focus: { |
| | | inserted: function (el) { |
| | | el.querySelector('input').focus() |
| | | } |
| | | } |
| | | }, |
| | | methods: { |
| | | handleResize () { |
| | | this.tabelHeight = window.innerHeight - 300 |
| | | }, |
| | | open (title, goods) { |
| | | this.title = title |
| | | this.visible = true |
| | | this.price = goods.skuPrice |
| | | this.searchForm.goodsId = goods.id |
| | | this.search() |
| | | }, |
| | | handlePageChange: function (pageIndex) { |
| | | this.__checkApi() |
| | | this.tableData.pagination.pageIndex = pageIndex || this.tableData.pagination.pageIndex |
| | | this.isWorking.search = true |
| | | this.api.fetchList({ |
| | | page: this.tableData.pagination.pageIndex, |
| | | capacity: this.tableData.pagination.pageSize, |
| | | model: this.searchForm, |
| | | sorts: this.tableData.sorts |
| | | }) |
| | | .then(data => { |
| | | (data.records|| []).forEach((item) => { |
| | | item.isPriceSelected = false |
| | | }) |
| | | this.tableData.list = data.records || [] |
| | | this.tableData.pagination.total = data.total |
| | | console.log(this.tableData.list) |
| | | }) |
| | | .catch(e => { |
| | | this.$tip.apiFailed(e) |
| | | }) |
| | | .finally(() => { |
| | | this.isWorking.search = false |
| | | }) |
| | | }, |
| | | cellClick (row, column) { |
| | | row.isPriceSelected = !row.isPriceSelected |
| | | }, |
| | | focusEvent (row, index, column) { |
| | | row.oldGoodsPrice = row.goodsPrice |
| | | }, |
| | | blurEvent (row, curIndex, column) { |
| | | if(this.price >= row.goodsPrice) { |
| | | this.$tip.error('ä¾è´§ä»·ä¸è½ä½äºéå®ä»·') |
| | | row.isPriceSelected = !row.isPriceSelected |
| | | row.goodsPrice = row.oldGoodsPrice// ä»·æ ¼è¿å |
| | | return |
| | | } |
| | | if( row.goodsPrice == row.oldGoodsPrice){ |
| | | row.isPriceSelected = !row.isPriceSelected |
| | | return; |
| | | } |
| | | this.api.setGoodsPrice({ |
| | | id: row.id, |
| | | goodsId: this.searchForm.goodsId, |
| | | goodsPrice: row.goodsPrice |
| | | }).then(res => { |
| | | row.oldGoodsPrice = row.goodsPrice |
| | | this.$tip.success('ä¿®æ¹æå') |
| | | this.$emit('success') |
| | | }).catch(e => { |
| | | row.goodsPrice = row.oldGoodsPrice// ä»·æ ¼è¿å |
| | | }).finally(() => { |
| | | row.isPriceSelected = !row.isPriceSelected |
| | | }) |
| | | }, |
| | | handleClick (val) { |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | <style scoped> |
| | | .table-pagination{ |
| | | position: fixed !important; |
| | | bottom: 50px; |
| | | } |
| | | </style> |
| | |
| | | <TableLayout :permissions="['business:member:query']"> |
| | | <!-- æç´¢è¡¨å --> |
| | | <el-form ref="searchForm" slot="search-form" :model="searchForm" label-width="100px" inline> |
| | | <el-form-item label="ç¨æ·" prop="nickname"> |
| | | <el-input v-model="searchForm.nickname" placeholder="请è¾å
¥æµç§°/ææºå·/çå®å§å" @keypress.enter.native="search"></el-input> |
| | | <el-form-item label="ç¨æ·" prop="nickname "> |
| | | <el-input v-model="searchForm.nickname" style="width: 160px" placeholder="æµç§°/ææºå·/çå®å§å" @keypress.enter.native="search"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="ç¶æ" prop="status" > |
| | | <el-select v-model="searchForm.status" placeholder="ç¶æ" clearable @change="search"> |
| | | <el-option :key="0" :value="0" label="å¯ç¨"></el-option> |
| | | <el-option :key="1" :value="1" label="ç¦ç¨"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="å
³èç»éå" prop="shopName "> |
| | | <el-input v-model="searchForm.shopName" style="width: 160px" placeholder="ç»éååç§°" @keypress.enter.native="search"></el-input> |
| | | </el-form-item> |
| | | <div class="date-style" style="display: inline"> |
| | | <el-form-item label="å建æ¶é´" prop="queryStartDate" > |
| | | <el-date-picker |
| | | style="width: 160px" |
| | | v-model="searchForm.starttime" |
| | | type="datetime" |
| | | value-format="yyyy-MM-dd HH:mm:ss" |
| | | format="yyyy-MM-dd HH:mm:ss" |
| | | range-separator="è³" |
| | | placeholder="å¼å§æ¶é´" |
| | | ></el-date-picker> |
| | | </el-form-item> |
| | | <el-form-item label="-" label-width="10px" prop="queryEndDate" > |
| | | <el-date-picker |
| | | style="width: 160px" |
| | | v-model="searchForm.endtime" |
| | | type="datetime" |
| | | value-format="yyyy-MM-dd HH:mm:ss" |
| | | format="yyyy-MM-dd HH:mm:ss" |
| | | range-separator="è³" |
| | | placeholder="æªæ¢æ¶é´" |
| | | ></el-date-picker> |
| | | </el-form-item> |
| | | </div> |
| | | |
| | | <section> |
| | | <el-button type="primary" @click="search">æç´¢</el-button> |
| | | <el-button @click="reset">éç½®</el-button> |
| | |
| | | </el-form> |
| | | <!-- è¡¨æ ¼åå页 --> |
| | | <template v-slot:table-wrap> |
| | | <ul class="toolbar" v-permissions="['business:member:exportExcel' ]"> |
| | | <li> <el-button type="primary" :loading="isWorking.export" v-permissions="['business:member:exportExcel']" @click="exportExcel">导åº</el-button></li> |
| | | </ul> |
| | | <el-table |
| | | v-loading="isWorking.search" |
| | | :data="tableData.list" |
| | | stripe |
| | | border |
| | | > |
| | | <el-table-column prop="creator" label="ç¨æ·" align="center" min-width="100px"> |
| | | <template slot-scope="{row}"> |
| | | <el-image style="width: 60px; height: 60px; border-radius: 50%;" :src="row.imgFullUrl"></el-image> |
| | | {{ row.nickName }} |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="openid" label="微信openid" align="center" min-width="100px"></el-table-column> |
| | | <el-table-column prop="nickname" label="æµç§°" align="center" min-width="100px"></el-table-column> |
| | | <el-table-column prop="name" label="çå®å§å" align="center" min-width="100px"></el-table-column> |
| | | <el-table-column prop="phone" label="ææºå·" align="center" min-width="100px"></el-table-column> |
| | | <el-table-column prop="name" label="客æ·å§å" align="center" min-width="100px"></el-table-column> |
| | | <el-table-column prop="phone" label="ææææºå·" align="center" min-width="100px"></el-table-column> |
| | | <el-table-column prop="idcard" label="身份è¯å·" align="center" min-width="100px"></el-table-column> |
| | | <el-table-column prop="integral" label="ç§¯åæ°é" align="center" min-width="100px"></el-table-column> |
| | | <el-table-column prop="integral" label="ç°æç§¯å" align="center" min-width="100px"></el-table-column> |
| | | <el-table-column prop="totalIntegral" label="累计积å" align="center" min-width="100px"></el-table-column> |
| | | <el-table-column prop="totalIntegral" label="累计æ£é¤" align="center" min-width="100px"></el-table-column> |
| | | <el-table-column prop="shopName" label="å
³èç»éå" align="center" min-width="100px"></el-table-column> |
| | | <el-table-column prop="createDate" label="å建æ¶é´" align="center" min-width="140px"></el-table-column> |
| | | <el-table-column label="ç¶æ" align="center" min-width="100px"> |
| | | <template slot-scope="{row}"> |
| | |
| | | ></el-switch> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="æä½" align="center" min-width="100px"> |
| | | <el-table-column label="æä½" align="center" min-width="200px"> |
| | | <template slot-scope="{row}"> |
| | | <el-button type="text" @click="showMemberDetail(row)">详æ
</el-button> |
| | | <el-button type="text" v-if="row.bindShopId !=null" @click="changeShop(row)">æ´æ¢ç»éå</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | |
| | | :pagination="tableData.pagination" |
| | | > |
| | | </pagination> |
| | | <OperaMemberDetail ref="operaMemberDetail" /> |
| | | <OperaChangeShopWindow ref="OperaChangeShopWindow" @success="handlePageChange" /> |
| | | <OperaMemberDetail ref="operaMemberDetail" @success="handlePageChange"/> |
| | | </template> |
| | | </TableLayout> |
| | | </template> |
| | |
| | | import TableLayout from '@/layouts/TableLayout' |
| | | import Pagination from '@/components/common/Pagination' |
| | | import OperaMemberDetail from '@/components/business/OperaMemberDetail' |
| | | import OperaChangeShopWindow from '@/components/business/OperaChangeShopWindow' |
| | | import { updateById } from '@/api/business/member' |
| | | export default { |
| | | name: 'Member', |
| | | extends: BaseTable, |
| | | components: { TableLayout, Pagination, OperaMemberDetail }, |
| | | components: { TableLayout, Pagination, OperaMemberDetail ,OperaChangeShopWindow}, |
| | | data () { |
| | | return { |
| | | // æç´¢ |
| | | searchForm: { |
| | | nickname: '' |
| | | starttime: null, |
| | | endtime: null, |
| | | status: null, |
| | | nickname: '', |
| | | shopName: '' |
| | | } |
| | | } |
| | | }, |
| | |
| | | this.search() |
| | | }, |
| | | methods: { |
| | | changeShop(row){ |
| | | this.$refs.OperaChangeShopWindow.open('æ´æ¢ç»éå',row) |
| | | }, |
| | | statusChange(row) { |
| | | console.log(row); |
| | | updateById(row) |
| | |
| | | </script> |
| | | |
| | | <style scoped> |
| | | ::v-deep .el-input{ |
| | | /*::v-deep .el-input{ |
| | | width: 200px; |
| | | } |
| | | }*/ |
| | | </style> |
| | |
| | | <TableLayout :permissions="['business:membercoupon:query']"> |
| | | <!-- æç´¢è¡¨å --> |
| | | <el-form ref="searchForm" slot="search-form" :model="searchForm" label-width="100px" inline> |
| | | <el-form-item label="ç¨æ·" prop="nikeName"> |
| | | <el-form-item label="ç¨æ·" prop="nikeName" > |
| | | <el-input v-model="searchForm.nikeName" placeholder="请è¾å
¥ç¨æ·æµç§°/ææºå· " clearable @keypress.enter.native="search"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="伿 å¸åç§°" prop="name"> |
| | |
| | | :data="tableData.list" |
| | | stripe |
| | | > |
| | | <el-table-column prop="nikeName" label="ç¨æ·" min-width="100px"></el-table-column> |
| | | <el-table-column prop="nikeName" label="ç¨æ·" min-width="180px"></el-table-column> |
| | | <el-table-column prop="name" label="伿 å¸åç§°" min-width="100px"></el-table-column> |
| | | <el-table-column prop="couponType" label="伿 å¸ç±»å" min-width="100px"> |
| | | <template slot-scope="{row}"> |
| | |
| | | @selection-change="handleSelectionChange" |
| | | > |
| | | <el-table-column type="selection" width="55"></el-table-column> |
| | | <el-table-column prop="imgurl" label="ååä¿¡æ¯" min-width="100px"> |
| | | <el-table-column prop="imgurl" label="ååä¿¡æ¯" min-width="80px"> |
| | | <template slot-scope="{row}"> |
| | | <el-image style="width: 80px;height: 80px;" v-if="row.imgurl && row.imgurl!=''" :src="row.resourcePath+row.imgurl" :preview-src-list="[row.resourcePath+row.imgurl]"></el-image> |
| | | <el-image style="width: 50px;height: 50px;" v-if="row.imgurl && row.imgurl!=''" :src="row.resourcePath+row.imgurl" :preview-src-list="[row.resourcePath+row.imgurl]"></el-image> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="id" label="ååID" min-width="150px" ></el-table-column> |
| | |
| | | <el-table-column prop="categoryName" label="æå±åç±»" min-width="120px"></el-table-column> |
| | | <el-table-column prop="brandName" label="æå±åç" min-width="120px"></el-table-column> |
| | | <el-table-column prop="price" label="å±ç¤ºä»·æ ¼" min-width="100px"></el-table-column> |
| | | <el-table-column prop="stockNum" label="å©ä½åºåé" min-width="100px"></el-table-column> |
| | | <el-table-column prop="salesVolume" label="å®é
éé" min-width="100px"></el-table-column> |
| | | <el-table-column prop="skuPrice" label="é¶å®ä»·(å
)" min-width="100px"></el-table-column> |
| | | <el-table-column prop="skuPrice" label="éå®ä»·(å
)" min-width="100px"></el-table-column> |
| | | <el-table-column prop="shopPrice" label="ä¾è´§ä»·è®¾ç½®" min-width="100px" align="center"> |
| | | <template slot-scope="{row}" > |
| | | <div @click="goPriceSet(row)" style="cursor:pointer;"><span class="red"> {{row.shopPriceNum||0}}</span> / <span class="green"> {{row.shopNum||0}}</span> </div> |
| | | <div @click="goPriceSet(row)" style="cursor:pointer;"><span class="red"> {{row.pricedShopNum||0}}</span> / <span class="green"> {{row.shopNum||0}}</span> </div> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="stockNum" label="å©ä½åºåé" min-width="100px"></el-table-column> |
| | | <el-table-column prop="salesVolume" label="å®é
éé" min-width="100px"></el-table-column> |
| | | <el-table-column prop="editDate" label="æè¿æ´æ°æ¶é´" min-width="100px"></el-table-column> |
| | | <el-table-column prop="status" label="ä¸ä¸æ¶ç¶æ" min-width="100px" fixed="right" align="center"> |
| | | <template slot-scope="{row}"> |
| | |
| | | fixed="right" |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <el-button type="text" @click="$refs.operaGoodsWindow.open('ç¼è¾åå', row, 0)" v-permissions="['business:goods:update']">ç¼è¾</el-button> |
| | | <el-button type="text" v-if="row.status == 1" @click="$refs.operaGoodsWindow.open('ç¼è¾åå', row, 0)" v-permissions="['business:goods:update']">ç¼è¾</el-button> |
| | | <el-button type="text" @click="goPriceSet(row)">ä¾è´§ä»·</el-button> |
| | | <el-button type="text" style="color: red;" @click="deleteById(row)" v-permissions="['business:goods:delete']">å é¤</el-button> |
| | | <!-- <el-button type="text" @click="$refs.operaGoodsDetailWindow.open('åå详æ
', row, 0)">æ¥ç详æ
</el-button>--> |
| | | <!-- <el-button type="text" @click="$refs.operaGoodsDetailWindow.open('åå详æ
', row, 0)">æ¥ç详æ
</el-button>--> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | |
| | | <OperaGoodsWindow ref="operaGoodsWindow" @success="handlePageChange"/> |
| | | <OperaGoodsDetailWindow ref="operaGoodsDetailWindow"/> |
| | | <OperaPlatformGoodsSkuWindow ref="operaPlatformGoodsSkuWindow"/> |
| | | <OperaShopGoodsWindow ref="OperaShopGoodsWindow" @success="priceSuccess"/> |
| | | </TableLayout> |
| | | </template> |
| | | |
| | |
| | | import OperaGoodsWindow from '@/components/business/OperaGoodsWindow' |
| | | import OperaGoodsDetailWindow from '@/components/business/OperaGoodsDetailWindow' |
| | | import OperaPlatformGoodsSkuWindow from '@/components/business/OperaPlatformGoodsSkuWindow' |
| | | import OperaShopGoodsWindow from '@/components/business/OperaShopGoodsWindow' |
| | | import { findAll as labelList } from '@/api/business/labels' |
| | | export default { |
| | | name: 'Goods', |
| | | extends: BaseTable, |
| | | components: { TableLayout, Pagination, OperaGoodsWindow, OperaGoodsDetailWindow, OperaPlatformGoodsSkuWindow }, |
| | | components: { TableLayout, Pagination, OperaGoodsWindow, OperaGoodsDetailWindow, OperaPlatformGoodsSkuWindow ,OperaShopGoodsWindow}, |
| | | data () { |
| | | return { |
| | | activeName: 'first', |
| | |
| | | }) |
| | | }, |
| | | methods: { |
| | | priceSuccess(){ |
| | | this.handlePageChange() |
| | | }, |
| | | goPriceSet(row){ |
| | | |
| | | if(row.skuPrice == null){ |
| | | this.$tip.warning('请å
设置ååéå®ä»·ï¼') |
| | | return |
| | | } |
| | | this.$refs.OperaShopGoodsWindow.open('设置ä¾è´§ä»· - '+row.name, row ) |
| | | }, |
| | | handleClick (val) { |
| | | |
| | | }, |
| | | /** |
| | | * |
| | |
| | | statusChangeBiz (rows) { |
| | | this.api.updateStatus(rows) |
| | | .then(() => { |
| | | this.search() |
| | | this.handlePageChange() |
| | | }) |
| | | .catch(e => { |
| | | this.search() |
| | | this.handlePageChange() |
| | | }) |
| | | } |
| | | } |
| | |
| | | model.setStrType("æ¯åº"); |
| | | } |
| | | model.setStrObjType(Constants.IntegralObjType.getName(model.getObjType())); |
| | | |
| | | } |
| | | ExcelExporter.build(Integral.class).export(list, "ç¨æ·ç§¯åæç»"+ DateUtil.getNowLongTime(), response); |
| | | } |
| | |
| | | import com.doumee.core.model.ApiResponse; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.dao.business.model.Integral; |
| | | import com.doumee.dao.business.model.Member; |
| | | import com.doumee.dao.system.dto.MemberRechargeDTO; |
| | | import com.doumee.service.business.MemberService; |
| | |
| | | memberService.updateById(member); |
| | | return ApiResponse.success(null); |
| | | } |
| | | @ApiOperation("æ´æ¢ç»éå") |
| | | @PostMapping("/updateShop") |
| | | @RequiresPermissions("business:member:update") |
| | | public ApiResponse updateShop(@RequestBody Member member) { |
| | | memberService.updateShop(member); |
| | | return ApiResponse.success(null); |
| | | } |
| | | @ApiOperation("è°æ´ç§¯å") |
| | | @PostMapping("/updateIntegral") |
| | | @RequiresPermissions("business:member:update") |
| | | public ApiResponse updateIntegral(@RequestBody Integral param) { |
| | | memberService.updateIntegral(param); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("å页æ¥è¯¢") |
| | | @PostMapping("/page") |
| | |
| | | ExcelExporter.build(MemberRechargeDTO.class).export(collect, "ç¨æ·ä¿¡æ¯è¡¨", response); |
| | | } |
| | | } |
| | | @ApiOperation("导åºExcel") |
| | | @PostMapping("/exportExcelList") |
| | | @RequiresPermissions("business:member:exportExcel") |
| | | public void exportExcelList (@RequestBody PageWrap<Member> pageWrap, HttpServletResponse response) { |
| | | ExcelExporter.build(Member.class).export( memberService.findPage(pageWrap).getRecords(), "ç¨æ·ä¿¡æ¯è¡¨", response); |
| | | } |
| | | |
| | | @ApiOperation("æ ¹æ®IDæ¥è¯¢") |
| | | @GetMapping("/{id}") |
| | |
| | | public ApiResponse create(@RequestBody Shop shop) { |
| | | return ApiResponse.success(shopService.create(shop)); |
| | | } |
| | | @PreventRepeat |
| | | @ApiOperation("设置ä¾è´§ä»·") |
| | | @PostMapping("/setGoodsPrice") |
| | | @RequiresPermissions("business:shop:update") |
| | | public ApiResponse setGoodsPrice(@RequestBody Shop shop) { |
| | | return ApiResponse.success(shopService.setGoodsPrice(shop)); |
| | | } |
| | | |
| | | @ApiOperation("æ ¹æ®IDå é¤") |
| | | @GetMapping("/delete/{id}") |
| | |
| | | @ApiOperation("æ¥è¯¢æææ°æ®") |
| | | @PostMapping("/findAll") |
| | | @RequiresPermissions("business:shop:query") |
| | | public ApiResponse<List<Shop>> findAll (@RequestBody PageWrap<Shop> pageWrap) { |
| | | return ApiResponse.success(shopService.findAll(pageWrap)); |
| | | public ApiResponse<List<Shop>> findAll (@RequestBody Shop pageWrap) { |
| | | return ApiResponse.success(shopService.findList(pageWrap)); |
| | | } |
| | | |
| | | |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.api.business; |
| | | |
| | | import com.doumee.api.BaseController; |
| | | import com.doumee.core.annotation.excel.ExcelExporter; |
| | | import com.doumee.core.annotation.pr.PreventRepeat; |
| | | import com.doumee.core.model.ApiResponse; |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.dao.business.model.UserAction; |
| | | import com.doumee.service.business.UserActionService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.apache.shiro.authz.annotation.RequiresPermissions; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author æ±è¹è¹ |
| | | * @date 2023/12/14 13:57 |
| | | */ |
| | | @Api(tags = "人åæä½è®°å½æ¥å¿") |
| | | @RestController |
| | | @RequestMapping("/business/userAction") |
| | | public class UserActionController extends BaseController { |
| | | |
| | | @Autowired |
| | | private UserActionService userActionService; |
| | | |
| | | @PreventRepeat |
| | | @ApiOperation("æ°å»º") |
| | | @PostMapping("/create") |
| | | @RequiresPermissions("business:useraction:create") |
| | | public ApiResponse create(@RequestBody UserAction userAction) { |
| | | return ApiResponse.success(userActionService.create(userAction)); |
| | | } |
| | | |
| | | @ApiOperation("æ ¹æ®IDå é¤") |
| | | @GetMapping("/delete/{id}") |
| | | @RequiresPermissions("business:useraction:delete") |
| | | public ApiResponse deleteById(@PathVariable Integer id) { |
| | | userActionService.deleteById(id); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("æ¹éå é¤") |
| | | @GetMapping("/delete/batch") |
| | | @RequiresPermissions("business:useraction:delete") |
| | | public ApiResponse deleteByIdInBatch(@RequestParam String ids) { |
| | | String [] idArray = ids.split(","); |
| | | List<Integer> idList = new ArrayList<>(); |
| | | for (String id : idArray) { |
| | | idList.add(Integer.valueOf(id)); |
| | | } |
| | | userActionService.deleteByIdInBatch(idList); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("æ ¹æ®IDä¿®æ¹") |
| | | @PostMapping("/updateById") |
| | | @RequiresPermissions("business:useraction:update") |
| | | public ApiResponse updateById(@RequestBody UserAction userAction) { |
| | | userActionService.updateById(userAction); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("å页æ¥è¯¢") |
| | | @PostMapping("/page") |
| | | @RequiresPermissions("business:useraction:query") |
| | | public ApiResponse<PageData<UserAction>> findPage (@RequestBody PageWrap<UserAction> pageWrap) { |
| | | return ApiResponse.success(userActionService.findPage(pageWrap)); |
| | | } |
| | | |
| | | @ApiOperation("导åºExcel") |
| | | @PostMapping("/exportExcel") |
| | | @RequiresPermissions("business:useraction:exportExcel") |
| | | public void exportExcel (@RequestBody PageWrap<UserAction> pageWrap, HttpServletResponse response) { |
| | | ExcelExporter.build(UserAction.class).export(userActionService.findPage(pageWrap).getRecords(), "人åæä½è®°å½æ¥å¿", response); |
| | | } |
| | | |
| | | @ApiOperation("æ ¹æ®IDæ¥è¯¢") |
| | | @GetMapping("/{id}") |
| | | @RequiresPermissions("business:useraction:query") |
| | | public ApiResponse findById(@PathVariable Integer id) { |
| | | return ApiResponse.success(userActionService.findById(id)); |
| | | } |
| | | } |
| | |
| | | SYSTEM_RECHARGE(12,"å¹³å°å
å¼","å¹³å°å
å¼",0), |
| | | SYSTEM_DEDUCT(13,"平尿£æ¬¾","平尿£æ¬¾",0), |
| | | SHOP_ORDER_CANCEL(14,"ç§¯åæµæ£ååéè¿","ç§¯åæµæ£ååéè¿",0), |
| | | |
| | | |
| | | ORDER_DONATE(15,"订åèµ é积å","订åèµ é积å",0), |
| | | ORDER_DONE_AMOUNT(16,"订åç»ç®éé¢","订åç»ç®éé¢",0), |
| | | |
| | |
| | | } |
| | | } |
| | | |
| | | public enum UserActionType { |
| | | CHANGE_SHOP(0, "ç»éåæ´æ¢","ç±ã${param1}ãäºã${param2}ãï¼è¿è¡ãç»éåæ´æ¢ã" ), |
| | | ; |
| | | |
| | | // æååé |
| | | private int key; |
| | | private String name; |
| | | private String info; |
| | | |
| | | // æé æ¹æ³ |
| | | UserActionType(int key, String name,String info ) { |
| | | this.key = key; |
| | | this.info = info; |
| | | this.name = name; |
| | | } |
| | | public static String getName(int index) { |
| | | for (UserActionType c : UserActionType.values()) { |
| | | if (c.getKey() == index) { |
| | | return c.name; |
| | | } |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | public int getKey() { |
| | | return key; |
| | | } |
| | | |
| | | public void setKey(int key) { |
| | | this.key = key; |
| | | } |
| | | |
| | | public String getName() { |
| | | return name; |
| | | } |
| | | |
| | | public void setName(String name) { |
| | | this.name = name; |
| | | } |
| | | |
| | | public String getInfo() { |
| | | return info; |
| | | } |
| | | |
| | | public void setInfo(String info) { |
| | | this.info = info; |
| | | } |
| | | } |
| | | } |
| | |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.doumee.dao.business.model.Member; |
| | | import com.github.yulichang.base.MPJBaseMapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.apache.ibatis.annotations.Select; |
| | | |
| | |
| | | * @author æ±è¹è¹ |
| | | * @date 2023/03/21 15:48 |
| | | */ |
| | | public interface MemberMapper extends BaseMapper<Member> { |
| | | public interface MemberMapper extends MPJBaseMapper<Member> { |
| | | |
| | | |
| | | /** |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.dao.business; |
| | | |
| | | import com.doumee.dao.business.model.UserAction; |
| | | import com.github.yulichang.base.MPJBaseMapper; |
| | | |
| | | /** |
| | | * @author æ±è¹è¹ |
| | | * @date 2023/11/30 15:33 |
| | | */ |
| | | public interface UserActionMapper extends MPJBaseMapper<UserAction> { |
| | | |
| | | } |
| | |
| | | @ApiModelProperty(value = "ååSKUè§æ ¼ç»") |
| | | @TableField(exist = false) |
| | | private List<GoodsSku> goodsSkuList; |
| | | @ApiModelProperty(value = "ä¾é·åæ°é") |
| | | @TableField(exist = false) |
| | | private Long shopNum; |
| | | @ApiModelProperty(value = "已设置ä¾é·åæ°é") |
| | | @TableField(exist = false) |
| | | private Long pricedShopNum; |
| | | |
| | | |
| | | } |
| | |
| | | public class Member { |
| | | |
| | | @ApiModelProperty(value = "主é®", example = "1") |
| | | @ExcelColumn(name="主é®") |
| | | // @ExcelColumn(name="主é®") |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Integer id; |
| | | |
| | | @ApiModelProperty(value = "å建人ç¼ç ", example = "1") |
| | | @ExcelColumn(name="å建人ç¼ç ") |
| | | // @ExcelColumn(name="å建人ç¼ç ") |
| | | private Integer creator; |
| | | |
| | | @ApiModelProperty(value = "å建æ¶é´") |
| | | @ExcelColumn(name="å建æ¶é´") |
| | | |
| | | @ExcelColumn(name="å建æ¶é´",width = 10,index = 8,dateFormat = "yyyy-MM-dd HH:mm:ss") |
| | | private Date createDate; |
| | | |
| | | @ApiModelProperty(value = "æ´æ°äººç¼ç ", example = "1") |
| | | @ExcelColumn(name="æ´æ°äººç¼ç ") |
| | | // @ExcelColumn(name="æ´æ°äººç¼ç ") |
| | | private Integer editor; |
| | | |
| | | @ApiModelProperty(value = "æ´æ°æ¶é´") |
| | | @ExcelColumn(name="æ´æ°æ¶é´") |
| | | // @ExcelColumn(name="æ´æ°æ¶é´") |
| | | |
| | | private Date editDate; |
| | | |
| | | @ApiModelProperty(value = "æ¯å¦å é¤0å¦ 1æ¯", example = "1") |
| | | @ExcelColumn(name="æ¯å¦å é¤0å¦ 1æ¯") |
| | | // @ExcelColumn(name="æ¯å¦å é¤0å¦ 1æ¯") |
| | | private Integer isdeleted; |
| | | |
| | | @ApiModelProperty(value = "夿³¨") |
| | | @ExcelColumn(name="夿³¨") |
| | | // @ExcelColumn(name="夿³¨") |
| | | private String remark; |
| | | |
| | | @ApiModelProperty(value = "æµç§°") |
| | | @ExcelColumn(name="æµç§°") |
| | | @ExcelColumn(name="æµç§°",width = 10,index = 2) |
| | | private String nickname; |
| | | |
| | | @ApiModelProperty(value = "头å") |
| | | @ExcelColumn(name="头å") |
| | | // @ExcelColumn(name="头å") |
| | | private String imgurl; |
| | | |
| | | @ApiModelProperty(value = "çå®å§å") |
| | | @ExcelColumn(name="çå®å§å") |
| | | @ExcelColumn(name="客æ·å§å",width = 10,index = 3) |
| | | private String name; |
| | | |
| | | @ApiModelProperty(value = "ææºå·") |
| | | @ExcelColumn(name="ææºå·") |
| | | @ExcelColumn(name="ææææºå·",width = 10,index = 4) |
| | | private String phone; |
| | | |
| | | @ApiModelProperty(value = "身份è¯å·") |
| | | @ExcelColumn(name="身份è¯å·") |
| | | // @ExcelColumn(name="身份è¯å·") |
| | | private String idcard; |
| | | |
| | | @ApiModelProperty(value = "èº«ä»½è¯æ£é¢ç
§") |
| | | @ExcelColumn(name="èº«ä»½è¯æ£é¢ç
§") |
| | | // @ExcelColumn(name="èº«ä»½è¯æ£é¢ç
§") |
| | | private String idcardImg; |
| | | |
| | | @ApiModelProperty(value = "身份è¯åé¢ç
§") |
| | | @ExcelColumn(name="身份è¯åé¢ç
§") |
| | | // @ExcelColumn(name="身份è¯åé¢ç
§") |
| | | private String idcardImgBack; |
| | | |
| | | @ApiModelProperty(value = "积åä½é¢", example = "1") |
| | | @ExcelColumn(name="积åä½é¢") |
| | | @ExcelColumn(name="积åä½é¢",width = 10,index = 5) |
| | | private BigDecimal integral; |
| | | |
| | | @ApiModelProperty(value = "积å累计", example = "1") |
| | | @ExcelColumn(name="积å累计") |
| | | @ExcelColumn(name="积å累计è·å¾",width = 10,index = 6) |
| | | private BigDecimal totalIntegral; |
| | | |
| | | @ApiModelProperty(value = "ç¶æ0æ£å¸¸ 1å¼å¸¸", example = "1") |
| | | @ExcelColumn(name="ç¶æ0æ£å¸¸ 1å¼å¸¸") |
| | | @ExcelColumn(name="ç¶æ",width = 10,index =9,valueMapping = "0=å¯ç¨;1=ç¦ç¨") |
| | | private Integer status; |
| | | |
| | | @ApiModelProperty(value = "æ§å« 0ç· 1女 2æªç¥", example = "1") |
| | | @ExcelColumn(name="æ§å« 0ç· 1女 2æªç¥") |
| | | // @ExcelColumn(name="æ§å« 0ç· 1女 2æªç¥") |
| | | private Integer sex; |
| | | |
| | | @ApiModelProperty(value = "å®ä½ç»åº¦", example = "1") |
| | | @ExcelColumn(name="å®ä½ç»åº¦") |
| | | // @ExcelColumn(name="å®ä½ç»åº¦") |
| | | private BigDecimal longitude; |
| | | |
| | | @ApiModelProperty(value = "å®ä½ç»´åº¦", example = "1") |
| | | @ExcelColumn(name="å®ä½ç»´åº¦") |
| | | // @ExcelColumn(name="å®ä½ç»´åº¦") |
| | | private BigDecimal latitude; |
| | | |
| | | @ApiModelProperty(value = "å½åæå¨åå¸ç¼ç ï¼å
³èareas表ï¼", example = "1") |
| | | @ExcelColumn(name="å½åæå¨åå¸ç¼ç ï¼å
³èareas表ï¼") |
| | | // @ExcelColumn(name="å½åæå¨åå¸ç¼ç ï¼å
³èareas表ï¼") |
| | | private Integer cityId; |
| | | |
| | | @ApiModelProperty(value = "å°å") |
| | | @ExcelColumn(name="å°å") |
| | | // @ExcelColumn(name="å°å") |
| | | private String addr; |
| | | |
| | | @ApiModelProperty(value = "ç±»å 0æ®éç¨æ·", example = "1") |
| | | @ExcelColumn(name="ç±»å 0æ®éç¨æ·") |
| | | // @ExcelColumn(name="ç±»å 0æ®éç¨æ·") |
| | | private Integer type; |
| | | |
| | | @ApiModelProperty(value = "ä¸å¥è¯ä»ç»") |
| | | @ExcelColumn(name="ä¸å¥è¯ä»ç»") |
| | | // @ExcelColumn(name="ä¸å¥è¯ä»ç»") |
| | | private String info; |
| | | |
| | | @ApiModelProperty(value = "æ°æ®æ¥æº 0å°ç¨åºæ³¨å 1åå°å½å
¥", example = "1") |
| | | @ExcelColumn(name="æ°æ®æ¥æº 0å°ç¨åºæ³¨å 1åå°å½å
¥") |
| | | // @ExcelColumn(name="æ°æ®æ¥æº 0å°ç¨åºæ³¨å 1åå°å½å
¥") |
| | | private Integer origin; |
| | | |
| | | @ApiModelProperty(value = "é请人ç¼ç ï¼å
³èmember表ï¼", example = "1") |
| | | @ExcelColumn(name="é请人ç¼ç ï¼å
³èmember表ï¼") |
| | | // @ExcelColumn(name="é请人ç¼ç ï¼å
³èmember表ï¼") |
| | | private Integer recId; |
| | | |
| | | @ApiModelProperty(value = "é请å¥å±åè±", example = "1") |
| | | @ExcelColumn(name="é请å¥å±åè±") |
| | | // @ExcelColumn(name="é请å¥å±åè±") |
| | | private BigDecimal recIntegral; |
| | | |
| | | @ApiModelProperty(value = "注åå¥å±åè±", example = "1") |
| | | @ExcelColumn(name="注åå¥å±åè±") |
| | | // @ExcelColumn(name="注åå¥å±åè±") |
| | | private BigDecimal registerIntegral; |
| | | |
| | | @ApiModelProperty(value = "微信openId") |
| | | @ExcelColumn(name="微信openId") |
| | | @ExcelColumn(name="微信openId",width = 10,index = 1) |
| | | private String openId; |
| | | |
| | | @ApiModelProperty(value = "çæ¥") |
| | | @ExcelColumn(name="birthday") |
| | | // @ExcelColumn(name="birthday") |
| | | private Date birthday; |
| | | |
| | | @ApiModelProperty(value = "微信å享ç ") |
| | | @ExcelColumn(name="sharingCode") |
| | | // @ExcelColumn(name="sharingCode") |
| | | private String sharingCode; |
| | | |
| | | @ApiModelProperty(value = "ç»å®åéºä¸»é® shop:id åé人") |
| | |
| | | @ApiModelProperty(value = "ç¨æ·æå¨åå¸") |
| | | @TableField(exist = false) |
| | | private String cityName; |
| | | |
| | | |
| | | @ApiModelProperty(value = "ç»éååç§°") |
| | | @TableField(exist = false) |
| | | @ExcelColumn(name = "å
³èç»éå",width = 10,index = 7) |
| | | private String shopName; |
| | | @ApiModelProperty(value = "å¼å§æ¶é´ ") |
| | | @TableField(exist = false) |
| | | private Date starttime; |
| | |
| | | @ApiModelProperty(value = "伿 å¸ï¼ä¼æ å¸é¢åæ»æ°") |
| | | @TableField(exist = false) |
| | | private BigDecimal couponDrawCount; |
| | | @ApiModelProperty(value = "ååç¼ç ") |
| | | @TableField(exist = false) |
| | | private Integer goodsId; |
| | | |
| | | @ApiModelProperty(value = "伿 å¸ï¼ä¼æ å¸ä½¿ç¨æ»æ°(å¼ )") |
| | | @TableField(exist = false) |
| | |
| | | @ApiModelProperty(value = "伿 å¸ï¼ä¼æ å¸ä½¿ç¨éé¢(å
)") |
| | | @TableField(exist = false) |
| | | private BigDecimal couponUserMoney; |
| | | @ApiModelProperty(value = "æååä¾è´§ä»·(å
)") |
| | | @TableField(exist = false) |
| | | private BigDecimal goodsPrice; |
| | | |
| | | |
| | | @ApiModelProperty(value = "åºéºæ ç¾") |
| | |
| | | @ApiModelProperty(value = "忷䏻é®ï¼shop主é®ï¼", example = "1") |
| | | @ExcelColumn(name="忷䏻é®ï¼shop主é®ï¼") |
| | | private Integer shopId; |
| | | @ApiModelProperty(value = "ååç¼ç ï¼goods主é®ï¼", example = "1") |
| | | @ExcelColumn(name="ååç¼ç ï¼goods主é®ï¼") |
| | | private Integer goodsId; |
| | | |
| | | @ApiModelProperty(value = "ååSKU IDï¼goods_sku主é®ï¼", example = "1") |
| | | @ExcelColumn(name="ååSKU IDï¼goods_sku主é®ï¼") |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.dao.business.model; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.doumee.core.annotation.excel.ExcelColumn; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * 人åä¿¡æ¯è¡¨ |
| | | * @author æ±è¹è¹ |
| | | * @date 2023/11/30 15:33 |
| | | */ |
| | | @Data |
| | | @ApiModel("人åä¿¡æ¯è¡¨") |
| | | @TableName("`user_action`") |
| | | public class UserAction { |
| | | |
| | | @TableId(type = IdType.AUTO) |
| | | @ApiModelProperty(value = "主é®", example = "1") |
| | | @ExcelColumn(name="主é®") |
| | | private Integer id; |
| | | |
| | | @ApiModelProperty(value = "å建人ç¼ç ", example = "1") |
| | | @ExcelColumn(name="å建人ç¼ç ") |
| | | private Integer creator; |
| | | |
| | | @ApiModelProperty(value = "å建æ¶é´") |
| | | @ExcelColumn(name="å建æ¶é´") |
| | | private Date createDate; |
| | | |
| | | @ApiModelProperty(value = "æ´æ°äººç¼ç ", example = "1") |
| | | @ExcelColumn(name="æ´æ°äººç¼ç ") |
| | | private Integer editor; |
| | | |
| | | @ApiModelProperty(value = "æ´æ°æ¶é´") |
| | | @ExcelColumn(name="æ´æ°æ¶é´") |
| | | private Date editDate; |
| | | |
| | | @ApiModelProperty(value = "æ¯å¦å é¤0å¦ 1æ¯", example = "1") |
| | | @ExcelColumn(name="æ¯å¦å é¤0å¦ 1æ¯") |
| | | private Integer isdeleted; |
| | | |
| | | @ApiModelProperty(value = "夿³¨") |
| | | @ExcelColumn(name="夿³¨") |
| | | private String remark; |
| | | @ApiModelProperty(value = "ä¿®æ¹è¯¦ç»å
容") |
| | | @ExcelColumn(name="ä¿®æ¹è¯¦ç»å
容") |
| | | private String content; |
| | | |
| | | @ApiModelProperty(value = "æ´æ¹åå
容", example = "1") |
| | | private String beforeInfo; |
| | | |
| | | @ApiModelProperty(value = "æ´æ¹åå
容", example = "1") |
| | | private String afterInfo; |
| | | |
| | | @ApiModelProperty(value = "ç±»å 0è§£å» 1å»ç» 2æé» 3æ¢å¤ 4设为æè®¿äºº 5åæ¶æè®¿äºº 6设为é«çº§å®¡æ¹äºº 7åæ¶é«çº§å®¡æ¹äºº 8æå¨ç¦»åº 9å é¤äººå 10æ´æ°äººå", example = "1") |
| | | @ExcelColumn(name="ç±»å 0è§£å» 1å»ç» 2æé» 3æ¢å¤ 4设为æè®¿äºº 5åæ¶æè®¿äºº 6设为é«çº§å®¡æ¹äºº 7åæ¶é«çº§å®¡æ¹äºº 8æå¨ç¦»åº 9å é¤äººå 10æ´æ°äººå") |
| | | private Integer type; |
| | | |
| | | @ApiModelProperty(value = "人åæä½è®°å½æ¥å¿") |
| | | @ExcelColumn(name="人åæä½è®°å½æ¥å¿") |
| | | private String memberId; |
| | | |
| | | @ApiModelProperty(value = "æä½åç¶æ 0è§£å» 1å»ç» 2æé» 3æ¢å¤ 4设为æè®¿äºº 5åæ¶æè®¿äºº 6设为é«çº§å®¡æ¹äºº 7åæ¶é«çº§å®¡æ¹äºº 8æå¨ç¦»åº 9å é¤", example = "1") |
| | | @ExcelColumn(name="æä½åç¶æ 0è§£å» 1å»ç» 2æé» 3æ¢å¤ 4设为æè®¿äºº 5åæ¶æè®¿äºº 6设为é«çº§å®¡æ¹äºº 7åæ¶é«çº§å®¡æ¹äºº 8æå¨ç¦»åº 9å é¤") |
| | | private Integer beforeStatus; |
| | | |
| | | @ApiModelProperty(value = "æä½äººåç§°", example = "1") |
| | | @TableField(exist = false) |
| | | private String createName; |
| | | |
| | | @ApiModelProperty(value = "人åç±»åï¼0å³å¡è®¿å®¢ 1æ®é访客 2å
é¨äººå", example = "1") |
| | | @TableField(exist = false) |
| | | private String memberType; |
| | | |
| | | @ApiModelProperty(value = "æä½å¯¹è±¡", example = "1") |
| | | @TableField(exist = false) |
| | | private String memberName; |
| | | |
| | | @ApiModelProperty(value = "ç±»ååç§°", example = "1") |
| | | @TableField(exist = false) |
| | | private String typeName; |
| | | |
| | | @ApiModelProperty(value = "ææºå·", example = "1") |
| | | @TableField(exist = false) |
| | | private String mobile; |
| | | @ApiModelProperty(value = "æ¥è¯¢å¯¹è±¡ç±»å 0人åæä½ 1å
¶ä»ä¸å¡æä½", example = "1") |
| | | @TableField(exist = false) |
| | | private Integer objType; |
| | | |
| | | } |
| | |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.dao.business.model.Areas; |
| | | import com.doumee.dao.business.model.Integral; |
| | | import com.doumee.dao.business.model.Member; |
| | | import com.doumee.dao.system.dto.MemberRechargeDTO; |
| | | import com.doumee.dao.web.dto.MemberOwnDTO; |
| | |
| | | * @return |
| | | */ |
| | | Integer changeMemberRechargeBatch(MemberRechargeDTO memberRechargeDTO); |
| | | |
| | | void updateShop(Member member); |
| | | |
| | | void updateIntegral(Integral param); |
| | | } |
| | |
| | | */ |
| | | SaleReportResponse saleReport(SaleReportRequest request, String shopId); |
| | | |
| | | |
| | | String setGoodsPrice(Shop shop); |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.service.business; |
| | | |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.dao.business.model.UserAction; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 人åæä½è®°å½æ¥å¿Serviceå®ä¹ |
| | | * @author æ±è¹è¹ |
| | | * @date 2023/12/14 13:57 |
| | | */ |
| | | public interface UserActionService { |
| | | |
| | | /** |
| | | * å建 |
| | | * |
| | | * @param userAction å®ä½å¯¹è±¡ |
| | | * @return Integer |
| | | */ |
| | | Integer create(UserAction userAction); |
| | | |
| | | /** |
| | | * 主é®å é¤ |
| | | * |
| | | * @param id ä¸»é® |
| | | */ |
| | | void deleteById(Integer id); |
| | | |
| | | /** |
| | | * å é¤ |
| | | * |
| | | * @param userAction å®ä½å¯¹è±¡ |
| | | */ |
| | | void delete(UserAction userAction); |
| | | |
| | | /** |
| | | * æ¹é主é®å é¤ |
| | | * |
| | | * @param ids 主é®é |
| | | */ |
| | | void deleteByIdInBatch(List<Integer> ids); |
| | | |
| | | /** |
| | | * 䏻鮿´æ° |
| | | * |
| | | * @param userAction å®ä½å¯¹è±¡ |
| | | */ |
| | | void updateById(UserAction userAction); |
| | | |
| | | /** |
| | | * æ¹é䏻鮿´æ° |
| | | * |
| | | * @param userActions å®ä½é |
| | | */ |
| | | void updateByIdInBatch(List<UserAction> userActions); |
| | | |
| | | /** |
| | | * 䏻鮿¥è¯¢ |
| | | * |
| | | * @param id ä¸»é® |
| | | * @return UserAction |
| | | */ |
| | | UserAction findById(Integer id); |
| | | |
| | | /** |
| | | * æ¡ä»¶æ¥è¯¢åæ¡è®°å½ |
| | | * |
| | | * @param userAction å®ä½å¯¹è±¡ |
| | | * @return UserAction |
| | | */ |
| | | UserAction findOne(UserAction userAction); |
| | | |
| | | /** |
| | | * æ¡ä»¶æ¥è¯¢ |
| | | * |
| | | * @param userAction å®ä½å¯¹è±¡ |
| | | * @return List<UserAction> |
| | | */ |
| | | List<UserAction> findList(UserAction userAction); |
| | | |
| | | /** |
| | | * å页æ¥è¯¢ |
| | | * |
| | | * @param pageWrap å页对象 |
| | | * @return PageData<UserAction> |
| | | */ |
| | | PageData<UserAction> findPage(PageWrap<UserAction> pageWrap); |
| | | |
| | | /** |
| | | * æ¡ä»¶ç»è®¡ |
| | | * |
| | | * @param userAction å®ä½å¯¹è±¡ |
| | | * @return long |
| | | */ |
| | | long count(UserAction userAction); |
| | | } |
| | |
| | | |
| | | @Autowired |
| | | private SystemDictDataBiz systemDictDataBiz; |
| | | @Autowired |
| | | private ShopMapper shopMapper; |
| | | |
| | | @Autowired |
| | | private GoodsSkuAttrJoinMapper goodsSkuAttrJoinMapper; |
| | |
| | | || goods.getDeductRata() == null |
| | | || goods.getPrice() == null |
| | | || goods.getSkuPrice() == null |
| | | || StringUtils.isBlank(goods.getImgurl()) |
| | | || org.apache.commons.collections.CollectionUtils.isEmpty(goods.getFileList())) { |
| | | // || StringUtils.isBlank(goods.getImgurl()) |
| | | // || org.apache.commons.collections.CollectionUtils.isEmpty(goods.getFileList()) |
| | | ) { |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(), ResponseStatus.BAD_REQUEST.getMessage()); |
| | | } |
| | | |
| | |
| | | queryWrapper.leftJoin(Labels.class,Labels::getId,Goods::getParentCategoryId); |
| | | //åºåé |
| | | queryWrapper.select("(select sum(STOCK) from goods_sku where ISDELETED=0 and GOODS_ID=t.id) as stockNum "); |
| | | queryWrapper.select("(select count(id) from shop_goods_relation s where s.ISDELETED=0 and s.GOODS_ID=t.id) as pricedShopNum "); |
| | | //å®é
éé |
| | | queryWrapper.select("(select sum(gd.GOODS_NUM) from goodsorder_detail gd" + |
| | | " inner join goods_sku gs on gs.id=gd.GOODS_SKU_ID" + |
| | |
| | | if (list == null || list.size() == 0) { |
| | | return; |
| | | } |
| | | long shopNum = shopMapper.selectCount(new QueryWrapper<Shop>().lambda() |
| | | .eq(Shop::getIsdeleted,Constants.ZERO)); |
| | | String path = systemDictDataBiz.queryByCode(Constants.OSS, Constants.RESOURCE_PATH).getCode() |
| | | + systemDictDataBiz.queryByCode(Constants.OSS, Constants.GOODS_FILE).getCode(); |
| | | for (Goods goods : list) { |
| | | goods.setShopNum(shopNum); |
| | | goods.setResourcePath(path); |
| | | //æ¥è¯¢sku |
| | | MPJLambdaWrapper<GoodsSku> queryWrapper = new MPJLambdaWrapper<GoodsSku>() |
| | |
| | | |
| | | String path = systemDictDataBiz.queryByCode(Constants.OSS, Constants.RESOURCE_PATH).getCode() + systemDictDataBiz.queryByCode(Constants.OSS, Constants.MEMBER_FILE).getCode(); |
| | | for (Integral model : result.getRecords()) { |
| | | model.setStrObjType(Constants.IntegralObjType.getName(model.getObjType())); |
| | | if (StringUtils.isNotBlank(model.getImgurl())) { |
| | | model.setImgurl(path + model.getImgurl()); |
| | | } |
| | |
| | | import com.doumee.core.utils.DateUtil; |
| | | import com.doumee.core.utils.Utils; |
| | | import com.doumee.core.wx.WxMiniConfig; |
| | | import com.doumee.dao.business.*; |
| | | import com.doumee.dao.business.MemberMapper; |
| | | import com.doumee.dao.business.ShopMapper; |
| | | import com.doumee.dao.business.SmsrecordMapper; |
| | |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * ç¨æ·ä¿¡æ¯è¡¨Serviceå®ç° |
| | | * 客æ·ä¿¡æ¯è¡¨Serviceå®ç° |
| | | * @author æ±è¹è¹ |
| | | * @date 2023/03/21 15:48 |
| | | */ |
| | |
| | | |
| | | @Autowired |
| | | private MemberMapper memberMapper; |
| | | |
| | | @Autowired |
| | | private IntegralMapper integralMapper; |
| | | @Autowired |
| | | private ShopMapper shopMapper; |
| | | @Autowired |
| | | private UserActionMapper userActionMapper; |
| | | |
| | | |
| | | @Autowired |
| | | private SmsrecordMapper smsrecordMapper; |
| | |
| | | member.setEditor(user.getId()); |
| | | memberMapper.updateById(member); |
| | | } |
| | | @Override |
| | | @Transactional |
| | | public void updateShop(Member member) { |
| | | if(member.getBindShopId()==null || member.getId()==null){ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST); |
| | | } |
| | | MPJLambdaWrapper<Member> queryWrapper =new MPJLambdaWrapper<>(); |
| | | queryWrapper.selectAll(Member.class); |
| | | queryWrapper.selectAs(Shop::getName,Member::getShopName); |
| | | queryWrapper.leftJoin(Shop.class, Shop::getId,Member::getBindShopId); |
| | | queryWrapper.eq(Member::getId,member.getId()); |
| | | Member model = memberMapper.selectJoinOne(Member.class,queryWrapper); |
| | | if(model == null ||Constants.equalsObject(model.getIsdeleted(),Constants.ONE)){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"客æ·ä¿¡æ¯æ¥è¯¢æ æï¼"); |
| | | } |
| | | if(model.getBindShopId() == null){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"客æ·å°æªç»å®ç»éåä¿¡æ¯ï¼æ æ³æ´æ¢ï¼"); |
| | | } |
| | | if(Constants.equalsInteger(model.getBindShopId() ,member.getBindShopId())){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"è¯·éæ©æ°çç»éåï¼"); |
| | | } |
| | | |
| | | Shop shop = shopMapper.selectById(member.getBindShopId()); |
| | | if(shop == null ||Constants.equalsObject(shop.getIsdeleted(),Constants.ONE)){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"ç»éåä¿¡æ¯æ¥è¯¢æ æï¼"); |
| | | } |
| | | LoginUserInfo user = (LoginUserInfo) SecurityUtils.getSubject().getPrincipal(); |
| | | |
| | | Date date = new Date(); |
| | | memberMapper.update(null,new UpdateWrapper<Member>().lambda() |
| | | .eq(Member::getId,member.getId()) |
| | | .set(Member::getEditDate,date) |
| | | .set(Member::getEditor,user.getId()) |
| | | .set(Member::getBindShopId,member.getBindShopId()) |
| | | ); |
| | | //æ´æ¢æ¥å¿è®°å½ |
| | | UserActionServiceImpl.saveUserActionBiz(user,member.getId(), |
| | | Constants.UserActionType.CHANGE_SHOP, |
| | | userActionMapper, |
| | | date, |
| | | new String[]{user.getUsername(),DateUtil.getPlusTime2(date)}, |
| | | JSONObject.toJSONString(member) , |
| | | model.getShopName(), shop.getName()); |
| | | } |
| | | @Override |
| | | @Transactional |
| | | public void updateIntegral(Integral param) { |
| | | if(param.getMemberId()==null || param.getType()==null |
| | | || param.getType()<0 |
| | | || param.getType()>2 |
| | | || Constants.formatBigdecimal(param.getNum()).compareTo(new BigDecimal(0))<=0){ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST); |
| | | } |
| | | |
| | | MPJLambdaWrapper<Member> queryWrapper =new MPJLambdaWrapper<>(); |
| | | queryWrapper.selectAll(Member.class); |
| | | queryWrapper.selectAs(Shop::getName,Member::getShopName); |
| | | queryWrapper.leftJoin(Shop.class, Shop::getId,Member::getBindShopId); |
| | | queryWrapper.eq(Member::getId,param.getMemberId()); |
| | | Member model = memberMapper.selectJoinOne(Member.class,queryWrapper); |
| | | if(model == null ||Constants.equalsObject(model.getIsdeleted(),Constants.ONE)){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"客æ·ä¿¡æ¯æ¥è¯¢æ æï¼"); |
| | | } |
| | | |
| | | BigDecimal num = param.getNum(); |
| | | if(param.getType() == 1 &&Constants.formatBigdecimal(model.getIntegral()).compareTo(param.getNum())<0){ |
| | | //妿æ¯åå°ï¼å¤æç¨æ·ä½é¢æ¯å¦æ»¡è¶³ |
| | | num = num.multiply(new BigDecimal(-1));//åå° |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(),"ç¨æ·è´¦æ·ä½é¢ä¸è¶³ï¼"); |
| | | } |
| | | |
| | | LoginUserInfo user = (LoginUserInfo) SecurityUtils.getSubject().getPrincipal(); |
| | | |
| | | Date date = new Date(); |
| | | //è´¦æ·ä½é¢ |
| | | memberMapper.update(null,new UpdateWrapper<Member>().lambda() |
| | | .eq(Member::getId,model.getId()) |
| | | .set(Member::getEditDate,date) |
| | | .set(Member::getEditor,user.getId()) |
| | | .setSql(param.getType() == 0,"total_integral = ifnull(total_integral,0)+" + num)//累计å¢å |
| | | .setSql(param.getType() == 0,"integral = ifnull(integral,0)+" + param.getNum()) |
| | | .setSql(param.getType() == 1,"integral = ifnull(integral,0)-" + param.getNum())); |
| | | |
| | | Constants.IntegralObjType integralObjType = param.getType()==0?Constants.IntegralObjType.SYSTEM_RECHARGE:Constants.IntegralObjType.SYSTEM_DEDUCT; |
| | | |
| | | Integral integral = new Integral(); |
| | | integral.setMemberId(model.getId()); |
| | | integral.setCreateDate(new Date()); |
| | | integral.setCreator(user.getId()); |
| | | integral.setIsdeleted(Constants.ZERO); |
| | | integral.setTitle(integralObjType.getName()); |
| | | integral.setContent(integralObjType.getNoteinfo()); |
| | | integral.setObjId(model.getId()); |
| | | integral.setObjType(integralObjType.getKey()); |
| | | integral.setType(param.getType()); |
| | | integral.setRemark(param.getRemark()); |
| | | integral.setNum(param.getNum()); |
| | | integral.setTotalNum(param.getType() == 0? Constants.formatBigdecimal(model.getIntegral()).add(integral.getNum()):Constants.formatBigdecimal(model.getIntegral()).subtract(integral.getNum())); |
| | | integral.setOrderCode(null); |
| | | integral.setUserType(Constants.ZERO); |
| | | integralMapper.insert(integral); |
| | | |
| | | } |
| | | |
| | | @Override |
| | | public void updateByIdInBatch(List<Member> members) { |
| | |
| | | MPJLambdaWrapper<Member> queryWrapper = new MPJLambdaWrapper<>(); |
| | | Utils.MP.blankToNull(pageWrap.getModel()); |
| | | queryWrapper.selectAll(Member.class); |
| | | queryWrapper.selectAs(Shop::getName,Member::getShopName); |
| | | queryWrapper.leftJoin(Shop.class, Shop::getId,Member::getBindShopId); |
| | | queryWrapper.and(StringUtils.isNotBlank(pageWrap.getModel().getNickname()),ms->ms.like(Member::getNickname,pageWrap.getModel().getNickname()) |
| | | .or().like(Member::getName,pageWrap.getModel().getNickname()) |
| | | .or().like(Member::getPhone,pageWrap.getModel().getNickname()) |
| | | ); |
| | | queryWrapper.like(StringUtils.isNotBlank(pageWrap.getModel().getShopName()),Shop::getStatus,pageWrap.getModel().getShopName()); |
| | | queryWrapper.eq(pageWrap.getModel().getStatus()!=null,Member::getStatus,pageWrap.getModel().getStatus()); |
| | | queryWrapper.eq(Member::getIsdeleted,Constants.ZERO); |
| | | |
| | | queryWrapper.ge(pageWrap.getModel().getStarttime()!=null, Member::getCreateDate,pageWrap.getModel().getStarttime()); |
| | | queryWrapper.le(pageWrap.getModel().getEndtime()!=null,Member::getCreateDate, pageWrap.getModel().getEndtime()); |
| | | |
| | |
| | | |
| | | Integer mId = Optional.ofNullable(userInfo) |
| | | .map(s -> s.getMemberId()) |
| | | .orElseThrow(() -> new BusinessException(ResponseStatus.BAD_REQUEST.getCode(), "ç¨æ·ID缺失")); |
| | | .orElseThrow(() -> new BusinessException(ResponseStatus.BAD_REQUEST.getCode(), "客æ·ID缺失")); |
| | | Member member = new Member(); |
| | | member.setId(mId); |
| | | member.setEditor(userInfo.getId()); |
| | |
| | | if(phoneNums.size() != members.size()){ |
| | | List<String> collect = members.stream().map(s -> s.getPhone()).collect(Collectors.toList()); |
| | | List<String> unFindMember = phoneNums.stream().filter(s -> !collect.contains(s)).collect(Collectors.toList()); |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(),unFindMember.toString()+"ä¸åå¨è¯¥ææºå·ç ç¨æ·"); |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(),unFindMember.toString()+"ä¸åå¨è¯¥ææºå·ç 客æ·"); |
| | | } |
| | | Map<String, MemberRechargeDTO> collect = dataList.stream().collect(Collectors.toMap(s -> s.getPhone(), s -> s)); |
| | | members.forEach(s->{ |
| | |
| | | |
| | | Member member = memberMapper.selectById(memberRechargeDTO.getMemberId()); |
| | | |
| | | //妿æ£é¤éé¢å¤§äºç¨æ·æ¥éé¢ åç¨æ·å©ä½éé¢ |
| | | //妿æ£é¤éé¢å¤§äºå®¢æ·æ¥éé¢ å客æ·å©ä½éé¢ |
| | | BigDecimal integralNum = new BigDecimal(memberRechargeDTO.getNum()); |
| | | if (Constants.equalsInteger(memberRechargeDTO.getIntegralType(),Constants.ONE) |
| | | && (member.getIntegral().compareTo(integralNum) == -1) |
| | |
| | | import com.doumee.dao.business.*; |
| | | import com.doumee.dao.business.join.GoodsorderJoinMapper; |
| | | import com.doumee.dao.business.join.MemberJoinMapper; |
| | | import com.doumee.dao.business.*; |
| | | import com.doumee.dao.business.join.ProductLabelJoinMapper; |
| | | import com.doumee.dao.business.model.*; |
| | | import com.doumee.dao.business.model.Labels; |
| | |
| | | |
| | | @Autowired |
| | | private ShopMapper shopMapper; |
| | | @Autowired |
| | | private GoodsMapper goodsMapper; |
| | | @Autowired |
| | | private GoodsSkuMapper goodsSkuMapper; |
| | | @Autowired |
| | | private ShopGoodsRelationMapper shopGoodsRelationMapper; |
| | | |
| | | @Autowired |
| | | private ShopCommentService shopCommentService; |
| | |
| | | |
| | | @Override |
| | | public List<Shop> findList(Shop shop) { |
| | | shop.setIsdeleted(Constants.ZERO); |
| | | QueryWrapper<Shop> wrapper = new QueryWrapper<>(shop); |
| | | return shopMapper.selectList(wrapper); |
| | | } |
| | |
| | | Utils.MP.blankToNull(pageWrap.getModel()); |
| | | |
| | | queryWrapper.selectAll(Shop.class); |
| | | if(pageWrap.getModel().getGoodsId()!=null){ |
| | | //æ¥è¯¢æååçä¾è´§ä»· |
| | | queryWrapper.select("(select s.price from shop_goods_relation s where s.ISDELETED=0 and s.shop_id = t.id and s.GOODS_ID="+pageWrap.getModel().getGoodsId()+") as goodsPrice "); |
| | | } |
| | | queryWrapper.selectAs(Labels::getName,Shop::getBigAreaName); |
| | | queryWrapper.selectAs(Member::getNickname,Shop::getNickName); |
| | | queryWrapper.selectAs(Member::getImgurl,Shop::getMemberImgurl); |
| | |
| | | queryWrapper.eq(pageWrap.getModel().getSaleType()!=null, Shop::getSaleType, pageWrap.getModel().getSaleType()); |
| | | queryWrapper.eq(pageWrap.getModel().getStatus()!=null, Shop::getStatus, pageWrap.getModel().getStatus()); |
| | | queryWrapper.eq(pageWrap.getModel().getIsrec()!=null, Shop::getIsrec, pageWrap.getModel().getIsrec()); |
| | | queryWrapper.orderByDesc(Shop::getCreateDate); |
| | | if(pageWrap.getModel().getGoodsId()!=null){ |
| | | queryWrapper.orderByAsc("goodsPrice"); |
| | | } |
| | | queryWrapper.orderByDesc(Shop::getId); |
| | | IPage<Shop> result = shopJoinMapper.selectJoinPage(page, Shop.class, queryWrapper); |
| | | String path = systemDictDataBiz.queryByCode(Constants.OSS, Constants.RESOURCE_PATH).getCode() |
| | | + systemDictDataBiz.queryByCode(Constants.OSS, Constants.SHOP_FILE).getCode(); |
| | |
| | | |
| | | |
| | | |
| | | @Override |
| | | @Transactional |
| | | public String setGoodsPrice(Shop dto){ |
| | | // æ¥è¯¢ç¨æ· |
| | | Shop shop = shopMapper.selectById(dto.getId()); |
| | | if (shop == null) { |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"对ä¸èµ·ï¼ä¾éåä¿¡æ¯æ¥è¯¢æ æï¼"); |
| | | } |
| | | GoodsSku queryGoodsSku=new GoodsSku(); |
| | | queryGoodsSku.setGoodsId(dto.getGoodsId()); |
| | | queryGoodsSku.setIsdeleted(Constants.ZERO); |
| | | List<GoodsSku> goodsSkuList=goodsSkuMapper.selectList(new QueryWrapper<>(queryGoodsSku)); |
| | | if(goodsSkuList==null || goodsSkuList.size() ==0){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"对ä¸èµ·ï¼è¯·ç¡®è®¤ååä¿¡æ¯ææä¸ãéå®ä»·ã已设置ï¼"); |
| | | } |
| | | //é»è®¤skuä¿¡æ¯ |
| | | GoodsSku goodsSku = goodsSkuList.get(0); |
| | | if(Constants.formatBigdecimal(goodsSku.getPrice()).compareTo(Constants.formatBigdecimal(dto.getGoodsPrice())) >=0){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"对ä¸èµ·ï¼ä¾è´§ä»·ä¸å
许大äºååéå®ä»·ï¼"); |
| | | } |
| | | LoginUserInfo user = (LoginUserInfo) SecurityUtils.getSubject().getPrincipal(); |
| | | //å
å é¤åæ¥çæ°æ® |
| | | shopGoodsRelationMapper.delete(new QueryWrapper<ShopGoodsRelation>().lambda() |
| | | .eq(ShopGoodsRelation::getGoodsId,dto.getGoodsId()) |
| | | .eq(ShopGoodsRelation::getShopId,shop.getId()) |
| | | ); |
| | | ShopGoodsRelation add =new ShopGoodsRelation(); |
| | | add.setCreator(user.getId()); |
| | | add.setCreateDate(new Date()); |
| | | add.setIsdeleted(Constants.ZERO); |
| | | add.setEditor(add.getCreator()); |
| | | add.setEditDate(add.getCreateDate()); |
| | | add.setShopId(dto.getId()); |
| | | add.setGoodsId(dto.getGoodsId()); |
| | | add.setGoodsSkuId(goodsSku.getId()); |
| | | add.setPrice(dto.getGoodsPrice()); |
| | | add.setStatus(Constants.ZERO); |
| | | shopGoodsRelationMapper.insert(add); |
| | | return "æä½æå"; |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.service.business.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.doumee.core.model.LoginUserInfo; |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.core.utils.Constants; |
| | | import com.doumee.core.utils.Utils; |
| | | import com.doumee.dao.business.UserActionMapper; |
| | | import com.doumee.dao.business.model.Member; |
| | | import com.doumee.dao.business.model.UserAction; |
| | | import com.doumee.dao.system.model.SystemUser; |
| | | import com.doumee.service.business.UserActionService; |
| | | import com.github.yulichang.wrapper.MPJLambdaWrapper; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.util.CollectionUtils; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Objects; |
| | | |
| | | /** |
| | | * 人åæä½è®°å½æ¥å¿Serviceå®ç° |
| | | * @author æ±è¹è¹ |
| | | * @date 2023/12/14 13:57 |
| | | */ |
| | | @Service |
| | | public class UserActionServiceImpl implements UserActionService { |
| | | |
| | | @Autowired |
| | | private UserActionMapper userActionMapper; |
| | | |
| | | |
| | | @Override |
| | | public Integer create(UserAction userAction) { |
| | | userActionMapper.insert(userAction); |
| | | return userAction.getId(); |
| | | } |
| | | |
| | | @Override |
| | | public void deleteById(Integer id) { |
| | | userActionMapper.deleteById(id); |
| | | } |
| | | |
| | | @Override |
| | | public void delete(UserAction userAction) { |
| | | UpdateWrapper<UserAction> deleteWrapper = new UpdateWrapper<>(userAction); |
| | | userActionMapper.delete(deleteWrapper); |
| | | } |
| | | |
| | | @Override |
| | | public void deleteByIdInBatch(List<Integer> ids) { |
| | | if (CollectionUtils.isEmpty(ids)) { |
| | | return; |
| | | } |
| | | userActionMapper.deleteBatchIds(ids); |
| | | } |
| | | |
| | | @Override |
| | | public void updateById(UserAction userAction) { |
| | | userActionMapper.updateById(userAction); |
| | | } |
| | | |
| | | @Override |
| | | public void updateByIdInBatch(List<UserAction> userActions) { |
| | | if (CollectionUtils.isEmpty(userActions)) { |
| | | return; |
| | | } |
| | | for (UserAction userAction: userActions) { |
| | | this.updateById(userAction); |
| | | } |
| | | } |
| | | public static void saveUserActionBiz(LoginUserInfo user, |
| | | Integer bizId, |
| | | Constants.UserActionType type, |
| | | UserActionMapper userActionMapper, |
| | | Date date, |
| | | String[] params, |
| | | String modelInfo, |
| | | String before, |
| | | String after) { |
| | | String info = type.getInfo(); |
| | | if(params!=null){ |
| | | for (int i = 0; i < params.length; i++) { |
| | | info = info.replace("${param"+(i+1)+"}",params[i]); |
| | | } |
| | | } |
| | | UserAction userAction=new UserAction(); |
| | | userAction.setIsdeleted(Constants.ZERO); |
| | | userAction.setCreateDate(date); |
| | | userAction.setCreator(user.getId()); |
| | | userAction.setBeforeStatus(Constants.ZERO); |
| | | userAction.setType(type.getKey()); |
| | | userAction.setContent(modelInfo); |
| | | userAction.setRemark(info); |
| | | userAction.setBeforeInfo(before); |
| | | userAction.setAfterInfo(after); |
| | | userAction.setMemberId(bizId+""); |
| | | userActionMapper.insert(userAction); |
| | | } |
| | | @Override |
| | | public UserAction findById(Integer id) { |
| | | return userActionMapper.selectById(id); |
| | | } |
| | | |
| | | @Override |
| | | public UserAction findOne(UserAction userAction) { |
| | | QueryWrapper<UserAction> wrapper = new QueryWrapper<>(userAction); |
| | | return userActionMapper.selectOne(wrapper); |
| | | } |
| | | |
| | | @Override |
| | | public List<UserAction> findList(UserAction userAction) { |
| | | QueryWrapper<UserAction> wrapper = new QueryWrapper<>(userAction); |
| | | return userActionMapper.selectList(wrapper); |
| | | } |
| | | |
| | | @Override |
| | | public PageData<UserAction> findPage(PageWrap<UserAction> pageWrap) { |
| | | IPage<UserAction> page = new Page<>(pageWrap.getPage(), pageWrap.getCapacity()); |
| | | MPJLambdaWrapper<UserAction> queryWrapper = new MPJLambdaWrapper<>(); |
| | | Utils.MP.blankToNull(pageWrap.getModel()); |
| | | UserAction queryModel = pageWrap.getModel(); |
| | | queryWrapper.selectAll(UserAction.class) |
| | | .leftJoin(Member.class,Member::getId,UserAction::getMemberId) |
| | | .leftJoin(SystemUser.class,SystemUser::getId,UserAction::getCreator) |
| | | .selectAs(SystemUser::getRealname,UserAction::getCreateName) |
| | | .selectAs(Member::getName,UserAction::getMemberName) |
| | | .selectAs(Member::getPhone,UserAction::getMobile) |
| | | .like(StringUtils.isNotBlank(queryModel.getCreateName()),SystemUser::getRealname,queryModel.getCreateName()) |
| | | .like(StringUtils.isNotBlank(queryModel.getMemberName()),Member::getName,queryModel.getMemberName()) |
| | | .like(StringUtils.isNotBlank(queryModel.getMobile()),Member::getPhone,queryModel.getMobile()) |
| | | .like(StringUtils.isNotBlank(queryModel.getRemark()),Member::getPhone,queryModel.getRemark()) |
| | | .eq(!Objects.isNull(queryModel.getMemberType()),Member::getType,queryModel.getMemberType()) |
| | | .eq(!Objects.isNull(queryModel.getBeforeStatus()),UserAction::getBeforeStatus,queryModel.getBeforeStatus()) |
| | | .eq(!Objects.isNull(queryModel.getType()),UserAction::getType,queryModel.getType()) |
| | | .orderByDesc(UserAction::getCreateDate) |
| | | ; |
| | | IPage<UserAction> result = userActionMapper.selectJoinPage(page,UserAction.class,queryWrapper); |
| | | if(result!=null &&result.getRecords()!=null){ |
| | | for(UserAction model :result.getRecords()){ |
| | | model.setTypeName(Constants.UserActionType.getName(model.getType())); |
| | | } |
| | | } |
| | | return PageData.from(result); |
| | | } |
| | | |
| | | @Override |
| | | public long count(UserAction userAction) { |
| | | QueryWrapper<UserAction> wrapper = new QueryWrapper<>(userAction); |
| | | return userActionMapper.selectCount(wrapper); |
| | | } |
| | | } |