doum
12 小时以前 bcad3fe1b888ae11d437f6558b7974cfa30cfb2e
经销商管理
已添加2个文件
已修改17个文件
1068 ■■■■ 文件已修改
admin/src/api/business/goods.js 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin/src/api/system/dictData.js 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin/src/components/business/OperaGoodsWindow.vue 266 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin/src/components/common/UploadImage.vue 37 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin/src/utils/request.js 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin/src/views/business/goodsLabels.vue 30 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin/src/views/business/orderSet.vue 265 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin/src/views/business/platformGoods.vue 94 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/dmmall_admin/src/main/java/com/doumee/api/business/CouponController.java 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/dmmall_admin/src/main/java/com/doumee/api/business/GoodsController.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/dmmall_admin/src/main/java/com/doumee/api/system/SystemDictDataController.java 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/dmmall_service/src/main/java/com/doumee/core/utils/Constants.java 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/dmmall_service/src/main/java/com/doumee/dao/business/model/Goods.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/dmmall_service/src/main/java/com/doumee/dao/system/dto/PlatformConfigDTO.java 52 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/dmmall_service/src/main/java/com/doumee/service/business/impl/CouponServiceImpl.java 15 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/dmmall_service/src/main/java/com/doumee/service/business/impl/GoodsServiceImpl.java 38 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/dmmall_service/src/main/java/com/doumee/service/business/impl/LabelsServiceImpl.java 29 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/dmmall_service/src/main/java/com/doumee/service/system/SystemDictDataService.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/dmmall_service/src/main/java/com/doumee/service/system/impl/SystemDictDataServiceImpl.java 174 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin/src/api/business/goods.js
@@ -6,7 +6,9 @@
    trim: true
  })
}
export function detail (id) {
  return request.get(`/business/goods/${id}`)
}
// åˆ›å»º
export function create (data) {
  return request.post('/business/goods/create', data)
@@ -16,6 +18,9 @@
export function updateById (data) {
  return request.post('/business/goods/updateById', data)
}
export function updateStatus (data) {
  return request.post('/business/goods/updateStatus', data)
}
export function findListByParentCategory (data) {
  return request.post('/business/goods/findListByParentCategory', data)
admin/src/api/system/dictData.js
@@ -33,3 +33,12 @@
    }
  })
}
export function getPlatformConfig () {
  return request.get('/system/dictData/getPlatformConfig' ,{})
}
// ä¿®æ”¹
export function updPlatformConfig (data) {
  return request.post('/system/dictData/updPlatformConfig', data)
}
admin/src/components/business/OperaGoodsWindow.vue
@@ -10,69 +10,113 @@
      <el-form-item label="商品名称" prop="name">
        <el-input v-model="form.name" placeholder="请输入商品名称" v-trim/>
      </el-form-item>
      <el-form-item v-if="form.type==2" label="商品标签" prop="labels">
        <el-input v-model="form.labels" placeholder="请输入标签,多个用“,”隔开,不超过5个" v-trim/>
      <el-form-item label="商品分类" prop="categoryId">
        <el-select  v-model="form.categoryId"    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>
      <template v-else>
        <el-form-item label="商品分类" prop="categoryId">
          <el-select
            v-model="form.categoryId"
            placeholder="请选择所属分类"
          >
            <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"
            placeholder="请选择商品品牌"
          >
            <el-option
              v-for="item in brands()"
              :key="item.id"
              :value="item.id"
              :label="item.name"
            ></el-option>
          </el-select>
        </el-form-item>
      </template>
      <el-form-item label="商品品牌" prop="brandId">
        <el-select v-model="form.brandId"   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">
        <UploadAvatarImage
          :file="{ 'imgurlfull': form.imgurlfull, 'imgurl': form.imgurl }"
          @uploadSuccess="uploadAvatarSuccess"
          @uploadEnd="isUploading = false"
          @uploadBegin="isUploading = true"
        />
        <div  style="display: flex; align-items: center;justify-content: center;  height: 100%; width: 100%">
          <UploadAvatarImage
              :file="{ 'imgurlfull': form.imgurlfull, 'imgurl': form.imgurl}"
              :uploadData="{folder:'goods'}"
              @uploadSuccess="uploadAvatarSuccess"
              @uploadEnd="isUploading = false"
              @uploadBegin="isUploading = true"
              style=" width: 120px;"
          />
          <div class="tip-warn" style=" margin-left: 20px; margin-top: 30px;">
            å»ºè®®å°ºå¯¸ï¼š100px X 100px
            æ”¯æŒpng、jpg、jpeg格式,大小不超过2M,上传图片不允许涉及政治敏感与色情
          </div>
        </div>
      </el-form-item>
      <el-form-item v-if="form.type==2" label="咖豆风味" prop="fileList">
        <UploadAvatarImage
          :file="{ 'imgurlfull': form.imgurlfull, 'imgurl': form.imgurl }"
          @uploadSuccess="uploadAvatarSuccess"
          @uploadEnd="isUploading = false"
          @uploadBegin="isUploading = true"
        />
      </el-form-item>
      <el-form-item v-else label="商品轮播图" prop="fileList">
      <el-form-item label="商品轮播图" prop="fileList">
        <UploadImage
          :fileList="form.fileList"
          :uploadData="{folder:'goods'}"
          @beginUpload="isUploading=true"
          @endUpload="isUploading=false"/>
        <p class="tip-warn">
          å»ºè®®å°ºå¯¸ï¼š750px X 750px,上限6å¼ 
          æ”¯æŒpng、jpg、jpeg格式,大小不超过2M,上传图片不允许涉及政治敏感与色情,
        </p>
      </el-form-item>
      <el-form-item label="展示价格" prop="price">
        <el-input v-model="form.price" placeholder="请输入展示价格" v-trim>
          <template slot="append">{{ form.type != 1 ? '元' : '咖豆' }}</template>
      <el-form-item label="出厂价(元)" prop="price">
        <el-input type="number" v-model="form.price" placeholder="请输入出厂价" v-trim>  <template slot="append"> å…ƒ</template>  </el-input>
      </el-form-item>
      <el-form-item label="销售价(元)" prop="skuPrice">
        <el-input type="number" v-model="form.skuPrice" placeholder="请输入销售价" 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="请输入线价" 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" 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" placeholder="请输入商品库存量" v-trim/>
      </el-form-item>
      <el-form-item label="商品单位" prop="unitName">
        <el-input v-model="form.unitName" placeholder="请输入商品单位" v-trim/>
      </el-form-item>
      <el-form-item  label="初始销量" prop="salenum">
        <el-input type="number" v-model="form.salenum" placeholder="请输入初始销量" v-trim/>
      </el-form-item>
      <el-form-item  label="商品重量" prop="weight">
        <el-input type="number" v-model="form.weight" placeholder="请输入商品重量" v-trim>
        <template slot="append">kg</template>
        </el-input>
      </el-form-item>
      <el-form-item v-if="form.type!=2" label="初始销量" prop="salenum">
        <el-input v-model="form.salenum" placeholder="请输入初始销量" v-trim/>
      <el-form-item label="是否上架" prop="status">
        <el-radio-group v-model="form.status">
          <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"   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" v-if="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>
        </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">
        <RichEditor :content="{ content : form.content}"  @edit="form.content=$event" />
        <RichEditor  :richData="form.content" :styleEditor="'border: 1px solid #ccc;display: inline-block;height:500px;'" @getWangedditor="getWangedditor" :readonly="false"/>
      </el-form-item>
    </el-form>
  </GlobalWindow>
@@ -84,6 +128,7 @@
import UploadImage from '@/components/common/UploadImage'
import UploadAvatarImage from '@/components/common/UploadAvatarImage'
import RichEditor from '@/components/common/RichEditor'
import { findAll as labelList } from '@/api/business/labels'
export default {
  name: 'OperaGoodsWindow',
  extends: BaseOpera,
@@ -103,24 +148,30 @@
        imgurlfull: '',
        salenum: '',
        type: 0,
        creator: '',
        createDate: '',
        editor: '',
        editDate: '',
        isdeleted: '',
        remark: '',
        info: '',
        content: '',
        sortnum: '',
        looknum: '',
        type: '',
        status: '',
        isrec: '',
        styleImg: '',
        labels: ''
        skuPrice: null,
        status: 1,
        showPrice: null,
        deductRata: null,
        weight: null,
        unitName: '',
        stockNum: null,
        brandIdList: [],
        brandList: []
      },
      applyBrands: [],
      // éªŒè¯è§„则
      rules: {
        name: [{ required: true, message: '请输入商品名称', tigger: 'blur' }],
        categoryId: [{ required: true, message: '请选择所属分类' }],
        brandIdList: [{ required: true, message: '请录入适用品牌和系列信息' }],
        weight: [{ required: true, message: '请输入商品重量' }],
        price: [{ required: true, message: '请输入商品出厂价' }],
        skuPrice: [{ required: true, message: '请输入商品零售价' }],
        deductRata: [{ required: true, message: '请输入积分抵扣比例' }],
        status: [{ required: true, message: '请选择是否上架' }]
      }
    }
  },
