Browse Source

修改bug

master
前端-胡立永 4 weeks ago
parent
commit
fa6a3d0170
12 changed files with 526 additions and 17 deletions
  1. +2
    -2
      admin-pc/.env.development
  2. BIN
      admin-pc/dist.zip
  3. +211
    -0
      admin-pc/src/views/promotion/CommonPromotionList.vue
  4. +124
    -0
      admin-pc/src/views/promotion/modules/CommonPromotionForm.vue
  5. +84
    -0
      admin-pc/src/views/promotion/modules/CommonPromotionModal.Style#Drawer.vue
  6. +60
    -0
      admin-pc/src/views/promotion/modules/CommonPromotionModal.vue
  7. +5
    -0
      module-base/base-core/src/main/java/org/jeecg/modules/hanHaiMember/entity/HanHaiMember.java
  8. +0
    -1
      module-common/src/main/java/org/jeecg/api/controller/AppletOrderTeamController.java
  9. +14
    -2
      module-common/src/main/java/org/jeecg/api/service/impl/AppletLoginServiceImpl.java
  10. +7
    -6
      module-common/src/main/java/org/jeecg/api/service/impl/AppletOrderServiceImpl.java
  11. +10
    -6
      module-common/src/main/java/org/jeecg/api/service/impl/AppletPromotionServiceImpl.java
  12. +9
    -0
      module-common/src/main/java/org/jeecg/modules/commonPromotion/controller/CommonPromotionController.java

+ 2
- 2
admin-pc/.env.development View File

@ -1,6 +1,6 @@
NODE_ENV=development NODE_ENV=development
VUE_APP_API_BASE_URL=https://www.ddmhs.top/recycle-admin/
# VUE_APP_API_BASE_URL=http://localhost:8002/recycle-admin/
# VUE_APP_API_BASE_URL=https://www.ddmhs.top/recycle-admin/
VUE_APP_API_BASE_URL=http://localhost:8002/recycle-admin/
VUE_APP_CAS_BASE_URL=http://cas.example.org:8443/cas VUE_APP_CAS_BASE_URL=http://cas.example.org:8443/cas
VUE_APP_ONLINE_BASE_URL=http://fileview.jeecg.com/onlinePreview VUE_APP_ONLINE_BASE_URL=http://fileview.jeecg.com/onlinePreview


BIN
admin-pc/dist.zip View File


+ 211
- 0
admin-pc/src/views/promotion/CommonPromotionList.vue View File

@ -0,0 +1,211 @@
<template>
<a-card :bordered="false">
<!-- 查询区域 -->
<div class="table-page-search-wrapper">
<a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24">
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="审核状态">
<j-dict-select-tag placeholder="请选择审核状态" v-model="queryParam.status" dictCode="open_status"/>
</a-form-item>
</a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
<a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
<a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
<a @click="handleToggleSearch" style="margin-left: 8px">
{{ toggleSearchStatus ? '收起' : '展开' }}
<a-icon :type="toggleSearchStatus ? 'up' : 'down'"/>
</a>
</span>
</a-col>
</a-row>
</a-form>
</div>
<!-- 查询区域-END -->
<!-- 操作按钮区域 -->
<div class="table-operator">
<a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
<a-button type="primary" icon="download" @click="handleExportXls('推广申请')">导出</a-button>
<a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
<a-button type="primary" icon="import">导入</a-button>
</a-upload>
<!-- 高级查询区域 -->
<j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query>
<a-dropdown v-if="selectedRowKeys.length > 0">
<a-menu slot="overlay">
<a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>
</a-menu>
<a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button>
</a-dropdown>
</div>
<!-- table区域-begin -->
<div>
<div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
<i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>
<a style="margin-left: 24px" @click="onClearSelected">清空</a>
</div>
<a-table
ref="table"
size="middle"
:scroll="{x:true}"
bordered
rowKey="id"
:columns="columns"
:dataSource="dataSource"
:pagination="ipagination"
:loading="loading"
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
class="j-table-force-nowrap"
@change="handleTableChange">
<template slot="htmlSlot" slot-scope="text">
<div v-html="text"></div>
</template>
<template slot="imgSlot" slot-scope="text,record">
<span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span>
<img v-else :src="getImgView(text)" :preview="record.id" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/>
</template>
<template slot="fileSlot" slot-scope="text">
<span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
<a-button
v-else
:ghost="true"
type="primary"
icon="download"
size="small"
@click="downloadFile(text)">
下载
</a-button>
</template>
<span slot="action" slot-scope="text, record">
<a @click="handleEdit(record)">编辑</a>
<a-divider type="vertical" />
<a-dropdown>
<a class="ant-dropdown-link">更多 <a-icon type="down" /></a>
<a-menu slot="overlay">
<a-menu-item>
<a @click="handleDetail(record)">详情</a>
</a-menu-item>
<a-menu-item>
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
<a>删除</a>
</a-popconfirm>
</a-menu-item>
</a-menu>
</a-dropdown>
</span>
</a-table>
</div>
<common-promotion-modal ref="modalForm" @ok="modalFormOk"></common-promotion-modal>
</a-card>
</template>
<script>
import '@/assets/less/TableExpand.less'
import { mixinDevice } from '@/utils/mixin'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import CommonPromotionModal from './modules/CommonPromotionModal'
import {filterMultiDictText} from '@/components/dict/JDictSelectUtil'
export default {
name: 'CommonPromotionList',
mixins:[JeecgListMixin, mixinDevice],
components: {
CommonPromotionModal
},
data () {
return {
description: '推广申请管理页面',
//
columns: [
{
title: '#',
dataIndex: '',
key:'rowIndex',
width:60,
align:"center",
customRender:function (t,r,index) {
return parseInt(index)+1;
}
},
{
title:'用户',
align:"center",
dataIndex: 'userId_dictText'
},
{
title:'姓名',
align:"center",
dataIndex: 'name'
},
{
title:'电话',
align:"center",
dataIndex: 'phone'
},
{
title:'推广时间',
align:"center",
dataIndex: 'userTime'
},
{
title:'审核状态',
align:"center",
dataIndex: 'status_dictText'
},
{
title: '操作',
dataIndex: 'action',
align:"center",
fixed:"right",
width:147,
scopedSlots: { customRender: 'action' }
}
],
url: {
list: "/commonPromotion/commonPromotion/list",
delete: "/commonPromotion/commonPromotion/delete",
deleteBatch: "/commonPromotion/commonPromotion/deleteBatch",
exportXlsUrl: "/commonPromotion/commonPromotion/exportXls",
importExcelUrl: "commonPromotion/commonPromotion/importExcel",
},
dictOptions:{},
superFieldList:[],
}
},
created() {
this.getSuperFieldList();
},
computed: {
importExcelUrl: function(){
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
},
},
methods: {
initDictConfig(){
},
getSuperFieldList(){
let fieldList=[];
fieldList.push({type:'sel_search',value:'userId',text:'用户',dictTable:"han_hai_member", dictText:'nick_name', dictCode:'id'})
fieldList.push({type:'string',value:'name',text:'姓名',dictCode:''})
fieldList.push({type:'string',value:'phone',text:'电话',dictCode:''})
fieldList.push({type:'string',value:'userTime',text:'推广时间',dictCode:''})
fieldList.push({type:'int',value:'status',text:'审核状态',dictCode:'open_status'})
this.superFieldList = fieldList
}
}
}
</script>
<style scoped>
@import '~@assets/less/common.less';
</style>

+ 124
- 0
admin-pc/src/views/promotion/modules/CommonPromotionForm.vue View File

