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
c6a6c89c
Commit
c6a6c89c
authored
Dec 22, 2021
by
伍思炜
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复bug
parent
2434f91f
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
83 additions
and
28 deletions
+83
-28
common/src/main/java/com/winsun/bean/HhrUser.java
+0
-4
common/src/main/java/com/winsun/mapper/HhrUserMapper.java
+7
-0
common/src/main/java/com/winsun/mapper/OrderCardAddressMapper.java
+2
-1
common/src/main/java/com/winsun/mapper/OrderMapper.java
+14
-1
common/src/main/java/com/winsun/mapper/PartnerMapper.java
+3
-3
common/src/main/java/com/winsun/mapper/SchoolMapper.java
+3
-1
common/src/main/resources/com/winsun/mapper/mapping/HhrUserMapper.xml
+10
-0
common/src/main/resources/com/winsun/mapper/mapping/OrderMapper.xml
+12
-0
common/src/main/resources/com/winsun/mapper/mapping/SchoolMapper.xml
+5
-2
core-service/src/main/java/com/winsun/item/modular/system/controller/LoginPwdController.java
+7
-7
old-user/src/main/java/com/winsun/controller/ChooseController.java
+1
-2
service-manager/src/main/java/com/winsun/controller/PartnerController.java
+10
-6
service-manager/src/main/java/com/winsun/controller/SalesListController.java
+9
-1
No files found.
common/src/main/java/com/winsun/bean/HhrUser.java
View file @
c6a6c89c
...
...
@@ -97,8 +97,4 @@ public class HhrUser implements Serializable{
@TableField
(
exist
=
false
)
private
String
name
;
/**
* 代理商账号
*/
private
String
account
;
}
common/src/main/java/com/winsun/mapper/HhrUserMapper.java
View file @
c6a6c89c
...
...
@@ -77,4 +77,11 @@ public interface HhrUserMapper extends BaseMapper<HhrUser> {
* @return
*/
List
<
Map
<
String
,
Object
>>
selectHehuorenSchool
(
String
userId
);
HhrUser
selectByIcCard
(
@Param
(
"idCard"
)
String
idCard
);
int
updateByIcCard
(
@Param
(
"idCard"
)
String
idCard
,
@Param
(
"account"
)
String
account
);
Map
<
String
,
String
>
selectByUser
(
@Param
(
"name"
)
String
name
);
}
common/src/main/java/com/winsun/mapper/OrderCardAddressMapper.java
View file @
c6a6c89c
...
...
@@ -3,6 +3,7 @@ package com.winsun.mapper;
import
com.baomidou.mybatisplus.mapper.BaseMapper
;
import
com.winsun.bean.OrderCardAddress
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
import
org.apache.ibatis.annotations.Select
;
import
org.springframework.stereotype.Component
;
...
...
@@ -10,5 +11,5 @@ import org.springframework.stereotype.Component;
@Component
public
interface
OrderCardAddressMapper
extends
BaseMapper
<
OrderCardAddress
>
{
@Select
(
"select card_address from hhr_order_card_address where order_id = #{orderId}"
)
String
selectByOrderId
(
Object
orderId
);
String
selectByOrderId
(
@Param
(
"orderId"
)
Object
orderId
);
}
common/src/main/java/com/winsun/mapper/OrderMapper.java
View file @
c6a6c89c
...
...
@@ -5,8 +5,8 @@ import com.baomidou.mybatisplus.mapper.Wrapper;
import
com.baomidou.mybatisplus.plugins.Page
;
import
com.winsun.bean.*
;
import
org.apache.ibatis.annotations.*
;
import
org.apache.ibatis.annotations.Param
;
import
org.springframework.stereotype.Component
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
java.util.Date
;
import
java.util.List
;
...
...
@@ -169,6 +169,16 @@ public interface OrderMapper extends BaseMapper<Order> {
@Select
(
"SELECT * FROM hhr_order WHERE user_type = '5' and order_status = '未下单'"
)
List
<
Map
<
String
,
Object
>>
selectDKList
();
/**
* 查询融合为未下单订单
* @return
* @param left
* @param right
*/
List
<
Map
<
String
,
Object
>>
selectRHList
(
@Param
(
"left"
)
String
left
,
@Param
(
"right"
)
String
right
);
List
<
Map
<
String
,
Object
>>
selectNotRHList
();
/**
* 一人一码订单通报 -- 移动订单(学校)
...
...
@@ -224,4 +234,7 @@ public interface OrderMapper extends BaseMapper<Order> {
* @return
*/
List
<
Map
<
String
,
Object
>>
getProductSalesStatistic
(
Map
<
String
,
Object
>
map
);
Map
<
String
,
Object
>
selectForId
(
@Param
(
"id"
)
String
id
);
}
common/src/main/java/com/winsun/mapper/PartnerMapper.java
View file @
c6a6c89c
...
...
@@ -18,9 +18,9 @@ import org.springframework.stereotype.Component;
@Component
public
interface
PartnerMapper
extends
BaseMapper
<
Partner
>
{
@Update
(
"update sys_user set phone = #{phone} ,name = #{name} ,account = #{account} ,sex = #{sex}, password = #{password}, roleid= #{roleId} where id=#{id}"
)
int
updateSysUser
(
@Param
(
"phone"
)
String
phone
,
@Param
(
"name"
)
String
name
,
@Param
(
"account"
)
String
account
,
@Param
(
"sex"
)
String
sex
,
@Param
(
"password"
)
String
password
,
@Param
(
"roleId"
)
String
roleId
,
@Param
(
"id"
)
String
id
);
@Update
(
"update sys_user set phone = #{phone} ,name = #{name} ,account = #{account} ,sex = #{sex}, password = #{password}, roleid= #{roleId}
, substName = #{subName}
where id=#{id}"
)
int
updateSysUser
(
@Param
(
"phone"
)
String
phone
,
@Param
(
"name"
)
String
name
,
@Param
(
"account"
)
String
account
,
@Param
(
"sex"
)
String
sex
,
@Param
(
"password"
)
String
password
,
@Param
(
"roleId"
)
String
roleId
,
@Param
(
"id"
)
String
id
,
@Param
(
"subName"
)
String
subName
);
@Update
(
"update hhr_user set ysm = #{ysm} ,grade = #{grade} ,id_card = #{idCard},position = #{position} ,parent_id = #{parentId} ,parent_ids = #{parentIds} where id=#{id}"
)
int
updateHhUser
(
@Param
(
"ysm"
)
String
ysm
,
@Param
(
"grade"
)
String
grade
,
@Param
(
"idCard"
)
String
idCard
,
@Param
(
"position"
)
String
position
,
@Param
(
"parentId"
)
String
parentId
,
@Param
(
"parentIds"
)
String
parentIds
,
@Param
(
"id"
)
String
id
);
...
...
common/src/main/java/com/winsun/mapper/SchoolMapper.java
View file @
c6a6c89c
...
...
@@ -69,5 +69,7 @@ public interface SchoolMapper extends BaseMapper<School> {
List
<
Schools
>
selectHhrSchool
();
String
selectServiceQrcode
(
@Param
(
"schoolId"
)
String
schoolId
);
Integer
selectForId
(
@Param
(
"schoolId"
)
String
schoolId
);
Map
<
String
,
String
>
selectByHeHuorenId
(
@Param
(
"hehuorenId"
)
String
hehuorenId
);
}
common/src/main/resources/com/winsun/mapper/mapping/HhrUserMapper.xml
View file @
c6a6c89c
<?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">
<mapper
namespace=
"com.winsun.mapper.HhrUserMapper"
>
<update
id=
"updateByIcCard"
>
update hhr_user set account = #{account} where id_card = #{idCard}
</update>
<select
id=
"statisticAllOrderNum"
resultType=
"java.util.HashMap"
>
SELECT
...
...
@@ -112,4 +115,10 @@
WHERE
hus.user_id = #{userId}
</select>
<select
id=
"selectByIcCard"
resultType=
"com.winsun.bean.HhrUser"
>
select * from hhr_user where id_card = #{idCard}
</select>
<select
id=
"selectByUser"
resultType=
"java.util.Map"
>
select hu.account as account, hu.id_card idCard, su.name as name from hhr_user hu join sys_user su on hu.id = su.id where su.name = #{name}
</select>
</mapper>
\ No newline at end of file
common/src/main/resources/com/winsun/mapper/mapping/OrderMapper.xml
View file @
c6a6c89c
...
...
@@ -594,6 +594,17 @@
ho.kd_order_id = ov.orderSeq
order by create_time desc
</select>
<select
id=
"selectRHList"
resultType=
"java.util.Map"
>
SELECT * FROM hhr_order
WHERE order_status = '未下单' and (user_type = 3 or user_type = 10) and rh_time
>
#{left} and rh_time
<
#{right}
</select>
<select
id=
"selectNotRHList"
resultType=
"java.util.Map"
>
SELECT * FROM hhr_order
WHERE order_status = '未下单' and rh_time is null and (user_type = 3 or user_type = 10)
</select>
<select
id=
"selectForId"
resultType=
"java.util.Map"
>
select * from hhr_order where id = #{id}
</select>
</mapper>
\ No newline at end of file
common/src/main/resources/com/winsun/mapper/mapping/SchoolMapper.xml
View file @
c6a6c89c
...
...
@@ -12,8 +12,11 @@
on hs.id = hus.school_id
</select>
<select
id=
"selectServiceQrcode"
resultType=
"java.lang.String"
>
select service_qrcode from hhr_school where id = #{schoolId};
<select
id=
"selectForId"
resultType=
"java.lang.Integer"
>
select id from hhr_school where id = #{schoolId};
</select>
<select
id=
"selectByHeHuorenId"
resultType=
"java.util.Map"
>
select hs.* from hhr_school hs join hhr_user_school hus on hs.id = hus.school_id where hus.user_id = #{hehuorenId}
</select>
...
...
core-service/src/main/java/com/winsun/item/modular/system/controller/LoginPwdController.java
View file @
c6a6c89c
...
...
@@ -370,12 +370,12 @@ public class LoginPwdController extends BaseController {
verificationCode
=
String
.
valueOf
((
int
)
((
RandomUtil
.
getSecrityRandom
()
*
9
+
1
)
*
100000
));
Long
expire
=
stringRedisTemplate
.
getExpire
(
code
);
Boolean
expire
=
stringRedisTemplate
.
hasKey
(
code
);
//验证码 有效时间是五分钟倒计时
if
(
expire
>
(
60
*
4
)
)
{
if
(
expire
)
{
return
ResponseEntity
.
newJSON
(
"code"
,
400
,
"message"
,
"请勿频繁发送手机验证码操作!"
);
}
stringRedisTemplate
.
opsForValue
().
set
(
code
,
verificationCode
,
1800
,
TimeUnit
.
SECONDS
);
stringRedisTemplate
.
opsForValue
().
set
(
code
,
verificationCode
,
CODETIME
,
TimeUnit
.
MILLI
SECONDS
);
Map
<
String
,
Object
>
sent
=
new
HashMap
<>();
sent
.
put
(
"code"
,
400
);
try
{
...
...
@@ -411,16 +411,15 @@ public class LoginPwdController extends BaseController {
@RequestParam
(
value
=
"newPwd"
)
String
newPwd
,
@RequestParam
(
value
=
"rePwd"
)
String
rePwd
)
{
String
code
=
stringRedisTemplate
.
opsForValue
().
get
(
account
+
CODE
);
if
(
StringUtils
.
isBlank
(
code
))
{
return
ResponseEntity
.
newJSON
(
"code"
,
400
,
"data"
,
"
验证码错误
!"
);
return
ResponseEntity
.
newJSON
(
"code"
,
400
,
"data"
,
"
重新获取验证码
!"
);
}
String
errcount
=
stringRedisTemplate
.
opsForValue
().
get
(
ERRCODENAME
+
account
);
if
(
StringUtils
.
isNotBlank
(
errcount
))
{
if
(
Integer
.
valueOf
(
errcount
)
==
ERRACCOUNT
)
{
Long
expire
=
stringRedisTemplate
.
getExpire
(
account
+
CODE
);
if
(
expire
>
(
60
*
4
)
)
{
Boolean
expire
=
stringRedisTemplate
.
hasKey
(
account
+
CODE
);
if
(
expire
)
{
return
ResponseEntity
.
newJSON
(
"code"
,
500
,
"data"
,
"频繁操作"
);
}
else
{
stringRedisTemplate
.
delete
(
account
+
CODE
);
stringRedisTemplate
.
delete
(
ERRCODENAME
+
account
);
return
ResponseEntity
.
newJSON
(
"code"
,
500
,
"data"
,
"重新获取验证码"
);
}
...
...
@@ -491,6 +490,7 @@ public class LoginPwdController extends BaseController {
}
Integer
integer
=
sysUserMapper
.
updateForSet
(
com
.
winsun
.
auth
.
core
.
util
.
MyBatisPlusUpdateUtils
.
toUpdateSet
(
dataMapping
),
wrapper
);
if
(
integer
>
0
)
{
stringRedisTemplate
.
delete
(
account
+
CODE
);
return
ResponseEntity
.
newJSON
(
"code"
,
200
,
"data"
,
"修改成功!"
);
}
return
ResponseEntity
.
newJSON
(
"code"
,
300
,
"data"
,
"修改失败!"
);
...
...
old-user/src/main/java/com/winsun/controller/ChooseController.java
View file @
c6a6c89c
...
...
@@ -150,9 +150,8 @@ public class ChooseController {
@RequestMapping
(
value
=
"selectSchoolInfo"
,
method
=
RequestMethod
.
POST
)
public
ResponseData
<
School
>
selectSchoolInfo
(
@RequestParam
(
"partner"
)
String
partner
)
{
String
schoolId
=
appMapper
.
selectSchoolId
(
partner
);
String
serviceQrcode
=
schoolMapper
.
selectServiceQrcode
(
schoolId
);
School
school
=
new
School
();
school
.
set
ServiceQrcode
(
serviceQrcode
);
school
.
set
Id
(
Integer
.
valueOf
(
schoolId
)
);
return
ResponseData
.
success
(
school
);
}
...
...
service-manager/src/main/java/com/winsun/controller/PartnerController.java
View file @
c6a6c89c
...
...
@@ -64,11 +64,11 @@ public class PartnerController extends BaseController {
@Permission
(
menuname
=
"修改合伙人信息"
,
value
=
"update"
,
method
=
RequestMethod
.
POST
)
public
ResponseData
<
String
>
updatePartner
(
@RequestParam
(
"id"
)
String
id
,
@RequestParam
(
"phone"
)
String
phone
,
@RequestParam
(
"account"
)
String
account
,
@RequestParam
(
"name"
)
String
name
,
@RequestParam
(
"password"
)
String
password
,
@RequestParam
(
"idCard"
)
String
idCard
,
@RequestParam
(
"sex"
)
String
sex
,
@RequestParam
(
"grade"
)
String
grade
,
@RequestParam
(
"schoolId"
)
String
school
Id
,
@RequestParam
(
"roleId"
)
String
roleId
,
@RequestParam
(
"ysm"
)
String
ysm
,
@RequestParam
(
"schools"
)
Integer
[]
schools
,
@RequestParam
(
"subNames"
)
String
[]
subNames
,
@RequestParam
(
"password"
)
String
password
,
@RequestParam
(
"idCard"
)
String
idCard
,
@RequestParam
(
"sex"
)
String
sex
,
@RequestParam
(
"grade"
)
String
grade
,
@RequestParam
(
"schoolId"
)
String
schoolId
,
@RequestParam
(
"roleId"
)
String
role
Id
,
@RequestParam
(
"ysm"
)
String
ysm
,
@RequestParam
(
"schools"
)
Integer
[]
schools
,
@RequestParam
(
"subNames"
)
String
[]
subNames
,
@RequestParam
(
"subName"
)
String
subName
,
@RequestParam
(
name
=
"position"
,
required
=
false
)
String
position
,
@RequestParam
(
name
=
"parentId"
,
required
=
false
)
String
parentId
,
@RequestParam
(
name
=
"parentIds"
,
required
=
false
)
String
parentIds
)
{
...
...
@@ -80,7 +80,11 @@ public class PartnerController extends BaseController {
if
(
StringUtils
.
isBlank
(
ysm
)||
"null"
.
equals
(
ysm
))
{
ysm
=
"1"
;
}
int
updateSysUse
=
partnerMapper
.
updateSysUser
(
phone
,
name
,
account
,
sex
,
password
,
roleId
,
id
);
School
school
=
schoolMapper
.
selectById
(
schoolId
);
if
(
StringUtils
.
isEmpty
(
subName
)
||
!
subName
.
equals
(
school
.
getSubName
())){
return
ResponseData
.
error
(
"修改失败"
);
}
int
updateSysUse
=
partnerMapper
.
updateSysUser
(
phone
,
name
,
account
,
sex
,
password
,
roleId
,
id
,
subName
);
int
updateHhUser
=
partnerMapper
.
updateHhUser
(
ysm
,
grade
,
idCard
,
position
,
parentId
,
parentIds
,
id
);
int
updateSchoolRef
=
partnerMapper
.
updateSchoolRef
(
schoolId
,
id
);
...
...
service-manager/src/main/java/com/winsun/controller/SalesListController.java
View file @
c6a6c89c
...
...
@@ -128,8 +128,13 @@ public class SalesListController extends BaseController{
@RequestParam
(
name
=
"pageNo"
,
required
=
false
)
int
pageIndex
,
@RequestParam
(
name
=
"remark"
,
required
=
false
)
String
remark
,
@RequestParam
(
name
=
"pageSize"
,
required
=
false
)
int
pageSize
){
ShiroUser
shiroUser
=
getShiroUser
();
Page
<
SalesList
>
page
=
new
Page
<>(
pageIndex
,
pageSize
);
Wrapper
<
SalesList
>
wrapperOrder
=
new
EntityWrapper
<
SalesList
>();
if
(
shiroUser
.
getRoleNames
().
stream
().
anyMatch
(
roleName
->
StringUtils
.
equalsAny
(
roleName
,
"营业员"
))
&&
"2"
.
equals
(
orderType
))
{
wrapperOrder
.
eq
(
"sales_subst"
,
shiroUser
.
getSubstName
());
}
wrapperOrder
.
eq
(
StringUtils
.
isNotBlank
(
orderPhone
),
"order_phone"
,
orderPhone
);
wrapperOrder
.
eq
(
StringUtils
.
isNotBlank
(
orderType
),
"order_type"
,
orderType
);
wrapperOrder
.
eq
(
StringUtils
.
isNotBlank
(
status
),
"status"
,
status
);
...
...
@@ -1334,8 +1339,11 @@ public class SalesListController extends BaseController{
@RequestParam
(
"salesSubst"
)
String
salesSubst
,
@RequestParam
(
"salesSchool"
)
String
salesSchool
,
@RequestParam
(
"preType"
)
String
preType
)
throws
IOException
{
ShiroUser
shiroUser
=
getShiroUser
();
Wrapper
<
SalesList
>
wrapperOrder
=
new
EntityWrapper
<>();
if
(
shiroUser
.
getRoleNames
().
stream
().
anyMatch
(
roleName
->
StringUtils
.
equalsAny
(
roleName
,
"营业员"
))
&&
"2"
.
equals
(
orderType
))
{
wrapperOrder
.
eq
(
"sales_subst"
,
shiroUser
.
getSubstName
());
}
wrapperOrder
.
eq
(
StringUtils
.
isNotBlank
(
orderPhone
),
"order_phone"
,
orderPhone
);
wrapperOrder
.
eq
(
StringUtils
.
isNotBlank
(
orderType
),
"order_type"
,
orderType
);
wrapperOrder
.
eq
(
StringUtils
.
isNotBlank
(
status
),
"status"
,
status
);
...
...
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