From e62cd346abbf8c433436fa0bcc1057e2a4a862d9 Mon Sep 17 00:00:00 2001 From: Renpc-kilig <308442850@qq.com> Date: Wed, 1 Mar 2023 16:50:25 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ActivityJoinAppController.java | 1 - .../ActivityJoinCompanyAppController.java | 4 +-- .../impl/ActivityJoinServiceImpl.java | 19 ++++++++++ .../impl/ActivityJoinCompanyServiceImpl.java | 20 +++++++++++ .../activity-join-company-mapper.xml | 8 +++-- .../activity-join/activity-join-mapper.xml | 8 +++-- .../mapper/activity/activity-mapper.xml | 8 +++++ .../certificate-manage-mapper.xml | 6 +++- .../templates/activity-join-company/list.html | 36 +++++++++++++++---- .../templates/activity-join/list.html | 10 +++++- .../resources/templates/activity/list.html | 29 ++++++++++----- 11 files changed, 126 insertions(+), 23 deletions(-) diff --git a/src/main/java/cn/com/tenlion/usercenter/controller/app/api/activityjoin/ActivityJoinAppController.java b/src/main/java/cn/com/tenlion/usercenter/controller/app/api/activityjoin/ActivityJoinAppController.java index 4fd9588..7c77e2c 100644 --- a/src/main/java/cn/com/tenlion/usercenter/controller/app/api/activityjoin/ActivityJoinAppController.java +++ b/src/main/java/cn/com/tenlion/usercenter/controller/app/api/activityjoin/ActivityJoinAppController.java @@ -170,7 +170,6 @@ public class ActivityJoinAppController extends DefaultBaseController { @ApiOperation(value = "我的证书查询", notes = "我的活动列表接口") @ApiImplicitParams({ - @ApiImplicitParam(name = "token", value = "token", paramType = "header"), @ApiImplicitParam(name = "name", value = "姓名", paramType = "path", dataType = "String"), @ApiImplicitParam(name = "cardNum", value = "身份证号", paramType = "path", dataType = "String"), @ApiImplicitParam(name = "phone", value = "手机号", paramType = "path", dataType = "String") diff --git a/src/main/java/cn/com/tenlion/usercenter/controller/app/api/activityjoincompany/ActivityJoinCompanyAppController.java b/src/main/java/cn/com/tenlion/usercenter/controller/app/api/activityjoincompany/ActivityJoinCompanyAppController.java index 4910609..1d59ae3 100644 --- a/src/main/java/cn/com/tenlion/usercenter/controller/app/api/activityjoincompany/ActivityJoinCompanyAppController.java +++ b/src/main/java/cn/com/tenlion/usercenter/controller/app/api/activityjoincompany/ActivityJoinCompanyAppController.java @@ -137,7 +137,7 @@ public class ActivityJoinCompanyAppController extends DefaultBaseController { @ApiImplicitParam(name = "token", value = "token", paramType = "header") }) @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) - @GetMapping("myCertificateListPage") + @GetMapping("/"+ ISystemConstant.APP_RELEASE_SUFFIX + "/myCertificateListPage") public SuccessResultList> myCertificateListPage(@RequestHeader("token") String token, ListPage page) { Map params = requestParams(); page.setParams(params); @@ -152,7 +152,7 @@ public class ActivityJoinCompanyAppController extends DefaultBaseController { @ApiImplicitParam(name = "phone", value = "手机号", paramType = "path", dataType = "String") }) @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) - @GetMapping("myCertificateListPageNoToken") + @GetMapping("/"+ ISystemConstant.APP_RELEASE_SUFFIX + "/myCertificateListPageNoToken") public SuccessResultList> myCertificateListPage(ListPage page) { Map params = requestParams(); page.setParams(params); diff --git a/src/main/java/cn/com/tenlion/usercenter/service/activityjoin/impl/ActivityJoinServiceImpl.java b/src/main/java/cn/com/tenlion/usercenter/service/activityjoin/impl/ActivityJoinServiceImpl.java index 756e16a..512a5e9 100644 --- a/src/main/java/cn/com/tenlion/usercenter/service/activityjoin/impl/ActivityJoinServiceImpl.java +++ b/src/main/java/cn/com/tenlion/usercenter/service/activityjoin/impl/ActivityJoinServiceImpl.java @@ -373,6 +373,25 @@ public class ActivityJoinServiceImpl extends DefaultBaseService implements IActi setAppUpdateInfo(token, params); } activityJoinDao.updateAll(params); + + if(1 == activityJoinVO.getIsCheck()) { + for (String s : idList) { + ActivityJoinDTO activityJoinDTO = this.get(s); + if(null != activityJoinDTO) { + // 发送短信 + smsService.sendContentDirectlyByPhone(activityJoinDTO.getPhone(), "报名审核成功"); + } + } + } + if(-1 == activityJoinVO.getIsCheck()) { + for (String s : idList) { + ActivityJoinDTO activityJoinDTO = this.get(s); + if (null != activityJoinDTO) { + // 发送短信 + smsService.sendContentDirectlyByPhone(activityJoinDTO.getPhone(), "活动审核不通过,原因:" + activityJoinVO.getCheckReason()); + } + } + } } private List myCertificate(String token, Map params) { diff --git a/src/main/java/cn/com/tenlion/usercenter/service/activityjoincompany/impl/ActivityJoinCompanyServiceImpl.java b/src/main/java/cn/com/tenlion/usercenter/service/activityjoincompany/impl/ActivityJoinCompanyServiceImpl.java index 18c590c..a5a3714 100644 --- a/src/main/java/cn/com/tenlion/usercenter/service/activityjoincompany/impl/ActivityJoinCompanyServiceImpl.java +++ b/src/main/java/cn/com/tenlion/usercenter/service/activityjoincompany/impl/ActivityJoinCompanyServiceImpl.java @@ -6,6 +6,7 @@ import cn.com.tenlion.usercenter.dao.activityjoincompany.IActivityJoinCompanyDao import cn.com.tenlion.usercenter.dao.certificatemanage.ICertificateManageDao; import cn.com.tenlion.usercenter.pojo.bos.activityjoincompany.ActivityJoinCompanyBO; import cn.com.tenlion.usercenter.pojo.dtos.activity.ActivityDTO; +import cn.com.tenlion.usercenter.pojo.dtos.activityjoin.ActivityJoinDTO; import cn.com.tenlion.usercenter.pojo.dtos.activityjoincompany.ActivityJoinCompanyDTO; import cn.com.tenlion.usercenter.pojo.dtos.certificatemanage.CertificateManageDTO; import cn.com.tenlion.usercenter.pojo.pos.activityjoincompany.ActivityJoinCompanyPO; @@ -308,6 +309,25 @@ public class ActivityJoinCompanyServiceImpl extends DefaultBaseService implement setAppUpdateInfo(token, params); } activityJoinCompanyDao.updateAll(params); + + if(1 == activityJoinCompanyVO.getIsCheck()) { + for (String s : idList) { + ActivityJoinCompanyDTO activityJoinCompanyDTO = this.get(s); + if(null != activityJoinCompanyDTO) { + // 发送短信 + smsService.sendContentDirectlyByPhone(activityJoinCompanyDTO.getPhone(), "报名审核成功"); + } + } + } + if(-1 == activityJoinCompanyVO.getIsCheck()) { + for (String s : idList) { + ActivityJoinCompanyDTO activityJoinCompanyDTO = this.get(s); + if (null != activityJoinCompanyDTO) { + // 发送短信 + smsService.sendContentDirectlyByPhone(activityJoinCompanyDTO.getPhone(), "活动审核不通过,原因:" + activityJoinCompanyVO.getCheckReason()); + } + } + } } private List getActivityMsg(List list, Map params) { diff --git a/src/main/resources/mybatis/mapper/activity-join-company/activity-join-company-mapper.xml b/src/main/resources/mybatis/mapper/activity-join-company/activity-join-company-mapper.xml index 175cb4c..edf676b 100644 --- a/src/main/resources/mybatis/mapper/activity-join-company/activity-join-company-mapper.xml +++ b/src/main/resources/mybatis/mapper/activity-join-company/activity-join-company-mapper.xml @@ -272,11 +272,15 @@ AND t1.activity_id = #{activityId} + + AND t1.user_name = #{userName} + + + AND t1.phone = #{phone} + AND ( t1.company_name LIKE CONCAT('%', #{keywords}, '%') - OR t1.user_name LIKE CONCAT('%', #{keywords}, '%') - OR t1.phone LIKE CONCAT('%', #{keywords}, '%') ) diff --git a/src/main/resources/mybatis/mapper/activity-join/activity-join-mapper.xml b/src/main/resources/mybatis/mapper/activity-join/activity-join-mapper.xml index c347c40..4a3f93e 100644 --- a/src/main/resources/mybatis/mapper/activity-join/activity-join-mapper.xml +++ b/src/main/resources/mybatis/mapper/activity-join/activity-join-mapper.xml @@ -335,11 +335,15 @@ AND t1.parent_id = #{parentId} + + AND t1.card_num = #{cardNum} + + + AND t1.phone = #{phone} + AND ( t1.name LIKE CONCAT('%', #{keywords}, '%') - OR t1.card_num LIKE CONCAT('%', #{keywords}, '%') - OR t1.phone LIKE CONCAT('%', #{keywords}, '%') ) diff --git a/src/main/resources/mybatis/mapper/activity/activity-mapper.xml b/src/main/resources/mybatis/mapper/activity/activity-mapper.xml index 0164062..2f032e0 100644 --- a/src/main/resources/mybatis/mapper/activity/activity-mapper.xml +++ b/src/main/resources/mybatis/mapper/activity/activity-mapper.xml @@ -449,6 +449,14 @@ AND status = #{status} + + AND + join_count = #{joinCount} + + + AND + activity_type = #{activityType} + AND activity_type_id = #{activityTypeId} diff --git a/src/main/resources/mybatis/mapper/certificatemanage/certificate-manage-mapper.xml b/src/main/resources/mybatis/mapper/certificatemanage/certificate-manage-mapper.xml index d4392ee..f8c3363 100644 --- a/src/main/resources/mybatis/mapper/certificatemanage/certificate-manage-mapper.xml +++ b/src/main/resources/mybatis/mapper/certificatemanage/certificate-manage-mapper.xml @@ -13,6 +13,7 @@ + @@ -424,6 +425,9 @@ AND t2.activity_id = #{activityId} + + AND t2.user_id = #{userId} + AND t1.certificate_manage_id = #{certificateManageId} @@ -450,7 +454,7 @@ WHERE t1.is_delete = 0 - AND t2.user_name = #{name} + AND t2.company_name = #{name} AND t2.activity_id = #{activityId} diff --git a/src/main/resources/templates/activity-join-company/list.html b/src/main/resources/templates/activity-join-company/list.html index fda1189..1875b52 100644 --- a/src/main/resources/templates/activity-join-company/list.html +++ b/src/main/resources/templates/activity-join-company/list.html @@ -18,14 +18,36 @@
- -
- 新增时间 -
- +
- + +
+
+ +
+
+ +
+
+ +
+
+
- org.springframework.boot spring-boot-maven-plugin + + ZIP + + + non-exists + non-exists + + + + + org.projectlombok + lombok + + + + + + + org.apache.maven.plugins + maven-dependency-plugin + + + copy-dependencies + package + + copy-dependencies + + + + target/lib + false + false + runtime + + + + + + + org.apache.maven.plugins + maven-jar-plugin + + + **/*.properties + **/*.xml + **/*.yml + static/** + templates/** + mybatis/** + + diff --git a/src/main/resources/application-prod.yml b/src/main/resources/application-prod.yml new file mode 100644 index 0000000..9b0b5cd --- /dev/null +++ b/src/main/resources/application-prod.yml @@ -0,0 +1,98 @@ +server: + port: 7019 + ip: 192.168.0.120 + url: http://${server.ip}:7019/qmywzs + system-title: ?????? + system-sub-title: ?????? + # default-index-page: route/custom/index + servlet: + context-path: /qmywzs + +spring: + login-url: /oauth/login + login-failure: /oauth/login?error + login-process: /userlogin + assets-matchers: /assets/** + thymeleaf: + prefix: classpath:/templates/ + suffix: .html + mode: HTML5 + encoding: UTF-8 + cache: false + main: + allow-bean-definition-overriding: true + servlet: + multipart: + max-file-size: 1GB + max-request-size: 1GB + datasource: + druid: + url: jdbc:mysql://121.36.71.250:58003/db_qmywzs?useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&autoReconnect=true&failOverReadOnly=false&useSSL=false&serverTimezone=UTC&nullCatalogMeansCurrent=true + db-type: mysql + driver-class-name: com.mysql.cj.jdbc.Driver + username: root + password: root + initial-size: 2 + min-idle: 2 + max-active: 5 + max-wait: 60000 + time-between-eviction-runs-millis: 60000 + min-evictable-idle-time-millis: 300000 + validation-query: SELECT 1 FROM DUAL + test-while-idle: true + test-on-borrow: false + test-on-return: false + pool-prepared-statements: true + max-pool-prepared-statement-per-connection-size: 10 + filter: + commons-log: + connection-logger-name: stat,wall,log4j + stat: + log-slow-sql: true + slow-sql-millis: 2000 + connection-properties: druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000 + use-global-data-source-stat: true + +mybatis: + config-location: classpath:mybatis/mybatis-config.xml + mapper-locations: classpath*:mybatis/mapper/**/*.xml + +access-control: + role-permission: false + +swagger: + base-package-list: ink.wgink,cn.com.tenlion + +file: + upload-path: D:\CF_work\ideaWorkSpace\uploadFiles\ + image-types: png,jpg,jpeg,gif,blob + video-types: mp4,rmvb + audio-types: mp3,wmv,amr + file-types: doc,docx,xls,xlsx,ppt,pptx,txt,zip,rar,apk,pdf + max-file-count: 6 + image-output-quality: 0.4 + # ??minIo + use-min-io: false + # ?use-min-io???? + min-io: + endpoint: http://192.168.2.103:9900 + access-key: smartcity + secret-key: smartcity + +# appToken +app-token: + has-department: false + has-role: true + has-position: false + has-group: false + +logging: + # enable-api-log: true + file: + name: C:\Users\wenc0\Desktop\UploadFiles\logs\usercenter-logs.log + level: + root: error + org.apache.kafka: error + org.springframework.data.mongodb: info + org.springframework.boot.autoconfigure.security.servlet: debug + ink.wgink: debug diff --git a/src/test/java/cn/com/tenlion/FinalShellTest.java b/src/test/java/cn/com/tenlion/FinalShellTest.java new file mode 100644 index 0000000..c6cee36 --- /dev/null +++ b/src/test/java/cn/com/tenlion/FinalShellTest.java @@ -0,0 +1,100 @@ +package cn.com.tenlion; + +import javax.crypto.Cipher; +import javax.crypto.SecretKey; +import javax.crypto.SecretKeyFactory; +import javax.crypto.spec.DESKeySpec; +import java.io.ByteArrayOutputStream; +import java.io.DataOutputStream; +import java.io.IOException; +import java.math.BigInteger; +import java.security.MessageDigest; +import java.security.NoSuchAlgorithmException; +import java.security.SecureRandom; +import java.util.Base64; +import java.util.Random; + +public class FinalShellTest { + + public static void main(String[] args)throws Exception { + System.out.println(decodePass("ZjgJL0ZLZF9FCDVW4A6d7brVUtDRtI99")); + } + public static byte[] desDecode(byte[] data, byte[] head) throws Exception { + SecureRandom sr = new SecureRandom(); + DESKeySpec dks = new DESKeySpec(head); + SecretKeyFactory keyFactory = SecretKeyFactory.getInstance("DES"); + SecretKey securekey = keyFactory.generateSecret(dks); + Cipher cipher = Cipher.getInstance("DES"); + cipher.init(2, securekey, sr); + return cipher.doFinal(data); + } + public static String decodePass(String data) throws Exception { + if (data == null) { + return null; + } else { + String rs = ""; + byte[] buf = Base64.getDecoder().decode(data); + byte[] head = new byte[8]; + System.arraycopy(buf, 0, head, 0, head.length); + byte[] d = new byte[buf.length - head.length]; + System.arraycopy(buf, head.length, d, 0, d.length); + byte[] bt = desDecode(d, ranDomKey(head)); + rs = new String(bt); + + return rs; + } + } + static byte[] ranDomKey(byte[] head) { + long ks = 3680984568597093857L / (long)(new Random((long)head[5])).nextInt(127); + Random random = new Random(ks); + int t = head[0]; + + for(int i = 0; i < t; ++i) { + random.nextLong(); + } + + long n = random.nextLong(); + Random r2 = new Random(n); + long[] ld = new long[]{(long)head[4], r2.nextLong(), (long)head[7], (long)head[3], r2.nextLong(), (long)head[1], random.nextLong(), (long)head[2]}; + ByteArrayOutputStream bos = new ByteArrayOutputStream(); + DataOutputStream dos = new DataOutputStream(bos); + long[] var15 = ld; + int var14 = ld.length; + + for(int var13 = 0; var13 < var14; ++var13) { + long l = var15[var13]; + + try { + dos.writeLong(l); + } catch (IOException var18) { + var18.printStackTrace(); + } + } + + try { + dos.close(); + } catch (IOException var17) { + var17.printStackTrace(); + } + + byte[] keyData = bos.toByteArray(); + keyData = md5(keyData); + return keyData; + } + public static byte[] md5(byte[] data) { + String ret = null; + byte[] res=null; + + try { + MessageDigest m; + m = MessageDigest.getInstance("MD5"); + m.update(data, 0, data.length); + res=m.digest(); + ret = new BigInteger(1, res).toString(16); + } catch (NoSuchAlgorithmException e) { + e.printStackTrace(); + } + return res; + } + +}