@ -0,0 +1,124 @@
<template>
<a-spin :spinning="confirmLoading">
<j-form-container :disabled="formDisabled">
<a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail">
<a-row>
<a-col :span="24">
<a-form-model-item label="用户" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="userId">
<j-search-select-tag v-model="model.userId" dict="han_hai_member,nick_name,id" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="姓名" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="name">
<a-input v-model="model.name" placeholder="请输入姓名" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="电话" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="phone">
<a-input v-model="model.phone" placeholder="请输入电话" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="推广时间" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="userTime">
<a-input v-model="model.userTime" placeholder="请输入推广时间" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="审核状态" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="status">
<j-dict-select-tag type="list" v-model="model.status" dictCode="open_status" placeholder="请选择审核状态" />
</a-form-model-item>
</a-col>
</a-row>
</a-form-model>
</j-form-container>
</a-spin>
</template>
<script>
import { httpAction, getAction } from '@/api/manage'
import { validateDuplicateValue } from '@/utils/util'
export default {
name: 'CommonPromotionForm',
components: {
},
props: {
//
disabled: {
type: Boolean,
default: false,
required: false
}
},
data () {
return {
model:{
},
labelCol: {
xs: { span: 24 },
sm: { span: 5 },
},
wrapperCol: {
xs: { span: 24 },
sm: { span: 16 },
},
confirmLoading: false,
validatorRules: {
},
url: {
add: "/commonPromotion/commonPromotion/add",
edit: "/commonPromotion/commonPromotion/edit",
queryById: "/commonPromotion/commonPromotion/queryById"
}
}
},
computed: {
formDisabled(){
return this.disabled
},
},
created () {
//model
this.modelDefault = JSON.parse(JSON.stringify(this.model));
},
methods: {
add () {
this.edit(this.modelDefault);
},
edit (record) {
this.model = Object.assign({}, record);
this.visible = true;
},
submitForm () {
const that = this;
//
this.$refs.form.validate(valid => {
if (valid) {
that.confirmLoading = true;
let httpurl = '';
let method = '';
if(!this.model.id){
httpurl+=this.url.add;
method = 'post';
}else{
httpurl+=this.url.edit;
method = 'put';
}
httpAction(httpurl,this.model,method).then((res)=>{
if(res.success){
that.$message.success(res.message);
that.$emit('ok');
}else{
that.$message.warning(res.message);
}
}).finally(() => {
that.confirmLoading = false;
})
}
})
},
}
}
</script>

+ 84
- 0
admin-pc/src/views/promotion/modules/CommonPromotionModal.Style#Drawer.vue View File

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

+ 60
- 0
admin-pc/src/views/promotion/modules/CommonPromotionModal.vue View File

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

+ 5
- 0
module-base/base-core/src/main/java/org/jeecg/modules/hanHaiMember/entity/HanHaiMember.java View File

@ -5,6 +5,7 @@ import java.io.UnsupportedEncodingException;
import java.util.Date; import java.util.Date;
import java.math.BigDecimal; import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data; import lombok.Data;
@ -274,4 +275,8 @@ public class HanHaiMember implements Serializable {
@ApiModelProperty(value = "推广官类型") @ApiModelProperty(value = "推广官类型")
@Dict(dictTable = "common_distribution_ratio", dicCode = "id", dicText = "title") @Dict(dictTable = "common_distribution_ratio", dicCode = "id", dicText = "title")
private java.lang.String isTuiType; private java.lang.String isTuiType;
//推广官类型名字
@TableField(exist = false)
private java.lang.String isTuiTypeTitle;
} }

+ 0
- 1
module-common/src/main/java/org/jeecg/api/controller/AppletOrderTeamController.java View File

@ -71,7 +71,6 @@ public class AppletOrderTeamController {
} }
//管理员修改子订单信息-价格 //管理员修改子订单信息-价格
@ApiOperation(value="管理员:修改子订单信息", notes="管理员:修改子订单信息") @ApiOperation(value="管理员:修改子订单信息", notes="管理员:修改子订单信息")
@GetMapping(value = "/updateOrder") @GetMapping(value = "/updateOrder")
public Result<?> updateOrderPrice(@RequestHeader("X-Access-Token")String token, CommonOrder commonOrder) { public Result<?> updateOrderPrice(@RequestHeader("X-Access-Token")String token, CommonOrder commonOrder) {


+ 14
- 2
module-common/src/main/java/org/jeecg/api/service/impl/AppletLoginServiceImpl.java View File

@ -15,6 +15,8 @@ import org.jeecg.common.util.RedisUtil;
import org.jeecg.config.shiro.ShiroRealm; import org.jeecg.config.shiro.ShiroRealm;
import org.jeecg.modules.commonConfig.entity.CommonConfig; import org.jeecg.modules.commonConfig.entity.CommonConfig;
import org.jeecg.modules.commonConfig.service.ICommonConfigService; import org.jeecg.modules.commonConfig.service.ICommonConfigService;
import org.jeecg.modules.commonDistributionRatio.entity.CommonDistributionRatio;
import org.jeecg.modules.commonDistributionRatio.service.ICommonDistributionRatioService;
import org.jeecg.modules.commonMoneyLog.entity.CommonMoneyLog; import org.jeecg.modules.commonMoneyLog.entity.CommonMoneyLog;
import org.jeecg.modules.commonMoneyLog.service.ICommonMoneyLogService; import org.jeecg.modules.commonMoneyLog.service.ICommonMoneyLogService;
import org.jeecg.modules.hanHaiMember.entity.HanHaiMember; import org.jeecg.modules.hanHaiMember.entity.HanHaiMember;
@ -60,6 +62,8 @@ public class AppletLoginServiceImpl implements AppletLoginService {
private ICommonConfigService commonConfigService; private ICommonConfigService commonConfigService;
@Resource @Resource
private ICommonMoneyLogService commonMoneyLogService; private ICommonMoneyLogService commonMoneyLogService;
@Resource
private ICommonDistributionRatioService commonDistributionRatioService;
@ -211,22 +215,30 @@ public class AppletLoginServiceImpl implements AppletLoginService {
@Override @Override
public Result<?> getUserByToken(String token){ public Result<?> getUserByToken(String token){
HanHaiMember hanHaiMember = shiroRealm.checkUserTokenIsEffectHanHaiOpenId(token); HanHaiMember hanHaiMember = shiroRealm.checkUserTokenIsEffectHanHaiOpenId(token);
//根据用户标识查询用户信息 //根据用户标识查询用户信息
hanHaiMember = memberService.getById(hanHaiMember.getId()); hanHaiMember = memberService.getById(hanHaiMember.getId());
if ("Y".equals(hanHaiMember.getIsUser()) && StringUtils.isNotBlank(hanHaiMember.getIsTuiType())){
CommonDistributionRatio ratio = commonDistributionRatioService.getById(hanHaiMember.getIsTuiType());
hanHaiMember.setIsTuiTypeTitle(ratio.getTitle());
}
//查询我的所有的提现记录 //查询我的所有的提现记录
List<CommonMoneyLog> commonMoneyLogs = commonMoneyLogService.lambdaQuery() List<CommonMoneyLog> commonMoneyLogs = commonMoneyLogService.lambdaQuery()
.eq(CommonMoneyLog::getTitle,"用户提现") .eq(CommonMoneyLog::getTitle,"用户提现")
.eq(CommonMoneyLog::getUserId,hanHaiMember.getId()).list(); .eq(CommonMoneyLog::getUserId,hanHaiMember.getId()).list();
//如果数据不为空 //如果数据不为空
if (commonMoneyLogs.size()>0){ if (commonMoneyLogs.size()>0){
//计算提现总金额 //计算提现总金额
BigDecimal totalMoney = commonMoneyLogs.stream().map(CommonMoneyLog::getMoney).reduce(BigDecimal.ZERO, BigDecimal::add); BigDecimal totalMoney = commonMoneyLogs.stream().map(CommonMoneyLog::getMoney).reduce(BigDecimal.ZERO, BigDecimal::add);
hanHaiMember.setIntegerPrice(totalMoney); hanHaiMember.setIntegerPrice(totalMoney);
return Result.OK("个人信息查询成功",hanHaiMember);
}else{ }else{
hanHaiMember.setIntegerPrice(BigDecimal.ZERO); hanHaiMember.setIntegerPrice(BigDecimal.ZERO);
return Result.OK("个人信息查询成功",hanHaiMember);
} }
return Result.OK("个人信息查询成功",hanHaiMember);
} }
//修改用户信息 //修改用户信息


+ 7
- 6
module-common/src/main/java/org/jeecg/api/service/impl/AppletOrderServiceImpl.java View File

@ -175,8 +175,9 @@ public class AppletOrderServiceImpl implements AppletOrderService {
if(commonOrder.getState() == 0){ if(commonOrder.getState() == 0){
commonOrder.setState(3);//取消订单 commonOrder.setState(3);//取消订单
commonOrderService.updateById(commonOrder); commonOrderService.updateById(commonOrder);
return Result.OK("取消订单成功");
} }
return Result.OK("取消订单成功");
return Result.error("已取件后联系客服取消");
} }
@ -222,11 +223,11 @@ public class AppletOrderServiceImpl implements AppletOrderService {
if (commonShop.getPrice() != null){ if (commonShop.getPrice() != null){
minEstimatedPrice = commonShop.getPrice().multiply(new BigDecimal(sku.getNum())); minEstimatedPrice = commonShop.getPrice().multiply(new BigDecimal(sku.getNum()));
minEstimatedPriceSum.add(commonShop.getPrice().multiply(new BigDecimal(sku.getNum())));
minEstimatedPriceSum = minEstimatedPriceSum.add(commonShop.getPrice().multiply(new BigDecimal(sku.getNum())));
} }
if (commonShop.getMaxPrice() != null){ if (commonShop.getMaxPrice() != null){
maxEstimatedPrice = commonShop.getMaxPrice().multiply(new BigDecimal(sku.getNum())); maxEstimatedPrice = commonShop.getMaxPrice().multiply(new BigDecimal(sku.getNum()));
maxEstimatedPriceSum.add(commonShop.getMaxPrice().multiply(new BigDecimal(sku.getNum())));
maxEstimatedPriceSum = maxEstimatedPriceSum.add(commonShop.getMaxPrice().multiply(new BigDecimal(sku.getNum())));
} }
@ -239,7 +240,7 @@ public class AppletOrderServiceImpl implements AppletOrderService {
sku.setDetails(commonShop.getService()); sku.setDetails(commonShop.getService());
sku.setShopClass(commonShop.getShopClass()); sku.setShopClass(commonShop.getShopClass());
sku.setCreateTime(new Date()); sku.setCreateTime(new Date());
sku.setEstimatedPrice("" + minEstimatedPrice+ "-" + maxEstimatedPrice);
sku.setEstimatedPrice(minEstimatedPrice.stripTrailingZeros().toPlainString() + "-" + maxEstimatedPrice.stripTrailingZeros().toPlainString());
sku.setOnePrice(commonShop.getPrice()); sku.setOnePrice(commonShop.getPrice());
commonOrderService.save(sku); commonOrderService.save(sku);
@ -290,7 +291,7 @@ public class AppletOrderServiceImpl implements AppletOrderService {
cityOrder.setGoTime(strTime); cityOrder.setGoTime(strTime);
cityOrder.setAddressId(addressId); cityOrder.setAddressId(addressId);
cityOrder.setCreateTime(new Date()); cityOrder.setCreateTime(new Date());
cityOrder.setEstimatedPrice("" + minEstimatedPriceSum + "-" + maxEstimatedPriceSum);
cityOrder.setEstimatedPrice(minEstimatedPriceSum.stripTrailingZeros().toPlainString() + "-" + maxEstimatedPriceSum.stripTrailingZeros().toPlainString());
// 可以考虑在订单表中添加一个字段来记录是否包邮 // 可以考虑在订单表中添加一个字段来记录是否包邮
// cityOrder.setFreeShipping(isFreeShipping ? "Y" : "N"); // cityOrder.setFreeShipping(isFreeShipping ? "Y" : "N");
@ -349,7 +350,7 @@ public class AppletOrderServiceImpl implements AppletOrderService {
List<CommonCity> openCityList = commonCityService.buildOpenCityTree(); List<CommonCity> openCityList = commonCityService.buildOpenCityTree();
// 使用 CommonAddress 服务检查地址是否在开放城市中级别3省市区完整匹配 // 使用 CommonAddress 服务检查地址是否在开放城市中级别3省市区完整匹配
return commonAddressService.isAddressInOpenCities(address.getAddress(), openCityList, 3);
return commonAddressService.isAddressInOpenCities(address.getAddress(), openCityList, 2);
} catch (Exception e) { } catch (Exception e) {
// 如果包邮计算出错默认不包邮 // 如果包邮计算出错默认不包邮


+ 10
- 6
module-common/src/main/java/org/jeecg/api/service/impl/AppletPromotionServiceImpl.java View File

@ -198,7 +198,9 @@ public class AppletPromotionServiceImpl implements AppletPromotionService {
// 如果启用了Redis缓存可以取消下面注释 // 如果启用了Redis缓存可以取消下面注释
//redisUtil.set(cacheKey, qrCodeImageUrl, 3600); // 缓存一小时 //redisUtil.set(cacheKey, qrCodeImageUrl, 3600); // 缓存一小时
return this.generateAndCombineImagesFromUrl2(qrCodeBytes, backgroundImageUrl);
return qrCodeBytes;
// return this.generateAndCombineImagesFromUrl2(qrCodeBytes, backgroundImageUrl);
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
@ -235,8 +237,6 @@ public class AppletPromotionServiceImpl implements AppletPromotionService {
file = File.createTempFile("combined_", ".png"); file = File.createTempFile("combined_", ".png");
ImageIO.write(backgroundImage, "png", file); ImageIO.write(backgroundImage, "png", file);
// 上传到阿里云OSS
// return this.uploadAliYunOss(Files.readAllBytes(file.toPath()), file.getName());
return Files.readAllBytes(file.toPath()); return Files.readAllBytes(file.toPath());
} catch (Exception e) { } catch (Exception e) {
@ -311,7 +311,7 @@ public class AppletPromotionServiceImpl implements AppletPromotionService {
//管理员通过推广表单申请 //管理员通过推广表单申请
@Override @Override
public Result<?> passPromotionApply(String token, String id){ public Result<?> passPromotionApply(String token, String id){
HanHaiMember hanHaiMember = shiroRealm.checkUserTokenIsEffectHanHaiOpenId(token);
// HanHaiMember hanHaiMember = shiroRealm.checkUserTokenIsEffectHanHaiOpenId(token);
CommonPromotion commonPromotion = commonPromotionService.getById(id); CommonPromotion commonPromotion = commonPromotionService.getById(id);
commonPromotion.setStatus(1); commonPromotion.setStatus(1);
commonPromotionService.updateById(commonPromotion); commonPromotionService.updateById(commonPromotion);
@ -324,9 +324,13 @@ public class AppletPromotionServiceImpl implements AppletPromotionService {
.list(); .list();
if (list.size() > 0){ if (list.size() > 0){
String tid = list.get(0).getId(); String tid = list.get(0).getId();
byId.setIsTuiType(tid);
byId.setIsTuiRole("Y");
if (StringUtils.isBlank(byId.getIsTuiType())){
byId.setIsTuiType(tid);
}
byId.setIsUser("Y");
} }
hanHaiMemberService.updateById(byId);
} }
return Result.OK("通过推广表单申请成功"); return Result.OK("通过推广表单申请成功");


+ 9
- 0
module-common/src/main/java/org/jeecg/modules/commonPromotion/controller/CommonPromotionController.java View File

@ -9,6 +9,8 @@ import java.io.UnsupportedEncodingException;
import java.net.URLDecoder; import java.net.URLDecoder;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import org.jeecg.api.service.AppletPromotionService;
import org.jeecg.common.api.vo.Result; import org.jeecg.common.api.vo.Result;
import org.jeecg.common.system.query.QueryGenerator; import org.jeecg.common.system.query.QueryGenerator;
import org.jeecg.common.util.oConvertUtils; import org.jeecg.common.util.oConvertUtils;
@ -49,6 +51,8 @@ import org.jeecg.common.aspect.annotation.AutoLog;
public class CommonPromotionController extends JeecgController<CommonPromotion, ICommonPromotionService> { public class CommonPromotionController extends JeecgController<CommonPromotion, ICommonPromotionService> {
@Autowired @Autowired
private ICommonPromotionService commonPromotionService; private ICommonPromotionService commonPromotionService;
@Autowired
private AppletPromotionService appletPromotionService;
/** /**
* 分页列表查询 * 分页列表查询
@ -96,6 +100,11 @@ public class CommonPromotionController extends JeecgController<CommonPromotion,
@ApiOperation(value="推广申请-编辑", notes="推广申请-编辑") @ApiOperation(value="推广申请-编辑", notes="推广申请-编辑")
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST}) @RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
public Result<String> edit(@RequestBody CommonPromotion commonPromotion) { public Result<String> edit(@RequestBody CommonPromotion commonPromotion) {
if (commonPromotion.getStatus() == 1){
appletPromotionService.passPromotionApply("", commonPromotion.getId());
}
commonPromotionService.updateById(commonPromotion); commonPromotionService.updateById(commonPromotion);
return Result.OK("编辑成功!"); return Result.OK("编辑成功!");
} }


Loading…
Cancel
Save