server_commit

This commit is contained in:
zhengziru
2025-05-19 11:38:00 +08:00
parent f59f282ad1
commit d3063bb182
11 changed files with 91 additions and 35 deletions
@@ -126,14 +126,14 @@ public class PwdUtil {
// System.out.println(dbPwd); // System.out.println(dbPwd);
// System.out.println(s); // System.out.println(s);
String pwd = "006207"; String pwd = "004512";
String dbPwd = PwdUtil.doSm4CbcEncrypt(pwd); String dbPwd = PwdUtil.doSm4CbcEncrypt(pwd);
System.out.println(dbPwd); System.out.println(dbPwd);
// 7fdc9e096de7e2c18e4ed4efa16f50f8 // 7fdc9e096de7e2c18e4ed4efa16f50f8
// e43646c461a8ee364c569552225e28be // e43646c461a8ee364c569552225e28be
// String ddPwd = PwdUtil.doSm4CbcDecrypt("7fdc9e096de7e2c18e4ed4efa16f50f8"); // String ddPwd = PwdUtil.doSm4CbcDecrypt("d3b42e17dba55dbe9bfa471c8ff191d9");
// System.out.println(ddPwd); // System.out.println(ddPwd);
} }
} }
@@ -6,10 +6,12 @@ import io.v.nutz.base.utils.LoginUtil;
import io.v.nutz.base.utils.PwdUtil; import io.v.nutz.base.utils.PwdUtil;
import io.v.nutz.sys.models.Sys_user; import io.v.nutz.sys.models.Sys_user;
import io.v.nutz.sys.services.SysUserService; import io.v.nutz.sys.services.SysUserService;
import io.v.nutz.web.commons.base.Globals;
import io.v.nutz.web.commons.shiro.exception.CaptchaEmptyException; import io.v.nutz.web.commons.shiro.exception.CaptchaEmptyException;
import io.v.nutz.web.commons.shiro.exception.CaptchaIncorrectException; import io.v.nutz.web.commons.shiro.exception.CaptchaIncorrectException;
import io.v.nutz.web.commons.shiro.filter.PlatformAuthenticationFilter; import io.v.nutz.web.commons.shiro.filter.PlatformAuthenticationFilter;
import io.v.nutz.web.commons.utils.ShiroUtil; import io.v.nutz.web.commons.utils.ShiroUtil;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.math.NumberUtils; import org.apache.commons.lang3.math.NumberUtils;
import org.apache.shiro.SecurityUtils; import org.apache.shiro.SecurityUtils;
import org.apache.shiro.authc.AuthenticationException; import org.apache.shiro.authc.AuthenticationException;
@@ -29,10 +31,13 @@ import org.nutz.mvc.annotation.*;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession; import javax.servlet.http.HttpSession;
import java.net.URLEncoder;
import java.nio.charset.StandardCharsets;
@IocBean @IocBean
@At("/mobile/login") @At("/mobile/login")
@Ok("json") @Ok("json")
@Slf4j
public class mobileLoginController { public class mobileLoginController {
@Inject @Inject
@@ -164,4 +169,31 @@ public class mobileLoginController {
return Result.success(); return Result.success();
} }
} }
/**
* 解绑微信openId
*
* @return
*/
@At
@Ok("re")
public String clearWxOpenId() {
try {
sysUserService.update(Chain.make("openId", null), Cnd.where("id", "=", ShiroUtil.getPrincipalProperty("id")));
Subject subject = SecurityUtils.getSubject();
Sys_user user = (Sys_user) subject.getPrincipal();
subject.logout();
sysUserService.deleteCache(user.getId());
return ">>:" + "https://zhgh.hrbnu.edu.cn/platform/wechat/oauth";
} catch (SessionException ise) {
log.debug("Encountered session exception during logout. This can generally safely be ignored.", ise);
return ">>:" + "https://zhgh.hrbnu.edu.cn/platform/wechat/oauth";
} catch (Exception e) {
log.debug("Logout error", e);
return ">>:" + "https://zhgh.hrbnu.edu.cn/platform/wechat/oauth";
}
}
} }
@@ -584,9 +584,9 @@ public class WelfareCommonController {
entityList.add(new ExcelExportEntity("所选福利", "gift_name", 20)); entityList.add(new ExcelExportEntity("所选福利", "gift_name", 20));
} }
if (welfareProject.getProvideMode().equals(WelfareProvideMode.PERSONAL.getCode())) { // if (welfareProject.getProvideMode().equals(WelfareProvideMode.PERSONAL.getCode())) {
entityList.add(new ExcelExportEntity("配送地址", "receiveAddress", 60)); entityList.add(new ExcelExportEntity("取货地址", "receiveAddress", 60));
} // }
try { try {
ViTool.excelResponse(response, "会员福利领取情况.xls"); ViTool.excelResponse(response, "会员福利领取情况.xls");
@@ -120,11 +120,8 @@ public class WelfareListController {
wus.userSign, wus.userSign,
wus.courierNumber, wus.courierNumber,
GROUP_CONCAT( GROUP_CONCAT(
DISTINCT IF
CONCAT( ( wus.receiveAddress IS NOT NULL AND wus.receiveAddress != '', wus.receiveAddress, '' )
wuso.optionName,
IF(wus.receiveAddress IS NOT NULL AND wus.receiveAddress != '', CONCAT('(', wus.receiveAddress, ')'), '')
)
) AS receiveAddress, ) AS receiveAddress,
GROUP_CONCAT( DISTINCT wuso.optionName, '(', wus.selectNum, '份)' ) AS gist_list GROUP_CONCAT( DISTINCT wuso.optionName, '(', wus.selectNum, '份)' ) AS gist_list
FROM FROM
@@ -24,6 +24,7 @@ import org.nutz.ioc.aop.Aop;
import org.nutz.ioc.loader.annotation.Inject; import org.nutz.ioc.loader.annotation.Inject;
import org.nutz.ioc.loader.annotation.IocBean; import org.nutz.ioc.loader.annotation.IocBean;
import org.nutz.json.Json; import org.nutz.json.Json;
import org.nutz.lang.Lang;
import org.nutz.mvc.annotation.At; import org.nutz.mvc.annotation.At;
import org.nutz.mvc.annotation.Ok; import org.nutz.mvc.annotation.Ok;
import org.nutz.mvc.annotation.Param; import org.nutz.mvc.annotation.Param;
@@ -32,6 +33,7 @@ import java.util.ArrayList;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
import java.util.concurrent.locks.ReentrantLock; import java.util.concurrent.locks.ReentrantLock;
import java.util.stream.Collectors;
/** /**
* @ClassName WelfareChooseController * @ClassName WelfareChooseController
@@ -126,6 +128,12 @@ public class WelfareUserChooseController {
selection.setReceiveAddress(receiveAddress); selection.setReceiveAddress(receiveAddress);
insertList.add(selection); insertList.add(selection);
}); });
List<WelfareUserSelection> list = insertList.stream().filter(v -> v.getSelectNum() > 1).collect(Collectors.toList());
if (Lang.isNotEmpty(list)) {
return Result.error();
}
simpleService.dao().insert(insertList); simpleService.dao().insert(insertList);
simpleService.dao().update(WelfareList.class, simpleService.dao().update(WelfareList.class,
Chain.make("isReceive", true), Chain.make("isReceive", true),
@@ -170,6 +178,9 @@ public class WelfareUserChooseController {
for (WelfareUserSelection welfareUserSelection : welfareUserSelections) { for (WelfareUserSelection welfareUserSelection : welfareUserSelections) {
welfareUserSelection.setSelectUserId(userId); welfareUserSelection.setSelectUserId(userId);
welfareUserSelection.setSelectTime(new Date()); welfareUserSelection.setSelectTime(new Date());
if (welfareUserSelection.getSelectNum() > 1) {
return Result.error("福利选择限制超过最大限制");
}
} }
simpleService.dao().insert(welfareUserSelections); simpleService.dao().insert(welfareUserSelections);
Binary file not shown.

After

Width:  |  Height:  |  Size: 165 KiB

+13
View File
@@ -306,6 +306,10 @@ layout("/mobile/platform.html"){
<img src="/assets/mobile/img/home/1民主管理.jpg" alt="" class="menu_item_img" /> <img src="/assets/mobile/img/home/1民主管理.jpg" alt="" class="menu_item_img" />
<span class="menu_item_name">修改密码</span> <span class="menu_item_name">修改密码</span>
</div> </div>
<div @click="loginOut" class="menu_item">
<img src="/assets/mobile/img/home/解除绑定.jpg" alt="" class="menu_item_img" />
<span class="menu_item_name">解除绑定</span>
</div>
<div @click="switchModuleMenus(item)" v-for="item in moduleMenus" class="menu_item"> <div @click="switchModuleMenus(item)" v-for="item in moduleMenus" class="menu_item">
<img :src="CREATE_PREVIEW_URL(item.iconClass)" alt="" class="menu_item_img" /> <img :src="CREATE_PREVIEW_URL(item.iconClass)" alt="" class="menu_item_img" />
<span class="menu_item_name">{{item.moduleName}}</span> <span class="menu_item_name">{{item.moduleName}}</span>
@@ -525,6 +529,15 @@ layout("/mobile/platform.html"){
} }
}, },
methods: { methods: {
async loginOut(){
const confirm = await vant.Dialog.confirm({
title: '提示',
message: '您确定要解除绑定当前登录账号吗?'
})
if (confirm === 'confirm') {
window.location.href = '/mobile/login/clearWxOpenId'
}
},
updatePwd() { updatePwd() {
this.updatePwdShow = true this.updatePwdShow = true
}, },
+3 -2
View File
@@ -74,8 +74,9 @@ layout("/mobile/platform.html"){
} }
.logo { .logo {
height: 300px; /*height: 300px;*/
position: relative; /* 如果之前使用了绝对定位,改为相对定位 */ position: relative; /* 如果之前使用了绝对定位,改为相对定位 */
height: 30%;
z-index: 1; /* 确保logo在content下方 */ z-index: 1; /* 确保logo在content下方 */
} }
@@ -86,7 +87,7 @@ layout("/mobile/platform.html"){
</style> </style>
<div v-cloak id="app"> <div v-cloak id="app">
<div class="logo"> <div class="logo">
<img style="width: 100%" src="/assets/mobile/img/login.png" /> <img style="width: 100%;height: 30vh" src="/assets/mobile/img/login.png" />
</div> </div>
<div class="content"> <div class="content">
<van-row><h1 style="margin: 0px 0;color: #1d1b1b;font-family: 'SourceHanSansCN-Heav"> {{ '' }} </h1></van-row> <van-row><h1 style="margin: 0px 0;color: #1d1b1b;font-family: 'SourceHanSansCN-Heav"> {{ '' }} </h1></van-row>
@@ -325,7 +325,7 @@ layout("/mobile/platform.html"){
<van-cell> <van-cell>
<van-field label="联系方式" v-model="mobile" required placeholder="请输入联系方式" type="tel" maxlength="11"></van-field> <van-field label="联系方式" v-model="mobile" required placeholder="请输入联系方式" type="tel" maxlength="11"></van-field>
</van-cell> </van-cell>
<van-cell @click="openShoppingPopup(item,index)" is-link title="收货门店" v-if="item.shoppingId"> <van-cell @click="openShoppingPopup(item,index)" is-link title="取货门店" v-if="item.shoppingId">
<template #label>{{item.receiveAddress?item.receiveAddress:'暂未选择'}}</template> <template #label>{{item.receiveAddress?item.receiveAddress:'暂未选择'}}</template>
</van-cell> </van-cell>
</van-cell> </van-cell>
@@ -640,12 +640,13 @@ layout("/mobile/platform.html"){
} }
}) })
if (notReceiveAddress.length > 0) { if (notReceiveAddress.length > 0) {
this.$modal.msg("请填写收货门店:" + notReceiveAddress.join(",")) this.$modal.msg("请选择取货门店:" + notReceiveAddress.join(","))
return return
} }
const { code, msg, data } = await $.post("/platform/welfare/userChoose/confirmSelect", { const { code, msg, data } = await $.post("/platform/welfare/userChoose/confirmSelect", {
welfareUserSelections: JSON.stringify(formData), welfareUserSelections: JSON.stringify(formData),
projectId: this.projectId projectId: this.projectId,
mobile: this.mobile
}) })
if (code === 0) { if (code === 0) {
this.getUserSelection(this.projectId) this.getUserSelection(this.projectId)
@@ -330,13 +330,13 @@ layout("/layouts/platform.html"){
</template> </template>
<template #func> <!--<template #func>
<div class="mr10" v-if="unionLeaderCoach"> <div class="mr10" v-if="unionLeaderCoach">
<!--团长:<span style="color: #419BF8">{{headData.username | str}}</span>&emsp13;&ndash;&gt;--> &lt;!&ndash;团长:<span style="color: #419BF8">{{headData.username | str}}</span>&emsp13;&ndash;&gt;&ndash;&gt;
领队:<span style="color: #419BF8">{{LeaderData.username | str}} </span>&emsp13; 领队:<span style="color: #419BF8">{{LeaderData.username | str}} </span>&emsp13;
教练:<span style="color: #419BF8">{{CoachData.username | str}}</span> 教练:<span style="color: #419BF8">{{CoachData.username | str}}</span>
<!-- 工作人员:<span &lt;!&ndash; 工作人员:<span
style="color: #419BF8">{{staffData.username | str}}</span>--> style="color: #419BF8">{{staffData.username | str}}</span>&ndash;&gt;
</div> </div>
<div> <div>
<el-button @click="openLeaderCoach" plain type="primary" <el-button @click="openLeaderCoach" plain type="primary"
@@ -344,7 +344,7 @@ layout("/layouts/platform.html"){
</el-button> </el-button>
</div> </div>
</template> </template>-->
</table-tool> </table-tool>
<el-table :data="tableData" :size="tableSize" @sort-change="pageOrder" <el-table :data="tableData" :size="tableSize" @sort-change="pageOrder"
@@ -1873,8 +1873,9 @@ layout("/layouts/platform.html"){
this.athleteMaxNum = data.athletesMaxNum this.athleteMaxNum = data.athletesMaxNum
} else { } else {
if (data.unionLimit) { if (data.unionLimit) {
data.unionLimit = JSON.parse(data.unionLimit) const unionLimitData = JSON.parse(data.unionLimit)
const unionLimit = data.unionLimit.find(v => v.id === "${@shiro.getPrincipalProperty('unit').getUnionid()}") // data.unionLimit = JSON.parse(data.unionLimit)
const unionLimit = unionLimitData.find(v => v.id === "${@shiro.getPrincipalProperty('unit').getUnionid()}")
this.athleteMaxNum = unionLimit.limitCount this.athleteMaxNum = unionLimit.limitCount
} else { } else {
this.athleteMaxNum = 0 this.athleteMaxNum = 0
@@ -1954,7 +1955,7 @@ layout("/layouts/platform.html"){
} }
if (awardsModeG.length > 0) { if (awardsModeG.length > 0) {
this.appliedData3 = awardsModeG this.appliedData = awardsModeG
} }
if (awardsModeT.length > 0) { if (awardsModeT.length > 0) {
this.appliedData = awardsModeT this.appliedData = awardsModeT
@@ -2100,7 +2101,7 @@ layout("/layouts/platform.html"){
}) })
//判断每一个选手填写的是否正确 //判断每一个选手填写的是否正确
for (let i = 0; i < appliedData.length; i++) { for (let i = 0; i < appliedData.length; i++) {
if (!appliedData[i].position) { /* if (!appliedData[i].position) {
this.$message.warning("请填写完整职称职务!") this.$message.warning("请填写完整职称职务!")
return return
} }
@@ -2113,7 +2114,7 @@ layout("/layouts/platform.html"){
this.$message.warning("手机号填写不正确!") this.$message.warning("手机号填写不正确!")
return return
} }
} }*/
} }
if (this.appliedData3.length == 0 && this.appliedData.length == 0) { if (this.appliedData3.length == 0 && this.appliedData.length == 0) {
@@ -2480,7 +2481,6 @@ layout("/layouts/platform.html"){
this.rightChecked = v this.rightChecked = v
}, },
flushApplyed(applyed) { flushApplyed(applyed) {
debugger
if (this.activityData2.id === "6a2546b6df41457b871d590c0290eb07") { if (this.activityData2.id === "6a2546b6df41457b871d590c0290eb07") {
if (["00dfa3b4f2ad4d238277b1345e6437f3", "6748ad4bd12c4af5b32c3ceace7fc694"].includes(this.team) if (["00dfa3b4f2ad4d238277b1345e6437f3", "6748ad4bd12c4af5b32c3ceace7fc694"].includes(this.team)
&& "${@shiro.getPrincipalProperty('unit').getUnionid()}" !== "6234c0450ef0414f87a38794faac6c3d") { && "${@shiro.getPrincipalProperty('unit').getUnionid()}" !== "6234c0450ef0414f87a38794faac6c3d") {
@@ -287,17 +287,17 @@ layout("/layouts/platform.html"){
size="small" size="small"
@click="doAudit(true)" @click="doAudit(true)"
> >
核对名单 提交核对
</el-button> </el-button>
<!-- 取消确认 --> <!-- 取消确认 -->
<!--<el-button <el-button
:disabled="moment(projectInfo.choiceTimeEnd).valueOf()<moment().valueOf()" :disabled="moment(projectInfo.choiceTimeEnd).valueOf()<moment().valueOf()"
type="danger" type="danger"
size="small" size="small"
@click="doAudit(false)" @click="doAudit(false)"
> >
取消核对 取消核对
</el-button>--> </el-button>
<!-- <el-button :disabled="!pageForm.projectId" type="primary" size="small" <!-- <el-button :disabled="!pageForm.projectId" type="primary" size="small"
icon="el-icon-download" icon="el-icon-download"
@click="openExportWelFareList(pageForm.projectId)">导出签字表 @click="openExportWelFareList(pageForm.projectId)">导出签字表
@@ -670,8 +670,8 @@ layout("/layouts/platform.html"){
}, },
tableColumns: commonColumns.concat([ tableColumns: commonColumns.concat([
{ prop: "isChoose", label: "是否选择", width: "100px", sortable: true }, { prop: "isChoose", label: "是否选择", width: "100px", sortable: true },
{ prop: "gist_list", label: "所选福利", width: "100px" }, { prop: "gist_list", label: "所选福利"},
{ prop: "receiveAddress", label: "地址", width: "100px" }, { prop: "receiveAddress", label: "取货门店"},
{ prop: "userSign", label: "签字", width: "100px", checked: 0 }, { prop: "userSign", label: "签字", width: "100px", checked: 0 },
{ prop: "isAudit", label: "是否核对" }, { prop: "isAudit", label: "是否核对" },
{ prop: "auditTime", label: "核对时间", checked: 0 } { prop: "auditTime", label: "核对时间", checked: 0 }
@@ -782,7 +782,8 @@ layout("/layouts/platform.html"){
this.notifyWarning("当前分工会没有名单,暂不需要提交") this.notifyWarning("当前分工会没有名单,暂不需要提交")
return return
} }
const confirm = await this.$confirm("您确定名单都已核实,准确无误,提交后无法撤回,是否确认提交?", "提示", { const msg = flag ? "您确定名单都已核实,准确无误,提交后无法撤回,是否确认提交?" : "您是否要取消核对名单?"
const confirm = await this.$confirm(msg , "提示", {
confirmButtonText: "确定", confirmButtonText: "确定",
cancelButtonText: "取消", cancelButtonText: "取消",
type: "warning" type: "warning"