From 4eef7a632a87f61060794e6d70135453042d3185 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E9=82=A3=E4=BA=9B=E8=8A=B1=E5=84=BF?= <1156921458@qq.com>
Date: Tue, 6 May 2025 16:21:00 +0800
Subject: [PATCH 1/6] ..
---
.../auth/controller/ClientAuthController.java | 2 +-
.../app/client/auth/models/Client_user.java | 10 +
.../auth/service/ClientAuthService.java | 2 +-
.../auth/service/ClientAuthServiceImpl.java | 32 +-
.../app/client/auth/vo/ClientLoginBody.java | 4 +
frontend/src/pages/login/index.vue | 43 +-
frontend/src/pages/login/register.vue | 464 +++++++++---------
frontend/vite.config.js | 2 +-
8 files changed, 313 insertions(+), 246 deletions(-)
diff --git a/backend/src/main/java/com/budwk/app/client/auth/controller/ClientAuthController.java b/backend/src/main/java/com/budwk/app/client/auth/controller/ClientAuthController.java
index 333250f..68c861b 100644
--- a/backend/src/main/java/com/budwk/app/client/auth/controller/ClientAuthController.java
+++ b/backend/src/main/java/com/budwk/app/client/auth/controller/ClientAuthController.java
@@ -85,7 +85,7 @@ public class ClientAuthController {
@ApiOperation(value = "短信登录", nickname = "/sms-login", httpMethod = "POST")
public Object doSmsLogin(ClientLoginBody loginBody, HttpServletRequest req) {
try {
- String token = clientAuthService.doSmsLogin(loginBody);
+ String token = clientAuthService.doLogin(loginBody);
return Result.success().addData(token);
} catch (Exception e) {
log.error(e.getMessage(), e);
diff --git a/backend/src/main/java/com/budwk/app/client/auth/models/Client_user.java b/backend/src/main/java/com/budwk/app/client/auth/models/Client_user.java
index 89417fb..89b3545 100644
--- a/backend/src/main/java/com/budwk/app/client/auth/models/Client_user.java
+++ b/backend/src/main/java/com/budwk/app/client/auth/models/Client_user.java
@@ -48,6 +48,16 @@ public class Client_user extends BaseModel implements Serializable {
@Comment("单位ID")
private String unitId;
+ @Column
+ @ColDefine(type = ColType.VARCHAR, width = 255)
+ @Comment("密码")
+ private String password;
+
+ @Column
+ @ColDefine(type = ColType.VARCHAR, width = 255)
+ @Comment("盐")
+ private String salt;
+
@Column
@ColDefine(type = ColType.VARCHAR, width = 255)
@Comment("openId")
diff --git a/backend/src/main/java/com/budwk/app/client/auth/service/ClientAuthService.java b/backend/src/main/java/com/budwk/app/client/auth/service/ClientAuthService.java
index 551a5be..67ac60a 100644
--- a/backend/src/main/java/com/budwk/app/client/auth/service/ClientAuthService.java
+++ b/backend/src/main/java/com/budwk/app/client/auth/service/ClientAuthService.java
@@ -10,7 +10,7 @@ public interface ClientAuthService {
* @param loginBody 登录信息
* @return token
*/
- String doSmsLogin(ClientLoginBody loginBody);
+ String doLogin(ClientLoginBody loginBody);
/**
* 注册
diff --git a/backend/src/main/java/com/budwk/app/client/auth/service/ClientAuthServiceImpl.java b/backend/src/main/java/com/budwk/app/client/auth/service/ClientAuthServiceImpl.java
index 2cb8a49..c12d31f 100644
--- a/backend/src/main/java/com/budwk/app/client/auth/service/ClientAuthServiceImpl.java
+++ b/backend/src/main/java/com/budwk/app/client/auth/service/ClientAuthServiceImpl.java
@@ -1,7 +1,9 @@
package com.budwk.app.client.auth.service;
import cn.hutool.core.bean.BeanUtil;
+import cn.hutool.core.util.StrUtil;
import com.budwk.app.base.exception.BaseException;
+import com.budwk.app.base.utils.PwdUtil;
import com.budwk.app.client.auth.vo.ClientLoginBody;
import com.budwk.app.client.auth.models.Client_user;
import com.budwk.app.client.auth.vo.ClientRegisterBody;
@@ -11,6 +13,9 @@ import org.nutz.dao.Cnd;
import org.nutz.dao.Dao;
import org.nutz.ioc.loader.annotation.Inject;
import org.nutz.ioc.loader.annotation.IocBean;
+import org.nutz.lang.Strings;
+
+import java.util.List;
@IocBean
public class ClientAuthServiceImpl implements ClientAuthService {
@@ -21,23 +26,34 @@ public class ClientAuthServiceImpl implements ClientAuthService {
private ValidateService validateService;
@Override
- public String doSmsLogin(ClientLoginBody loginBody) {
+ public String doLogin(ClientLoginBody loginBody) {
Client_user user = null;
int count = dao.count(Client_user.class, Cnd.where(Client_user::getPhone, "=", loginBody.getPhone()));
if (count == 0) {
-// // 自动注册
-// user = new Client_user();
-// user.setPhone(loginBody.getPhone());
-// user.setUserName("用户" + loginBody.getPhone());
-// dao.insert(user);
throw new BaseException("手机号码不存在");
}
- validateService.checkSMSCode(loginBody.getPhone(), loginBody.getSmsCode());
user = dao.fetch(Client_user.class, Cnd.where(Client_user::getPhone, "=", loginBody.getPhone()));
+
if (user == null) {
- throw new BaseException("用户登录失败");
+ throw new BaseException("用户不存在");
}
+
+ if (StrUtil.isBlank(loginBody.getLoginMethod()) || !List.of("sms", "password").contains(loginBody.getLoginMethod())) {
+ throw new BaseException("登录方式不正确");
+ }
+
+ if (loginBody.getLoginMethod().equals("sms")) {
+ validateService.checkSMSCode(loginBody.getPhone(), loginBody.getSmsCode());
+ }
+
+ if (loginBody.getLoginMethod().equals("password")) {
+ String hashedPassword = PwdUtil.getPassword(loginBody.getPassword(), user.getSalt());
+ if (!Strings.sNull(hashedPassword).equalsIgnoreCase(user.getPassword())) {
+ throw new BaseException("密码不正确");
+ }
+ }
+
StpClientUtil.STP.login(user.getId());
StpClientUtil.STP.checkLogin();
return StpClientUtil.STP.getTokenValue();
diff --git a/backend/src/main/java/com/budwk/app/client/auth/vo/ClientLoginBody.java b/backend/src/main/java/com/budwk/app/client/auth/vo/ClientLoginBody.java
index f192016..41b39a3 100644
--- a/backend/src/main/java/com/budwk/app/client/auth/vo/ClientLoginBody.java
+++ b/backend/src/main/java/com/budwk/app/client/auth/vo/ClientLoginBody.java
@@ -9,4 +9,8 @@ public class ClientLoginBody {
private String smsCode;
+ private String password;
+
+ private String loginMethod;
+
}
diff --git a/frontend/src/pages/login/index.vue b/frontend/src/pages/login/index.vue
index b20beb9..3419d54 100644
--- a/frontend/src/pages/login/index.vue
+++ b/frontend/src/pages/login/index.vue
@@ -62,16 +62,16 @@
- 手机快速登录
+ 验证码登录
- 账号密码登录
+ 密码登录
@@ -90,7 +90,7 @@
-
+
+
+
+
+
+
+
立即登录
@@ -127,17 +139,14 @@ import {useUserStore} from "@/store";
const request = useRequest()
const userStore = useUserStore()
-const activeMethod = ref('phone')
const loginForm = reactive({
phone: '',
- smsCode: ''
+ smsCode: '',
+ password: '',
+ loginMethod: 'sms'
})
-const setActiveMethod = (method) => {
- activeMethod.value = method
-}
-
// 倒计时相关
const countdown = ref(0)
const timer = ref(null)
@@ -265,10 +274,14 @@ async function handleLogin() {
Toast('请输入手机号码');
return
}
- if (!loginForm.smsCode) {
+ if (!loginForm.smsCode && loginForm.loginMethod === 'sms') {
Toast('请输入验证码');
return
}
+ if (!loginForm.password && loginForm.loginMethod === 'password') {
+ Toast('请输入密码');
+ return
+ }
try {
userStore.smsLogin(loginForm).then(() => {
@@ -318,7 +331,7 @@ async function handleLogin() {
}
}
-function navigateToRegister(){
+function navigateToRegister() {
uni.redirectTo({
url: '/pages/login/register'
})
diff --git a/frontend/src/pages/login/register.vue b/frontend/src/pages/login/register.vue
index caf88c3..ae0c8a4 100644
--- a/frontend/src/pages/login/register.vue
+++ b/frontend/src/pages/login/register.vue
@@ -1,8 +1,57 @@
-
-
-
+
+
+
+
+
+
JOIN US
@@ -11,91 +60,77 @@
-
-
-
- 填写信息
+
+
+
+
+
+
+
-
-
-
-
-
-
-
+
+
+
+
+
-
-
-
-
-
-
+
+
+
+
+ {{ formData.unitName || '请选择单位' }}
+
+
-
-
-
-
-
-
- {{ formData.unitName || '请选择单位' }}
-
-
-
+
+
+
+
+
-
-
-
-
-
-
+
+
+
+
+
+ {{ countdown > 0 ? `${countdown}秒` : '获取验证码' }}
+
-
-
-
-
-
-
-
- {{ countdown > 0 ? `${countdown}秒` : '获取验证码' }}
-
-
+
+
+ {{ registering ? '注册中...' : '立即注册' }}
+
-
-
- {{ registering ? '注册中...' : '立即注册' }}
-
-
-
-
- 已有账号?
- 立即登录
-
+
+
+ 已有账号?
+ 立即登录
@@ -107,36 +142,36 @@
选择单位
确定
-
+
-
-
-
+
-
- {
if (!searchKeyword.value) {
return unitList.value;
}
- return unitList.value.filter(unit =>
+ return unitList.value.filter(unit =>
unit.name.toLowerCase().includes(searchKeyword.value.toLowerCase())
);
});
@@ -238,7 +273,7 @@ const confirmUnitSelection = () => {
Toast({ message: '请选择单位', theme: 'warning' });
return;
}
-
+
const selectedUnit = unitList.value.find(unit => unit.id === selectedUnitId.value);
if (selectedUnit) {
formData.unitId = selectedUnit.id;
@@ -268,16 +303,16 @@ const sendVerificationCode = async () => {
Toast({ message: '请输入正确的手机号', theme: 'error' });
return;
}
-
+
if (countdown.value > 0) return;
-
+
sendingCode.value = true;
try {
const { code, msg } = await useRequest().post('/client/auth/send-verification-code', {
phone: formData.phone,
type: 'register'
});
-
+
if (code === 0) {
Toast({ message: '验证码已发送' });
startCountdown();
@@ -309,7 +344,7 @@ const handleRegister = async () => {
Toast({ message: '请完善注册信息', theme: 'error' });
return;
}
-
+
registering.value = true;
try {
const { code, msg } = await useRequest().post('/client/auth/register', {
@@ -319,7 +354,7 @@ const handleRegister = async () => {
idCard: formData.idCard,
verificationCode: formData.verificationCode
});
-
+
if (code === 0) {
Toast({ message: '注册成功' });
// 注册成功后跳转到登录页
@@ -368,184 +403,173 @@ onMounted(() => {
\ No newline at end of file
+
diff --git a/backend/src/main/resources/views/platform/activity/manage/addOrUpdate.js b/backend/src/main/resources/views/platform/activity/manage/addOrUpdate.js
index 5e27579..6d4ff33 100644
--- a/backend/src/main/resources/views/platform/activity/manage/addOrUpdate.js
+++ b/backend/src/main/resources/views/platform/activity/manage/addOrUpdate.js
@@ -78,6 +78,9 @@ const addOrUpdate = {
{{form.files}}
+
+
+
取消
diff --git a/backend/src/main/resources/views/platform/activity/wonderfulMoment/addOrUpdate.js b/backend/src/main/resources/views/platform/activity/wonderfulMoment/addOrUpdate.js
new file mode 100644
index 0000000..a80cd0e
--- /dev/null
+++ b/backend/src/main/resources/views/platform/activity/wonderfulMoment/addOrUpdate.js
@@ -0,0 +1,78 @@
+const addOrUpdate = {
+ template: /*language=HTML*/ `
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 取消
+ 确定
+
+
+ `,
+ data() {
+ return {
+ title: '',
+ visible: false,
+ form: {
+ published: true,
+ },
+ rules: {
+ title: [{required: true, message: '请输入标题', trigger: ['blur', 'change']}],
+ content: [{required: true, message: '请输入内容', trigger: ['blur', 'change']}],
+ cover: [{required: true, message: '请上传封面图', trigger: ['blur', 'change']}],
+ },
+ }
+ },
+ methods: {
+ onOpen(row) {
+ this.visible = true
+ if (row?.id) {
+ this.$nextTick(() => {
+ this.form = JSON.parse(JSON.stringify(row))
+ })
+ } else {
+ this.form = {published: true}
+ }
+ },
+ onSubmit() {
+ this.$refs.form.validate((valid) => {
+ if (valid) {
+ this.$confirm('您确定要提交吗?', '提示', {
+ type: 'warning',
+ confirmButtonText: '确定',
+ cancelButtonText: '取消'
+ }).then(() => {
+ $.post('/platform/activity/wonderfulMoment/onHandle', {"wonderfulMoment": JSON.stringify(this.form)}).then(res => {
+ if (res.code === 0) {
+ this.$message.success(this.form.id ? '修改成功' : '新增成功')
+ this.$emit('refresh')
+ this.visible = false
+ } else {
+ this.$message.error(res.msg)
+ }
+ })
+ }).catch(() => {
+
+ })
+ }
+ })
+ }
+ }
+
+}
diff --git a/backend/src/main/resources/views/platform/activity/wonderfulMoment/index.html b/backend/src/main/resources/views/platform/activity/wonderfulMoment/index.html
new file mode 100644
index 0000000..ad86197
--- /dev/null
+++ b/backend/src/main/resources/views/platform/activity/wonderfulMoment/index.html
@@ -0,0 +1,120 @@
+
+
+
+
+
+
+
+
+
+ 新增精彩瞬间
+
+
+
+
+
+
+
+
+ {publishedChange(val, row)}"
+ v-model="row.published"
+ active-color="#13ce66"
+ inactive-color="#ff4949">
+
+
+
+
+
+ 修改
+ 删除
+
+
+
+
+
+
+
+
+
+
+
diff --git a/frontend/src/pages.json b/frontend/src/pages.json
index 4e46ffa..1ecb860 100644
--- a/frontend/src/pages.json
+++ b/frontend/src/pages.json
@@ -84,6 +84,12 @@
"style": {
"navigationBarTitleText": "精彩瞬间"
}
+ },
+ {
+ "path": "pages/activity/wonderfulMoment/index",
+ "style": {
+ "navigationBarTitleText": "精彩瞬间"
+ }
}
],
"globalStyle": {
diff --git a/frontend/src/pages/activity/wonderfulMoment/index.vue b/frontend/src/pages/activity/wonderfulMoment/index.vue
new file mode 100644
index 0000000..95c52e9
--- /dev/null
+++ b/frontend/src/pages/activity/wonderfulMoment/index.vue
@@ -0,0 +1,56 @@
+
+
+ {{ viewData?.title }}
+
+ 阅读 {{ viewData?.readCount }}
+ {{ moment(viewData?.publishTime).format('YYYY年MM月DD日 HH:mm') }}
+
+
+
+
+
+
+
+
+
diff --git a/frontend/src/pages/index/index.vue b/frontend/src/pages/index/index.vue
index ac33db2..a253a6a 100644
--- a/frontend/src/pages/index/index.vue
+++ b/frontend/src/pages/index/index.vue
@@ -32,41 +32,81 @@
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ item.title }}
+
+ {{ moment(item.startTime).format('M月DD日') + '-' + moment(item.endTime).format('DD日') }}
+ {{ item.address }}
+
+
+
+
+
+
+
+
+
+
+
-
-
+
-
- 一分钟了解运动会流程
-
- 6月15日-20日
- 江苏省体育中心
+
+ {{ item.title }}
+
+ {{ item.time }}
+ 阅读 {{ item.readCount }}
+
+
From 91002349239c95f642db964a14f9afdf316bf94e Mon Sep 17 00:00:00 2001
From: "@jyuhsin" <729757837@qq.com>
Date: Tue, 6 May 2025 17:47:09 +0800
Subject: [PATCH 3/6] commit
---
frontend/src/pages/index/index.vue | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/frontend/src/pages/index/index.vue b/frontend/src/pages/index/index.vue
index e22ab8d..ed5addf 100644
--- a/frontend/src/pages/index/index.vue
+++ b/frontend/src/pages/index/index.vue
@@ -80,7 +80,7 @@
{{ item.title }}
From 3a2e992774f2fc23e33039bdf2ee6a0dfa8b4366 Mon Sep 17 00:00:00 2001
From: "@jyuhsin" <729757837@qq.com>
Date: Tue, 6 May 2025 17:54:09 +0800
Subject: [PATCH 4/6] commit
---
.../activity/wonderfulMoment/index.html | 19 +++++++++++++++++++
frontend/src/pages/index/index.vue | 11 ++++++++++-
2 files changed, 29 insertions(+), 1 deletion(-)
diff --git a/backend/src/main/resources/views/platform/activity/wonderfulMoment/index.html b/backend/src/main/resources/views/platform/activity/wonderfulMoment/index.html
index ad86197..75e09bc 100644
--- a/backend/src/main/resources/views/platform/activity/wonderfulMoment/index.html
+++ b/backend/src/main/resources/views/platform/activity/wonderfulMoment/index.html
@@ -93,6 +93,25 @@ layout("/layouts/platform_1.html"){
}
},
methods: {
+ onTableRowDelete(id) {
+ if (!id) {
+ return
+ }
+ this.$confirm('确定删除该数据吗?', '提示', {
+ type: 'warning',
+ confirmButtonText: '确定',
+ cancelButtonText: '取消'
+ }).then(() => {
+ $.post(this.tableDeleteUrl, {id}).then((res) => {
+ if (res.code === 0) {
+ this.$message.success("删除成功")
+ this.pageData()
+ } else {
+ this.$message.error(res.msg)
+ }
+ })
+ }).catch(() => {})
+ },
publishedChange(val, row) {
const params = JSON.parse(JSON.stringify(row))
this.$set(params, 'published', val)
diff --git a/frontend/src/pages/index/index.vue b/frontend/src/pages/index/index.vue
index ed5addf..41abb53 100644
--- a/frontend/src/pages/index/index.vue
+++ b/frontend/src/pages/index/index.vue
@@ -48,6 +48,7 @@
@@ -68,6 +69,10 @@
+
@@ -76,7 +81,7 @@
精彩瞬间
-
+
+
From 4742d0c4aaa0152c70462665457bdc91cfb219c2 Mon Sep 17 00:00:00 2001
From: Paidax
Date: Tue, 6 May 2025 17:58:39 +0800
Subject: [PATCH 5/6] =?UTF-8?q?=E7=9F=AD=E4=BF=A1+=E6=8A=A5=E5=90=8D?=
=?UTF-8?q?=E4=BA=BA=E5=91=98?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
backend/application.yaml | 158 ------------------
.../activity/vo/ClientActivitySignVO.java | 2 +
.../controller/ActUserController.java | 7 +-
.../ActivitySignInQueryController.java | 12 ++
.../app/module/activity/models/ActUser.java | 17 ++
.../app/web/commons/ext/sms/SmsService.java | 20 ++-
backend/src/main/resources/application.yaml | 12 +-
.../activity/signInUserQuery/index.html | 32 +++-
.../views/platform/activity/user/index.html | 74 +++++++-
9 files changed, 154 insertions(+), 180 deletions(-)
delete mode 100644 backend/application.yaml
diff --git a/backend/application.yaml b/backend/application.yaml
deleted file mode 100644
index 4ac4425..0000000
--- a/backend/application.yaml
+++ /dev/null
@@ -1,158 +0,0 @@
-nutz:
- application:
- name: budwk-v5-mini-plus
- mvc:
- ignore: ^(.+[.])(jsp|png|gif|jpg|js|css|jspx|jpeg|html|mp3|mp4|ico|svg|vue)$
- exclusions: /favicon/*,/assets/*,/druid/*,/upload/*
-server:
- port: 9090
- host: 0.0.0.0
-
-jetty:
- contextPath: /
- threadpool:
- idleTimeout: 60000
- minThreads: 10
- maxThreads: 200
- gzip:
- enable: true
- page:
- 403: /error/403.html
- 404: /error/404.html
- 500: /error/500.html
- #结合ftp使用,或用nginx代理ftp路径
- #staticPath: E:/project/NutzWk/upload
- #开发模式静态资源
- staticPathLocal: E:/project/company/hmc_gbhd/src/main/resources/static
-
-security:
- tokenName: token
- timeout: 3600
- # 是否允许同一账号并发登录 (为true时允许一起登录, 为false时新登录挤掉旧登录)
- # 允许同一账号并发登录,则系统参数 SessionOnlyOne 有效,亦可踢人下线并多了弹框提示功能
- isConcurrent: true
- # 在多人登录同一账号时,是否共用一个token (为true时所有登录共用一个token, 为false时每次登录新建一个token)
- isShare: true
-
-redis:
- host: 192.168.21.207
- port: 6379
- timeout: 2000
- max_redir: 10
- database: 10
- maxTotal: 150
- pool:
- maxTotal: 150
- maxIdle: 50
- minIdle: 10
- #password: test123
- mode:
- normal
- #cluster
- #nodes=192.168.6.31:6377,192.168.6.31:6378,192.168.6.28:6377,192.168.6.28:6378,192.168.6.34:6377,192.168.6.34:6378
-
-jdbc:
- url: jdbc:mysql://192.168.21.207:3306/hmc_gbhd?useUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true
- username: root
- password: root
- validationQuery: select 1
- maxActive: 150
- testWhileIdle: true
- connectionProperties: druid.stat.slowSqlMillis=2000
- defaultAutoCommit: true
-
-
-xsssql:
- ignore:
- urls: /platform/cms/content/article/addDo,/platform/sys/app/conf/addDo,/platform/sys/app/conf/editDo
-
-beetl:
- RESOURCE:
- #本地路径,开发时设置本地路径,便于调试
- rootLocal: E:/project/company/hmc_gbhd/src/main/resources/views/
- root: views/
- DELIMITER_STATEMENT_START: ''
- FT:
- #用法: ${"wizzer",escape}
- escape: com.budwk.app.web.commons.ext.beetl.HtmlEscapeFormat
- #用法: ${10241024,filesize}
- filesize: com.budwk.app.web.commons.ext.beetl.FileSizeFormat
- #用法: ${"",html2txt="100"} 截取100字符
- html2txt: com.budwk.app.web.commons.ext.beetl.Html2TxtFormat
- #用法: ${"",strlen="100"} 截取100字符
- strlen: com.budwk.app.web.commons.ext.beetl.StrlenFormat
-
-#==============================================================
-#Configure Main Scheduler Properties
-#==============================================================
-#quartz延迟启动秒数
-quartz:
- startupDelay: 10
- scheduler:
- instanceName: defaultScheduler
- instanceId: AUTO
- #==============================================================
- #Skip Check Update
- #update:true
- #not update:false
- #==============================================================
- skipUpdateCheck: true
- #==============================================================
- #Configure JobStore isClustered=启用集群模式
- #==============================================================
- jobStore:
- class: org.quartz.impl.jdbcjobstore.JobStoreTX
- driverDelegateClass: org.quartz.impl.jdbcjobstore.StdJDBCDelegate
- #driverDelegateClass: org.quartz.impl.jdbcjobstore.PostgreSQLDelegate
- #driverDelegateClass: org.quartz.impl.jdbcjobstore.oracle.OracleDelegate
- #Other delegates can see: http://www.quartz-scheduler.org/documentation/quartz-2.x/tutorials/tutorial-lesson-09.html
- dataSource: myDS
- tablePrefix: SYS_QRTZ_
- isClustered: false
- clusterCheckinInterval: 20000
- maxMisfiresToHandleAtATime: 120
- misfireThreshold: 120000
- txIsolationLevelSerializable: false
-
- #==============================================================
- #Configure ThreadPool
- #==============================================================
- threadPool:
- class: org.quartz.simpl.SimpleThreadPool
- threadCount: 2
- threadPriority: 5
- threadsInheritContextClassLoaderOfInitializingThread: true
-
- #============================================================================
- # Configure Plugins
- #============================================================================
- plugin:
- triggHistory:
- class: org.quartz.plugins.history.LoggingJobHistoryPlugin
- shutdownhook:
- class: org.quartz.plugins.management.ShutdownHookPlugin
- cleanShutdown: true
- #============================================================================
- # NutDao dataSource
- #============================================================================
- dataSource:
- myDS:
- connectionProvider:
- class: com.budwk.app.task.conn.NutConnectionProvider
-
-
-sms:
- enabled: false
- #腾讯云短信配置
- tencent:
- secret-id: 1
- secret-key: 2
- appid: 1 #应用ID
- sign: '萌发开源' #短信签名
- tpl:
- #验证码模板ID
- code: 1
- #短信通知模板ID
- msg: 2
-
diff --git a/backend/src/main/java/com/budwk/app/client/module/activity/vo/ClientActivitySignVO.java b/backend/src/main/java/com/budwk/app/client/module/activity/vo/ClientActivitySignVO.java
index fc7c3ed..4e30663 100644
--- a/backend/src/main/java/com/budwk/app/client/module/activity/vo/ClientActivitySignVO.java
+++ b/backend/src/main/java/com/budwk/app/client/module/activity/vo/ClientActivitySignVO.java
@@ -13,6 +13,8 @@ public class ClientActivitySignVO {
private Long activityId;
+ private String unitId;
+
private String unitName;
private String contactName;
diff --git a/backend/src/main/java/com/budwk/app/module/activity/controller/ActUserController.java b/backend/src/main/java/com/budwk/app/module/activity/controller/ActUserController.java
index b014f12..e756c49 100644
--- a/backend/src/main/java/com/budwk/app/module/activity/controller/ActUserController.java
+++ b/backend/src/main/java/com/budwk/app/module/activity/controller/ActUserController.java
@@ -105,6 +105,7 @@ public class ActUserController {
user.setId(actUser.getId());
}
user.setUserId(user.getUserId());
+ user.setUnitId(vo.getUnitId());
user.setSignUpTime(localDateTime);
user.setSignUpContacts(vo.getContactName());
user.setSignUpMobile(vo.getContactPhone());
@@ -115,6 +116,7 @@ public class ActUserController {
} else {
for (ActUser user : doSignUserList) {
user.setUserId(user.getUserId());
+ user.setUnitId(vo.getUnitId());
user.setSignUpTime(localDateTime);
user.setSignUpContacts(vo.getContactName());
user.setSignUpMobile(vo.getContactPhone());
@@ -134,6 +136,7 @@ public class ActUserController {
dao.insert(clientUser);
user.setUserId(clientUser.getId());
+ user.setUnitId(vo.getUnitId());
user.setSignUpTime(localDateTime);
user.setSignUpContacts(vo.getContactName());
user.setSignUpMobile(vo.getContactPhone());
@@ -171,8 +174,8 @@ public class ActUserController {
@At
@SaCheckPermission("activity.user")
- public Result findSignUserInfo(String userId){
- return Result.success(dao.fetch(ActUser.class, Cnd.where(ActUser::getUserId, "=", userId)));
+ public Result findSignUserInfo(String id){
+ return Result.success(dao.fetch(ActUser.class, Cnd.where(ActUser::getId, "=", id)));
}
diff --git a/backend/src/main/java/com/budwk/app/module/activity/controller/ActivitySignInQueryController.java b/backend/src/main/java/com/budwk/app/module/activity/controller/ActivitySignInQueryController.java
index c8bd55f..1740422 100644
--- a/backend/src/main/java/com/budwk/app/module/activity/controller/ActivitySignInQueryController.java
+++ b/backend/src/main/java/com/budwk/app/module/activity/controller/ActivitySignInQueryController.java
@@ -15,6 +15,7 @@ import com.budwk.app.module.activity.service.ActivitySignInQueryService;
import com.budwk.app.module.activity.vo.page.ActSignInUserPageForm;
import lombok.extern.slf4j.Slf4j;
import org.apache.poi.ss.usermodel.Workbook;
+import org.nutz.dao.Chain;
import org.nutz.dao.Cnd;
import org.nutz.dao.Sqls;
import org.nutz.dao.sql.Sql;
@@ -87,6 +88,17 @@ public class ActivitySignInQueryController {
}
+ @At
+ @SaCheckPermission("activity.signInUserQuery")
+ public Result doGrant(String id, Boolean isGrant) {
+ if (StrUtil.isBlank(id)) {
+ return Result.error("参数错误");
+ }
+ activitySignInQueryService.update(Chain.make("isGrant", isGrant), Cnd.where("id", "=", id));
+ return Result.success();
+ }
+
+
@At
@Ok("void")
@SaCheckPermission("activity.signInUserQuery")
diff --git a/backend/src/main/java/com/budwk/app/module/activity/models/ActUser.java b/backend/src/main/java/com/budwk/app/module/activity/models/ActUser.java
index 56a498e..bbf269a 100644
--- a/backend/src/main/java/com/budwk/app/module/activity/models/ActUser.java
+++ b/backend/src/main/java/com/budwk/app/module/activity/models/ActUser.java
@@ -70,6 +70,11 @@ public class ActUser extends BaseModel {
@ColDefine(type = ColType.VARCHAR, width = 30)
private String phone;
+ @Column
+ @Comment("参加单位Id")
+ @ColDefine(type = ColType.VARCHAR, width = 32)
+ private String unitId;
+
@Column
@Comment("参加单位名称")
@ColDefine(type = ColType.VARCHAR, width = 100)
@@ -95,6 +100,12 @@ public class ActUser extends BaseModel {
@ColDefine(type = ColType.BOOLEAN)
private Boolean isStay;
+ @Column
+ @Comment("是否联系人")
+ @ColDefine(type = ColType.BOOLEAN)
+ @Default("0")
+ private Boolean isContacts;
+
@Column
@Comment("是否签到")
@ColDefine(type = ColType.BOOLEAN)
@@ -105,4 +116,10 @@ public class ActUser extends BaseModel {
@Comment("签到时间")
@ColDefine(type = ColType.DATETIME)
private LocalDateTime signInTime;
+
+ @Column
+ @Comment("是否发放物资")
+ @ColDefine(type = ColType.BOOLEAN)
+ @Default("0")
+ private Boolean isGrant;
}
diff --git a/backend/src/main/java/com/budwk/app/web/commons/ext/sms/SmsService.java b/backend/src/main/java/com/budwk/app/web/commons/ext/sms/SmsService.java
index 3976ad9..689c054 100644
--- a/backend/src/main/java/com/budwk/app/web/commons/ext/sms/SmsService.java
+++ b/backend/src/main/java/com/budwk/app/web/commons/ext/sms/SmsService.java
@@ -1,5 +1,6 @@
package com.budwk.app.web.commons.ext.sms;
+import cn.hutool.json.JSONUtil;
import com.budwk.app.base.exception.BaseException;
import com.tencentcloudapi.common.Credential;
import com.tencentcloudapi.common.exception.TencentCloudSDKException;
@@ -48,20 +49,21 @@ public class SmsService {
ClientProfile clientProfile = new ClientProfile();
clientProfile.setHttpProfile(httpProfile);
- SmsClient client = new SmsClient(cred, "", clientProfile);
+ SmsClient client = new SmsClient(cred, "ap-guangzhou", clientProfile);
SendSmsRequest req = new SendSmsRequest();
- String[] phoneNumberSet1 = {"+86" + mobile};
- req.setPhoneNumberSet(phoneNumberSet1);
- String[] templateParamSet1 = {text, "5"};
- req.setTemplateParamSet(templateParamSet1);
- req.setTemplateID(conf.get("sms.tencent.tpl.login_code"));
req.setSmsSdkAppid(conf.get("sms.tencent.appid"));
req.setSign(conf.get("sms.tencent.sign"));
+ req.setTemplateID(conf.get("sms.tencent.tpl.login_code"));
+ String[] phoneNumberSet1 = {"+86" + mobile};
+ req.setPhoneNumberSet(phoneNumberSet1);
+ String[] templateParamSet1 = {text};
+ req.setTemplateParamSet(templateParamSet1);
SendSmsResponse resp = client.SendSms(req);
log.debug(SendSmsResponse.toJsonString(resp));
return true;
} catch (TencentCloudSDKException tencentCloudSDKException) {
+ log.error(String.valueOf(tencentCloudSDKException));
throw new BaseException(tencentCloudSDKException.getMessage());
}
}
@@ -86,12 +88,12 @@ public class SmsService {
ClientProfile clientProfile = new ClientProfile();
clientProfile.setHttpProfile(httpProfile);
- SmsClient client = new SmsClient(cred, "", clientProfile);
+ SmsClient client = new SmsClient(cred, "ap-guangzhou", clientProfile);
SendSmsRequest req = new SendSmsRequest();
String[] phoneNumberSet1 = {"+86" + mobile};
req.setPhoneNumberSet(phoneNumberSet1);
- String[] templateParamSet1 = {text, "5"};
+ String[] templateParamSet1 = {text};
req.setTemplateParamSet(templateParamSet1);
req.setTemplateID(conf.get("sms.tencent.tpl.reg_code"));
req.setSmsSdkAppid(conf.get("sms.tencent.appid"));
@@ -126,7 +128,7 @@ public class SmsService {
ClientProfile clientProfile = new ClientProfile();
clientProfile.setHttpProfile(httpProfile);
- SmsClient client = new SmsClient(cred, "", clientProfile);
+ SmsClient client = new SmsClient(cred, "ap-guangzhou", clientProfile);
SendSmsRequest req = new SendSmsRequest();
req.setPhoneNumberSet(mobile);
diff --git a/backend/src/main/resources/application.yaml b/backend/src/main/resources/application.yaml
index 16ef37e..6b65baf 100644
--- a/backend/src/main/resources/application.yaml
+++ b/backend/src/main/resources/application.yaml
@@ -23,7 +23,7 @@ jetty:
#结合ftp使用,或用nginx代理ftp路径
#staticPath: E:/project/NutzWk/upload
#开发模式静态资源
- staticPathLocal: E:/project/company/hmc_gbhd/src/main/resources/static
+ staticPathLocal: G:/project/hmc_gbhd/src/main/resources/static
security:
tokenName: token
@@ -35,7 +35,7 @@ security:
isShare: true
redis:
- host: 192.168.21.207
+ host: 127.0.0.1
port: 6379
timeout: 2000
max_redir: 10
@@ -69,7 +69,7 @@ xsssql:
beetl:
RESOURCE:
#本地路径,开发时设置本地路径,便于调试
- rootLocal: E:/project/company/hmc_gbhd/src/main/resources/views/
+ rootLocal: G:/projects/hmc_gbhd/src/main/resources/views/
root: views/
DELIMITER_STATEMENT_START: ''
@@ -147,11 +147,11 @@ swagger:
description: 趣味运动会系统
sms:
- enabled: false
+ enabled: true
#腾讯云短信配置
tencent:
- secret-id: 1301383032
- secret-key: AKIDMZWDepjNnxqSotiHZeU6SYOyIMAj24rO
+ secret-id: AKID3vYx5xYu0pVwDIAm9F4ey74mEPJwJQGp
+ secret-key: LPDl5AyV4NQM3TdW9VaOvCE0VkjSu5zc
appid: 1400934413 #应用ID
sign: '武汉地大三思科技' #短信签名
tpl:
diff --git a/backend/src/main/resources/views/platform/activity/signInUserQuery/index.html b/backend/src/main/resources/views/platform/activity/signInUserQuery/index.html
index e02fa45..bfed59e 100644
--- a/backend/src/main/resources/views/platform/activity/signInUserQuery/index.html
+++ b/backend/src/main/resources/views/platform/activity/signInUserQuery/index.html
@@ -62,6 +62,18 @@ layout("/layouts/platform_1.html"){
+
+
+ 已发放
+ 未发放
+
+
+
+
+ 设为已发放物资
+ 设为未发放物资
+
+
@@ -82,6 +94,24 @@ layout("/layouts/platform_1.html"){
}
},
methods: {
+ async doGrant(row, isGrant) {
+ this.$confirm('您确定要设置成' + (isGrant ? '已发放' : '未发放') + '状态吗?', '提示', {
+ confirmButtonText: '确定',
+ cancelButtonText: '取消',
+ type: 'warning'
+ }).then(async () => {
+ const resp = await $.post("/platform/activity/signInUserQuery/doGrant", {
+ id: row.id,
+ isGrant: isGrant
+ })
+ if (resp.code === 0) {
+ this.doSearch()
+ this.$message.success(resp.msg)
+ } else {
+ this.$message.error(resp.msg)
+ }
+ })
+ },
doExport() {
window.open("/platform/activity/signInUserQuery/doExport?activityId=" + this.pageForm.activityId + "&searchKeyword=" + this.pageForm.searchKeyword)
},
@@ -111,4 +141,4 @@ layout("/layouts/platform_1.html"){
\ No newline at end of file
+#-->
diff --git a/backend/src/main/resources/views/platform/activity/user/index.html b/backend/src/main/resources/views/platform/activity/user/index.html
index 75d2ef8..9c3e74c 100644
--- a/backend/src/main/resources/views/platform/activity/user/index.html
+++ b/backend/src/main/resources/views/platform/activity/user/index.html
@@ -39,6 +39,20 @@ layout("/layouts/platform_1.html"){
+
+
+
搜索
@@ -62,8 +76,8 @@ layout("/layouts/platform_1.html"){
- 修改
- 删除
+ 修改
+ 删除
@@ -76,7 +90,14 @@ layout("/layouts/platform_1.html"){
-
+
+
+
+
@@ -175,7 +196,14 @@ layout("/layouts/platform_1.html"){
-
+
+
+
+