@@ -130,11 +181,48 @@
      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)
          })
        })
    },
    getWangedditor (val) {
      this.form.content = val
    },
    open (title, target, type) {
      this.title = title
      this.visible = true
      this.form.brandIdList = []
      this.form.fileList = []
      this.form.imgurl=''
      this.form.imgurlfull=''
      // debugger
      // æ–°å»º
      if (target == null) {
@@ -143,21 +231,64 @@
          this.form[this.configData['field.id']] = null
          this.form.type = type
        })
        this.loadBrandList()
        return
      }
      // ç¼–辑
      this.$nextTick(() => {
      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
        }
      })
    },
    uploadAvatarSuccess(file) {
    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()
      })
    },
    uploadAvatarSuccess (file) {
      this.form.imgurlfull = file.imgurlfull
      this.form.imgurl = file.imgurl
    },
    confirm () {
      this.form.brandList = []
      this.applyBrands.forEach(item => {
        if (item.show) {
          this.form.brandList.push(item)
        }
      })
      if (this.form.id == null || this.form.id === '') {
        this.__confirmCreate()
        return
      }
      this.__confirmEdit()
    }
  },
  }
}
</script>
@@ -172,4 +303,7 @@
    width: 100%;
  }
}
::v-deep  .el-form-item__label{
  width: 150px !important;
}
</style>
admin/src/components/common/UploadImage.vue
@@ -33,15 +33,15 @@
        </span>
      </div>
    </el-upload>
    <el-image-viewer
      v-if="showViewer"
    <el-image-viewer
      v-if="showViewer"
      :on-close="closeViewer"
      :initialIndex="tempIndex"
      :url-list="srcList"
      :z-index="3000"
    />
  </div>
