Commit ac37690f authored by 谢希宇's avatar 谢希宇

init aidea products by 20200922

parent d65c82f6
...@@ -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>
......
<?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.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,8 +75,8 @@ ...@@ -75,8 +75,8 @@
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>
......
...@@ -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=\u827E\u8FEA\u836F\u4E1A
ROOT_ORG_NAME=\u4E1C\u660C\u96C6\u56E2 IMAGEURL=/aidea/mobile/qybase/showPic?picFileName={PICFILENAME}
ROOT_PAPERCATEGORY_NAME=\u95EE\u5377\u7C7B\u578B ROOT_PAPERCATEGORY_NAME=\u95EE\u5377\u7C7B\u578B
ROOT_QUESTIONSCATEGORY_NAME=\u95EE\u9898\u7C7B\u522B ROOT_QUESTIONSCATEGORY_NAME=\u95EE\u9898\u7C7B\u522B
ROOT_MATERIALCATEGORY_NAME=\u7D20\u6750\u7C7B\u522B ROOT_MATERIALCATEGORY_NAME=\u7D20\u6750\u7C7B\u522B
...@@ -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=\uFFFD\uFFFD\u01B7\uFFFD\uFFFD\uFFFD\uFFFD
#\u54C1\u724C\u7533\u8BF7\u6D88\u606F\u6A21\u677F #\u54C1\u724C\u7533\u8BF7\u6D88\u606F\u6A21\u677F
brandApplyCommTemplateId=82ByH2tkWI1-jlYiWr_-CIihWsgjrvLdFvuO771FwBo brandApplyCommTemplateId=82ByH2tkWI1-jlYiWr_-CIihWsgjrvLdFvuO771FwBo
......
...@@ -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变量。
......
...@@ -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);
......
...@@ -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>
......
...@@ -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>
......
...@@ -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>
......
...@@ -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"-->
......
...@@ -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);
......
...@@ -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;
}
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment