mirror of
https://gitee.com/niucloud-team/javashop.git
synced 2026-04-25 11:18:23 +00:00
0.0.5
修复 微页面使用接口错误问题 修复 插件卸载后addon.json中数据异常丢失的问题 修复 读取不到配置文件中redis配置的问题 修复 订单金额为0时订单支付失败的问题 修复 礼品卡未完全使用完就已完成的问题 修复 商品优惠券主键查询指定数据无法查询的问题 修复 连签奖励记录在会员账户变更记录中未体现的问题 修复 新人礼活动无法参与的问题 修复 素材管理图标数据不显示的问题 修复 分销商品设为不参与设置无效 修复 商品分类拖动设置排序报错 修复 微信小程序上传物流信息未能成功的问题 修复 satoken多端登录loginId冲突的问题
This commit is contained in:
parent
471ae4d503
commit
daf0898aba
@ -758,4 +758,11 @@ export function getWxoplatform() {
|
|||||||
*/
|
*/
|
||||||
export function checkIsRestart() {
|
export function checkIsRestart() {
|
||||||
return request.get('sys/web/restart', { showErrorMessage: false })
|
return request.get('sys/web/restart', { showErrorMessage: false })
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 清理缓存
|
||||||
|
*/
|
||||||
|
export function clearCache(params: Record<string, any>) {
|
||||||
|
return request.post(`sys/cache/clear`, {}, { showSuccessMessage: true })
|
||||||
}
|
}
|
||||||
@ -31,6 +31,14 @@ export function addUser(params: Record<string, any>) {
|
|||||||
return request.post('user/user', params, { showSuccessMessage: true })
|
return request.post('user/user', params, { showSuccessMessage: true })
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改用户
|
||||||
|
* @param uid
|
||||||
|
*/
|
||||||
|
export function editUser(params: Record<string, any>) {
|
||||||
|
return request.put(`user/user/${ params.uid }`, params, { showSuccessMessage: true })
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取所有用户列表
|
* 获取所有用户列表
|
||||||
* @param params
|
* @param params
|
||||||
|
|||||||
@ -1,7 +1,6 @@
|
|||||||
{
|
{
|
||||||
"refresh":"刷新",
|
"dataCache":"清除缓存",
|
||||||
"refreshMenu":"刷新菜单",
|
"dataCacheDesc":"清除系统的所有缓存",
|
||||||
"refreshMenuDesc":"新增/修改插件菜单后,需要刷新插件菜单",
|
"refresh": "立即清除",
|
||||||
"dataCache":"数据缓存",
|
"clearCacheTips": "确定要清除缓存吗?"
|
||||||
"dataCacheDesc":"新增/修改数据表后,需要清除数据表缓存"
|
}
|
||||||
}
|
|
||||||
|
|||||||
@ -1,27 +1,44 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog v-model="showDialog" :title="t('addUser')" width="750px" :destroy-on-close="true">
|
<el-dialog v-model="showDialog" :title="formData.uid ? t('updateUser') : t('addUser')" width="750px" :destroy-on-close="true">
|
||||||
<el-scrollbar>
|
<el-scrollbar>
|
||||||
<div class="max-h-[60vh]">
|
<div class="max-h-[60vh]">
|
||||||
<el-form :model="formData" label-width="120px" ref="formRef" :rules="formRules" class="page-form" autocomplete="off" v-loading="loading">
|
<el-form :model="formData" label-width="120px" ref="formRef" :rules="formRules" class="page-form" autocomplete="off" v-loading="loading">
|
||||||
<el-form-item :label="t('username')" prop="username">
|
<el-form-item :label="t('username')" prop="username">
|
||||||
<el-input v-model="formData.username" clearable :placeholder="t('usernamePlaceholder')" class="input-width" :readonly="real_name_input" @click="real_name_input = false" @blur="real_name_input = true" />
|
<el-input v-model.trim="formData.username" clearable :placeholder="t('usernamePlaceholder')" class="input-width" :readonly="formData.uid" :disabled="formData.uid" @click="realnameInput = false" @blur="realnameInput = true" />
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item :label="t('headImg')">
|
||||||
|
<upload-image v-model="formData.head_img" />
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item :label="t('userRealName')" prop="real_name">
|
||||||
|
<el-input v-model.trim="formData.real_name" :placeholder="t('userRealNamePlaceholder')" :readonly="realnameInput" @click="realnameInput = false" @blur="realnameInput = true" clearable class="input-width" maxlength="10" show-word-limit />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item :label="t('password')" prop="password">
|
<el-form-item :label="t('password')" prop="password">
|
||||||
<el-input v-model="formData.password" clearable :placeholder="t('passwordPlaceholder')" class="input-width" :show-password="true" type="password" :readonly="password_input" @click="password_input = false" @blur="password_input = true" />
|
<el-input v-model.trim="formData.password" :class="passwordType == 'text' ? '' :'displayPass'" clearable :placeholder="t('passwordPlaceholder')" class="input-width" :readonly="passwordInput" @click="passwordInput = false" @blur="passwordInput = true" >
|
||||||
|
<template #suffix>
|
||||||
|
<el-icon @click="togglePasswordVisibility" class="cursor-pointer">
|
||||||
|
<component :is=" passwordType === 'password' ? 'Hide' : 'View'" />
|
||||||
|
</el-icon>
|
||||||
|
</template>
|
||||||
|
</el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item :label="t('confirmPassword')" prop="confirm_password">
|
<el-form-item :label="t('confirmPassword')" prop="confirm_password">
|
||||||
<el-input v-model="formData.confirm_password" :placeholder="t('confirmPasswordPlaceholder')" type="password" :show-password="true" clearable class="input-width" :readonly="confirm_password_input" @click="confirm_password_input = false" @blur="confirm_password_input = true" />
|
<el-input v-model.trim="formData.confirm_password" :class="confirmPasswordType == 'text' ? '' :'displayPass'" :placeholder="t('confirmPasswordPlaceholder')" clearable class="input-width" :readonly="confirmPasswordInput" @click="confirmPasswordInput = false" @blur="confirmPasswordInput = true" >
|
||||||
|
<template #suffix>
|
||||||
|
<el-icon @click="toggleConfirmPasswordVisibility" class="cursor-pointer">
|
||||||
|
<component :is=" confirmPasswordType === 'password' ? 'Hide' : 'View'" />
|
||||||
|
</el-icon>
|
||||||
|
</template>
|
||||||
|
</el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item :label="t('userCreateSiteLimit')" v-if="Object.keys(siteGroup).length" prop="create_site_limit">
|
<el-form-item :label="t('userCreateSiteLimit')" v-if="!formData.uid && Object.keys(siteGroup).length" prop="create_site_limit">
|
||||||
<div>
|
<div>
|
||||||
<div>{{ t('siteGroup') }}</div>
|
<div>{{ t('siteGroup') }}</div>
|
||||||
<el-checkbox-group
|
<el-checkbox-group v-model="formData.group_ids" @change="groupSelect">
|
||||||
v-model="formData.group_ids"
|
|
||||||
@change="groupSelect"
|
|
||||||
>
|
|
||||||
<el-checkbox v-for="item in siteGroup" :label="item.group_id">{{ item.group_name }}</el-checkbox>
|
<el-checkbox v-for="item in siteGroup" :label="item.group_id">{{ item.group_name }}</el-checkbox>
|
||||||
</el-checkbox-group>
|
</el-checkbox-group>
|
||||||
</div>
|
</div>
|
||||||
@ -33,15 +50,15 @@
|
|||||||
{{ siteGroup[row.group_id] ? siteGroup[row.group_id].group_name : '' }}
|
{{ siteGroup[row.group_id] ? siteGroup[row.group_id].group_name : '' }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column :label="t('siteNum')">
|
<el-table-column :label="t('createSiteNum')">
|
||||||
<template #default="{ $index }">
|
<template #default="{ $index }">
|
||||||
<el-input v-model.number="formData.create_site_limit[$index].num">
|
<el-input v-model.number.trim="formData.create_site_limit[$index].num">
|
||||||
</el-input>
|
</el-input>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column :label="t('siteMonth')">
|
<el-table-column :label="t('siteMonth')">
|
||||||
<template #default="{ $index }">
|
<template #default="{ $index }">
|
||||||
<el-input v-model.number="formData.create_site_limit[$index].month">
|
<el-input v-model.number.trim="formData.create_site_limit[$index].month">
|
||||||
<template #append>{{ t('month') }}</template>
|
<template #append>{{ t('month') }}</template>
|
||||||
</el-input>
|
</el-input>
|
||||||
</template>
|
</template>
|
||||||
@ -63,75 +80,84 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { ref } from 'vue'
|
import {computed, ref} from 'vue'
|
||||||
import { t } from '@/lang'
|
import { t } from '@/lang'
|
||||||
import { FormInstance } from 'element-plus'
|
import { FormInstance } from 'element-plus'
|
||||||
import { getSiteGroupAll } from '@/app/api/site'
|
import { getSiteGroupAll } from '@/app/api/site'
|
||||||
import { addUser } from '@/app/api/user'
|
import { addUser, getUserInfo, editUser } from '@/app/api/user'
|
||||||
|
import useUserStore from '@/stores/modules/user'
|
||||||
import Test from '@/utils/test'
|
import Test from '@/utils/test'
|
||||||
|
|
||||||
|
const userStore = useUserStore()
|
||||||
|
|
||||||
const showDialog = ref(false)
|
const showDialog = ref(false)
|
||||||
const loading = ref(true)
|
const loading = ref(true)
|
||||||
const formData = ref({
|
const formData = ref({
|
||||||
|
uid: 0,
|
||||||
username: '',
|
username: '',
|
||||||
password: '',
|
password: '',
|
||||||
|
head_img: '',
|
||||||
|
real_name: '',
|
||||||
confirm_password: '',
|
confirm_password: '',
|
||||||
create_site_limit: [],
|
create_site_limit: [],
|
||||||
group_ids: []
|
group_ids: []
|
||||||
})
|
})
|
||||||
const siteGroup = ref({})
|
const siteGroup = ref({})
|
||||||
const formRef = ref<FormInstance>()
|
const formRef = ref<FormInstance>()
|
||||||
const formRules = ref({
|
const formRules = computed(() => {
|
||||||
username: [
|
return {
|
||||||
{ required: true, message: t('usernamePlaceholder'), trigger: 'blur' }
|
username: [
|
||||||
],
|
{ required: true, message: t('usernamePlaceholder'), trigger: 'blur' }
|
||||||
password: [
|
],
|
||||||
{ required: true, message: t('passwordPlaceholder'), trigger: 'blur' }
|
password: [
|
||||||
],
|
{ required: userStore.userInfo && userStore.userInfo.is_super_admin == true, message: t('passwordPlaceholder'), trigger: 'blur' }
|
||||||
real_name: [
|
],
|
||||||
{ required: true, message: t('userRealNamePlaceholder'), trigger: 'blur' }
|
real_name: [
|
||||||
],
|
{ required: true, message: t('userRealNamePlaceholder'), trigger: 'blur' }
|
||||||
confirm_password: [
|
],
|
||||||
{ required: true, message: t('confirmPasswordPlaceholder'), trigger: 'blur' },
|
confirm_password: [
|
||||||
{
|
{ required: userStore.userInfo && userStore.userInfo.is_super_admin == true, message: t('confirmPasswordPlaceholder'), trigger: 'blur' },
|
||||||
validator: (rule: any, value: string, callback: any) => {
|
{
|
||||||
if (value != formData.value.password) callback(new Error(t('confirmPasswordError')))
|
validator: (rule: any, value: string, callback: any) => {
|
||||||
else callback()
|
if (value != formData.value.password) callback(new Error(t('confirmPasswordError')))
|
||||||
},
|
else callback()
|
||||||
trigger: 'blur'
|
},
|
||||||
}
|
trigger: 'blur'
|
||||||
],
|
|
||||||
create_site_limit: [
|
|
||||||
{
|
|
||||||
validator: (rule: any, value: string, callback: any) => {
|
|
||||||
let verify = true
|
|
||||||
for (let i = 0; i < formData.value.create_site_limit.length; i++) {
|
|
||||||
const item = formData.value.create_site_limit[i]
|
|
||||||
if (Test.empty(item.num)) {
|
|
||||||
callback(t('siteNumPlaceholder'))
|
|
||||||
verify = false
|
|
||||||
break
|
|
||||||
}
|
|
||||||
if (item.num < 1) {
|
|
||||||
callback(t('siteNumCannotLtOne'))
|
|
||||||
verify = false
|
|
||||||
break
|
|
||||||
}
|
|
||||||
if (Test.empty(item.month)) {
|
|
||||||
callback(t('siteMonthPlaceholder'))
|
|
||||||
verify = false
|
|
||||||
break
|
|
||||||
}
|
|
||||||
if (item.month < 0) {
|
|
||||||
callback(t('siteMonthCannotLtOne'))
|
|
||||||
verify = false
|
|
||||||
break
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (verify) callback()
|
|
||||||
}
|
}
|
||||||
}
|
],
|
||||||
]
|
create_site_limit: [
|
||||||
|
{
|
||||||
|
validator: (rule: any, value: string, callback: any) => {
|
||||||
|
if (formData.value.uid) callback()
|
||||||
|
let verify = true
|
||||||
|
for (let i = 0; i < formData.value.create_site_limit.length; i++) {
|
||||||
|
const item = formData.value.create_site_limit[i]
|
||||||
|
if (Test.empty(item.num)) {
|
||||||
|
callback(t('siteNumPlaceholder'))
|
||||||
|
verify = false
|
||||||
|
break
|
||||||
|
}
|
||||||
|
if (item.num < 1) {
|
||||||
|
callback(t('siteNumCannotLtOne'))
|
||||||
|
verify = false
|
||||||
|
break
|
||||||
|
}
|
||||||
|
if (Test.empty(item.month)) {
|
||||||
|
callback(t('siteMonthPlaceholder'))
|
||||||
|
verify = false
|
||||||
|
break
|
||||||
|
}
|
||||||
|
if (item.month < 0) {
|
||||||
|
callback(t('siteMonthCannotLtOne'))
|
||||||
|
verify = false
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (verify) callback()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
getSiteGroupAll().then(({ data }) => {
|
getSiteGroupAll().then(({ data }) => {
|
||||||
@ -144,8 +170,25 @@ getSiteGroupAll().then(({ data }) => {
|
|||||||
|
|
||||||
const setFormData = (uid: number = 0) => {
|
const setFormData = (uid: number = 0) => {
|
||||||
if (uid) {
|
if (uid) {
|
||||||
|
getUserInfo(uid).then(({ data }) => {
|
||||||
|
formData.value.uid = data.uid
|
||||||
|
formData.value.username = data.username
|
||||||
|
formData.value.real_name = data.real_name
|
||||||
|
formData.value.head_img = data.head_img
|
||||||
|
loading.value = false
|
||||||
|
showDialog.value = true
|
||||||
|
})
|
||||||
} else {
|
} else {
|
||||||
|
formData.value = {
|
||||||
|
uid: 0,
|
||||||
|
username: '',
|
||||||
|
password: '',
|
||||||
|
head_img: '',
|
||||||
|
real_name: '',
|
||||||
|
confirm_password: '',
|
||||||
|
create_site_limit: [],
|
||||||
|
group_ids: []
|
||||||
|
}
|
||||||
loading.value = false
|
loading.value = false
|
||||||
showDialog.value = true
|
showDialog.value = true
|
||||||
}
|
}
|
||||||
@ -154,7 +197,7 @@ const setFormData = (uid: number = 0) => {
|
|||||||
const emits = defineEmits(['complete'])
|
const emits = defineEmits(['complete'])
|
||||||
|
|
||||||
const groupSelect = (groupIds: number[]) => {
|
const groupSelect = (groupIds: number[]) => {
|
||||||
const list = []
|
let list:any = []
|
||||||
groupIds.forEach(item => {
|
groupIds.forEach(item => {
|
||||||
list.push({
|
list.push({
|
||||||
group_id: item,
|
group_id: item,
|
||||||
@ -175,7 +218,7 @@ const confirm = async (formEl: FormInstance | undefined) => {
|
|||||||
await formEl.validate(async (valid) => {
|
await formEl.validate(async (valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
loading.value = true
|
loading.value = true
|
||||||
const save = addUser
|
const save = formData.value.uid ? editUser : addUser
|
||||||
|
|
||||||
save(formData.value).then(() => {
|
save(formData.value).then(() => {
|
||||||
loading.value = false
|
loading.value = false
|
||||||
@ -188,9 +231,21 @@ const confirm = async (formEl: FormInstance | undefined) => {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
const real_name_input = ref(true)
|
const realnameInput = ref(true)
|
||||||
const password_input = ref(true)
|
const passwordInput = ref(true)
|
||||||
const confirm_password_input = ref(true)
|
const confirmPasswordInput = ref(true)
|
||||||
|
|
||||||
|
const passwordType = ref('password')
|
||||||
|
|
||||||
|
const togglePasswordVisibility = () => {
|
||||||
|
passwordType.value = passwordType.value === 'password' ? 'text' : 'password'
|
||||||
|
}
|
||||||
|
const confirmPasswordType = ref('password')
|
||||||
|
|
||||||
|
const toggleConfirmPasswordVisibility = () => {
|
||||||
|
confirmPasswordType.value = confirmPasswordType.value === 'password' ? 'text' : 'password'
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
defineExpose({
|
defineExpose({
|
||||||
showDialog,
|
showDialog,
|
||||||
@ -199,5 +254,9 @@ defineExpose({
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
.displayPass {
|
||||||
|
::v-deep .el-input__inner{
|
||||||
|
-webkit-text-security: disc !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@ -68,7 +68,10 @@
|
|||||||
<el-table-column :label="t('operation')" align="right" fixed="right" width="150">
|
<el-table-column :label="t('operation')" align="right" fixed="right" width="150">
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
<el-button type="primary" link @click="detailEvent(row.uid)">{{ t('detail') }}</el-button>
|
<el-button type="primary" link @click="detailEvent(row.uid)">{{ t('detail') }}</el-button>
|
||||||
<el-button type="primary" link @click="detailEvent(row.uid, 'userCreateSiteLimit')" v-if="!row.is_super_admin">{{ t('userCreateSiteLimit') }}</el-button>
|
<template v-if="!row.is_super_admin">
|
||||||
|
<el-button type="primary" link @click="editEvent(row.uid)" >{{ t('edit') }}</el-button>
|
||||||
|
<el-button type="primary" link @click="detailEvent(row.uid, 'userCreateSiteLimit')">{{ t('userCreateSiteLimit') }}</el-button>
|
||||||
|
</template>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
@ -152,6 +155,14 @@ loadUserList()
|
|||||||
const detailEvent = (uid: number, tab: string = '') => {
|
const detailEvent = (uid: number, tab: string = '') => {
|
||||||
router.push({ path: '/admin/site/user_info', query: { uid, tab } })
|
router.push({ path: '/admin/site/user_info', query: { uid, tab } })
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 编辑用户
|
||||||
|
* @param uid
|
||||||
|
*/
|
||||||
|
const editEvent = (uid: number) => {
|
||||||
|
userEditRef.value.setFormData(uid)
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped></style>
|
<style lang="scss" scoped></style>
|
||||||
|
|||||||
63
admin/src/app/views/tools/updatecache.vue
Normal file
63
admin/src/app/views/tools/updatecache.vue
Normal file
@ -0,0 +1,63 @@
|
|||||||
|
<template>
|
||||||
|
<div class="main-container" >
|
||||||
|
<el-card class="box-card !border-none" shadow="never" v-loading="loading">
|
||||||
|
<div class="flex justify-between items-center">
|
||||||
|
<span class="text-page-title">{{ pageName }}</span>
|
||||||
|
</div>
|
||||||
|
<div class="flex flex-wrap px-2 plug-list pb-10 mt-[20px] ">
|
||||||
|
<div class="flex items-center p-3 w-[295px] relative plug-item mr-4 mb-4 bg-[var(--el-color-info-light-9)] cursor-pointer">
|
||||||
|
<div class="flex flex-col ml-2">
|
||||||
|
<span class="text-sm truncate w-[190px]">{{t('dataCache')}}</span>
|
||||||
|
<span class="text-xs text-gray-400 mt-1 truncate w-[190px]" :title="t('dataCacheDesc')">{{t('dataCacheDesc')}}</span>
|
||||||
|
</div>
|
||||||
|
<span class="plug-item-operate" @click="schemaCache()">{{t('refresh')}}</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</el-card>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script lang="ts" setup>
|
||||||
|
import { ref } from 'vue'
|
||||||
|
import { t } from '@/lang'
|
||||||
|
import { clearCache } from '@/app/api/sys'
|
||||||
|
import { ElMessageBox } from 'element-plus'
|
||||||
|
import { useRouter, useRoute } from 'vue-router'
|
||||||
|
const loading = ref<Boolean>(false)
|
||||||
|
const route = useRoute()
|
||||||
|
const pageName = route.meta.title
|
||||||
|
|
||||||
|
// 数据缓存
|
||||||
|
const schemaCache = () => {
|
||||||
|
ElMessageBox.confirm(t('clearCacheTips'), t('warning'),
|
||||||
|
{
|
||||||
|
confirmButtonText: t('confirm'),
|
||||||
|
cancelButtonText: t('cancel'),
|
||||||
|
type: 'warning'
|
||||||
|
}
|
||||||
|
).then(() => {
|
||||||
|
loading.value = true
|
||||||
|
clearCache({}).then(res => {
|
||||||
|
loading.value = false
|
||||||
|
}).catch(() => {
|
||||||
|
loading.value = false
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.demo-tabs > .el-tabs__content {
|
||||||
|
padding: 32px;
|
||||||
|
color: #6b778c;
|
||||||
|
font-size: 32px;
|
||||||
|
font-weight: 600;
|
||||||
|
}
|
||||||
|
.plug-item{
|
||||||
|
.plug-item-operate{
|
||||||
|
@apply text-xs absolute right-3 cursor-pointer;
|
||||||
|
color: var(--el-color-primary);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@ -192,11 +192,9 @@ import {
|
|||||||
editAttachmentCategory as updateCategory,
|
editAttachmentCategory as updateCategory,
|
||||||
deleteAttachmentCategory as deleteCategory,
|
deleteAttachmentCategory as deleteCategory,
|
||||||
deleteAttachment,
|
deleteAttachment,
|
||||||
moveAttachment,
|
moveAttachment
|
||||||
getIconCategoryList,
|
|
||||||
getIconList
|
|
||||||
} from '@/app/api/sys'
|
} from '@/app/api/sys'
|
||||||
import { debounce, img, getToken } from '@/utils/common'
|
import { debounce, img, getToken, deepClone } from '@/utils/common'
|
||||||
import { ElMessage, UploadFile, UploadFiles, ElMessageBox, MessageParams } from 'element-plus'
|
import { ElMessage, UploadFile, UploadFiles, ElMessageBox, MessageParams } from 'element-plus'
|
||||||
import storage from '@/utils/storage'
|
import storage from '@/utils/storage'
|
||||||
|
|
||||||
@ -260,6 +258,72 @@ const attachmentParam = reactive({
|
|||||||
cate_id: 0
|
cate_id: 0
|
||||||
})
|
})
|
||||||
|
|
||||||
|
const iconJsonFile = import.meta.glob('../../styles/icon/**/*.json', { eager: true })
|
||||||
|
const iconList = {
|
||||||
|
0: []
|
||||||
|
}
|
||||||
|
|
||||||
|
const getIconCategoryList = (search) => {
|
||||||
|
return new Promise((resolve, reject) => {
|
||||||
|
try {
|
||||||
|
const result = {
|
||||||
|
code: 1,
|
||||||
|
data: []
|
||||||
|
}
|
||||||
|
|
||||||
|
Object.keys(iconJsonFile).reverse().forEach(key => {
|
||||||
|
let item = iconJsonFile[key].default
|
||||||
|
if (search.name && item.name.indexOf(search.name) != -1) {
|
||||||
|
result.data.push(item)
|
||||||
|
} else if (!search.name) {
|
||||||
|
result.data.push(item)
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!iconList[item.id]) {
|
||||||
|
item.glyphs = item.glyphs.map(iconItem => {
|
||||||
|
iconItem.url = `${item.font_family} ${item.css_prefix_text}${iconItem.font_class}`
|
||||||
|
iconItem.real_name = iconItem.name
|
||||||
|
iconItem.att_id = iconItem.icon_id
|
||||||
|
return iconItem
|
||||||
|
})
|
||||||
|
iconList[0].push(...item.glyphs)
|
||||||
|
iconList[item.id] = item.glyphs
|
||||||
|
}
|
||||||
|
})
|
||||||
|
resolve(result)
|
||||||
|
} catch (e) {
|
||||||
|
console.error(e)
|
||||||
|
reject(e)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
const getIconList = (search) => {
|
||||||
|
return new Promise((resolve, reject) => {
|
||||||
|
try {
|
||||||
|
const result = {
|
||||||
|
code: 1,
|
||||||
|
data: {
|
||||||
|
current_page: search.page,
|
||||||
|
per_page: 1,
|
||||||
|
total: 0,
|
||||||
|
data: []
|
||||||
|
}
|
||||||
|
}
|
||||||
|
let icons = JSON.parse(JSON.stringify(iconList[search.cate_id]))
|
||||||
|
if (search.real_name) icons = icons.filter(item => item.real_name.indexOf(search.real_name) != -1)
|
||||||
|
|
||||||
|
result.data.total = icons.length
|
||||||
|
result.data.data = icons.splice((search.page - 1) * search.limit, search.limit)
|
||||||
|
result.data.per_page = Math.ceil(icons.length / search.limit)
|
||||||
|
resolve(result)
|
||||||
|
} catch (e) {
|
||||||
|
console.error(e)
|
||||||
|
reject(e)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询分组
|
* 查询分组
|
||||||
*/
|
*/
|
||||||
|
|||||||
@ -261,7 +261,7 @@ public class BootConfig {
|
|||||||
if (webroot.contains("webroot")) {
|
if (webroot.contains("webroot")) {
|
||||||
webroot = webroot.substring(0, webroot.indexOf("webroot"));
|
webroot = webroot.substring(0, webroot.indexOf("webroot"));
|
||||||
}
|
}
|
||||||
if (webroot.startsWith("nested:/")) {
|
if (webroot.startsWith("nested:/") || webroot.startsWith("nested:\\")) {
|
||||||
webroot = webroot.substring(7);
|
webroot = webroot.substring(7);
|
||||||
}
|
}
|
||||||
return webroot;
|
return webroot;
|
||||||
|
|||||||
@ -67,7 +67,7 @@ public class AddonRollback {
|
|||||||
if (runAddonJsonArray == null || runAddonJsonArray.size() <= 0) {
|
if (runAddonJsonArray == null || runAddonJsonArray.size() <= 0) {
|
||||||
return runAddonJsonArray;
|
return runAddonJsonArray;
|
||||||
}
|
}
|
||||||
int index = 0;
|
int index = -1;
|
||||||
for (int i = 0; i < runAddonJsonArray.size(); i++) {
|
for (int i = 0; i < runAddonJsonArray.size(); i++) {
|
||||||
JSONObject jsonObject = runAddonJsonArray.getJSONObject(i);
|
JSONObject jsonObject = runAddonJsonArray.getJSONObject(i);
|
||||||
String name = jsonObject.getStr("name");
|
String name = jsonObject.getStr("name");
|
||||||
@ -75,7 +75,7 @@ public class AddonRollback {
|
|||||||
index = i;
|
index = i;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
runAddonJsonArray.remove(index);
|
if (index != -1) runAddonJsonArray.remove(index);
|
||||||
return runAddonJsonArray;
|
return runAddonJsonArray;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -179,7 +179,7 @@ public class EnvironmentValidator {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public boolean checkRedisUsable() {
|
public boolean checkRedisUsable() {
|
||||||
Map<String, Object> redisMap = this.springMap.get("redis");
|
Map<String, Object> redisMap = (Map<String, Object>) this.springMap.get("data").get("redis");
|
||||||
String redisHost = (String) redisMap.get("host");
|
String redisHost = (String) redisMap.get("host");
|
||||||
if (StrUtil.isEmpty(redisHost)) {
|
if (StrUtil.isEmpty(redisHost)) {
|
||||||
System.err.println("spring.redis.host未配置.");
|
System.err.println("spring.redis.host未配置.");
|
||||||
|
|||||||
BIN
niucloud-core/.mvn/wrapper/maven-wrapper.jar
vendored
Normal file
BIN
niucloud-core/.mvn/wrapper/maven-wrapper.jar
vendored
Normal file
Binary file not shown.
2
niucloud-core/.mvn/wrapper/maven-wrapper.properties
vendored
Normal file
2
niucloud-core/.mvn/wrapper/maven-wrapper.properties
vendored
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.5/apache-maven-3.9.5-bin.zip
|
||||||
|
wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.2.0/maven-wrapper-3.2.0.jar
|
||||||
@ -49,7 +49,7 @@ public class GlobalConfig {
|
|||||||
/**
|
/**
|
||||||
* 版本
|
* 版本
|
||||||
*/
|
*/
|
||||||
public static String version = "0.0.4";
|
public static String version = "0.0.5";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 应用key
|
* 应用key
|
||||||
|
|||||||
@ -47,7 +47,10 @@ public class SaTokenAdminInterceptor extends SaInterceptor {
|
|||||||
|
|
||||||
if(islogin){
|
if(islogin){
|
||||||
//设置当前登录用户id
|
//设置当前登录用户id
|
||||||
Integer uid = Integer.parseInt(StpUtil.getLoginId().toString());
|
String[] loginId = ObjectUtil.defaultIfEmpty(StpUtil.getLoginId().toString(), "").split("-");
|
||||||
|
if (loginId[1] == null) throw new AuthException("LOGIN_EXPIRE", 401);
|
||||||
|
|
||||||
|
Integer uid = Integer.parseInt(loginId[1]);
|
||||||
RequestUtils.setUid(uid);
|
RequestUtils.setUid(uid);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -55,7 +55,10 @@ public class SaTokenApiInterceptor extends SaInterceptor {
|
|||||||
|
|
||||||
/** 设置当前登录会员id */
|
/** 设置当前登录会员id */
|
||||||
if(islogin){
|
if(islogin){
|
||||||
Integer memberId=Integer.parseInt(StpUtil.getLoginId().toString());
|
String[] loginId = ObjectUtil.defaultIfEmpty(StpUtil.getLoginId().toString(), "").split("-");
|
||||||
|
if (loginId[1] == null) throw new AuthException("LOGIN_EXPIRE", 401);
|
||||||
|
|
||||||
|
Integer memberId=Integer.parseInt(loginId[1]);
|
||||||
RequestUtils.setMemberId(memberId);
|
RequestUtils.setMemberId(memberId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1,5 +1,7 @@
|
|||||||
package com.niu.core.common.utils.mapper;
|
package com.niu.core.common.utils.mapper;
|
||||||
|
|
||||||
|
import cn.hutool.core.util.ArrayUtil;
|
||||||
|
import cn.hutool.core.util.StrUtil;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import com.github.yulichang.query.MPJQueryWrapper;
|
import com.github.yulichang.query.MPJQueryWrapper;
|
||||||
import com.niu.core.common.utils.date.DateUtils;
|
import com.niu.core.common.utils.date.DateUtils;
|
||||||
@ -93,4 +95,26 @@ public class QueryMapperUtils {
|
|||||||
}
|
}
|
||||||
return queryWrapper;
|
return queryWrapper;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 多字典模糊查询
|
||||||
|
* @param wrapper
|
||||||
|
* @param keyword
|
||||||
|
* @param columns
|
||||||
|
* @param <T>
|
||||||
|
*/
|
||||||
|
public static <T> void addMultiLike(MPJQueryWrapper<T> wrapper, String keyword, String... columns) {
|
||||||
|
if (StrUtil.isBlank(keyword) || ArrayUtil.isEmpty(columns)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
wrapper.and(inner -> {
|
||||||
|
for (int i = 0; i < columns.length; i++) {
|
||||||
|
if (i > 0) {
|
||||||
|
inner.or();
|
||||||
|
}
|
||||||
|
inner.like(columns[i], keyword);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -76,7 +76,7 @@ public class RuntimeTools {
|
|||||||
if (webroot.contains("webroot")) {
|
if (webroot.contains("webroot")) {
|
||||||
webroot = webroot.substring(0, webroot.indexOf("webroot") + 7);
|
webroot = webroot.substring(0, webroot.indexOf("webroot") + 7);
|
||||||
}
|
}
|
||||||
if (webroot.startsWith("nested:/")) {
|
if (webroot.startsWith("nested:/") || webroot.startsWith("nested:\\")) {
|
||||||
webroot = webroot.substring(7);
|
webroot = webroot.substring(7);
|
||||||
}
|
}
|
||||||
return webroot;
|
return webroot;
|
||||||
|
|||||||
@ -148,9 +148,9 @@ public class DiyController {
|
|||||||
*
|
*
|
||||||
* @return Result<Object>
|
* @return Result<Object>
|
||||||
*/
|
*/
|
||||||
@PutMapping("/use")
|
@PutMapping("/use/{id}")
|
||||||
public Result<Object> setUse(@RequestBody Id id) {
|
public Result<Object> setUse(@PathVariable("id") Integer id) {
|
||||||
diyPageService.setUse(id.getId());
|
diyPageService.setUse(id);
|
||||||
return Result.success();
|
return Result.success();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
package com.niu.core.controller.adminapi.user;
|
package com.niu.core.controller.adminapi.user;
|
||||||
|
|
||||||
import cn.dev33.satoken.annotation.SaCheckLogin;
|
import cn.dev33.satoken.annotation.SaCheckLogin;
|
||||||
|
import cn.hutool.core.bean.BeanUtil;
|
||||||
import com.niu.core.common.domain.PageParam;
|
import com.niu.core.common.domain.PageParam;
|
||||||
import com.niu.core.common.domain.PageResult;
|
import com.niu.core.common.domain.PageResult;
|
||||||
import com.niu.core.common.domain.Result;
|
import com.niu.core.common.domain.Result;
|
||||||
@ -65,18 +66,21 @@ public class UserController {
|
|||||||
*/
|
*/
|
||||||
@PostMapping("/user")
|
@PostMapping("/user")
|
||||||
public Result<Object> add(@Validated @RequestBody SysUserAddParam addParam) {
|
public Result<Object> add(@Validated @RequestBody SysUserAddParam addParam) {
|
||||||
SysUserParam sysUserParam=new SysUserParam();
|
SysUserParam sysUserParam = new SysUserParam();
|
||||||
sysUserParam.setUsername(addParam.getUsername());
|
BeanUtil.copyProperties(addParam, sysUserParam);
|
||||||
sysUserParam.setStatus(UserEnum.ON.getCode());
|
|
||||||
sysUserParam.setRealName("");
|
|
||||||
sysUserParam.setPassword(addParam.getPassword());
|
|
||||||
sysUserParam.setIsDel(0);
|
|
||||||
sysUserParam.setHeadImg("");
|
|
||||||
sysUserParam.setCreateSiteLimitParamList(addParam.getCreateSiteLimit());
|
|
||||||
sysUserService.add(sysUserParam);
|
sysUserService.add(sysUserParam);
|
||||||
return Result.success();
|
return Result.success();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@PutMapping("/user/{uid}")
|
||||||
|
public Result<Object> edit(@PathVariable("uid") Integer uid, @Validated @RequestBody SysUserAddParam editParam) {
|
||||||
|
SysUserParam sysUserParam = new SysUserParam();
|
||||||
|
sysUserParam.setHeadImg(editParam.getHeadImg());
|
||||||
|
sysUserParam.setRealName(editParam.getRealName());
|
||||||
|
sysUserParam.setPassword(editParam.getPassword());
|
||||||
|
sysUserService.edit(uid, sysUserParam);
|
||||||
|
return Result.success();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询账号是否存在
|
* 查询账号是否存在
|
||||||
|
|||||||
@ -67,4 +67,13 @@ public class WeappController {
|
|||||||
return Result.success(weappService.getIsTradeManaged());
|
return Result.success(weappService.getIsTradeManaged());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过外部交易号获取消息跳转路径
|
||||||
|
* @param outTradeNo
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@GetMapping("/getMsgJumpPath")
|
||||||
|
public Result<?> getMsgJumpPath(@RequestParam("out_trade_no") String outTradeNo) {
|
||||||
|
return Result.success(weappService.getMsgJumpPath(outTradeNo));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@ -35,4 +35,4 @@ public class MemberLabel implements Serializable {
|
|||||||
/** 更新时间 */
|
/** 更新时间 */
|
||||||
private Long updateTime;
|
private Long updateTime;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,7 +2,9 @@ package com.niu.core.event.member;
|
|||||||
|
|
||||||
import com.niu.core.common.component.context.event.Event;
|
import com.niu.core.common.component.context.event.Event;
|
||||||
import com.niu.core.entity.member.Member;
|
import com.niu.core.entity.member.Member;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
public class MemberLoginEvent extends Event {
|
public class MemberLoginEvent extends Event {
|
||||||
|
|
||||||
private Member member;
|
private Member member;
|
||||||
|
|||||||
@ -0,0 +1,30 @@
|
|||||||
|
package com.niu.core.event.order;
|
||||||
|
|
||||||
|
import cn.hutool.json.JSONObject;
|
||||||
|
import com.niu.core.common.component.context.event.Event;
|
||||||
|
import com.niu.core.common.component.context.event.EventResult;
|
||||||
|
import com.niu.core.common.component.context.listener.CallbackListener;
|
||||||
|
import com.niu.core.entity.pay.Pay;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
public abstract class WapOrderDetailPathDefiner extends CallbackListener<WapOrderDetailPathDefiner.WapOrderDetailPathEvent> {
|
||||||
|
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@Data
|
||||||
|
@AllArgsConstructor
|
||||||
|
@NoArgsConstructor
|
||||||
|
public static class WapOrderDetailPathEvent extends Event {
|
||||||
|
private Pay pay;
|
||||||
|
}
|
||||||
|
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@Data
|
||||||
|
public static class WapOrderDetailPathResult extends EventResult {
|
||||||
|
private String path;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
@ -7,6 +7,7 @@ import cn.hutool.json.JSONObject;
|
|||||||
import cn.hutool.json.JSONUtil;
|
import cn.hutool.json.JSONUtil;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import com.niu.core.common.component.context.WebAppEnvs;
|
import com.niu.core.common.component.context.WebAppEnvs;
|
||||||
|
import com.niu.core.common.config.GlobalConfig;
|
||||||
import com.niu.core.common.exception.CommonException;
|
import com.niu.core.common.exception.CommonException;
|
||||||
import com.niu.core.common.utils.TreeUtils;
|
import com.niu.core.common.utils.TreeUtils;
|
||||||
import com.niu.core.common.utils.file.FileTools;
|
import com.niu.core.common.utils.file.FileTools;
|
||||||
@ -48,6 +49,8 @@ public class AddonDevelopBuildServiceImpl implements IAddonDevelopBuildService {
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void build(String addon) {
|
public void build(String addon) {
|
||||||
|
if (!GlobalConfig.runActive.equals("dev")) throw new CommonException("只有在开发环境下才可以进行打包操作");
|
||||||
|
|
||||||
if (!new File(WebAppEnvs.get().projectNiucloudAddon + addon).exists()) throw new CommonException("插件不存在");
|
if (!new File(WebAppEnvs.get().projectNiucloudAddon + addon).exists()) throw new CommonException("插件不存在");
|
||||||
File infoFile = new File(WebAppEnvs.get().projectNiucloudAddon + addon + "/src/main/resources/info.json");
|
File infoFile = new File(WebAppEnvs.get().projectNiucloudAddon + addon + "/src/main/resources/info.json");
|
||||||
if (!infoFile.exists()) throw new CommonException("插件不存在");
|
if (!infoFile.exists()) throw new CommonException("插件不存在");
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
package com.niu.core.service.admin.addon.impl;
|
package com.niu.core.service.admin.addon.impl;
|
||||||
|
|
||||||
|
import cn.hutool.core.util.ObjectUtil;
|
||||||
import cn.hutool.json.JSONObject;
|
import cn.hutool.json.JSONObject;
|
||||||
import cn.hutool.json.JSONUtil;
|
import cn.hutool.json.JSONUtil;
|
||||||
import com.niu.core.common.component.context.WebAppEnvs;
|
import com.niu.core.common.component.context.WebAppEnvs;
|
||||||
@ -19,6 +20,7 @@ import com.niu.core.service.core.addon.ICoreAddonService;
|
|||||||
import com.niu.core.service.core.addon.vo.InstallAddonListVo;
|
import com.niu.core.service.core.addon.vo.InstallAddonListVo;
|
||||||
import org.apache.commons.io.FileUtils;
|
import org.apache.commons.io.FileUtils;
|
||||||
import org.apache.commons.io.filefilter.*;
|
import org.apache.commons.io.filefilter.*;
|
||||||
|
import org.apache.commons.lang.ObjectUtils;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import jakarta.annotation.Resource;
|
import jakarta.annotation.Resource;
|
||||||
@ -70,6 +72,10 @@ public class AddonDevelopServiceImpl implements IAddonDevelopService {
|
|||||||
list.add(addonDevelopListVo);
|
list.add(addonDevelopListVo);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (ObjectUtil.isNotEmpty(searchParam.getSearch()) && list.size() > 0) {
|
||||||
|
list = list.stream().filter(addonDevelopListVo -> addonDevelopListVo.getTitle().contains(searchParam.getSearch())).toList();
|
||||||
|
}
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -123,7 +123,7 @@ public class LoginServiceImpl implements ILoginService {
|
|||||||
loginModel.setExtra("headImg", userInfo.getHeadImg());
|
loginModel.setExtra("headImg", userInfo.getHeadImg());
|
||||||
loginModel.setExtra("realName", userInfo.getRealName());
|
loginModel.setExtra("realName", userInfo.getRealName());
|
||||||
// 执行登录
|
// 执行登录
|
||||||
StpUtil.login(userInfo.getUid(), loginModel);
|
StpUtil.login("user-" + userInfo.getUid(), loginModel);
|
||||||
// 获取返回内容
|
// 获取返回内容
|
||||||
SaTokenInfo saTokenInfo = StpUtil.getTokenInfo();
|
SaTokenInfo saTokenInfo = StpUtil.getTokenInfo();
|
||||||
LoginResultVo resultVo=new LoginResultVo();
|
LoginResultVo resultVo=new LoginResultVo();
|
||||||
|
|||||||
@ -6,22 +6,24 @@ import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
|||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.github.yulichang.query.MPJQueryWrapper;
|
import com.github.yulichang.query.MPJQueryWrapper;
|
||||||
import com.niu.core.common.domain.PageResult;
|
|
||||||
import com.niu.core.common.domain.PageParam;
|
import com.niu.core.common.domain.PageParam;
|
||||||
|
import com.niu.core.common.domain.PageResult;
|
||||||
import com.niu.core.common.utils.RequestUtils;
|
import com.niu.core.common.utils.RequestUtils;
|
||||||
|
import com.niu.core.entity.member.Member;
|
||||||
import com.niu.core.entity.member.MemberLabel;
|
import com.niu.core.entity.member.MemberLabel;
|
||||||
import com.niu.core.mapper.member.MemberLabelMapper;
|
import com.niu.core.mapper.member.MemberLabelMapper;
|
||||||
import com.niu.core.service.admin.member.param.MemberLabelEditParam;
|
import com.niu.core.mapper.member.MemberMapper;
|
||||||
import com.niu.core.service.admin.member.param.MemberLabelParam;
|
|
||||||
import com.niu.core.service.admin.member.param.MemberLabelSearchParam;
|
|
||||||
import com.niu.core.service.admin.member.IMemberLabelService;
|
import com.niu.core.service.admin.member.IMemberLabelService;
|
||||||
|
import com.niu.core.service.admin.member.param.MemberLabelEditParam;
|
||||||
|
import com.niu.core.service.admin.member.param.MemberLabelSearchParam;
|
||||||
import com.niu.core.service.admin.member.vo.MemberLabelAllListVo;
|
import com.niu.core.service.admin.member.vo.MemberLabelAllListVo;
|
||||||
import com.niu.core.service.admin.member.vo.MemberLabelInfoVo;
|
import com.niu.core.service.admin.member.vo.MemberLabelInfoVo;
|
||||||
import com.niu.core.service.admin.member.vo.MemberLabelListVo;
|
import com.niu.core.service.admin.member.vo.MemberLabelListVo;
|
||||||
|
import jakarta.annotation.Resource;
|
||||||
import org.springframework.beans.BeanUtils;
|
import org.springframework.beans.BeanUtils;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.util.Assert;
|
import org.springframework.util.Assert;
|
||||||
import jakarta.annotation.Resource;
|
|
||||||
import java.util.LinkedList;
|
import java.util.LinkedList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@ -31,10 +33,14 @@ import java.util.List;
|
|||||||
*/
|
*/
|
||||||
@Service
|
@Service
|
||||||
public class MemberLabelServiceImpl implements IMemberLabelService {
|
public class MemberLabelServiceImpl implements IMemberLabelService {
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
MemberLabelMapper memberLabelMapper;
|
MemberLabelMapper memberLabelMapper;
|
||||||
|
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
MemberMapper memberMapper;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 会员标签列表
|
* 会员标签列表
|
||||||
* @param pageParam 分页参数
|
* @param pageParam 分页参数
|
||||||
@ -51,13 +57,20 @@ public class MemberLabelServiceImpl implements IMemberLabelService {
|
|||||||
QueryWrapper<MemberLabel> queryWrapper = new QueryWrapper<>();
|
QueryWrapper<MemberLabel> queryWrapper = new QueryWrapper<>();
|
||||||
queryWrapper.eq("site_id", siteId);
|
queryWrapper.eq("site_id", siteId);
|
||||||
queryWrapper.orderByDesc("label_id");
|
queryWrapper.orderByDesc("label_id");
|
||||||
if (ObjectUtil.isNotEmpty(searchParam.getLabelName())) queryWrapper.like("label_name", searchParam.getLabelName());
|
if (ObjectUtil.isNotEmpty(searchParam.getLabelName())){
|
||||||
|
queryWrapper.like("label_name", searchParam.getLabelName());
|
||||||
|
}
|
||||||
IPage<MemberLabel> iPage = memberLabelMapper.selectPage(new Page<>(page, limit), queryWrapper);
|
IPage<MemberLabel> iPage = memberLabelMapper.selectPage(new Page<>(page, limit), queryWrapper);
|
||||||
List<MemberLabelListVo> list = new LinkedList<>();
|
List<MemberLabelListVo> list = new LinkedList<>();
|
||||||
for (MemberLabel item : iPage.getRecords()) {
|
for (MemberLabel item : iPage.getRecords()) {
|
||||||
MemberLabelListVo vo = new MemberLabelListVo();
|
MemberLabelListVo vo = new MemberLabelListVo();
|
||||||
|
Integer labelId = item.getLabelId();
|
||||||
|
QueryWrapper<Member> wrapper = new QueryWrapper<>();
|
||||||
|
wrapper.eq("site_id",siteId);
|
||||||
|
wrapper.apply("JSON_CONTAINS(member_label, {0})", String.valueOf(labelId));
|
||||||
|
List<Member> members = memberMapper.selectList(wrapper);
|
||||||
BeanUtils.copyProperties(item, vo);
|
BeanUtils.copyProperties(item, vo);
|
||||||
|
vo.setMemberNum(members.size());
|
||||||
list.add(vo);
|
list.add(vo);
|
||||||
}
|
}
|
||||||
return PageResult.build(page, limit, iPage.getTotal()).setData(list);
|
return PageResult.build(page, limit, iPage.getTotal()).setData(list);
|
||||||
|
|||||||
@ -127,7 +127,7 @@ public class MemberServiceImpl implements IMemberService {
|
|||||||
if (ObjectUtil.isNotEmpty(levelIds)) {
|
if (ObjectUtil.isNotEmpty(levelIds)) {
|
||||||
levelMap = memberLevelMapper.selectBatchIds(levelIds).stream().collect(Collectors.toMap(MemberLevel::getLevelId, e -> e));
|
levelMap = memberLevelMapper.selectBatchIds(levelIds).stream().collect(Collectors.toMap(MemberLevel::getLevelId, e -> e));
|
||||||
}
|
}
|
||||||
|
|
||||||
List<MemberListVo> list = new LinkedList<>();
|
List<MemberListVo> list = new LinkedList<>();
|
||||||
for (Member item : memberList) {
|
for (Member item : memberList) {
|
||||||
MemberListVo vo = new MemberListVo();
|
MemberListVo vo = new MemberListVo();
|
||||||
@ -240,7 +240,7 @@ public class MemberServiceImpl implements IMemberService {
|
|||||||
model.setRegisterType(MemberRegisterTypeEnum.MANUAL.getType());
|
model.setRegisterType(MemberRegisterTypeEnum.MANUAL.getType());
|
||||||
model.setRegisterChannel(MemberRegisterChannelEnum.MANUAL.getType());
|
model.setRegisterChannel(MemberRegisterChannelEnum.MANUAL.getType());
|
||||||
model.setCreateTime(System.currentTimeMillis() / 1000);
|
model.setCreateTime(System.currentTimeMillis() / 1000);
|
||||||
|
model.setMemberLabel("[]");
|
||||||
memberMapper.insert(model);
|
memberMapper.insert(model);
|
||||||
// 会员注册事件
|
// 会员注册事件
|
||||||
MemberRegisterEvent registerEvent = new MemberRegisterEvent();
|
MemberRegisterEvent registerEvent = new MemberRegisterEvent();
|
||||||
@ -292,7 +292,13 @@ public class MemberServiceImpl implements IMemberService {
|
|||||||
model.setHeadimg(String.valueOf(editParam.getValue()));
|
model.setHeadimg(String.valueOf(editParam.getValue()));
|
||||||
break;
|
break;
|
||||||
case "member_label":
|
case "member_label":
|
||||||
model.setMemberLabel(String.valueOf(editParam.getValue()));
|
// model.setMemberLabel(String.valueOf(editParam.getValue()));
|
||||||
|
String value = String.valueOf(editParam.getValue());
|
||||||
|
if ("".equals(value.trim())) {
|
||||||
|
model.setMemberLabel("[]");
|
||||||
|
} else {
|
||||||
|
model.setMemberLabel(value);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case "member_level":
|
case "member_level":
|
||||||
model.setMemberLevel(Integer.parseInt(String.valueOf(editParam.getValue())));
|
model.setMemberLevel(Integer.parseInt(String.valueOf(editParam.getValue())));
|
||||||
|
|||||||
@ -6,23 +6,25 @@ import cn.hutool.json.JSONUtil;
|
|||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.github.yulichang.query.MPJQueryWrapper;
|
import com.github.yulichang.query.MPJQueryWrapper;
|
||||||
import com.niu.core.common.domain.PageResult;
|
import com.niu.core.common.config.GlobalConfig;
|
||||||
import com.niu.core.common.domain.PageParam;
|
import com.niu.core.common.domain.PageParam;
|
||||||
|
import com.niu.core.common.domain.PageResult;
|
||||||
import com.niu.core.common.utils.RequestUtils;
|
import com.niu.core.common.utils.RequestUtils;
|
||||||
import com.niu.core.common.utils.mapper.QueryMapperUtils;
|
import com.niu.core.common.utils.mapper.QueryMapperUtils;
|
||||||
import com.niu.core.common.config.GlobalConfig;
|
|
||||||
import com.niu.core.entity.member.MemberSign;
|
import com.niu.core.entity.member.MemberSign;
|
||||||
import com.niu.core.mapper.member.MemberSignMapper;
|
import com.niu.core.mapper.member.MemberSignMapper;
|
||||||
import com.niu.core.service.admin.member.param.MemberSignSearchParam;
|
|
||||||
import com.niu.core.service.admin.member.IMemberSignService;
|
import com.niu.core.service.admin.member.IMemberSignService;
|
||||||
|
import com.niu.core.service.admin.member.param.MemberSignSearchParam;
|
||||||
import com.niu.core.service.admin.member.param.SignConfigParam;
|
import com.niu.core.service.admin.member.param.SignConfigParam;
|
||||||
import com.niu.core.service.admin.member.vo.*;
|
import com.niu.core.service.admin.member.vo.MemberBriefInfoVo;
|
||||||
|
import com.niu.core.service.admin.member.vo.MemberSignListVo;
|
||||||
|
import com.niu.core.service.admin.member.vo.SignConfigVo;
|
||||||
import com.niu.core.service.core.member.ICoreMemberService;
|
import com.niu.core.service.core.member.ICoreMemberService;
|
||||||
import com.niu.core.service.core.sys.ICoreConfigService;
|
import com.niu.core.service.core.sys.ICoreConfigService;
|
||||||
|
import jakarta.annotation.Resource;
|
||||||
import org.springframework.beans.BeanUtils;
|
import org.springframework.beans.BeanUtils;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import jakarta.annotation.Resource;
|
|
||||||
import java.util.LinkedList;
|
import java.util.LinkedList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@ -32,7 +34,7 @@ import java.util.List;
|
|||||||
*/
|
*/
|
||||||
@Service
|
@Service
|
||||||
public class MemberSignServiceImpl implements IMemberSignService {
|
public class MemberSignServiceImpl implements IMemberSignService {
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
MemberSignMapper memberSignMapper;
|
MemberSignMapper memberSignMapper;
|
||||||
|
|
||||||
@ -60,8 +62,14 @@ public class MemberSignServiceImpl implements IMemberSignService {
|
|||||||
queryWrapper.eq("ms.site_id", siteId);
|
queryWrapper.eq("ms.site_id", siteId);
|
||||||
queryWrapper.orderByDesc("ms.sign_id");
|
queryWrapper.orderByDesc("ms.sign_id");
|
||||||
|
|
||||||
if (ObjectUtil.isNotEmpty(searchParam.getKeywords())) queryWrapper.like("m.member_no|m.username|m.nickname|m.mobile", searchParam.getKeywords());
|
if (ObjectUtil.isNotEmpty(searchParam.getKeywords())){
|
||||||
if (ObjectUtil.isNotEmpty(searchParam.getCreateTime())) QueryMapperUtils.buildByTime(queryWrapper, "ms.create_time", searchParam.getCreateTime());
|
// queryWrapper.like("m.member_no|m.username|m.nickname|m.mobile", searchParam.getKeywords());
|
||||||
|
QueryMapperUtils.addMultiLike(queryWrapper, searchParam.getKeywords(),
|
||||||
|
"m.member_no", "m.username", "m.nickname", "m.mobile");
|
||||||
|
}
|
||||||
|
if (ObjectUtil.isNotEmpty(searchParam.getCreateTime())) {
|
||||||
|
QueryMapperUtils.buildByTime(queryWrapper, "ms.create_time", searchParam.getCreateTime());
|
||||||
|
}
|
||||||
|
|
||||||
IPage<MemberSign> iPage = memberSignMapper.selectPage(new Page<>(page, limit), queryWrapper);
|
IPage<MemberSign> iPage = memberSignMapper.selectPage(new Page<>(page, limit), queryWrapper);
|
||||||
List<MemberSignListVo> list = new LinkedList<>();
|
List<MemberSignListVo> list = new LinkedList<>();
|
||||||
@ -69,9 +77,12 @@ public class MemberSignServiceImpl implements IMemberSignService {
|
|||||||
MemberSignListVo vo = new MemberSignListVo();
|
MemberSignListVo vo = new MemberSignListVo();
|
||||||
BeanUtils.copyProperties(item, vo);
|
BeanUtils.copyProperties(item, vo);
|
||||||
|
|
||||||
if (!item.getDayAward().isEmpty()) vo.setDayAward(coreMemberService.getGiftContent(item.getSiteId(), JSONUtil.parseObj(item.getDayAward()), "admin"));
|
if (!item.getDayAward().isEmpty()) {
|
||||||
if (!item.getContinueAward().isEmpty()) vo.setContinueAward(coreMemberService.getGiftContent(item.getSiteId(), JSONUtil.parseObj(item.getContinueAward()), "admin"));
|
vo.setDayAward(coreMemberService.getGiftContent(item.getSiteId(), JSONUtil.parseObj(item.getDayAward()), "admin"));
|
||||||
|
}
|
||||||
|
if (!item.getContinueAward().isEmpty()) {
|
||||||
|
vo.setContinueAward(coreMemberService.getGiftContent(item.getSiteId(), JSONUtil.parseObj(item.getContinueAward()), "admin"));
|
||||||
|
}
|
||||||
MemberBriefInfoVo memberInfoVo = new MemberBriefInfoVo();
|
MemberBriefInfoVo memberInfoVo = new MemberBriefInfoVo();
|
||||||
BeanUtils.copyProperties(item, memberInfoVo);
|
BeanUtils.copyProperties(item, memberInfoVo);
|
||||||
|
|
||||||
|
|||||||
@ -17,6 +17,8 @@ public class MemberLabelListVo implements Serializable {
|
|||||||
private Integer labelId; // 标签id
|
private Integer labelId; // 标签id
|
||||||
private Integer siteId; // 站点id
|
private Integer siteId; // 站点id
|
||||||
private String labelName; // 标签名称
|
private String labelName; // 标签名称
|
||||||
|
//会员数量
|
||||||
|
private Integer memberNum;
|
||||||
private String memo; // 备注
|
private String memo; // 备注
|
||||||
private Integer sort; // 排序
|
private Integer sort; // 排序
|
||||||
@JsonSerialize(using = BeanJsonSerializer.LongDateToStringSerializer.class)
|
@JsonSerialize(using = BeanJsonSerializer.LongDateToStringSerializer.class)
|
||||||
|
|||||||
@ -60,7 +60,6 @@ public class SysUserLogServiceImpl extends ServiceImpl<SysUserLogMapper, SysUser
|
|||||||
if(ObjectUtil.isNotNull(searchParam.getUrl()) && ObjectUtil.isNotEmpty(searchParam.getUrl())){
|
if(ObjectUtil.isNotNull(searchParam.getUrl()) && ObjectUtil.isNotEmpty(searchParam.getUrl())){
|
||||||
queryWrapper.like("url", searchParam.getUrl());
|
queryWrapper.like("url", searchParam.getUrl());
|
||||||
}
|
}
|
||||||
|
|
||||||
IPage<SysUserLog> iPage = sysUserLogMapper.selectPage(new Page<SysUserLog>(page, limit), queryWrapper);
|
IPage<SysUserLog> iPage = sysUserLogMapper.selectPage(new Page<SysUserLog>(page, limit), queryWrapper);
|
||||||
|
|
||||||
List<SysUserLogListVo> list = new LinkedList<>();
|
List<SysUserLogListVo> list = new LinkedList<>();
|
||||||
|
|||||||
@ -167,7 +167,7 @@ public class SysUserServiceImpl implements ISysUserService {
|
|||||||
@Override
|
@Override
|
||||||
public Integer add(SysUserParam addParam) {
|
public Integer add(SysUserParam addParam) {
|
||||||
if(checkUserName(addParam.getUsername())){
|
if(checkUserName(addParam.getUsername())){
|
||||||
throw new AdminException("USERNAME_REPEAT");
|
throw new AdminException("该用户名已被占用,请更换");
|
||||||
}
|
}
|
||||||
SysUser sysUser = new SysUser();
|
SysUser sysUser = new SysUser();
|
||||||
BeanUtils.copyProperties(addParam, sysUser);
|
BeanUtils.copyProperties(addParam, sysUser);
|
||||||
@ -306,7 +306,7 @@ public class SysUserServiceImpl implements ISysUserService {
|
|||||||
}else{
|
}else{
|
||||||
SysUserParam sysUserParam=new SysUserParam();
|
SysUserParam sysUserParam=new SysUserParam();
|
||||||
sysUserParam.setHeadImg(siteUserParam.getHeadImg());
|
sysUserParam.setHeadImg(siteUserParam.getHeadImg());
|
||||||
sysUserParam.setPassword(PasswordEncipher.encode(siteUserParam.getPassword()));
|
sysUserParam.setPassword(siteUserParam.getPassword());
|
||||||
sysUserParam.setLastIp("");
|
sysUserParam.setLastIp("");
|
||||||
sysUserParam.setLoginCount(0);
|
sysUserParam.setLoginCount(0);
|
||||||
sysUserParam.setUsername(siteUserParam.getUsername());
|
sysUserParam.setUsername(siteUserParam.getUsername());
|
||||||
|
|||||||
@ -30,4 +30,8 @@ public class SysUserAddParam implements Serializable {
|
|||||||
/**套餐id */
|
/**套餐id */
|
||||||
private List<Integer> groupIds;
|
private List<Integer> groupIds;
|
||||||
|
|
||||||
|
private String headImg;
|
||||||
|
|
||||||
|
private String realName;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -120,7 +120,7 @@ public class LoginServiceImpl implements ILoginService {
|
|||||||
loginModel.setExtra("username", member.getUsername());
|
loginModel.setExtra("username", member.getUsername());
|
||||||
loginModel.setExtra("siteId", member.getSiteId());
|
loginModel.setExtra("siteId", member.getSiteId());
|
||||||
// 执行登录
|
// 执行登录
|
||||||
StpUtil.login(member.getMemberId(), loginModel);
|
StpUtil.login("member-" + member.getMemberId(), loginModel);
|
||||||
// 获取返回内容
|
// 获取返回内容
|
||||||
SaTokenInfo saTokenInfo = StpUtil.getTokenInfo();
|
SaTokenInfo saTokenInfo = StpUtil.getTokenInfo();
|
||||||
|
|
||||||
@ -134,6 +134,7 @@ public class LoginServiceImpl implements ILoginService {
|
|||||||
loginEvent.setSiteId(RequestUtils.siteId());
|
loginEvent.setSiteId(RequestUtils.siteId());
|
||||||
loginEvent.addAppSign("core");
|
loginEvent.addAppSign("core");
|
||||||
loginEvent.setName("MemberLoginEvent");
|
loginEvent.setName("MemberLoginEvent");
|
||||||
|
loginEvent.setMember(member);
|
||||||
EventPublisher.publishEvent(loginEvent);
|
EventPublisher.publishEvent(loginEvent);
|
||||||
|
|
||||||
return vo;
|
return vo;
|
||||||
|
|||||||
@ -188,8 +188,8 @@ public class MemberSignServiceImpl implements IMemberSignService {
|
|||||||
continueAward.remove("receive_num");
|
continueAward.remove("receive_num");
|
||||||
|
|
||||||
Map<String, Object> continueAwardVar = new HashMap<>();
|
Map<String, Object> continueAwardVar = new HashMap<>();
|
||||||
dayAwardVar.put("from_type", "continue_sign_award");
|
continueAwardVar.put("from_type", "continue_sign_award");
|
||||||
dayAwardVar.put("memo", "连签奖励");
|
continueAwardVar.put("memo", "连签奖励");
|
||||||
coreMemberService.memberGiftGrant(param.siteId(), param.memberId(), continueAward, continueAwardVar);
|
coreMemberService.memberGiftGrant(param.siteId(), param.memberId(), continueAward, continueAwardVar);
|
||||||
|
|
||||||
model.setContinueAward(continueAward.toString());
|
model.setContinueAward(continueAward.toString());
|
||||||
|
|||||||
@ -1,11 +1,13 @@
|
|||||||
package com.niu.core.service.api.pay.vo;
|
package com.niu.core.service.api.pay.vo;
|
||||||
|
|
||||||
|
import cn.hutool.core.util.ObjectUtil;
|
||||||
import cn.hutool.json.JSONObject;
|
import cn.hutool.json.JSONObject;
|
||||||
import com.niu.core.entity.member.Member;
|
import com.niu.core.entity.member.Member;
|
||||||
import com.niu.core.service.core.pay.vo.PayTypeVo;
|
import com.niu.core.service.core.pay.vo.PayTypeVo;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
|
import java.util.LinkedList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
@ -36,4 +38,9 @@ public class FriendspayInfoVo {
|
|||||||
private Object tradeInfo;
|
private Object tradeInfo;
|
||||||
private JSONObject config;
|
private JSONObject config;
|
||||||
private List<PayTypeVo> payTypeList;
|
private List<PayTypeVo> payTypeList;
|
||||||
|
|
||||||
|
public Object getTradeInfo() {
|
||||||
|
if (ObjectUtil.isNotEmpty(tradeInfo)) return tradeInfo;
|
||||||
|
return new LinkedList<>();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
package com.niu.core.service.api.sys.tools;
|
package com.niu.core.service.api.sys.tools;
|
||||||
|
|
||||||
|
import cn.hutool.core.util.ObjectUtil;
|
||||||
import cn.hutool.crypto.digest.MD5;
|
import cn.hutool.crypto.digest.MD5;
|
||||||
import cn.hutool.json.JSONObject;
|
import cn.hutool.json.JSONObject;
|
||||||
import cn.hutool.json.JSONUtil;
|
import cn.hutool.json.JSONUtil;
|
||||||
@ -103,11 +104,20 @@ public class TencentGeocoder {
|
|||||||
String province = addressComponent.getStr("province");
|
String province = addressComponent.getStr("province");
|
||||||
String city = addressComponent.getStr("city");
|
String city = addressComponent.getStr("city");
|
||||||
String district = addressComponent.getStr("district");
|
String district = addressComponent.getStr("district");
|
||||||
|
String community = "";
|
||||||
|
if (ObjectUtil.isNotEmpty(resultObject.getByPath("landmark_l2.title", String.class))) {
|
||||||
|
community = resultObject.getByPath("landmark_l2.title", String.class);
|
||||||
|
} else if (ObjectUtil.isNotEmpty(resultObject.getByPath("landmark_l1.title", String.class))) {
|
||||||
|
community = resultObject.getByPath("landmark_l1.title", String.class);
|
||||||
|
} else if (ObjectUtil.isNotEmpty(resultObject.getByPath("town.title", String.class))) {
|
||||||
|
community = resultObject.getByPath("town.title", String.class);
|
||||||
|
}
|
||||||
jsonObjectResult.putOpt("province", province);
|
jsonObjectResult.putOpt("province", province);
|
||||||
jsonObjectResult.putOpt("city", city);
|
jsonObjectResult.putOpt("city", city);
|
||||||
jsonObjectResult.putOpt("district", district);
|
jsonObjectResult.putOpt("district", district);
|
||||||
jsonObjectResult.putOpt("full_address", fullAddress);
|
jsonObjectResult.putOpt("full_address", fullAddress);
|
||||||
jsonObjectResult.putOpt("formatted_addresses", formattedAddresses);
|
jsonObjectResult.putOpt("formatted_addresses", formattedAddresses);
|
||||||
|
jsonObjectResult.putOpt("community", community);
|
||||||
return jsonObjectResult;
|
return jsonObjectResult;
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
|
|||||||
@ -45,4 +45,10 @@ public interface IWeappService {
|
|||||||
*/
|
*/
|
||||||
IsTradeManagedVo getIsTradeManaged();
|
IsTradeManagedVo getIsTradeManaged();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过外部交易号获取消息跳转路径
|
||||||
|
* @param outTradeNo
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
Object getMsgJumpPath(String outTradeNo);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -11,8 +11,12 @@ import com.niu.core.common.exception.CommonException;
|
|||||||
import com.niu.core.common.utils.RequestUtils;
|
import com.niu.core.common.utils.RequestUtils;
|
||||||
import com.niu.core.common.utils.WechatUtils;
|
import com.niu.core.common.utils.WechatUtils;
|
||||||
import com.niu.core.entity.member.Member;
|
import com.niu.core.entity.member.Member;
|
||||||
|
import com.niu.core.entity.pay.Pay;
|
||||||
import com.niu.core.entity.sys.SysNotice;
|
import com.niu.core.entity.sys.SysNotice;
|
||||||
|
import com.niu.core.event.order.WapOrderDetailPathDefiner;
|
||||||
|
import com.niu.core.event.pay.PayTradeInfoDefiner;
|
||||||
import com.niu.core.mapper.member.MemberMapper;
|
import com.niu.core.mapper.member.MemberMapper;
|
||||||
|
import com.niu.core.mapper.pay.PayMapper;
|
||||||
import com.niu.core.mapper.sys.SysNoticeMapper;
|
import com.niu.core.mapper.sys.SysNoticeMapper;
|
||||||
import com.niu.core.service.admin.member.vo.LoginConfigVo;
|
import com.niu.core.service.admin.member.vo.LoginConfigVo;
|
||||||
import com.niu.core.service.api.login.ILoginService;
|
import com.niu.core.service.api.login.ILoginService;
|
||||||
@ -26,6 +30,7 @@ import com.niu.core.service.api.wechat.param.WechatAuthParam;
|
|||||||
import com.niu.core.service.api.wechat.param.WechatSyncParam;
|
import com.niu.core.service.api.wechat.param.WechatSyncParam;
|
||||||
import com.niu.core.service.api.wechat.vo.WechatCodeUrlVo;
|
import com.niu.core.service.api.wechat.vo.WechatCodeUrlVo;
|
||||||
import com.niu.core.service.api.wechat.vo.WechatScanLoginVo;
|
import com.niu.core.service.api.wechat.vo.WechatScanLoginVo;
|
||||||
|
import com.niu.core.service.core.app.helper.EventAndSubscribeOfPublisher;
|
||||||
import com.niu.core.service.core.member.ICoreMemberConfigService;
|
import com.niu.core.service.core.member.ICoreMemberConfigService;
|
||||||
import com.niu.core.service.core.sys.ICoreScanService;
|
import com.niu.core.service.core.sys.ICoreScanService;
|
||||||
import com.niu.core.service.core.weapp.ICoreWeappDeliveryService;
|
import com.niu.core.service.core.weapp.ICoreWeappDeliveryService;
|
||||||
@ -67,6 +72,9 @@ public class WeappServiceImpl implements IWeappService {
|
|||||||
@Resource
|
@Resource
|
||||||
ICoreWeappDeliveryService coreWeappDeliveryService;
|
ICoreWeappDeliveryService coreWeappDeliveryService;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
PayMapper payMapper;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 小程序登录
|
* 小程序登录
|
||||||
* @param param
|
* @param param
|
||||||
@ -78,12 +86,14 @@ public class WeappServiceImpl implements IWeappService {
|
|||||||
|
|
||||||
Member member = memberMapper.selectOne(new QueryWrapper<Member>().eq("weapp_openid", wxUser.getOpenid()).eq("site_id", RequestUtils.siteId()));
|
Member member = memberMapper.selectOne(new QueryWrapper<Member>().eq("weapp_openid", wxUser.getOpenid()).eq("site_id", RequestUtils.siteId()));
|
||||||
if (ObjectUtil.isNotNull(member)) {
|
if (ObjectUtil.isNotNull(member)) {
|
||||||
return loginService.login(member);
|
LoginVo vo = loginService.login(member);
|
||||||
|
return vo;
|
||||||
}
|
}
|
||||||
if (ObjectUtil.isNotEmpty(wxUser.getUnionid())) {
|
if (ObjectUtil.isNotEmpty(wxUser.getUnionid())) {
|
||||||
Member unionidMember = memberMapper.selectOne(new QueryWrapper<Member>().eq("wx_unionid", wxUser.getUnionid()).eq("site_id", RequestUtils.siteId()));
|
Member unionidMember = memberMapper.selectOne(new QueryWrapper<Member>().eq("wx_unionid", wxUser.getUnionid()).eq("site_id", RequestUtils.siteId()));
|
||||||
if (ObjectUtil.isNotNull(unionidMember)) {
|
if (ObjectUtil.isNotNull(unionidMember)) {
|
||||||
return loginService.login(unionidMember);
|
LoginVo vo = loginService.login(unionidMember);
|
||||||
|
return vo;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -217,4 +227,23 @@ public class WeappServiceImpl implements IWeappService {
|
|||||||
public IsTradeManagedVo getIsTradeManaged() {
|
public IsTradeManagedVo getIsTradeManaged() {
|
||||||
return coreWeappDeliveryService.getIsTradeManaged(RequestUtils.siteId());
|
return coreWeappDeliveryService.getIsTradeManaged(RequestUtils.siteId());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过外部交易号获取消息跳转路径
|
||||||
|
* @param outTradeNo
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Object getMsgJumpPath(String outTradeNo) {
|
||||||
|
Pay pay = payMapper.selectOne(new QueryWrapper<Pay>().eq("out_trade_no", outTradeNo));
|
||||||
|
if (pay == null) return null;
|
||||||
|
|
||||||
|
WapOrderDetailPathDefiner.WapOrderDetailPathEvent event = new WapOrderDetailPathDefiner.WapOrderDetailPathEvent(pay);
|
||||||
|
List<WapOrderDetailPathDefiner.WapOrderDetailPathResult> eventData = EventAndSubscribeOfPublisher.publishAndCallback(event);
|
||||||
|
|
||||||
|
if (ObjectUtil.isNotEmpty(eventData)) {
|
||||||
|
return eventData.get(0);
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -255,7 +255,7 @@ public class AddonInstallJavaTools {
|
|||||||
if (runAddonJsonArray == null || runAddonJsonArray.size() <= 0) {
|
if (runAddonJsonArray == null || runAddonJsonArray.size() <= 0) {
|
||||||
return runAddonJsonArray;
|
return runAddonJsonArray;
|
||||||
}
|
}
|
||||||
int index = 0;
|
int index = -1;
|
||||||
for (int i = 0; i < runAddonJsonArray.size(); i++) {
|
for (int i = 0; i < runAddonJsonArray.size(); i++) {
|
||||||
JSONObject jsonObject = runAddonJsonArray.getJSONObject(i);
|
JSONObject jsonObject = runAddonJsonArray.getJSONObject(i);
|
||||||
String name = jsonObject.getStr("name");
|
String name = jsonObject.getStr("name");
|
||||||
@ -263,7 +263,7 @@ public class AddonInstallJavaTools {
|
|||||||
index = i;
|
index = i;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
runAddonJsonArray.remove(index);
|
if (index != -1) runAddonJsonArray.remove(index);
|
||||||
return runAddonJsonArray;
|
return runAddonJsonArray;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -269,7 +269,14 @@ public class CorePayServiceImpl implements ICorePayService {
|
|||||||
* @param pay
|
* @param pay
|
||||||
* @param param
|
* @param param
|
||||||
*/
|
*/
|
||||||
|
@Transactional
|
||||||
public void paySuccess(Pay pay, PayNotifyParam param) {
|
public void paySuccess(Pay pay, PayNotifyParam param) {
|
||||||
|
BeanUtil.copyProperties(param, pay);
|
||||||
|
pay.setStatus(PayStatusEnum.STATUS_FINISH.getCode());
|
||||||
|
pay.setPayTime(System.currentTimeMillis() / 1000);
|
||||||
|
|
||||||
|
payMapper.updateById(pay);
|
||||||
|
|
||||||
PaySuccessEvent event = new PaySuccessEvent();
|
PaySuccessEvent event = new PaySuccessEvent();
|
||||||
event.setSiteId(param.getSiteId());
|
event.setSiteId(param.getSiteId());
|
||||||
event.addAppSign("core");
|
event.addAppSign("core");
|
||||||
@ -279,12 +286,6 @@ public class CorePayServiceImpl implements ICorePayService {
|
|||||||
event.setPay(pay);
|
event.setPay(pay);
|
||||||
EventAndSubscribeOfPublisher.publishAll(event);
|
EventAndSubscribeOfPublisher.publishAll(event);
|
||||||
|
|
||||||
BeanUtil.copyProperties(param, pay);
|
|
||||||
pay.setStatus(PayStatusEnum.STATUS_FINISH.getCode());
|
|
||||||
pay.setPayTime(System.currentTimeMillis() / 1000);
|
|
||||||
|
|
||||||
payMapper.updateById(pay);
|
|
||||||
|
|
||||||
SysPrinterPrintTicketParam printParam = new SysPrinterPrintTicketParam();
|
SysPrinterPrintTicketParam printParam = new SysPrinterPrintTicketParam();
|
||||||
printParam.setSiteId(pay.getSiteId());
|
printParam.setSiteId(pay.getSiteId());
|
||||||
printParam.setType("shopGoodsOrder");
|
printParam.setType("shopGoodsOrder");
|
||||||
@ -300,7 +301,12 @@ public class CorePayServiceImpl implements ICorePayService {
|
|||||||
*
|
*
|
||||||
* @param pay
|
* @param pay
|
||||||
*/
|
*/
|
||||||
|
@Transactional
|
||||||
public void payClose(Integer siteId, Pay pay) {
|
public void payClose(Integer siteId, Pay pay) {
|
||||||
|
pay.setStatus(PayStatusEnum.STATUS_CANCLE.getCode());
|
||||||
|
pay.setCancelTime(System.currentTimeMillis() / 1000);
|
||||||
|
payMapper.updateById(pay);
|
||||||
|
|
||||||
PayCloseEvent event = new PayCloseEvent();
|
PayCloseEvent event = new PayCloseEvent();
|
||||||
event.setSiteId(siteId);
|
event.setSiteId(siteId);
|
||||||
event.addAppSign("core");
|
event.addAppSign("core");
|
||||||
@ -308,10 +314,6 @@ public class CorePayServiceImpl implements ICorePayService {
|
|||||||
event.setTradeType(pay.getTradeType());
|
event.setTradeType(pay.getTradeType());
|
||||||
event.setTradeId(pay.getTradeId());
|
event.setTradeId(pay.getTradeId());
|
||||||
EventAndSubscribeOfPublisher.publishAll(event);
|
EventAndSubscribeOfPublisher.publishAll(event);
|
||||||
|
|
||||||
pay.setStatus(PayStatusEnum.STATUS_CANCLE.getCode());
|
|
||||||
pay.setCancelTime(System.currentTimeMillis() / 1000);
|
|
||||||
payMapper.updateById(pay);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
package com.niu.core.service.core.weapp;
|
package com.niu.core.service.core.weapp;
|
||||||
|
|
||||||
|
import cn.binarywang.wx.miniapp.bean.shop.response.WxMaOrderShippingInfoBaseResponse;
|
||||||
import com.niu.core.service.core.weapp.vo.IsTradeManagedVo;
|
import com.niu.core.service.core.weapp.vo.IsTradeManagedVo;
|
||||||
|
|
||||||
public interface ICoreWeappDeliveryService {
|
public interface ICoreWeappDeliveryService {
|
||||||
@ -10,4 +11,6 @@ public interface ICoreWeappDeliveryService {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
IsTradeManagedVo getIsTradeManaged(Integer siteId);
|
IsTradeManagedVo getIsTradeManaged(Integer siteId);
|
||||||
|
|
||||||
|
WxMaOrderShippingInfoBaseResponse setMsgJumpPath(Integer siteId, String type);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,16 +1,25 @@
|
|||||||
package com.niu.core.service.core.weapp.impl;
|
package com.niu.core.service.core.weapp.impl;
|
||||||
|
|
||||||
import cn.binarywang.wx.miniapp.api.WxMaService;
|
import cn.binarywang.wx.miniapp.api.WxMaService;
|
||||||
|
import cn.binarywang.wx.miniapp.bean.shop.response.WxMaOrderShippingInfoBaseResponse;
|
||||||
import cn.binarywang.wx.miniapp.bean.shop.response.WxMaOrderShippingIsTradeManagedResponse;
|
import cn.binarywang.wx.miniapp.bean.shop.response.WxMaOrderShippingIsTradeManagedResponse;
|
||||||
|
import cn.hutool.json.JSONObject;
|
||||||
import com.niu.core.common.utils.RequestUtils;
|
import com.niu.core.common.utils.RequestUtils;
|
||||||
import com.niu.core.common.utils.WechatUtils;
|
import com.niu.core.common.utils.WechatUtils;
|
||||||
|
import com.niu.core.service.core.sys.ICoreConfigService;
|
||||||
|
import com.niu.core.service.core.sys.ICoreSysConfigService;
|
||||||
import com.niu.core.service.core.weapp.ICoreWeappDeliveryService;
|
import com.niu.core.service.core.weapp.ICoreWeappDeliveryService;
|
||||||
import com.niu.core.service.core.weapp.vo.IsTradeManagedVo;
|
import com.niu.core.service.core.weapp.vo.IsTradeManagedVo;
|
||||||
|
import jakarta.annotation.Resource;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.util.ObjectUtils;
|
||||||
|
|
||||||
@Service
|
@Service
|
||||||
public class CoreWeappDeliveryServiceImpl implements ICoreWeappDeliveryService {
|
public class CoreWeappDeliveryServiceImpl implements ICoreWeappDeliveryService {
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
ICoreConfigService coreConfigService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询小程序是否已开通发货信息管理服务
|
* 查询小程序是否已开通发货信息管理服务
|
||||||
* @param siteId
|
* @param siteId
|
||||||
@ -23,9 +32,47 @@ public class CoreWeappDeliveryServiceImpl implements ICoreWeappDeliveryService {
|
|||||||
WxMaService miniapp = WechatUtils.miniapp(siteId);
|
WxMaService miniapp = WechatUtils.miniapp(siteId);
|
||||||
String appid = miniapp.getWxMaConfig().getAppid();
|
String appid = miniapp.getWxMaConfig().getAppid();
|
||||||
WxMaOrderShippingIsTradeManagedResponse res = miniapp.getWxMaOrderShippingService().isTradeManaged(appid);
|
WxMaOrderShippingIsTradeManagedResponse res = miniapp.getWxMaOrderShippingService().isTradeManaged(appid);
|
||||||
|
if (!res.getTradeManaged()) {
|
||||||
|
System.out.println("小程序未开通发货信息管理服务" + res.getErrMsg());
|
||||||
|
}
|
||||||
vo.setIsTradeManaged(res.getTradeManaged());
|
vo.setIsTradeManaged(res.getTradeManaged());
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
}
|
}
|
||||||
return vo;
|
return vo;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public WxMaOrderShippingInfoBaseResponse setMsgJumpPath(Integer siteId, String type) {
|
||||||
|
try {
|
||||||
|
JSONObject config = getConfig(siteId, type);
|
||||||
|
if (ObjectUtils.isEmpty(config)) {
|
||||||
|
String path = "app/pages/weapp/order_shipping";
|
||||||
|
WxMaOrderShippingInfoBaseResponse response = WechatUtils.miniapp(siteId).getWxMaOrderShippingService().setMsgJumpPath(path);
|
||||||
|
if (response.getErrCode() == 0) {
|
||||||
|
setConfig(siteId, type, path);
|
||||||
|
}
|
||||||
|
return response;
|
||||||
|
}
|
||||||
|
|
||||||
|
WxMaOrderShippingInfoBaseResponse response = new WxMaOrderShippingInfoBaseResponse();
|
||||||
|
response.setErrCode(0);
|
||||||
|
return response;
|
||||||
|
} catch (Exception e) {
|
||||||
|
WxMaOrderShippingInfoBaseResponse response = new WxMaOrderShippingInfoBaseResponse();
|
||||||
|
response.setErrCode(1);
|
||||||
|
response.setErrMsg(e.getMessage());
|
||||||
|
return response;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public JSONObject getConfig(Integer siteId, String type) {
|
||||||
|
return coreConfigService.getConfigValue(siteId, "WEAPP_ORDER_SHIPPING_CONFIG_" + type);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setConfig(Integer siteId, String type, String path) {
|
||||||
|
JSONObject value = new JSONObject();
|
||||||
|
value.put("path", path);
|
||||||
|
coreConfigService.setConfig(siteId, "WEAPP_ORDER_SHIPPING_CONFIG_" + type, value);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -37,7 +37,7 @@ public class ExternalJarsLoaderPlugin {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (mainExecutePath.startsWith("nested:/")) {
|
if (mainExecutePath.startsWith("nested:/") || mainExecutePath.startsWith("nested:\\")) {
|
||||||
mainExecutePath = mainExecutePath.substring(7);
|
mainExecutePath = mainExecutePath.substring(7);
|
||||||
}
|
}
|
||||||
return mainExecutePath;
|
return mainExecutePath;
|
||||||
|
|||||||
@ -11,7 +11,7 @@ spring:
|
|||||||
# 可配置:zh_CN、en_US
|
# 可配置:zh_CN、en_US
|
||||||
language: zh_CN
|
language: zh_CN
|
||||||
# 默认访问路径
|
# 默认访问路径
|
||||||
default-access-path: /admin
|
default-access-path: /admin/index.html
|
||||||
|
|
||||||
jackson:
|
jackson:
|
||||||
property-naming-strategy: SNAKE_CASE
|
property-naming-strategy: SNAKE_CASE
|
||||||
@ -24,7 +24,7 @@ spring:
|
|||||||
datasource:
|
datasource:
|
||||||
url: jdbc:mysql://127.0.0.1:3306/***?useUnicode=true&characterEncoding=utf8&useSSL=false&allowMultiQueries=true&serverTimezone=Asia/Shanghai
|
url: jdbc:mysql://127.0.0.1:3306/***?useUnicode=true&characterEncoding=utf8&useSSL=false&allowMultiQueries=true&serverTimezone=Asia/Shanghai
|
||||||
username: root
|
username: root
|
||||||
password:
|
password:
|
||||||
type: com.alibaba.druid.pool.DruidDataSource
|
type: com.alibaba.druid.pool.DruidDataSource
|
||||||
driverClassName: com.mysql.cj.jdbc.Driver
|
driverClassName: com.mysql.cj.jdbc.Driver
|
||||||
druid:
|
druid:
|
||||||
@ -47,31 +47,31 @@ spring:
|
|||||||
# 登录密码
|
# 登录密码
|
||||||
login-password: admin
|
login-password: admin
|
||||||
# redis配置
|
# redis配置
|
||||||
spring.data:
|
data:
|
||||||
redis:
|
redis:
|
||||||
# Redis数据库索引(默认为0)
|
# Redis数据库索引(默认为0)
|
||||||
database: 1
|
database: 1
|
||||||
# Redis服务器地址
|
# Redis服务器地址
|
||||||
host: 127.0.0.1
|
host: 127.0.0.1
|
||||||
# Redis服务器连接端口
|
# Redis服务器连接端口
|
||||||
port: 6379
|
port: 6379
|
||||||
# Redis服务器连接密码(默认为空)
|
# Redis服务器连接密码(默认为空)
|
||||||
password:
|
password:
|
||||||
# 连接超时时间
|
# 连接超时时间
|
||||||
timeout: 10s
|
timeout: 10s
|
||||||
lettuce:
|
lettuce:
|
||||||
pool:
|
pool:
|
||||||
# 连接池最大连接数
|
# 连接池最大连接数
|
||||||
max-active: 200
|
max-active: 200
|
||||||
# 连接池最大阻塞等待时间(使用负值表示没有限制)
|
# 连接池最大阻塞等待时间(使用负值表示没有限制)
|
||||||
max-wait: -1ms
|
max-wait: -1ms
|
||||||
# 连接池中的最大空闲连接
|
# 连接池中的最大空闲连接
|
||||||
max-idle: 10
|
max-idle: 10
|
||||||
# 连接池中的最小空闲连接
|
# 连接池中的最小空闲连接
|
||||||
min-idle: 0
|
min-idle: 0
|
||||||
# 缓存策略
|
# 缓存策略
|
||||||
cache:
|
cache:
|
||||||
type: redis
|
type: redis
|
||||||
|
|
||||||
|
|
||||||
# MyBatis分页插件
|
# MyBatis分页插件
|
||||||
@ -123,4 +123,4 @@ sa-token:
|
|||||||
# 是否输出操作日志
|
# 是否输出操作日志
|
||||||
is-log: true
|
is-log: true
|
||||||
# 登录是否往前端注入Cookie
|
# 登录是否往前端注入Cookie
|
||||||
is-read-cookie: false
|
is-read-cookie: false
|
||||||
|
|||||||
@ -24,7 +24,7 @@ spring:
|
|||||||
datasource:
|
datasource:
|
||||||
url: jdbc:mysql://127.0.0.1:3306/***?useUnicode=true&characterEncoding=utf8&useSSL=false&allowMultiQueries=true&serverTimezone=Asia/Shanghai
|
url: jdbc:mysql://127.0.0.1:3306/***?useUnicode=true&characterEncoding=utf8&useSSL=false&allowMultiQueries=true&serverTimezone=Asia/Shanghai
|
||||||
username: root
|
username: root
|
||||||
password:
|
password:
|
||||||
type: com.alibaba.druid.pool.DruidDataSource
|
type: com.alibaba.druid.pool.DruidDataSource
|
||||||
driverClassName: com.mysql.cj.jdbc.Driver
|
driverClassName: com.mysql.cj.jdbc.Driver
|
||||||
druid:
|
druid:
|
||||||
@ -47,27 +47,28 @@ spring:
|
|||||||
# 登录密码
|
# 登录密码
|
||||||
login-password: admin
|
login-password: admin
|
||||||
# redis配置
|
# redis配置
|
||||||
redis:
|
data:
|
||||||
# Redis数据库索引(默认为0)
|
redis:
|
||||||
database: 1
|
# Redis数据库索引(默认为0)
|
||||||
# Redis服务器地址
|
database: 1
|
||||||
host: 127.0.0.1
|
# Redis服务器地址
|
||||||
# Redis服务器连接端口
|
host: 127.0.0.1
|
||||||
port: 6379
|
# Redis服务器连接端口
|
||||||
# Redis服务器连接密码(默认为空)
|
port: 6379
|
||||||
# password:
|
# Redis服务器连接密码(默认为空)
|
||||||
# 连接超时时间
|
# password:
|
||||||
timeout: 10s
|
# 连接超时时间
|
||||||
lettuce:
|
timeout: 10s
|
||||||
pool:
|
lettuce:
|
||||||
# 连接池最大连接数
|
pool:
|
||||||
max-active: 200
|
# 连接池最大连接数
|
||||||
# 连接池最大阻塞等待时间(使用负值表示没有限制)
|
max-active: 200
|
||||||
max-wait: -1ms
|
# 连接池最大阻塞等待时间(使用负值表示没有限制)
|
||||||
# 连接池中的最大空闲连接
|
max-wait: -1ms
|
||||||
max-idle: 10
|
# 连接池中的最大空闲连接
|
||||||
# 连接池中的最小空闲连接
|
max-idle: 10
|
||||||
min-idle: 0
|
# 连接池中的最小空闲连接
|
||||||
|
min-idle: 0
|
||||||
# 缓存策略
|
# 缓存策略
|
||||||
cache:
|
cache:
|
||||||
type: redis
|
type: redis
|
||||||
@ -117,4 +118,4 @@ sa-token:
|
|||||||
# 是否输出操作日志
|
# 是否输出操作日志
|
||||||
is-log: true
|
is-log: true
|
||||||
# 登录是否往前端注入Cookie
|
# 登录是否往前端注入Cookie
|
||||||
is-read-cookie: false
|
is-read-cookie: false
|
||||||
|
|||||||
@ -1,148 +1,107 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="diy-group" id="componentList">
|
<view class="diy-group" id="componentList">
|
||||||
<top-tabbar v-if="data.global && Object.keys(data.global).length && data.global.topStatusBar && data.global.topStatusBar.isShow" :scrollBool="diyGroup.componentsScrollBool.TopTabbar" ref="topTabbarRef" :data="data.global" />
|
<top-tabbar
|
||||||
<view v-for="(component, index) in data.value" :key="component.id" @click="diyStore.changeCurrentIndex(index, component)" :class="diyGroup.getComponentClass(index,component)" :style="component.pageStyle">
|
v-if="data.global && Object.keys(data.global).length && data.global.topStatusBar && data.global.topStatusBar.isShow"
|
||||||
<view class="relative" :style="{ marginTop : component.margin.top < 0 ? (component.margin.top * 2) + 'rpx' : '0' }">
|
:scrollBool="diyGroup.componentsScrollBool.TopTabbar" ref="topTabbarRef" :data="data.global" />
|
||||||
|
<view v-for="(component, index) in data.value" :key="component.id"
|
||||||
|
@click="diyStore.changeCurrentIndex(index, component)" :class="diyGroup.getComponentClass(index,component)"
|
||||||
|
:style="component.pageStyle">
|
||||||
|
<view class="relative"
|
||||||
|
:style="{ marginTop : component.margin.top < 0 ? (component.margin.top * 2) + 'rpx' : '0' }">
|
||||||
|
|
||||||
<!-- 装修模式下,设置负上边距后超出的内容,禁止选中设置 -->
|
<!-- 装修模式下,设置负上边距后超出的内容,禁止选中设置 -->
|
||||||
<view v-if="diyGroup.isShowPlaceHolder(index,component)" class="absolute w-full z-1" :style="{ height : (component.margin.top * 2 * -1) + 'rpx' }" @click.stop="diyGroup.placeholderEvent"></view>
|
<view v-if="diyGroup.isShowPlaceHolder(index,component)" class="absolute w-full z-1"
|
||||||
|
:style="{ height : (component.margin.top * 2 * -1) + 'rpx' }"
|
||||||
|
@click.stop="diyGroup.placeholderEvent"></view>
|
||||||
|
|
||||||
<template v-if="component.componentName == 'GraphicNav'">
|
<template v-if="component.componentName == 'GraphicNav'">
|
||||||
<diy-graphic-nav :component="component" :global="data.global" :index="index" />
|
<diy-graphic-nav :component="component" :global="data.global" :index="index"
|
||||||
|
:pullDownRefreshCount="props.pullDownRefreshCount" />
|
||||||
</template>
|
</template>
|
||||||
<template v-if="component.componentName == 'HorzBlank'">
|
<template v-if="component.componentName == 'HorzBlank'">
|
||||||
<diy-horz-blank :component="component" :global="data.global" :index="index" />
|
<diy-horz-blank :component="component" :global="data.global" :index="index"
|
||||||
|
:pullDownRefreshCount="props.pullDownRefreshCount" />
|
||||||
</template>
|
</template>
|
||||||
<template v-if="component.componentName == 'HorzLine'">
|
<template v-if="component.componentName == 'HorzLine'">
|
||||||
<diy-horz-line :component="component" :global="data.global" :index="index" />
|
<diy-horz-line :component="component" :global="data.global" :index="index"
|
||||||
|
:pullDownRefreshCount="props.pullDownRefreshCount" />
|
||||||
</template>
|
</template>
|
||||||
<template v-if="component.componentName == 'HotArea'">
|
<template v-if="component.componentName == 'HotArea'">
|
||||||
<diy-hot-area :component="component" :global="data.global" :index="index" />
|
<diy-hot-area :component="component" :global="data.global" :index="index"
|
||||||
|
:pullDownRefreshCount="props.pullDownRefreshCount" />
|
||||||
</template>
|
</template>
|
||||||
<template v-if="component.componentName == 'ImageAds'">
|
<template v-if="component.componentName == 'ImageAds'">
|
||||||
<diy-image-ads :component="component" :global="data.global" :index="index" />
|
<diy-image-ads :component="component" :global="data.global" :index="index"
|
||||||
|
:pullDownRefreshCount="props.pullDownRefreshCount" />
|
||||||
</template>
|
</template>
|
||||||
<template v-if="component.componentName == 'MemberInfo'">
|
<template v-if="component.componentName == 'MemberInfo'">
|
||||||
<diy-member-info :component="component" :global="data.global" :index="index" />
|
<diy-member-info :component="component" :global="data.global" :index="index"
|
||||||
|
:pullDownRefreshCount="props.pullDownRefreshCount" />
|
||||||
</template>
|
</template>
|
||||||
<template v-if="component.componentName == 'MemberLevel'">
|
<template v-if="component.componentName == 'MemberLevel'">
|
||||||
<diy-member-level :component="component" :global="data.global" :index="index" />
|
<diy-member-level :component="component" :global="data.global" :index="index"
|
||||||
|
:pullDownRefreshCount="props.pullDownRefreshCount" />
|
||||||
</template>
|
</template>
|
||||||
<template v-if="component.componentName == 'Notice'">
|
<template v-if="component.componentName == 'Notice'">
|
||||||
<diy-notice :component="component" :global="data.global" :index="index" />
|
<diy-notice :component="component" :global="data.global" :index="index"
|
||||||
|
:pullDownRefreshCount="props.pullDownRefreshCount" />
|
||||||
</template>
|
</template>
|
||||||
<template v-if="component.componentName == 'RubikCube'">
|
<template v-if="component.componentName == 'RubikCube'">
|
||||||
<diy-rubik-cube :component="component" :global="data.global" :index="index" />
|
<diy-rubik-cube :component="component" :global="data.global" :index="index"
|
||||||
|
:pullDownRefreshCount="props.pullDownRefreshCount" />
|
||||||
</template>
|
</template>
|
||||||
<template v-if="component.componentName == 'Text'">
|
<template v-if="component.componentName == 'Text'">
|
||||||
<diy-text :component="component" :global="data.global" :index="index" />
|
<diy-text :component="component" :global="data.global" :index="index"
|
||||||
|
:pullDownRefreshCount="props.pullDownRefreshCount" />
|
||||||
</template>
|
</template>
|
||||||
<template v-if="component.componentName == 'RichText'">
|
<template v-if="component.componentName == 'RichText'">
|
||||||
<diy-rich-text :component="component" :global="data.global" :index="index"/>
|
<diy-rich-text :component="component" :global="data.global" :index="index"
|
||||||
|
:pullDownRefreshCount="props.pullDownRefreshCount" />
|
||||||
</template>
|
</template>
|
||||||
<template v-if="component.componentName == 'ActiveCube'">
|
<template v-if="component.componentName == 'ActiveCube'">
|
||||||
<diy-active-cube :component="component" :global="data.global" :index="index"/>
|
<diy-active-cube :component="component" :global="data.global" :index="index"
|
||||||
|
:pullDownRefreshCount="props.pullDownRefreshCount" />
|
||||||
</template>
|
</template>
|
||||||
<template v-if="component.componentName == 'FloatBtn'">
|
<template v-if="component.componentName == 'FloatBtn'">
|
||||||
<diy-float-btn :component="component" :global="data.global" :index="index"/>
|
<diy-float-btn :component="component" :global="data.global" :index="index"
|
||||||
|
:pullDownRefreshCount="props.pullDownRefreshCount" />
|
||||||
</template>
|
</template>
|
||||||
<template v-if="component.componentName == 'CarouselSearch'">
|
<template v-if="component.componentName == 'CarouselSearch'">
|
||||||
<diy-carousel-search :scrollBool="diyGroup.componentsScrollBool.CarouselSearch" :component="component" :global="data.global" :index="index" />
|
<diy-carousel-search :scrollBool="diyGroup.componentsScrollBool.CarouselSearch"
|
||||||
|
:component="component" :global="data.global" :index="index"
|
||||||
|
:pullDownRefreshCount="props.pullDownRefreshCount" />
|
||||||
</template>
|
</template>
|
||||||
<template v-if="component.componentName == 'PictureShow'">
|
<template v-if="component.componentName == 'PictureShow'">
|
||||||
<diy-picture-show :component="component" :global="data.global" :index="index" />
|
<diy-picture-show :component="component" :global="data.global" :index="index"
|
||||||
|
:pullDownRefreshCount="props.pullDownRefreshCount" />
|
||||||
</template>
|
</template>
|
||||||
<template v-if="component.componentName == 'FormSubmit'">
|
|
||||||
<diy-form-submit :component="component" :global="data.global" :index="index" />
|
|
||||||
</template>
|
|
||||||
<template v-if="component.componentName == 'FormInput'">
|
|
||||||
<diy-form-input ref="diyFormInputRef" :component="component" :global="data.global" :index="index" />
|
|
||||||
</template>
|
|
||||||
<template v-if="component.componentName == 'FormTextarea'">
|
|
||||||
<diy-form-textarea ref="diyFormTextareaRef" :component="component" :global="data.global" :index="index" />
|
|
||||||
</template>
|
|
||||||
<template v-if="component.componentName == 'FormIdentity'">
|
|
||||||
<diy-form-identity ref="diyFormIdentityRef" :component="component" :global="data.global" :index="index" />
|
|
||||||
</template>
|
|
||||||
<template v-if="component.componentName == 'FormEmail'">
|
|
||||||
<diy-form-email ref="diyFormEmailRef" :component="component" :global="data.global" :index="index" />
|
|
||||||
</template>
|
|
||||||
<template v-if="component.componentName == 'FormMobile'">
|
|
||||||
<diy-form-mobile ref="diyFormMobileRef" :component="component" :global="data.global" :index="index" />
|
|
||||||
</template>
|
|
||||||
<template v-if="component.componentName == 'FormWechatName'">
|
|
||||||
<diy-form-wechat-name ref="diyFormWechatNameRef" :component="component" :global="data.global" :index="index" />
|
|
||||||
</template>
|
|
||||||
<template v-if="component.componentName == 'FormNumber'">
|
|
||||||
<diy-form-number ref="diyFormNumberRef" :component="component" :global="data.global" :index="index" />
|
|
||||||
</template>
|
|
||||||
<template v-if="component.componentName == 'FormRadio'">
|
|
||||||
<diy-form-radio ref="diyFormRadioRef" :component="component" :global="data.global" :index="index" />
|
|
||||||
</template>
|
|
||||||
<template v-if="component.componentName == 'FormCheckbox'">
|
|
||||||
<diy-form-checkbox ref="diyFormCheckboxRef" :component="component" :global="data.global" :index="index" />
|
|
||||||
</template>
|
|
||||||
<template v-if="component.componentName == 'FormTable'">
|
|
||||||
<diy-form-table ref="diyFormTableRef" :component="component" :global="data.global" :index="index" />
|
|
||||||
</template>
|
|
||||||
<template v-if="component.componentName == 'FormDate'">
|
|
||||||
<diy-form-date ref="diyFormDateRef" :component="component" :global="data.global" :index="index" />
|
|
||||||
</template>
|
|
||||||
<template v-if="component.componentName == 'FormDateScope'">
|
|
||||||
<diy-form-date-scope ref="diyFormDateScopeRef" :component="component" :global="data.global" :index="index" />
|
|
||||||
</template>
|
|
||||||
<template v-if="component.componentName == 'FormTime'">
|
|
||||||
<diy-form-time ref="diyFormTimeRef" :component="component" :global="data.global" :index="index" />
|
|
||||||
</template>
|
|
||||||
<template v-if="component.componentName == 'FormTimeScope'">
|
|
||||||
<diy-form-time-scope ref="diyFormTimeScopeRef" :component="component" :global="data.global" :index="index" />
|
|
||||||
</template>
|
|
||||||
<template v-if="component.componentName == 'FormLocation'">
|
|
||||||
<diy-form-location ref="diyFormLocationRef" :component="component" :global="data.global" :index="index" />
|
|
||||||
</template>
|
|
||||||
<template v-if="component.componentName == 'FormAddress'">
|
|
||||||
<diy-form-address ref="diyFormAddressRef" :component="component" :global="data.global" :index="index" />
|
|
||||||
</template>
|
|
||||||
<template v-if="component.componentName == 'FormImage'">
|
|
||||||
<diy-form-image ref="diyFormImageRef" :component="component" :global="data.global" :index="index" />
|
|
||||||
</template>
|
|
||||||
<template v-if="component.componentName == 'FormVideo'">
|
|
||||||
<diy-form-video ref="diyFormVideoRef" :component="component" :global="data.global" :index="index" />
|
|
||||||
</template>
|
|
||||||
<template v-if="component.componentName == 'FormFile'">
|
|
||||||
<diy-form-file ref="diyFormFileRef" :component="component" :global="data.global" :index="index" />
|
|
||||||
</template>
|
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<template v-if="diyStore.mode == '' && data.global && data.global.bottomTabBarSwitch">
|
<template v-if="diyStore.mode == '' && data.global.bottomTabBarSwitch">
|
||||||
<view class="pt-[20rpx]"></view>
|
<view class="pt-[20rpx]"></view>
|
||||||
<tabbar />
|
<tabbar />
|
||||||
</template>
|
</template>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
|
|
||||||
import topTabbar from '@/components/top-tabbar/top-tabbar.vue'
|
|
||||||
|
|
||||||
|
import topTabbar from '@/components/top-tabbar/top-tabbar.vue'
|
||||||
import { useDiyGroup } from './useDiyGroup'
|
import { useDiyGroup } from './useDiyGroup'
|
||||||
import useDiyStore from '@/app/stores/diy';
|
import useDiyStore from '@/app/stores/diy';
|
||||||
import { ref,getCurrentInstance } from 'vue';
|
import { ref } from 'vue';
|
||||||
|
|
||||||
const props = defineProps(['data']);
|
const props = defineProps(['data', 'pullDownRefreshCount']);
|
||||||
|
|
||||||
const instance: any = getCurrentInstance();
|
|
||||||
const getFormRef = () => {
|
|
||||||
return {
|
|
||||||
componentRefs: instance.refs
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
const topTabbarRef = ref(null);
|
||||||
const diyStore = useDiyStore();
|
const diyStore = useDiyStore();
|
||||||
|
|
||||||
const diyGroup = useDiyGroup({
|
const diyGroup = useDiyGroup({
|
||||||
...props,
|
...props,
|
||||||
getFormRef
|
getFormRef() {
|
||||||
|
return {
|
||||||
|
topTabbarRef: topTabbarRef.value
|
||||||
|
}
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
const data = ref(diyGroup.data)
|
const data = ref(diyGroup.data)
|
||||||
@ -154,10 +113,9 @@
|
|||||||
diyGroup.onPageScroll()
|
diyGroup.onPageScroll()
|
||||||
|
|
||||||
defineExpose({
|
defineExpose({
|
||||||
refresh: diyGroup.refresh,
|
refresh: diyGroup.refresh
|
||||||
getFormRef
|
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
@import './index.scss';
|
@import './index.scss';
|
||||||
</style>
|
</style>
|
||||||
@ -33,5 +33,54 @@
|
|||||||
"pages.verify.verify": "核销",
|
"pages.verify.verify": "核销",
|
||||||
"pages.verify.detail": "核销详情",
|
"pages.verify.detail": "核销详情",
|
||||||
"pages.verify.record": "核销记录",
|
"pages.verify.record": "核销记录",
|
||||||
"pages.webview.index": ""
|
"pages.webview.index": "",
|
||||||
|
"shop.pages.webview.index": "",
|
||||||
|
"shop.pages.goods.search": "搜索",
|
||||||
|
"shop.pages.goods.cart": "购物车",
|
||||||
|
"shop.pages.goods.category": "商品分类",
|
||||||
|
"shop.pages.goods.detail": "商品详情",
|
||||||
|
"shop.pages.goods.list": "商品列表",
|
||||||
|
"shop.pages.member.index": "个人中心",
|
||||||
|
"shop.pages.member.my_coupon": "我的优惠券",
|
||||||
|
"shop.pages.order.list": "订单列表",
|
||||||
|
"shop.pages.order.detail": "订单详情",
|
||||||
|
"shop.pages.order.payment": "待付款订单",
|
||||||
|
"shop.pages.pay.index": "待支付",
|
||||||
|
"shop.pages.pay.result": "支付成功",
|
||||||
|
"shop.pages.evaluate.order_evaluate": "商品评价",
|
||||||
|
"shop.pages.evaluate.order_evaluate_view": "商品评价",
|
||||||
|
"shop.pages.evaluate.list": "评价列表",
|
||||||
|
"shop.pages.coupon.list": "优惠券列表",
|
||||||
|
"shop.pages.coupon.detail": "优惠券详情",
|
||||||
|
"shop.pages.discount.list": "限时折扣",
|
||||||
|
"shop.pages.refund.list": "退款列表",
|
||||||
|
"shop.pages.refund.detail": "退款详情",
|
||||||
|
"shop.pages.refund.apply": "申请退款",
|
||||||
|
"shop.pages.refund.edit_apply": "编辑退款信息",
|
||||||
|
"shop.pages.refund.log": "协商记录",
|
||||||
|
"shop.pages.point.index": "积分商城",
|
||||||
|
"shop.pages.point.list": "积分商品列表",
|
||||||
|
"shop.pages.point.detail": "积分商品详情",
|
||||||
|
"shop.pages.point.payment": "待付款订单",
|
||||||
|
"shop.pages.point.order_list": "积分兑换记录",
|
||||||
|
"shop.pages.newcomer.list": "新人专享",
|
||||||
|
"shop_fenxiao.pages.index": "分销中心",
|
||||||
|
"shop_fenxiao.pages.zone": "分销专区",
|
||||||
|
"shop_fenxiao.pages.level": "分销商等级",
|
||||||
|
"shop_fenxiao.pages.child_fenxiao": "分销商",
|
||||||
|
"shop_fenxiao.pages.goods": "分销商品",
|
||||||
|
"shop_fenxiao.pages.team": "团队",
|
||||||
|
"shop_fenxiao.pages.ranking_list": "排行榜",
|
||||||
|
"shop_fenxiao.pages.agent_list": "渠道代理",
|
||||||
|
"shop_fenxiao.pages.bill": "账单",
|
||||||
|
"shop_fenxiao.pages.order": "分销订单",
|
||||||
|
"shop_fenxiao.pages.order_detail": "订单详情",
|
||||||
|
"shop_fenxiao.pages.apply": "分销商申请",
|
||||||
|
"shop_fenxiao.pages.task_rewards": "任务奖励",
|
||||||
|
"shop_fenxiao.pages.task_detail": "任务奖励详情",
|
||||||
|
"shop_fenxiao.pages.task_rewards_detail": "任务奖励明细",
|
||||||
|
"shop_fenxiao.pages.sale": "销售奖励",
|
||||||
|
"shop_fenxiao.pages.sale_detail": "销售奖励详情",
|
||||||
|
"shop_fenxiao.pages.sale_ranking": "销售排行榜",
|
||||||
|
"shop_fenxiao.pages.promote_code": "分销推广"
|
||||||
}
|
}
|
||||||
@ -119,7 +119,7 @@ class Request {
|
|||||||
})
|
})
|
||||||
|
|
||||||
if (params.method.toUpperCase() == 'GET' && !uni.$u.test.empty(data)) {
|
if (params.method.toUpperCase() == 'GET' && !uni.$u.test.empty(data)) {
|
||||||
params.url += "?" + qs.stringify(data)
|
params.url += "?" + this.queryParams(data)
|
||||||
} else {
|
} else {
|
||||||
params.data = data;
|
params.data = data;
|
||||||
}
|
}
|
||||||
@ -150,6 +150,28 @@ class Request {
|
|||||||
})
|
})
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private queryParams(data: AnyObject) {
|
||||||
|
const _result = []
|
||||||
|
for (const key in data) {
|
||||||
|
const value = data[key]
|
||||||
|
if (value != undefined) {
|
||||||
|
if (value.constructor === Array) {
|
||||||
|
value.forEach((_value) => {
|
||||||
|
_result.push(`${key}[]=${_value}`)
|
||||||
|
})
|
||||||
|
} else if (value.constructor === Object) {
|
||||||
|
for (const _key in value) {
|
||||||
|
const _value = value[_key]
|
||||||
|
_result.push(`${key}[${_key}]=${_value}`)
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
_result.push(`${key}=${value}`)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return _result.length ? _result.join('&') : ''
|
||||||
|
}
|
||||||
|
|
||||||
private handleAuthError(code : number) {
|
private handleAuthError(code : number) {
|
||||||
switch (code) {
|
switch (code) {
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
"title": "会员充值",
|
"title": "会员充值",
|
||||||
"desc": "在线充值到会员账户",
|
"desc": "在线充值到会员账户",
|
||||||
"key": "recharge",
|
"key": "recharge",
|
||||||
"version": "1.0.0",
|
"version": "1.0.1",
|
||||||
"author": "niucloud",
|
"author": "niucloud",
|
||||||
"type": "addon",
|
"type": "addon",
|
||||||
"support_app": "",
|
"support_app": "",
|
||||||
|
|||||||
Binary file not shown.
@ -0,0 +1,21 @@
|
|||||||
|
package com.niu.recharge.listener;
|
||||||
|
|
||||||
|
import com.niu.core.common.annotation.EventListen;
|
||||||
|
import com.niu.core.entity.pay.Pay;
|
||||||
|
import com.niu.core.event.order.WapOrderDetailPathDefiner;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
@EventListen("recharge")
|
||||||
|
@Component
|
||||||
|
public class WapOrderDetailPathListener extends WapOrderDetailPathDefiner {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public WapOrderDetailPathDefiner.WapOrderDetailPathResult handleCallback(WapOrderDetailPathDefiner.WapOrderDetailPathEvent event) {
|
||||||
|
Pay pay = event.getPay();
|
||||||
|
if (pay.getTradeType().equals("recharge")) {
|
||||||
|
WapOrderDetailPathDefiner.WapOrderDetailPathResult result = new WapOrderDetailPathDefiner.WapOrderDetailPathResult();
|
||||||
|
result.setPath("addon/recharge/pages/recharge_record_detail?id=" + pay.getTradeId());
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -24,7 +24,9 @@ import com.niu.core.event.common.CommonEventDefiner;
|
|||||||
import com.niu.core.mapper.pay.PayMapper;
|
import com.niu.core.mapper.pay.PayMapper;
|
||||||
import com.niu.core.service.core.app.helper.EventAndSubscribeOfPublisher;
|
import com.niu.core.service.core.app.helper.EventAndSubscribeOfPublisher;
|
||||||
import com.niu.core.service.core.member.ICoreMemberAccountService;
|
import com.niu.core.service.core.member.ICoreMemberAccountService;
|
||||||
|
import com.niu.core.service.core.pay.ICorePayChannelService;
|
||||||
import com.niu.core.service.core.pay.ICorePayService;
|
import com.niu.core.service.core.pay.ICorePayService;
|
||||||
|
import com.niu.core.service.core.weapp.ICoreWeappDeliveryService;
|
||||||
import com.niu.recharge.entity.Recharge;
|
import com.niu.recharge.entity.Recharge;
|
||||||
import com.niu.recharge.entity.RechargeOrder;
|
import com.niu.recharge.entity.RechargeOrder;
|
||||||
import com.niu.recharge.entity.RechargeOrderItem;
|
import com.niu.recharge.entity.RechargeOrderItem;
|
||||||
@ -43,6 +45,8 @@ import org.springframework.transaction.annotation.Transactional;
|
|||||||
import jakarta.annotation.Resource;
|
import jakarta.annotation.Resource;
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.time.Instant;
|
import java.time.Instant;
|
||||||
|
import java.time.OffsetDateTime;
|
||||||
|
import java.time.format.DateTimeFormatter;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.LinkedList;
|
import java.util.LinkedList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@ -71,6 +75,12 @@ public class CoreRechargeOrderServiceImpl implements ICoreRechargeOrderService {
|
|||||||
@Resource
|
@Resource
|
||||||
PayMapper payMapper;
|
PayMapper payMapper;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
ICoreWeappDeliveryService coreWeappDeliveryService;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
ICorePayChannelService corePayChannelService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param param
|
* @param param
|
||||||
* @return
|
* @return
|
||||||
@ -184,39 +194,43 @@ public class CoreRechargeOrderServiceImpl implements ICoreRechargeOrderService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Recharge recharge = rechargeMapper.selectById(items.get(0).getItemId());
|
Recharge recharge = rechargeMapper.selectById(items.get(0).getItemId());
|
||||||
if (ObjectUtil.isEmpty(recharge)) {
|
if (ObjectUtil.isNotEmpty(recharge)) {
|
||||||
return;
|
recharge.setSaleNum(recharge.getSaleNum() + 1);
|
||||||
}
|
rechargeMapper.updateById(recharge);
|
||||||
|
|
||||||
recharge.setSaleNum(recharge.getSaleNum() + 1);
|
// 增加会员余额
|
||||||
rechargeMapper.updateById(recharge);
|
if (recharge.getFaceValue().compareTo(BigDecimal.ZERO) > 0) {
|
||||||
|
coreMemberAccountService.addLog(order.getSiteId(), order.getMemberId(), AccountTypeEnum.BALANCE.getType(), recharge.getFaceValue().doubleValue(), "recharge", "会员充值到账", order.getOrderId().toString());
|
||||||
|
}
|
||||||
|
|
||||||
// 增加会员余额
|
// 会员充值发放积分开始
|
||||||
if (recharge.getFaceValue().compareTo(BigDecimal.ZERO) > 0) {
|
if (recharge.getPoint() > 0) {
|
||||||
coreMemberAccountService.addLog(order.getSiteId(), order.getMemberId(), AccountTypeEnum.BALANCE.getType(), recharge.getFaceValue().doubleValue(), "recharge", "会员充值", order.getOrderId().toString());
|
coreMemberAccountService.addLog(order.getSiteId(), order.getMemberId(), AccountTypeEnum.POINT.getType(), recharge.getPoint().doubleValue(), "recharge", "会员充值赠送", order.getOrderId().toString());
|
||||||
}
|
}
|
||||||
|
|
||||||
// 会员充值发放积分开始
|
// 会员充值发放成长值开始
|
||||||
if (recharge.getPoint() > 0) {
|
if (recharge.getGrowth() > 0) {
|
||||||
coreMemberAccountService.addLog(order.getSiteId(), order.getMemberId(), AccountTypeEnum.POINT.getType(), recharge.getPoint().doubleValue(), "recharge", "会员充值", order.getOrderId().toString());
|
coreMemberAccountService.addLog(order.getSiteId(), order.getMemberId(), AccountTypeEnum.GROWTH.getType(), recharge.getGrowth().doubleValue(), "recharge", "会员充值赠送", order.getOrderId().toString());
|
||||||
}
|
}
|
||||||
|
|
||||||
// 会员充值发放成长值开始
|
if (ObjectUtil.isNotEmpty(recharge.getGiftJson())) {
|
||||||
if (recharge.getGrowth() > 0) {
|
CommonEvent event = new CommonEvent();
|
||||||
coreMemberAccountService.addLog(order.getSiteId(), order.getMemberId(), AccountTypeEnum.GROWTH.getType(), recharge.getGrowth().doubleValue(), "recharge", "会员充值", order.getOrderId().toString());
|
event.setEventName("RechargeAfterListener");
|
||||||
}
|
event.setData(recharge);
|
||||||
|
event.setMemberId(order.getMemberId());
|
||||||
if (ObjectUtil.isNotEmpty(recharge.getGiftJson())) {
|
event.setSiteId(RequestUtils.siteId());
|
||||||
CommonEvent event = new CommonEvent();
|
EventAndSubscribeOfPublisher.publishAll(event);
|
||||||
event.setEventName("RechargeAfterListener");
|
}
|
||||||
event.setData(recharge);
|
} else {
|
||||||
event.setMemberId(order.getMemberId());
|
if (order.getOrderItemMoney().compareTo(BigDecimal.ZERO) > 0) {
|
||||||
event.setSiteId(RequestUtils.siteId());
|
coreMemberAccountService.addLog(order.getSiteId(), order.getMemberId(), AccountTypeEnum.BALANCE.getType(), order.getOrderItemMoney().doubleValue(), "recharge", "会员充值到账", order.getOrderId().toString());
|
||||||
EventAndSubscribeOfPublisher.publishAll(event);
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 发送消息
|
// 发送消息
|
||||||
sendRechargeSuccessNotice(order);
|
sendRechargeSuccessNotice(order);
|
||||||
|
|
||||||
|
orderShippingUploadShippingInfo(order, pay);
|
||||||
log.info("pay success");
|
log.info("pay success");
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
log.info("pay fail: {}", e.getMessage());
|
log.info("pay fail: {}", e.getMessage());
|
||||||
@ -237,10 +251,22 @@ public class CoreRechargeOrderServiceImpl implements ICoreRechargeOrderService {
|
|||||||
NoticeUtils.send(order.getSiteId(), "recharge_success", param);
|
NoticeUtils.send(order.getSiteId(), "recharge_success", param);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void orderShippingUploadShippingInfo(RechargeOrder order) {
|
public void orderShippingUploadShippingInfo(RechargeOrder order, Pay pay) {
|
||||||
try {
|
try {
|
||||||
Pay pay = payMapper.selectOne(new QueryWrapper<Pay>().eq("out_trade_no", order.getOutTradeNo()));
|
log.info("rechargeOrder UploadShippingInfo:{}", JSONUtil.toJsonStr(pay));
|
||||||
if (pay == null || !pay.getType().equals("wechatpay")) return;
|
if (!pay.getType().equals("wechatpay") || !pay.getChannel().equals("weapp")) return;
|
||||||
|
|
||||||
|
// 检测微信小程序是否已开通发货信息管理服务
|
||||||
|
if (!coreWeappDeliveryService.getIsTradeManaged(order.getSiteId()).getIsTradeManaged()) return;
|
||||||
|
|
||||||
|
// 设置消息跳转路径设置接口
|
||||||
|
WxMaOrderShippingInfoBaseResponse setResult = coreWeappDeliveryService.setMsgJumpPath(order.getSiteId(), "recharge_order");
|
||||||
|
if (!setResult.getErrCode().equals(0)) {
|
||||||
|
log.info("rechargeOrder UploadShippingInfo setMsgJumpPath", setResult.getErrMsg());
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
JSONObject config = ObjectUtil.defaultIfNull(corePayChannelService.getConfigByChannelAndType(pay.getSiteId(), pay.getChannel(), pay.getType()), new JSONObject());
|
||||||
|
|
||||||
WxMaService miniapp = WechatUtils.miniapp(order.getSiteId());
|
WxMaService miniapp = WechatUtils.miniapp(order.getSiteId());
|
||||||
|
|
||||||
@ -250,10 +276,11 @@ public class CoreRechargeOrderServiceImpl implements ICoreRechargeOrderService {
|
|||||||
OrderKeyBean orderKey = new OrderKeyBean();
|
OrderKeyBean orderKey = new OrderKeyBean();
|
||||||
orderKey.setOrderNumberType(1);
|
orderKey.setOrderNumberType(1);
|
||||||
orderKey.setOutTradeNo(order.getOutTradeNo());
|
orderKey.setOutTradeNo(order.getOutTradeNo());
|
||||||
|
orderKey.setMchId(config.getStr("mch_id", ""));
|
||||||
request.setOrderKey(orderKey);
|
request.setOrderKey(orderKey);
|
||||||
request.setLogisticsType(3);
|
request.setLogisticsType(3);
|
||||||
|
|
||||||
request.setUploadTime(Instant.now().plusMillis(TimeUnit.HOURS.toMillis(8)).toString());
|
request.setUploadTime(OffsetDateTime.now().format(DateTimeFormatter.ISO_OFFSET_DATE_TIME));
|
||||||
|
|
||||||
// 发货模式,发货模式枚举值:1、UNIFIED_DELIVERY(统一发货)2、SPLIT_DELIVERY(分拆发货)
|
// 发货模式,发货模式枚举值:1、UNIFIED_DELIVERY(统一发货)2、SPLIT_DELIVERY(分拆发货)
|
||||||
request.setDeliveryMode(1);
|
request.setDeliveryMode(1);
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
"title": "会员充值",
|
"title": "会员充值",
|
||||||
"desc": "在线充值到会员账户",
|
"desc": "在线充值到会员账户",
|
||||||
"key": "recharge",
|
"key": "recharge",
|
||||||
"version": "1.0.0",
|
"version": "1.0.1",
|
||||||
"author": "niucloud",
|
"author": "niucloud",
|
||||||
"type": "addon",
|
"type": "addon",
|
||||||
"support_app": "",
|
"support_app": "",
|
||||||
|
|||||||
@ -1,27 +1,27 @@
|
|||||||
{
|
{
|
||||||
"root": "addon/recharge",
|
"root": "addon/recharge",
|
||||||
"pages": [
|
"pages": [
|
||||||
// *********************************** 充值 ***********************************
|
// *********************************** 充值 ***********************************
|
||||||
{
|
{
|
||||||
"path": "pages/recharge",
|
"path": "pages/recharge",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "%recharge.pages.recharge%"
|
"navigationBarTitleText": "%recharge.pages.recharge%"
|
||||||
},
|
},
|
||||||
"needLogin": true
|
"needLogin": true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "pages/recharge_record",
|
"path": "pages/recharge_record",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "%recharge.pages.recharge_record%"
|
"navigationBarTitleText": "%recharge.pages.recharge_record%"
|
||||||
},
|
},
|
||||||
"needLogin": true
|
"needLogin": true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "pages/recharge_record_detail",
|
"path": "pages/recharge_record_detail",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "%recharge.pages.recharge_record_detail%"
|
"navigationBarTitleText": "%recharge.pages.recharge_record_detail%"
|
||||||
},
|
},
|
||||||
"needLogin": true
|
"needLogin": true
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@ -13,8 +13,10 @@
|
|||||||
"isPayEdition": "快递鸟套餐",
|
"isPayEdition": "快递鸟套餐",
|
||||||
"free": "免费",
|
"free": "免费",
|
||||||
"pay": "付费",
|
"pay": "付费",
|
||||||
|
"PayPerUse": "按次付费",
|
||||||
|
"PayPerOrder": "按单付费",
|
||||||
"kd100AppKeyPlaceholder": "请输入快递100AppKey",
|
"kd100AppKeyPlaceholder": "请输入快递100AppKey",
|
||||||
"kd100AppKeyTips": "快递100应用密钥",
|
"kd100AppKeyTips": "快递100应用密钥",
|
||||||
"kd100CustomerPlaceholder": "请输入快递100Customer",
|
"kd100CustomerPlaceholder": "请输入快递100Customer",
|
||||||
"kd100CustomerTips": "快递100分配给的公司编号"
|
"kd100CustomerTips": "快递100分配给的公司编号"
|
||||||
}
|
}
|
||||||
|
|||||||
@ -12,7 +12,7 @@
|
|||||||
<!-- <el-radio :label="2" size="large">{{ t('kd100') }}</el-radio>-->
|
<!-- <el-radio :label="2" size="large">{{ t('kd100') }}</el-radio>-->
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
<p class="text-[12px] text-[#b2b2b2]" v-if="formData.interface_type == 1">
|
<p class="text-[12px] text-[#b2b2b2]" v-if="formData.interface_type == 1">
|
||||||
{{ t('promptTips1-1') }}<el-button class="button-size" type="primary" link @click="openEvent('https://www.kdniao.com')">https://www.kdniao.com</el-button>
|
{{ t('promptTips1-1') }}<el-button class="button-size" type="primary" link @click="openEvent('https://www.kdniao.com/reg?from=niucloud')">https://www.kdniao.com</el-button>
|
||||||
</p>
|
</p>
|
||||||
<p class="text-[12px] text-[#b2b2b2]" v-if="formData.interface_type == 1">
|
<p class="text-[12px] text-[#b2b2b2]" v-if="formData.interface_type == 1">
|
||||||
{{ t('promptTips1-2') }}
|
{{ t('promptTips1-2') }}
|
||||||
@ -25,8 +25,10 @@
|
|||||||
<div v-if="formData.interface_type == 1">
|
<div v-if="formData.interface_type == 1">
|
||||||
<el-form-item :label="t('isPayEdition')" prop="kdn_is_pay" class="items-center">
|
<el-form-item :label="t('isPayEdition')" prop="kdn_is_pay" class="items-center">
|
||||||
<el-radio-group v-model="formData.kdniao_is_pay">
|
<el-radio-group v-model="formData.kdniao_is_pay">
|
||||||
<el-radio :label="1" size="large">{{ t('free') }}</el-radio>
|
<!-- <el-radio :label="1" size="large">{{ t('free') }}</el-radio>-->
|
||||||
<el-radio :label="2" size="large">{{ t('pay') }}</el-radio>
|
<!-- <el-radio :label="2" size="large">{{ t('pay') }}</el-radio>-->
|
||||||
|
<el-radio :label="1" size="large">{{ t('PayPerOrder') }}</el-radio>
|
||||||
|
<el-radio :label="2" size="large">{{ t('PayPerUse') }}</el-radio>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
|
|||||||
@ -116,13 +116,13 @@
|
|||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="active_goods_order_money" :label="t('paymentAmount')" min-width="100" />
|
<el-table-column prop="active_goods_order_money" :label="t('paymentAmount')" min-width="100" />
|
||||||
|
|
||||||
<el-table-column prop="active_goods_order_num" :label="t('orderCount')" min-width="100" />
|
<el-table-column prop="active_goods_order_num" :label="t('orderCount')" min-width="100" />
|
||||||
<el-table-column prop="active_goods_member_num" :label="t('activeMemberNum')" min-width="100" />
|
<el-table-column prop="active_goods_member_num" :label="t('activeMemberNum')" min-width="100" />
|
||||||
<el-table-column prop="active_goods_success_num" :label="t('activeSuccessNum')" min-width="100" />
|
<el-table-column prop="active_goods_success_num" :label="t('activeSuccessNum')" min-width="100" />
|
||||||
</el-table>
|
</el-table>
|
||||||
<div class="mt-[16px] flex justify-end">
|
<div class="mt-[16px] flex justify-end">
|
||||||
<el-pagination v-model:current-page="goodsParams.page" v-model:page-size="goodsParams.limit" :page-sizes="[6,10,20,30,50,100]"
|
<el-pagination v-model:current-page="goodsParams.page" v-model:page-size="goodsParams.limit" :page-sizes="[6,10,20,30,50,100]"
|
||||||
layout="total, sizes, prev, pager, next, jumper" :total="goodsParams.total"
|
layout="total, sizes, prev, pager, next, jumper" :total="goodsParams.total"
|
||||||
@size-change="getActiveDiscountGoodsPageListFn()" @current-change="getActiveDiscountGoodsPageListFn" />
|
@size-change="getActiveDiscountGoodsPageListFn()" @current-change="getActiveDiscountGoodsPageListFn" />
|
||||||
</div>
|
</div>
|
||||||
@ -133,7 +133,7 @@
|
|||||||
<el-form-item :label="t('orderInfo')" prop='search_name'>
|
<el-form-item :label="t('orderInfo')" prop='search_name'>
|
||||||
<el-input class="input-item" v-model.trim="orderParams.searchParam.search_name" />
|
<el-input class="input-item" v-model.trim="orderParams.searchParam.search_name" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item :label="t('payType')" prop='status'>
|
<el-form-item :label="t('status')" prop='status'>
|
||||||
<el-select v-model="orderParams.searchParam.status" clearable class="input-item">
|
<el-select v-model="orderParams.searchParam.status" clearable class="input-item">
|
||||||
<el-option :label="t('toBePaid')" value="1"></el-option>
|
<el-option :label="t('toBePaid')" value="1"></el-option>
|
||||||
<el-option :label="t('toBeShipped')" value="2"></el-option>
|
<el-option :label="t('toBeShipped')" value="2"></el-option>
|
||||||
@ -142,6 +142,11 @@
|
|||||||
<el-option :label="t('closed')" value="-1"></el-option>
|
<el-option :label="t('closed')" value="-1"></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item :label="t('payType')" prop='pay_type'>
|
||||||
|
<el-select v-model="orderParams.searchParam.pay_type" clearable class="input-item">
|
||||||
|
<el-option v-for="(item, index) in payTypeData" :key="index" :label="item.name" :value="item.key"></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
<el-form-item :label="t('createTime')" prop="create_time">
|
<el-form-item :label="t('createTime')" prop="create_time">
|
||||||
<el-date-picker v-model="orderParams.searchParam.create_time" type="datetimerange"
|
<el-date-picker v-model="orderParams.searchParam.create_time" type="datetimerange"
|
||||||
value-format="YYYY-MM-DD HH:mm:ss" :start-placeholder="t('startDate')"
|
value-format="YYYY-MM-DD HH:mm:ss" :start-placeholder="t('startDate')"
|
||||||
@ -190,7 +195,7 @@
|
|||||||
<el-table-column prop="create_time" :label="t('createTime')" min-width="100" />
|
<el-table-column prop="create_time" :label="t('createTime')" min-width="100" />
|
||||||
</el-table>
|
</el-table>
|
||||||
<div class="mt-[16px] flex justify-end">
|
<div class="mt-[16px] flex justify-end">
|
||||||
<el-pagination v-model:current-page="orderParams.page" v-model:page-size="orderParams.limit" :page-sizes="[4,10,20,30,50,100]"
|
<el-pagination v-model:current-page="orderParams.page" v-model:page-size="orderParams.limit" :page-sizes="[4,10,20,30,50,100]"
|
||||||
layout="total, sizes, prev, pager, next, jumper" :total="orderParams.total"
|
layout="total, sizes, prev, pager, next, jumper" :total="orderParams.total"
|
||||||
@size-change="getActiveDiscountOrderPageListFn()" @current-change="getActiveDiscountOrderPageListFn" />
|
@size-change="getActiveDiscountOrderPageListFn()" @current-change="getActiveDiscountOrderPageListFn" />
|
||||||
</div>
|
</div>
|
||||||
@ -241,6 +246,7 @@ import {getActiveDiscountInfo, getActiveDiscountGoodsPageList, getActiveDiscount
|
|||||||
import { FormInstance } from 'element-plus'
|
import { FormInstance } from 'element-plus'
|
||||||
import { useRouter, useRoute } from 'vue-router'
|
import { useRouter, useRoute } from 'vue-router'
|
||||||
import { img } from '@/utils/common'
|
import { img } from '@/utils/common'
|
||||||
|
import { getOrderPayType } from '@/addon/shop/api/order'
|
||||||
|
|
||||||
const route = useRoute()
|
const route = useRoute()
|
||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
@ -306,6 +312,13 @@ const previewEvent = (data: any) => {
|
|||||||
window.open(url.href)
|
window.open(url.href)
|
||||||
}
|
}
|
||||||
// 活动订单
|
// 活动订单
|
||||||
|
|
||||||
|
const payTypeData = ref<any[]>([])
|
||||||
|
const setFormDataGoods = async () => {
|
||||||
|
payTypeData.value = await (await getOrderPayType()).data
|
||||||
|
}
|
||||||
|
setFormDataGoods()
|
||||||
|
|
||||||
const orderSearchFormRef = ref()
|
const orderSearchFormRef = ref()
|
||||||
const orderParams = reactive({
|
const orderParams = reactive({
|
||||||
page: 1,
|
page: 1,
|
||||||
@ -316,6 +329,7 @@ const orderParams = reactive({
|
|||||||
searchParam: {
|
searchParam: {
|
||||||
search_name: '',
|
search_name: '',
|
||||||
status: '',
|
status: '',
|
||||||
|
pay_type: '',
|
||||||
create_time: [],
|
create_time: [],
|
||||||
pay_time: [],
|
pay_time: [],
|
||||||
active_id: ''
|
active_id: ''
|
||||||
@ -378,7 +392,7 @@ const detailEvent = (member_id:number)=> {
|
|||||||
|
|
||||||
const setFormData = async (row: any = null) => {
|
const setFormData = async (row: any = null) => {
|
||||||
id = row.id;
|
id = row.id;
|
||||||
|
|
||||||
memberParams.searchParam.active_id = row.id;
|
memberParams.searchParam.active_id = row.id;
|
||||||
orderParams.searchParam.active_id = row.id;
|
orderParams.searchParam.active_id = row.id;
|
||||||
goodsParams.searchParam.active_id = row.id;
|
goodsParams.searchParam.active_id = row.id;
|
||||||
@ -401,7 +415,8 @@ const toGoodsCategoryEvent = (order_id:any) => {
|
|||||||
|
|
||||||
defineExpose({
|
defineExpose({
|
||||||
showDialog,
|
showDialog,
|
||||||
setFormData
|
setFormData,
|
||||||
|
setFormDataGoods
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
"title": "商城系统",
|
"title": "商城系统",
|
||||||
"desc": "实物虚拟商品,订单,物流同城配送,门店自提",
|
"desc": "实物虚拟商品,订单,物流同城配送,门店自提",
|
||||||
"key": "shop",
|
"key": "shop",
|
||||||
"version": "1.0.1",
|
"version": "1.0.2",
|
||||||
"author": "niucloud",
|
"author": "niucloud",
|
||||||
"type": "app",
|
"type": "app",
|
||||||
"support_app": "",
|
"support_app": "",
|
||||||
|
|||||||
Binary file not shown.
@ -1,19 +0,0 @@
|
|||||||
# Licensed to the Apache Software Foundation (ASF) under one
|
|
||||||
# or more contributor license agreements. See the NOTICE file
|
|
||||||
# distributed with this work for additional information
|
|
||||||
# regarding copyright ownership. The ASF licenses this file
|
|
||||||
# to you under the Apache License, Version 2.0 (the
|
|
||||||
# "License"); you may not use this file except in compliance
|
|
||||||
# with the License. You may obtain a copy of the License at
|
|
||||||
#
|
|
||||||
# https://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
#
|
|
||||||
# Unless required by applicable law or agreed to in writing,
|
|
||||||
# software distributed under the License is distributed on an
|
|
||||||
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
||||||
# KIND, either express or implied. See the License for the
|
|
||||||
# specific language governing permissions and limitations
|
|
||||||
# under the License.
|
|
||||||
wrapperVersion=3.3.2
|
|
||||||
distributionType=only-script
|
|
||||||
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.7/apache-maven-3.9.7-bin.zip
|
|
||||||
@ -1,96 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
|
||||||
<parent>
|
|
||||||
<artifactId>niucloud-addon</artifactId>
|
|
||||||
<groupId>com.niu</groupId>
|
|
||||||
<version>1.0</version>
|
|
||||||
</parent>
|
|
||||||
<modelVersion>4.0.0</modelVersion>
|
|
||||||
<artifactId>shop</artifactId>
|
|
||||||
<version>1.0.0</version>
|
|
||||||
<build>
|
|
||||||
<resources>
|
|
||||||
<resource>
|
|
||||||
<directory>src/main/java</directory>
|
|
||||||
<includes>
|
|
||||||
<include>**/*.*</include>
|
|
||||||
</includes>
|
|
||||||
</resource>
|
|
||||||
<resource>
|
|
||||||
<directory>src/main/resources</directory>
|
|
||||||
<includes>
|
|
||||||
<include>**/*.*</include>
|
|
||||||
</includes>
|
|
||||||
</resource>
|
|
||||||
</resources>
|
|
||||||
<finalName>shop</finalName>
|
|
||||||
<plugins>
|
|
||||||
<plugin>
|
|
||||||
<artifactId>maven-shade-plugin</artifactId>
|
|
||||||
<version>3.2.4</version>
|
|
||||||
<executions>
|
|
||||||
<execution>
|
|
||||||
<phase>package</phase>
|
|
||||||
<goals>
|
|
||||||
<goal>shade</goal>
|
|
||||||
</goals>
|
|
||||||
<configuration>
|
|
||||||
<filters>
|
|
||||||
<filter>
|
|
||||||
<artifact>*:*</artifact>
|
|
||||||
<excludes>
|
|
||||||
<exclude>META-INF/services/*</exclude>
|
|
||||||
<exclude>META-INF/spring/*</exclude>
|
|
||||||
<exclude>META-INF/**.factories</exclude>
|
|
||||||
<exclude>META-INF/**.xml</exclude>
|
|
||||||
<exclude>META-INF/**.properties</exclude>
|
|
||||||
</excludes>
|
|
||||||
</filter>
|
|
||||||
</filters>
|
|
||||||
</configuration>
|
|
||||||
</execution>
|
|
||||||
</executions>
|
|
||||||
</plugin>
|
|
||||||
<plugin>
|
|
||||||
<artifactId>maven-antrun-plugin</artifactId>
|
|
||||||
<executions>
|
|
||||||
<execution>
|
|
||||||
<phase>package</phase>
|
|
||||||
<goals>
|
|
||||||
<goal>run</goal>
|
|
||||||
</goals>
|
|
||||||
<configuration>
|
|
||||||
<target />
|
|
||||||
</configuration>
|
|
||||||
</execution>
|
|
||||||
</executions>
|
|
||||||
</plugin>
|
|
||||||
</plugins>
|
|
||||||
</build>
|
|
||||||
<dependencies>
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.niu</groupId>
|
|
||||||
<artifactId>niucloud-core</artifactId>
|
|
||||||
<version>1.0</version>
|
|
||||||
<scope>provided</scope>
|
|
||||||
<exclusions>
|
|
||||||
<exclusion>
|
|
||||||
<artifactId>yly</artifactId>
|
|
||||||
<groupId>com.yly.print_sdk_library</groupId>
|
|
||||||
</exclusion>
|
|
||||||
</exclusions>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.projectlombok</groupId>
|
|
||||||
<artifactId>lombok</artifactId>
|
|
||||||
<version>1.18.24</version>
|
|
||||||
<scope>provided</scope>
|
|
||||||
</dependency>
|
|
||||||
</dependencies>
|
|
||||||
<properties>
|
|
||||||
<maven.compiler.target>17</maven.compiler.target>
|
|
||||||
<java.version>17</java.version>
|
|
||||||
<maven.compiler.source>17</maven.compiler.source>
|
|
||||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
|
||||||
</properties>
|
|
||||||
</project>
|
|
||||||
@ -103,7 +103,7 @@ public class CategoryController {
|
|||||||
* @param editParam 编辑参数
|
* @param editParam 编辑参数
|
||||||
* @return Result<Object>
|
* @return Result<Object>
|
||||||
*/
|
*/
|
||||||
@PutMapping("/category/update")
|
@PostMapping("/category/update")
|
||||||
public Result<Object> update(@Validated @RequestBody EditGoodsCategorySortParam editParam) {
|
public Result<Object> update(@Validated @RequestBody EditGoodsCategorySortParam editParam) {
|
||||||
categoryService.editGoodsCategorySort(editParam);
|
categoryService.editGoodsCategorySort(editParam);
|
||||||
return Result.success();
|
return Result.success();
|
||||||
|
|||||||
@ -1,17 +1,16 @@
|
|||||||
package com.niu.shop.controller.adminapi.marketing;
|
package com.niu.shop.controller.adminapi.marketing;
|
||||||
|
|
||||||
import cn.hutool.json.JSONArray;
|
import cn.hutool.json.JSONArray;
|
||||||
import com.niu.core.common.domain.Result;
|
import com.niu.core.common.domain.PageParam;
|
||||||
import com.niu.core.common.domain.PageResult;
|
import com.niu.core.common.domain.PageResult;
|
||||||
|
import com.niu.core.common.domain.Result;
|
||||||
import com.niu.shop.enums.active.ActiveStatusEnum;
|
import com.niu.shop.enums.active.ActiveStatusEnum;
|
||||||
import com.niu.shop.service.admin.marketing.IShopDiscountService;
|
import com.niu.shop.service.admin.marketing.IShopDiscountService;
|
||||||
import com.niu.shop.service.admin.marketing.param.*;
|
import com.niu.shop.service.admin.marketing.param.*;
|
||||||
import com.niu.shop.service.admin.marketing.IShopActiveService;
|
|
||||||
import com.niu.shop.service.admin.marketing.vo.*;
|
import com.niu.shop.service.admin.marketing.vo.*;
|
||||||
import com.niu.core.common.domain.PageParam;
|
import jakarta.annotation.Resource;
|
||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
import jakarta.annotation.Resource;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 限时折扣控制器
|
* 限时折扣控制器
|
||||||
@ -165,4 +164,4 @@ public class ShopDiscountController {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -109,7 +109,7 @@ public class CouponController {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@GetMapping("/coupon/components")
|
@GetMapping("/coupon/components")
|
||||||
public Result<List<ShopCouponListVo>> components(@RequestParam(name = "coupon_ids", defaultValue = "") String couponIds, @RequestParam(name = "num", defaultValue = "4") Integer num) {
|
public Result<List<ShopCouponListVo>> components(@RequestParam(name = "coupon_ids", defaultValue = "") Integer[] couponIds, @RequestParam(name = "num", defaultValue = "4") Integer num) {
|
||||||
return Result.success(couponService.getCouponComponents(couponIds, num));
|
return Result.success(couponService.getCouponComponents(couponIds, num));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -121,7 +121,7 @@ public class CouponController {
|
|||||||
*/
|
*/
|
||||||
@GetMapping("/coupon/qrcode/{id}")
|
@GetMapping("/coupon/qrcode/{id}")
|
||||||
public Result<Object> qrcode(@PathVariable("id") Integer id) {
|
public Result<Object> qrcode(@PathVariable("id") Integer id) {
|
||||||
return null;
|
return Result.success("", couponService.getQrcode(id));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -0,0 +1,35 @@
|
|||||||
|
package com.niu.shop.enums.order;
|
||||||
|
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Getter;
|
||||||
|
|
||||||
|
|
||||||
|
@Getter
|
||||||
|
@AllArgsConstructor
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 订单配送状态
|
||||||
|
*/
|
||||||
|
public enum DeliveryStatusEnum {
|
||||||
|
|
||||||
|
|
||||||
|
HAVE_DELIVERED("已配送", 1),
|
||||||
|
NO_DELIVERED("未配送", 0);
|
||||||
|
|
||||||
|
private final String name;
|
||||||
|
|
||||||
|
private final Integer status;
|
||||||
|
|
||||||
|
public static String getNameByStatus(Integer status){
|
||||||
|
for (DeliveryStatusEnum item: DeliveryStatusEnum.values()) {
|
||||||
|
if(item.getStatus().equals(status))
|
||||||
|
{
|
||||||
|
return item.getName();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,35 @@
|
|||||||
|
package com.niu.shop.enums.order;
|
||||||
|
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Getter;
|
||||||
|
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
@Getter
|
||||||
|
@AllArgsConstructor
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 退款状态
|
||||||
|
*/
|
||||||
|
public enum RefundSatusEnum {
|
||||||
|
NOT_REFUND("不存在退款", 1),
|
||||||
|
PORTION_REFUND("部分退款", 2),
|
||||||
|
ALL_REFUND("全部退款", 3);
|
||||||
|
|
||||||
|
private final String name;
|
||||||
|
|
||||||
|
private final Integer status;
|
||||||
|
|
||||||
|
public static String getNameByType(Integer status){
|
||||||
|
for (RefundSatusEnum item: RefundSatusEnum.values()) {
|
||||||
|
if(item.getStatus().equals(status))
|
||||||
|
{
|
||||||
|
return item.getName();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,224 @@
|
|||||||
|
package com.niu.shop.listener.export;
|
||||||
|
|
||||||
|
import cn.hutool.core.collection.CollStreamUtil;
|
||||||
|
import cn.hutool.core.collection.CollectionUtil;
|
||||||
|
import cn.hutool.core.util.ObjectUtil;
|
||||||
|
import cn.hutool.json.JSONArray;
|
||||||
|
import cn.hutool.json.JSONObject;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.niu.core.common.annotation.EventCallback;
|
||||||
|
import com.niu.core.common.domain.PageParam;
|
||||||
|
import com.niu.core.common.utils.date.DateUtils;
|
||||||
|
import com.niu.core.entity.member.Member;
|
||||||
|
import com.niu.core.entity.pay.Pay;
|
||||||
|
import com.niu.core.enums.common.ChannelEnum;
|
||||||
|
import com.niu.core.enums.pay.PayTypeEnum;
|
||||||
|
import com.niu.core.event.sys.ExportDataEventDefiner;
|
||||||
|
import com.niu.core.mapper.member.MemberMapper;
|
||||||
|
import com.niu.core.mapper.pay.PayMapper;
|
||||||
|
import com.niu.shop.entity.delivery.ShopDeliveryCompany;
|
||||||
|
import com.niu.shop.entity.delivery.ShopStore;
|
||||||
|
import com.niu.shop.entity.order.ShopInvoice;
|
||||||
|
import com.niu.shop.entity.order.ShopOrder;
|
||||||
|
import com.niu.shop.entity.order.ShopOrderDelivery;
|
||||||
|
import com.niu.shop.entity.order.ShopOrderGoods;
|
||||||
|
import com.niu.shop.enums.goods.GoodsTypeEnum;
|
||||||
|
import com.niu.shop.enums.order.*;
|
||||||
|
import com.niu.shop.mapper.delivery.ShopDeliveryCompanyMapper;
|
||||||
|
import com.niu.shop.mapper.delivery.ShopStoreMapper;
|
||||||
|
import com.niu.shop.mapper.order.ShopInvoiceMapper;
|
||||||
|
import com.niu.shop.mapper.order.ShopOrderDeliveryMapper;
|
||||||
|
import com.niu.shop.mapper.order.ShopOrderGoodsMapper;
|
||||||
|
import com.niu.shop.mapper.order.ShopOrderMapper;
|
||||||
|
import lombok.Setter;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
import java.util.*;
|
||||||
|
import java.util.function.Supplier;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
@Setter
|
||||||
|
@Component
|
||||||
|
@EventCallback("shop")
|
||||||
|
public class ShopExportDataListener extends ExportDataEventDefiner {
|
||||||
|
private PayMapper payMapper;
|
||||||
|
private MemberMapper memberMapper;
|
||||||
|
private ShopStoreMapper shopStoreMapper;
|
||||||
|
private ShopOrderMapper shopOrderMapper;
|
||||||
|
private ShopInvoiceMapper shopInvoiceMapper;
|
||||||
|
private ShopOrderGoodsMapper shopOrderGoodsMapper;
|
||||||
|
private ShopOrderDeliveryMapper shopOrderDeliveryMapper;
|
||||||
|
private ShopDeliveryCompanyMapper shopDeliveryCompanyMapper;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ExportDataEventResult handleCallback(ExportDataEvent event) {
|
||||||
|
ExportDataEventResult result = new ExportDataEventResult();
|
||||||
|
if (!"shop_order_goods".equals(event.getType())) {
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
QueryWrapper<ShopOrder> orderQueryWrapper = new QueryWrapper<>();
|
||||||
|
orderQueryWrapper.eq("site_id", event.getSiteId())
|
||||||
|
.orderByDesc("create_time");
|
||||||
|
List<ShopOrder> shopOrders = shopOrderMapper.selectList(orderQueryWrapper);
|
||||||
|
Set<Integer> orderIds = CollStreamUtil.toSet(shopOrders, ShopOrder::getOrderId);
|
||||||
|
if (ObjectUtil.isEmpty(orderIds)) {
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
QueryWrapper<ShopOrderGoods> goodsQueryWrapper = new QueryWrapper<>();
|
||||||
|
goodsQueryWrapper.eq("site_id", event.getSiteId())
|
||||||
|
.in("order_id", orderIds);
|
||||||
|
Supplier<List<ShopOrderGoods>> supplier = () -> shopOrderGoodsMapper.selectList(goodsQueryWrapper);
|
||||||
|
PageParam page = event.getPageParam();
|
||||||
|
if (page.getPage() != null && page.getPage() > 0 && page.getLimit() != null && page.getLimit() > 0) {
|
||||||
|
supplier = () -> shopOrderGoodsMapper.selectPage(new Page<>(page.getPage(), page.getLimit()), goodsQueryWrapper).getRecords();
|
||||||
|
}
|
||||||
|
return exportData(shopOrders, supplier);
|
||||||
|
}
|
||||||
|
|
||||||
|
private ExportDataEventResult exportData(List<ShopOrder> shopOrders, Supplier<List<ShopOrderGoods>> supplier) {
|
||||||
|
QueryWrapper<Pay> payQueryWrapper = new QueryWrapper<>();
|
||||||
|
Set<String> outTradeNos = CollStreamUtil.toSet(shopOrders, ShopOrder::getOutTradeNo);
|
||||||
|
payQueryWrapper.in("out_trade_no", outTradeNos);
|
||||||
|
Map<String, Pay> payMap = payMapper.selectList(payQueryWrapper).stream().collect(Collectors.toMap(Pay::getOutTradeNo, o -> o));
|
||||||
|
Set<Integer> memberIds = CollStreamUtil.toSet(shopOrders, ShopOrder::getMemberId);
|
||||||
|
Map<Integer, Member> memberMap = memberMapper.selectBatchIds(memberIds).stream().collect(Collectors.toMap(Member::getMemberId, o -> o));
|
||||||
|
Set<Integer> takeStoreIds = CollStreamUtil.toSet(shopOrders, ShopOrder::getTakeStoreId);
|
||||||
|
Map<Integer, ShopStore> storeMap = shopStoreMapper.selectBatchIds(takeStoreIds).stream().collect(Collectors.toMap(ShopStore::getStoreId, o -> o));
|
||||||
|
Set<Integer> invoiceIds = CollStreamUtil.toSet(shopOrders, ShopOrder::getInvoiceId);
|
||||||
|
Map<Integer, ShopInvoice> invoiceMap = Collections.emptyMap();
|
||||||
|
if (ObjectUtil.isNotEmpty(invoiceIds)) {
|
||||||
|
QueryWrapper<ShopInvoice> invoiceQueryWrapper = new QueryWrapper<>();
|
||||||
|
invoiceQueryWrapper.in("id", invoiceIds)
|
||||||
|
.eq("status", InvoiceStatusEnum.OPEN.getStatus());
|
||||||
|
invoiceMap = shopInvoiceMapper.selectList(invoiceQueryWrapper).stream().collect(Collectors.toMap(ShopInvoice::getId, o -> o));
|
||||||
|
}
|
||||||
|
Map<Integer, ShopOrder> orderMap = shopOrders.stream().collect(Collectors.toMap(ShopOrder::getOrderId, o -> o));
|
||||||
|
Set<Integer> encountered = new HashSet<>();
|
||||||
|
List<ShopOrderGoods> records = supplier.get();
|
||||||
|
JSONArray result = new JSONArray(CollectionUtil.size(records));
|
||||||
|
Map<Integer, ShopOrderDelivery> deliveryMap = Collections.emptyMap();
|
||||||
|
Set<Integer> deliveryIds = CollStreamUtil.toSet(records, ShopOrderGoods::getDeliveryId);
|
||||||
|
if (ObjectUtil.isEmpty(deliveryIds)) {
|
||||||
|
deliveryMap = shopOrderDeliveryMapper.selectBatchIds(deliveryIds).stream().collect(Collectors.toMap(ShopOrderDelivery::getId, o -> o));
|
||||||
|
}
|
||||||
|
Map<Integer, ShopDeliveryCompany> deliveryCompanyMap = Collections.emptyMap();
|
||||||
|
Set<Integer> deliveryCompanyIds = CollStreamUtil.toSet(deliveryMap.values(), ShopOrderDelivery::getExpressCompanyId);
|
||||||
|
if (ObjectUtil.isNotEmpty(deliveryCompanyIds)) {
|
||||||
|
deliveryCompanyMap = shopDeliveryCompanyMapper.selectBatchIds(deliveryCompanyIds).stream()
|
||||||
|
.collect(Collectors.toMap(ShopDeliveryCompany::getCompanyId, e -> e));
|
||||||
|
}
|
||||||
|
for (ShopOrderGoods record : records) {
|
||||||
|
boolean isFirst = !encountered.contains(record.getOrderId());
|
||||||
|
if (isFirst) {
|
||||||
|
encountered.add(record.getOrderId());
|
||||||
|
}
|
||||||
|
ShopOrder order = orderMap.get(record.getOrderId());
|
||||||
|
Member member = memberMap.get(record.getMemberId());
|
||||||
|
Pay pay = payMap.get(order.getOutTradeNo());
|
||||||
|
ShopStore store = storeMap.get(order.getTakeStoreId());
|
||||||
|
ShopInvoice invoice = invoiceMap.get(order.getInvoiceId());
|
||||||
|
|
||||||
|
JSONObject ret = new JSONObject();
|
||||||
|
boolean memberFirst = isFirst && member != null;
|
||||||
|
boolean invoiceFirst = isFirst && invoice != null;
|
||||||
|
boolean storeFirst = isFirst && store != null;
|
||||||
|
ret.set("order_no", isFirst ? order.getOrderNo() + "\t" : "");
|
||||||
|
ret.set("order_goods_id", isFirst ? record.getOrderGoodsId() + "\t" : "");
|
||||||
|
ret.set("goods_name", record.getGoodsName());
|
||||||
|
ret.set("sku_name", record.getSkuName());
|
||||||
|
ret.set("member_no", memberFirst ? member.getMemberNo() : "");
|
||||||
|
ret.set("nickname", memberFirst ? member.getNickname() : "");
|
||||||
|
ret.set("mobile", memberFirst ? member.getMobile() : "");
|
||||||
|
ret.set("price", record.getPrice());
|
||||||
|
ret.set("num", record.getNum());
|
||||||
|
ret.set("goods_money", record.getGoodsMoney());
|
||||||
|
//优惠金额
|
||||||
|
ret.set("discount_money", isFirst ? order.getDiscountMoney() : "");
|
||||||
|
//订单项实付金额
|
||||||
|
ret.set("order_goods_money", isFirst ? order.getOrderMoney() : "");
|
||||||
|
ret.set("order_from_name", isFirst ? ChannelEnum.getNameByCode(order.getOrderFrom()) : "");
|
||||||
|
ret.set("goods_type_name", isFirst ? GoodsTypeEnum.getNameByType(record.getGoodsType()) : "");
|
||||||
|
ret.set("taker_name", isFirst ? order.getTakerName() : "");
|
||||||
|
ret.set("taker_mobile", isFirst ? order.getTakerMobile() + "\t" : "");
|
||||||
|
ret.set("taker_full_address", isFirst ? order.getTakerFullAddress() : "");
|
||||||
|
ret.set("delivery_type_name", isFirst ?
|
||||||
|
OrderDeliveryTypeEnum.getNameByType(order.getDeliveryType()) : "");
|
||||||
|
//配送状态
|
||||||
|
ShopOrderDelivery shopOrderDelivery = deliveryMap.get(record.getStatus());
|
||||||
|
if (shopOrderDelivery!=null){
|
||||||
|
ret.set("delivery_status_name", isFirst ? DeliveryStatusEnum.getNameByStatus(shopOrderDelivery.getStatus()) : "");
|
||||||
|
}
|
||||||
|
ret.set("delivery_money", isFirst ? order.getDeliveryMoney() : "");
|
||||||
|
//订单状态
|
||||||
|
ret.set("order_status_name", isFirst ? OrderStatusEnum.getNameByStatus(Integer.parseInt(order.getStatus())) : "");
|
||||||
|
ret.set("create_time", isFirst ? DateUtils.timestampToString(order.getCreateTime()) : "");
|
||||||
|
ret.set("pay_time", isFirst && order.getPayTime() != null ? DateUtils.timestampToString(order.getPayTime()) : "");
|
||||||
|
ret.set("delivery_time", isFirst && order.getDeliveryTime() != null ? DateUtils.timestampToString(order.getDeliveryTime()) : "");
|
||||||
|
ret.set("finish_time", isFirst && order.getFinishTime() != null ? DateUtils.timestampToString(order.getFinishTime()) : "");
|
||||||
|
ret.set("member_remark", isFirst ? order.getMemberRemark() : "");
|
||||||
|
ret.set("shop_remark", isFirst ? order.getShopRemark() : "");
|
||||||
|
ret.set("out_trade_no", isFirst ? order.getOutTradeNo()+ "\t" : "");
|
||||||
|
ret.set("pay_type", isFirst && pay != null ? PayTypeEnum.getType().getByPath(pay.getType() + ".name", String.class) : "");
|
||||||
|
//退款单号
|
||||||
|
ret.set("order_refund_no", isFirst ? record.getOrderRefundNo() + "\t": "");
|
||||||
|
//退款状态
|
||||||
|
ret.set("status_name", isFirst ? RefundSatusEnum.getNameByType(order.getRefundStatus()) : "");
|
||||||
|
ShopOrderDelivery delivery = deliveryMap.get(record.getDeliveryId());
|
||||||
|
if (delivery != null) {
|
||||||
|
ret.set("express_number", isFirst ? delivery.getExpressNumber() + "\t" : "");
|
||||||
|
ShopDeliveryCompany company = deliveryCompanyMap.get(delivery.getExpressCompanyId());
|
||||||
|
ret.set("company_name", isFirst ? Optional.ofNullable(company).map(ShopDeliveryCompany::getCompanyName).orElse("") : "");
|
||||||
|
} else {
|
||||||
|
ret.set("express_number", "");
|
||||||
|
ret.set("company_name", "");
|
||||||
|
}
|
||||||
|
result.add(ret);
|
||||||
|
}
|
||||||
|
|
||||||
|
ExportDataEventResult eventResult = new ExportDataEventResult();
|
||||||
|
eventResult.setResultData(result);
|
||||||
|
return eventResult;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
public void setPayMapper(PayMapper payMapper) {
|
||||||
|
this.payMapper = payMapper;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
public void setMemberMapper(MemberMapper memberMapper) {
|
||||||
|
this.memberMapper = memberMapper;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
public void setShopStoreMapper(ShopStoreMapper shopStoreMapper) {
|
||||||
|
this.shopStoreMapper = shopStoreMapper;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
public void setShopOrderMapper(ShopOrderMapper shopOrderMapper) {
|
||||||
|
this.shopOrderMapper = shopOrderMapper;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
public void setShopInvoiceMapper(ShopInvoiceMapper shopInvoiceMapper) {
|
||||||
|
this.shopInvoiceMapper = shopInvoiceMapper;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
public void setShopOrderGoodsMapper(ShopOrderGoodsMapper shopOrderGoodsMapper) {
|
||||||
|
this.shopOrderGoodsMapper = shopOrderGoodsMapper;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
public void setShopOrderDeliveryMapper(ShopOrderDeliveryMapper shopOrderDeliveryMapper) {
|
||||||
|
this.shopOrderDeliveryMapper = shopOrderDeliveryMapper;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
public void setShopDeliveryCompanyMapper(ShopDeliveryCompanyMapper shopDeliveryCompanyMapper) {
|
||||||
|
this.shopDeliveryCompanyMapper = shopDeliveryCompanyMapper;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -25,6 +25,7 @@ import com.niu.shop.entity.order.ShopOrderDelivery;
|
|||||||
import com.niu.shop.entity.order.ShopOrderGoods;
|
import com.niu.shop.entity.order.ShopOrderGoods;
|
||||||
import com.niu.shop.enums.order.InvoiceStatusEnum;
|
import com.niu.shop.enums.order.InvoiceStatusEnum;
|
||||||
import com.niu.shop.enums.order.InvoiceTypeEnum;
|
import com.niu.shop.enums.order.InvoiceTypeEnum;
|
||||||
|
import com.niu.shop.enums.order.OrderDeliveryTypeEnum;
|
||||||
import com.niu.shop.enums.order.OrderStatusEnum;
|
import com.niu.shop.enums.order.OrderStatusEnum;
|
||||||
import com.niu.shop.mapper.delivery.ShopDeliveryCompanyMapper;
|
import com.niu.shop.mapper.delivery.ShopDeliveryCompanyMapper;
|
||||||
import com.niu.shop.mapper.delivery.ShopStoreMapper;
|
import com.niu.shop.mapper.delivery.ShopStoreMapper;
|
||||||
@ -56,10 +57,9 @@ public class ShopOrderExportDataListener extends ExportDataEventDefiner {
|
|||||||
@Override
|
@Override
|
||||||
public ExportDataEventResult handleCallback(ExportDataEvent event) {
|
public ExportDataEventResult handleCallback(ExportDataEvent event) {
|
||||||
ExportDataEventResult result = new ExportDataEventResult();
|
ExportDataEventResult result = new ExportDataEventResult();
|
||||||
if (!event.getType().equals("shop_order")) {
|
if (!"shop_order".equals(event.getType())) {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
QueryWrapper<ShopOrder> orderQueryWrapper = new QueryWrapper<>();
|
QueryWrapper<ShopOrder> orderQueryWrapper = new QueryWrapper<>();
|
||||||
orderQueryWrapper.eq("site_id", event.getSiteId())
|
orderQueryWrapper.eq("site_id", event.getSiteId())
|
||||||
.orderByDesc("create_time");
|
.orderByDesc("create_time");
|
||||||
@ -156,7 +156,8 @@ public class ShopOrderExportDataListener extends ExportDataEventDefiner {
|
|||||||
ret.set("taker_name", isFirst ? order.getTakerName() : "");
|
ret.set("taker_name", isFirst ? order.getTakerName() : "");
|
||||||
ret.set("taker_mobile", isFirst ? order.getTakerMobile() + "\t" : "");
|
ret.set("taker_mobile", isFirst ? order.getTakerMobile() + "\t" : "");
|
||||||
ret.set("taker_full_address", isFirst ? order.getTakerFullAddress() : "");
|
ret.set("taker_full_address", isFirst ? order.getTakerFullAddress() : "");
|
||||||
ret.set("delivery_type_name", isFirst ? order.getDeliveryType() : "");
|
ret.set("delivery_type_name", isFirst ?
|
||||||
|
OrderDeliveryTypeEnum.getNameByType(order.getDeliveryType()) : "");
|
||||||
ret.set("status_name", isFirst ? OrderStatusEnum.getNameByStatus(Integer.parseInt(order.getStatus())) : "");
|
ret.set("status_name", isFirst ? OrderStatusEnum.getNameByStatus(Integer.parseInt(order.getStatus())) : "");
|
||||||
ret.set("create_time", isFirst ? DateUtils.timestampToString(order.getCreateTime()) : "");
|
ret.set("create_time", isFirst ? DateUtils.timestampToString(order.getCreateTime()) : "");
|
||||||
ret.set("pay_time", isFirst && order.getPayTime() != null ? DateUtils.timestampToString(order.getPayTime()) : "");
|
ret.set("pay_time", isFirst && order.getPayTime() != null ? DateUtils.timestampToString(order.getPayTime()) : "");
|
||||||
|
|||||||
@ -0,0 +1,22 @@
|
|||||||
|
package com.niu.shop.listener.member;
|
||||||
|
|
||||||
|
import com.niu.core.common.annotation.EventListen;
|
||||||
|
import com.niu.core.common.component.context.listener.AbstractListener;
|
||||||
|
import com.niu.core.event.member.MemberLoginEvent;
|
||||||
|
import com.niu.core.event.member.MemberRegisterEvent;
|
||||||
|
import com.niu.shop.service.core.marketing.ICoreShopNewcomerService;
|
||||||
|
import jakarta.annotation.Resource;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
@EventListen("shop")
|
||||||
|
@Component
|
||||||
|
public class MemberLoginListener extends AbstractListener {
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private ICoreShopNewcomerService coreShopNewcomerService;
|
||||||
|
|
||||||
|
public void handleEvent(MemberLoginEvent event) {
|
||||||
|
//登录后判断是否是新人专享活动新人,如果未参与过,给与参与资格
|
||||||
|
coreShopNewcomerService.checkIfNewcomer(event.getSiteId(), event.getMember().getMemberId());
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,21 @@
|
|||||||
|
package com.niu.shop.listener.order;
|
||||||
|
|
||||||
|
import com.niu.core.common.annotation.EventListen;
|
||||||
|
import com.niu.core.entity.pay.Pay;
|
||||||
|
import com.niu.core.event.order.WapOrderDetailPathDefiner;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
@EventListen("shop")
|
||||||
|
@Component
|
||||||
|
public class WapOrderDetailPathListener extends WapOrderDetailPathDefiner {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public WapOrderDetailPathResult handleCallback(WapOrderDetailPathEvent event) {
|
||||||
|
Pay pay = event.getPay();
|
||||||
|
if (pay.getTradeType().equals("shop")) {
|
||||||
|
WapOrderDetailPathResult result = new WapOrderDetailPathResult();
|
||||||
|
result.setPath("addon/shop/pages/order/detail?order_id=" + pay.getTradeId());
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -92,7 +92,7 @@ public interface ICouponService {
|
|||||||
* @param num
|
* @param num
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
List<ShopCouponListVo> getCouponComponents(String couponIds, Integer num);
|
List<ShopCouponListVo> getCouponComponents(Integer[] couponIds, Integer num);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取优惠券二维码
|
* 获取优惠券二维码
|
||||||
|
|||||||
@ -9,6 +9,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|||||||
import com.niu.core.common.domain.PageParam;
|
import com.niu.core.common.domain.PageParam;
|
||||||
import com.niu.core.common.domain.PageResult;
|
import com.niu.core.common.domain.PageResult;
|
||||||
import com.niu.core.common.exception.ApiException;
|
import com.niu.core.common.exception.ApiException;
|
||||||
|
import com.niu.core.common.utils.QrcodeUtils;
|
||||||
import com.niu.core.common.utils.RequestUtils;
|
import com.niu.core.common.utils.RequestUtils;
|
||||||
import com.niu.shop.entity.coupon.ShopCoupon;
|
import com.niu.shop.entity.coupon.ShopCoupon;
|
||||||
import com.niu.shop.entity.coupon.ShopCouponGoods;
|
import com.niu.shop.entity.coupon.ShopCouponGoods;
|
||||||
@ -28,6 +29,8 @@ import org.springframework.stereotype.Service;
|
|||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
import jakarta.annotation.Resource;
|
import jakarta.annotation.Resource;
|
||||||
|
import org.springframework.util.Assert;
|
||||||
|
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
@ -345,14 +348,14 @@ public class ICouponServiceImpl implements ICouponService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<ShopCouponListVo> getCouponComponents(String couponIds, Integer num) {
|
public List<ShopCouponListVo> getCouponComponents(Integer[] couponIds, Integer num) {
|
||||||
|
|
||||||
QueryWrapper<ShopCoupon> queryWrapper = new QueryWrapper<>();
|
QueryWrapper<ShopCoupon> queryWrapper = new QueryWrapper<>();
|
||||||
queryWrapper.eq("site_id", RequestUtils.siteId());
|
queryWrapper.eq("site_id", RequestUtils.siteId());
|
||||||
queryWrapper.eq("status", CouponStatusEnum.NORMAL.getStatus());
|
queryWrapper.eq("status", CouponStatusEnum.NORMAL.getStatus());
|
||||||
queryWrapper.eq("receive_type", CouponReceiveTypeEnum.USER.getType());
|
queryWrapper.eq("receive_type", CouponReceiveTypeEnum.USER.getType());
|
||||||
if (!couponIds.equals("")) {
|
if (ObjectUtil.isNotEmpty(couponIds)) {
|
||||||
queryWrapper.in("coupon_id", Arrays.asList(couponIds.split(",")));
|
queryWrapper.in("id", couponIds);
|
||||||
}
|
}
|
||||||
|
|
||||||
//根据时间查询
|
//根据时间查询
|
||||||
@ -373,7 +376,14 @@ public class ICouponServiceImpl implements ICouponService {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getQrcode(Integer couponId) {
|
public String getQrcode(Integer couponId) {
|
||||||
return null;
|
ShopCoupon coupon = shopCouponMapper.selectById(couponId);
|
||||||
|
Assert.notNull(coupon, "优惠券不存在");
|
||||||
|
|
||||||
|
Map<String, Object> data = new HashMap<>();
|
||||||
|
data.put("mid", RequestUtils.memberId());
|
||||||
|
data.put("coupon_id", couponId);
|
||||||
|
|
||||||
|
return QrcodeUtils.qrcodeToFile(RequestUtils.siteId(), RequestUtils.channel(), "", "addon/shop/pages/coupon/detail", data, "");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -6,6 +6,8 @@ import com.alibaba.fastjson2.JSON;
|
|||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.github.yulichang.query.MPJQueryWrapper;
|
||||||
|
import com.niu.core.common.config.GlobalConfig;
|
||||||
import com.niu.core.common.domain.PageParam;
|
import com.niu.core.common.domain.PageParam;
|
||||||
import com.niu.core.common.utils.RequestUtils;
|
import com.niu.core.common.utils.RequestUtils;
|
||||||
import com.niu.core.enums.upload.UploadThumbTypeEnum;
|
import com.niu.core.enums.upload.UploadThumbTypeEnum;
|
||||||
@ -176,26 +178,28 @@ public class ShopNewcomerServiceImpl implements IShopNewcomerService {
|
|||||||
.filter(activeSkuIds::contains)
|
.filter(activeSkuIds::contains)
|
||||||
.collect(Collectors.toSet());
|
.collect(Collectors.toSet());
|
||||||
|
|
||||||
var shopGoodsSkuLambdaQueryWrapper = new LambdaQueryWrapper<ShopGoodsSku>()
|
var goodsSkuQueryWrapper = new MPJQueryWrapper<ShopGoodsSku>()
|
||||||
.eq(ShopGoodsSku::getSiteId, RequestUtils.siteId())
|
.setAlias("gs")
|
||||||
.in(ShopGoodsSku::getSkuId, skuIds)
|
.leftJoin("?_shop_goods g ON gs.goods_id = g.goods_id".replace("?_", GlobalConfig.tablePrefix))
|
||||||
.orderByDesc(ShopGoodsSku::getSaleNum)
|
.select("gs.*,g.goods_name")
|
||||||
.orderByDesc(ShopGoodsSku::getStock);
|
.eq("gs.site_id", RequestUtils.siteId())
|
||||||
|
.in("gs.sku_id", skuIds)
|
||||||
|
.orderByDesc("gs.sale_num")
|
||||||
|
.orderByDesc("gs.stock");
|
||||||
|
|
||||||
if (param.getLimit() != null && param.getLimit() > 0) {
|
if (param.getLimit() != null && param.getLimit() > 0) {
|
||||||
shopGoodsSkuLambdaQueryWrapper.last("limit " + param.getLimit());
|
goodsSkuQueryWrapper.last("limit " + param.getLimit());
|
||||||
}
|
}
|
||||||
|
|
||||||
var shopGoodsSkuList = shopGoodsSkuMapper.selectList(shopGoodsSkuLambdaQueryWrapper);
|
List<ShopNewComerComponentsListVo.GoodsSku> skuList = shopGoodsSkuMapper.selectJoinList(ShopNewComerComponentsListVo.GoodsSku.class, goodsSkuQueryWrapper);
|
||||||
|
|
||||||
var skuList = new ArrayList<ShopNewComerComponentsListVo.GoodsSku>(shopGoodsSkuList.size());
|
for (var goodsSku : skuList) {
|
||||||
for (var sku : shopGoodsSkuList) {
|
var shopActiveGoods = goodsMap.getOrDefault(goodsSku.getSkuId(), new ShopActiveGoods());
|
||||||
var goodsSku = new ShopNewComerComponentsListVo.GoodsSku();
|
|
||||||
BeanUtils.copyProperties(sku, goodsSku);
|
|
||||||
var shopActiveGoods = goodsMap.getOrDefault(sku.getSkuId(), new ShopActiveGoods());
|
|
||||||
var value = JSON.parseObject(shopActiveGoods.getActiveGoodsValue());
|
var value = JSON.parseObject(shopActiveGoods.getActiveGoodsValue());
|
||||||
goodsSku.setNewcomerPrice(Optional.ofNullable(value.getBigDecimal("newcomer_price")).orElse(BigDecimal.ZERO));
|
goodsSku.setNewcomerPrice(Optional.ofNullable(value.getBigDecimal("newcomer_price")).orElse(BigDecimal.ZERO));
|
||||||
skuList.add(goodsSku);
|
ShopNewComerComponentsListVo.Goods goods = new ShopNewComerComponentsListVo.Goods();
|
||||||
|
goods.setGoodsName(goodsSku.getGoodsName());
|
||||||
|
goodsSku.setGoods(goods);
|
||||||
}
|
}
|
||||||
|
|
||||||
vo.setGoodsList(skuList);
|
vo.setGoodsList(skuList);
|
||||||
|
|||||||
@ -32,5 +32,12 @@ public class ShopNewComerComponentsListVo {
|
|||||||
private Integer isDefault; // 是否默认
|
private Integer isDefault; // 是否默认
|
||||||
private String memberPrice; // 会员价,json格式,指定会员价,数据结构为:{"level_1":"10.00","level_2":"10.00"}
|
private String memberPrice; // 会员价,json格式,指定会员价,数据结构为:{"level_1":"10.00","level_2":"10.00"}
|
||||||
private BigDecimal newcomerPrice;
|
private BigDecimal newcomerPrice;
|
||||||
|
private String goodsName;
|
||||||
|
private Goods goods;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public static class Goods {
|
||||||
|
private String goodsName;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -542,7 +542,7 @@ public abstract class OrderCreateHelper {
|
|||||||
// 清除订单缓存
|
// 清除订单缓存
|
||||||
removeOrderVo(vo.getOrderKey());
|
removeOrderVo(vo.getOrderKey());
|
||||||
|
|
||||||
if (order.getOrderMoney().equals(BigDecimal.ZERO)) {
|
if (order.getOrderMoney().compareTo(BigDecimal.ZERO) == 0) {
|
||||||
OrderPayParam orderPayParam = new OrderPayParam();
|
OrderPayParam orderPayParam = new OrderPayParam();
|
||||||
orderPayParam.setTradeId(order.getOrderId());
|
orderPayParam.setTradeId(order.getOrderId());
|
||||||
orderPayParam.setMainType(OrderLogMainTypeEnum.MEMBER.getType());
|
orderPayParam.setMainType(OrderLogMainTypeEnum.MEMBER.getType());
|
||||||
|
|||||||
@ -139,8 +139,6 @@ class CoreOrderConfigServiceImpl implements ICoreOrderConfigService {
|
|||||||
if (ObjectUtil.isEmpty(data)) {
|
if (ObjectUtil.isEmpty(data)) {
|
||||||
return new ShopOrderCloseVo(true, 20);
|
return new ShopOrderCloseVo(true, 20);
|
||||||
}
|
}
|
||||||
|
return JSONUtil.toBean(data, ShopOrderCloseVo.class);
|
||||||
JSONObject orderClose = JSONUtil.parseObj(data.get("order_close"));
|
|
||||||
return new ShopOrderCloseVo(orderClose.getBool("is_close"), orderClose.getInt("close_length"));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -17,6 +17,8 @@ import com.niu.core.entity.pay.Pay;
|
|||||||
import com.niu.core.enums.pay.PayTypeEnum;
|
import com.niu.core.enums.pay.PayTypeEnum;
|
||||||
import com.niu.core.mapper.pay.PayMapper;
|
import com.niu.core.mapper.pay.PayMapper;
|
||||||
import com.niu.core.service.core.app.helper.EventAndSubscribeOfPublisher;
|
import com.niu.core.service.core.app.helper.EventAndSubscribeOfPublisher;
|
||||||
|
import com.niu.core.service.core.pay.ICorePayChannelService;
|
||||||
|
import com.niu.core.service.core.weapp.ICoreWeappDeliveryService;
|
||||||
import com.niu.shop.entity.goods.ShopGoods;
|
import com.niu.shop.entity.goods.ShopGoods;
|
||||||
import com.niu.shop.entity.order.ShopOrder;
|
import com.niu.shop.entity.order.ShopOrder;
|
||||||
import com.niu.shop.entity.order.ShopOrderDelivery;
|
import com.niu.shop.entity.order.ShopOrderDelivery;
|
||||||
@ -40,12 +42,15 @@ import com.niu.shop.service.core.order.ICoreOrderFinishService;
|
|||||||
import com.niu.shop.service.core.order.param.OrderDeliveryDataParam;
|
import com.niu.shop.service.core.order.param.OrderDeliveryDataParam;
|
||||||
import com.niu.shop.service.core.order.param.OrderDeliveryParam;
|
import com.niu.shop.service.core.order.param.OrderDeliveryParam;
|
||||||
import com.niu.shop.service.core.order.param.OrderFinishParam;
|
import com.niu.shop.service.core.order.param.OrderFinishParam;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.context.annotation.Lazy;
|
import org.springframework.context.annotation.Lazy;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import jakarta.annotation.Resource;
|
import jakarta.annotation.Resource;
|
||||||
|
|
||||||
import java.time.Instant;
|
import java.time.Instant;
|
||||||
|
import java.time.OffsetDateTime;
|
||||||
|
import java.time.format.DateTimeFormatter;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.LinkedList;
|
import java.util.LinkedList;
|
||||||
@ -54,6 +59,7 @@ import java.util.concurrent.TimeUnit;
|
|||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
@Service
|
@Service
|
||||||
|
@Slf4j
|
||||||
public class CoreOrderDeliveryServiceImpl implements ICoreOrderDeliveryService {
|
public class CoreOrderDeliveryServiceImpl implements ICoreOrderDeliveryService {
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
@ -78,6 +84,12 @@ public class CoreOrderDeliveryServiceImpl implements ICoreOrderDeliveryService {
|
|||||||
@Resource
|
@Resource
|
||||||
PayMapper payMapper;
|
PayMapper payMapper;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
ICoreWeappDeliveryService coreWeappDeliveryService;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
ICorePayChannelService corePayChannelService;
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
public void setOrderFinishService(@Lazy ICoreOrderFinishService orderFinishService) {
|
public void setOrderFinishService(@Lazy ICoreOrderFinishService orderFinishService) {
|
||||||
this.orderFinishService = orderFinishService;
|
this.orderFinishService = orderFinishService;
|
||||||
@ -396,7 +408,20 @@ public class CoreOrderDeliveryServiceImpl implements ICoreOrderDeliveryService {
|
|||||||
public void orderShippingUploadShippingInfo(ShopOrder order) {
|
public void orderShippingUploadShippingInfo(ShopOrder order) {
|
||||||
try {
|
try {
|
||||||
Pay pay = payMapper.selectOne(new QueryWrapper<Pay>().eq("out_trade_no", order.getOutTradeNo()));
|
Pay pay = payMapper.selectOne(new QueryWrapper<Pay>().eq("out_trade_no", order.getOutTradeNo()));
|
||||||
if (pay == null || !pay.getType().equals("wechatpay")) return;
|
log.info("shopOrder UploadShippingInfo:{}", JSONUtil.toJsonStr(pay));
|
||||||
|
if (!pay.getType().equals("wechatpay") || !pay.getChannel().equals("weapp")) return;
|
||||||
|
|
||||||
|
// 检测微信小程序是否已开通发货信息管理服务
|
||||||
|
if (!coreWeappDeliveryService.getIsTradeManaged(order.getSiteId()).getIsTradeManaged()) return;
|
||||||
|
|
||||||
|
// 设置消息跳转路径设置接口
|
||||||
|
WxMaOrderShippingInfoBaseResponse setResult = coreWeappDeliveryService.setMsgJumpPath(order.getSiteId(), "shop_order");
|
||||||
|
if (!setResult.getErrCode().equals(0)) {
|
||||||
|
log.info("giftcardOrder UploadShippingInfo setMsgJumpPath", setResult.getErrMsg());
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
JSONObject config = ObjectUtil.defaultIfNull(corePayChannelService.getConfigByChannelAndType(pay.getSiteId(), pay.getChannel(), pay.getType()), new JSONObject());
|
||||||
|
|
||||||
WxMaService miniapp = WechatUtils.miniapp(order.getSiteId());
|
WxMaService miniapp = WechatUtils.miniapp(order.getSiteId());
|
||||||
|
|
||||||
@ -406,9 +431,10 @@ public class CoreOrderDeliveryServiceImpl implements ICoreOrderDeliveryService {
|
|||||||
OrderKeyBean orderKey = new OrderKeyBean();
|
OrderKeyBean orderKey = new OrderKeyBean();
|
||||||
orderKey.setOrderNumberType(1);
|
orderKey.setOrderNumberType(1);
|
||||||
orderKey.setOutTradeNo(order.getOutTradeNo());
|
orderKey.setOutTradeNo(order.getOutTradeNo());
|
||||||
|
orderKey.setMchId(config.getStr("mch_id", ""));
|
||||||
request.setOrderKey(orderKey);
|
request.setOrderKey(orderKey);
|
||||||
|
|
||||||
request.setUploadTime(Instant.now().plusMillis(TimeUnit.HOURS.toMillis(8)).toString());
|
request.setUploadTime(OffsetDateTime.now().format(DateTimeFormatter.ISO_OFFSET_DATE_TIME));
|
||||||
|
|
||||||
// 物流模式,发货方式枚举值:1、实体物流配送采用快递公司进行实体物流配送形式 2、同城配送 3、虚拟商品,虚拟商品,例如话费充值,点卡等,无实体配送形式 4、用户自提
|
// 物流模式,发货方式枚举值:1、实体物流配送采用快递公司进行实体物流配送形式 2、同城配送 3、虚拟商品,虚拟商品,例如话费充值,点卡等,无实体配送形式 4、用户自提
|
||||||
if (order.getDeliveryType().equals(OrderDeliveryTypeEnum.EXPRESS.getType())) {
|
if (order.getDeliveryType().equals(OrderDeliveryTypeEnum.EXPRESS.getType())) {
|
||||||
@ -427,10 +453,10 @@ public class CoreOrderDeliveryServiceImpl implements ICoreOrderDeliveryService {
|
|||||||
|
|
||||||
// 物流信息列表
|
// 物流信息列表
|
||||||
List<ShopOrderDelivery> packageList = shopOrderDeliveryMapper.selectJoinList(ShopOrderDelivery.class, new MPJQueryWrapper<ShopOrderDelivery>()
|
List<ShopOrderDelivery> packageList = shopOrderDeliveryMapper.selectJoinList(ShopOrderDelivery.class, new MPJQueryWrapper<ShopOrderDelivery>()
|
||||||
.setAlias("d").innerJoin("?_shop_delivery_company c ON d.express_company_id = c.company_id".replace("?_", GlobalConfig.tablePrefix))
|
.setAlias("d").innerJoin("?_shop_delivery_company c ON d.express_company_id = c.company_id".replace("?_", GlobalConfig.tablePrefix))
|
||||||
.select("express_number,id,express_company_id,c.company_name AS name")
|
.select("express_number,id,express_company_id,c.company_name AS name")
|
||||||
.eq("order_id", order.getOrderId())
|
.eq("order_id", order.getOrderId())
|
||||||
.eq("d.site_id", order.getSiteId())
|
.eq("d.site_id", order.getSiteId())
|
||||||
);
|
);
|
||||||
|
|
||||||
List<WxMaExpressDelivery> expressDelivery = miniapp.getExpressService().getAllDelivery();
|
List<WxMaExpressDelivery> expressDelivery = miniapp.getExpressService().getAllDelivery();
|
||||||
@ -451,7 +477,7 @@ public class CoreOrderDeliveryServiceImpl implements ICoreOrderDeliveryService {
|
|||||||
}
|
}
|
||||||
ContactBean contact = new ContactBean();
|
ContactBean contact = new ContactBean();
|
||||||
contact.setReceiverContact(order.getTakerMobile().substring(0, 3) + "****" + order.getTakerMobile().substring(7));
|
contact.setReceiverContact(order.getTakerMobile().substring(0, 3) + "****" + order.getTakerMobile().substring(7));
|
||||||
ShopOrderGoods orderGoods = shopOrderGoodsMapper.selectOne(new QueryWrapper<ShopOrderGoods>().select("goods_name GROUP_CONCAT(SEPARATOR ';') AS goods_name").eq("delivery_id", shopOrderDelivery.getId()).groupBy("delivery_id"));
|
ShopOrderGoods orderGoods = shopOrderGoodsMapper.selectOne(new QueryWrapper<ShopOrderGoods>().select("GROUP_CONCAT(goods_name SEPARATOR ';') AS goods_name").eq("delivery_id", shopOrderDelivery.getId()).groupBy("delivery_id"));
|
||||||
shippingListBean.setItemDesc(orderGoods.getGoodsName());
|
shippingListBean.setItemDesc(orderGoods.getGoodsName());
|
||||||
shippingListBean.setContact(contact);
|
shippingListBean.setContact(contact);
|
||||||
|
|
||||||
@ -469,10 +495,10 @@ public class CoreOrderDeliveryServiceImpl implements ICoreOrderDeliveryService {
|
|||||||
request.setPayer(payer);
|
request.setPayer(payer);
|
||||||
|
|
||||||
WxMaOrderShippingInfoBaseResponse response = miniapp.getWxMaOrderShippingService().upload(request);
|
WxMaOrderShippingInfoBaseResponse response = miniapp.getWxMaOrderShippingService().upload(request);
|
||||||
System.out.println("uploadShippingInfo response " + response.toString());
|
System.out.println("shopOrder uploadShippingInfo response " + response.toString());
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
System.out.println("uploadShippingInfo error");
|
System.out.println("shopOrder uploadShippingInfo error");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
"title": "商城系统",
|
"title": "商城系统",
|
||||||
"desc": "实物虚拟商品,订单,物流同城配送,门店自提",
|
"desc": "实物虚拟商品,订单,物流同城配送,门店自提",
|
||||||
"key": "shop",
|
"key": "shop",
|
||||||
"version": "1.0.1",
|
"version": "1.0.2",
|
||||||
"author": "niucloud",
|
"author": "niucloud",
|
||||||
"type": "app",
|
"type": "app",
|
||||||
"support_app": "",
|
"support_app": "",
|
||||||
|
|||||||
@ -272,107 +272,173 @@
|
|||||||
},
|
},
|
||||||
"shop_order_goods": {
|
"shop_order_goods": {
|
||||||
"name": "订单项列表",
|
"name": "订单项列表",
|
||||||
"column": {
|
"column": [
|
||||||
"order_no": {
|
{
|
||||||
"name": "订单编号"
|
"order_no": {
|
||||||
|
"name": "订单编号"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"order_goods_id": {
|
{
|
||||||
"name": "子订单编号"
|
"order_goods_id": {
|
||||||
|
"name": "子订单编号"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"goods_name": {
|
{
|
||||||
"name": "商品名称"
|
"goods_name": {
|
||||||
|
"name": "商品名称"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"sku_name": {
|
{
|
||||||
"name": "商品规格名称"
|
"sku_name": {
|
||||||
|
"name": "商品规格名称"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"member_no": {
|
{
|
||||||
"name": "会员编号"
|
"member_no": {
|
||||||
|
"name": "会员编号"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"nickname": {
|
{
|
||||||
"name": "买家昵称"
|
"nickname": {
|
||||||
|
"name": "买家昵称"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"mobile": {
|
{
|
||||||
"name": "买家手机号"
|
"mobile": {
|
||||||
|
"name": "买家手机号"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"price": {
|
{
|
||||||
"name": "商品单价"
|
"price": {
|
||||||
|
"name": "商品单价"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"num": {
|
{
|
||||||
"name": "购买数量"
|
"num": {
|
||||||
|
"name": "购买数量"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"goods_money": {
|
{
|
||||||
"name": "商品总价"
|
"goods_money": {
|
||||||
|
"name": "商品总价"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"discount_money": {
|
{
|
||||||
"name": "优惠金额"
|
"discount_money": {
|
||||||
|
"name": "优惠金额"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"order_goods_money": {
|
{
|
||||||
"name": "订单项实付金额"
|
"order_goods_money": {
|
||||||
|
"name": "订单项实付金额"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"order_from_name": {
|
{
|
||||||
"name": "订单来源"
|
"order_from_name": {
|
||||||
|
"name": "订单来源"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"goods_type_name": {
|
{
|
||||||
"name": "商品类型"
|
"goods_type_name": {
|
||||||
|
"name": "商品类型"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"taker_name": {
|
{
|
||||||
"name": "收货人姓名"
|
"taker_name": {
|
||||||
|
"name": "收货人姓名"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"taker_mobile": {
|
{
|
||||||
"name": "收货人手机号"
|
"taker_mobile": {
|
||||||
|
"name": "收货人手机号"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"taker_full_address": {
|
{
|
||||||
"name": "收货地址"
|
"taker_full_address": {
|
||||||
|
"name": "收货地址"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"delivery_type_name": {
|
{
|
||||||
"name": "配送方式"
|
"delivery_type_name": {
|
||||||
|
"name": "配送方式"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"delivery_status_name": {
|
{
|
||||||
"name": "配送状态"
|
"delivery_status_name": {
|
||||||
|
"name": "配送状态"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"delivery_money": {
|
{
|
||||||
"name": "配送金额"
|
"delivery_money": {
|
||||||
|
"name": "配送金额"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"express_number": {
|
{
|
||||||
"name": "物流单号"
|
"express_number": {
|
||||||
|
"name": "物流单号"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"company_name": {
|
{
|
||||||
"name": "物流公司"
|
"company_name": {
|
||||||
|
"name": "物流公司"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"order_status_name": {
|
{
|
||||||
"name": "订单状态"
|
"order_status_name": {
|
||||||
|
"name": "订单状态"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"create_time": {
|
{
|
||||||
"name": "订单创建时间"
|
"create_time": {
|
||||||
|
"name": "订单创建时间"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"pay_time": {
|
{
|
||||||
"name": "订单支付时间"
|
"pay_time": {
|
||||||
|
"name": "订单支付时间"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"delivery_time": {
|
{
|
||||||
"name": "订单发货时间"
|
"delivery_time": {
|
||||||
|
"name": "订单发货时间"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"finish_time": {
|
{
|
||||||
"name": "订单完成时间"
|
"finish_time": {
|
||||||
|
"name": "订单完成时间"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"member_remark": {
|
{
|
||||||
"name": "买家留言"
|
"member_remark": {
|
||||||
|
"name": "买家留言"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"shop_remark": {
|
{
|
||||||
"name": "商家备注"
|
"shop_remark": {
|
||||||
|
"name": "商家备注"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"out_trade_no": {
|
{
|
||||||
"name": "支付流水号"
|
"out_trade_no": {
|
||||||
|
"name": "支付流水号"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"pay_type": {
|
{
|
||||||
"name": "支付方式"
|
"pay_type": {
|
||||||
|
"name": "支付方式"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"order_refund_no": {
|
{
|
||||||
"name": "退款单号"
|
"order_refund_no": {
|
||||||
|
"name": "退款单号"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"status_name": {
|
{
|
||||||
"name": "退款状态"
|
"status_name": {
|
||||||
|
"name": "退款状态"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
]
|
||||||
},
|
},
|
||||||
"shop_order_refund": {
|
"shop_order_refund": {
|
||||||
"name": "退款维权",
|
"name": "退款维权",
|
||||||
@ -465,4 +531,4 @@
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
@ -47,27 +47,28 @@ spring:
|
|||||||
# 登录密码
|
# 登录密码
|
||||||
login-password: admin
|
login-password: admin
|
||||||
# redis配置
|
# redis配置
|
||||||
redis:
|
data:
|
||||||
# Redis数据库索引(默认为0)
|
redis:
|
||||||
database: 1
|
# Redis数据库索引(默认为0)
|
||||||
# Redis服务器地址
|
database: 1
|
||||||
host: 127.0.0.1
|
# Redis服务器地址
|
||||||
# Redis服务器连接端口
|
host: 127.0.0.1
|
||||||
port: 6379
|
# Redis服务器连接端口
|
||||||
# Redis服务器连接密码(默认为空)
|
port: 6379
|
||||||
password:
|
# Redis服务器连接密码(默认为空)
|
||||||
# 连接超时时间
|
password:
|
||||||
timeout: 10s
|
# 连接超时时间
|
||||||
lettuce:
|
timeout: 10s
|
||||||
pool:
|
lettuce:
|
||||||
# 连接池最大连接数
|
pool:
|
||||||
max-active: 200
|
# 连接池最大连接数
|
||||||
# 连接池最大阻塞等待时间(使用负值表示没有限制)
|
max-active: 200
|
||||||
max-wait: -1ms
|
# 连接池最大阻塞等待时间(使用负值表示没有限制)
|
||||||
# 连接池中的最大空闲连接
|
max-wait: -1ms
|
||||||
max-idle: 10
|
# 连接池中的最大空闲连接
|
||||||
# 连接池中的最小空闲连接
|
max-idle: 10
|
||||||
min-idle: 0
|
# 连接池中的最小空闲连接
|
||||||
|
min-idle: 0
|
||||||
# 缓存策略
|
# 缓存策略
|
||||||
cache:
|
cache:
|
||||||
type: redis
|
type: redis
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
@ -1 +0,0 @@
|
|||||||
import{d as l,r as d,o as i,c as p,a as t,b as u,e as m,w as f,u as x,f as v,E as h,p as b,g,h as I,i as w,t as S}from"./index-2c9b67c2.js";/* empty css */import{_ as B}from"./_plugin-vue_export-helper-c27b6911.js";const k=""+new URL("error-ab7e4004.png",import.meta.url).href,o=e=>(b("data-v-8fc03fb0"),e=e(),g(),e),y={class:"error"},C={class:"flex items-center"},E=o(()=>t("div",null,[t("img",{class:"w-[300px]",src:k})],-1)),N={class:"text-left ml-[100px]"},R=o(()=>t("div",{class:"error-text text-[28px] font-bold"},"404错误!",-1)),U=o(()=>t("div",{class:"text-[#222] text-[20px] mt-[15px]"},"哎呀,出错了!您访问的页面不存在...",-1)),V=o(()=>t("div",{class:"text-[#c4c2c2] text-[12px] mt-[5px]"},"尝试检查URL的错误,然后点击浏览器刷新按钮。",-1)),L={class:"mt-[40px]"},$=l({__name:"404",setup(e){let s=null;const a=d(5),c=v();return s=setInterval(()=>{a.value===0?(clearInterval(s),c.go(-1)):a.value--},1e3),i(()=>{s&&clearInterval(s)}),(r,n)=>{const _=h;return I(),p("div",y,[t("div",C,[u(r.$slots,"content",{},()=>[E],!0),t("div",N,[R,U,V,t("div",L,[m(_,{class:"bottom",onClick:n[0]||(n[0]=D=>x(c).go(-1))},{default:f(()=>[w(S(a.value)+" 秒后返回上一页",1)]),_:1})])])])])}}});const z=B($,[["__scopeId","data-v-8fc03fb0"]]);export{z as default};
|
|
||||||
1
webroot/public/admin/assets/404-b956e7ae.js
Normal file
1
webroot/public/admin/assets/404-b956e7ae.js
Normal file
@ -0,0 +1 @@
|
|||||||
|
import{d as l,r as d,o as i,c as p,a as t,b as u,e as m,w as f,u as x,f as v,E as h,p as b,g,h as I,i as w,t as S}from"./index-e65d97b5.js";/* empty css */import{_ as B}from"./_plugin-vue_export-helper-c27b6911.js";const k=""+new URL("error-ab7e4004.png",import.meta.url).href,o=e=>(b("data-v-8fc03fb0"),e=e(),g(),e),y={class:"error"},C={class:"flex items-center"},E=o(()=>t("div",null,[t("img",{class:"w-[300px]",src:k})],-1)),N={class:"text-left ml-[100px]"},R=o(()=>t("div",{class:"error-text text-[28px] font-bold"},"404错误!",-1)),U=o(()=>t("div",{class:"text-[#222] text-[20px] mt-[15px]"},"哎呀,出错了!您访问的页面不存在...",-1)),V=o(()=>t("div",{class:"text-[#c4c2c2] text-[12px] mt-[5px]"},"尝试检查URL的错误,然后点击浏览器刷新按钮。",-1)),L={class:"mt-[40px]"},$=l({__name:"404",setup(e){let s=null;const a=d(5),c=v();return s=setInterval(()=>{a.value===0?(clearInterval(s),c.go(-1)):a.value--},1e3),i(()=>{s&&clearInterval(s)}),(r,n)=>{const _=h;return I(),p("div",y,[t("div",C,[u(r.$slots,"content",{},()=>[E],!0),t("div",N,[R,U,V,t("div",L,[m(_,{class:"bottom",onClick:n[0]||(n[0]=D=>x(c).go(-1))},{default:f(()=>[w(S(a.value)+" 秒后返回上一页",1)]),_:1})])])])])}}});const z=B($,[["__scopeId","data-v-8fc03fb0"]]);export{z as default};
|
||||||
1
webroot/public/admin/assets/App-87e4c048.js
Normal file
1
webroot/public/admin/assets/App-87e4c048.js
Normal file
@ -0,0 +1 @@
|
|||||||
|
import{ez as e}from"./index-e65d97b5.js";export{e as default};
|
||||||
@ -1 +0,0 @@
|
|||||||
import{eA as e}from"./index-2c9b67c2.js";export{e as default};
|
|
||||||
@ -1 +0,0 @@
|
|||||||
import z from"./VerifySlide-6ca58f99.js";import g from"./VerifyPoints-59b7df92.js";import{P as k,r as o,m as w,aZ as T,R as V,a0 as B,h as p,c as u,a as c,i as N,C as y,$ as d,v as C,a_ as P,x as v}from"./index-2c9b67c2.js";import{_ as j}from"./_plugin-vue_export-helper-c27b6911.js";import"./index-b003db0e.js";const O={name:"Vue2Verify",components:{VerifySlide:z,VerifyPoints:g},props:{captchaType:{type:String,required:!0},figure:{type:Number},arith:{type:Number},mode:{type:String,default:"pop"},vSpace:{type:Number},explain:{type:String},imgSize:{type:Object,default(){return{width:"310px",height:"155px"}}},blockSize:{type:Object},barSize:{type:Object}},setup(m){const{captchaType:a,figure:e,arith:t,mode:n,vSpace:h,explain:f,imgSize:I,blockSize:W,barSize:Z}=k(m),i=o(!1),r=o(void 0),s=o(void 0),l=o({}),S=w(()=>n.value=="pop"?i.value:!0),x=()=>{l.value.refresh&&l.value.refresh()},_=()=>{i.value=!1,x()},b=()=>{n.value=="pop"&&(i.value=!0)};return T(()=>{switch(a.value){case"blockPuzzle":r.value="2",s.value="VerifySlide";break;case"clickWord":r.value="",s.value="VerifyPoints";break}}),{clickShow:i,verifyType:r,componentType:s,instance:l,showBox:S,closeBox:_,show:b}}},D={key:0,class:"verifybox-top"},E=c("i",{class:"iconfont icon-close"},null,-1),R=[E];function q(m,a,e,t,n,h){return V((p(),u("div",{class:v(e.mode=="pop"?"mask":"")},[c("div",{class:v(e.mode=="pop"?"verifybox":""),style:d({"max-width":parseInt(e.imgSize.width)+30+"px"})},[e.mode=="pop"?(p(),u("div",D,[N(" 请完成安全验证 "),c("span",{class:"verifybox-close",onClick:a[0]||(a[0]=(...f)=>t.closeBox&&t.closeBox(...f))},R)])):y("",!0),c("div",{class:"verifybox-bottom",style:d({padding:e.mode=="pop"?"15px":"0"})},[t.componentType?(p(),C(P(t.componentType),{key:0,captchaType:e.captchaType,type:t.verifyType,figure:e.figure,arith:e.arith,mode:e.mode,vSpace:e.vSpace,explain:e.explain,imgSize:e.imgSize,blockSize:e.blockSize,barSize:e.barSize,ref:"instance"},null,8,["captchaType","type","figure","arith","mode","vSpace","explain","imgSize","blockSize","barSize"])):y("",!0)],4)],6)],2)),[[B,t.showBox]])}const K=j(O,[["render",q]]);export{K as default};
|
|
||||||
1
webroot/public/admin/assets/Verify-edfda369.js
Normal file
1
webroot/public/admin/assets/Verify-edfda369.js
Normal file
@ -0,0 +1 @@
|
|||||||
|
import z from"./VerifySlide-211c4b72.js";import g from"./VerifyPoints-d96cf8f0.js";import{P as k,r as o,m as w,aZ as T,R as V,a0 as B,h as p,c as u,a as c,i as N,C as y,$ as d,v as C,a_ as P,x as v}from"./index-e65d97b5.js";import{_ as j}from"./_plugin-vue_export-helper-c27b6911.js";import"./index-8b482ea3.js";const O={name:"Vue2Verify",components:{VerifySlide:z,VerifyPoints:g},props:{captchaType:{type:String,required:!0},figure:{type:Number},arith:{type:Number},mode:{type:String,default:"pop"},vSpace:{type:Number},explain:{type:String},imgSize:{type:Object,default(){return{width:"310px",height:"155px"}}},blockSize:{type:Object},barSize:{type:Object}},setup(m){const{captchaType:a,figure:e,arith:t,mode:n,vSpace:h,explain:f,imgSize:I,blockSize:W,barSize:Z}=k(m),i=o(!1),r=o(void 0),s=o(void 0),l=o({}),S=w(()=>n.value=="pop"?i.value:!0),x=()=>{l.value.refresh&&l.value.refresh()},_=()=>{i.value=!1,x()},b=()=>{n.value=="pop"&&(i.value=!0)};return T(()=>{switch(a.value){case"blockPuzzle":r.value="2",s.value="VerifySlide";break;case"clickWord":r.value="",s.value="VerifyPoints";break}}),{clickShow:i,verifyType:r,componentType:s,instance:l,showBox:S,closeBox:_,show:b}}},D={key:0,class:"verifybox-top"},E=c("i",{class:"iconfont icon-close"},null,-1),R=[E];function q(m,a,e,t,n,h){return V((p(),u("div",{class:v(e.mode=="pop"?"mask":"")},[c("div",{class:v(e.mode=="pop"?"verifybox":""),style:d({"max-width":parseInt(e.imgSize.width)+30+"px"})},[e.mode=="pop"?(p(),u("div",D,[N(" 请完成安全验证 "),c("span",{class:"verifybox-close",onClick:a[0]||(a[0]=(...f)=>t.closeBox&&t.closeBox(...f))},R)])):y("",!0),c("div",{class:"verifybox-bottom",style:d({padding:e.mode=="pop"?"15px":"0"})},[t.componentType?(p(),C(P(t.componentType),{key:0,captchaType:e.captchaType,type:t.verifyType,figure:e.figure,arith:e.arith,mode:e.mode,vSpace:e.vSpace,explain:e.explain,imgSize:e.imgSize,blockSize:e.blockSize,barSize:e.barSize,ref:"instance"},null,8,["captchaType","type","figure","arith","mode","vSpace","explain","imgSize","blockSize","barSize"])):y("",!0)],4)],6)],2)),[[B,t.showBox]])}const K=j(O,[["render",q]]);export{K as default};
|
||||||
@ -1 +0,0 @@
|
|||||||
import{r as E,a as R,b as F,c as G}from"./index-b003db0e.js";import{P as X,r as s,q as m,aK as Y,h as H,c as I,a as l,$ as A,R as Q,a0 as U,F as Z,T as $,t as V,b0 as ee,ao as te}from"./index-2c9b67c2.js";import{_ as ae}from"./_plugin-vue_export-helper-c27b6911.js";const ie={name:"VerifyPoints",props:{mode:{type:String,default:"fixed"},captchaType:{type:String},vSpace:{type:Number,default:5},imgSize:{type:Object,default(){return{width:"310px",height:"155px"}}},barSize:{type:Object,default(){return{width:"310px",height:"40px"}}}},setup(N,f){const{mode:_,captchaType:e,vSpace:q,imgSize:K,barSize:c}=X(N),{proxy:n}=ee(),h=s(""),z=s(3),p=m([]),a=m([]),o=s(1),O=s(""),w=m([]),v=s(""),u=m({imgHeight:0,imgWidth:0,barHeight:0,barWidth:0}),y=m([]),d=s(""),b=s(void 0),x=s(void 0),j=s(!0),C=s(!0),J=()=>{p.splice(0,p.length),a.splice(0,a.length),o.value=1,B(),te(()=>{const{imgHeight:i,imgWidth:t,barHeight:g,barWidth:r}=E(n);u.imgHeight=i,u.imgWidth=t,u.barHeight=g,u.barWidth=r,n.$parent.$emit("ready",n)})};Y(()=>{J(),n.$el.onselectstart=function(){return!1}});const S=s(null),L=i=>{if(a.push(k(S,i)),o.value==z.value){o.value=T(k(S,i));const t=M(a,u);a.length=0,a.push(...t),setTimeout(()=>{const g=h.value?R(v.value+"---"+JSON.stringify(a),h.value):v.value+"---"+JSON.stringify(a),r={captchaType:e.value,captcha_code:h.value?R(JSON.stringify(a),h.value):JSON.stringify(a),captcha_key:v.value};F(r).then(W=>{W.code==1?(b.value="#4cae4c",x.value="#5cb85c",d.value="验证成功",C.value=!1,_.value=="pop"&&setTimeout(()=>{n.$parent.clickShow=!1,P()},1500),n.$parent.$emit("success",{captchaVerification:g})):(n.$parent.$emit("error",n),b.value="#d9534f",x.value="#d9534f",d.value="验证失败",setTimeout(()=>{P()},700))})},400)}o.value<z.value&&(o.value=T(k(S,i)))},k=function(i,t){const g=t.offsetX,r=t.offsetY;return{x:g,y:r}},T=function(i){return y.push(Object.assign({},i)),o.value+1},P=function(){y.splice(0,y.length),b.value="#000",x.value="#ddd",C.value=!0,p.splice(0,p.length),a.splice(0,a.length),o.value=1,B(),d.value="验证失败",j.value=!0};function B(){const i={captchaType:e.value};G(i).then(t=>{t.code==1?(O.value=t.data.originalImageBase64,v.value=t.data.token,h.value=t.data.secretKey,w.value=t.data.wordList,d.value="请依次点击【"+w.value.join(",")+"】"):d.value=t.msg})}const M=function(i,t){return i.map(r=>{const W=Math.round(310*r.x/parseInt(t.imgWidth)),D=Math.round(155*r.y/parseInt(t.imgHeight));return{x:W,y:D}})};return{secretKey:h,checkNum:z,fontPos:p,checkPosArr:a,num:o,pointBackImgBase:O,poinTextList:w,backToken:v,setSize:u,tempPoints:y,text:d,barAreaColor:b,barAreaBorderColor:x,showRefresh:j,bindingClick:C,init:J,canvas:S,canvasClick:L,getMousePos:k,createPoint:T,refresh:P,getPictrue:B,pointTransfrom:M}}},ne={style:{position:"relative"}},se={class:"verify-img-out"},oe=l("i",{class:"iconfont icon-refresh"},null,-1),re=[oe],ce=["src"],le={class:"verify-msg"};function he(N,f,_,e,q,K){return H(),I("div",ne,[l("div",se,[l("div",{class:"verify-img-panel",style:A({width:e.setSize.imgWidth,height:e.setSize.imgHeight,"background-size":e.setSize.imgWidth+" "+e.setSize.imgHeight,"margin-bottom":_.vSpace+"px"})},[Q(l("div",{class:"verify-refresh",style:{"z-index":"3"},onClick:f[0]||(f[0]=(...c)=>e.refresh&&e.refresh(...c))},re,512),[[U,e.showRefresh]]),l("img",{src:"data:image/png;base64,"+e.pointBackImgBase,ref:"canvas",alt:"",style:{width:"100%",height:"100%",display:"block"},onClick:f[1]||(f[1]=c=>e.bindingClick?e.canvasClick(c):void 0)},null,8,ce),(H(!0),I(Z,null,$(e.tempPoints,(c,n)=>(H(),I("div",{key:n,class:"point-area",style:A({"background-color":"#1abd6c",color:"#fff","z-index":9999,width:"20px",height:"20px","text-align":"center","line-height":"20px","border-radius":"50%",position:"absolute",top:parseInt(c.y-10)+"px",left:parseInt(c.x-10)+"px"})},V(n+1),5))),128))],4)]),l("div",{class:"verify-bar-area",style:A({width:e.setSize.imgWidth,color:this.barAreaColor,"border-color":this.barAreaBorderColor,"line-height":this.barSize.height})},[l("span",le,V(e.text),1)],4)])}const fe=ae(ie,[["render",he]]);export{fe as default};
|
|
||||||
1
webroot/public/admin/assets/VerifyPoints-d96cf8f0.js
Normal file
1
webroot/public/admin/assets/VerifyPoints-d96cf8f0.js
Normal file
@ -0,0 +1 @@
|
|||||||
|
import{r as E,a as R,b as F,c as G}from"./index-8b482ea3.js";import{P as X,r as s,q as m,aK as Y,h as H,c as I,a as l,$ as A,R as Q,a0 as U,F as Z,T as $,t as V,b0 as ee,ao as te}from"./index-e65d97b5.js";import{_ as ae}from"./_plugin-vue_export-helper-c27b6911.js";const ie={name:"VerifyPoints",props:{mode:{type:String,default:"fixed"},captchaType:{type:String},vSpace:{type:Number,default:5},imgSize:{type:Object,default(){return{width:"310px",height:"155px"}}},barSize:{type:Object,default(){return{width:"310px",height:"40px"}}}},setup(N,f){const{mode:_,captchaType:e,vSpace:q,imgSize:K,barSize:c}=X(N),{proxy:n}=ee(),h=s(""),z=s(3),p=m([]),a=m([]),o=s(1),O=s(""),w=m([]),v=s(""),u=m({imgHeight:0,imgWidth:0,barHeight:0,barWidth:0}),y=m([]),d=s(""),b=s(void 0),x=s(void 0),j=s(!0),C=s(!0),J=()=>{p.splice(0,p.length),a.splice(0,a.length),o.value=1,B(),te(()=>{const{imgHeight:i,imgWidth:t,barHeight:g,barWidth:r}=E(n);u.imgHeight=i,u.imgWidth=t,u.barHeight=g,u.barWidth=r,n.$parent.$emit("ready",n)})};Y(()=>{J(),n.$el.onselectstart=function(){return!1}});const S=s(null),L=i=>{if(a.push(k(S,i)),o.value==z.value){o.value=T(k(S,i));const t=M(a,u);a.length=0,a.push(...t),setTimeout(()=>{const g=h.value?R(v.value+"---"+JSON.stringify(a),h.value):v.value+"---"+JSON.stringify(a),r={captchaType:e.value,captcha_code:h.value?R(JSON.stringify(a),h.value):JSON.stringify(a),captcha_key:v.value};F(r).then(W=>{W.code==1?(b.value="#4cae4c",x.value="#5cb85c",d.value="验证成功",C.value=!1,_.value=="pop"&&setTimeout(()=>{n.$parent.clickShow=!1,P()},1500),n.$parent.$emit("success",{captchaVerification:g})):(n.$parent.$emit("error",n),b.value="#d9534f",x.value="#d9534f",d.value="验证失败",setTimeout(()=>{P()},700))})},400)}o.value<z.value&&(o.value=T(k(S,i)))},k=function(i,t){const g=t.offsetX,r=t.offsetY;return{x:g,y:r}},T=function(i){return y.push(Object.assign({},i)),o.value+1},P=function(){y.splice(0,y.length),b.value="#000",x.value="#ddd",C.value=!0,p.splice(0,p.length),a.splice(0,a.length),o.value=1,B(),d.value="验证失败",j.value=!0};function B(){const i={captchaType:e.value};G(i).then(t=>{t.code==1?(O.value=t.data.originalImageBase64,v.value=t.data.token,h.value=t.data.secretKey,w.value=t.data.wordList,d.value="请依次点击【"+w.value.join(",")+"】"):d.value=t.msg})}const M=function(i,t){return i.map(r=>{const W=Math.round(310*r.x/parseInt(t.imgWidth)),D=Math.round(155*r.y/parseInt(t.imgHeight));return{x:W,y:D}})};return{secretKey:h,checkNum:z,fontPos:p,checkPosArr:a,num:o,pointBackImgBase:O,poinTextList:w,backToken:v,setSize:u,tempPoints:y,text:d,barAreaColor:b,barAreaBorderColor:x,showRefresh:j,bindingClick:C,init:J,canvas:S,canvasClick:L,getMousePos:k,createPoint:T,refresh:P,getPictrue:B,pointTransfrom:M}}},ne={style:{position:"relative"}},se={class:"verify-img-out"},oe=l("i",{class:"iconfont icon-refresh"},null,-1),re=[oe],ce=["src"],le={class:"verify-msg"};function he(N,f,_,e,q,K){return H(),I("div",ne,[l("div",se,[l("div",{class:"verify-img-panel",style:A({width:e.setSize.imgWidth,height:e.setSize.imgHeight,"background-size":e.setSize.imgWidth+" "+e.setSize.imgHeight,"margin-bottom":_.vSpace+"px"})},[Q(l("div",{class:"verify-refresh",style:{"z-index":"3"},onClick:f[0]||(f[0]=(...c)=>e.refresh&&e.refresh(...c))},re,512),[[U,e.showRefresh]]),l("img",{src:"data:image/png;base64,"+e.pointBackImgBase,ref:"canvas",alt:"",style:{width:"100%",height:"100%",display:"block"},onClick:f[1]||(f[1]=c=>e.bindingClick?e.canvasClick(c):void 0)},null,8,ce),(H(!0),I(Z,null,$(e.tempPoints,(c,n)=>(H(),I("div",{key:n,class:"point-area",style:A({"background-color":"#1abd6c",color:"#fff","z-index":9999,width:"20px",height:"20px","text-align":"center","line-height":"20px","border-radius":"50%",position:"absolute",top:parseInt(c.y-10)+"px",left:parseInt(c.x-10)+"px"})},V(n+1),5))),128))],4)]),l("div",{class:"verify-bar-area",style:A({width:e.setSize.imgWidth,color:this.barAreaColor,"border-color":this.barAreaBorderColor,"line-height":this.barSize.height})},[l("span",le,V(e.text),1)],4)])}const fe=ae(ie,[["render",he]]);export{fe as default};
|
||||||
1
webroot/public/admin/assets/VerifySlide-211c4b72.js
Normal file
1
webroot/public/admin/assets/VerifySlide-211c4b72.js
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -1 +0,0 @@
|
|||||||
import{d as q,y as U,f as $,r,aK as j,aU as z,o as F,h as w,c as b,e as a,w as s,a as n,t as o,u as e,s as t,i as _,F as L,v as M,B as R,ay as I,az as D,E as G,aL as J,aM as K,aN as O,J as P,aO as Q,a7 as H}from"./index-2c9b67c2.js";/* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css */import{g as X}from"./wechat-ad98d124.js";import{a as Y}from"./wxoplatform-d7b2f90b.js";const Z={class:"main-container"},ee={class:"flex justify-between items-center"},te={class:"text-page-title"},ae={class:"p-[20px]"},se={class:"panel-title !text-sm"},ne={class:"text-[14px] font-[700]"},oe={class:"text-[#999]"},le={class:"mt-[20px] mb-[40px] h-[32px]"},ce={class:"text-[14px] font-[700]"},ie={class:"text-[#999]"},pe={class:"mt-[20px] mb-[40px] h-[32px]"},re={class:"text-[14px] font-[700]"},_e={class:"text-[#999]"},de={class:"mt-[20px] mb-[40px] h-[32px]"},me={class:"flex justify-center"},ue={class:"w-[100%] h-[100%] flex items-center justify-center bg-[#f5f7fa]"},he={class:"mt-[22px] text-center"},fe={class:"text-[12px]"},Be=q({__name:"access",setup(ve){const C=U(),d=$(),k=C.meta.title,h=r("/channel/wechat");r(2);const m=r(""),f=r({}),v=r({}),g=async()=>{await X().then(({data:l})=>{f.value=l,m.value=l.qr_code})};j(async()=>{g(),await z().then(({data:l})=>{v.value=l}),document.addEventListener("visibilitychange",()=>{document.visibilityState==="visible"&&g()})}),F(()=>{document.removeEventListener("visibilitychange",()=>{})});const E=l=>{window.open(l,"_blank")},A=l=>{d.push({path:h.value})},S=()=>{Y().then(({data:l})=>{window.open(l)})};return(l,c)=>{const u=I,B=D,i=G,x=J,N=K,y=O,V=P,T=Q,W=H;return w(),b("div",Z,[a(W,{class:"card !border-none",shadow:"never"},{default:s(()=>[n("div",ee,[n("span",te,o(e(k)),1)]),a(B,{modelValue:h.value,"onUpdate:modelValue":c[0]||(c[0]=p=>h.value=p),class:"my-[20px]",onTabChange:A},{default:s(()=>[a(u,{label:e(t)("wechatAccessFlow"),name:"/channel/wechat"},null,8,["label"]),a(u,{label:e(t)("customMenu"),name:"/channel/wechat/menu"},null,8,["label"]),a(u,{label:e(t)("wechatTemplate"),name:"/channel/wechat/message"},null,8,["label"]),a(u,{label:e(t)("reply"),name:"/channel/wechat/reply"},null,8,["label"])]),_:1},8,["modelValue"]),n("div",ae,[n("h3",se,o(e(t)("wechatInlet")),1),a(T,null,{default:s(()=>[a(y,{span:20},{default:s(()=>[a(N,{class:"!mt-[10px]",active:3,direction:"vertical"},{default:s(()=>[a(x,null,{title:s(()=>[n("p",ne,o(e(t)("wechatAttestation")),1)]),description:s(()=>[n("span",oe,o(e(t)("wechatAttestation1")),1),n("div",le,[a(i,{type:"primary",onClick:c[1]||(c[1]=p=>E("https://mp.weixin.qq.com/"))},{default:s(()=>[_(o(e(t)("clickAccess")),1)]),_:1})])]),_:1}),a(x,null,{title:s(()=>[n("p",ce,o(e(t)("wechatSetting")),1)]),description:s(()=>[n("span",ie,o(e(t)("wechatSetting1")),1),n("div",pe,[v.value.app_id&&v.value.app_secret?(w(),b(L,{key:0},[a(i,{type:"primary",onClick:c[2]||(c[2]=p=>e(d).push("/channel/wechat/config"))},{default:s(()=>[_(o(f.value.app_id?e(t)("seeConfig"):e(t)("clickSetting")),1)]),_:1}),a(i,{type:"primary",plain:"",onClick:S},{default:s(()=>[_(o(f.value.is_authorization?e(t)("refreshAuth"):e(t)("authWechat")),1)]),_:1})],64)):(w(),M(i,{key:1,type:"primary",onClick:c[3]||(c[3]=p=>e(d).push("/channel/wechat/config"))},{default:s(()=>[_(o(e(t)("clickSetting")),1)]),_:1}))])]),_:1}),a(x,null,{title:s(()=>[n("p",re,o(e(t)("wechatAccess")),1)]),description:s(()=>[n("span",_e,o(e(t)("wechatAccess")),1),n("div",de,[a(i,{type:"primary",plain:"",onClick:c[4]||(c[4]=p=>e(d).push("/channel/wechat/course"))},{default:s(()=>[_(o(e(t)("releaseCourse")),1)]),_:1})])]),_:1})]),_:1})]),_:1}),a(y,{span:4},{default:s(()=>[n("div",me,[a(V,{class:"w-[180px] h-[180px]",src:m.value?e(R)(m.value):""},{error:s(()=>[n("div",ue,[n("span",null,o(m.value?e(t)("fileErr"):e(t)("emptyQrCode")),1)])]),_:1},8,["src"])]),n("div",he,[n("p",fe,o(e(t)("clickAccess2")),1)])]),_:1})]),_:1})])]),_:1})])}}});export{Be as default};
|
|
||||||
1
webroot/public/admin/assets/access-63d728f2.js
Normal file
1
webroot/public/admin/assets/access-63d728f2.js
Normal file
@ -0,0 +1 @@
|
|||||||
|
import{d as q,y as T,f as U,r as d,aK as j,aU as z,o as F,h as w,c as g,e as n,w as s,a,t as o,u as e,s as t,i as r,F as C,B as L,ay as M,az as I,E as D,aL as G,aM as J,aN as K,J as O,aO as P,a7 as Q}from"./index-e65d97b5.js";/* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css */import{g as H}from"./weapp-03951386.js";import{a as X}from"./wxoplatform-8c456cbc.js";const Y={class:"main-container"},Z={class:"flex justify-between items-center"},ee={class:"text-page-title"},te={class:"p-[20px]"},se={class:"panel-title !text-sm"},ae={class:"text-[14px] font-[700]"},ne={class:"text-[#999]"},oe={class:"mt-[20px] mb-[40px] h-[32px]"},le={class:"text-[14px] font-[700]"},pe={class:"text-[#999]"},ie={class:"mt-[20px] mb-[40px] h-[32px]"},ce={class:"text-[14px] font-[700]"},re={class:"text-[#999]"},_e={class:"mt-[20px] mb-[40px] h-[32px]"},de={class:"text-[14px] font-[700]"},ue={class:"text-[#999]"},me=a("div",{class:"mt-[20px] mb-[40px] h-[32px]"},null,-1),he={class:"flex justify-center"},fe={class:"w-[100%] h-[100%] flex items-center justify-center bg-[#f5f7fa]"},xe={class:"mt-[22px] text-center"},ve={class:"text-[12px]"},Ne=q({__name:"access",setup(we){const k=T(),_=U(),E=k.meta.title,h=d("/channel/weapp");d(2);const u=d(""),f=d({}),x=d({}),b=async()=>{await H().then(({data:p})=>{f.value=p,u.value=p.qr_code})};j(async()=>{b(),await z().then(({data:p})=>{x.value=p}),document.addEventListener("visibilitychange",()=>{document.visibilityState==="visible"&&b()})}),F(()=>{document.removeEventListener("visibilitychange",()=>{})});const A=p=>{window.open(p,"_blank")},B=p=>{_.push({path:h.value})},S=()=>{X().then(({data:p})=>{window.open(p)})};return(p,l)=>{const v=M,V=I,i=D,m=G,N=J,y=K,R=O,W=P,$=Q;return w(),g("div",Y,[n($,{class:"card !border-none",shadow:"never"},{default:s(()=>[a("div",Z,[a("span",ee,o(e(E)),1)]),n(V,{modelValue:h.value,"onUpdate:modelValue":l[0]||(l[0]=c=>h.value=c),class:"mt-[20px]",onTabChange:B},{default:s(()=>[n(v,{label:e(t)("weappAccessFlow"),name:"/channel/weapp"},null,8,["label"]),n(v,{label:e(t)("subscribeMessage"),name:"/channel/weapp/message"},null,8,["label"]),n(v,{label:e(t)("weappRelease"),name:"/channel/weapp/code"},null,8,["label"])]),_:1},8,["modelValue"]),a("div",te,[a("h3",se,o(e(t)("weappInlet")),1),n(W,null,{default:s(()=>[n(y,{span:20},{default:s(()=>[n(N,{class:"!mt-[10px]",active:4,direction:"vertical"},{default:s(()=>[n(m,null,{title:s(()=>[a("p",ae,o(e(t)("weappAttestation")),1)]),description:s(()=>[a("span",ne,o(e(t)("weappAttest")),1),a("div",oe,[n(i,{type:"primary",onClick:l[1]||(l[1]=c=>A("https://mp.weixin.qq.com/"))},{default:s(()=>[r(o(e(t)("clickAccess")),1)]),_:1})])]),_:1}),n(m,null,{title:s(()=>[a("p",le,o(e(t)("weappSetting")),1)]),description:s(()=>[a("span",pe,o(e(t)("emplace")),1),a("div",ie,[x.value.app_id&&x.value.app_secret?(w(),g(C,{key:0},[n(i,{type:"primary",onClick:l[2]||(l[2]=c=>e(_).push("/channel/weapp/config"))},{default:s(()=>[r(o(f.value.app_id?e(t)("seeConfig"):e(t)("weappSettingBtn")),1)]),_:1}),n(i,{type:"primary",plain:"",onClick:S},{default:s(()=>[r(o(f.value.is_authorization?e(t)("refreshAuth"):e(t)("authWeapp")),1)]),_:1})],64)):(w(),g(C,{key:1},[n(i,{type:"primary",onClick:l[3]||(l[3]=c=>e(_).push("/channel/weapp/config"))},{default:s(()=>[r(o(e(t)("weappSettingBtn")),1)]),_:1}),n(i,{type:"primary",plain:"",onClick:l[4]||(l[4]=c=>e(_).push("/channel/weapp/course"))},{default:s(()=>[r("配置教程")]),_:1})],64))])]),_:1}),n(m,null,{title:s(()=>[a("p",ce,o(e(t)("uploadVersion")),1)]),description:s(()=>[a("span",re,o(e(t)("releaseCourse")),1),a("div",_e,[n(i,{type:"primary",plain:"",onClick:l[5]||(l[5]=c=>e(_).push("/channel/weapp/code"))},{default:s(()=>[r(o(e(t)("weappRelease")),1)]),_:1})])]),_:1}),n(m,null,{title:s(()=>[a("p",de,o(e(t)("completeAccess")),1)]),description:s(()=>[a("span",ue,o(e(t)("releaseCourse")),1),me]),_:1})]),_:1})]),_:1}),n(y,{span:4},{default:s(()=>[a("div",he,[n(R,{class:"w-[180px] h-[180px]",src:u.value?e(L)(u.value):""},{error:s(()=>[a("div",fe,[a("span",null,o(u.value?e(t)("fileErr"):e(t)("emptyQrCode")),1)])]),_:1},8,["src"])]),a("div",xe,[a("p",ve,o(e(t)("clickAccess2")),1)])]),_:1})]),_:1})])]),_:1})])}}});export{Ne as default};
|
||||||
@ -1 +0,0 @@
|
|||||||
import{d as V,y as B,f as N,r as d,aK as S,h as T,c as j,e as o,w as s,a as t,t as n,u as e,s as a,i as h,B as R,ay as q,az as I,E as M,aL as $,aM as z,aN as D,J as F,aO as J,a7 as K}from"./index-2c9b67c2.js";/* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css */import{g as L}from"./aliapp-b42a2494.js";const O={class:"main-container"},P={class:"flex justify-between items-center"},Q={class:"text-page-title"},U={class:"p-[20px]"},G={class:"panel-title !text-sm"},H={class:"text-[14px] font-[700]"},W={class:"text-[#999]"},X={class:"mt-[20px] mb-[40px] h-[32px]"},Y={class:"text-[14px] font-[700]"},Z={class:"text-[#999]"},tt={class:"mt-[20px] mb-[40px] h-[32px]"},et={class:"text-[14px] font-[700]"},st={class:"text-[#999]"},at=t("div",{class:"mt-[20px] mb-[40px] h-[32px]"},null,-1),ot={class:"text-[14px] font-[700]"},nt={class:"text-[#999]"},lt={class:"flex justify-center"},ct={class:"w-[100%] h-[100%] flex items-center justify-center bg-[#f5f7fa]"},pt={class:"mt-[22px] text-center"},it={class:"text-[12px]"},bt=V({__name:"access",setup(_t){const f=B(),m=N(),v=f.meta.title,_=d("/channel/aliapp");d(2);const p=d("");S(async()=>{const c=await L();p.value=c.data.qr_code});const w=c=>{window.open(c,"_blank")},b=c=>{m.push({path:_.value})};return(c,l)=>{const g=q,y=I,u=M,i=$,C=z,x=D,E=F,k=J,A=K;return T(),j("div",O,[o(A,{class:"card !border-none",shadow:"never"},{default:s(()=>[t("div",P,[t("span",Q,n(e(v)),1)]),o(y,{modelValue:_.value,"onUpdate:modelValue":l[0]||(l[0]=r=>_.value=r),class:"my-[20px]",onTabChange:b},{default:s(()=>[o(g,{label:e(a)("weappAccessFlow"),name:"/channel/aliapp"},null,8,["label"])]),_:1},8,["modelValue"]),t("div",U,[t("h3",G,n(e(a)("weappInlet")),1),o(k,null,{default:s(()=>[o(x,{span:20},{default:s(()=>[o(C,{active:4,direction:"vertical"},{default:s(()=>[o(i,null,{title:s(()=>[t("p",H,n(e(a)("weappAttestation")),1)]),description:s(()=>[t("span",W,n(e(a)("weappAttest")),1),t("div",X,[o(u,{type:"primary",onClick:l[1]||(l[1]=r=>w("https://open.alipay.com/develop/manage"))},{default:s(()=>[h(n(e(a)("clickAccess")),1)]),_:1})])]),_:1}),o(i,null,{title:s(()=>[t("p",Y,n(e(a)("weappSetting")),1)]),description:s(()=>[t("span",Z,n(e(a)("emplace")),1),t("div",tt,[o(u,{type:"primary",plain:"",onClick:l[2]||(l[2]=r=>e(m).push("/channel/aliapp/config"))},{default:s(()=>[h(n(e(a)("weappSettingBtn")),1)]),_:1})])]),_:1}),o(i,null,{title:s(()=>[t("p",et,n(e(a)("uploadVersion")),1)]),description:s(()=>[t("span",st,n(e(a)("releaseCourse")),1),at]),_:1}),o(i,null,{title:s(()=>[t("p",ot,n(e(a)("completeAccess")),1)]),description:s(()=>[t("span",nt,n(e(a)("releaseCourse")),1)]),_:1})]),_:1})]),_:1}),o(x,{span:4},{default:s(()=>[t("div",lt,[o(E,{class:"w-[180px] h-[180px]",src:p.value?e(R)(p.value):""},{error:s(()=>[t("div",ct,[t("span",null,n(p.value?e(a)("fileErr"):e(a)("emptyQrCode")),1)])]),_:1},8,["src"])]),t("div",pt,[t("p",it,n(e(a)("clickAccess2")),1)])]),_:1})]),_:1})])]),_:1})])}}});export{bt as default};
|
|
||||||
@ -1 +0,0 @@
|
|||||||
import{d as q,y as T,f as U,r as d,aK as j,aU as z,o as F,h as w,c as g,e as n,w as s,a,t as o,u as e,s as t,i as r,F as C,B as L,ay as M,az as I,E as D,aL as G,aM as J,aN as K,J as O,aO as P,a7 as Q}from"./index-2c9b67c2.js";/* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css */import{g as H}from"./weapp-fce008a8.js";import{a as X}from"./wxoplatform-d7b2f90b.js";const Y={class:"main-container"},Z={class:"flex justify-between items-center"},ee={class:"text-page-title"},te={class:"p-[20px]"},se={class:"panel-title !text-sm"},ae={class:"text-[14px] font-[700]"},ne={class:"text-[#999]"},oe={class:"mt-[20px] mb-[40px] h-[32px]"},le={class:"text-[14px] font-[700]"},pe={class:"text-[#999]"},ie={class:"mt-[20px] mb-[40px] h-[32px]"},ce={class:"text-[14px] font-[700]"},re={class:"text-[#999]"},_e={class:"mt-[20px] mb-[40px] h-[32px]"},de={class:"text-[14px] font-[700]"},ue={class:"text-[#999]"},me=a("div",{class:"mt-[20px] mb-[40px] h-[32px]"},null,-1),he={class:"flex justify-center"},fe={class:"w-[100%] h-[100%] flex items-center justify-center bg-[#f5f7fa]"},xe={class:"mt-[22px] text-center"},ve={class:"text-[12px]"},Ne=q({__name:"access",setup(we){const k=T(),_=U(),E=k.meta.title,h=d("/channel/weapp");d(2);const u=d(""),f=d({}),x=d({}),b=async()=>{await H().then(({data:p})=>{f.value=p,u.value=p.qr_code})};j(async()=>{b(),await z().then(({data:p})=>{x.value=p}),document.addEventListener("visibilitychange",()=>{document.visibilityState==="visible"&&b()})}),F(()=>{document.removeEventListener("visibilitychange",()=>{})});const A=p=>{window.open(p,"_blank")},B=p=>{_.push({path:h.value})},S=()=>{X().then(({data:p})=>{window.open(p)})};return(p,l)=>{const v=M,V=I,i=D,m=G,N=J,y=K,R=O,W=P,$=Q;return w(),g("div",Y,[n($,{class:"card !border-none",shadow:"never"},{default:s(()=>[a("div",Z,[a("span",ee,o(e(E)),1)]),n(V,{modelValue:h.value,"onUpdate:modelValue":l[0]||(l[0]=c=>h.value=c),class:"mt-[20px]",onTabChange:B},{default:s(()=>[n(v,{label:e(t)("weappAccessFlow"),name:"/channel/weapp"},null,8,["label"]),n(v,{label:e(t)("subscribeMessage"),name:"/channel/weapp/message"},null,8,["label"]),n(v,{label:e(t)("weappRelease"),name:"/channel/weapp/code"},null,8,["label"])]),_:1},8,["modelValue"]),a("div",te,[a("h3",se,o(e(t)("weappInlet")),1),n(W,null,{default:s(()=>[n(y,{span:20},{default:s(()=>[n(N,{class:"!mt-[10px]",active:4,direction:"vertical"},{default:s(()=>[n(m,null,{title:s(()=>[a("p",ae,o(e(t)("weappAttestation")),1)]),description:s(()=>[a("span",ne,o(e(t)("weappAttest")),1),a("div",oe,[n(i,{type:"primary",onClick:l[1]||(l[1]=c=>A("https://mp.weixin.qq.com/"))},{default:s(()=>[r(o(e(t)("clickAccess")),1)]),_:1})])]),_:1}),n(m,null,{title:s(()=>[a("p",le,o(e(t)("weappSetting")),1)]),description:s(()=>[a("span",pe,o(e(t)("emplace")),1),a("div",ie,[x.value.app_id&&x.value.app_secret?(w(),g(C,{key:0},[n(i,{type:"primary",onClick:l[2]||(l[2]=c=>e(_).push("/channel/weapp/config"))},{default:s(()=>[r(o(f.value.app_id?e(t)("seeConfig"):e(t)("weappSettingBtn")),1)]),_:1}),n(i,{type:"primary",plain:"",onClick:S},{default:s(()=>[r(o(f.value.is_authorization?e(t)("refreshAuth"):e(t)("authWeapp")),1)]),_:1})],64)):(w(),g(C,{key:1},[n(i,{type:"primary",onClick:l[3]||(l[3]=c=>e(_).push("/channel/weapp/config"))},{default:s(()=>[r(o(e(t)("weappSettingBtn")),1)]),_:1}),n(i,{type:"primary",plain:"",onClick:l[4]||(l[4]=c=>e(_).push("/channel/weapp/course"))},{default:s(()=>[r("配置教程")]),_:1})],64))])]),_:1}),n(m,null,{title:s(()=>[a("p",ce,o(e(t)("uploadVersion")),1)]),description:s(()=>[a("span",re,o(e(t)("releaseCourse")),1),a("div",_e,[n(i,{type:"primary",plain:"",onClick:l[5]||(l[5]=c=>e(_).push("/channel/weapp/code"))},{default:s(()=>[r(o(e(t)("weappRelease")),1)]),_:1})])]),_:1}),n(m,null,{title:s(()=>[a("p",de,o(e(t)("completeAccess")),1)]),description:s(()=>[a("span",ue,o(e(t)("releaseCourse")),1),me]),_:1})]),_:1})]),_:1}),n(y,{span:4},{default:s(()=>[a("div",he,[n(R,{class:"w-[180px] h-[180px]",src:u.value?e(L)(u.value):""},{error:s(()=>[a("div",fe,[a("span",null,o(u.value?e(t)("fileErr"):e(t)("emptyQrCode")),1)])]),_:1},8,["src"])]),a("div",xe,[a("p",ve,o(e(t)("clickAccess2")),1)])]),_:1})]),_:1})])]),_:1})])}}});export{Ne as default};
|
|
||||||
1
webroot/public/admin/assets/access-b150bc4a.js
Normal file
1
webroot/public/admin/assets/access-b150bc4a.js
Normal file
@ -0,0 +1 @@
|
|||||||
|
import{d as V,y as B,f as N,r as d,aK as S,h as T,c as j,e as o,w as s,a as t,t as n,u as e,s as a,i as h,B as R,ay as q,az as I,E as M,aL as $,aM as z,aN as D,J as F,aO as J,a7 as K}from"./index-e65d97b5.js";/* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css */import{g as L}from"./aliapp-a0f2d75c.js";const O={class:"main-container"},P={class:"flex justify-between items-center"},Q={class:"text-page-title"},U={class:"p-[20px]"},G={class:"panel-title !text-sm"},H={class:"text-[14px] font-[700]"},W={class:"text-[#999]"},X={class:"mt-[20px] mb-[40px] h-[32px]"},Y={class:"text-[14px] font-[700]"},Z={class:"text-[#999]"},tt={class:"mt-[20px] mb-[40px] h-[32px]"},et={class:"text-[14px] font-[700]"},st={class:"text-[#999]"},at=t("div",{class:"mt-[20px] mb-[40px] h-[32px]"},null,-1),ot={class:"text-[14px] font-[700]"},nt={class:"text-[#999]"},lt={class:"flex justify-center"},ct={class:"w-[100%] h-[100%] flex items-center justify-center bg-[#f5f7fa]"},pt={class:"mt-[22px] text-center"},it={class:"text-[12px]"},bt=V({__name:"access",setup(_t){const f=B(),m=N(),v=f.meta.title,_=d("/channel/aliapp");d(2);const p=d("");S(async()=>{const c=await L();p.value=c.data.qr_code});const w=c=>{window.open(c,"_blank")},b=c=>{m.push({path:_.value})};return(c,l)=>{const g=q,y=I,u=M,i=$,C=z,x=D,E=F,k=J,A=K;return T(),j("div",O,[o(A,{class:"card !border-none",shadow:"never"},{default:s(()=>[t("div",P,[t("span",Q,n(e(v)),1)]),o(y,{modelValue:_.value,"onUpdate:modelValue":l[0]||(l[0]=r=>_.value=r),class:"my-[20px]",onTabChange:b},{default:s(()=>[o(g,{label:e(a)("weappAccessFlow"),name:"/channel/aliapp"},null,8,["label"])]),_:1},8,["modelValue"]),t("div",U,[t("h3",G,n(e(a)("weappInlet")),1),o(k,null,{default:s(()=>[o(x,{span:20},{default:s(()=>[o(C,{active:4,direction:"vertical"},{default:s(()=>[o(i,null,{title:s(()=>[t("p",H,n(e(a)("weappAttestation")),1)]),description:s(()=>[t("span",W,n(e(a)("weappAttest")),1),t("div",X,[o(u,{type:"primary",onClick:l[1]||(l[1]=r=>w("https://open.alipay.com/develop/manage"))},{default:s(()=>[h(n(e(a)("clickAccess")),1)]),_:1})])]),_:1}),o(i,null,{title:s(()=>[t("p",Y,n(e(a)("weappSetting")),1)]),description:s(()=>[t("span",Z,n(e(a)("emplace")),1),t("div",tt,[o(u,{type:"primary",plain:"",onClick:l[2]||(l[2]=r=>e(m).push("/channel/aliapp/config"))},{default:s(()=>[h(n(e(a)("weappSettingBtn")),1)]),_:1})])]),_:1}),o(i,null,{title:s(()=>[t("p",et,n(e(a)("uploadVersion")),1)]),description:s(()=>[t("span",st,n(e(a)("releaseCourse")),1),at]),_:1}),o(i,null,{title:s(()=>[t("p",ot,n(e(a)("completeAccess")),1)]),description:s(()=>[t("span",nt,n(e(a)("releaseCourse")),1)]),_:1})]),_:1})]),_:1}),o(x,{span:4},{default:s(()=>[t("div",lt,[o(E,{class:"w-[180px] h-[180px]",src:p.value?e(R)(p.value):""},{error:s(()=>[t("div",ct,[t("span",null,n(p.value?e(a)("fileErr"):e(a)("emptyQrCode")),1)])]),_:1},8,["src"])]),t("div",pt,[t("p",it,n(e(a)("clickAccess2")),1)])]),_:1})]),_:1})])]),_:1})])}}});export{bt as default};
|
||||||
1
webroot/public/admin/assets/access-e8be7fbf.js
Normal file
1
webroot/public/admin/assets/access-e8be7fbf.js
Normal file
@ -0,0 +1 @@
|
|||||||
|
import{d as q,y as U,f as $,r,aK as j,aU as z,o as F,h as w,c as b,e as a,w as s,a as n,t as o,u as e,s as t,i as _,F as L,v as M,B as R,ay as I,az as D,E as G,aL as J,aM as K,aN as O,J as P,aO as Q,a7 as H}from"./index-e65d97b5.js";/* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css */import{g as X}from"./wechat-10a1ef80.js";import{a as Y}from"./wxoplatform-8c456cbc.js";const Z={class:"main-container"},ee={class:"flex justify-between items-center"},te={class:"text-page-title"},ae={class:"p-[20px]"},se={class:"panel-title !text-sm"},ne={class:"text-[14px] font-[700]"},oe={class:"text-[#999]"},le={class:"mt-[20px] mb-[40px] h-[32px]"},ce={class:"text-[14px] font-[700]"},ie={class:"text-[#999]"},pe={class:"mt-[20px] mb-[40px] h-[32px]"},re={class:"text-[14px] font-[700]"},_e={class:"text-[#999]"},de={class:"mt-[20px] mb-[40px] h-[32px]"},me={class:"flex justify-center"},ue={class:"w-[100%] h-[100%] flex items-center justify-center bg-[#f5f7fa]"},he={class:"mt-[22px] text-center"},fe={class:"text-[12px]"},Be=q({__name:"access",setup(ve){const C=U(),d=$(),k=C.meta.title,h=r("/channel/wechat");r(2);const m=r(""),f=r({}),v=r({}),g=async()=>{await X().then(({data:l})=>{f.value=l,m.value=l.qr_code})};j(async()=>{g(),await z().then(({data:l})=>{v.value=l}),document.addEventListener("visibilitychange",()=>{document.visibilityState==="visible"&&g()})}),F(()=>{document.removeEventListener("visibilitychange",()=>{})});const E=l=>{window.open(l,"_blank")},A=l=>{d.push({path:h.value})},S=()=>{Y().then(({data:l})=>{window.open(l)})};return(l,c)=>{const u=I,B=D,i=G,x=J,N=K,y=O,V=P,T=Q,W=H;return w(),b("div",Z,[a(W,{class:"card !border-none",shadow:"never"},{default:s(()=>[n("div",ee,[n("span",te,o(e(k)),1)]),a(B,{modelValue:h.value,"onUpdate:modelValue":c[0]||(c[0]=p=>h.value=p),class:"my-[20px]",onTabChange:A},{default:s(()=>[a(u,{label:e(t)("wechatAccessFlow"),name:"/channel/wechat"},null,8,["label"]),a(u,{label:e(t)("customMenu"),name:"/channel/wechat/menu"},null,8,["label"]),a(u,{label:e(t)("wechatTemplate"),name:"/channel/wechat/message"},null,8,["label"]),a(u,{label:e(t)("reply"),name:"/channel/wechat/reply"},null,8,["label"])]),_:1},8,["modelValue"]),n("div",ae,[n("h3",se,o(e(t)("wechatInlet")),1),a(T,null,{default:s(()=>[a(y,{span:20},{default:s(()=>[a(N,{class:"!mt-[10px]",active:3,direction:"vertical"},{default:s(()=>[a(x,null,{title:s(()=>[n("p",ne,o(e(t)("wechatAttestation")),1)]),description:s(()=>[n("span",oe,o(e(t)("wechatAttestation1")),1),n("div",le,[a(i,{type:"primary",onClick:c[1]||(c[1]=p=>E("https://mp.weixin.qq.com/"))},{default:s(()=>[_(o(e(t)("clickAccess")),1)]),_:1})])]),_:1}),a(x,null,{title:s(()=>[n("p",ce,o(e(t)("wechatSetting")),1)]),description:s(()=>[n("span",ie,o(e(t)("wechatSetting1")),1),n("div",pe,[v.value.app_id&&v.value.app_secret?(w(),b(L,{key:0},[a(i,{type:"primary",onClick:c[2]||(c[2]=p=>e(d).push("/channel/wechat/config"))},{default:s(()=>[_(o(f.value.app_id?e(t)("seeConfig"):e(t)("clickSetting")),1)]),_:1}),a(i,{type:"primary",plain:"",onClick:S},{default:s(()=>[_(o(f.value.is_authorization?e(t)("refreshAuth"):e(t)("authWechat")),1)]),_:1})],64)):(w(),M(i,{key:1,type:"primary",onClick:c[3]||(c[3]=p=>e(d).push("/channel/wechat/config"))},{default:s(()=>[_(o(e(t)("clickSetting")),1)]),_:1}))])]),_:1}),a(x,null,{title:s(()=>[n("p",re,o(e(t)("wechatAccess")),1)]),description:s(()=>[n("span",_e,o(e(t)("wechatAccess")),1),n("div",de,[a(i,{type:"primary",plain:"",onClick:c[4]||(c[4]=p=>e(d).push("/channel/wechat/course"))},{default:s(()=>[_(o(e(t)("releaseCourse")),1)]),_:1})])]),_:1})]),_:1})]),_:1}),a(y,{span:4},{default:s(()=>[n("div",me,[a(V,{class:"w-[180px] h-[180px]",src:m.value?e(R)(m.value):""},{error:s(()=>[n("div",ue,[n("span",null,o(m.value?e(t)("fileErr"):e(t)("emptyQrCode")),1)])]),_:1},8,["src"])]),n("div",he,[n("p",fe,o(e(t)("clickAccess2")),1)])]),_:1})]),_:1})])]),_:1})])}}});export{Be as default};
|
||||||
1
webroot/public/admin/assets/account-33339aff.js
Normal file
1
webroot/public/admin/assets/account-33339aff.js
Normal file
File diff suppressed because one or more lines are too long
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user