| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <GlobalWindow |
| | | v-loading="isUploading" |
| | | :title="title" |
| | | :visible.sync="visible" |
| | | :confirm-working="isWorking" |
| | | @confirm="confirm" |
| | | > |
| | | <el-form :model="form" ref="form" :rules="rules" label-width="110px" label-suffix="ï¼" inline> |
| | | <el-form-item label="åååç§°" prop="name"> |
| | | <el-input v-model="form.name" placeholder="请è¾å
¥åååç§°" disabled v-trim/> |
| | | </el-form-item> |
| | | <el-form-item label="åååç±»" prop="categoryId"> |
| | | <el-select v-model="form.categoryId" disabled placeholder="è¯·éæ©æå±åç±»" clearable filterable > |
| | | <el-option |
| | | v-for="item in labels()" |
| | | :key="item.id" |
| | | :value="item.id" |
| | | :label="item.name" |
| | | ></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="åååç" prop="brandId"> |
| | | <el-select v-model="form.brandId" disabled placeholder="è¯·éæ©åååç" clearable filterable > |
| | | <el-option |
| | | v-for="item in brands()" |
| | | :key="item.id" |
| | | :value="item.id" |
| | | :label="item.name" |
| | | ></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="åå主å¾" prop="imgurl"> |
| | | <div style="display: flex; align-items: center; height: 100%; width: 100%"> |
| | | <el-image style="width: 50px;height: 50px;" v-if="form.imgurlfull" :src="form.imgurlfull" :preview-src-list="[form.imgurlfull]"></el-image> |
| | | </div> |
| | | </el-form-item> |
| | | <el-form-item label="ååè½®æå¾" prop="fileList"> |
| | | <div v-if="form.fileList && form.length"> |
| | | <el-image v-for="item in form.fileList" style="width: 50px;height: 50px;" :src="item.url" :preview-src-list="[item.url]"></el-image> |
| | | </div> |
| | | </el-form-item> |
| | | <el-form-item label="åºåä»·ï¼å
ï¼" prop="price"> |
| | | <el-input type="number" v-model="form.price" placeholder="请è¾å
¥åºåä»·" v-trim> disabled <template slot="append"> å
</template> </el-input> |
| | | </el-form-item> |
| | | <el-form-item label="éå®ä»·ï¼å
ï¼" prop="skuPrice"> |
| | | <el-input type="number" v-model="form.skuPrice" placeholder="请è¾å
¥éå®ä»·" disabled v-trim> <template slot="append"> å
</template> </el-input> |
| | | </el-form-item> |
| | | <el-form-item label="å线价ï¼å
ï¼" prop="showPrice"> |
| | | <el-input type="number" v-model="form.showPrice" placeholder="请è¾å
¥çº¿ä»·" disabled v-trim> <template slot="append"> å
</template> </el-input> |
| | | </el-form-item> |
| | | <el-form-item label="ç§¯åæµæ£é¢åº¦" prop="deductRata"> |
| | | <el-input type="number" v-model="form.deductRata" disabled placeholder="请è¾å
¥ç§¯åæµæ£é¢åº¦" v-trim> |
| | | <template slot="append">%</template> |
| | | </el-input> |
| | | <p class="tip-warn" style="margin-bottom: 1px;"><i class="el-icon-warning"></i>æéï¼ç§¯å坿µæ£éé¢å ååé¶å®ä»·çç¾åæ¯ï¼0.1%ï½100%ä¹é´ </p> |
| | | </el-form-item> |
| | | <el-form-item label="åºåé" prop="stockNum"> |
| | | <el-input type="number" v-model="form.stockNum" disabled placeholder="请è¾å
¥åååºåé" v-trim/> |
| | | </el-form-item> |
| | | <el-form-item label="åååä½" prop="unitName"> |
| | | <el-input v-model="form.unitName" disabled placeholder="请è¾å
¥åååä½" v-trim/> |
| | | </el-form-item> |
| | | <el-form-item label="åå§éé" prop="salenum"> |
| | | <el-input type="number" v-model="form.salenum" disabled placeholder="请è¾å
¥åå§éé" v-trim/> |
| | | </el-form-item> |
| | | <el-form-item label="ååéé" prop="weight"> |
| | | <el-input type="number" v-model="form.weight" disabled placeholder="请è¾å
¥ååéé" v-trim> |
| | | <template slot="append">kg</template> |
| | | </el-input> |
| | | </el-form-item> |
| | | <el-form-item label="æ¯å¦ä¸æ¶" prop="status"> |
| | | <el-radio-group v-model="form.status" disabled> |
| | | <el-radio :value="1" :label="1" >䏿¶</el-radio> |
| | | <el-radio :value="0" :label="0" >䏿¶</el-radio> |
| | | </el-radio-group> |
| | | </el-form-item> |
| | | <el-form-item label="使ç¨åååç" prop="brandIdList"> |
| | | <el-select v-model="form.brandIdList" disabled placeholder="è¯·éæ©åååç" clearable multiple @change="changeBrand"> |
| | | <el-option |
| | | v-for="item in applyBrands" |
| | | :key="item.id" |
| | | :value="item.id" |
| | | :label="item.name" |
| | | ></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <div v-if="form.brandIdList && form.brandIdList.length" style="border:1px solid #f2f2f2; margin-left: 150px;width: 700px;padding: 20px 0 0px 0;margin-bottom: 20px;" class="el-form-item__content"> |
| | | <!-- |
| | | <span style="line-height: 32px;font-size: 14px;"><b style="color: #F56C6C;margin-right: 4px;font-size: 11px;">*</b>{{'ã'+(item.name)+'ãç³»åï¼'}}</span> |
| | | --> |
| | | <el-form-item v-for="(item,index) in applyBrands.filter(item=>item.show)" :key="'warning_'+index" style="display: block;width: 100%;" :label="'ã'+(item.name)+'ãç³»å'" > |
| | | <el-select v-model="item.childIdList" filterable disabled multiple style=" width: 500px;" clearable placeholder="è¯·éæ©åçç³»å" > |
| | | <el-option v-for="item in item.childList" :label="item.name" :value="item.id" :key="'brand_'+index+item.id"> </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <!-- |
| | | <el-button type="danger" style="margin-left: 10px;height: 32px; " @click="delDo(index)" v-if="index>0 || form.detailList.length>1">å é¤</el-button> |
| | | --> |
| | | </div> |
| | | <el-form-item label="åå详æ
" prop="content"> |
| | | <div class="agree-list" v-html="form.content"></div> |
| | | </el-form-item> |
| | | </el-form> |
| | | </GlobalWindow> |
| | | </template> |
| | | |
| | | <script> |
| | | import BaseOpera from '@/components/base/BaseOpera' |
| | | import GlobalWindow from '@/components/common/GlobalWindow' |
| | | import RichEditor from '@/components/common/RichEditor' |
| | | import { findAll as labelList } from '@/api/business/labels' |
| | | export default { |
| | | name: 'OperaGoodsInfoWindow', |
| | | extends: BaseOpera, |
| | | components: { GlobalWindow, RichEditor }, |
| | | data () { |
| | | return { |
| | | isUploading: false, |
| | | // è¡¨åæ°æ® |
| | | form: { |
| | | id: null, |
| | | name: '', |
| | | categoryId: '', |
| | | brandId: '', |
| | | price: '', |
| | | fileList: [], |
| | | imgurl: '', |
| | | imgurlfull: '', |
| | | salenum: '', |
| | | type: 0, |
| | | info: '', |
| | | content: '', |
| | | sortnum: '', |
| | | skuPrice: null, |
| | | status: 1, |
| | | showPrice: null, |
| | | deductRata: null, |
| | | weight: null, |
| | | unitName: '', |
| | | stockNum: null, |
| | | brandIdList: [], |
| | | brandList: [] |
| | | }, |
| | | applyBrands: [], |
| | | // éªè¯è§å |
| | | rules: { |
| | | } |
| | | } |
| | | }, |
| | | inject: ['labels', 'brands'], |
| | | created () { |
| | | this.config({ |
| | | api: '/business/goods', |
| | | 'field.id': 'id' |
| | | }) |
| | | this.loadBrandList() |
| | | }, |
| | | methods: { |
| | | isSeletedBrand (val) { |
| | | var r = false |
| | | if (!this.form.brandIdList || !this.form.brandIdList.length) { |
| | | return false |
| | | } |
| | | this.form.brandIdList.forEach(item => { |
| | | if (item === val.id) { |
| | | r = true |
| | | } |
| | | }) |
| | | return r |
| | | }, |
| | | changeBrand () { |
| | | this.applyBrands.forEach(item => { |
| | | item.show = this.isSeletedBrand(item) |
| | | }) |
| | | console.log(this.form.brandIdList, this.applyBrands) |
| | | }, |
| | | loadBrandList () { |
| | | labelList({ |
| | | type: 14 // éåºåååç |
| | | }) |
| | | .then(res => { |
| | | this.applyBrands = res |
| | | this.applyBrands.forEach(item => { |
| | | item.show = this.isSeletedBrand(item) |
| | | if(this.form.id && this.form.brandList && this.form.brandList.length){ |
| | | this.form.brandList.forEach(item1 => { |
| | | if (item1.id === item.id) { |
| | | item.childIdList = item1.childIdList |
| | | } |
| | | }) |
| | | } |
| | | }) |
| | | }) |
| | | }, |
| | | getWangedditor (val) { |
| | | this.form.content = val |
| | | }, |
| | | open (title, target, type) { |
| | | this.title = title |
| | | this.form.brandIdList = [] |
| | | this.form.fileList = [] |
| | | this.form.imgurl = '' |
| | | this.form.imgurlfull = '' |
| | | // æ°å»º |
| | | if (target == null) { |
| | | return |
| | | } |
| | | |
| | | this.visible = true |
| | | // ç¼è¾ |
| | | this.$nextTick(async () => { |
| | | for (const key in this.form) { |
| | | this.form[key] = target[key] |
| | | } |
| | | this.form.type = type |
| | | await this.loadInfo(this.form.id) |
| | | if (this.form.imgurl) { |
| | | this.form.imgurlfull = target.resourcePath + target.imgurl |
| | | } |
| | | }) |
| | | }, |
| | | loadInfo () { |
| | | this.form.brandIdList = [] |
| | | this.form.fileList = [] |
| | | this.api.detail(this.form.id).then(res => { |
| | | if (res && res.brandList) { |
| | | this.form.brandList = res.brandList |
| | | res.brandList.forEach(item => { |
| | | this.form.brandIdList.push(item.id) |
| | | }) |
| | | } |
| | | if (res.fileList && res.fileList.length) { |
| | | res.fileList.forEach(item => { |
| | | this.form.fileList.push( |
| | | { |
| | | fileurl: item.fileurl, |
| | | name: item.fileName, |
| | | url: res.resourcePath + item.fileurl |
| | | } |
| | | ) |
| | | }) |
| | | console.log(this.form.fileList) |
| | | } |
| | | this.loadBrandList() |
| | | }) |
| | | } |
| | | } |
| | | } |
| | | </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%; |
| | | } |
| | | } |
| | | ::v-deep .el-form-item__label{ |
| | | width: 150px !important; |
| | | } |
| | | .agree-list{ |
| | | height: 550px; |
| | | //max-height: 50%; |
| | | overflow: auto; |
| | | } |
| | | </style> |
| | |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="åå主å¾" prop="imgurl"> |
| | | <div style="display: flex; align-items: center;justify-content: center; height: 100%; width: 100%"> |
| | | <div style="display: flex; align-items: center; height: 100%; width: 100%"> |
| | | <UploadAvatarImage |
| | | :file="{ 'imgurlfull': form.imgurlfull, 'imgurl': form.imgurl}" |
| | | :uploadData="{folder:'goods'}" |
| | |
| | | <!-- |
| | | <span style="line-height: 32px;font-size: 14px;"><b style="color: #F56C6C;margin-right: 4px;font-size: 11px;">*</b>{{'ã'+(item.name)+'ãç³»åï¼'}}</span> |
| | | --> |
| | | <el-form-item v-for="(item,index) in applyBrands" v-if="item.show" :key="'warning_'+index" style="display: block;width: 100%;" :label="'ã'+(item.name)+'ãç³»å'" > |
| | | <el-form-item v-for="(item,index) in applyBrands.filter(item=>item.show)" :key="'warning_'+index" style="display: block;width: 100%;" :label="'ã'+(item.name)+'ãç³»å'" > |
| | | <el-select v-model="item.childIdList" filterable multiple style=" width: 500px;" clearable placeholder="è¯·éæ©åçç³»å" > |
| | | <el-option v-for="item in item.childList" :label="item.name" :value="item.id" :key="'brand_'+index+item.id"> </el-option> |
| | | </el-select> |
| | |
| | | this.applyBrands = res |
| | | this.applyBrands.forEach(item => { |
| | | item.show = this.isSeletedBrand(item) |
| | | if(this.form.id && this.form.brandList && this.form.brandList.length){ |
| | | this.form.brandList.forEach(item1 => { |
| | | if (item1.id === item.id) { |
| | | item.childIdList = item1.childIdList |
| | | } |
| | | }) |
| | | } |
| | | }) |
| | | }) |
| | | }, |
| | |
| | | <div class="detail-box"> |
| | | <div class="platgroup_tabs"> |
| | | <div class="tab" :class="{ active: activeGroup === item.id }" @click="groupClick(item)" |
| | | v-for="(item, i) in groupList" :key="i"> |
| | | v-for="(item, i) in groupList" :key="'tab_'+i"> |
| | | {{ item.name }} |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <template v-if="activeGroup ==0"> |
| | | <template v-if="activeGroup ===0"> |
| | | <div class="detail-box"> |
| | | <div class="header"> |
| | | <div class="header-b">åºæ¬ä¿¡æ¯</div> |
| | |
| | | </TableLayout> |
| | | </div> |
| | | </template> |
| | | <template v-else-if="activeGroup == 1"> |
| | | <template v-if="activeGroup === 1"> |
| | | <div class="detail-box"> |
| | | <el-form ref="searchForm1" :model="searchForm1" style="display: block;" > |
| | | <el-form-item label="" prop="code" style="display: inline-block;margin-right: 30px;"> |
| | |
| | | <el-table-column prop="details" label="ååä¿¡æ¯" align="center" min-width="250px" show-overflow-tooltip> |
| | | <template slot-scope="{row}"> |
| | | <div v-if="row.goodsorderDetailList && row.goodsorderDetailList.length" style="width: 220px"> |
| | | <div v-for="(item) in row.goodsorderDetailList" style="display: flex"> |
| | | <div v-for="(item) in row.goodsorderDetailList" :key="'itemdetail_'+item.id" style="display: flex"> |
| | | <div style="flex: 1">ã{{item.name}}ã</div><div style="flex: 1">éå®ä»·ï¼{{item.price||0}} æ°éï¼{{item.goodsNum||0}}</div> |
| | | </div> |
| | | </div> |
| | |
| | | </TableLayout> |
| | | </div> |
| | | </template> |
| | | <template v-else-if="activeGroup == 2"> |
| | | <template v-if="activeGroup === 2"> |
| | | <div class="detail-box"> |
| | | <div class="header"> |
| | | <div class="header-b">积åæç»</div> |
| | |
| | | .platgroup_tabs { |
| | | flex: 1; |
| | | display: flex; |
| | | font-size: 15px; |
| | | border-bottom: 1px solid #dfe2e8; |
| | | margin-bottom: 30px; |
| | | .tab { |
| | |
| | | <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="id" label="ååID" min-width="150px" > |
| | | <template slot-scope="{row}"> |
| | | <span class="blue" style="cursor: pointer" @click="$refs.OperaGoodsInfoWindow.open('åå详æ
', row, 0)">{{row.id}}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="name" label="åååç§°" min-width="150px" show-overflow-tooltip></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-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" v-permissions="['business:goods:update']" @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>--> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | |
| | | </template> |
| | | <!-- æ°å»º/ä¿®æ¹ --> |
| | | <OperaGoodsWindow ref="operaGoodsWindow" @success="handlePageChange"/> |
| | | <OperaGoodsDetailWindow ref="operaGoodsDetailWindow"/> |
| | | <OperaGoodsInfoWindow ref="OperaGoodsInfoWindow"/> |
| | | <OperaPlatformGoodsSkuWindow ref="operaPlatformGoodsSkuWindow"/> |
| | | <OperaShopGoodsWindow ref="OperaShopGoodsWindow" @success="priceSuccess"/> |
| | | </TableLayout> |
| | |
| | | import TableLayout from '@/layouts/TableLayout' |
| | | import Pagination from '@/components/common/Pagination' |
| | | import OperaGoodsWindow from '@/components/business/OperaGoodsWindow' |
| | | import OperaGoodsDetailWindow from '@/components/business/OperaGoodsDetailWindow' |
| | | import OperaGoodsInfoWindow from '@/components/business/OperaGoodsInfoWindow' |
| | | 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, OperaShopGoodsWindow }, |
| | | components: { TableLayout, Pagination, OperaGoodsWindow, OperaGoodsInfoWindow, OperaPlatformGoodsSkuWindow, OperaShopGoodsWindow }, |
| | | data () { |
| | | return { |
| | | activeName: 'first', |
| | |
| | | .tab-btn{ |
| | | font-weight: normal; |
| | | cursor: pointer; |
| | | border-radius: 0px; |
| | | border-radius: 1px; |
| | | margin: 0px 5px; |
| | | font-size: 12px; |
| | | border: 1px solid #999; |
| | | color: #999; |
| | | padding: 1px 5px; |
| | | background-color: #f2f2f2; |
| | | background-color: #f4f7fc; |
| | | } |
| | | } |
| | | .data { |
| | |
| | | public class CodeGenerator { |
| | | public static String packName ="com.doumee"; |
| | | // 设置è¾åºç®å½ |
| | | public static String rootFileDir = "D:/code/idea/initCode/"; |
| | | public static String rootFileDir = "D:/code/idea/initCode/diandongche/"; |
| | | public static String outputDirEntity =rootFileDir+"src/main/java/com/doumee/dao/business/model/"; // è¾åºçä»£ç æä»¶å¤¹è·¯å¾ |
| | | public static String outputDirMapper = rootFileDir+"src/main/java/com/doumee/dao/business/"; // è¾åºçä»£ç æä»¶å¤¹è·¯å¾ |
| | | public static String outputDirService =rootFileDir+"src/main/java/com/doumee/service/business/"; // è¾åºçä»£ç æä»¶å¤¹è·¯å¾ |
| | |
| | | public static String outputDirDb =rootFileDir+"db/"; // è¾åºçä»£ç æä»¶å¤¹è·¯å¾ |
| | | public static void main(String[] args) { |
| | | // é
ç½®æ°æ®åºè¿æ¥ |
| | | String url = "jdbc:mysql://192.168.0.211:3306/dmmall_full"; |
| | | String url = "jdbc:mysql://192.168.0.211:3306/diandongche"; |
| | | String username = "root"; |
| | | String password = "Doumee@168"; |
| | | String database = "dmmall_full"; |
| | | String database = "diandongche"; |
| | | List<String> tables = new ArrayList<>(); |
| | | tables.add("withdraw_record"); |
| | | tables.add("refund"); |
| | | |
| | | for(String tableName : tables){ |
| | | // è·å表信æ¯å¹¶çæä»£ç |
| | |
| | | if (pageWrap.getModel().getEndtime() != null) { |
| | | queryWrapper.le(Integral::getCreateDate, pageWrap.getModel().getEndtime()); |
| | | } |
| | | queryWrapper.orderByDesc(Integral::getCreateDate); |
| | | queryWrapper.orderByDesc(Integral::getId); |
| | | IPage<Integral> result = integralJoinMapper.selectJoinPage(page, Integral.class, queryWrapper); |
| | | |
| | | String path = systemDictDataBiz.queryByCode(Constants.OSS, Constants.RESOURCE_PATH).getCode() + systemDictDataBiz.queryByCode(Constants.OSS, Constants.MEMBER_FILE).getCode(); |
| | |
| | | private GoodsorderDetailMapper goodsorderDetailMapper; |
| | | @Override |
| | | public List<BusinessDataCountVO> shopRankList10(CountDataDTO param) { |
| | | Date startDate = null,endDate = null; |
| | | /* Date startDate = null,endDate = null; |
| | | if(param.getYear()!=null && param.getMonth()!=null){ |
| | | List<Date> dList = DateUtil.getDatePeriodByYearAndMonth(param.getYear(),param.getMonth()-1); |
| | | startDate = dList.get(0); |
| | |
| | | List<Date> dList = DateUtil.getDatePeriodByYear(param.getYear()); |
| | | startDate = dList.get(0); |
| | | endDate = dList.get(1); |
| | | } |
| | | }*/ |
| | | //ç»è®¡è®¢åééåéå®é¢éå |
| | | List<BusinessDataCountVO> list1 = goodsorderMapper.selectJoinList(BusinessDataCountVO.class,new MPJLambdaWrapper<Goodsorder>() |
| | | .selectAs(Shop::getName,BusinessDataCountVO::getName) |
| | |
| | | .select("(select count(t.id) )",BusinessDataCountVO::getNum) |
| | | .select("(select sum(t.total_price) )",BusinessDataCountVO::getPrice) |
| | | .leftJoin(Shop.class,Shop::getId,Goodsorder::getDistributionShopId) |
| | | .ge(startDate!=null,Goodsorder::getCreateDate,startDate) |
| | | .ne(endDate!=null,Goodsorder::getCreateDate,endDate) |
| | | .apply(param.getYear()!=null,"YEAR ( t.CREATE_DATE )="+param.getYear() ) |
| | | .apply(param.getYear()!=null && param.getMonth()!=null,"MONTH ( t.CREATE_DATE )="+param.getMonth() ) |
| | | .eq(Goodsorder::getIsdeleted,Constants.ZERO) |
| | | .in(Goodsorder::getStatus,Constants.OrderStatus.DONE.getKey(),Constants.OrderStatus.REFUND.getKey()) |
| | | .groupBy(Goodsorder::getDistributionShopId) |
| | |
| | | } |
| | | @Override |
| | | public List<BusinessDataCountVO> goodsRankList10(CountDataDTO param) { |
| | | Date startDate = null,endDate = null; |
| | | /* Date startDate = null,endDate = null; |
| | | if(param.getYear()!=null && param.getMonth()!=null){ |
| | | List<Date> dList = DateUtil.getDatePeriodByYearAndMonth(param.getYear(),param.getMonth()-1); |
| | | startDate = dList.get(0); |
| | |
| | | List<Date> dList = DateUtil.getDatePeriodByYear(param.getYear()); |
| | | startDate = dList.get(0); |
| | | endDate = dList.get(1); |
| | | } |
| | | }*/ |
| | | //ç»è®¡è®¢åééåéå®é¢éå |
| | | List<BusinessDataCountVO> list1 = goodsorderDetailMapper.selectJoinList(BusinessDataCountVO.class,new MPJLambdaWrapper<GoodsorderDetail>() |
| | | .selectAs(Goods::getName,BusinessDataCountVO::getName) |
| | |
| | | .select("(select sum(ifnull(t.price,0) * ifnull(t.goods_num,0)))",BusinessDataCountVO::getPrice) |
| | | .leftJoin(Goodsorder.class,Goodsorder::getId,GoodsorderDetail::getOrderId) |
| | | .leftJoin(Goods.class,Goods::getId,GoodsorderDetail::getGoodsId) |
| | | .ge(startDate!=null,Goodsorder::getCreateDate,startDate) |
| | | .ne(endDate!=null,Goodsorder::getCreateDate,endDate) |
| | | // .ge(startDate!=null,Goodsorder::getCreateDate,startDate) |
| | | // .ne(endDate!=null,Goodsorder::getCreateDate,endDate) |
| | | .apply(param.getYear()!=null,"YEAR ( t1.CREATE_DATE )="+param.getYear() ) |
| | | .apply(param.getYear()!=null && param.getMonth()!=null,"MONTH ( t1.CREATE_DATE )="+param.getMonth() ) |
| | | .eq(Goodsorder::getIsdeleted,Constants.ZERO) |
| | | .in(Goodsorder::getStatus,Constants.OrderStatus.DONE.getKey(),Constants.OrderStatus.REFUND.getKey()) |
| | | .groupBy(GoodsorderDetail::getGoodsId) |
| | |
| | | * @author doumee |
| | | * @date ${nowDate} |
| | | */ |
| | | @Api(tags = "tableNameæ¥å£") |
| | | @Api(tags = "${tableName}æ¥å£") |
| | | @RestController |
| | | @RequestMapping("/business/${entityNameLower}") |
| | | public class ${entityName}Controller extends BaseController { |
| | |
| | | INSERT INTO `SYSTEM_PERMISSION`(`CODE`, `NAME`, `REMARK`, `FIXED`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `DELETED`) VALUES ('business:${entityNameLowerFull}:create', 'æ°å»º${tableComment}', '', 0, 1, CURRENT_TIMESTAMP, NULL, NULL, 0); |
| | | INSERT INTO `SYSTEM_PERMISSION`(`CODE`, `NAME`, `REMARK`, `FIXED`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `DELETED`) VALUES ('business:${entityNameLowerFull}:delete', 'å é¤${tableComment}', '', 0, 1, CURRENT_TIMESTAMP, NULL, NULL, 0); |
| | | INSERT INTO `SYSTEM_PERMISSION`(`CODE`, `NAME`, `REMARK`, `FIXED`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `DELETED`) VALUES ('business:${entityNameLowerFull}:update', 'ä¿®æ¹${tableComment}', '', 0, 1, CURRENT_TIMESTAMP, NULL, NULL, 0); |
| | | INSERT INTO `SYSTEM_PERMISSION`(`CODE`, `NAME`, `REMARK`, `FIXED`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `DELETED`) VALUES ('business:${entityNameLowerFull}:query', 'æ¥è¯¢${tableComment}', '', 0, 1, CURRENT_TIMESTAMP, NULL, NULL, 0); |
| | | INSERT INTO `SYSTEM_PERMISSION`(`CODE`, `NAME`, `REMARK`, `FIXED`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `DELETED`) VALUES ('business:${entityNameLowerFull}:exportExcel', '导åº${tableComment}(Excel)', '', 0, 1, CURRENT_TIMESTAMP, NULL, NULL, 0); |
| | | INSERT INTO `SYSTEM_PERMISSION`(`CODE`, `NAME`, `REMARK`, `FIXED`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `DELETED`, `MODULE`) VALUES ('business:${entityNameLowerFull}:create', 'æ°å»º${tableComment}', '', 0, 1, CURRENT_TIMESTAMP, NULL, NULL, 0,'${tableComment}'); |
| | | INSERT INTO `SYSTEM_PERMISSION`(`CODE`, `NAME`, `REMARK`, `FIXED`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `DELETED`, `MODULE`) VALUES ('business:${entityNameLowerFull}:delete', 'å é¤${tableComment}', '', 0, 1, CURRENT_TIMESTAMP, NULL, NULL, 0,'${tableComment}'); |
| | | INSERT INTO `SYSTEM_PERMISSION`(`CODE`, `NAME`, `REMARK`, `FIXED`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `DELETED`, `MODULE`) VALUES ('business:${entityNameLowerFull}:update', 'ä¿®æ¹${tableComment}', '', 0, 1, CURRENT_TIMESTAMP, NULL, NULL, 0,'${tableComment}'); |
| | | INSERT INTO `SYSTEM_PERMISSION`(`CODE`, `NAME`, `REMARK`, `FIXED`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `DELETED`, `MODULE`) VALUES ('business:${entityNameLowerFull}:query', 'æ¥è¯¢${tableComment}', '', 0, 1, CURRENT_TIMESTAMP, NULL, NULL, 0,'${tableComment}'); |
| | | INSERT INTO `SYSTEM_PERMISSION`(`CODE`, `NAME`, `REMARK`, `FIXED`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `DELETED`, `MODULE`) VALUES ('business:${entityNameLowerFull}:exportExcel', '导åº${tableComment}(Excel)', '', 0, 1, CURRENT_TIMESTAMP, NULL, NULL, 0,'${tableComment}'); |
| | | |
| | |
| | | queryWrapper.lambda().eq(pageWrap.getModel().get${column.getJavaName}() != null,${entityName}::get${column.getJavaName}, pageWrap.getModel().get${column.getJavaName}()); |
| | | #end |
| | | #if(${column.javaType} =='Date') |
| | | if (pageWrap.getModel().getId() != null) { |
| | | if (pageWrap.getModel().get${column.getJavaName}() != null) { |
| | | queryWrapper.lambda().ge(${entityName}::get${column.getJavaName}, Utils.Date.getStart(pageWrap.getModel().get${column.getJavaName}())); |
| | | queryWrapper.lambda().le(${entityName}::get${column.getJavaName}, Utils.Date.getEnd(pageWrap.getModel().get${column.getJavaName}())); |
| | | } |
| | |
| | | } |
| | | return PageData.from(${entityNameLower}Mapper.selectPage(page, queryWrapper)); |
| | | } |
| | | |
| | | @Override |
| | | public long count(${entityName} ${entityNameLower}) { |
| | | QueryWrapper<${entityName}> wrapper = new QueryWrapper<>(${entityNameLower}); |