</template>
<script>
@@ -55,12 +55,15 @@
      type: Array,
      default: () => []
    },
    maxNum: {
      type: Number,
      default: () => null
    },
    uploadData: Object,
  },
  data() {
    return {
      uploadImgUrl: process.env.VUE_APP_API_PREFIX + '/public/uploadPicture',
      realList: [],
      srcList: [],
      tempIndex: 0,
@@ -70,28 +73,34 @@
  watch: {
    fileList: {
      handler(val) {
        console.log(val);
        console.log("===================",val);
        if (val.length==0) {
          this.realList = []
          this.srcList = []
        }else{
          this.realList=val
          val.forEach(item =>{
            this.srcList.push(item.url)
          })
        }
        console.log("==================srcList=",this.srcList);
      }
    }
  },
  methods: {
    beforeUpload(file) {
      this.$emit('beginUpload')
      return true
    },
     // ä¸Šä¼ å›¾ç‰‡æˆåŠŸ
     uploadSuccess (res, file, fileList) {
      // console.log('this.fileList', this.fileList);
     uploadSuccess (res, file, fileList) {
      console.log('this.fileList', this.fileList);
      // console.log('fileList', fileList);
      this.$emit('endUpload')
      this.realList = fileList
      this.srcList.push(res.data.url)
      // this.realList = fileList
      // this.srcList.push(res.data.url)
      // console.log('file', file);
      if (res.code === 200) {
        this.fileList.push(
@@ -110,7 +119,7 @@
      this.$message.error('上传失败')
    },
    handlePictureCardPreview(file) {
      this.tempIndex = this.srcList.findIndex(item => item == file.response.data.url )
      this.tempIndex = this.srcList.findIndex(item => item == file.url )
      this.showViewer = true
    },
    closeViewer() {
@@ -118,12 +127,12 @@
    },
    handleRemove(file) {
      console.log(this.fileList);
      let tempIndex = this.realList.findIndex(item => item.fileurl === file.response.data.imgaddr)
      let tempIndex = this.realList.findIndex(item => item.fileurl === file.fileurl)
      // debugger
      this.realList.splice(tempIndex, 1)
      this.fileList.splice(tempIndex, 1)
      this.srcList.splice(tempIndex, 1)
    },
  },
}
admin/src/utils/request.js
@@ -3,6 +3,7 @@
import pkg from '../../package'
import { trim } from './util'
import cache from '../plugins/cache'
import { Message } from 'element-ui'
axios.defaults.headers.common['Content-Type'] = 'application/json;charset=UTF-8'
const axiosInstance = axios.create({
@@ -13,7 +14,7 @@
// æ–°å»ºè¯·æ±‚拦截器
axiosInstance.interceptors.request.use(config => {
  console.log(config);
  console.log(config)
  // debugger
  // å‚数去空格
  if (config.trim === true) {
@@ -42,7 +43,6 @@
// æ–°å»ºå“åº”拦截器
axiosInstance.interceptors.response.use((response) => {
  // debugger
  // è¯·æ±‚失败
  if (response.status !== 200) {
    return Promise.reject(new Error('服务器繁忙,请稍后再试'))
@@ -64,6 +64,7 @@
  }
  // ä¸šåŠ¡å¤±è´¥
  if (!response.data.success) {
    Message.error(response.data.message)
    return Promise.reject(response.data)
  }
  return response.data.data
admin/src/views/business/goodsLabels.vue
@@ -5,23 +5,6 @@
      <el-form-item label="分类名称" prop="name">
        <el-input v-model="searchForm.name" placeholder="请输入分类名称" @keypress.enter.native="search"></el-input>
      </el-form-item>
<!--      <el-form-item label="所属板块" prop="module">
        <el-select
          v-model="searchForm.module"
          placeholder="请选择所属板块"
        >
          <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>
@@ -30,7 +13,7 @@
    <!-- è¡¨æ ¼å’Œåˆ†é¡µ -->
    <template v-slot:table-wrap>
      <ul class="toolbar" v-permissions="['business:productlabel:create', 'business:productlabel:delete']">
        <li><el-button type="primary" @click="$refs.operaProductLabelWindow.open('新建商品标签信息表')" icon="el-icon-plus" v-permissions="['business:productlabel:create']">新建</el-button></li>
        <li><el-button type="primary" @click="$refs.operaProductLabelWindow.open('新建商品分类')" icon="el-icon-plus" v-permissions="['business:productlabel:create']">新建</el-button></li>
        <li><el-button @click="deleteByIdInBatch" icon="el-icon-delete" v-permissions="['business:productlabel:delete']">删除</el-button></li>
      </ul>
      <el-table
@@ -41,12 +24,7 @@
        @selection-change="handleSelectionChange"
      >
        <el-table-column type="selection" width="55"></el-table-column>
        <el-table-column prop="module" label="所属板块" min-width="100px">
          <template slot-scope="{row}">
            {{ row.module==0?'平台商城':'咖豆商城' }}
          </template>
        </el-table-column>
        <el-table-column prop="name" label="分类名称" min-width="100px"></el-table-column>
        <el-table-column prop="name" label="商品分类" min-width="100px"></el-table-column>
        <el-table-column prop="sortnum" label="排序码(升序)" min-width="100px"></el-table-column>
        <el-table-column prop="createDate" label="创建时间" min-width="100px"></el-table-column>
        <el-table-column prop="status" label="状态" min-width="100px">
@@ -68,7 +46,7 @@
          fixed="right"
        >
          <template slot-scope="{row}">
            <el-button type="text" @click="$refs.operaProductLabelWindow.open('编辑商品标签信息表', row)" icon="el-icon-edit" v-permissions="['business:productlabel:update']">编辑</el-button>
            <el-button type="text" @click="$refs.operaProductLabelWindow.open('编辑商品分类', row)" icon="el-icon-edit" v-permissions="['business:productlabel:update']">编辑</el-button>
            <el-button type="text" @click="deleteById(row)" icon="el-icon-delete" v-permissions="['business:productlabel:delete']">删除</el-button>
          </template>
        </el-table-column>
@@ -107,7 +85,7 @@
  },
  created () {
    this.config({
      module: '商品标签信息表',
      module: '商品分类信息表',
      api: '/business/labels',
      'field.id': 'id',
      'field.main': 'id'
admin/src/views/business/orderSet.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,265 @@
<template>
  <div class="box" style="max-height:calc(100% - 60px);margin-bottom:50px;overflow-y: auto" >
    <el-form :model="form" ref="form">
      <div class="header">
        <span style="font-size: 15px; font-weight: bold">【1】注册奖励</span>
      </div>
      <div class="item-content">
        <el-form-item label="积分奖励" label-width="150px"  prop="regIntegralRewardStatus">
          <el-switch  v-model="form.regIntegralRewardStatus" :active-value="0" :inactive-value="1"    active-color="#13ce66"   inactive-color="#ff4949"  ></el-switch>
        </el-form-item>
        <el-form-item label="新人注册送" label-width="250px" prop="regIntegralReward">
          <el-input  style="width: 200px;margin: 0px 20px" type="number"   v-model="form.regIntegralReward"   placeholder="请输入"   v-trim>
            <template slot="append">积分</template>
          </el-input>
        </el-form-item>
      </div>
      <div class="item-content">
        <el-form-item label="优惠券奖励" label-width="150px"  prop="regCouponRewardStatus">
          <el-switch  v-model="form.regCouponRewardStatus" :active-value="0" :inactive-value="1"    active-color="#13ce66"   inactive-color="#ff4949"  ></el-switch>
        </el-form-item>
        <div  >
          <el-form-item label="新人注册送优惠券" label-width="250px" prop="regCouponRewardList">
          </el-form-item>
          <div  style="margin-left: 150px;border: 1px solid #f2f2f2">
            <el-table style="width: 600px;"  :data="form.regCouponRewardList">
              <el-table-column prop="shopPrice" label="优惠券" min-width="300px" align="center">
                <template slot-scope="{row}" >
                  <el-select v-model="row.couponId" style="width: 200px;margin: 0px 20px" clearable filterable   placeholder="请选择优惠券"  >
                    <el-option v-for="item in couponList"   :label="item.name"  :value="item.id">  </el-option>
                  </el-select>
                </template>
              </el-table-column>
              <el-table-column prop="num" label="数量" min-width="200px" align="center">
                <template slot-scope="{row}" >
                  <el-input  style="width: 100px;margin: 0px 20px" type="number"   v-model="row.num"   placeholder="请输入数量"   v-trim/>
                </template>
              </el-table-column>
              <el-table-column  label="操作" min-width="100px" align="center">
                <template slot-scope="scope" >
                  <el-button style="color: red;border: none;" @click="delCoupon(0,scope.$index)">删除</el-button>
                </template>
              </el-table-column>
            </el-table>
            <el-button s type="primary" icon="el-icon-plus" @click="addCoupon(0)" style="height: 30px;margin: 10px;">添加</el-button>
          </div>
        </div>
      </div>
      <div class="header">
        <span style="font-size: 15px; font-weight: bold">【2】邀请好友奖励</span>
      </div>
      <div class="item-content">
        <el-form-item label="积分奖励" label-width="150px"  prop="shareIntegralRewardStatus">
          <el-switch  v-model="form.shareIntegralRewardStatus" :active-value="0" :inactive-value="1"    active-color="#13ce66"   inactive-color="#ff4949"  ></el-switch>
        </el-form-item>
        <el-form-item label="好友成功注册送邀请人" label-width="250px" prop="shareIntegralReward">
          <el-input  style="width: 200px;margin: 0px 20px" type="number"   v-model="form.shareIntegralReward"   placeholder="请输入"   v-trim>
            <template slot="append">积分</template>
          </el-input>
        </el-form-item>
      </div>
      <div class="item-content">
        <el-form-item label="优惠券奖励" label-width="150px"  prop="shareCouponRewardStatus">
          <el-switch  v-model="form.shareCouponRewardStatus" :active-value="0" :inactive-value="1"    active-color="#13ce66"   inactive-color="#ff4949"  ></el-switch>
        </el-form-item>
        <div  >
          <el-form-item label="好友完成首单送邀请人优惠券" label-width="250px" prop="shareCouponRewardList">
          </el-form-item>
          <div  style="margin-left: 150px;border: 1px solid #f2f2f2">
            <el-table style="width: 600px;"  :data="form.shareCouponRewardList">
              <el-table-column prop="couponId" label="优惠券" min-width="300px" align="center">
                <template slot-scope="{row}" >
                  <el-select v-model="row.couponId" style="width: 200px;margin: 0px 20px"  clearable filterable   placeholder="请选择优惠券"  >
                    <el-option v-for="item in couponList"   :label="item.name"  :value="item.id">  </el-option>
                  </el-select>
                </template>
              </el-table-column>
              <el-table-column prop="num" label="数量" min-width="200px" align="center">
                <template slot-scope="{row}" >
                  <el-input  style="width: 100px;margin: 0px 20px" type="number"   v-model="row.num"   placeholder="请输入数量"   v-trim/>
                </template>
              </el-table-column>
              <el-table-column  label="操作" min-width="100px" align="center">
                <template slot-scope="scope" >
                  <el-button style="color: red;border: none;" @click="delCoupon(1,scope.$index)">删除</el-button>
                </template>
              </el-table-column>
            </el-table>
            <el-button s type="primary" icon="el-icon-plus" @click="addCoupon(1)" style="height: 30px;margin: 10px;">添加</el-button>
          </div>
        </div>
      </div>
      <div class="header">
        <span style="font-size: 15px; font-weight: bold">【3】消费返积分</span>
      </div>
      <div class="item-content">
        <el-form-item label="返用户积分" label-width="150px"  prop="returnMemberIntegralStatus">
          <el-switch  v-model="form.returnMemberIntegralStatus" :active-value="0" :inactive-value="1"    active-color="#13ce66"   inactive-color="#ff4949"  ></el-switch>
        </el-form-item>
        <el-form-item label="订单实付金额每满" label-width="250px" prop="returnMemberIntegral">
          <el-input  style="width: 250px;margin: 0px 20px" type="number"   v-model="form.returnMemberIntegral"   placeholder="请输入"   v-trim>
            <template slot="append">元返用户1积分</template>
          </el-input>
          <p class="tip-warn" style="margin-bottom: 1px;"><i class="el-icon-warning"></i>提醒:实付金额去除运费</p>
        </el-form-item>
      </div>
      <div class="item-content">
        <el-form-item label="返经销商积分" label-width="150px"  prop="returnShopIntegralStatus">
          <el-switch  v-model="form.returnShopIntegralStatus" :active-value="0" :inactive-value="1"    active-color="#13ce66"   inactive-color="#ff4949"  ></el-switch>
        </el-form-item>
        <el-form-item label="订单实付金额每满" label-width="250px" prop="returnShopIntegral">
          <el-input  style="width: 250px;margin: 0px 20px" type="number"   v-model="form.returnShopIntegral"   placeholder="请输入"   v-trim>
            <template slot="append">元返经销商1积分</template>
          </el-input>
          <p class="tip-warn" style="margin-bottom: 1px;"><i class="el-icon-warning"></i>提醒:实付金额去除运费</p>
        </el-form-item>
      </div>
      <div class="header">
        <span style="font-size: 15px; font-weight: bold">【4】合计优惠承担比例</span>
      </div>
      <div class="item-content">
        <el-form-item label="总部承担" label-width="150px" prop="totalRate">
          <el-input  style="width: 200px;margin: 0px 20px" type="number"   v-model="form.totalRate"   placeholder="请输入"   v-trim>
            <template slot="append">%</template>
          </el-input>
          <p class="tip-warn" style="margin-bottom: 1px;"><i class="el-icon-warning"></i>提醒:设置总部和经销商在订单合计优惠金额中(优惠券+积分抵扣)各自承担的比例</p>
        </el-form-item>
      </div>
      <el-form-item style="margin-top: 100px;width: 100%;text-align: center">
        <el-button type="primary" style="width: 300px"  :loading="working" @click="submit">保存配置项</el-button>
      </el-form-item>
    </el-form>
  </div>
</template>
<script>
import { getPlatformConfig, updPlatformConfig } from '@/api/system/dictData'
import {allList} from '@/api/business/coupon'
export default {
  name: '',
  data () {
    return {
      uploadData: {
        folder: ''
      },
      isUploading: false,
      working: false,
      couponList: [],
      form: {
        regIntegralRewardStatus: 0,
        shareIntegralRewardStatus: 0,
        regCouponRewardStatus: 0,
        shareCouponRewardStatus: 0,
        regIntegralReward: 0,
        shareIntegralReward: 0,
        regCouponRewardList: [],
        shareCouponRewardList: [],
        returnMemberIntegralStatus: 0,
        returnShopIntegralStatus: 0,
        returnMemberIntegral: 0,
        returnShopIntegral: 0,
        totalRate: 0
      }
    }
  },
  created () {
    this.getCouponList()
    this.getData()
  },
  methods: {
    getCouponList () {
      allList({})
        .then(res => {
          if (res) {
            this.couponList = res || []
          }
        })
    },
    delCoupon(type,index){
      if(type ===0){
        this.form.regCouponRewardList.splice(index,1)
      }else if(type ===1){
        this.form.shareCouponRewardList.splice(index,1)
      }
    },
    addCoupon(type){
      if(type ===0){
        this.form.regCouponRewardList.push({couponId:null,num:null})
      }else if(type ===1){
        this.form.shareCouponRewardList.push({couponId:null,num:null})
      }
    },
    getData () {
      getPlatformConfig({})
        .then(res => {
          if (res) {
            this.form = {
              regIntegralRewardStatus: res.regIntegralRewardStatus || 0,
              shareIntegralRewardStatus: res.shareIntegralRewardStatus || 0,
              regCouponRewardStatus: res.regCouponRewardStatus || 0,
              shareCouponRewardStatus: res.shareCouponRewardStatus || 0,
              regIntegralReward: res.regIntegralReward || 0,
              shareIntegralReward: res.shareIntegralReward || 0,
              regCouponRewardList: res.regCouponRewardList || [],
              shareCouponRewardList: res.shareCouponRewardList || [],
              returnMemberIntegralStatus: res.returnMemberIntegralStatus || 0,
              returnShopIntegralStatus: res.returnShopIntegralStatus || 0,
              returnMemberIntegral: res.returnMemberIntegral || 0,
              returnShopIntegral: res.returnShopIntegral || 0,
              totalRate: res.totalRate || 0
            }
          }
        })
    },
    submit () {
      console.log(this.form)
      this.$refs.form.validate((valid) => {
        if (!valid) {
          return
        }
        // è°ƒç”¨æ–°å»ºæŽ¥å£
        this.isWorking = true
        updPlatformConfig(this.form).then(res => {
          this.$message.success('保存成功')
          this.getData()
        })
          .catch(e => {
            this.$tip.apiFailed(e)
          })
          .finally(() => {
            this.isWorking = false
          })
      })
    }
  }
}
</script>
<style lang="scss" scoped>
.el-container /deep/  .el-main{
  width: 100%;
  overflow-y: auto  !important ;
  height: calc(100% - 94px);
}
.item-content{
  display: flex;
  width: 100%;
}
.header{
  margin: 20px 0 20px 0;padding:10px;background-color: rgba(140,147,157,0.61);
}
/deep/ .el-main{
  width: 100%;
  //height: 100%;
  overflow-y: auto  !important ;
  height: calc(100% - 94px);
}
.box {
  width: 100%;
  padding: 30px;
  box-sizing: border-box;
  background: #ffffff;
}
</style>
admin/src/views/business/platformGoods.vue
@@ -2,11 +2,11 @@
  <TableLayout :permissions="['business:goods:query']">
    <!-- æœç´¢è¡¨å• -->
    <el-form ref="searchForm" slot="search-form" :model="searchForm" label-width="100px" inline>
      <el-tabs v-model="activeName" @tab-click="handleClick">
<!--      <el-tabs v-model="activeName" @tab-click="handleClick">
        <el-tab-pane label="全部商品" name="first"></el-tab-pane>
        <el-tab-pane label="已售罄商品" name="second"></el-tab-pane>
        <el-tab-pane label="回收站商品" name="third"></el-tab-pane>
      </el-tabs>
      </el-tabs>-->
      <el-form-item label="商品名称" prop="name">
        <el-input v-model="searchForm.name" placeholder="请输入商品名称" @keypress.enter.native="search"></el-input>
      </el-form-item>
@@ -51,15 +51,14 @@
      <section>
        <el-button type="primary" @click="search">搜索</el-button>
        <el-button @click="reset">重置</el-button>
        <el-button @click="$refs.operaPlatformGoodsSkuWindow.open('平台SKU')">重置</el-button>
      </section>
    </el-form>
    <!-- è¡¨æ ¼å’Œåˆ†é¡µ -->
    <template v-slot:table-wrap>
      <ul class="toolbar" v-permissions="['business:goods:create', 'business:goods:delete']">
        <li><el-button type="primary" @click="$refs.operaGoodsWindow.open('新建商品', null, 0)" v-permissions="['business:goods:create']">新建</el-button></li>
        <li><el-button type="primary" @click="issued(0)">上架</el-button></li>
        <li><el-button type="primary" @click="soldOut(1)">下架</el-button></li>
        <li><el-button type="primary" icon="el-icon-plus" @click="$refs.operaGoodsWindow.open('新建商品', null, 0)" v-permissions="['business:goods:create']">新建</el-button></li>
        <li><el-button type="primary"  icon="el-icon-edit"  @click="issued(0)">上架</el-button></li>
        <li><el-button type="danger"  icon="el-icon-edit"  @click="issued(1)">下架</el-button></li>
      </ul>
      <el-table
        v-loading="isWorking.search"
@@ -69,10 +68,9 @@
        @selection-change="handleSelectionChange"
      >
        <el-table-column type="selection" width="55"></el-table-column>
        <el-table-column prop="imgurl" label="商品信息" min-width="200px">
        <el-table-column prop="imgurl" label="商品信息" min-width="100px">
          <template slot-scope="{row}">
            <el-image v-if="row.imgurl" :src="row.resourcePath+row.imgurl" :preview-src-list="[row.resourcePath+row.imgurl]"></el-image>
            {{ row.name }}
            <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>
          </template>
        </el-table-column>
        <el-table-column prop="id" label="商品ID" min-width="150px" ></el-table-column>
@@ -83,13 +81,18 @@
        <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="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>
          </template>
        </el-table-column>
        <el-table-column prop="editDate" label="最近更新时间" min-width="100px"></el-table-column>
        <el-table-column prop="status" label="状态" min-width="100px">
        <el-table-column prop="status" label="上下架状态" min-width="100px" fixed="right" align="center">
          <template slot-scope="{row}">
            <el-switch
              v-model="row.status"
              :active-value="1"
              :inactive-value="0"
              :active-value="0"
              :inactive-value="1"
              active-color="#13ce66"
              inactive-color="#ff4949"
              @change="statusChange(row)"
@@ -98,13 +101,14 @@
        </el-table-column>
        <el-table-column
          label="操作"
          min-width="120"
          min-width="250"
          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" @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.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>-->
          </template>
        </el-table-column>
      </el-table>
@@ -129,8 +133,7 @@
import OperaGoodsWindow from '@/components/business/OperaGoodsWindow'
import OperaGoodsDetailWindow from '@/components/business/OperaGoodsDetailWindow'
import OperaPlatformGoodsSkuWindow from '@/components/business/OperaPlatformGoodsSkuWindow'
import { fetchList as labelList } from '@/api/business/labels'
import { updateById } from '@/api/business/goods'
import { findAll as labelList } from '@/api/business/labels'
export default {
  name: 'Goods',
  extends: BaseTable,
@@ -165,13 +168,14 @@
        labels: ''
      },
      labels: [],
      brands: [],
      serials: [],
      brands: []
    }
  },
  provide() {
  provide () {
    return {
      labels: () => this.labels,
      brands: () => this.brands,
      brands: () => this.brands
    }
  },
  created () {
@@ -182,58 +186,50 @@
      'field.main': 'id'
    })
    this.search()
    labelList({
      capacity: 999,
      model: {
        type: 0 //商品分类
      }
      type: 0 // å•†å“åˆ†ç±»
    }).then(res => {
      this.labels = res
    })
    labelList({
      type: 1 // å•†å“å“ç‰Œ
    })
      .then(res => {
        this.labels = res.records
      })
    labelList({
      capacity: 999,
      model: {
        type: 1 //商品品牌
      }
    })
      .then(res => {
        this.brands = res.records
        this.brands = res
      })
  },
  methods: {
    handleClick(val) {
    goPriceSet(row){
    },
    handleClick (val) {
    },
    /**
     *
     * @param {上下状态} status 0上架 1下架
     */
    issued(status) {
    issued (status) {
      if (this.tableData.selectedRows.length === 0) {
        this.$tip.warning('请至少选择一条数据')
        return
      }
      let message = `确认${status==0?'上架':'下架'}选中的商品么?`
      const message = `确认${status === 0 ? '上架' : '下架'}选中的商品么?`
      this.$dialog.messageWaring(message)
        .then(() => {
        })
    },
    statusChange(row) {
      updateById(row)
    statusChange (row) {
      this.statusChangeBiz([row])
    },
    statusChangeBiz (rows) {
      this.api.updateStatus(rows)
        .then(() => {
          this.$message.success('操作成功')
          this.search()
        })
        .catch(e => {
          this.$message.error('操作成功')
        })
        .then(() => {
          this.handlePageChange()
          this.search()
        })
    }
  },
  }
}
</script>
server/dmmall_admin/src/main/java/com/doumee/api/business/CouponController.java
@@ -81,6 +81,12 @@
    public ApiResponse<PageData<Coupon>> findPage (@RequestBody PageWrap<Coupon> pageWrap) {
        return ApiResponse.success(couponService.findPage(pageWrap));
    }
    @ApiOperation("列表查询")
    @PostMapping("/list")
    @RequiresPermissions("business:coupon:query")
    public ApiResponse<List<Coupon>> findList (@RequestBody Coupon pageWrap) {
        return ApiResponse.success(couponService.findList(pageWrap));
    }
    @ApiOperation("导出Excel")
    @PostMapping("/exportExcel")
server/dmmall_admin/src/main/java/com/doumee/api/business/GoodsController.java
@@ -26,7 +26,6 @@
@RestController
@RequestMapping("/business/goods")
public class GoodsController extends BaseController {
    @Autowired
    private GoodsService goodsService;
@@ -70,9 +69,9 @@
    @ApiOperation("商品上下架状态修改")
    @PostMapping("/updateStatusById")
    @PostMapping("/updateStatus")
    @RequiresPermissions("business:goods:update")
    public ApiResponse updateStatusById(@RequestBody List<Goods> list) {
    public ApiResponse updateStatus(@RequestBody List<Goods> list) {
        goodsService.updateStatusById(list);
        return ApiResponse.success(null);
    }
server/dmmall_admin/src/main/java/com/doumee/api/system/SystemDictDataController.java
@@ -8,6 +8,7 @@
import com.doumee.core.model.PageData;
import com.doumee.core.model.PageWrap;
import com.doumee.core.utils.Constants;
import com.doumee.dao.system.dto.PlatformConfigDTO;
import com.doumee.dao.system.dto.QuerySystemDictDataDTO;
import com.doumee.dao.system.model.SystemDictData;
import com.doumee.dao.system.vo.SystemDictDataListVO;
@@ -99,4 +100,18 @@
        return ApiResponse.success(null);
    }
    @ApiOperation("获取平台配置项")
    @GetMapping("/getPlatformConfig")
    public ApiResponse<PlatformConfigDTO> getPlatformConfig () {
        return ApiResponse.success(systemDictDataService.getPlatformConfigDTO());
    }
    @ApiOperation("更新平台配置项")
    @PostMapping("/updPlatformConfig")
    public ApiResponse updPlatformConfig (@RequestBody PlatformConfigDTO platformConfigDTO) {
        systemDictDataService.updPlatformConfig(platformConfigDTO);
        return ApiResponse.success("操作成功");
    }
}
server/dmmall_service/src/main/java/com/doumee/core/utils/Constants.java
@@ -18,6 +18,20 @@
    public static final int THREE = 3 ;
    public static final int FOUR = 4 ;
    public static final String LABELS_IMG ="LABELS_IMG" ;
    public static final String ORDERSET_REG_INTEGRAL_REWARD_STATUS = "ORDERSET_REG_INTEGRAL_REWARD_STATUS";
     public static final String ORDERSET_SHARE_INTEGRAL_REWARD_STATUS="ORDERSET_SHARE_INTEGRAL_REWARD_STATUS";
     public static final String ORDERSET_REG_COUPON_REWARD_STATUS="ORDERSET_REG_COUPON_REWARD_STATUS";
     public static final String ORDERSET_SHARE_COUPON_REWARD_STATUS="ORDERSET_SHARE_COUPON_REWARD_STATUS";
     public static final String ORDERSET_REG_INTEGRAL_REWARD="ORDERSET_REG_INTEGRAL_REWARD";
     public static final String ORDERSET_SHARE_INTEGRAL_REWARD="ORDERSET_SHARE_INTEGRAL_REWARD";
     public static final String ORDERSET_REG_COUPON_REWARD_LIST="ORDERSET_REG_COUPON_REWARD_LIST";
     public static final String ORDERSET_SHARE_COUPON_REWARD_LIST="ORDERSET_SHARE_COUPON_REWARD_LIST";
     public static final String ORDERSET_RETURN_MEMBER_INTEGRAL_STATUS="ORDERSET_RETURN_MEMBER_INTEGRAL_STATUS";
     public static final String ORDERSET_RETURN_SHOP_INTEGRAL_STATUS="ORDERSET_RETURN_SHOP_INTEGRAL_STATUS";
     public static final String ORDERSET_RETURN_MEMBER_INTEGRAL="ORDERSET_RETURN_MEMBER_INTEGRAL";
     public static final String ORDERSET_RETURN_SHOP_INTEGRAL="ORDERSET_RETURN_SHOP_INTEGRAL";
   public static final String ORDERSET_TOTAL_RATE="ORDERSET_TOTAL_RATE";
    public static final String ORDER_SET ="ORDER_SET" ;
    /**
     * mq tag
server/dmmall_service/src/main/java/com/doumee/dao/business/model/Goods.java
@@ -136,6 +136,9 @@
    @ApiModelProperty(value = "sku金额", hidden = true)
    @TableField(exist = false)
    private BigDecimal skuPrice;
    @ApiModelProperty(value = "sku显示价格", hidden = true)
    @TableField(exist = false)
    private BigDecimal showPrice;
    @ApiModelProperty(value = "sku总金额", hidden = true)
    @TableField(exist = false)
server/dmmall_service/src/main/java/com/doumee/dao/system/dto/PlatformConfigDTO.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,52 @@
package com.doumee.dao.system.dto;
import com.alibaba.fastjson.JSONObject;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.math.BigDecimal;
import java.util.List;
/**
 * Created by IntelliJ IDEA.
 *
 * @Author : Rk
 * @create 2023/3/23 9:50
 */
@Data
@ApiModel("系统订单配置")
public class PlatformConfigDTO {
    @ApiModelProperty(value = "注册积分奖励状态  0开启 1关闭")
    private Integer regIntegralRewardStatus;
    @ApiModelProperty(value = "邀请好友积分奖励状态  0开启 1关闭")
    private Integer shareIntegralRewardStatus;
    @ApiModelProperty(value = "注册优惠券奖励状态  0开启 1关闭")
    private Integer regCouponRewardStatus;
    @ApiModelProperty(value = "邀请好友优惠券奖励状态  0开启 1关闭")
    private Integer shareCouponRewardStatus;
    @ApiModelProperty(value = "注册积分奖励数量")
    private BigDecimal regIntegralReward;
    @ApiModelProperty(value = "邀请好友积分奖励数量")
    private BigDecimal shareIntegralReward;
    @ApiModelProperty(value = "注册优惠券奖励集合")
    private List<JSONObject> regCouponRewardList;
    @ApiModelProperty(value = "邀请好友优惠券奖励集合")
    private List<JSONObject> shareCouponRewardList;
    @ApiModelProperty(value = "消费返积分-返用户积分状态 0开启 1关闭")
    private Integer returnMemberIntegralStatus;
    @ApiModelProperty(value = "消费返积分-返经销商积分状态 0开启 1关闭")
    private Integer returnShopIntegralStatus;
    @ApiModelProperty(value = "消费返积分-返用户积分数量")
    private BigDecimal returnMemberIntegral;
    @ApiModelProperty(value = "消费返积分-返经销商积分数量")
    private BigDecimal returnShopIntegral;
    @ApiModelProperty(value = "合计优惠承担比例(%)")
    private BigDecimal totalRate;
}
server/dmmall_service/src/main/java/com/doumee/service/business/impl/CouponServiceImpl.java
@@ -182,9 +182,18 @@
    }
    @Override
    public List<Coupon> findList(Coupon coupon) {
        QueryWrapper<Coupon> wrapper = new QueryWrapper<>(coupon);
        return couponMapper.selectList(wrapper);
    public List<Coupon> findList(Coupon pageWrap) {
        MPJLambdaWrapper<Coupon> queryWrapper = new MPJLambdaWrapper<>();
        Utils.MP.blankToNull(pageWrap );
        queryWrapper.selectAll(Coupon.class);
        queryWrapper.like(StringUtils.isNotBlank(pageWrap. getName()),Coupon::getName,pageWrap.getName());
        queryWrapper.eq(Coupon::getIsdeleted,Constants.ZERO);
        queryWrapper.orderByDesc(Coupon::getCreateDate);
        List<Coupon> result =  couponJoinMapper.selectList( queryWrapper);
        for(Coupon model:result){
            initCouponStatus(model);
        }
        return result;
    }
  
    @Override
server/dmmall_service/src/main/java/com/doumee/service/business/impl/GoodsServiceImpl.java
@@ -156,7 +156,7 @@
        goodsSku.setGoodsId(goods.getId());
        goodsSku.setName(goods.getName());
        goodsSku.setPrice(goods.getSkuPrice());
        goodsSku.setShowPrice(goods.getPrice());
        goodsSku.setShowPrice(goods.getShowPrice());
        goodsSku.setStock(goods.getStockNum());
        goodsSku.setIntegralRate(goods.getDeductRata());
        goodsSku.setUnitName(goods.getUnitName());
@@ -211,6 +211,7 @@
                    || goods.getBrandList() == null
                    || goods.getBrandList().size() == 0
                    || goods.getWeight() == null
                    || goods.getDeductRata() == null
                    || goods.getPrice() == null
                    || goods.getSkuPrice() == null
                    || StringUtils.isBlank(goods.getImgurl())
@@ -218,6 +219,10 @@
                throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(), ResponseStatus.BAD_REQUEST.getMessage());
            }
            if(goods.getDeductRata().compareTo(new BigDecimal(0.1)) <Constants.ZERO ||
                    goods.getDeductRata().compareTo(new BigDecimal(100)) >Constants.ZERO){
                throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(), "对不起,积分可抵扣金额比例请设置[0.1,100]之间~");
            }
            //查询分类
            Labels cate = labelsMapper.selectById(goods.getCategoryId());
            if(cate == null || Constants.equalsInteger(cate.getIsdeleted(),Constants.ONE)
@@ -225,7 +230,7 @@
                throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(), "对不起,分类信息不存在");
            }
            if(goods.getBrandId()!=null){
                Labels brand = labelsMapper.selectById(goods.getCategoryId());
                Labels brand = labelsMapper.selectById(goods.getBrandId());
                if(brand == null || Constants.equalsInteger(brand.getIsdeleted(),Constants.ONE)
                        ||! Constants.equalsInteger(brand.getType(),Constants.LabelsType.GOODSBRAND.getKey())){
                    throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(), "对不起,品牌信息不存在");
@@ -234,7 +239,7 @@
            List<Integer> bIds = new ArrayList<>();
            for(Labels b : goods.getBrandList()){
                bIds.add(b.getId());
                if(b.getChildIdList() == null || b.getChildIdList().size() ==0){
                if(b.getChildIdList() != null && b.getChildIdList().size() >=0){
                    bIds.addAll(b.getChildIdList());
                }
            }
@@ -251,9 +256,9 @@
                     throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(), "对不起,请选择正确的适用品牌");
                 }
                 idsBrand.add("["+b.getId()+"]");
                if(b.getChildIdList() == null || b.getChildIdList().size() ==0){
                if(b.getChildIdList()!= null && b.getChildIdList().size() >=0){
                   for(Integer c :b.getChildIdList()){
                       Labels cb = findLabelFromListByid(allBrands,b.getId(),Constants.LabelsType.SERIES_BRAND.getKey(),b.getId());
                       Labels cb = findLabelFromListByid(allBrands,c,Constants.LabelsType.SERIES_BRAND.getKey(),b.getId());
                       if(cb == null){
                           throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(), "对不起,品牌【"+tb.getName() +"】下所属系列不正确");
                       }
@@ -265,7 +270,6 @@
            if(idsSerial.size()>0){
                goods.setSerialIds(String.join(",",idsSerial));
            }
    }
    private Labels findLabelFromListByid(List<Labels> allBrands, Integer id, int type,Integer parentId) {
@@ -274,13 +278,13 @@
        }
        for(Labels labels:allBrands){
            if(!Constants.equalsInteger(id,labels.getId())){
                return null;
               continue;
            }
            if(!Constants.equalsInteger(type,labels.getType())){
                return null;
              continue;
            }
            if(parentId !=null && !Constants.equalsInteger(parentId,labels.getParentId())){
                return null;
               continue;
            }
            return labels;
        }
@@ -364,11 +368,11 @@
        skuMapper.update(null,new UpdateWrapper<Sku>().lambda()
                .set(Sku::getIsdeleted,Constants.ONE)
                .eq(Sku::getIsdeleted,Constants.ZERO)
                .eq(Sku::getGoodsId,goods.getSkuId()));
                .eq(Sku::getGoodsId,goods.getId()));
        goodsSkuMapper.update(null,new UpdateWrapper<GoodsSku>().lambda()
                .set(GoodsSku::getIsdeleted,Constants.ONE)
                .eq(GoodsSku::getIsdeleted,Constants.ZERO)
                .eq(GoodsSku::getGoodsId,goods.getSkuId()));
                .eq(GoodsSku::getGoodsId,goods.getId()));
        dealDefaultGoodsSku(goods);//新建sku信息
        dealBatchMultiFiles(goods, goods.getFileList(), user,true);
    }
@@ -526,7 +530,8 @@
    @Override
    public Goods findById(Integer id) {
        MPJLambdaWrapper<Goods> queryWrapper = new MPJLambdaWrapper<>();
        String path = systemDictDataBiz.queryByCode(Constants.OSS, Constants.RESOURCE_PATH).getCode() + systemDictDataBiz.queryByCode(Constants.OSS, Constants.ACTIVITY_FILE).getCode();
        String path = systemDictDataBiz.queryByCode(Constants.OSS, Constants.RESOURCE_PATH).getCode()
                + systemDictDataBiz.queryByCode(Constants.OSS, Constants.GOODS_FILE).getCode();
        queryWrapper.eq(Goods::getId,id);
        queryWrapper.selectAll(Goods.class);
@@ -554,6 +559,7 @@
            //默认sku信息
            GoodsSku goodsSku = goodsSkuList.get(0);
            goods.setSkuPrice(goodsSku.getPrice());
            goods.setShowPrice(goodsSku.getShowPrice());
            goods.setWeight(goodsSku.getWeight());
            goods.setStockNum(goodsSku.getStock());
            goods.setUnitName(goodsSku.getUnitName());
@@ -592,6 +598,7 @@
                    }
                }
            }
            goods.setBrandList(brandList);
        }
    }
@@ -721,7 +728,7 @@
        queryWrapper.leftJoin(Labels.class,Labels::getId,Goods::getBrandId);
        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 sum(STOCK) from goods_sku where ISDELETED=0 and GOODS_ID=t.id) as stockNum ");
        //实际销量
        queryWrapper.select("(select sum(gd.GOODS_NUM) from  goodsorder_detail gd" +
                "        inner join  goods_sku gs on gs.id=gd.GOODS_SKU_ID" +
@@ -773,7 +780,8 @@
        if (list == null || list.size() == 0) {
            return;
        }
        String path = systemDictDataBiz.queryByCode(Constants.OSS, Constants.RESOURCE_PATH).getCode() + systemDictDataBiz.queryByCode(Constants.OSS, Constants.GOODS_FILE).getCode();
        String path = systemDictDataBiz.queryByCode(Constants.OSS, Constants.RESOURCE_PATH).getCode()
                + systemDictDataBiz.queryByCode(Constants.OSS, Constants.GOODS_FILE).getCode();
        for (Goods goods : list) {
            goods.setResourcePath(path);
            //查询sku
@@ -788,9 +796,11 @@
                //默认sku信息
                goods.setSkuPrice(goodsSku.getPrice());
                goods.setWeight(goodsSku.getWeight());
                goods.setShowPrice(goodsSku.getShowPrice());
                goods.setStockNum(goodsSku.getStock());
                goods.setUnitName(goodsSku.getUnitName());
            }
//            initGoodsApplyBrandAndSerial(goods);
        }
    }
