Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
wangming
/
kzy-wx
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 2fd8df77
authored
Mar 17, 2020
by
刘志强
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch '105' of
http://gdm.yxvzb.com:50275//wangming/kzy-wx
2 parents
f48fbcca
d401c1fc
Show whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
150 additions
and
47 deletions
src/main/java/com/server/Application.java
src/main/java/com/server/common/configure/ConfigRedisSession.java
src/main/java/com/server/web/common/mapping/InformationMapper.java
src/main/java/com/server/web/common/mapping/IntegralMapper.java
src/main/java/com/server/web/common/service/Impl/InformationServiceImpl.java
src/main/java/com/server/web/common/service/Impl/TKzyCourseServiceImpl.java
src/main/java/com/server/web/common/service/Impl/UserServiceImpl.java
src/main/java/com/server/web/controller/UserController.java
src/main/resources/mybatis/mapping/CommentMapper.xml
src/main/resources/mybatis/mapping/CourseMapper.xml
src/main/resources/mybatis/mapping/IntegralMapper.xml
src/main/resources/mybatis/mapping/informationMapper.xml
src/main/resources/servers/105/application.properties
src/main/resources/servers/local/application.properties
src/main/java/com/server/Application.java
View file @
2fd8df7
...
@@ -3,7 +3,10 @@ package com.server;
...
@@ -3,7 +3,10 @@ package com.server;
import
org.mybatis.spring.annotation.MapperScan
;
import
org.mybatis.spring.annotation.MapperScan
;
import
org.springframework.boot.SpringApplication
;
import
org.springframework.boot.SpringApplication
;
import
org.springframework.boot.autoconfigure.SpringBootApplication
;
import
org.springframework.boot.autoconfigure.SpringBootApplication
;
import
org.springframework.boot.context.embedded.ConfigurableEmbeddedServletContainer
;
import
org.springframework.boot.context.embedded.EmbeddedServletContainerCustomizer
;
import
org.springframework.boot.web.servlet.ServletComponentScan
;
import
org.springframework.boot.web.servlet.ServletComponentScan
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.transaction.annotation.EnableTransactionManagement
;
import
org.springframework.transaction.annotation.EnableTransactionManagement
;
@SpringBootApplication
@SpringBootApplication
...
@@ -16,4 +19,13 @@ public class Application {
...
@@ -16,4 +19,13 @@ public class Application {
SpringApplication
application
=
new
SpringApplication
(
Application
.
class
);
SpringApplication
application
=
new
SpringApplication
(
Application
.
class
);
application
.
run
(
args
);
application
.
run
(
args
);
}
}
@Bean
public
EmbeddedServletContainerCustomizer
containerCustomizer
(){
return
new
EmbeddedServletContainerCustomizer
()
{
@Override
public
void
customize
(
ConfigurableEmbeddedServletContainer
container
)
{
container
.
setSessionTimeout
(
1800
);
//单位为S
}
};
}
}
}
src/main/java/com/server/common/configure/ConfigRedisSession.java
View file @
2fd8df7
...
@@ -10,6 +10,6 @@ import org.springframework.session.data.redis.config.annotation.web.http.EnableR
...
@@ -10,6 +10,6 @@ import org.springframework.session.data.redis.config.annotation.web.http.EnableR
@Configuration
@Configuration
@EnableRedisHttpSession
(
maxInactiveIntervalInSeconds
=
18
00
,
redisNamespace
=
"kzy_wx"
)
@EnableRedisHttpSession
(
maxInactiveIntervalInSeconds
=
864
00
,
redisNamespace
=
"kzy_wx"
)
public
class
ConfigRedisSession
{
public
class
ConfigRedisSession
{
}
}
\ No newline at end of file
src/main/java/com/server/web/common/mapping/InformationMapper.java
View file @
2fd8df7
...
@@ -11,7 +11,11 @@ import java.util.Map;
...
@@ -11,7 +11,11 @@ import java.util.Map;
public
interface
InformationMapper
{
public
interface
InformationMapper
{
List
<
Map
<
String
,
Object
>>
categoryDetail
(
@Param
(
"firstId"
)
Long
id
);
List
<
Map
<
String
,
Object
>>
categoryDetail
(
@Param
(
"firstId"
)
Long
id
);
List
<
Map
<
String
,
Object
>>
secondClassDetailInformation
(
Map
<
String
,
Object
>
param
);
List
<
Map
<
String
,
Object
>>
secondClassDetailInformation
(
Map
<
String
,
Object
>
param
);
List
<
Map
<
String
,
Object
>>
secondClassDetailCourse
(
Map
<
String
,
Object
>
param
);
Integer
secondClassDetailInformationTotal
(
Map
<
String
,
Object
>
param
);
List
<
Map
<
String
,
Object
>>
secondClassDetailCourse
(
Map
<
String
,
Object
>
param
);
Integer
secondClassDetailCourseTotal
(
Map
<
String
,
Object
>
param
);
}
}
src/main/java/com/server/web/common/mapping/IntegralMapper.java
View file @
2fd8df7
...
@@ -9,5 +9,5 @@ import java.util.Map;
...
@@ -9,5 +9,5 @@ import java.util.Map;
public
interface
IntegralMapper
{
public
interface
IntegralMapper
{
List
<
Map
<
String
,
Object
>>
signInList
(
Map
<
String
,
Object
>
param
);
List
<
Map
<
String
,
Object
>>
signInList
(
Map
<
String
,
Object
>
param
);
Map
<
String
,
Object
>
query
Tod
aySign
(
Map
<
String
,
Object
>
param2
);
Map
<
String
,
Object
>
query
D
aySign
(
Map
<
String
,
Object
>
param2
);
}
}
src/main/java/com/server/web/common/service/Impl/InformationServiceImpl.java
View file @
2fd8df7
package
com
.
server
.
web
.
common
.
service
.
Impl
;
package
com
.
server
.
web
.
common
.
service
.
Impl
;
import
com.server.web.common.mapper.TBaseFirstClassMapper
;
import
com.server.web.common.mapper.TBaseSecondClassMapper
;
import
com.server.web.common.mapper.TBaseSecondClassMapper
;
import
com.server.web.common.mapper.TKzyCommentMapper
;
import
com.server.web.common.mapper.TKzyCommentMapper
;
import
com.server.web.common.mapper.TKzyInformationMapper
;
import
com.server.web.common.mapper.TKzyInformationMapper
;
import
com.server.web.common.mapping.CommentMapper
;
import
com.server.web.common.mapping.CommentMapper
;
import
com.server.web.common.mapping.InformationMapper
;
import
com.server.web.common.mapping.InformationMapper
;
import
com.server.web.common.model.TBaseSecondClass
;
import
com.server.web.common.model.*
;
import
com.server.web.common.model.TBaseSecondClassExample
;
import
com.server.web.common.model.TKzyComment
;
import
com.server.web.common.model.TKzyInformation
;
import
com.server.web.common.service.InformationService
;
import
com.server.web.common.service.InformationService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
...
@@ -35,13 +33,19 @@ public class InformationServiceImpl implements InformationService {
...
@@ -35,13 +33,19 @@ public class InformationServiceImpl implements InformationService {
private
CommentMapper
commentMapper
;
private
CommentMapper
commentMapper
;
@Autowired
@Autowired
private
TKzyCommentMapper
tKzyCommentMapper
;
private
TKzyCommentMapper
tKzyCommentMapper
;
@Autowired
private
TBaseFirstClassMapper
tBaseFirstClassMapper
;
@Override
@Override
public
Map
<
String
,
Object
>
secondClassList
(
Long
firstId
)
{
public
Map
<
String
,
Object
>
secondClassList
(
Long
firstId
)
{
TBaseSecondClassExample
tBaseSecondClassExample
=
new
TBaseSecondClassExample
();
TBaseSecondClassExample
tBaseSecondClassExample
=
new
TBaseSecondClassExample
();
tBaseSecondClassExample
.
createCriteria
().
andFirstIdEqualTo
(
firstId
).
andStatusEqualTo
(
1
);
tBaseSecondClassExample
.
createCriteria
().
andFirstIdEqualTo
(
firstId
).
andStatusEqualTo
(
1
);
List
<
TBaseSecondClass
>
list
=
tBaseSecondClassMapper
.
selectByExample
(
tBaseSecondClassExample
);
List
<
TBaseSecondClass
>
list
=
tBaseSecondClassMapper
.
selectByExample
(
tBaseSecondClassExample
);
return
returnMap
(
"1"
,
""
,
list
);
TBaseFirstClass
tBaseFirstClass
=
tBaseFirstClassMapper
.
selectByPrimaryKey
(
firstId
);
Map
<
String
,
Object
>
dataMap
=
new
HashMap
<
String
,
Object
>();
dataMap
.
put
(
"list"
,
list
);
dataMap
.
put
(
"firstClassName"
,
tBaseFirstClass
.
getClassName
());
return
returnMap
(
"1"
,
""
,
dataMap
);
}
}
/**
/**
...
@@ -54,6 +58,7 @@ public class InformationServiceImpl implements InformationService {
...
@@ -54,6 +58,7 @@ public class InformationServiceImpl implements InformationService {
public
Map
<
String
,
Object
>
secondClassDetail
(
Long
secondId
,
Integer
pageNo
,
Integer
pageSize
)
{
public
Map
<
String
,
Object
>
secondClassDetail
(
Long
secondId
,
Integer
pageNo
,
Integer
pageSize
)
{
TBaseSecondClass
tBaseSecondClass
=
tBaseSecondClassMapper
.
selectByPrimaryKey
(
secondId
);
TBaseSecondClass
tBaseSecondClass
=
tBaseSecondClassMapper
.
selectByPrimaryKey
(
secondId
);
List
<
Map
<
String
,
Object
>>
list
=
null
;
List
<
Map
<
String
,
Object
>>
list
=
null
;
Integer
total
=
0
;
Map
<
String
,
Object
>
param
=
new
HashMap
<
String
,
Object
>();
Map
<
String
,
Object
>
param
=
new
HashMap
<
String
,
Object
>();
param
.
put
(
"start"
,
(
pageNo
-
1
)
*
pageSize
);
param
.
put
(
"start"
,
(
pageNo
-
1
)
*
pageSize
);
param
.
put
(
"pageSize"
,
pageSize
);
param
.
put
(
"pageSize"
,
pageSize
);
...
@@ -75,7 +80,21 @@ public class InformationServiceImpl implements InformationService {
...
@@ -75,7 +80,21 @@ public class InformationServiceImpl implements InformationService {
@Override
@Override
public
Map
<
String
,
Object
>
informationDetail
(
Long
informationId
)
{
public
Map
<
String
,
Object
>
informationDetail
(
Long
informationId
)
{
TKzyInformation
tKzyInformation
=
tKzyInformationMapper
.
selectByPrimaryKey
(
informationId
);
TKzyInformation
tKzyInformation
=
tKzyInformationMapper
.
selectByPrimaryKey
(
informationId
);
return
returnMap
(
"1"
,
""
,
tKzyInformation
);
if
(
tKzyInformation
==
null
)
{
return
returnMap
(
"0"
,
"未查到该数据信息!"
,
null
);
}
tKzyInformation
.
getContent
();
Map
<
String
,
Object
>
dataMap
=
new
HashMap
<
String
,
Object
>();
dataMap
.
put
(
"id"
,
tKzyInformation
.
getId
());
dataMap
.
put
(
"title"
,
tKzyInformation
.
getTitle
());
dataMap
.
put
(
"author"
,
tKzyInformation
.
getAuthor
());
dataMap
.
put
(
"picUrl"
,
tKzyInformation
.
getPicUrl
());
dataMap
.
put
(
"iconUrl"
,
tKzyInformation
.
getIconUrl
());
dataMap
.
put
(
"isDelete"
,
tKzyInformation
.
getIsDelete
());
dataMap
.
put
(
"createDt"
,
tKzyInformation
.
getCreateDt
());
dataMap
.
put
(
"updateDt"
,
tKzyInformation
.
getUpdateDt
());
dataMap
.
put
(
"content"
,
new
String
(
tKzyInformation
.
getContent
()));
return
returnMap
(
"1"
,
""
,
dataMap
);
}
}
@Override
@Override
...
@@ -114,6 +133,7 @@ public class InformationServiceImpl implements InformationService {
...
@@ -114,6 +133,7 @@ public class InformationServiceImpl implements InformationService {
tKzyCourseComment
.
setIsDelete
(
0
);
tKzyCourseComment
.
setIsDelete
(
0
);
tKzyCourseComment
.
setReplyContent
(
comment
);
tKzyCourseComment
.
setReplyContent
(
comment
);
tKzyCourseComment
.
setType
(
1
);
tKzyCourseComment
.
setType
(
1
);
tKzyCourseComment
.
setAuthStatus
(
1
);
tKzyCommentMapper
.
insertSelective
(
tKzyCourseComment
);
tKzyCommentMapper
.
insertSelective
(
tKzyCourseComment
);
return
returnMap
(
"1"
,
"操作成功!"
,
null
);
return
returnMap
(
"1"
,
"操作成功!"
,
null
);
}
}
...
...
src/main/java/com/server/web/common/service/Impl/TKzyCourseServiceImpl.java
View file @
2fd8df7
...
@@ -269,6 +269,7 @@ public class TKzyCourseServiceImpl implements TKzyCourseService {
...
@@ -269,6 +269,7 @@ public class TKzyCourseServiceImpl implements TKzyCourseService {
tKzyCourseComment
.
setIsDelete
(
0
);
tKzyCourseComment
.
setIsDelete
(
0
);
tKzyCourseComment
.
setReplyContent
(
comment
);
tKzyCourseComment
.
setReplyContent
(
comment
);
tKzyCourseComment
.
setType
(
2
);
tKzyCourseComment
.
setType
(
2
);
tKzyCourseComment
.
setAuthStatus
(
1
);
tKzyCommentMapper
.
insertSelective
(
tKzyCourseComment
);
tKzyCommentMapper
.
insertSelective
(
tKzyCourseComment
);
resultMap
.
put
(
"message"
,
"评论成功~"
);
resultMap
.
put
(
"message"
,
"评论成功~"
);
resultMap
.
put
(
"status"
,
"1"
);
resultMap
.
put
(
"status"
,
"1"
);
...
...
src/main/java/com/server/web/common/service/Impl/UserServiceImpl.java
View file @
2fd8df7
...
@@ -59,32 +59,49 @@ public class UserServiceImpl implements UserService {
...
@@ -59,32 +59,49 @@ public class UserServiceImpl implements UserService {
if
(
loginUser
.
getSignInCount
()
==
null
)
{
if
(
loginUser
.
getSignInCount
()
==
null
)
{
loginUser
.
setSignInCount
(
0
);
loginUser
.
setSignInCount
(
0
);
}
}
String
firstDay
=
simpleDateFormat
.
format
(
DateUtils
.
firstDayOfMonth
());
String
firstDay
=
simpleDateFormat
.
format
(
DateUtils
.
firstDayOfMonth
());
Integer
integral
=
1
;
Integer
integral
=
1
;
if
(
firstDay
.
equals
(
simpleDateFormat
.
format
(
new
Date
())))
{
if
(
firstDay
.
equals
(
simpleDateFormat
.
format
(
new
Date
())))
{
loginUser
.
setSignInCount
(
1
);
loginUser
.
setSignInCount
(
1
);
tKzyUserIntegralFlowing
.
setIntegral
(
1
);
tKzyUserIntegralFlowing
.
setIntegral
(
1
);
}
else
{
}
else
{
if
(
loginUser
.
getSignInCount
()
<=
2
)
{
//判断昨天是否签到,昨天未签到,签到哦连续天数置0;
Map
<
String
,
Object
>
param2
=
new
HashMap
<
String
,
Object
>();
param2
.
put
(
"userId"
,
loginUser
.
getId
());
param2
.
put
(
"today"
,
simpleDateFormat
.
format
(
org
.
apache
.
commons
.
lang
.
time
.
DateUtils
.
addDays
(
new
Date
(),
-
1
)));
Map
<
String
,
Object
>
yestoday
=
integralMapper
.
queryDaySign
(
param2
);
if
(
yestoday
==
null
||
yestoday
.
get
(
"id"
)
==
null
)
{
loginUser
.
setSignInCount
(
0
);
}
if
(
loginUser
.
getSignInCount
()
==
5
)
{
loginUser
.
setSignInCount
(
1
);
integral
=
1
;
integral
=
1
;
}
else
if
(
loginUser
.
getSignInCount
()
==
3
)
{
}
else
{
if
(
loginUser
.
getSignInCount
()
<
2
)
{
integral
=
1
;
}
else
if
(
loginUser
.
getSignInCount
()
==
2
)
{
integral
=
3
;
integral
=
3
;
}
else
if
(
loginUser
.
getSignInCount
()
==
4
)
{
}
else
if
(
loginUser
.
getSignInCount
()
==
3
)
{
integral
=
1
;
integral
=
1
;
}
else
if
(
loginUser
.
getSignInCount
()
==
5
)
{
}
else
if
(
loginUser
.
getSignInCount
()
==
4
)
{
integral
=
5
;
integral
=
5
;
tKzyUserIntegralFlowing
.
setIntegral
(
5
);
}
else
{
}
else
{
integral
=
1
;
integral
=
1
;
}
}
loginUser
.
setSignInCount
(
loginUser
.
getSignInCount
()
+
1
);
loginUser
.
setSignInCount
(
loginUser
.
getSignInCount
()
+
1
);
}
}
}
loginUser
.
setIntegral
(
loginUser
.
getIntegral
()
+
integral
);
loginUser
.
setIntegral
(
loginUser
.
getIntegral
()
+
integral
);
tKzyUserIntegralFlowing
.
setIntegral
(
integral
);
tKzyUserIntegralFlowing
.
setIntegral
(
integral
);
loginUser
.
setLastSignDt
(
new
Date
());
loginUser
.
setLastSignDt
(
new
Date
());
tKzyUserMapper
.
updateByPrimaryKeySelective
(
loginUser
);
tKzyUserMapper
.
updateByPrimaryKeySelective
(
loginUser
);
tKzyUserIntegralFlowingMapper
.
insertSelective
(
tKzyUserIntegralFlowing
);
tKzyUserIntegralFlowingMapper
.
insertSelective
(
tKzyUserIntegralFlowing
);
Map
<
String
,
Object
>
dataMap
=
new
HashMap
<>();
Map
<
String
,
Object
>
dataMap
=
new
HashMap
<>();
dataMap
.
put
(
"integral"
,
integral
);
dataMap
.
put
(
"integral"
,
integral
);
dataMap
.
put
(
"signInCount"
,
loginUser
.
getSignInCount
());
dataMap
.
put
(
"signInCount"
,
loginUser
.
getSignInCount
());
...
@@ -94,7 +111,7 @@ public class UserServiceImpl implements UserService {
...
@@ -94,7 +111,7 @@ public class UserServiceImpl implements UserService {
@Override
@Override
public
Map
<
String
,
Object
>
signInList
(
TKzyUser
loginUser
)
{
public
Map
<
String
,
Object
>
signInList
(
TKzyUser
loginUser
)
{
//List<String> dayList = getDayListOfMonth();
//List<String> dayList = getDayListOfMonth();
loginUser
=
tKzyUserMapper
.
selectByPrimaryKey
(
loginUser
.
getId
());
SimpleDateFormat
simpleDateFormat
=
new
SimpleDateFormat
(
"yyyy-MM"
);
SimpleDateFormat
simpleDateFormat
=
new
SimpleDateFormat
(
"yyyy-MM"
);
SimpleDateFormat
simpleDateFormat2
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
);
SimpleDateFormat
simpleDateFormat2
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
);
Map
<
String
,
Object
>
param
=
new
HashMap
<
String
,
Object
>();
Map
<
String
,
Object
>
param
=
new
HashMap
<
String
,
Object
>();
...
@@ -109,29 +126,18 @@ public class UserServiceImpl implements UserService {
...
@@ -109,29 +126,18 @@ public class UserServiceImpl implements UserService {
hasSignDay
.
add
(
ymd
);
hasSignDay
.
add
(
ymd
);
}
}
/*List<Map<String, Object>> daysList = new ArrayList<>();
Map<String, Object> flag = null;
for (String everyDay : dayList) {
flag = new HashMap<>();
flag.put("day", everyDay);
if (hasSignDay.contains(everyDay)) {
flag.put("signFlag", 1);
} else {
flag.put("signFlag", 0);
}
daysList.add(flag);
}*/
Map
<
String
,
Object
>
param2
=
new
HashMap
<
String
,
Object
>();
Map
<
String
,
Object
>
param2
=
new
HashMap
<
String
,
Object
>();
param2
.
put
(
"userId"
,
loginUser
.
getId
());
param2
.
put
(
"userId"
,
loginUser
.
getId
());
param2
.
put
(
"today"
,
simpleDateFormat2
.
format
(
new
Date
()));
param2
.
put
(
"today"
,
simpleDateFormat2
.
format
(
new
Date
()));
Map
<
String
,
Object
>
todaySign
=
integralMapper
.
queryTodaySign
(
param2
);
Map
<
String
,
Object
>
todaySign
=
integralMapper
.
queryDaySign
(
param2
);
Map
<
String
,
Object
>
dataMap
=
new
HashMap
<>();
Map
<
String
,
Object
>
dataMap
=
new
HashMap
<>();
dataMap
.
put
(
"list"
,
list
);
dataMap
.
put
(
"list"
,
list
);
dataMap
.
put
(
"todaySign"
,
todaySign
);
dataMap
.
put
(
"todaySign"
,
todaySign
);
dataMap
.
put
(
"daysList"
,
hasSignDay
);
dataMap
.
put
(
"daysList"
,
hasSignDay
);
dataMap
.
put
(
"integral"
,
loginUser
.
getIntegral
());
return
ResultMapUtil
.
returnMap
(
"1"
,
""
,
dataMap
);
return
ResultMapUtil
.
returnMap
(
"1"
,
""
,
dataMap
);
}
}
...
...
src/main/java/com/server/web/controller/UserController.java
View file @
2fd8df7
...
@@ -75,11 +75,9 @@ public class UserController extends BaseController {
...
@@ -75,11 +75,9 @@ public class UserController extends BaseController {
if
(!
CollectionUtils
.
isEmpty
(
users
))
{
if
(!
CollectionUtils
.
isEmpty
(
users
))
{
TKzyUser
user1
=
users
.
get
(
0
);
TKzyUser
user1
=
users
.
get
(
0
);
if
(!
StringUtils
.
isEmpty
(
user1
.
getWxOpenid
())
&&
!
wxOpenId
.
equals
(
user1
.
getWxOpenid
()))
{
if
(!
StringUtils
.
isEmpty
(
user1
.
getWxOpenid
())
&&
!
wxOpenId
.
equals
(
user1
.
getWxOpenid
()))
{
return
returnError
(
"0"
,
"该
微信已绑定其他手机号
"
,
null
);
return
returnError
(
"0"
,
"该
手机号已绑定其他微信
"
,
null
);
}
}
}
}
user
.
setWxOpenid
(
wxOpenId
);
user
.
setWxOpenid
(
wxOpenId
);
user
.
setCreateDt
(
new
Date
());
user
.
setCreateDt
(
new
Date
());
user
.
setUserCategory
(
userCategory
==
null
?
null
:
Integer
.
valueOf
(
userCategory
));
user
.
setUserCategory
(
userCategory
==
null
?
null
:
Integer
.
valueOf
(
userCategory
));
...
@@ -90,7 +88,6 @@ public class UserController extends BaseController {
...
@@ -90,7 +88,6 @@ public class UserController extends BaseController {
user
.
setLastLoginDt
(
new
Date
());
user
.
setLastLoginDt
(
new
Date
());
userMapper
.
insertSelective
(
user
);
userMapper
.
insertSelective
(
user
);
request
.
getSession
().
setAttribute
(
WX_USER_SESSION_KEY
,
user
);
request
.
getSession
().
setAttribute
(
WX_USER_SESSION_KEY
,
user
);
return
returnSuccess
(
user
);
return
returnSuccess
(
user
);
}
}
...
@@ -102,6 +99,7 @@ public class UserController extends BaseController {
...
@@ -102,6 +99,7 @@ public class UserController extends BaseController {
return
returnError
(
"0"
,
"用户未登录"
,
null
);
return
returnError
(
"0"
,
"用户未登录"
,
null
);
}
}
loginUser
=
tKzyUserMapper
.
selectByPrimaryKey
(
loginUser
.
getId
());
String
wxOpenId
=
request
.
getParameter
(
"wxOpenId"
);
String
wxOpenId
=
request
.
getParameter
(
"wxOpenId"
);
String
fullName
=
request
.
getParameter
(
"fullName"
);
String
fullName
=
request
.
getParameter
(
"fullName"
);
String
userCategory
=
request
.
getParameter
(
"userCategory"
);
String
userCategory
=
request
.
getParameter
(
"userCategory"
);
...
@@ -237,6 +235,11 @@ public class UserController extends BaseController {
...
@@ -237,6 +235,11 @@ public class UserController extends BaseController {
if
(
loginUser
==
null
||
loginUser
.
getId
()
==
null
)
{
if
(
loginUser
==
null
||
loginUser
.
getId
()
==
null
)
{
return
ResultMapUtil
.
returnMap
(
"0"
,
"请先登录!"
,
null
);
return
ResultMapUtil
.
returnMap
(
"0"
,
"请先登录!"
,
null
);
}
}
if
(
loginUser
!=
null
&&
loginUser
.
getId
()
!=
null
)
{
loginUser
=
tKzyUserMapper
.
selectByPrimaryKey
(
loginUser
.
getId
());
}
//更新缓存用户信息(主要积分金额)
request
.
getSession
().
setAttribute
(
WX_USER_SESSION_KEY
,
loginUser
);
return
userService
.
signIn
(
loginUser
);
return
userService
.
signIn
(
loginUser
);
}
}
...
...
src/main/resources/mybatis/mapping/CommentMapper.xml
View file @
2fd8df7
...
@@ -12,10 +12,10 @@
...
@@ -12,10 +12,10 @@
t_kzy_comment t
t_kzy_comment t
LEFT JOIN t_kzy_user u ON t.user_id = u.id AND t.type = 2
LEFT JOIN t_kzy_user u ON t.user_id = u.id AND t.type = 2
WHERE
WHERE
t.is_delete = 0
t.is_delete = 0
AND t.auth_status=2 AND t.type=2
AND t.relation_id = #{courseId,jdbcType=BIGINT}
AND t.relation_id = #{courseId,jdbcType=BIGINT}
ORDER BY
ORDER BY
t.id
DE
SC
t.id
A
SC
LIMIT #{start,jdbcType=INTEGER},#{pageSize,jdbcType=INTEGER}
LIMIT #{start,jdbcType=INTEGER},#{pageSize,jdbcType=INTEGER}
</select>
</select>
<select
id=
"commentListTotal"
resultType=
"java.lang.Integer"
>
<select
id=
"commentListTotal"
resultType=
"java.lang.Integer"
>
...
@@ -25,8 +25,35 @@
...
@@ -25,8 +25,35 @@
t_kzy_comment t
t_kzy_comment t
LEFT JOIN t_kzy_user u ON t.user_id = u.id AND t.type = 2
LEFT JOIN t_kzy_user u ON t.user_id = u.id AND t.type = 2
WHERE
WHERE
t.is_delete = 0
t.is_delete = 0
AND t.auth_status=2 AND t.type=2
AND t.relation_id = #{courseId,jdbcType=BIGINT}
AND t.relation_id = #{courseId,jdbcType=BIGINT}
</select>
</select>
<select
id=
"informationCommentList"
resultType=
"java.util.HashMap"
>
SELECT
t.id,
t.create_dt AS createDt,
t.reply_content AS replyContent,
u.full_name AS fullName,
u.head_photo AS headPhoto
FROM
t_kzy_comment t
LEFT JOIN t_kzy_user u ON t.user_id = u.id AND t.type = 1
WHERE
t.is_delete = 0 AND t.auth_status=2 AND t.type=1
AND t.relation_id = #{informationId,jdbcType=BIGINT}
ORDER BY
t.id ASC
LIMIT #{start,jdbcType=INTEGER},#{pageSize,jdbcType=INTEGER}
</select>
<select
id=
"informationCommentListTotal"
resultType=
"java.lang.Integer"
>
SELECT
count(t.id)
FROM
t_kzy_comment t
LEFT JOIN t_kzy_user u ON t.user_id = u.id AND t.type = 1
WHERE
t.is_delete = 0 AND t.auth_status=2 AND t.type=1
AND t.relation_id = #{informationId,jdbcType=BIGINT}
</select>
</mapper>
</mapper>
\ No newline at end of file
src/main/resources/mybatis/mapping/CourseMapper.xml
View file @
2fd8df7
...
@@ -30,9 +30,8 @@
...
@@ -30,9 +30,8 @@
WHERE t.`is_delete` = 0
WHERE t.`is_delete` = 0
AND t.`is_up` = 1
AND t.`is_up` = 1
AND t.`course_type`=1
AND t.`course_type`=1
AND
(t.end_dt is null or date_format(t.end_dt,'%Y-%m-%d') = #{today,jdbcType=VARCHAR}
)
AND
t.end_dt
<![CDATA[ > ]]>
now(
)
ORDER BY t.`start_dt`
ORDER BY t.`start_dt`
</select>
</select>
...
...
src/main/resources/mybatis/mapping/IntegralMapper.xml
View file @
2fd8df7
...
@@ -15,7 +15,7 @@
...
@@ -15,7 +15,7 @@
AND t.user_id = #{userId,jdbcType=BIGINT}
AND t.user_id = #{userId,jdbcType=BIGINT}
AND DATE_FORMAT(t.create_dt, '%Y-%m') = #{month,jdbcType=VARCHAR}
AND DATE_FORMAT(t.create_dt, '%Y-%m') = #{month,jdbcType=VARCHAR}
</select>
</select>
<select
id=
"query
Tod
aySign"
parameterType=
"java.util.HashMap"
resultType=
"java.util.HashMap"
>
<select
id=
"query
D
aySign"
parameterType=
"java.util.HashMap"
resultType=
"java.util.HashMap"
>
SELECT
SELECT
t.id,
t.id,
t.create_dt AS createDt,
t.create_dt AS createDt,
...
...
src/main/resources/mybatis/mapping/informationMapper.xml
View file @
2fd8df7
...
@@ -26,8 +26,10 @@
...
@@ -26,8 +26,10 @@
t_kzy_relation_class rc
t_kzy_relation_class rc
LEFT JOIN t_kzy_information i ON rc.relation_id = i.id
LEFT JOIN t_kzy_information i ON rc.relation_id = i.id
WHERE
WHERE
i.is_delete = 0
i.is_delete = 0
AND rc.type=2
AND rc.first_class_id = #{firstId,jdbcType=BIGINT}
AND rc.first_class_id = #{firstId,jdbcType=BIGINT}
GROUP BY i.id
ORDER BY
ORDER BY
i.id DESC
i.id DESC
LIMIT 0,
LIMIT 0,
...
@@ -47,12 +49,24 @@
...
@@ -47,12 +49,24 @@
LEFT JOIN t_base_second_class sc ON rc.second_class_id = sc.id AND sc.type = 1
LEFT JOIN t_base_second_class sc ON rc.second_class_id = sc.id AND sc.type = 1
WHERE
WHERE
i.is_delete = 0
i.is_delete = 0
AND sc.type =
2
AND sc.type =
1
AND rc.second_class_id = #{secondId,jdbcType=BIGINT}
AND rc.second_class_id = #{secondId,jdbcType=BIGINT}
ORDER BY
ORDER BY
i.id DESC
i.id DESC
LIMIT ${start},${pageSize}
LIMIT ${start},${pageSize}
</select>
</select>
<select
id=
"secondClassDetailInformationTotal"
resultType=
"java.lang.Integer"
>
SELECT
count(i.id)
FROM
t_kzy_relation_class rc
LEFT JOIN t_kzy_information i ON rc.relation_id = i.id
LEFT JOIN t_base_second_class sc ON rc.second_class_id = sc.id AND sc.type = 1
WHERE
i.is_delete = 0
AND sc.type = 1
AND rc.second_class_id = #{secondId,jdbcType=BIGINT}
</select>
<select
id=
"secondClassDetailCourse"
resultType=
"java.util.HashMap"
>
<select
id=
"secondClassDetailCourse"
resultType=
"java.util.HashMap"
>
SELECT
SELECT
...
@@ -65,13 +79,27 @@
...
@@ -65,13 +79,27 @@
FROM
FROM
t_kzy_relation_class rc
t_kzy_relation_class rc
LEFT JOIN t_kzy_course c ON rc.relation_id = c.id
LEFT JOIN t_kzy_course c ON rc.relation_id = c.id
LEFT JOIN t_base_second_class sc ON rc.second_class_id = sc.id
AND sc.type = 2
LEFT JOIN t_base_second_class sc ON rc.second_class_id = sc.id
WHERE
WHERE
c.is_delete = 0
c.is_delete = 0
AND sc.type = 2
AND sc.type
<![CDATA[ >= ]]>
2
AND c.is_up = 1
AND rc.second_class_id = #{secondId,jdbcType=BIGINT}
AND rc.second_class_id = #{secondId,jdbcType=BIGINT}
ORDER BY
ORDER BY
c.id DESC
c.id DESC
LIMIT ${start},${pageSize}
LIMIT ${start},${pageSize}
</select>
</select>
<select
id=
"secondClassDetailCourseTotal"
resultType=
"java.lang.Integer"
>
SELECT
count(c.id)
FROM
t_kzy_relation_class rc
LEFT JOIN t_kzy_course c ON rc.relation_id = c.id
LEFT JOIN t_base_second_class sc ON rc.second_class_id = sc.id
WHERE
c.is_delete = 0
AND sc.type
<![CDATA[ >= ]]>
2
AND c.is_up = 1
AND rc.second_class_id = #{secondId,jdbcType=BIGINT}
</select>
</mapper>
</mapper>
\ No newline at end of file
src/main/resources/servers/105/application.properties
View file @
2fd8df7
...
@@ -46,7 +46,7 @@ wx.app.id=wxe37f12b1fa076c1a
...
@@ -46,7 +46,7 @@ wx.app.id=wxe37f12b1fa076c1a
wx.app.secret
=
57e45975dff8f558163e5e9f2ac78e87
wx.app.secret
=
57e45975dff8f558163e5e9f2ac78e87
wx.http.url
=
http://kzy-wx.jimijiayuan.cn
wx.http.url
=
http://kzy-wx
-1
.jimijiayuan.cn
#有拍云
#有拍云
remoteFileUrl
=
http://yxvzb.b0.upaiyun.com/
remoteFileUrl
=
http://yxvzb.b0.upaiyun.com/
upyun.bucket
=
yxvzb
upyun.bucket
=
yxvzb
...
...
src/main/resources/servers/local/application.properties
View file @
2fd8df7
...
@@ -49,7 +49,7 @@ wx.app.id=wxe37f12b1fa076c1a
...
@@ -49,7 +49,7 @@ wx.app.id=wxe37f12b1fa076c1a
wx.app.secret
=
57e45975dff8f558163e5e9f2ac78e87
wx.app.secret
=
57e45975dff8f558163e5e9f2ac78e87
wx.http.url
=
http://kzy-wx.jimijiayuan.cn
wx.http.url
=
http://kzy-wx
-1
.jimijiayuan.cn
#有拍云
#有拍云
remoteFileUrl
=
http://yxvzb.b0.upaiyun.com/
remoteFileUrl
=
http://yxvzb.b0.upaiyun.com/
upyun.bucket
=
yxvzb
upyun.bucket
=
yxvzb
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment