Merge remote-tracking branch 'origin/main'

This commit is contained in:
wanggeng 2024-03-20 23:31:07 +08:00
commit fdc0f6d81f
20 changed files with 598 additions and 31 deletions

52
pom.xml
View File

@ -109,8 +109,60 @@
<build>
<plugins>
<plugin>
<!-- 打包时去除第三方依赖 -->
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<layout>ZIP</layout>
<includes>
<include>
<groupId>non-exists</groupId>
<artifactId>non-exists</artifactId>
</include>
</includes>
<excludes>
<exclude>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
</exclude>
</excludes>
</configuration>
</plugin>
<!-- 拷贝第三方依赖文件到指定目录 -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>copy-dependencies</id>
<phase>package</phase>
<goals>
<goal>copy-dependencies</goal>
</goals>
<configuration>
<!-- target/lib 是依赖jar包的输出目录根据自己喜好配置 -->
<outputDirectory>target/lib</outputDirectory>
<excludeTransitive>false</excludeTransitive>
<stripVersion>false</stripVersion>
<includeScope>runtime</includeScope>
</configuration>
</execution>
</executions>
</plugin>
<!-- 排除静态资源,静态资源自行拷贝 -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<excludes>
<exclude>**/*.properties</exclude>
<exclude>**/*.xml</exclude>
<exclude>**/*.yml</exclude>
<exclude>static/**</exclude>
<exclude>templates/**</exclude>
<exclude>mybatis/**</exclude>
</excludes>
</configuration>
</plugin>
</plugins>
</build>

View File

@ -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")

View File

@ -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<List<ActivityJoinCompanyDTO>> myCertificateListPage(@RequestHeader("token") String token, ListPage page) {
Map<String, Object> 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<List<ActivityJoinCompanyDTO>> myCertificateListPage(ListPage page) {
Map<String, Object> params = requestParams();
page.setParams(params);

View File

@ -45,4 +45,9 @@ public class ActivityRouteController extends DefaultBaseController {
return new ModelAndView("activity/map-view");
}
@GetMapping("get-select")
public ModelAndView getSelect() {
return new ModelAndView("activity/get-select");
}
}

View File

@ -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<ActivityJoinDTO> myCertificate(String token, Map<String, Object> params) {

View File

@ -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<ActivityJoinCompanyDTO> getActivityMsg(List<ActivityJoinCompanyDTO> list, Map<String, Object> params) {

View File

@ -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

View File

@ -272,11 +272,15 @@
<if test="activityId != null and activityId != ''">
AND t1.activity_id = #{activityId}
</if>
<if test="userName != null and userName != ''">
AND t1.user_name = #{userName}
</if>
<if test="phone != null and phone != ''">
AND t1.phone = #{phone}
</if>
<if test="keywords != null and keywords != ''">
AND (
t1.company_name LIKE CONCAT('%', #{keywords}, '%')
OR t1.user_name LIKE CONCAT('%', #{keywords}, '%')
OR t1.phone LIKE CONCAT('%', #{keywords}, '%')
)
</if>
<if test="startTime != null and startTime != ''">

View File

@ -335,11 +335,15 @@
<if test="parentId != null and parentId != ''">
AND t1.parent_id = #{parentId}
</if>
<if test="cardNum != null and cardNum != ''">
AND t1.card_num = #{cardNum}
</if>
<if test="phone != null and phone != ''">
AND t1.phone = #{phone}
</if>
<if test="keywords != null and keywords != ''">
AND (
t1.name LIKE CONCAT('%', #{keywords}, '%')
OR t1.card_num LIKE CONCAT('%', #{keywords}, '%')
OR t1.phone LIKE CONCAT('%', #{keywords}, '%')
)
</if>
<if test="startTime != null and startTime != ''">

View File

@ -449,6 +449,14 @@
AND
status = #{status}
</if>
<if test="joinCount != null and joinCount != ''">
AND
join_count = #{joinCount}
</if>
<if test="activityType != null and activityType != ''">
AND
activity_type = #{activityType}
</if>
<if test="activityTypeId != null and activityTypeId != ''">
AND
activity_type_id = #{activityTypeId}

View File

@ -13,6 +13,7 @@
<result column="check_reason" property="checkReason"/>
<result column="is_arrive" property="isArrive"/>
<result column="is_certificate" property="isCertificate"/>
<result column="file_id" property="fileId"/>
<result column="creator" property="creator"/>
<result column="gmt_create" property="gmtCreate"/>
<result column="modifier" property="modifier"/>
@ -424,6 +425,9 @@
<if test="activityId != null and activityId != ''">
AND t2.activity_id = #{activityId}
</if>
<if test="userId != null and userId != ''">
AND t2.user_id = #{userId}
</if>
<if test="certificateManageId != null and certificateManageId != ''">
AND t1.certificate_manage_id = #{certificateManageId}
</if>
@ -450,7 +454,7 @@
WHERE
t1.is_delete = 0
<if test="name != null and name != ''">
AND t2.user_name = #{name}
AND t2.company_name = #{name}
</if>
<if test="activityId != null and activityId != ''">
AND t2.activity_id = #{activityId}

View File

@ -18,14 +18,36 @@
<div class="layui-card-body">
<div class="test-table-reload-btn" style="margin-bottom: 10px;">
<div class="layui-inline">
<input type="text" id="keywords" class="layui-input search-item search-item-width-100" placeholder="输入关键字">
</div>
新增时间
<div class="layui-inline">
<input type="text" id="startTime" class="layui-input search-item search-item-width-100" placeholder="开始时间" readonly>
<input type="text" id="keywords" class="layui-input search-item search-item-width-100" placeholder="机构名称">
</div>
<div class="layui-inline">
<input type="text" id="endTime" class="layui-input search-item search-item-width-100" placeholder="结束时间" readonly>
<input type="text" id="userName" class="layui-input search-item search-item-width-100" placeholder="姓名">
</div>
<div class="layui-inline">
<input type="text" id="phone" class="layui-input search-item search-item-width-100" placeholder="手机">
</div>
<div class="layui-inline layui-form search-item">
<select id="isCheck" name="isCheck">
<option value="">审核状态</option>
<option value="0">未审核</option>
<option value="1">审核通过</option>
<option value="-1">审核未通过</option>
</select>
</div>
<div class="layui-inline layui-form search-item">
<select id="isArrive" name="isArrive">
<option value="">是否到场</option>
<option value="0">等待到场</option>
<option value="1">已到场</option>
<option value="-1">未到场</option>
</select>
</div>
<div class="layui-inline layui-form search-item">
<select id="isCertificate" name="isCertificate">
<option value="">是否制证</option>
<option value="0">等待制证</option>
<option value="1">已制证</option>
</select>
</div>
<button type="button" id="search" class="layui-btn layui-btn-sm">
<i class="fa fa-lg fa-search"></i> 搜索
@ -619,6 +641,8 @@
table.reload('dataTable', {
where: {
keywords: $('#keywords').val(),
userName: $('#userName').val(),
phone: $('#phone').val(),
isCheck: $('#isCheck').val(),
isArrive: $('#isArrive').val(),
isCertificate: $('#isCertificate').val()

View File

@ -18,7 +18,13 @@
<div class="layui-card-body">
<div class="test-table-reload-btn" style="margin-bottom: 10px;">
<div class="layui-inline">
<input type="text" id="keywords" class="layui-input search-item search-item-width-100" placeholder="输入关键字">
<input type="text" id="keywords" class="layui-input search-item search-item-width-100" placeholder="输入姓名">
</div>
<div class="layui-inline">
<input type="text" id="cardNum" class="layui-input search-item search-item-width-100" placeholder="身份证号">
</div>
<div class="layui-inline">
<input type="text" id="phone" class="layui-input search-item search-item-width-100" placeholder="手机号">
</div>
<div class="layui-inline layui-form search-item">
<select id="isCheck" name="isCheck">
@ -666,6 +672,8 @@
keywords: $('#keywords').val(),
isCheck: $('#isCheck').val(),
isArrive: $('#isArrive').val(),
cardNum: $('#cardNum').val(),
phone: $('#phone').val(),
isCertificate: $('#isCertificate').val()
},
page: {

View File

@ -22,7 +22,7 @@
</div>
<div class="layui-card-body" style="padding: 15px;">
<form class="layui-form layui-form-pane" lay-filter="dataForm">
<!--<div class="layui-form-item layui-form-text">
<div class="layui-form-item layui-form-text">
<label class="layui-form-label">标题图片</label>
<div class="layui-input-block">
<input type="hidden" id="titlePhoto" name="titlePhoto">
@ -52,7 +52,7 @@
</script>
</div>
</div>
<div class="layui-form-item layui-form-text">
<!--<div class="layui-form-item layui-form-text">
<label class="layui-form-label">标题图标</label>
<div class="layui-input-block">
<input type="hidden" id="titleIcon" name="titleIcon">
@ -382,7 +382,7 @@
// 初始化内容
function initData() {
//initTitlePhotoUploadFile();
initTitlePhotoUploadFile();
//initTitleIconUploadFile();
// initDescriptionRichText();
initContentRichText();

View File

@ -22,7 +22,7 @@
</div>
<div class="layui-card-body" style="padding: 15px;">
<form class="layui-form layui-form-pane" lay-filter="dataForm">
<!--<div class="layui-form-item layui-form-text">
<div class="layui-form-item layui-form-text">
<label class="layui-form-label">标题图片</label>
<div class="layui-input-block">
<input type="hidden" id="titlePhoto" name="titlePhoto">
@ -52,7 +52,7 @@
</script>
</div>
</div>
<div class="layui-form-item layui-form-text">
<!--<div class="layui-form-item layui-form-text">
<label class="layui-form-label">标题图标</label>
<div class="layui-input-block">
<input type="hidden" id="titleIcon" name="titleIcon">
@ -410,7 +410,7 @@
}
form.val('dataForm', dataFormData);
form.render(null, 'dataForm');
//initTitlePhotoUploadFile();
initTitlePhotoUploadFile();
//initTitleIconUploadFile();
// initDescriptionRichText(data['description']);
initContentRichText(data['content']);

View File

@ -0,0 +1,176 @@
<!doctype html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
<base th:href="${#request.getContextPath() + '/'} ">
<meta charset="utf-8">
<meta name="renderer" content="webkit">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport"
content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
<link rel="stylesheet" href="assets/fonts/font-awesome/css/font-awesome.css"/>
<link rel="stylesheet" href="assets/layuiadmin/layui/css/layui.css" media="all">
<link rel="stylesheet" href="assets/layuiadmin/style/admin.css" media="all">
<style>
.layui-form-selected dl {
max-height: 100px;
}
</style>
</head>
<body>
<div class="layui-fluid layui-anim layui-anim-fadein" style="padding: 0;">
<div class="layui-card">
<div class="layui-card-body" style="padding: 15px;">
<form class="layui-form" lay-filter="dataForm">
<div class="layui-row">
<div class="layui-col-xs6">
<div class="layui-form-item">
<div id="area1IdSelectTemplateBox" lay-filter="area1IdSelectTemplateBox"></div>
<script id="area1IdSelectTemplate" type="text/html">
<select id="area1Id" name="area1Id" lay-filter="area1Id" lay-search>
<option value="">1级区域</option>
{{# for(var i = 0, item; item = d[i++];) { }}
<option value="{{item.areaId}}_{{item.areaCode}}_{{item.areaName}}">
{{item.areaName}}
</option>
{{# } }}
</select>
</script>
</div>
</div>
<div class="layui-col-xs2">
<button id="confirmBtn" type="button" class="layui-btn" style="width: 100%;">确定</button>
</div>
</div>
<div class="layui-row">
<div class="layui-col-xs12">
<fieldset class="layui-elem-field layui-field-title">
<legend>当前地区</legend>
<div class="layui-field-box" id="currentAreaName"></div>
</fieldset>
</div>
</div>
</form>
</div>
</div>
</div>
<script src="assets/layuiadmin/layui/layui.js"></script>
<script>
layui.config({
base: 'assets/layuiadmin/' //静态资源所在路径
}).extend({
index: 'lib/index' //主入口模块
}).use(['index', 'form', 'laytpl'], function () {
top.dialog.dialogData.selectedAreaArray = [];
var $ = layui.$;
var form = layui.form;
var laytpl = layui.laytpl;
var defaultAreaName = top.restAjax.params(window.location.href).areaName;
var selectedAreaArray = [];
function closeBox() {
top.dialog.dialogData.selectedAreaArray = selectedAreaArray;
parent.layer.close(parent.layer.getFrameIndex(window.name));
}
// 显示选择地区
function showAreaName() {
if (selectedAreaArray.length == 0) {
$('#currentAreaName').text(defaultAreaName ? decodeURI(defaultAreaName) : '无');
return;
}
var areaNames = '';
for (var i = 0, item; item = selectedAreaArray[i++];) {
if (areaNames.length > 0) {
areaNames += ' / ';
}
areaNames += item.areaName;
}
$('#currentAreaName').text(areaNames);
}
// 初始化选择框、单选、复选模板
function initSelectRadioCheckboxTemplate(templateId, templateBoxId, data, callback) {
laytpl(document.getElementById(templateId).innerHTML).render(data, function (html) {
document.getElementById(templateBoxId).innerHTML = html;
});
form.render('select');
if (callback) {
callback();
}
}
// 初始化1级区域下拉选择
function initArea1CodeSelect() {
top.restAjax.get(top.restAjax.path('api/area/listbyparentid/110889', []), {}, null, function (code, data, args) {
initSelectRadioCheckboxTemplate('area1IdSelectTemplate', 'area1IdSelectTemplateBox', data);
}, function (code, data) {
top.dialog.msg(data.msg);
});
}
// 初始化2级区域下拉选择
function initArea2CodeSelect(area1) {
alert(area1)
if (!area1) {
initSelectRadioCheckboxTemplate('area2IdSelectTemplate', 'area2IdSelectTemplateBox', []);
return;
}
top.restAjax.get(top.restAjax.path('api/area/listbyparentid/{area1}', [area1]), {}, null, function (code, data, args) {
initSelectRadioCheckboxTemplate('area2IdSelectTemplate', 'area2IdSelectTemplateBox', data);
}, function (code, data) {
top.dialog.msg(data.msg);
});
}
// 初始化
function initData() {
initArea1CodeSelect();
// initArea2CodeSelect();
}
initData();
showAreaName();
// 获取地区ID
function getAreaId(areaLevel, data) {
var areaId = data.value;
var index = areaLevel - 1;
if (areaId) {
var valueArray = data.value.split('_');
areaId = valueArray[0];
// 结果存在,替换,不存在新增
if (!selectedAreaArray[index]) {
selectedAreaArray.push({
areaId: valueArray[0],
areaCode: valueArray[1],
areaName: valueArray[2]
});
} else {
selectedAreaArray.splice(index, 1, {
areaId: valueArray[0],
areaCode: valueArray[1],
areaName: valueArray[2]
});
}
} else {
selectedAreaArray.splice(index, selectedAreaArray.length);
}
showAreaName();
return areaId;
}
// area1Id 选择事件
form.on('select(area1Id)', function (data) {
var areaId = getAreaId(1, data);
// initArea2CodeSelect(areaId);
});
$('#confirmBtn').on('click', function () {
closeBox();
});
});
</script>
</body>
</html>

View File

@ -18,14 +18,26 @@
<div class="layui-card-body">
<div class="test-table-reload-btn" style="margin-bottom: 10px;">
<div class="layui-inline">
<input type="text" id="keywords" class="layui-input search-item search-item-width-100" placeholder="输入关键字">
</div>
新增时间
<div class="layui-inline">
<input type="text" id="startTime" class="layui-input search-item search-item-width-100" placeholder="开始时间" readonly>
<input type="text" id="keywords" class="layui-input search-item search-item-width-100" placeholder="活动名称">
</div>
<div class="layui-inline">
<input type="text" id="endTime" class="layui-input search-item search-item-width-100" placeholder="结束时间" readonly>
<input type="text" id="joinCount" class="layui-input search-item search-item-width-100" placeholder="参与人数">
</div>
<div class="layui-inline layui-form search-item">
<select id="status" name="status">
<option value="">活动状态</option>
<option value="报名中">报名中</option>
<option value="进行中">进行中</option>
<option value="已结束">已结束</option>
</select>
</div>
<div class="layui-inline layui-form search-item">
<select id="activityType" name="activityType">
<option value="">活动类型</option>
<option value="自然保护">自然保护</option>
<option value="自愿服务">自愿服务</option>
<option value="抚育养护">抚育养护</option>
</select>
</div>
<button type="button" id="search" class="layui-btn layui-btn-sm">
<i class="fa fa-lg fa-search"></i> 搜索
@ -308,8 +320,9 @@
table.reload('dataTable', {
where: {
keywords: $('#keywords').val(),
startTime: $('#startTime').val(),
endTime: $('#endTime').val()
joinCount: $('#joinCount').val(),
status: $('#status').val(),
activityType: $('#activityType').val()
},
page: {
curr: currentPage

View File

@ -646,8 +646,8 @@
$('#areaSelectBtn').on('click', function() {
top.dialog.open({
title: '选择地区',
url: top.restAjax.path('route/area/get-select?areaName={areaName}', [encodeURI($('#areaName').val())]),
width: '600px',
url: top.restAjax.path('route/activity/get-select?areaName={areaName}', [encodeURI($('#areaName').val())]),
width: '400px',
height: '225px',
onClose: function() {
var selectedAreaArray = top.dialog.dialogData.selectedAreaArray;

View File

@ -666,6 +666,39 @@
// 校验
form.verify({
});
// 区域选择
(function() {
$('#areaSelectBtn').on('click', function() {
top.dialog.open({
title: '选择地区',
url: top.restAjax.path('route/activity/get-select?areaName={areaName}', [encodeURI($('#areaName').val())]),
width: '400px',
height: '225px',
onClose: function() {
var selectedAreaArray = top.dialog.dialogData.selectedAreaArray;
if(selectedAreaArray.length > 0) {
var areaCode = '';
var areaName = '';
areaCode = selectedAreaArray[selectedAreaArray.length - 1].areaCode;
for(var i = 0, item; item = selectedAreaArray[i++];) {
if(areaName) {
areaName += ' / ';
}
areaName += item.areaName;
}
$('#areaCode').val(areaCode);
$('#areaName').val(areaName);
}
}
})
});
$('#areaCleanBtn').on('click', function () {
$('#areaCode').val('');
$('#areaName').val('');
})
})();
});
</script>
</body>

View File

@ -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;
}
}