server/dmmall_service/src/main/java/com/doumee/service/business/impl/LabelsServiceImpl.java
@@ -232,10 +232,7 @@
    @Override
    public List<Labels> findList(Labels labels) {
        MPJLambdaWrapper<Labels> query = new MPJLambdaWrapper<>();
        if(labels!=null&&labels.getParentId()!=null){
            query.eq(Labels::getParentId,labels.getParentId());
        }else{
@@ -248,7 +245,15 @@
        }
        query.eq(Labels::getIsdeleted,Constants.ZERO);
        query.eq(labels.getType()!=null,Labels::getType,labels.getType());
        query.orderByAsc(Labels::getSortnum);
        List<Labels> list= labelsJoinMapper.selectList(query);
        List<Labels> childList= null;
        if(Constants.equalsInteger(labels.getType(),Constants.LabelsType.APPLICABLE_BRAND.getKey())){
            childList= labelsJoinMapper.selectList(new QueryWrapper<Labels>().lambda()
                    .eq(Labels::getIsdeleted,Constants.ZERO)
                    .eq(Labels::getType,Constants.LabelsType.SERIES_BRAND.getKey())
                    .orderByAsc(Labels::getSortnum));
        }
        for(Labels model:list){
            if(Constants.equalsInteger(model.getType(),Constants.LabelsType.BIG_AREA.getKey())){
                //如果是大区信息,查询所有绑定额省份信息
@@ -256,6 +261,24 @@
                        .eq(Areas::getIsdeleted,Constants.ZERO)
                        .eq(Areas::getBigAreaId,model.getId())));
            }
            if(Constants.equalsInteger(labels.getType(),Constants.LabelsType.APPLICABLE_BRAND.getKey())
                    &&Constants.equalsInteger(model.getType(),Constants.LabelsType.APPLICABLE_BRAND.getKey())){
                //如果是适应品牌,则查询下级系列
                model.setChildList(getChildListbyParentId(childList,model.getId()));
            }
        }
        return list;
    }
    private List<Labels> getChildListbyParentId(List<Labels> childList, Integer id) {
        List<Labels> list = new ArrayList<>();
        if(childList!=null && childList.size()>0){
            for(Labels labels : childList){
                if(Constants.equalsInteger(labels.getParentId(),id)){
                    list.add(labels);
                }
            }
        }
        return list;
    }
