Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
A
Aidea
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
sa_aidea
Aidea
Commits
ac37690f
Commit
ac37690f
authored
Sep 24, 2020
by
谢希宇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
init aidea products by 20200922
parent
d65c82f6
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
447 additions
and
437 deletions
+447
-437
ConsultSheetMapper.xml
...n/java/com/cftech/consultsheet/dao/ConsultSheetMapper.xml
+109
-109
ConsultSheetMapper.xml
...lasses/com/cftech/consultsheet/dao/ConsultSheetMapper.xml
+113
-113
common-test.properties
cftech-common-web/src/main/resources/common-test.properties
+3
-3
ueditor.config.js
...sets/adminlte/plugins/ueditor-min-1.4.3/ueditor.config.js
+1
-1
OKHttpUtils.java
...ommon/src/main/java/com/cftech/core/util/OKHttpUtils.java
+1
-1
materialUploadform.html
.../main/webapp/WEB-INF/views/upload/materialUploadform.html
+3
-0
pom.xml
portal-web/pom.xml
+6
-0
web.xml
portal-web/src/main/webapp/WEB-INF/web.xml
+1
-1
orgunitadd.html
.../main/webapp/WEB-INF/views/managerorgunit/orgunitadd.html
+13
-13
OrgUnitController.java
.../main/java/com/cftech/base/org/web/OrgUnitController.java
+22
-23
QyTokenUtil.java
...odule/src/main/java/com/cftech/core/util/QyTokenUtil.java
+175
-173
No files found.
aidea-modules/consult-module/src/main/java/com/cftech/consultsheet/dao/ConsultSheetMapper.xml
View file @
ac37690f
...
@@ -3,27 +3,27 @@
...
@@ -3,27 +3,27 @@
<mapper
namespace=
"com.cftech.consultsheet.dao.ConsultSheetMapper"
>
<mapper
namespace=
"com.cftech.consultsheet.dao.ConsultSheetMapper"
>
<resultMap
id=
"resultMap"
type=
"com.cftech.consultsheet.model.ConsultSheet"
>
<resultMap
id=
"resultMap"
type=
"com.cftech.consultsheet.model.ConsultSheet"
>
<id
column=
"id"
property=
"id"
/>
<id
column=
"id"
property=
"id"
/>
<result
column=
"consult_id"
property=
"consultId"
/>
<result
column=
"consult_id"
property=
"consultId"
/>
<result
column=
"user_name"
property=
"userName"
/>
<result
column=
"user_name"
property=
"userName"
/>
<result
column=
"number_id"
property=
"numberId"
/>
<result
column=
"number_id"
property=
"numberId"
/>
<result
column=
"benebit_id"
property=
"benebitId"
/>
<result
column=
"benebit_id"
property=
"benebitId"
/>
<result
column=
"sex"
property=
"sex"
/>
<result
column=
"sex"
property=
"sex"
/>
<result
column=
"iphone"
property=
"iPhone"
/>
<result
column=
"iphone"
property=
"iPhone"
/>
<result
column=
"past_records"
property=
"pastRecords"
/>
<result
column=
"past_records"
property=
"pastRecords"
/>
<result
column=
"prescription"
property=
"Prescription"
/>
<result
column=
"prescription"
property=
"Prescription"
/>
<result
column=
"doctor_id"
property=
"doctorId"
/>
<result
column=
"doctor_id"
property=
"doctorId"
/>
<result
column=
"customer_id"
property=
"customerId"
/>
<result
column=
"customer_id"
property=
"customerId"
/>
<result
column=
"illness"
property=
"illness"
/>
<result
column=
"illness"
property=
"illness"
/>
<result
column=
"accounts_id"
property=
"accountsId"
/>
<result
column=
"accounts_id"
property=
"accountsId"
/>
<result
column=
"del_flag"
property=
"delFlag"
/>
<result
column=
"del_flag"
property=
"delFlag"
/>
<result
column=
"status"
property=
"status"
/>
<result
column=
"status"
property=
"status"
/>
<result
column=
"create_time"
property=
"createTime"
/>
<result
column=
"create_time"
property=
"createTime"
/>
<result
column=
"update_time"
property=
"updateTime"
/>
<result
column=
"update_time"
property=
"updateTime"
/>
<result
column=
"description"
property=
"description"
/>
<result
column=
"description"
property=
"description"
/>
<result
column=
"create_by"
property=
"createBy"
/>
<result
column=
"create_by"
property=
"createBy"
/>
<result
column=
"update_by"
property=
"updateBy"
/>
<result
column=
"update_by"
property=
"updateBy"
/>
</resultMap>
</resultMap>
<sql
id=
"sqlWhere"
>
<sql
id=
"sqlWhere"
>
<if
test=
"conds!=null"
>
<if
test=
"conds!=null"
>
...
@@ -75,7 +75,7 @@
...
@@ -75,7 +75,7 @@
update_by
update_by
</sql>
</sql>
<insert
id=
"save"
parameterType=
"com.cftech.consultsheet.model.ConsultSheet"
useGeneratedKeys=
"true"
<insert
id=
"save"
parameterType=
"com.cftech.consultsheet.model.ConsultSheet"
useGeneratedKeys=
"true"
keyProperty=
"id"
>
keyProperty=
"id"
>
insert into t_aidea_consult_sheet
insert into t_aidea_consult_sheet
...
@@ -84,28 +84,28 @@
...
@@ -84,28 +84,28 @@
)
)
values
values
(
(
#{id, jdbcType=BIGINT},
#{id, jdbcType=BIGINT},
#{consultId, jdbcType=BIGINT},
#{consultId, jdbcType=BIGINT},
#{userName, jdbcType=VARCHAR},
#{userName, jdbcType=VARCHAR},
#{numberId, jdbcType=VARCHAR},
#{numberId, jdbcType=VARCHAR},
now(),
now(),
#{sex, jdbcType=BIGINT},
#{sex, jdbcType=BIGINT},
#{iPhone, jdbcType=VARCHAR},
#{iPhone, jdbcType=VARCHAR},
#{pastRecords, jdbcType=VARCHAR},
#{pastRecords, jdbcType=VARCHAR},
#{Prescription, jdbcType=VARCHAR},
#{Prescription, jdbcType=VARCHAR},
#{doctorId, jdbcType=BIGINT},
#{doctorId, jdbcType=BIGINT},
#{customerId, jdbcType=BIGINT},
#{customerId, jdbcType=BIGINT},
#{illness, jdbcType=BIGINT},
#{illness, jdbcType=BIGINT},
#{accountsId, jdbcType=BIGINT},
#{accountsId, jdbcType=BIGINT},
#{delFlag, jdbcType=TINYINT},
#{delFlag, jdbcType=TINYINT},
#{status, jdbcType=VARCHAR},
#{status, jdbcType=VARCHAR},
now(),
now(),
now(),
now(),
#{description, jdbcType=VARCHAR},
#{description, jdbcType=VARCHAR},
#{createBy, jdbcType=BIGINT},
#{createBy, jdbcType=BIGINT},
#{updateBy, jdbcType=BIGINT}
#{updateBy, jdbcType=BIGINT}
)
)
</insert>
</insert>
<select
id=
"fetchById"
parameterType=
"java.lang.Long"
resultMap=
"resultMap"
>
<select
id=
"fetchById"
parameterType=
"java.lang.Long"
resultMap=
"resultMap"
>
...
@@ -116,82 +116,82 @@
...
@@ -116,82 +116,82 @@
</select>
</select>
<select
id=
"count"
parameterType=
"java.util.Map"
resultType=
"java.lang.Integer"
>
<select
id=
"count"
parameterType=
"java.util.Map"
resultType=
"java.lang.Integer"
>
SELECT COUNT(1) FROM t_aidea_consult_sheet
SELECT COUNT(1) FROM t_aidea_consult_sheet
<include
refid=
"sqlWhere"
/>
<include
refid=
"sqlWhere"
/>
</select>
</select>
<select
id=
"fetchSearchByPage"
parameterType=
"java.util.Map"
resultMap=
"resultMap"
>
<select
id=
"fetchSearchByPage"
parameterType=
"java.util.Map"
resultMap=
"resultMap"
>
SELECT
SELECT
<include
refid=
"sqlColumns"
/>
<include
refid=
"sqlColumns"
/>
FROM t_aidea_consult_sheet
FROM t_aidea_consult_sheet
<include
refid=
"sqlWhere"
/>
<include
refid=
"sqlWhere"
/>
<if
test=
"sort!=null"
>
ORDER BY ${sort.param} ${sort.type}
</if>
<if
test=
"sort!=null"
>
ORDER BY ${sort.param} ${sort.type}
</if>
<if
test=
"limit>0"
>
limit #{offset},#{limit}
</if>
<if
test=
"limit>0"
>
limit #{offset},#{limit}
</if>
</select>
</select>
<update
id=
"update"
parameterType=
"com.cftech.consultsheet.model.ConsultSheet"
>
<update
id=
"update"
parameterType=
"com.cftech.consultsheet.model.ConsultSheet"
>
update t_aidea_consult_sheet
update t_aidea_consult_sheet
<set>
<set>
<if
test=
"id != null"
>
<if
test=
"id != null"
>
id = #{id, jdbcType=BIGINT},
id = #{id, jdbcType=BIGINT},
</if>
</if>
<if
test=
"consultId != null"
>
<if
test=
"consultId != null"
>
consult_id = #{consultId, jdbcType=BIGINT},
consult_id = #{consultId, jdbcType=BIGINT},
</if>
</if>
<if
test=
"userName != null"
>
<if
test=
"userName != null"
>
user_name = #{userName, jdbcType=VARCHAR},
user_name = #{userName, jdbcType=VARCHAR},
</if>
</if>
<if
test=
"numberId != null"
>
<if
test=
"numberId != null"
>
number_id = #{numberId, jdbcType=VARCHAR},
number_id = #{numberId, jdbcType=VARCHAR},
</if>
</if>
<if
test=
"benebitId != null"
>
<if
test=
"benebitId != null"
>
benebit_id = #{benebitId, jdbcType=TIMESTAMP},
benebit_id = #{benebitId, jdbcType=TIMESTAMP},
</if>
</if>
<if
test=
"sex != null"
>
<if
test=
"sex != null"
>
sex = #{sex, jdbcType=BIGINT},
sex = #{sex, jdbcType=BIGINT},
</if>
</if>
<if
test=
"iPhone != null"
>
<if
test=
"iPhone != null"
>
i_phone = #{iPhone, jdbcType=VARCHAR},
i_phone = #{iPhone, jdbcType=VARCHAR},
</if>
</if>
<if
test=
"pastRecords != null"
>
<if
test=
"pastRecords != null"
>
past_records = #{pastRecords, jdbcType=VARCHAR},
past_records = #{pastRecords, jdbcType=VARCHAR},
</if>
</if>
<if
test=
"Prescription != null"
>
<if
test=
"Prescription != null"
>
prescription = #{Prescription, jdbcType=VARCHAR},
prescription = #{Prescription, jdbcType=VARCHAR},
</if>
</if>
<if
test=
"doctorId != null"
>
<if
test=
"doctorId != null"
>
doctor_id = #{doctorId, jdbcType=BIGINT},
doctor_id = #{doctorId, jdbcType=BIGINT},
</if>
</if>
<if
test=
"customerId != null"
>
<if
test=
"customerId != null"
>
customer_id = #{customerId, jdbcType=BIGINT},
customer_id = #{customerId, jdbcType=BIGINT},
</if>
</if>
<if
test=
"illness != null"
>
<if
test=
"illness != null"
>
illness = #{illness, jdbcType=BIGINT},
illness = #{illness, jdbcType=BIGINT},
</if>
</if>
<if
test=
"accountsId != null"
>
<if
test=
"accountsId != null"
>
accounts_id = #{accountsId, jdbcType=BIGINT},
accounts_id = #{accountsId, jdbcType=BIGINT},
</if>
</if>
<if
test=
"delFlag != null"
>
<if
test=
"delFlag != null"
>
del_flag = #{delFlag, jdbcType=TINYINT},
del_flag = #{delFlag, jdbcType=TINYINT},
</if>
</if>
<if
test=
"status != null"
>
<if
test=
"status != null"
>
status = #{status, jdbcType=VARCHAR},
status = #{status, jdbcType=VARCHAR},
</if>
</if>
<if
test=
"createTime != null"
>
<if
test=
"createTime != null"
>
create_time = #{createTime, jdbcType=TIMESTAMP},
create_time = #{createTime, jdbcType=TIMESTAMP},
</if>
</if>
<if
test=
"description != null"
>
<if
test=
"description != null"
>
description = #{description, jdbcType=VARCHAR},
description = #{description, jdbcType=VARCHAR},
</if>
</if>
<if
test=
"createBy != null"
>
<if
test=
"createBy != null"
>
create_by = #{createBy, jdbcType=BIGINT},
create_by = #{createBy, jdbcType=BIGINT},
</if>
</if>
<if
test=
"updateBy != null"
>
<if
test=
"updateBy != null"
>
update_by = #{updateBy, jdbcType=BIGINT},
update_by = #{updateBy, jdbcType=BIGINT},
</if>
</if>
</set>
</set>
where id=#{id,jdbcType=BIGINT}
where id=#{id,jdbcType=BIGINT}
</update>
</update>
...
...
aidea-modules/consult-module/target/classes/com/cftech/consultsheet/dao/ConsultSheetMapper.xml
View file @
ac37690f
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.cftech.consult
S
heet.dao.ConsultSheetMapper"
>
<mapper
namespace=
"com.cftech.consult
s
heet.dao.ConsultSheetMapper"
>
<resultMap
id=
"resultMap"
type=
"com.cftech.consult
S
heet.model.ConsultSheet"
>
<resultMap
id=
"resultMap"
type=
"com.cftech.consult
s
heet.model.ConsultSheet"
>
<id
column=
"id"
property=
"id"
/>
<id
column=
"id"
property=
"id"
/>
<result
column=
"consult_id"
property=
"consultId"
/>
<result
column=
"consult_id"
property=
"consultId"
/>
<result
column=
"user_name"
property=
"userName"
/>
<result
column=
"user_name"
property=
"userName"
/>
<result
column=
"number_id"
property=
"numberId"
/>
<result
column=
"number_id"
property=
"numberId"
/>
<result
column=
"benebit_id"
property=
"benebitId"
/>
<result
column=
"benebit_id"
property=
"benebitId"
/>
<result
column=
"sex"
property=
"sex"
/>
<result
column=
"sex"
property=
"sex"
/>
<result
column=
"iphone"
property=
"iPhone"
/>
<result
column=
"iphone"
property=
"iPhone"
/>
<result
column=
"past_records"
property=
"pastRecords"
/>
<result
column=
"past_records"
property=
"pastRecords"
/>
<result
column=
"prescription"
property=
"Prescription"
/>
<result
column=
"prescription"
property=
"Prescription"
/>
<result
column=
"doctor_id"
property=
"doctorId"
/>
<result
column=
"doctor_id"
property=
"doctorId"
/>
<result
column=
"customer_id"
property=
"customerId"
/>
<result
column=
"customer_id"
property=
"customerId"
/>
<result
column=
"illness"
property=
"illness"
/>
<result
column=
"illness"
property=
"illness"
/>
<result
column=
"accounts_id"
property=
"accountsId"
/>
<result
column=
"accounts_id"
property=
"accountsId"
/>
<result
column=
"del_flag"
property=
"delFlag"
/>
<result
column=
"del_flag"
property=
"delFlag"
/>
<result
column=
"status"
property=
"status"
/>
<result
column=
"status"
property=
"status"
/>
<result
column=
"create_time"
property=
"createTime"
/>
<result
column=
"create_time"
property=
"createTime"
/>
<result
column=
"update_time"
property=
"updateTime"
/>
<result
column=
"update_time"
property=
"updateTime"
/>
<result
column=
"description"
property=
"description"
/>
<result
column=
"description"
property=
"description"
/>
<result
column=
"create_by"
property=
"createBy"
/>
<result
column=
"create_by"
property=
"createBy"
/>
<result
column=
"update_by"
property=
"updateBy"
/>
<result
column=
"update_by"
property=
"updateBy"
/>
</resultMap>
</resultMap>
<sql
id=
"sqlWhere"
>
<sql
id=
"sqlWhere"
>
<if
test=
"conds!=null"
>
<if
test=
"conds!=null"
>
...
@@ -75,8 +75,8 @@
...
@@ -75,8 +75,8 @@
update_by
update_by
</sql>
</sql>
<insert
id=
"save"
parameterType=
"com.cftech.consult
S
heet.model.ConsultSheet"
useGeneratedKeys=
"true"
<insert
id=
"save"
parameterType=
"com.cftech.consult
s
heet.model.ConsultSheet"
useGeneratedKeys=
"true"
keyProperty=
"id"
>
keyProperty=
"id"
>
insert into t_aidea_consult_sheet
insert into t_aidea_consult_sheet
(
(
...
@@ -84,28 +84,28 @@
...
@@ -84,28 +84,28 @@
)
)
values
values
(
(
#{id, jdbcType=BIGINT},
#{id, jdbcType=BIGINT},
#{consultId, jdbcType=BIGINT},
#{consultId, jdbcType=BIGINT},
#{userName, jdbcType=VARCHAR},
#{userName, jdbcType=VARCHAR},
#{numberId, jdbcType=VARCHAR},
#{numberId, jdbcType=VARCHAR},
now(),
now(),
#{sex, jdbcType=BIGINT},
#{sex, jdbcType=BIGINT},
#{iPhone, jdbcType=VARCHAR},
#{iPhone, jdbcType=VARCHAR},
#{pastRecords, jdbcType=VARCHAR},
#{pastRecords, jdbcType=VARCHAR},
#{Prescription, jdbcType=VARCHAR},
#{Prescription, jdbcType=VARCHAR},
#{doctorId, jdbcType=BIGINT},
#{doctorId, jdbcType=BIGINT},
#{customerId, jdbcType=BIGINT},
#{customerId, jdbcType=BIGINT},
#{illness, jdbcType=BIGINT},
#{illness, jdbcType=BIGINT},
#{accountsId, jdbcType=BIGINT},
#{accountsId, jdbcType=BIGINT},
#{delFlag, jdbcType=TINYINT},
#{delFlag, jdbcType=TINYINT},
#{status, jdbcType=VARCHAR},
#{status, jdbcType=VARCHAR},
now(),
now(),
now(),
now(),
#{description, jdbcType=VARCHAR},
#{description, jdbcType=VARCHAR},
#{createBy, jdbcType=BIGINT},
#{createBy, jdbcType=BIGINT},
#{updateBy, jdbcType=BIGINT}
#{updateBy, jdbcType=BIGINT}
)
)
</insert>
</insert>
<select
id=
"fetchById"
parameterType=
"java.lang.Long"
resultMap=
"resultMap"
>
<select
id=
"fetchById"
parameterType=
"java.lang.Long"
resultMap=
"resultMap"
>
...
@@ -116,82 +116,82 @@
...
@@ -116,82 +116,82 @@
</select>
</select>
<select
id=
"count"
parameterType=
"java.util.Map"
resultType=
"java.lang.Integer"
>
<select
id=
"count"
parameterType=
"java.util.Map"
resultType=
"java.lang.Integer"
>
SELECT COUNT(1) FROM t_aidea_consult_sheet
SELECT COUNT(1) FROM t_aidea_consult_sheet
<include
refid=
"sqlWhere"
/>
<include
refid=
"sqlWhere"
/>
</select>
</select>
<select
id=
"fetchSearchByPage"
parameterType=
"java.util.Map"
resultMap=
"resultMap"
>
<select
id=
"fetchSearchByPage"
parameterType=
"java.util.Map"
resultMap=
"resultMap"
>
SELECT
SELECT
<include
refid=
"sqlColumns"
/>
<include
refid=
"sqlColumns"
/>
FROM t_aidea_consult_sheet
FROM t_aidea_consult_sheet
<include
refid=
"sqlWhere"
/>
<include
refid=
"sqlWhere"
/>
<if
test=
"sort!=null"
>
ORDER BY ${sort.param} ${sort.type}
</if>
<if
test=
"sort!=null"
>
ORDER BY ${sort.param} ${sort.type}
</if>
<if
test=
"limit>0"
>
limit #{offset},#{limit}
</if>
<if
test=
"limit>0"
>
limit #{offset},#{limit}
</if>
</select>
</select>
<update
id=
"update"
parameterType=
"com.cftech.consult
S
heet.model.ConsultSheet"
>
<update
id=
"update"
parameterType=
"com.cftech.consult
s
heet.model.ConsultSheet"
>
update t_aidea_consult_sheet
update t_aidea_consult_sheet
<set>
<set>
<if
test=
"id != null"
>
<if
test=
"id != null"
>
id = #{id, jdbcType=BIGINT},
id = #{id, jdbcType=BIGINT},
</if>
</if>
<if
test=
"consultId != null"
>
<if
test=
"consultId != null"
>
consult_id = #{consultId, jdbcType=BIGINT},
consult_id = #{consultId, jdbcType=BIGINT},
</if>
</if>
<if
test=
"userName != null"
>
<if
test=
"userName != null"
>
user_name = #{userName, jdbcType=VARCHAR},
user_name = #{userName, jdbcType=VARCHAR},
</if>
</if>
<if
test=
"numberId != null"
>
<if
test=
"numberId != null"
>
number_id = #{numberId, jdbcType=VARCHAR},
number_id = #{numberId, jdbcType=VARCHAR},
</if>
</if>
<if
test=
"benebitId != null"
>
<if
test=
"benebitId != null"
>
benebit_id = #{benebitId, jdbcType=TIMESTAMP},
benebit_id = #{benebitId, jdbcType=TIMESTAMP},
</if>
</if>
<if
test=
"sex != null"
>
<if
test=
"sex != null"
>
sex = #{sex, jdbcType=BIGINT},
sex = #{sex, jdbcType=BIGINT},
</if>
</if>
<if
test=
"iPhone != null"
>
<if
test=
"iPhone != null"
>
i_phone = #{iPhone, jdbcType=VARCHAR},
i_phone = #{iPhone, jdbcType=VARCHAR},
</if>
</if>
<if
test=
"pastRecords != null"
>
<if
test=
"pastRecords != null"
>
past_records = #{pastRecords, jdbcType=VARCHAR},
past_records = #{pastRecords, jdbcType=VARCHAR},
</if>
</if>
<if
test=
"Prescription != null"
>
<if
test=
"Prescription != null"
>
prescription = #{Prescription, jdbcType=VARCHAR},
prescription = #{Prescription, jdbcType=VARCHAR},
</if>
</if>
<if
test=
"doctorId != null"
>
<if
test=
"doctorId != null"
>
doctor_id = #{doctorId, jdbcType=BIGINT},
doctor_id = #{doctorId, jdbcType=BIGINT},
</if>
</if>
<if
test=
"customerId != null"
>
<if
test=
"customerId != null"
>
customer_id = #{customerId, jdbcType=BIGINT},
customer_id = #{customerId, jdbcType=BIGINT},
</if>
</if>
<if
test=
"illness != null"
>
<if
test=
"illness != null"
>
illness = #{illness, jdbcType=BIGINT},
illness = #{illness, jdbcType=BIGINT},
</if>
</if>
<if
test=
"accountsId != null"
>
<if
test=
"accountsId != null"
>
accounts_id = #{accountsId, jdbcType=BIGINT},
accounts_id = #{accountsId, jdbcType=BIGINT},
</if>
</if>
<if
test=
"delFlag != null"
>
<if
test=
"delFlag != null"
>
del_flag = #{delFlag, jdbcType=TINYINT},
del_flag = #{delFlag, jdbcType=TINYINT},
</if>
</if>
<if
test=
"status != null"
>
<if
test=
"status != null"
>
status = #{status, jdbcType=VARCHAR},
status = #{status, jdbcType=VARCHAR},
</if>
</if>
<if
test=
"createTime != null"
>
<if
test=
"createTime != null"
>
create_time = #{createTime, jdbcType=TIMESTAMP},
create_time = #{createTime, jdbcType=TIMESTAMP},
</if>
</if>
<if
test=
"description != null"
>
<if
test=
"description != null"
>
description = #{description, jdbcType=VARCHAR},
description = #{description, jdbcType=VARCHAR},
</if>
</if>
<if
test=
"createBy != null"
>
<if
test=
"createBy != null"
>
create_by = #{createBy, jdbcType=BIGINT},
create_by = #{createBy, jdbcType=BIGINT},
</if>
</if>
<if
test=
"updateBy != null"
>
<if
test=
"updateBy != null"
>
update_by = #{updateBy, jdbcType=BIGINT},
update_by = #{updateBy, jdbcType=BIGINT},
</if>
</if>
</set>
</set>
where id=#{id,jdbcType=BIGINT}
where id=#{id,jdbcType=BIGINT}
</update>
</update>
...
...
cftech-common-web/src/main/resources/common-test.properties
View file @
ac37690f
...
@@ -39,8 +39,8 @@ WOEK_TEMPLATE_MESSAGE=8m-_tt_EqoQO-wsE6_JLJdn3nO15_hgUp9mLTujz5RU
...
@@ -39,8 +39,8 @@ WOEK_TEMPLATE_MESSAGE=8m-_tt_EqoQO-wsE6_JLJdn3nO15_hgUp9mLTujz5RU
userfiles.imgdir
=
E:
\\
fileResource
userfiles.imgdir
=
E:
\\
fileResource
#\u56FE\u7247\u8BBF\u95EE\u5730\u5740
#\u56FE\u7247\u8BBF\u95EE\u5730\u5740
IMAGEURL
=
/schaeffler/mobile/qybase/showPic?picFileName={PICFILENAME}
ROOT_ORG_NAME
=
\u
827E
\u
8FEA
\u
836F
\u
4E1A
ROOT_ORG_NAME
=
\u
4E1C
\u
660C
\u
96C6
\u
56E2
IMAGEURL
=
/aidea/mobile/qybase/showPic?picFileName={PICFILENAME}
ROOT_PAPERCATEGORY_NAME
=
\u
95EE
\u5377\u
7C7B
\u
578B
ROOT_PAPERCATEGORY_NAME
=
\u
95EE
\u5377\u
7C7B
\u
578B
ROOT_QUESTIONSCATEGORY_NAME
=
\u
95EE
\u9898\u
7C7B
\u
522B
ROOT_QUESTIONSCATEGORY_NAME
=
\u
95EE
\u9898\u
7C7B
\u
522B
ROOT_MATERIALCATEGORY_NAME
=
\u
7D20
\u6750\u
7C7B
\u
522B
ROOT_MATERIALCATEGORY_NAME
=
\u
7D20
\u6750\u
7C7B
\u
522B
...
@@ -106,7 +106,7 @@ orderDeliverGoodsTemplateId=TH3I5prFYPC54M14zFJfgN4gvjx8SpJayctIHmzThwg
...
@@ -106,7 +106,7 @@ orderDeliverGoodsTemplateId=TH3I5prFYPC54M14zFJfgN4gvjx8SpJayctIHmzThwg
#\u670D\u52A1\u5B8C\u6210\u901A\u77E5
#\u670D\u52A1\u5B8C\u6210\u901A\u77E5
serverEndTemplateId
=
7L1KIroXNxejxotFTzll-dVLdo1xbmqoiAo7UmDKWcc
serverEndTemplateId
=
7L1KIroXNxejxotFTzll-dVLdo1xbmqoiAo7UmDKWcc
PRODUCT_CLASSIFY_FATHER_NAME
=
Ʒ
PRODUCT_CLASSIFY_FATHER_NAME
=
\u
FFFD
\u
FFFD
\u
01B7
\u
FFFD
\u
FFFD
\u
FFFD
\u
FFFD
#\u54C1\u724C\u7533\u8BF7\u6D88\u606F\u6A21\u677F
#\u54C1\u724C\u7533\u8BF7\u6D88\u606F\u6A21\u677F
brandApplyCommTemplateId
=
82ByH2tkWI1-jlYiWr_-CIihWsgjrvLdFvuO771FwBo
brandApplyCommTemplateId
=
82ByH2tkWI1-jlYiWr_-CIihWsgjrvLdFvuO771FwBo
...
...
cftech-common-web/src/main/webapp/assets/adminlte/plugins/ueditor-min-1.4.3/ueditor.config.js
View file @
ac37690f
...
@@ -21,7 +21,7 @@
...
@@ -21,7 +21,7 @@
*/
*/
//var URL = base + '/ueditor-min-1.4.3/';
//var URL = base + '/ueditor-min-1.4.3/';
//var URL = 'plugins/ueditor-min-1.4.3/';
//var URL = 'plugins/ueditor-min-1.4.3/';
var
URL
=
'/
schaeffler
/assets/adminlte/plugins/ueditor-min-1.4.3/'
;
var
URL
=
'/
aidea
/assets/adminlte/plugins/ueditor-min-1.4.3/'
;
/**
/**
* 配置项主体。注意,此处所有涉及到路径的配置别遗漏URL变量。
* 配置项主体。注意,此处所有涉及到路径的配置别遗漏URL变量。
...
...
cftech-common/src/main/java/com/cftech/core/util/OKHttpUtils.java
View file @
ac37690f
...
@@ -18,7 +18,7 @@ public class OKHttpUtils {
...
@@ -18,7 +18,7 @@ public class OKHttpUtils {
static
OkHttpClient
client
;
static
OkHttpClient
client
;
static
{
static
{
OkHttpClient
.
Builder
builder
=
new
OkHttpClient
.
Builder
();
OkHttpClient
.
Builder
builder
=
new
OkHttpClient
.
Builder
();
Dispatcher
dispatcher
=
new
Dispatcher
();
Dispatcher
dispatcher
=
new
Dispatcher
();
dispatcher
.
setMaxRequests
(
100
);
dispatcher
.
setMaxRequests
(
100
);
dispatcher
.
setMaxRequestsPerHost
(
50
);
dispatcher
.
setMaxRequestsPerHost
(
50
);
...
...
cos-modules/cos-upload-module-web/src/main/webapp/WEB-INF/views/upload/materialUploadform.html
View file @
ac37690f
...
@@ -242,6 +242,9 @@
...
@@ -242,6 +242,9 @@
#if($cosconfig.cosType == "qiniu")
#if($cosconfig.cosType == "qiniu")
<option
value=
"$cosconfig.id"
>
七牛
</option>
<option
value=
"$cosconfig.id"
>
七牛
</option>
#end
#end
#if($cosconfig.cosType == "local")
<option
value=
"$cosconfig.id"
>
本地
</option>
#end
#end
#end
</select>
</select>
</div>
</div>
...
...
portal-web/pom.xml
View file @
ac37690f
...
@@ -238,6 +238,12 @@
...
@@ -238,6 +238,12 @@
<version>
1.0-SNAPSHOT
</version>
<version>
1.0-SNAPSHOT
</version>
<type>
war
</type>
<type>
war
</type>
</dependency>
</dependency>
<dependency>
<groupId>
com.cftech
</groupId>
<artifactId>
product-classify-module-web
</artifactId>
<version>
1.0-SNAPSHOT
</version>
<type>
war
</type>
</dependency>
<!--<dependency>
<!--<dependency>
<groupId>com.cftech</groupId>
<groupId>com.cftech</groupId>
<artifactId>fours-job-module</artifactId>
<artifactId>fours-job-module</artifactId>
...
...
portal-web/src/main/webapp/WEB-INF/web.xml
View file @
ac37690f
...
@@ -38,7 +38,7 @@
...
@@ -38,7 +38,7 @@
<context-param>
<context-param>
<param-name>
webAppRootKey
</param-name>
<param-name>
webAppRootKey
</param-name>
<param-value>
schaeffler
</param-value>
<param-value>
aidea
</param-value>
</context-param>
</context-param>
<listener>
<listener>
<listener-class>
org.springframework.web.context.ContextLoaderListener
</listener-class>
<listener-class>
org.springframework.web.context.ContextLoaderListener
</listener-class>
...
...
qy-modules/qy-orgunit-module-web/src/main/webapp/WEB-INF/views/managerorgunit/orgunitadd.html
View file @
ac37690f
...
@@ -112,19 +112,19 @@
...
@@ -112,19 +112,19 @@
maxlength=
"50"
placeholder=
"组织名称"
required=
"required"
maxlength=
"50"
placeholder=
"组织名称"
required=
"required"
value=
"$!{data.orgName}"
>
value=
"$!{data.orgName}"
>
</div>
</div>
<
div
class=
"form-group form-md-line-input"
>
<
!--<div class="form-group form-md-line-input">--
>
<
label>
组织分类
</label
>
<
!--<label>组织分类</label>--
>
<
div
class=
"input-group"
>
<
!--<div class="input-group">--
>
<
input
type=
"text"
id=
"orgtypeId"
name=
"orgtypeId"
value=
"$!{data.orgtypeId}"
<
!--<input type="text" id="orgtypeId" name="orgtypeId" value="$!{data.orgtypeId}"-->
class=
"form-control"
style=
"display: none"
>
<!--class="form-control" style="display: none">--
>
<
input
type=
"text"
id=
"orgtypeName"
name=
"orgtypeName"
value=
"$!{orgtypeName}"
<
!--<input type="text" id="orgtypeName" name="orgtypeName" value="$!{orgtypeName}"-->
class=
"form-control"
disabled
>
<!--class="form-control" disabled>--
>
<
span
class=
"input-group-btn"
>
<
!--<span class="input-group-btn">--
>
<
button
type=
"button"
id=
"orgtypeSelect"
<
!--<button type="button" id="orgtypeSelect"-->
class=
"btn btn-info btn-flat"
>
选择
</button
>
<!--class="btn btn-info btn-flat">选择</button>--
>
<
/span
>
<
!--</span>--
>
<
/div
>
<
!--</div>--
>
<
/div
>
<
!--</div>--
>
<!--<div class="checkbox">-->
<!--<div class="checkbox">-->
<!--<label>-->
<!--<label>-->
<!--<input type="checkbox" id="isAdminUnit" name="isAdminUnit"-->
<!--<input type="checkbox" id="isAdminUnit" name="isAdminUnit"-->
...
...
qy-modules/qy-orgunit-module/src/main/java/com/cftech/base/org/web/OrgUnitController.java
View file @
ac37690f
...
@@ -105,7 +105,7 @@ public class OrgUnitController {
...
@@ -105,7 +105,7 @@ public class OrgUnitController {
//提交编辑页面(新增、修改)
//提交编辑页面(新增、修改)
@RequiresPermissions
(
value
=
PermissionSign
.
ORGUNIT_EDIT
)
@RequiresPermissions
(
value
=
PermissionSign
.
ORGUNIT_EDIT
)
@RequestMapping
(
value
=
"/formData"
,
method
=
{
RequestMethod
.
POST
}
)
@RequestMapping
(
value
=
"/formData"
)
@ResponseBody
@ResponseBody
public
JSONObject
formData
(
OrgUnit
orgUnit
,
Model
model
,
HttpServletRequest
request
)
{
public
JSONObject
formData
(
OrgUnit
orgUnit
,
Model
model
,
HttpServletRequest
request
)
{
Long
accountsId
=
UserUtils
.
getmpaccounts
(
request
);
Long
accountsId
=
UserUtils
.
getmpaccounts
(
request
);
...
@@ -123,20 +123,20 @@ public class OrgUnitController {
...
@@ -123,20 +123,20 @@ public class OrgUnitController {
orgUnit
.
setParentIds
(
"0,"
+
orgUnit
.
getId
()
+
","
);
orgUnit
.
setParentIds
(
"0,"
+
orgUnit
.
getId
()
+
","
);
}
}
// 2017-10-27 取消同步企业号,组织功能
//同步至企业号
//
if (StringUtils.isEmpty(orgUnit.getWxorgId())) {
if
(
StringUtils
.
isEmpty
(
orgUnit
.
getWxorgId
()))
{
//
int wxorgid = qyOrgUtil.create(orgUnit, parentOrgUnit);
int
wxorgid
=
qyOrgUtil
.
create
(
orgUnit
,
parentOrgUnit
);
//
if (wxorgid == -1) {
if
(
wxorgid
==
-
1
)
{
//
log.error("同步微信端出错," + orgUnit.toString());
log
.
error
(
"同步微信端出错,"
+
orgUnit
.
toString
());
//
} else {
}
else
{
//
orgUnit.setWxorgId("" + wxorgid);
orgUnit
.
setWxorgId
(
""
+
wxorgid
);
//
//
}
}
//
} else {
}
else
{
//
if (!qyOrgUtil.update(orgUnit)) {
if
(!
qyOrgUtil
.
update
(
orgUnit
))
{
//
log.error("同步微信端出错," + orgUnit.toString());
log
.
error
(
"同步微信端出错,"
+
orgUnit
.
toString
());
//
}
}
//
}
}
orgUnitService
.
updateCache
(
orgUnit
);
orgUnitService
.
updateCache
(
orgUnit
);
rtnJson
.
put
(
"errorNo"
,
0
);
rtnJson
.
put
(
"errorNo"
,
0
);
...
@@ -157,14 +157,13 @@ public class OrgUnitController {
...
@@ -157,14 +157,13 @@ public class OrgUnitController {
orgUnit
.
setUpdateBy
(
UserUtils
.
getUser
().
getId
());
orgUnit
.
setUpdateBy
(
UserUtils
.
getUser
().
getId
());
orgUnitService
.
saveCache
(
orgUnit
);
orgUnitService
.
saveCache
(
orgUnit
);
// 2017-10-27 取消同步企业号,组织功能
int
wxorgid
=
qyOrgUtil
.
create
(
orgUnit
,
parentOrgUnit
);
// int wxorgid = qyOrgUtil.create(orgUnit, parentOrgUnit);
if
(
wxorgid
==
-
1
||
wxorgid
==
0
)
{
// if (wxorgid == -1 || wxorgid == 0) {
rtnJson
.
put
(
"errorNo"
,
1
);
// rtnJson.put("errorNo", 1);
throw
new
Exception
(
"同步微信端出错"
);
// throw new Exception("同步微信端出错");
}
else
{
// } else {
orgUnit
.
setWxorgId
(
""
+
wxorgid
);
// orgUnit.setWxorgId("" + wxorgid);
}
// }
orgUnit
.
setParentIds
(
orgUnit
.
getParentIds
()
+
orgUnit
.
getId
()
+
","
);
orgUnit
.
setParentIds
(
orgUnit
.
getParentIds
()
+
orgUnit
.
getId
()
+
","
);
orgUnitService
.
updateCache
(
orgUnit
);
orgUnitService
.
updateCache
(
orgUnit
);
...
...
token-module/src/main/java/com/cftech/core/util/QyTokenUtil.java
View file @
ac37690f
...
@@ -23,183 +23,185 @@ import java.util.concurrent.TimeUnit;
...
@@ -23,183 +23,185 @@ import java.util.concurrent.TimeUnit;
/**
/**
* 企业号 ACCESS TOKEN 管理
* 企业号 ACCESS TOKEN 管理
* @author Neil
*
*
* @author Neil
*/
*/
@Slf4j
@Slf4j
@Component
@Component
public
class
QyTokenUtil
{
public
class
QyTokenUtil
{
@Autowired
@Autowired
private
MpAccountsService
accountService
;
private
MpAccountsService
accountService
;
@Autowired
@Autowired
private
RedisTemplate
<
String
,
String
>
redisTemplate
;
private
RedisTemplate
<
String
,
String
>
redisTemplate
;
// @Autowired
// private WebHttpInterface webHttpInterface;
private
RedisTemplate
<
String
,
String
>
getConfig
()
{
StringRedisSerializer
stringSerializer
=
new
StringRedisSerializer
();
private
RedisTemplate
<
String
,
String
>
getConfig
()
{
redisTemplate
.
setKeySerializer
(
stringSerializer
);
StringRedisSerializer
stringSerializer
=
new
StringRedisSerializer
();
//redisTemplate.setValueSerializer(stringSerializer);
redisTemplate
.
setKeySerializer
(
stringSerializer
);
redisTemplate
.
setHashKeySerializer
(
stringSerializer
);
//redisTemplate.setValueSerializer(stringSerializer);
redisTemplate
.
setHashValueSerializer
(
stringSerializer
);
redisTemplate
.
setHashKeySerializer
(
stringSerializer
);
return
redisTemplate
;
redisTemplate
.
setHashValueSerializer
(
stringSerializer
);
}
return
redisTemplate
;
}
/**
/**
* 通过企业号corpid刷新最新的token,并返回
*
*
* 通过企业号corpid刷新最新的token,并返回
* @return
* @return
*/
*/
public
String
getToken
(
Long
accountId
)
//更新token
public
String
getToken
(
Long
accountId
)
//更新token
{
{
MpAccountsEntity
accountsEntity
=
searchAccountsById
(
accountId
);
MpAccountsEntity
accountsEntity
=
searchAccountsById
(
accountId
);
if
(
accountsEntity
==
null
)
{
if
(
accountsEntity
==
null
)
{
return
null
;
return
null
;
}
}
// accesstoken的key
// accesstoken的key
String
key
=
"CORPID_"
+
accountsEntity
.
getAppid
();
String
key
=
"CORPID_"
+
accountsEntity
.
getAppid
();
// jstoken的key
// jstoken的key
String
jskey
=
"CORPIDJS_"
+
accountsEntity
.
getAppid
();
String
jskey
=
"CORPIDJS_"
+
accountsEntity
.
getAppid
();
if
(
getConfig
().
hasKey
(
key
))
{
if
(
getConfig
().
hasKey
(
key
))
{
return
getConfig
().
opsForValue
().
get
(
key
);
return
getConfig
().
opsForValue
().
get
(
key
);
}
}
String
token
=
null
;
// 请求企业号认证信息
try
{
String
url
=
WxApiConstants
.
TOKEN_GET
.
replace
(
"CORPID"
,
accountsEntity
.
getAppid
())
// 请求企业号认证信息
.
replace
(
"SECRECT"
,
accountsEntity
.
getSecret
());
String
url
=
WxApiConstants
.
TOKEN_GET
.
replace
(
"CORPID"
,
accountsEntity
.
getAppid
())
// String retStr = OKHttpUtils.getJSON(url);
.
replace
(
"SECRECT"
,
accountsEntity
.
getSecret
());
// JSONObject retObj = JSON.parseObject(retStr);
String
retStr
=
OKHttpUtils
.
getJSON
(
url
);
// String token = retObj.getString("access_token");// 缓存token至redis
JSONObject
retObj
=
JSON
.
parseObject
(
retStr
);
String
token
=
"1"
;
// webHttpInterface.getValue(url,"access_token");
token
=
retObj
.
getString
(
"access_token"
);
// 缓存token至redis
getConfig
().
opsForValue
().
set
(
key
,
token
);
getConfig
().
opsForValue
().
set
(
key
,
token
);
getConfig
().
expire
(
key
,
6000
,
TimeUnit
.
SECONDS
);
getConfig
().
expire
(
key
,
6000
,
TimeUnit
.
SECONDS
);
// 继续缓存jsticket
// 继续缓存jsticket
url
=
WxApiConstants
.
JSAPI_TICKET_GET
.
replace
(
"ACCESS_TOKEN"
,
token
);
url
=
WxApiConstants
.
JSAPI_TICKET_GET
.
replace
(
"ACCESS_TOKEN"
,
token
);
// retStr = OKHttpUtils.getJSON(url);
retStr
=
OKHttpUtils
.
getJSON
(
url
);
// retObj = JSON.parseObject(retStr);
retObj
=
JSON
.
parseObject
(
retStr
);
// String jsTicket = retObj.getString("ticket");
String
jsTicket
=
retObj
.
getString
(
"ticket"
);
String
jsTicket
=
"1"
;
// webHttpInterface.getValue(url,"ticket");
// 缓存token至redis
// 缓存token至redis
getConfig
().
opsForValue
().
set
(
jskey
,
jsTicket
);
getConfig
().
opsForValue
().
set
(
jskey
,
jsTicket
);
getConfig
().
expire
(
jskey
,
6000
,
TimeUnit
.
SECONDS
);
getConfig
().
expire
(
jskey
,
6000
,
TimeUnit
.
SECONDS
);
}
catch
(
IOException
e
)
{
return
token
;
e
.
printStackTrace
();
}
}
return
token
;
public
String
getToken
(
MpAccountsEntity
accountsEntity
)
//更新token
}
{
if
(
accountsEntity
==
null
)
{
public
String
getToken
(
MpAccountsEntity
accountsEntity
)
//更新token
return
null
;
{
}
if
(
accountsEntity
==
null
)
{
// accesstoken的key
return
null
;
String
key
=
"CORPID_"
+
accountsEntity
.
getAppid
();
}
// jstoken的key
// accesstoken的key
String
jskey
=
"CORPIDJS_"
+
accountsEntity
.
getAppid
();
String
key
=
"CORPID_"
+
accountsEntity
.
getAppid
();
if
(
getConfig
().
hasKey
(
key
))
{
// jstoken的key
return
getConfig
().
opsForValue
().
get
(
key
);
String
jskey
=
"CORPIDJS_"
+
accountsEntity
.
getAppid
();
}
if
(
getConfig
().
hasKey
(
key
))
{
// 请求企业号认证信息
return
getConfig
().
opsForValue
().
get
(
key
);
String
url
=
WxApiConstants
.
TOKEN_GET
.
replace
(
"CORPID"
,
accountsEntity
.
getAppid
())
}
.
replace
(
"SECRECT"
,
accountsEntity
.
getSecret
());
// 请求企业号认证信息
try
{
String
url
=
WxApiConstants
.
TOKEN_GET
.
replace
(
"CORPID"
,
accountsEntity
.
getAppid
())
String
retStr
=
OKHttpUtils
.
getJSON
(
url
);
.
replace
(
"SECRECT"
,
accountsEntity
.
getSecret
());
JSONObject
retObj
=
JSON
.
parseObject
(
retStr
);
try
{
String
token
=
retObj
.
getString
(
"access_token"
);
// 缓存token至redis
String
retStr
=
OKHttpUtils
.
getJSON
(
url
);
getConfig
().
opsForValue
().
set
(
key
,
token
);
JSONObject
retObj
=
JSON
.
parseObject
(
retStr
);
getConfig
().
expire
(
key
,
6000
,
TimeUnit
.
SECONDS
);
String
token
=
retObj
.
getString
(
"access_token"
);
// 缓存token至redis
getConfig
().
opsForValue
().
set
(
key
,
token
);
// 继续缓存jsticket
getConfig
().
expire
(
key
,
6000
,
TimeUnit
.
SECONDS
);
url
=
WxApiConstants
.
JSAPI_TICKET_GET
.
replace
(
"ACCESS_TOKEN"
,
token
);
retStr
=
OKHttpUtils
.
getJSON
(
url
);
// 继续缓存jsticket
retObj
=
JSON
.
parseObject
(
retStr
);
url
=
WxApiConstants
.
JSAPI_TICKET_GET
.
replace
(
"ACCESS_TOKEN"
,
token
);
String
jsTicket
=
retObj
.
getString
(
"ticket"
);
retStr
=
OKHttpUtils
.
getJSON
(
url
);
retObj
=
JSON
.
parseObject
(
retStr
);
// 缓存token至redis
String
jsTicket
=
retObj
.
getString
(
"ticket"
);
getConfig
().
opsForValue
().
set
(
jskey
,
jsTicket
);
getConfig
().
expire
(
jskey
,
6000
,
TimeUnit
.
SECONDS
);
// 缓存token至redis
getConfig
().
opsForValue
().
set
(
jskey
,
jsTicket
);
return
token
;
getConfig
().
expire
(
jskey
,
6000
,
TimeUnit
.
SECONDS
);
}
catch
(
IOException
e
)
{
e
.
printStackTrace
();
return
token
;
}
}
catch
(
IOException
e
)
{
return
null
;
e
.
printStackTrace
();
}
}
return
null
;
public
String
getJSTicket
(
Long
accountId
)
{
}
MpAccountsEntity
accountsEntity
=
searchAccountsById
(
accountId
);
// jstoken的key
public
String
getJSTicket
(
Long
accountId
)
{
String
jskey
=
"CORPIDJS_"
+
accountsEntity
.
getAppid
();
MpAccountsEntity
accountsEntity
=
searchAccountsById
(
accountId
);
return
getConfig
().
opsForValue
().
get
(
jskey
);
// jstoken的key
}
String
jskey
=
"CORPIDJS_"
+
accountsEntity
.
getAppid
();
return
getConfig
().
opsForValue
().
get
(
jskey
);
public
String
getJSTicket
(
MpAccountsEntity
accountsEntity
)
{
}
// jstoken的key
String
jskey
=
"CORPIDJS_"
+
accountsEntity
.
getAppid
();
public
String
getJSTicket
(
MpAccountsEntity
accountsEntity
)
{
return
getConfig
().
opsForValue
().
get
(
jskey
);
// jstoken的key
}
String
jskey
=
"CORPIDJS_"
+
accountsEntity
.
getAppid
();
return
getConfig
().
opsForValue
().
get
(
jskey
);
/**
}
* 通过主键ID,获取公众号实体
*/
/**
public
MpAccountsEntity
searchAccountsById
(
Long
id
){
* 通过主键ID,获取公众号实体
MpAccountsEntity
accountsEntity
=
accountService
.
getDetail
(
id
);
*/
return
accountsEntity
;
public
MpAccountsEntity
searchAccountsById
(
Long
id
)
{
}
MpAccountsEntity
accountsEntity
=
accountService
.
getDetail
(
id
);
return
accountsEntity
;
/**
}
* 通过appid,获取公众号实体
*/
/**
public
MpAccountsEntity
searchAccounts
(
String
appid
){
* 通过appid,获取公众号实体
MpAccountsEntity
accountsEntity
=
accountService
.
getMpAccountsAppid
(
appid
);
*/
return
accountsEntity
;
public
MpAccountsEntity
searchAccounts
(
String
appid
)
{
}
MpAccountsEntity
accountsEntity
=
accountService
.
getMpAccountsAppid
(
appid
);
return
accountsEntity
;
/**
}
* 做SHA-1签名
*
/**
* @param jsapiTicket
* 做SHA-1签名
* @param noncestr
*
* @param timestamp
* @param jsapiTicket
* @param url
* @param noncestr
* @return
* @param timestamp
*/
* @param url
public
static
String
sign
(
String
jsapiTicket
,
String
noncestr
,
String
timestamp
,
String
url
)
{
* @return
StringBuffer
sb
=
new
StringBuffer
();
*/
sb
.
append
(
"jsapi_ticket="
);
public
static
String
sign
(
String
jsapiTicket
,
String
noncestr
,
String
timestamp
,
String
url
)
{
sb
.
append
(
jsapiTicket
);
StringBuffer
sb
=
new
StringBuffer
();
sb
.
append
(
"&"
);
sb
.
append
(
"jsapi_ticket="
);
sb
.
append
(
"noncestr="
);
sb
.
append
(
jsapiTicket
);
sb
.
append
(
noncestr
);
sb
.
append
(
"&"
);
sb
.
append
(
"&"
);
sb
.
append
(
"noncestr="
);
sb
.
append
(
"timestamp="
);
sb
.
append
(
noncestr
);
sb
.
append
(
timestamp
);
sb
.
append
(
"&"
);
sb
.
append
(
"&"
);
sb
.
append
(
"timestamp="
);
sb
.
append
(
"url="
);
sb
.
append
(
timestamp
);
sb
.
append
(
url
);
sb
.
append
(
"&"
);
try
{
sb
.
append
(
"url="
);
MessageDigest
crypt
=
MessageDigest
.
getInstance
(
"SHA-1"
);
sb
.
append
(
url
);
crypt
.
reset
();
try
{
crypt
.
update
(
sb
.
toString
().
getBytes
(
"UTF-8"
));
MessageDigest
crypt
=
MessageDigest
.
getInstance
(
"SHA-1"
);
return
byteToHex
(
crypt
.
digest
());
crypt
.
reset
();
}
catch
(
NoSuchAlgorithmException
e
)
{
crypt
.
update
(
sb
.
toString
().
getBytes
(
"UTF-8"
));
log
.
error
(
"QyTokenUtil sign error: {}"
,
e
.
getMessage
());
return
byteToHex
(
crypt
.
digest
());
return
""
;
}
catch
(
NoSuchAlgorithmException
e
)
{
}
catch
(
UnsupportedEncodingException
e
)
{
log
.
error
(
"QyTokenUtil sign error: {}"
,
e
.
getMessage
());
log
.
error
(
"QyTokenUtil sign error: {}"
,
e
.
getMessage
());
return
""
;
return
""
;
}
catch
(
UnsupportedEncodingException
e
)
{
}
log
.
error
(
"QyTokenUtil sign error: {}"
,
e
.
getMessage
());
}
return
""
;
}
private
static
String
byteToHex
(
final
byte
[]
hash
)
{
}
Formatter
formatter
=
new
Formatter
();
for
(
byte
b
:
hash
)
{
private
static
String
byteToHex
(
final
byte
[]
hash
)
{
formatter
.
format
(
"%02x"
,
b
);
Formatter
formatter
=
new
Formatter
();
}
for
(
byte
b
:
hash
)
{
String
result
=
formatter
.
toString
();
formatter
.
format
(
"%02x"
,
b
);
formatter
.
close
();
}
return
result
;
String
result
=
formatter
.
toString
();
}
formatter
.
close
();
return
result
;
}
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment