Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gdtel-gztel-school-center
Overview
Overview
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
吴学德
gdtel-gztel-school-center
Commits
b0b4850c
Commit
b0b4850c
authored
Jan 28, 2021
by
罗承锋
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/master'
parents
054b6b8e
df1a0adc
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
225 additions
and
17 deletions
+225
-17
apply-net/src/main/java/com/winsun/controller/DankuanController.java
+0
-0
apply-net/src/main/java/com/winsun/controller/RongHeController.java
+0
-0
apply-net/src/main/java/com/winsun/controller/codeManagerController.java
+25
-12
apply-net/src/main/resources/txtfiledetail.properties
+15
-0
common/src/main/java/com/winsun/bean/OrderView.java
+14
-2
common/src/main/java/com/winsun/bean/Product.java
+30
-1
common/src/main/java/com/winsun/bean/UniversityInfo.java
+29
-2
common/src/main/java/com/winsun/constant/Constant.java
+4
-0
common/src/main/java/com/winsun/mapper/HhrUserMapper.java
+16
-0
common/src/main/java/com/winsun/mapper/OrderViewMapper.java
+9
-0
common/src/main/java/com/winsun/mapper/ProductMapper.java
+15
-0
common/src/main/java/com/winsun/mapper/SchoolMapper.java
+6
-0
common/src/main/java/com/winsun/mapper/UniversityInfoMapper.java
+1
-0
common/src/main/java/com/winsun/utils/Base64ToImgUtils.java
+61
-0
No files found.
apply-net/src/main/java/com/winsun/controller/DankuanController.java
View file @
b0b4850c
This diff is collapsed.
Click to expand it.
apply-net/src/main/java/com/winsun/controller/RongHeController.java
View file @
b0b4850c
This diff is collapsed.
Click to expand it.
apply-net/src/main/java/com/winsun/controller/codeManagerController.java
View file @
b0b4850c
...
@@ -3,15 +3,11 @@ package com.winsun.controller;
...
@@ -3,15 +3,11 @@ package com.winsun.controller;
import
com.baomidou.mybatisplus.mapper.EntityWrapper
;
import
com.baomidou.mybatisplus.mapper.EntityWrapper
;
import
com.baomidou.mybatisplus.mapper.Wrapper
;
import
com.baomidou.mybatisplus.mapper.Wrapper
;
import
com.winsun.auth.core.common.model.ResponseData
;
import
com.winsun.auth.core.common.model.ResponseData
;
import
com.winsun.bean.KdPhone
;
import
com.winsun.bean.*
;
import
com.winsun.bean.Order
;
import
com.winsun.mapper.*
;
import
com.winsun.bean.Regular
;
import
com.winsun.bean.XshInventory
;
import
com.winsun.mapper.KdPhoneMapper
;
import
com.winsun.mapper.OrderMapper
;
import
com.winsun.mapper.RegularMapper
;
import
com.winsun.mapper.XshInventoryMapper
;
import
com.winsun.smsUtils.SendSmsAndMail
;
import
com.winsun.smsUtils.SendSmsAndMail
;
import
com.winsun.utils.MessageUtil
;
import
com.winsun.utils.MyBatisPlusUpdateUtils
;
import
com.winsun.utils.RandomUtil
;
import
com.winsun.utils.RandomUtil
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
...
@@ -46,6 +42,8 @@ public class codeManagerController {
...
@@ -46,6 +42,8 @@ public class codeManagerController {
@Autowired
@Autowired
private
XshInventoryMapper
xshInventoryMapper
;
private
XshInventoryMapper
xshInventoryMapper
;
@Autowired
@Autowired
private
AuthCodeMapper
authCodeMapper
;
@Autowired
@Qualifier
(
"redisStringTemplate"
)
@Qualifier
(
"redisStringTemplate"
)
private
RedisTemplate
redisTemplate
;
private
RedisTemplate
redisTemplate
;
...
@@ -65,10 +63,25 @@ public class codeManagerController {
...
@@ -65,10 +63,25 @@ public class codeManagerController {
wrapper2
.
eq
(
"business_number"
,
phone
);
wrapper2
.
eq
(
"business_number"
,
phone
);
List
<
Order
>
list1
=
orderMapper
.
selectList
(
wrapper2
);
List
<
Order
>
list1
=
orderMapper
.
selectList
(
wrapper2
);
if
(
list
.
size
()>
0
||
list1
.
size
()>
0
){
if
(
list
.
size
()>
0
||
list1
.
size
()>
0
){
// 生成6位随机数
// 生成6位随机数
String
veCode
=
String
.
valueOf
((
int
)
((
RandomUtil
.
getSecrityRandom
()
*
9
+
1
)
*
100000
));
int
veCode
=
(
int
)
((
RandomUtil
.
getSecrityRandom
()
*
9
+
1
)
*
100000
);
//MessageUtil.sent(packageUpgrade.getAccNbr(),"4","您获取的验证码为:"+s+",半小时内有效。");
// MessageUtil.sent(packageUpgrade.getAccNbr(),"4","您获取的验证码为:"+s+",半小时内有效。");
redisTemplate
.
opsForValue
().
set
(
phone
,
veCode
,
240
,
TimeUnit
.
MINUTES
);
// 新框架短信验证码保存在Redis,但由于业务需要使用原来方式,存在数据库里
redisTemplate
.
opsForValue
().
set
(
phone
,
String
.
valueOf
(
veCode
),
240
,
TimeUnit
.
MINUTES
);
AuthCode
authCode
=
new
AuthCode
();
authCode
.
setId
(
phone
);
authCode
.
setUserAuthCode
(
veCode
);
Wrapper
<
AuthCode
>
authCodeWrapper
=
new
EntityWrapper
<>();
authCodeWrapper
.
eq
(
"id"
,
phone
);
Map
<
String
,
Object
>
map2
=
new
HashMap
<>();
map2
.
put
(
"user_authcode"
,
veCode
);
List
<
AuthCode
>
auth
=
authCodeMapper
.
queryAuthCode
(
phone
);
if
(
auth
.
size
()>
0
){
authCodeMapper
.
updateForSet
(
MyBatisPlusUpdateUtils
.
toUpdateSet
(
map2
),
authCodeWrapper
);
}
else
{
authCodeMapper
.
insert
(
authCode
);
}
SendSmsAndMail
.
sendSms
(
phone
,
veCode
+
""
,
"7"
);
SendSmsAndMail
.
sendSms
(
phone
,
veCode
+
""
,
"7"
);
log
.
info
(
"验证码:"
+
veCode
);
log
.
info
(
"验证码:"
+
veCode
);
map
.
put
(
"code"
,
1
);
map
.
put
(
"code"
,
1
);
...
...
apply-net/src/main/resources/txtfiledetail.properties
0 → 100644
View file @
b0b4850c
#############################################################################
#ػFTP
#
ftp_host
=
127.0.0.1
ftp_port
=
21
ftp_username
=
root
ftp_password
=
qUDZj/w2Rus=
ftp_sys
=
E:/FTP
hhr_img
=
/datas/apps/web/tomcats/apache-tomcat-7.0.100-hhr/hhrphoto
#hhr_img=D:/a
sign_img
=
/datas/apps/web/tomcats/apache-tomcat-7.0.100-hhr/hhr-sign-img
#sign_img=D:/a
yrym_sign
=
rQXPSHvWvHasj17#5L70ux3KvlWNqoVQ
common/src/main/java/com/winsun/bean/OrderView.java
View file @
b0b4850c
...
@@ -55,11 +55,16 @@ public class OrderView implements Serializable {
...
@@ -55,11 +55,16 @@ public class OrderView implements Serializable {
@TableField
(
value
=
"orderDate"
)
@TableField
(
value
=
"orderDate"
)
private
Date
orderDate
;
private
Date
orderDate
;
/**
/**
* 订单状态
* 订单状态
*/
*/
@TableField
(
value
=
"status"
)
@TableField
(
value
=
"status"
)
private
String
status
;
private
String
status
;
/**
/**
* 合伙人id
*/
@TableField
(
value
=
"hehuoren_id"
)
private
String
hehuorenId
;
/**
* 区域
* 区域
*/
*/
@TableField
(
value
=
"order_region"
)
@TableField
(
value
=
"order_region"
)
...
@@ -149,5 +154,11 @@ public class OrderView implements Serializable {
...
@@ -149,5 +154,11 @@ public class OrderView implements Serializable {
*/
*/
@TableField
(
value
=
"orderSeqTHD"
)
@TableField
(
value
=
"orderSeqTHD"
)
private
String
orderseqThd
;
private
String
orderseqThd
;
/**
* 套餐下标
*/
@TableField
(
value
=
"set_meal_index"
)
private
String
setMealIndex
;
}
}
\ No newline at end of file
common/src/main/java/com/winsun/bean/Product.java
View file @
b0b4850c
package
com
.
winsun
.
bean
;
package
com
.
winsun
.
bean
;
import
com.baomidou.mybatisplus.annotations.TableField
;
import
com.baomidou.mybatisplus.annotations.TableId
;
import
com.baomidou.mybatisplus.annotations.TableId
;
import
com.baomidou.mybatisplus.annotations.TableName
;
import
com.baomidou.mybatisplus.annotations.TableName
;
import
com.baomidou.mybatisplus.enums.IdType
;
import
com.baomidou.mybatisplus.enums.IdType
;
...
@@ -25,110 +26,138 @@ public class Product implements Serializable {
...
@@ -25,110 +26,138 @@ public class Product implements Serializable {
/**
/**
* 宽带标题
* 宽带标题
*/
*/
@TableField
(
"product_title"
)
private
String
productTitle
;
private
String
productTitle
;
/**
/**
* 创建人
* 创建人
*/
*/
@TableField
(
"product_creater"
)
private
String
productCreater
;
private
String
productCreater
;
/**
/**
* 最后更新时间
* 最后更新时间
*/
*/
@TableField
(
"product_last_update_time"
)
private
Date
productLastUpdateTime
;
private
Date
productLastUpdateTime
;
/**
/**
* 创建时间
* 创建时间
*/
*/
@TableField
(
"product_create_time"
)
private
Date
productCreateTime
;
private
Date
productCreateTime
;
/**
/**
* 区域
* 区域
*/
*/
@TableField
(
"product_region"
)
private
String
productRegion
;
private
String
productRegion
;
/**
/**
*
*
*/
*/
@TableField
(
"product_introduction_pic1"
)
private
String
productIntroductionPic1
;
private
String
productIntroductionPic1
;
/**
/**
* 套餐及资费
* 套餐及资费
*/
*/
@TableField
(
"product_meal_price"
)
private
String
productMealPrice
;
private
String
productMealPrice
;
/**
/**
* 资费介绍
* 资费介绍
*/
*/
@TableField
(
"product_set_meal_introduction"
)
private
String
productSetMealIntroduction
;
private
String
productSetMealIntroduction
;
/**
/**
* 了解产品
* 了解产品
*/
*/
@TableField
(
"product_introduction"
)
private
String
productIntroduction
;
private
String
productIntroduction
;
/**
/**
* 状态0正常,1下架
* 状态0正常,1下架
*/
*/
private
String
productState
=
"0"
;
@TableField
(
"product_state"
)
private
String
productState
;
/**
/**
* 适用学校
* 适用学校
*/
*/
@TableField
(
"product_university"
)
private
String
productUniversity
;
private
String
productUniversity
;
/**
/**
* 标识
* 标识
*/
*/
@TableField
(
"identifying"
)
private
String
identifying
;
private
String
identifying
;
/**
/**
* 融合资费介绍
* 融合资费介绍
*/
*/
@TableField
(
"product_rf2"
)
private
String
productRf2
;
private
String
productRf2
;
/**
/**
* 小白卡套餐id
* 小白卡套餐id
*/
*/
@TableField
(
"product_school_abbreviated"
)
private
String
productSchoolAbbreviated
;
private
String
productSchoolAbbreviated
;
/**
/**
* 资费
* 资费
*/
*/
@TableField
(
"product_price"
)
private
String
productPrice
;
private
String
productPrice
;
/**
/**
* 融合资费
* 融合资费
*/
*/
@TableField
(
"product_rh_Price"
)
private
String
productRhPrice
;
private
String
productRhPrice
;
/**
/**
* 宽带速率
* 宽带速率
*/
*/
@TableField
(
"product_meal"
)
private
String
productMeal
;
private
String
productMeal
;
/**
/**
* 包年包月情况
* 包年包月情况
*/
*/
@TableField
(
"product_rate"
)
private
String
productRate
;
private
String
productRate
;
/**
/**
* 融合包年包月情况
* 融合包年包月情况
*/
*/
@TableField
(
"product_rh_rate"
)
private
String
productRhRate
;
private
String
productRhRate
;
/**
/**
* 资费正则Id
* 资费正则Id
*/
*/
@TableField
(
"product_introduction_pic2"
)
private
String
productIntroductionPic2
;
private
String
productIntroductionPic2
;
@TableField
(
"product_introduction_pic3"
)
private
String
productIntroductionPic3
;
private
String
productIntroductionPic3
;
@TableField
(
"product_introduction_pic4"
)
private
String
productIntroductionPic4
;
private
String
productIntroductionPic4
;
@TableField
(
"product_introduction_pic5"
)
private
String
productIntroductionPic5
;
private
String
productIntroductionPic5
;
@TableField
(
"university_id"
)
private
int
universityId
;
private
int
universityId
;
/**
/**
* 是否显示融合时间
* 是否显示融合时间
*/
*/
@TableField
(
"show_rh_time"
)
private
String
showRhTime
;
private
String
showRhTime
;
}
}
common/src/main/java/com/winsun/bean/UniversityInfo.java
View file @
b0b4850c
package
com
.
winsun
.
bean
;
package
com
.
winsun
.
bean
;
import
com.baomidou.mybatisplus.annotations.TableField
;
import
com.baomidou.mybatisplus.annotations.TableId
;
import
com.baomidou.mybatisplus.annotations.TableId
;
import
com.baomidou.mybatisplus.annotations.TableName
;
import
com.baomidou.mybatisplus.annotations.TableName
;
import
com.baomidou.mybatisplus.enums.IdType
;
import
com.baomidou.mybatisplus.enums.IdType
;
...
@@ -21,108 +22,134 @@ public class UniversityInfo implements Serializable {
...
@@ -21,108 +22,134 @@ public class UniversityInfo implements Serializable {
@TableId
(
value
=
"university_id"
,
type
=
IdType
.
AUTO
)
@TableId
(
value
=
"university_id"
,
type
=
IdType
.
AUTO
)
private
int
universityId
;
private
int
universityId
;
/**
/**
* 学校名称
* 学校名称
*/
*/
@TableField
(
"university_name"
)
private
String
universityName
;
private
String
universityName
;
/**
/**
*所在区域
*所在区域
*/
*/
@TableField
(
"university_region"
)
private
String
universityRegion
;
private
String
universityRegion
;
/**
/**
*外线方式
*外线方式
*/
*/
@TableField
(
"university_exterior_lines"
)
private
String
universityExteriorLines
;
private
String
universityExteriorLines
;
/**
/**
*揽装工号
*揽装工号
*/
*/
@TableField
(
"university_package_number"
)
private
String
universityPackageNumber
;
private
String
universityPackageNumber
;
/**
/**
*创建人
*创建人
*/
*/
@TableField
(
"university_creater"
)
private
String
universityCreater
;
private
String
universityCreater
;
/**
/**
*创建时间
*创建时间
*/
*/
@TableField
(
"university_create_time"
)
private
Date
universityCreateTime
;
private
Date
universityCreateTime
;
/**
/**
*最后更新时间
*最后更新时间
*/
*/
@TableField
(
"university_last_update_time"
)
private
Date
universityLastUpdateTime
;
private
Date
universityLastUpdateTime
;
/**
/**
*装机地址
*装机地址
*/
*/
@TableField
(
"university_installed_address"
)
private
String
universityInstalledAddress
;
private
String
universityInstalledAddress
;
/**
/**
*允许上网终端类型
*允许上网终端类型
*/
*/
@TableField
(
"university_terminal_type"
)
private
String
universityTerminalType
;
private
String
universityTerminalType
;
/**
/**
*用户类别
*用户类别
*/
*/
@TableField
(
"university_user_category"
)
private
String
universityUserCategory
;
private
String
universityUserCategory
;
/**
/**
*用户类型
*用户类型
*/
*/
@TableField
(
"university_user_type"
)
private
String
universityUserType
;
private
String
universityUserType
;
/**
/**
*月租类型
*月租类型
*/
*/
@TableField
(
"university_monthly_rent_type"
)
private
String
universityMonthlyRentType
;
private
String
universityMonthlyRentType
;
/**
/**
*'计费属性'
*'计费属性'
*/
*/
@TableField
(
"university_charging_attribute"
)
private
String
universityChargingAttribute
;
private
String
universityChargingAttribute
;
/**
/**
*最大在线数
*最大在线数
*/
*/
@TableField
(
"university_online_number"
)
private
String
universityOnlineNumber
;
private
String
universityOnlineNumber
;
/**
/**
*一人一号多终端:0否 1是
*一人一号多终端:0否 1是
*/
*/
@TableField
(
"university_one_man_terminal"
)
private
String
universityOneManTerminal
;
private
String
universityOneManTerminal
;
/**
/**
*是否FTTH+HUB:0否 1是
*是否FTTH+HUB:0否 1是
*/
*/
@TableField
(
"university_is_ftth_hub"
)
private
String
universityIsFtthHub
;
private
String
universityIsFtthHub
;
/**
/**
*地址
*地址
*/
*/
@TableField
(
"university_installed_address_ID"
)
private
String
universityInstalledAddressId
;
private
String
universityInstalledAddressId
;
/**
/**
*学校联系号码
*学校联系号码
*/
*/
@TableField
(
"university_contact_phone"
)
private
String
universityContactPhone
;
private
String
universityContactPhone
;
/**
/**
*收费模式
*收费模式
*/
*/
@TableField
(
"university_charge_mode"
)
private
String
universityChargeMode
;
private
String
universityChargeMode
;
/**
/**
*
*
*/
*/
@TableField
(
"university_domain_name"
)
private
String
universityDomainName
;
private
String
universityDomainName
;
/**
/**
*对用户显示的融合套餐
*对用户显示的融合套餐
*/
*/
@TableField
(
"rh_package"
)
private
String
rhPackage
;
private
String
rhPackage
;
/**
/**
*融合资费
*融合资费
*/
*/
@TableField
(
"expenses"
)
private
String
expenses
;
private
String
expenses
;
/**
/**
*标识
*标识
*/
*/
@TableField
(
"identifying"
)
private
String
identifying
;
private
String
identifying
;
/**
/**
*融合办理,短信通知的提速的速率
*融合办理,短信通知的提速的速率
*/
*/
@TableField
(
"speed"
)
private
String
speed
;
private
String
speed
;
/**
/**
*公众号的名字
*公众号的名字
*/
*/
@TableField
(
"public_number"
)
private
String
publicNumber
;
private
String
publicNumber
;
}
}
common/src/main/java/com/winsun/constant/Constant.java
View file @
b0b4850c
...
@@ -27,6 +27,8 @@ public class Constant {
...
@@ -27,6 +27,8 @@ public class Constant {
/*支付参数*/
/*支付参数*/
public
final
static
String
CLIENTNUMBER
=
"xyzxyql"
;
//商户标识,由穗易付平台统一分配
public
final
static
String
CLIENTNUMBER
=
"xyzxyql"
;
//商户标识,由穗易付平台统一分配
public
final
static
String
APPK
=
"E805F0305C455BA7C5BAE3796C6500BD"
;
//KEY 商户标识,由穗易付平台统一分配
public
final
static
String
APPK
=
"E805F0305C455BA7C5BAE3796C6500BD"
;
//KEY 商户标识,由穗易付平台统一分配
public
final
static
String
KEY
=
"E805F0305C455BA7C5BAE3796C6500BD"
;
//商户标识,由穗易付平台统一分配
public
final
static
String
USERNAME
=
"apitest"
;
//智能平台提供测试的账号
public
final
static
String
USERNAME
=
"apitest"
;
//智能平台提供测试的账号
public
final
static
String
USERNAMEKEY
=
"46b97294d4dac3f62ee42f3ab2804f68"
;
//智能平台提供的测试key
public
final
static
String
USERNAMEKEY
=
"46b97294d4dac3f62ee42f3ab2804f68"
;
//智能平台提供的测试key
public
final
static
String
ZHENGSHIAUCCON
=
"ruany"
;
//智能平台提供的正式账号
public
final
static
String
ZHENGSHIAUCCON
=
"ruany"
;
//智能平台提供的正式账号
...
@@ -71,6 +73,7 @@ public class Constant {
...
@@ -71,6 +73,7 @@ public class Constant {
public
final
static
String
ROLE3
=
"3"
;
// 用户权限:1管理员 2测试人员 3工作人员 4学校人员
public
final
static
String
ROLE3
=
"3"
;
// 用户权限:1管理员 2测试人员 3工作人员 4学校人员
public
final
static
String
ROLE4
=
"4"
;
// 用户权限:1管理员 2测试人员 3工作人员 4学校人员
public
final
static
String
ROLE4
=
"4"
;
// 用户权限:1管理员 2测试人员 3工作人员 4学校人员
/** 信任任何站点 */
/** 信任任何站点 */
public
static
void
trustEveryone
()
{
public
static
void
trustEveryone
()
{
try
{
try
{
...
@@ -101,4 +104,5 @@ public class Constant {
...
@@ -101,4 +104,5 @@ public class Constant {
e
.
printStackTrace
();
e
.
printStackTrace
();
}
}
}
}
}
}
common/src/main/java/com/winsun/mapper/HhrUserMapper.java
View file @
b0b4850c
...
@@ -2,6 +2,8 @@ package com.winsun.mapper;
...
@@ -2,6 +2,8 @@ package com.winsun.mapper;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
import
org.apache.ibatis.annotations.Param
;
import
org.apache.ibatis.annotations.Select
;
import
org.apache.ibatis.annotations.Param
;
import
org.springframework.stereotype.Component
;
import
org.springframework.stereotype.Component
;
import
com.baomidou.mybatisplus.mapper.BaseMapper
;
import
com.baomidou.mybatisplus.mapper.BaseMapper
;
...
@@ -16,6 +18,20 @@ import java.util.Map;
...
@@ -16,6 +18,20 @@ import java.util.Map;
@Mapper
@Mapper
@Component
@Component
public
interface
HhrUserMapper
extends
BaseMapper
<
HhrUser
>
{
public
interface
HhrUserMapper
extends
BaseMapper
<
HhrUser
>
{
@Select
(
"select u.area ,u.name ,u.school,u.phone_num "
+
"from hhr_user u "
+
"left join hhr_user_school us on u.id = us.user_id "
+
"where u.id=#{partner}"
)
List
<
Map
<
String
,
Object
>>
findPartnerById2
(
@Param
(
"partner"
)
String
partner
);
@Select
(
"select uuu.name ddname,sch.lzgh "
+
"from hhr_user u "
+
"left join hhr_user_school us on u.id = us.user_id "
+
"left join hhr_school sch on sch.id = us.school_id "
+
"left join hhr_supervisor_school ss on us.school_id = ss.school "
+
"left join hhr_user uuu on uuu.id = ss.user_id "
+
"where u.id=#{partner}"
)
List
<
Map
<
String
,
Object
>>
findSupervisorByPartnerId
(
@Param
(
"partner"
)
String
partner
);
/**
/**
* 统计所有订单数
* 统计所有订单数
...
...
common/src/main/java/com/winsun/mapper/OrderViewMapper.java
View file @
b0b4850c
...
@@ -33,4 +33,13 @@ public interface OrderViewMapper extends BaseMapper<OrderView> {
...
@@ -33,4 +33,13 @@ public interface OrderViewMapper extends BaseMapper<OrderView> {
@Insert
(
"insert into`hhr_order_history`(order_id, status, create_date) values(#{id}, #{status}, #{createTime})"
)
@Insert
(
"insert into`hhr_order_history`(order_id, status, create_date) values(#{id}, #{status}, #{createTime})"
)
int
insertOrderHistory
(
@Param
(
"id"
)
String
id
,
@Param
(
"status"
)
String
status
,
@Param
(
"createTime"
)
Timestamp
createTime
);
int
insertOrderHistory
(
@Param
(
"id"
)
String
id
,
@Param
(
"status"
)
String
status
,
@Param
(
"createTime"
)
Timestamp
createTime
);
@Select
(
"select * from order_view where orderSeq = #{orderSeq}"
)
Map
<
String
,
Object
>
queryorderSeq
(
@Param
(
"orderSeq"
)
String
orderSeq
);
@Update
(
"update hhr_order set rh_time = #{rhTime} where orderSeq=#{orderSeq}"
)
int
updatePayRhTime
(
@Param
(
"rhTime"
)
String
rhTime
,
@Param
(
"orderSeq"
)
String
orderSeq
);
@Select
(
"select * from order_view where orderNumber=#{orderNumber} and status !=#{status} "
)
List
<
Map
<
String
,
Object
>>
orderViewToStatusList
(
@Param
(
"orderNumber"
)
String
orderNumber
,
@Param
(
"status"
)
String
status
);
}
}
common/src/main/java/com/winsun/mapper/ProductMapper.java
View file @
b0b4850c
...
@@ -4,11 +4,26 @@ import com.baomidou.mybatisplus.mapper.BaseMapper;
...
@@ -4,11 +4,26 @@ import com.baomidou.mybatisplus.mapper.BaseMapper;
import
com.winsun.bean.Package
;
import
com.winsun.bean.Package
;
import
com.winsun.bean.Product
;
import
com.winsun.bean.Product
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
import
org.apache.ibatis.annotations.Select
;
import
org.springframework.stereotype.Component
;
import
org.springframework.stereotype.Component
;
import
java.util.List
;
import
java.util.Map
;
@Mapper
@Mapper
@Component
@Component
public
interface
ProductMapper
extends
BaseMapper
<
Product
>
{
public
interface
ProductMapper
extends
BaseMapper
<
Product
>
{
@Select
(
"SELECT * FROM `product_manage` WHERE product_id = (SELECT b.`bandproduct_id` FROM hhr_user_school a LEFT JOIN hhr_school b ON a.`school_id`=b.`id` WHERE a.user_id=#{partner})"
)
List
<
Map
<
String
,
Object
>>
findMoreUniversity
(
@Param
(
"partner"
)
String
partner
);
@Select
(
" SELECT pm.product_university as universityName,pm.product_region as productRegion,"
+
" pm.product_title productName "
+
" FROM hhr_user u "
+
" LEFT JOIN hhr_user_school us ON u.`id`=us.`user_id`"
+
" LEFT JOIN hhr_school s ON us.`school_id`=s.`id` "
+
" LEFT JOIN product_manage pm ON s.bandproduct_id=pm.product_id"
+
" WHERE u.`id`= #{id}"
)
List
<
Map
<
String
,
Object
>>
queryProductById
(
@Param
(
"id"
)
String
id
);
}
}
common/src/main/java/com/winsun/mapper/SchoolMapper.java
View file @
b0b4850c
...
@@ -50,4 +50,10 @@ public interface SchoolMapper extends BaseMapper<School> {
...
@@ -50,4 +50,10 @@ public interface SchoolMapper extends BaseMapper<School> {
@Delete
(
"delete from hhr_supervisor_school where user_id = #{userId}"
)
@Delete
(
"delete from hhr_supervisor_school where user_id = #{userId}"
)
int
deleteSupervisorSchoolByUserId
(
@Param
(
"userId"
)
String
userId
);
int
deleteSupervisorSchoolByUserId
(
@Param
(
"userId"
)
String
userId
);
@Select
(
"SELECT s.* FROM hhr_user u"
+
" LEFT JOIN hhr_user_school us ON u.`id`=us.`user_id`"
+
" LEFT JOIN hhr_school s ON s.`id`=us.`school_id`"
+
" WHERE u.id=#{id}"
)
Map
<
String
,
Object
>
querySchoolById
(
@Param
(
"id"
)
String
id
);
}
}
common/src/main/java/com/winsun/mapper/UniversityInfoMapper.java
View file @
b0b4850c
...
@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.plugins.Page;
...
@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.plugins.Page;
import
com.winsun.bean.UniversityInfo
;
import
com.winsun.bean.UniversityInfo
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
import
org.apache.ibatis.annotations.Param
;
import
org.apache.ibatis.annotations.Select
;
import
org.springframework.stereotype.Component
;
import
org.springframework.stereotype.Component
;
import
java.util.List
;
import
java.util.List
;
...
...
common/src/main/java/com/winsun/utils/Base64ToImgUtils.java
0 → 100644
View file @
b0b4850c
package
com
.
winsun
.
utils
;
import
java.io.File
;
import
java.io.FileOutputStream
;
import
java.io.IOException
;
import
java.text.SimpleDateFormat
;
import
java.util.Date
;
import
java.util.UUID
;
/**
* Base64流转图片工具类
* @author calvin
*/
public
class
Base64ToImgUtils
{
public
static
String
base64ToImg
(
String
imgData
,
String
hhr_img
)
throws
IOException
{
String
filePath
=
""
;
String
uuid
=
UUID
.
randomUUID
().
toString
().
replaceAll
(
"-"
,
""
);
uuid
=
uuid
.
substring
(
1
,
12
);
SimpleDateFormat
sd
=
new
SimpleDateFormat
(
"yyyyMMdd"
);
SimpleDateFormat
sd2
=
new
SimpleDateFormat
(
"yyyyMM"
);
String
orderNumber
=
"YRYM"
+
sd
.
format
(
new
Date
())
+
uuid
;
Date
date
=
new
Date
();
String
createdate
=
sd2
.
format
(
date
);
File
file
=
new
File
(
hhr_img
+
"/"
+
createdate
+
"/"
+
sd
.
format
(
date
)
+
"/"
+
orderNumber
);
if
(!
file
.
exists
()
&&
!
file
.
isDirectory
())
{
file
.
mkdirs
();
}
if
(!
imgData
.
isEmpty
())
{
String
name
=
orderNumber
;
String
base64Data
=
imgData
.
split
(
","
)[
1
];
String
houzhui
=
imgData
.
split
(
","
)[
0
].
split
(
"/"
)[
1
].
split
(
";"
)[
0
];
/**
* 2.解码成字节数组
*/
filePath
=
hhr_img
+
"/"
+
createdate
+
"/"
+
sd
.
format
(
date
)
+
"/"
+
orderNumber
+
"/"
+
"O"
+
name
+
"."
+
houzhui
;
java
.
util
.
Base64
.
Decoder
decoder
=
java
.
util
.
Base64
.
getDecoder
();
byte
[]
bytes
=
decoder
.
decode
(
base64Data
);
FileOutputStream
fos
=
null
;
try
{
fos
=
new
FileOutputStream
(
filePath
);
fos
.
write
(
bytes
);
}
catch
(
IOException
e
)
{
e
.
printStackTrace
();
}
finally
{
if
(
fos
!=
null
){
try
{
fos
.
close
();
}
catch
(
IOException
e
)
{
e
.
printStackTrace
();
}
}
}
}
return
filePath
;
}
}
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