bug修改

This commit is contained in:
wangh 2024-01-04 15:52:02 +08:00
parent 6bf929b433
commit 29dbbca735
20 changed files with 283 additions and 75 deletions

View File

@ -11,5 +11,8 @@ VUE_APP_BASE_API = '/dev-api'
VUE_APP_PUBLIC_PATH = '/'
# 后端接口地址
VUE_APP_SERVER_URL = 'http://192.168.0.138:8080/'
# VUE_APP_SERVER_URL = 'http://192.168.0.138:8080/'
VUE_APP_SERVER_URL = 'http://192.168.0.178:8008/'
# cp端地址
VUE_PC_SERVER_URL = 'http://192.168.0.178:82/'

View File

@ -159,10 +159,12 @@ export function updateAuthRole(data) {
}
// 查询部门下拉树结构
export function deptTreeSelect() {
export function deptTreeSelect(data) {
return request({
url: '/system/dept/deptTree',
method: 'get'
method: 'get',
params: data
})
}

View File

@ -47,6 +47,7 @@ Vue.prototype.addDateRange = addDateRange
Vue.prototype.getName = getName
Vue.prototype.download = download
Vue.prototype.handleTree = handleTree
Vue.prototype.pcUrl = 'http://192.168.0.178:82/'
// 全局组件挂载
Vue.component('DictTag', DictTag)

View File

@ -8,7 +8,8 @@
<el-input
placeholder="请输入机构名称查询"
v-model="filterText">
v-model="filterText"
@input="inputDeptName()">
</el-input>
<div style="width: 100%; height: 20px"></div>
@ -787,7 +788,7 @@
/** 查询用户列表 */
async getList() {
console.log("123123123",this.form)
await deptTreeSelect().then(response => {
await deptTreeSelect({deptName :this.filterText}).then(response => {
this.Thetree = response.data
if(this.Thetree.length>0 && !this.queryParams.deptId) {
this.queryParams.deptId = this.Thetree[0].id
@ -1075,6 +1076,9 @@
//
submitFileForm() {
this.$refs.upload.submit();
},
inputDeptName() {
this.getList()
}
}
};

View File

@ -455,13 +455,9 @@
}
singleSignOnApi(this.id).then(res=>{
if (res.code == 200) {
let url =
// let url = process.env.VUE_APP_SERVER_URL
console.log("url",url)
window.open( 'http://localhost:81/index?entrance='+this.id)
window.open(this.pcUrl+'index?entrance='+this.id)
}
})
// token+
},

View File

@ -20,6 +20,7 @@
</el-switch>
</div>
</div>
<div style="margin-top: 20px"><el-button type="primary" icon="el-icon-plus" @click="addMerchant">添加商户信息</el-button></div>
<div class="content-box">
<!-- <el-card class="box-card" shadow="hover" v-for="(item,index) in 10" :key="index">-->
<!-- <div slot="header" class="clearfix">-->
@ -30,13 +31,14 @@
<!-- </el-card>-->
<el-card class="box-card" shadow="hover" v-for="item in merchantList" :key="item.id">
<div slot="header" class="clearfix">
<span>{{ item.merchantName }}</span>
<span><dict-tag :options="dict.type.payment_channel" :value="item.merchantName"/></span>
<el-button v-if="item.isUse=='0'"
@click="editStatus(item,1)"
style="float: right; padding: 3px 0" type="text">切换为当前通道</el-button>
<el-tag v-else effect="dark" type="success" style="float: right">当前使用中</el-tag>
</div>
<div>商户编号:{{ item.mchntCd }}</div>
<div>商户编号: {{ item.mchntCd }}</div>
<div>备注: <span style="color: #00afff;margin-left: 3px" @click="editRemark(item.id)">{{ item.remark ? item.remark : "--" }}</span></div>
</el-card>
</div>
<el-divider></el-divider>
@ -101,18 +103,67 @@
<!-- </div>-->
<div class="hsize">:规则按照顺序进行处理并自动更换支付通道新增或变更规则后需要发布当前规则才生效,发布生效后的规则将从序号1的配置生效</div>
<el-dialog :title="title" :visible.sync="dialogVisible" width="30%">
<el-form :model="form1" ref="form1" :rules="rules" >
<el-form-item label="支付通道" :label-width="formLabelWidth" prop="merchantName" width="300px">
<el-select
v-model="form1.merchantName"
placeholder="全部"
clearable
style="width: 240px"
>
<el-option
v-for="dict in dict.type.payment_channel"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<el-form-item label="商户号" :label-width="formLabelWidth" prop="mchntCd" >
<el-input v-model="form1.mchntCd" autocomplete="off"></el-input>
</el-form-item>
<el-form-item label="备注" :label-width="formLabelWidth" prop="remark" >
<el-input v-model="form1.remark" autocomplete="off"></el-input>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="dialogVisible = false"> </el-button>
<el-button type="primary" @click="submitMerchant"> </el-button>
</span>
</el-dialog>
<el-dialog :title="title" :visible.sync="show" width="25%" style="margin-top: 200px">
<span>请输入备注信息</span>
<el-input placeholder="请输入备注信息" style="margin-top: 20px"
v-model="merchantConfig.remark"
clearable>
</el-input>
<span slot="footer" class="dialog-footer">
<el-button @click="show = false"> </el-button>
<el-button type="primary" @click="submitRemark"> </el-button>
</span>
</el-dialog>
<!-- 编辑通道规则-->
<el-dialog title="编辑通道规则" :visible.sync="dialogFormVisible"
<el-dialog :title="title" :visible.sync="dialogFormVisible"
width="30%">
<el-form :model="form" ref="form">
<el-form-item label="支付通道" :label-width="formLabelWidth" width="300px">
<el-select v-model="form.merchConfigId"
@change="changeMerch"
:disabled="isDis" placeholder="请选择商户信息">
<el-option v-for="item in merchantList" :key="item.id"
:disabled="isDis" placeholder="请选择商户信息" style="width: 100%">
<el-option
v-for="item in merchantList" :key="item.id"
:label="item.merchantName"
:value="item.id"></el-option>
:value="item.id">
<span style="float: left">
<dict-tag :options="dict.type.payment_channel" :value="item.merchantName"/>
</span>
<span style="color: #00ff80">(111({{ item.remark ? item.remark : "--" }}))</span>
<span style="float: right; color: #8492a6; font-size: 13px">{{ item.mchntCd }}</span>
</el-option>
</el-select>
</el-form-item>
<el-form-item label="商户号" :label-width="formLabelWidth">
@ -149,7 +200,13 @@
</template>
<script>
import {editMerchant, listMerchant2} from "@/api/payConfig/merchantconfig";
import {
addMerchant,
editMerchant,
editMerchantRemark,
listMerchant,
merchantInfo
} from "@/api/payConfig/merchantconfig";
import {
addOilConfig,
delOilConfig,
@ -161,9 +218,8 @@ import {
import {addUser, getUserMobile, updateUser} from "@/api/staff/user/user";
export default {
dicts: ['payment_channel'],
name: 'peizhi',
props: ["id"],
data(){
return{
//
@ -185,17 +241,67 @@ export default {
resource: '',
desc: ''
},
formLabelWidth: '70px',
form1:{},
formLabelWidth: '80px',
dialogFormVisible:false,
dialogVisible:false,
show:false,
value:false,
value1:true,
labelPosition: 'singleDay',
title:"",
merchantConfig:{},
rules:{
merchantName: [
{ required: true, message: '请选择支付通道', trigger: 'blur' },
],
mchntCd: [
{ required: true, message: '请填写商户号', trigger: 'blur' },
],
}
}
},
created() {
this.getList();
},
methods:{
//
submitRemark(){
editMerchantRemark(this.merchantConfig).then(res => {
if (res.data===1){
this.$modal.msgSuccess("修改成功")
this.getList()
this.show = false
}
})
},
//
editRemark(id){
this.title = "备注"
this.show = true
merchantInfo(id).then(res => {
this.merchantConfig = res.data
})
},
submitMerchant(){
this.$refs["form1"].validate(valid => {
if (valid) {
addMerchant(this.form1).then(res => {
if (res.data == 1){
this.$modal.msgSuccess("添加成功");
this.getList()
this.dialogVisible = false
}
})
}
})
},
//
addMerchant(){
this.title = "添加商户信息"
this.dialogVisible = true
this.form1 = {}
},
//
deleteOilConfig(id){
this.$confirm('确认删除此通道规则吗?', '提示', {
@ -216,6 +322,7 @@ export default {
},
//
addOil(){
this.title = "添加商户规则"
this.dialogFormVisible = true;
this.form = {
name: '',
@ -243,7 +350,7 @@ export default {
if (valid) {
if (this.form.id) {
editOilConfig(this.form).then(response => {
this.$modal.msgSuccess("修改会员成功");
this.$modal.msgSuccess("修改通道成功");
this.getList();
this.dialogFormVisible = false;
this.isDis = false;
@ -253,7 +360,7 @@ export default {
if (response.data==0){
this.$modal.msgError("已存在当前通道商户号的规则");
}else {
this.$modal.msgSuccess("新增会员成功");
this.$modal.msgSuccess("新增通道成功");
this.getList();
this.dialogFormVisible = false;
this.isDis = false;
@ -270,6 +377,7 @@ export default {
},
//
editOilConfig(id){
this.title = "修改商户规则"
this.isDis = true;
this.dialogFormVisible = true;
oilConfigInfo(id).then( response => {
@ -344,7 +452,7 @@ export default {
},
//
getList(){
listMerchant2({storeId : this.id}).then( response => {
listMerchant().then( response => {
this.merchantList = response.data;
this.merchantList.forEach(item => {
if (item.isOpenRule == "1"){

View File

@ -120,7 +120,8 @@
>
<el-option key="1" label="超级管理员" value="1"/>
<el-option key="2" label="普通管理员" value="2"/>
<el-option key="3" label="用户角色" value="3"/>
<!-- <el-option key="3" label="用户角色" value="3"/> -->
<el-option key="3" label="员工角色" value="3"/>
</el-select>
</el-form-item>
<el-form-item label="状态">

View File

@ -88,7 +88,7 @@ public interface IntegralDetailMapper {
*/
List<IntegralDetail> signInGifts(@Param("type") String type);
List<IntegralDetail> signInGiftsYesterday(@Param("type") String type);
List<IntegralDetail> signInGiftsYesterday(@Param("type") String type,@Param("userId") Integer userId,@Param("chainStoreId") Integer chainStoreId);
}

View File

@ -184,6 +184,12 @@
id, user_id, points_change, current_points, type, change_reason, store_id, create_time, update_time, create_by, update_by,change_type
from integral_detail
WHERE DATE(create_time) = CURDATE() - INTERVAL 1 DAY
<if test="userId != null">
and user_id = #{userId}
</if>
<if test="chainStoreId != null">
and chain_store_id = #{chainStoreId}
</if>
<if test="type != null">
and type = #{type}
</if>

View File

@ -215,6 +215,9 @@
<if test="integralOrders.exchangeQuantity != null">
and io.exchange_quantity = #{integralOrders.exchangeQuantity}
</if>
<if test="integralOrders.chainStoreId != null">
and io.chain_store_id = #{integralOrders.chainStoreId}
</if>
</where>
order by io.create_time desc

View File

@ -20,8 +20,13 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.fuint.business.integral.vo.IntegralGiftVO;
import com.fuint.business.integral.vo.IntegralOrdersRequest;
import com.fuint.business.integral.vo.IntegralOrdersVO;
import com.fuint.business.marketingActivity.cardExchange.entity.CardExchangeRecord;
import com.fuint.business.marketingActivity.cardExchange.service.CardExchangeRecordService;
import com.fuint.business.marketingActivity.cardFavorable.entity.CardFavorableRecord;
import com.fuint.business.marketingActivity.cardFavorable.service.CardFavorableRecordService;
import com.fuint.business.marketingActivity.cardValue.entity.CardValueRecord;
import com.fuint.business.member.entity.LJStaff;
import com.fuint.business.member.mapper.LJStaffMapper;
import com.fuint.business.userManager.entity.UserBalance;
import com.fuint.business.userManager.mapper.LJUserMapper;
import com.fuint.business.userManager.service.UserBalanceService;
@ -244,11 +249,13 @@ public class IntegralOrdersServiceImpl implements IntegralOrdersService {
* @return
*/
// @Resource
// IntegralGiftService integralGiftService;
@Resource
CardExchangeRecordService cardExchangeRecordService;
// todo 判断积分商城兑换类型 根据类型在进行处理
@Resource
CardFavorableRecordService cardFavorableRecordService;
@Resource
LJStaffMapper ljStaffMapper;
@Override
public IntegralOrders checkTheStatusOfYourPaymentByIntegral(String orderNo) {
@ -256,28 +263,51 @@ public class IntegralOrdersServiceImpl implements IntegralOrdersService {
// 查询订单信息
// List<IntegralOrders> listByOrderNo = integralOrdersDao.getListByOrderNo2(orderNo, nowAccountInfo.getStoreId());
List<IntegralOrders> listByOrderNo = integralOrdersDao.getListByOrderNo2(orderNo);
if ("paid".equals(listByOrderNo.get(0).getStatus())) {
// 查询用户信息
LJUserVo ljUserVos = ljUserMapper.selectAllInfoById2(listByOrderNo.get(0).getUserId(), listByOrderNo.get(0).getChainStoreId());
// 查询用户信息
BigDecimal totalPoints = new BigDecimal(0);
for (IntegralOrders integralOrders : listByOrderNo) {
// 查询员工信息
LJStaff ljStaff = ljStaffMapper.selectById(integralOrders.getStaffId());
totalPoints = totalPoints.add(new BigDecimal(integralOrders.getIntegral()));
// 加兑换卷和优惠券判断
IntegralGift integralGift = integralGiftService.queryById(integralOrders.getGiftId());
if (integralGift.getGiftType().equals("兑换券")) {
// 兑换卷处理
integralGift.getVoucherId();
// cardExchangeRecordService
// 兑换券CardExchangeRecordService的addCardExchangeRecord方法 传参
}
if (integralGift.getGiftType().equals("优惠券")) {
// integralGift.getVoucherId();
CardExchangeRecord cardExchangeRecord = new CardExchangeRecord();
cardExchangeRecord.setCardExchangeId(integralGift.getVoucherId());
cardExchangeRecord.setStoreId(integralOrders.getStoreId());
cardExchangeRecord.setMtUserId(integralOrders.getUserId());
cardExchangeRecord.setName(ljUserVos.getName());
cardExchangeRecord.setMobile(ljUserVos.getMobile());
cardExchangeRecord.setPhoto(ljUserVos.getAvatar());
cardExchangeRecord.setMtStaffId(ljStaff.getId());
cardExchangeRecord.setRealName(ljStaff.getRealName());
cardExchangeRecord.setStaffMobile(ljStaff.getMobile());
cardExchangeRecord.setStatus("0");
cardExchangeRecord.setExchangeFrom("积分兑换");
cardExchangeRecordService.addCardExchangeRecord(cardExchangeRecord);
}else if (integralGift.getGiftType().equals("优惠券")) {
// 优惠卷处理
integralGift.getCouponId();
CardFavorableRecord cardFavorableRecord = new CardFavorableRecord();
cardFavorableRecord.setCardFavorableId(integralGift.getCouponId());
cardFavorableRecord.setStoreId(integralOrders.getStoreId());
cardFavorableRecord.setMtUserId(integralOrders.getUserId());
cardFavorableRecord.setName(ljUserVos.getName());
cardFavorableRecord.setMobile(ljUserVos.getMobile());
cardFavorableRecord.setStatus("0");
cardFavorableRecord.setExchangeFrom("积分兑换");
cardFavorableRecordService.addCardFavorableRecord(cardFavorableRecord);
}
}
// 查询用户信息
LJUserVo ljUserVos = ljUserMapper.selectAllInfoById2(listByOrderNo.get(0).getUserId(), listByOrderNo.get(0).getChainStoreId());
// 用户积分余额变动
if (totalPoints.doubleValue() > 0) {
@ -457,8 +487,6 @@ public class IntegralOrdersServiceImpl implements IntegralOrdersService {
}
@Override
public Boolean checkTheRedemptionLimit(Integer giftId) {
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();

View File

@ -262,7 +262,7 @@ public class IntegralSettingsServiceImpl implements IntegralSettingsService {
// 签到规则
JSONArray jsonArray = JSON.parseArray(integralSetting.getPointsObtained());
// 查询昨天是否签到
List<IntegralDetail> signInGifts = integralDetailMapper.signInGiftsYesterday("签到赠送");
List<IntegralDetail> signInGifts = integralDetailMapper.signInGiftsYesterday("签到赠送",ljUserVos.getId(),ljUserVos.getChainStoreId());
if (ObjectUtil.isEmpty(signInGifts)) {
extracted(ljUserVos, jsonArray, 0);

View File

@ -10,7 +10,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
from sys_dept d
where 1=1
<if test="dept.deptId != null and dept.deptId != 0">
AND dept_id = #{dept.deptId}
AND (dept_id = #{dept.deptId} or ancestors like concat (#{ownDeptStr},'%'))
</if>
<if test="dept.parentId != null and dept.parentId != 0">
AND parent_id = #{dept.parentId}
@ -21,14 +21,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="dept.status != null and dept.status != ''">
AND status = #{dept.status}
</if>
<!-- 数据范围过滤 -->
<if test="ownDeptStr != null and ownDeptStr!=''">
AND ancestors like concat (#{ownDeptStr},'%')
</if>
order by d.parent_id, d.order_num
</select>
<!-- &lt;!&ndash; 数据范围过滤 &ndash;&gt;-->
<!-- <if test="ownDeptStr != null and ownDeptStr!=''">-->
<!-- AND ancestors like concat (#{ownDeptStr},'%')-->
<!-- </if>-->
<!-- -->
<select id="selectDeptListByRoleId" resultType="Long">
select d.dept_id
from sys_dept d

View File

@ -54,7 +54,9 @@ public class SysDeptServiceImpl extends ServiceImpl<SysDeptMapper,SysDept> imple
{
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
SysDept sysDept = baseMapper.selectDeptById(nowAccountInfo.getDeptId());
return baseMapper.selectDeptList(dept,sysDept.getAncestors());
StringBuilder ancestors = new StringBuilder();
ancestors.append(sysDept.getAncestors()).append(",").append(nowAccountInfo.getDeptId());
return baseMapper.selectDeptList(dept,ancestors.toString());
}
/**

View File

@ -1,31 +1,47 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.fuint.repository.mapper.TAccountMapper">
<!-- <select id="listAccount" resultType="com.fuint.repository.model.TAccount">-->
<!-- SELECT-->
<!-- ta.*,sd.dept_name-->
<!-- FROM-->
<!-- `t_account` ta-->
<!-- left join sys_dept sd on sd.dept_id = ta.dept_id-->
<!-- <if test="accountInfo.realName != null and accountInfo.realName != ''">-->
<!-- AND ta.real_name = like concat('%',#{accountInfo.realName},'%')-->
<!-- </if>-->
<!-- <if test="accountInfo.deptId != null">-->
<!-- AND ta.dept_id = #{accountInfo.deptId}-->
<!-- </if>-->
<!-- &lt;!&ndash; 数据范围过滤 &ndash;&gt;-->
<!-- <if test="ancestors != null and ancestors!=''">-->
<!-- AND sd.ancestors like concat (#{ancestors},'%')-->
<!-- </if>-->
<!-- order by create_time desc-->
<!-- </select>-->
<!--&lt;!&ndash; where account_status != -1&ndash;&gt;-->
<select id="listAccount" resultType="com.fuint.repository.model.TAccount">
SELECT
ta.*,sd.dept_name
FROM
`t_account` ta
left join sys_dept sd on sd.dept_id = ta.dept_id
where account_status != -1
<if test="accountInfo.realName != null and accountInfo.realName != ''">
AND ta.real_name = like concat('%',#{accountInfo.realName},'%')
</if>
<if test="accountInfo.deptId != null">
AND ta.dept_id = #{accountInfo.deptId}
</if>
<!-- 数据范围过滤 -->
<if test="ancestors != null and ancestors!=''">
AND sd.ancestors like concat (#{ancestors},'%')
AND (ta.dept_id = #{accountInfo.deptId} or FIND_IN_SET(#{accountInfo.deptId}, sd.ancestors))
</if>
order by create_time desc
</select>
<select id="getStationmasterByStoreId" resultType="com.fuint.repository.model.TAccount">
select
ta.*

View File

@ -35,6 +35,11 @@ export const constantRoutes = [
component: () => import('@/views/login/index'),
hidden: true
},
{
path: '/',
component: () => import('@/views/login/index'),
hidden: true
},
{
path: '/404',
component: () => import('@/views/error/404'),

View File

@ -581,7 +581,9 @@ import {
//
getStaff(){
staffInfo().then( response => {
this.staff = response.data;
// this.staff = response.data;
console.log("response",response.data.accountInfo)
this.staff = response.data.accountInfo;
// this.map.staffId = this.staff.id;
})
},

View File

@ -186,7 +186,7 @@
let str = q.split("?")[1];
let arr = str.split("&");
let storeId = "19";
let storeId = "21";
let staffId = "";
arr.forEach(item => {
@ -201,10 +201,10 @@
this.storeId = uni.getStorageSync("storeId")
this.staffId = uni.getStorageSync("inviteStaffId")
} else {
if (uni.getStorageSync("storeId")){
if (uni.getStorageSync("storeId")) {
this.storeId = uni.getStorageSync("storeId")
}else{
let storeId = "19";
} else {
let storeId = "21";
uni.setStorageSync("storeId", storeId)
}
}

View File

@ -49,11 +49,11 @@
<view class="gang-box">
<view class="left-size">快递单号</view>
<view class="right-size" v-if="shippingType == '物流配送'">
<view class="right-size" v-if="form.shippingType == '物流配送'">
<span>{{form.courierCompanies}}{{form.theTrackingNumber}}</span>
</view>
<view class="right-size" else>门店自提</view>
<view v-else class="right-size">门店自提</view>
</view>
<view class="gang-box">
<view class="left-size">兑换时间</view>

View File

@ -204,6 +204,14 @@
let _this = this
let integralOrdersList = []
if (_this.value <= 0) {
uni.showToast({
title: "请选择商品!",
icon: "error"
})
return
}
let integralOrders = {
giftId: this.goodsInfo.id,
amount: _this.allAmout,
@ -216,6 +224,27 @@
shippingType: _this.shippingType,
}
if (this.shippingType == "物流配送") {
if (addrInfo) {
integralOrders.addressId = addrInfo.id
} else {
uni.showToast({
title: "请填写配送信息!",
icon: "error"
})
}
}
let check = await this.checkTheRedemptionLimit(this.goodsInfo.id)
if (check) {
uni.showToast({
title: "达到兑换上限!",
icon: "error"
})
return
}
integralOrdersList.push(integralOrders)
request({
url: "business/integral/integralOrders/integralOrdersProcessingUni",