server/dmmall_service/src/main/java/com/doumee/service/system/SystemDictDataService.java
@@ -2,6 +2,7 @@
import com.doumee.core.model.PageData;
import com.doumee.core.model.PageWrap;
import com.doumee.dao.system.dto.PlatformConfigDTO;
import com.doumee.dao.system.dto.QuerySystemDictDataDTO;
import com.doumee.dao.system.model.SystemDictData;
import com.doumee.dao.system.vo.SystemDictDataListVO;
@@ -96,5 +97,8 @@
    List<SystemDictData> findList(Integer dicId,List<String> codes);
    PlatformConfigDTO getPlatformConfigDTO();
    void updPlatformConfig(PlatformConfigDTO platformConfigDTO);
}
server/dmmall_service/src/main/java/com/doumee/service/system/impl/SystemDictDataServiceImpl.java
@@ -1,8 +1,13 @@
package com.doumee.service.system.impl;
import com.alibaba.fastjson.JSONObject;
import com.alibaba.fastjson.TypeReference;
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import com.doumee.core.constants.ResponseStatus;
import com.doumee.core.exception.BusinessException;
import com.doumee.core.utils.Constants;
import com.doumee.dao.system.SystemDictMapper;
import com.doumee.dao.system.dto.PlatformConfigDTO;
import com.doumee.dao.system.model.SystemDict;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
@@ -20,6 +25,8 @@
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.CollectionUtils;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;
@@ -33,6 +40,8 @@
    @Autowired
    private SystemDictDataMapper systemDictDataMapper;
    @Autowired
    private SystemDictMapper systemDictMapper;
    @Override
    public Integer create(SystemDictData systemDictData) {
@@ -112,4 +121,169 @@
                .in(SystemDictData::getLabel,codes);
        return systemDictDataMapper.selectList(wrapper);
    }
    @Override
    public PlatformConfigDTO getPlatformConfigDTO(){
        PlatformConfigDTO platformConfigDTO = new PlatformConfigDTO();
        platformConfigDTO.setRegIntegralReward(new BigDecimal(0));
        platformConfigDTO.setRegCouponRewardStatus(0);
        platformConfigDTO.setRegCouponRewardList(new ArrayList<>());
        platformConfigDTO.setRegIntegralRewardStatus(0);
        platformConfigDTO.setShareIntegralReward(new BigDecimal(0));
        platformConfigDTO.setShareCouponRewardList(new ArrayList<>());
        platformConfigDTO.setShareIntegralRewardStatus(0);
        platformConfigDTO.setShareCouponRewardStatus(0);
        platformConfigDTO.setReturnMemberIntegral(new BigDecimal(0));
        platformConfigDTO.setReturnShopIntegral(new BigDecimal(0));
        platformConfigDTO.setReturnMemberIntegralStatus(0);
        platformConfigDTO.setReturnShopIntegralStatus(0);
        platformConfigDTO.setTotalRate(new BigDecimal(0));
        SystemDict  dict = systemDictMapper.selectOne(new QueryWrapper<SystemDict>().lambda()
                .eq(SystemDict::getCode,Constants.ORDER_SET).last("limit 1"));
        if(dict == null){
            throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"数据字典配置数据有误,请联系系统管理员处理!");
        }
        List<SystemDictData> systemDictDataList = systemDictDataMapper.selectList(new QueryWrapper<SystemDictData>()
                .lambda().eq(SystemDictData::getDictId,dict.getId())
                .in(SystemDictData::getLabel
                        , Constants.ORDERSET_REG_INTEGRAL_REWARD_STATUS
                        , Constants.ORDERSET_SHARE_INTEGRAL_REWARD_STATUS
                        , Constants.ORDERSET_REG_COUPON_REWARD_STATUS
                        , Constants.ORDERSET_SHARE_COUPON_REWARD_STATUS
                        , Constants.ORDERSET_REG_INTEGRAL_REWARD
                        , Constants.ORDERSET_SHARE_INTEGRAL_REWARD
                        , Constants.ORDERSET_REG_COUPON_REWARD_LIST
                        , Constants.ORDERSET_SHARE_COUPON_REWARD_LIST
                        , Constants.ORDERSET_RETURN_MEMBER_INTEGRAL_STATUS
                        , Constants.ORDERSET_RETURN_SHOP_INTEGRAL_STATUS
                        , Constants.ORDERSET_RETURN_MEMBER_INTEGRAL
                        , Constants.ORDERSET_RETURN_SHOP_INTEGRAL
                        ,Constants.ORDERSET_TOTAL_RATE )
        );
        if(com.github.xiaoymin.knife4j.core.util.CollectionUtils.isNotEmpty(systemDictDataList)){
            for (SystemDictData systemDictData:systemDictDataList) {
                if(systemDictData.getLabel().equals(Constants.ORDERSET_REG_INTEGRAL_REWARD)){
                    platformConfigDTO.setRegIntegralReward(getDecimalValByStr(systemDictData.getCode()));
                }else if(systemDictData.getLabel().equals(Constants.ORDERSET_REG_COUPON_REWARD_STATUS)){
                    platformConfigDTO.setRegCouponRewardStatus(getIntegerValByStr(systemDictData.getCode()));
                }else if(systemDictData.getLabel().equals(Constants.ORDERSET_REG_COUPON_REWARD_LIST)){
                    platformConfigDTO.setRegCouponRewardList(getListValByStr(systemDictData.getCode()));
                }else if(systemDictData.getLabel().equals(Constants.ORDERSET_REG_INTEGRAL_REWARD_STATUS)){
                    platformConfigDTO.setRegIntegralRewardStatus(getIntegerValByStr(systemDictData.getCode()));
                }else if(systemDictData.getLabel().equals(Constants.ORDERSET_SHARE_INTEGRAL_REWARD)){
                    platformConfigDTO.setShareIntegralReward(getDecimalValByStr(systemDictData.getCode()));
                }else if(systemDictData.getLabel().equals(Constants.ORDERSET_SHARE_COUPON_REWARD_LIST)){
                    platformConfigDTO.setShareCouponRewardList(getListValByStr(systemDictData.getCode()));
                }else if(systemDictData.getLabel().equals(Constants.ORDERSET_SHARE_INTEGRAL_REWARD_STATUS)){
                    platformConfigDTO.setShareIntegralRewardStatus(getIntegerValByStr(systemDictData.getCode()));
                }else if(systemDictData.getLabel().equals(Constants.ORDERSET_SHARE_COUPON_REWARD_STATUS)){
                    platformConfigDTO.setShareCouponRewardStatus(getIntegerValByStr(systemDictData.getCode()));
                }else if(systemDictData.getLabel().equals(Constants.ORDERSET_RETURN_MEMBER_INTEGRAL)){
                    platformConfigDTO.setReturnMemberIntegral(getDecimalValByStr(systemDictData.getCode()));
                }else if(systemDictData.getLabel().equals(Constants.ORDERSET_RETURN_SHOP_INTEGRAL)){
                    platformConfigDTO.setReturnShopIntegral(getDecimalValByStr(systemDictData.getCode()));
                }else if(systemDictData.getLabel().equals(Constants.ORDERSET_RETURN_MEMBER_INTEGRAL_STATUS)){
                    platformConfigDTO.setReturnMemberIntegralStatus(getIntegerValByStr(systemDictData.getCode()));
                }else if(systemDictData.getLabel().equals(Constants.ORDERSET_RETURN_SHOP_INTEGRAL_STATUS)){
                    platformConfigDTO.setReturnShopIntegralStatus(getIntegerValByStr(systemDictData.getCode()));
                }else if(systemDictData.getLabel().equals(Constants.ORDERSET_TOTAL_RATE)) {
                    platformConfigDTO.setTotalRate(getDecimalValByStr(systemDictData.getCode()));
                }
            }
        }
        return platformConfigDTO;
    }
    private Integer getIntegerValByStr(String code) {
        try {
            return Integer.parseInt(code);
        }catch (Exception e){
        }
        return  0;
    }
    private BigDecimal getDecimalValByStr(String code) {
        try {
            return new BigDecimal(code);
        }catch (Exception e){
        }
        return  new BigDecimal(0);
    }
    private List<JSONObject> getListValByStr(String code) {
        try {
            return JSONObject.parseObject(code,new TypeReference<List<JSONObject>>(){});
        }catch (Exception e){
        }
        return  new ArrayList();
    }
    @Override
    @Transactional(rollbackFor = {Exception.class, BusinessException.class})
    public void updPlatformConfig(PlatformConfigDTO platformConfigDTO) {
        SystemDict dict = systemDictMapper.selectOne(new QueryWrapper<SystemDict>().lambda()
                .eq(SystemDict::getCode, Constants.ORDER_SET).last("limit 1"));
        if (dict == null) {
            throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(), "数据字典配置数据有误,请联系系统管理员处理!");
        }
        List<SystemDictData> systemDictDataList = systemDictDataMapper.selectList(new QueryWrapper<SystemDictData>()
                .lambda()
                .eq(SystemDictData::getDictId, dict.getId())
                .in(SystemDictData::getLabel
                        , Constants.ORDERSET_REG_INTEGRAL_REWARD_STATUS
                        , Constants.ORDERSET_SHARE_INTEGRAL_REWARD_STATUS
                        , Constants.ORDERSET_REG_COUPON_REWARD_STATUS
                        , Constants.ORDERSET_SHARE_COUPON_REWARD_STATUS
                        , Constants.ORDERSET_REG_INTEGRAL_REWARD
                        , Constants.ORDERSET_SHARE_INTEGRAL_REWARD
                        , Constants.ORDERSET_REG_COUPON_REWARD_LIST
                        , Constants.ORDERSET_SHARE_COUPON_REWARD_LIST
                        , Constants.ORDERSET_RETURN_MEMBER_INTEGRAL_STATUS
                        , Constants.ORDERSET_RETURN_SHOP_INTEGRAL_STATUS
                        , Constants.ORDERSET_RETURN_MEMBER_INTEGRAL
                        , Constants.ORDERSET_RETURN_SHOP_INTEGRAL
                        , Constants.ORDERSET_TOTAL_RATE)
        );
        if (com.github.xiaoymin.knife4j.core.util.CollectionUtils.isNotEmpty(systemDictDataList)) {
            for (SystemDictData systemDictData : systemDictDataList) {
                if (systemDictData.getLabel().equals(Constants.ORDERSET_REG_INTEGRAL_REWARD_STATUS)) {
                    systemDictData.setCode(Constants.formatIntegerNum(platformConfigDTO.getRegIntegralRewardStatus()) + "");
                } else if (systemDictData.getLabel().equals(Constants.ORDERSET_SHARE_INTEGRAL_REWARD_STATUS)) {
                    systemDictData.setCode(Constants.formatIntegerNum(platformConfigDTO.getShareIntegralRewardStatus()) + "");
                } else if (systemDictData.getLabel().equals(Constants.ORDERSET_REG_COUPON_REWARD_STATUS)) {
                    systemDictData.setCode(Constants.formatIntegerNum(platformConfigDTO.getRegCouponRewardStatus()) + "");
                } else if (systemDictData.getLabel().equals(Constants.ORDERSET_SHARE_COUPON_REWARD_STATUS)) {
                    systemDictData.setCode(Constants.formatIntegerNum(platformConfigDTO.getShareCouponRewardStatus()) + "");
                } else if (systemDictData.getLabel().equals(Constants.ORDERSET_REG_INTEGRAL_REWARD)) {
                    systemDictData.setCode(Constants.formatBigdecimal(platformConfigDTO.getRegIntegralReward()).doubleValue() + "");
                } else if (systemDictData.getLabel().equals(Constants.ORDERSET_SHARE_INTEGRAL_REWARD)) {
                    systemDictData.setCode(Constants.formatBigdecimal(platformConfigDTO.getShareIntegralReward()).doubleValue() + "");
                } else if (systemDictData.getLabel().equals(Constants.ORDERSET_REG_COUPON_REWARD_LIST)) {
                    systemDictData.setCode(JSONObject.toJSONString(platformConfigDTO.getRegCouponRewardList() == null ? new ArrayList() : platformConfigDTO.getRegCouponRewardList()));
                } else if (systemDictData.getLabel().equals(Constants.ORDERSET_SHARE_COUPON_REWARD_LIST)) {
                    systemDictData.setCode(JSONObject.toJSONString(platformConfigDTO.getShareCouponRewardList() == null ? new ArrayList() : platformConfigDTO.getShareCouponRewardList()));
                } else if (systemDictData.getLabel().equals(Constants.ORDERSET_RETURN_MEMBER_INTEGRAL_STATUS)) {
                    systemDictData.setCode(Constants.formatIntegerNum(platformConfigDTO.getReturnMemberIntegralStatus()) + "");
                } else if (systemDictData.getLabel().equals(Constants.ORDERSET_RETURN_SHOP_INTEGRAL_STATUS)) {
                    systemDictData.setCode(Constants.formatIntegerNum(platformConfigDTO.getReturnShopIntegralStatus()) + "");
                } else if (systemDictData.getLabel().equals(Constants.ORDERSET_RETURN_MEMBER_INTEGRAL)) {
                    systemDictData.setCode(Constants.formatBigdecimal(platformConfigDTO.getReturnMemberIntegral()).doubleValue() + "");
                } else if (systemDictData.getLabel().equals(Constants.ORDERSET_RETURN_SHOP_INTEGRAL)) {
                    systemDictData.setCode(Constants.formatBigdecimal(platformConfigDTO.getReturnShopIntegral()).doubleValue() + "");
                } else if (systemDictData.getLabel().equals(Constants.ORDERSET_TOTAL_RATE)) {
                    systemDictData.setCode(Constants.formatBigdecimal(platformConfigDTO.getTotalRate()).doubleValue() + "");
                }
                systemDictDataMapper.update(new UpdateWrapper<SystemDictData>().lambda()
                        .set(SystemDictData::getCode, systemDictData.getCode())
                        .eq(SystemDictData::getId, systemDictData.getId()));
            }
        }
    }
}