Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
appApi
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
antaile
appApi
Commits
4ed78a78
Commit
4ed78a78
authored
Jul 15, 2021
by
XiaHou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
云应用相关的业务代码
parent
c189b308
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
25 changed files
with
822 additions
and
77 deletions
+822
-77
InsertAtlAppAliossParam.java
...hwstudio/antaile/InsertParam/InsertAtlAppAliossParam.java
+0
-3
AtlAppAliossController.java
...m/hwstudio/antaile/controller/AtlAppAliossController.java
+10
-10
AtlAppstoreOrderController.java
...studio/antaile/controller/AtlAppstoreOrderController.java
+13
-12
AtlTimeController.java
...va/com/hwstudio/antaile/controller/AtlTimeController.java
+15
-0
AtlTimeMenuController.java
...om/hwstudio/antaile/controller/AtlTimeMenuController.java
+25
-12
BaseController.java
.../java/com/hwstudio/antaile/controller/BaseController.java
+20
-0
AtlAppstoreDTO.java
src/main/java/com/hwstudio/antaile/dto/AtlAppstoreDTO.java
+3
-9
AtlTimeMenuDTO.java
src/main/java/com/hwstudio/antaile/dto/AtlTimeMenuDTO.java
+19
-0
AtlTime.java
src/main/java/com/hwstudio/antaile/entity/AtlTime.java
+3
-0
AtlTimeMenuDao.java
...main/java/com/hwstudio/antaile/mapper/AtlTimeMenuDao.java
+21
-0
SysAtlTimeMapper.java
...ava/com/hwstudio/antaile/mbg/mapper/SysAtlTimeMapper.java
+31
-0
AtlTimeMenu.java
src/main/java/com/hwstudio/antaile/mbg/po/AtlTimeMenu.java
+24
-0
AtlTimeMenuExample.java
.../java/com/hwstudio/antaile/mbg/po/AtlTimeMenuExample.java
+120
-0
SysAtlTime.java
src/main/java/com/hwstudio/antaile/mbg/po/SysAtlTime.java
+328
-0
SysAtlTimeExample.java
...n/java/com/hwstudio/antaile/mbg/po/SysAtlTimeExample.java
+0
-0
QueryAtlTimeMenuParam.java
...om/hwstudio/antaile/queryparam/QueryAtlTimeMenuParam.java
+3
-2
AtlAppStoreOrderService.java
...com/hwstudio/antaile/service/AtlAppStoreOrderService.java
+1
-1
AtlTimeMenuService.java
...java/com/hwstudio/antaile/service/AtlTimeMenuService.java
+98
-20
AtlTimeService.java
...ain/java/com/hwstudio/antaile/service/AtlTimeService.java
+20
-0
JsonResult.java
src/main/java/com/hwstudio/antaile/utils/JsonResult.java
+5
-2
AtlAppstoreDao.xml
src/main/resources/mapping/AtlAppstoreDao.xml
+2
-1
AtlAppstoreOrderDao.xml
src/main/resources/mapping/AtlAppstoreOrderDao.xml
+2
-0
AtlTimeMenuDao.xml
src/main/resources/mapping/AtlTimeMenuDao.xml
+22
-0
AtlTimeMenuMapper.xml
src/main/resources/mapping/mbg/AtlTimeMenuMapper.xml
+37
-5
SysAtlTimeMapper.xml
src/main/resources/mapping/mbg/SysAtlTimeMapper.xml
+0
-0
No files found.
src/main/java/com/hwstudio/antaile/InsertParam/InsertAtlAppAliossParam.java
View file @
4ed78a78
...
@@ -27,8 +27,5 @@ public class InsertAtlAppAliossParam implements Serializable {
...
@@ -27,8 +27,5 @@ public class InsertAtlAppAliossParam implements Serializable {
private
String
ossUrl
;
private
String
ossUrl
;
@ApiModelProperty
(
value
=
"本地服务器是否存储 0否 1是"
)
@ApiModelProperty
(
value
=
"本地服务器是否存储 0否 1是"
)
private
Integer
isSaveLocal
;
private
Integer
isSaveLocal
;
@ApiModelProperty
(
value
=
"是否开启 0否 1是"
)
private
Integer
isOpen
;
}
}
src/main/java/com/hwstudio/antaile/controller/AtlAppAliossController.java
View file @
4ed78a78
package
com
.
hwstudio
.
antaile
.
controller
;
package
com
.
hwstudio
.
antaile
.
controller
;
import
com.hwstudio.antaile.InsertParam.InsertAtlAppAliossParam
;
import
com.hwstudio.antaile.InsertParam.InsertAtlAppAliossParam
;
import
com.hwstudio.antaile.entity.AtlUser
;
import
com.hwstudio.antaile.mbg.po.AtlAppAlioss
;
import
com.hwstudio.antaile.mbg.po.AtlAppAlioss
;
import
com.hwstudio.antaile.mbg.po.AtlAppstoreOrder
;
import
com.hwstudio.antaile.mbg.po.AtlAppstoreOrder
;
import
com.hwstudio.antaile.queryparam.QueryAliossAndOrderParam
;
import
com.hwstudio.antaile.queryparam.QueryAliossAndOrderParam
;
...
@@ -12,7 +13,6 @@ import io.swagger.annotations.ApiParam;
...
@@ -12,7 +13,6 @@ import io.swagger.annotations.ApiParam;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.*
;
import
javax.servlet.http.HttpServletRequest
;
import
java.util.List
;
import
java.util.List
;
/**
/**
...
@@ -31,9 +31,9 @@ public class AtlAppAliossController extends BaseController {
...
@@ -31,9 +31,9 @@ public class AtlAppAliossController extends BaseController {
@ApiOperation
(
"根据appOrderId 查询一条oss数据"
)
@ApiOperation
(
"根据appOrderId 查询一条oss数据"
)
@RequestMapping
(
value
=
"/selectOneByAppOrderId"
,
method
=
RequestMethod
.
GET
)
@RequestMapping
(
value
=
"/selectOneByAppOrderId"
,
method
=
RequestMethod
.
GET
)
public
JsonResult
<
List
<
AtlAppAlioss
>>
selectOneByAppOrderId
(
@ApiParam
(
value
=
"关联app应用订单id"
,
required
=
true
)
@RequestParam
(
value
=
"appOrderId"
,
required
=
true
)
Long
appOrderId
,
HttpServletRequest
request
)
{
public
JsonResult
<
List
<
AtlAppAlioss
>>
selectOneByAppOrderId
(
@ApiParam
(
value
=
"关联app应用订单id"
,
required
=
true
)
@RequestParam
(
value
=
"appOrderId"
,
required
=
true
)
Long
appOrderId
)
{
String
token
=
request
.
getHeader
(
"token"
);
AtlUser
atlUser
=
super
.
getHeadToken
(
);
if
(
token
==
null
)
{
if
(
atlUser
==
null
)
{
return
JsonResult
.
notLogin
();
return
JsonResult
.
notLogin
();
}
}
return
JsonResult
.
success
(
"查询成功"
,
this
.
atlAppAliossService
.
selectOneByAppOrderId
(
appOrderId
));
return
JsonResult
.
success
(
"查询成功"
,
this
.
atlAppAliossService
.
selectOneByAppOrderId
(
appOrderId
));
...
@@ -41,9 +41,9 @@ public class AtlAppAliossController extends BaseController {
...
@@ -41,9 +41,9 @@ public class AtlAppAliossController extends BaseController {
@ApiOperation
(
"新增一条阿里云oss订单配置数据"
)
@ApiOperation
(
"新增一条阿里云oss订单配置数据"
)
@RequestMapping
(
value
=
"/insertAtlAppAlioss"
,
method
=
RequestMethod
.
POST
)
@RequestMapping
(
value
=
"/insertAtlAppAlioss"
,
method
=
RequestMethod
.
POST
)
public
JsonResult
<
AtlAppstoreOrder
>
insertAtlAppAlioss
(
@ApiParam
(
value
=
"传入对象"
)
@RequestBody
InsertAtlAppAliossParam
insertAtlAppAliossParam
,
HttpServletRequest
request
)
{
public
JsonResult
<
AtlAppstoreOrder
>
insertAtlAppAlioss
(
@ApiParam
(
value
=
"传入对象"
)
@RequestBody
InsertAtlAppAliossParam
insertAtlAppAliossParam
)
{
String
token
=
request
.
getHeader
(
"token"
);
AtlUser
atlUser
=
super
.
getHeadToken
(
);
if
(
token
==
null
)
{
if
(
atlUser
==
null
)
{
return
JsonResult
.
notLogin
();
return
JsonResult
.
notLogin
();
}
}
return
this
.
atlAppAliossService
.
insertAtlAppAlioss
(
insertAtlAppAliossParam
);
return
this
.
atlAppAliossService
.
insertAtlAppAlioss
(
insertAtlAppAliossParam
);
...
@@ -51,9 +51,9 @@ public class AtlAppAliossController extends BaseController {
...
@@ -51,9 +51,9 @@ public class AtlAppAliossController extends BaseController {
@ApiOperation
(
"根据id 修改配置数据"
)
@ApiOperation
(
"根据id 修改配置数据"
)
@RequestMapping
(
value
=
"/updateByAtlAppAliossId"
,
method
=
RequestMethod
.
POST
)
@RequestMapping
(
value
=
"/updateByAtlAppAliossId"
,
method
=
RequestMethod
.
POST
)
public
JsonResult
updateByAtlAppAliossId
(
@ApiParam
(
value
=
"传入对象"
)
@RequestBody
AtlAppAlioss
atlAppAlioss
,
HttpServletRequest
request
)
{
public
JsonResult
updateByAtlAppAliossId
(
@ApiParam
(
value
=
"传入对象"
)
@RequestBody
AtlAppAlioss
atlAppAlioss
)
{
String
token
=
request
.
getHeader
(
"token"
);
AtlUser
atlUser
=
super
.
getHeadToken
(
);
if
(
token
==
null
)
{
if
(
atlUser
==
null
)
{
return
JsonResult
.
notLogin
();
return
JsonResult
.
notLogin
();
}
}
return
this
.
atlAppAliossService
.
updateByAtlAppAliossId
(
atlAppAlioss
);
return
this
.
atlAppAliossService
.
updateByAtlAppAliossId
(
atlAppAlioss
);
...
...
src/main/java/com/hwstudio/antaile/controller/AtlAppstoreOrderController.java
View file @
4ed78a78
...
@@ -2,6 +2,7 @@ package com.hwstudio.antaile.controller;
...
@@ -2,6 +2,7 @@ package com.hwstudio.antaile.controller;
import
com.hwstudio.antaile.InsertParam.InsertAppstoreOrderParam
;
import
com.hwstudio.antaile.InsertParam.InsertAppstoreOrderParam
;
import
com.hwstudio.antaile.dto.AtlAppstoreDTO
;
import
com.hwstudio.antaile.dto.AtlAppstoreDTO
;
import
com.hwstudio.antaile.entity.AtlUser
;
import
com.hwstudio.antaile.mbg.po.AtlAppstoreOrder
;
import
com.hwstudio.antaile.mbg.po.AtlAppstoreOrder
;
import
com.hwstudio.antaile.queryparam.QueryAtlAppstoreOrderParam
;
import
com.hwstudio.antaile.queryparam.QueryAtlAppstoreOrderParam
;
import
com.hwstudio.antaile.service.AtlAppStoreOrderService
;
import
com.hwstudio.antaile.service.AtlAppStoreOrderService
;
...
@@ -34,9 +35,9 @@ public class AtlAppstoreOrderController extends BaseController {
...
@@ -34,9 +35,9 @@ public class AtlAppstoreOrderController extends BaseController {
@ApiOperation
(
"根据订单id 修改订单相关数据"
)
@ApiOperation
(
"根据订单id 修改订单相关数据"
)
@RequestMapping
(
value
=
"/updateAppstoreOrderById"
,
method
=
RequestMethod
.
POST
)
@RequestMapping
(
value
=
"/updateAppstoreOrderById"
,
method
=
RequestMethod
.
POST
)
public
JsonResult
updateAppstoreOrderById
(
@ApiParam
(
value
=
"传入对象"
)
@RequestBody
AtlAppstoreOrder
atlAppstoreOrder
,
HttpServletRequest
request
)
{
public
JsonResult
updateAppstoreOrderById
(
@ApiParam
(
value
=
"传入对象"
)
@RequestBody
AtlAppstoreOrder
atlAppstoreOrder
)
{
String
token
=
request
.
getHeader
(
"token"
);
AtlUser
atlUser
=
super
.
getHeadToken
(
);
if
(
token
==
null
)
{
if
(
atlUser
==
null
)
{
return
JsonResult
.
notLogin
();
return
JsonResult
.
notLogin
();
}
}
return
this
.
atlAppStoreOrderService
.
updateAppstoreOrderById
(
atlAppstoreOrder
);
return
this
.
atlAppStoreOrderService
.
updateAppstoreOrderById
(
atlAppstoreOrder
);
...
@@ -44,9 +45,9 @@ public class AtlAppstoreOrderController extends BaseController {
...
@@ -44,9 +45,9 @@ public class AtlAppstoreOrderController extends BaseController {
@ApiOperation
(
"生成订单"
)
@ApiOperation
(
"生成订单"
)
@RequestMapping
(
value
=
"/generateAppstoreOrder"
,
method
=
RequestMethod
.
POST
)
@RequestMapping
(
value
=
"/generateAppstoreOrder"
,
method
=
RequestMethod
.
POST
)
public
JsonResult
<
AtlAppstoreOrder
>
generateAppstoreOrder
(
@ApiParam
(
value
=
"传入对象"
)
@RequestBody
InsertAppstoreOrderParam
insertAppstoreOrderParam
,
HttpServletRequest
request
)
{
public
JsonResult
<
AtlAppstoreOrder
>
generateAppstoreOrder
(
@ApiParam
(
value
=
"传入对象"
)
@RequestBody
InsertAppstoreOrderParam
insertAppstoreOrderParam
)
{
String
token
=
request
.
getHeader
(
"token"
);
AtlUser
atlUser
=
super
.
getHeadToken
(
);
if
(
token
==
null
)
{
if
(
atlUser
==
null
)
{
return
JsonResult
.
notLogin
();
return
JsonResult
.
notLogin
();
}
}
return
this
.
atlAppStoreOrderService
.
generateAppstoreOrder
(
insertAppstoreOrderParam
);
return
this
.
atlAppStoreOrderService
.
generateAppstoreOrder
(
insertAppstoreOrderParam
);
...
@@ -54,9 +55,9 @@ public class AtlAppstoreOrderController extends BaseController {
...
@@ -54,9 +55,9 @@ public class AtlAppstoreOrderController extends BaseController {
@ApiOperation
(
"用户查询我的订单数据,不传分页参数不分页"
)
@ApiOperation
(
"用户查询我的订单数据,不传分页参数不分页"
)
@RequestMapping
(
value
=
"/selectAtlAppstoreOrderList"
,
method
=
RequestMethod
.
GET
)
@RequestMapping
(
value
=
"/selectAtlAppstoreOrderList"
,
method
=
RequestMethod
.
GET
)
public
JsonResult
<
List
<
AtlAppstoreDTO
>>
selectAtlAppstoreOrderList
(
@ModelAttribute
QueryAtlAppstoreOrderParam
queryAtlAppstoreOrderParam
,
@ModelAttribute
Page
page
,
HttpServletRequest
request
)
{
public
JsonResult
<
List
<
AtlAppstoreDTO
>>
selectAtlAppstoreOrderList
(
@ModelAttribute
QueryAtlAppstoreOrderParam
queryAtlAppstoreOrderParam
,
@ModelAttribute
Page
page
)
{
String
token
=
request
.
getHeader
(
"token"
);
AtlUser
atlUser
=
super
.
getHeadToken
(
);
if
(
token
==
null
)
{
if
(
atlUser
==
null
)
{
return
JsonResult
.
notLogin
();
return
JsonResult
.
notLogin
();
}
}
return
JsonResult
.
success
(
"查询成功"
,
this
.
atlAppStoreOrderService
.
selectAtlAppstoreOrderList
(
queryAtlAppstoreOrderParam
,
page
));
return
JsonResult
.
success
(
"查询成功"
,
this
.
atlAppStoreOrderService
.
selectAtlAppstoreOrderList
(
queryAtlAppstoreOrderParam
,
page
));
...
@@ -64,9 +65,9 @@ public class AtlAppstoreOrderController extends BaseController {
...
@@ -64,9 +65,9 @@ public class AtlAppstoreOrderController extends BaseController {
@ApiOperation
(
"根据参数(可以只查菜单)查询我的应用 ,不传分页参数不分页"
)
@ApiOperation
(
"根据参数(可以只查菜单)查询我的应用 ,不传分页参数不分页"
)
@RequestMapping
(
value
=
"/selectMyAtlAppstore"
,
method
=
RequestMethod
.
GET
)
@RequestMapping
(
value
=
"/selectMyAtlAppstore"
,
method
=
RequestMethod
.
GET
)
public
JsonResult
<
List
<
AtlAppstoreDTO
>>
selectMyAtlAppstore
(
@ModelAttribute
QueryAtlAppstoreOrderParam
queryAtlAppstoreOrderParam
,
@ModelAttribute
Page
page
,
HttpServletRequest
request
)
{
public
JsonResult
<
List
<
AtlAppstoreDTO
>>
selectMyAtlAppstore
(
@ModelAttribute
QueryAtlAppstoreOrderParam
queryAtlAppstoreOrderParam
,
@ModelAttribute
Page
page
)
{
String
token
=
request
.
getHeader
(
"token"
);
AtlUser
atlUser
=
super
.
getHeadToken
(
);
if
(
token
==
null
)
{
if
(
atlUser
==
null
)
{
return
JsonResult
.
notLogin
();
return
JsonResult
.
notLogin
();
}
}
return
JsonResult
.
success
(
"查询成功"
,
this
.
atlAppStoreOrderService
.
selectMyAtlAppstore
(
queryAtlAppstoreOrderParam
,
page
));
return
JsonResult
.
success
(
"查询成功"
,
this
.
atlAppStoreOrderService
.
selectMyAtlAppstore
(
queryAtlAppstoreOrderParam
,
page
));
...
...
src/main/java/com/hwstudio/antaile/controller/AtlTimeController.java
View file @
4ed78a78
...
@@ -2,14 +2,19 @@ package com.hwstudio.antaile.controller;
...
@@ -2,14 +2,19 @@ package com.hwstudio.antaile.controller;
import
com.hwstudio.antaile.dto.*
;
import
com.hwstudio.antaile.dto.*
;
import
com.hwstudio.antaile.entity.AtlTime
;
import
com.hwstudio.antaile.entity.AtlTime
;
import
com.hwstudio.antaile.entity.AtlUser
;
import
com.hwstudio.antaile.mbg.po.AtlTimeMenu
;
import
com.hwstudio.antaile.mbg.po.SysAtlTime
;
import
com.hwstudio.antaile.queryparam.QueryAtlTimeByBlessIdAndIdxParam
;
import
com.hwstudio.antaile.queryparam.QueryAtlTimeByBlessIdAndIdxParam
;
import
com.hwstudio.antaile.service.*
;
import
com.hwstudio.antaile.service.*
;
import
com.hwstudio.antaile.utils.JsonResult
;
import
com.hwstudio.antaile.utils.JsonResult
;
import
com.hwstudio.antaile.utils.RedisUtil
;
import
com.hwstudio.antaile.vo.*
;
import
com.hwstudio.antaile.vo.*
;
import
io.swagger.annotations.*
;
import
io.swagger.annotations.*
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.*
;
import
javax.servlet.http.HttpServletRequest
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
...
@@ -585,4 +590,14 @@ public class AtlTimeController extends BaseController {
...
@@ -585,4 +590,14 @@ public class AtlTimeController extends BaseController {
public
JsonResult
<
List
<
AtlTimeDTO
>>
selectAtlTimeInfoByBlessIdAndIdx
(
@ModelAttribute
QueryAtlTimeByBlessIdAndIdxParam
queryAtlTimeByBlessIdAndIdxParam
)
{
public
JsonResult
<
List
<
AtlTimeDTO
>>
selectAtlTimeInfoByBlessIdAndIdx
(
@ModelAttribute
QueryAtlTimeByBlessIdAndIdxParam
queryAtlTimeByBlessIdAndIdxParam
)
{
return
this
.
atlTimeService
.
selectAtlTimeInfoByBlessIdAndIdx
(
queryAtlTimeByBlessIdAndIdxParam
);
return
this
.
atlTimeService
.
selectAtlTimeInfoByBlessIdAndIdx
(
queryAtlTimeByBlessIdAndIdxParam
);
}
}
@ApiOperation
(
"根据时光纪id修改一条时光纪数据"
)
@RequestMapping
(
value
=
"/updateByTimeId"
,
method
=
RequestMethod
.
POST
)
public
JsonResult
updateByTimeId
(
@ApiParam
(
value
=
"传入对象"
)
@RequestBody
SysAtlTime
sysAtlTime
)
{
AtlUser
atlUser
=
super
.
getHeadToken
();
if
(
atlUser
==
null
)
{
return
JsonResult
.
notLogin
();
}
return
this
.
atlTimeService
.
updateByTimeId
(
sysAtlTime
);
}
}
}
src/main/java/com/hwstudio/antaile/controller/AtlTimeMenuController.java
View file @
4ed78a78
package
com
.
hwstudio
.
antaile
.
controller
;
package
com
.
hwstudio
.
antaile
.
controller
;
import
com.hwstudio.antaile.InsertParam.InsertAtlAppAliossParam
;
import
com.hwstudio.antaile.InsertParam.InsertAtlTimeMenuParam
;
import
com.hwstudio.antaile.InsertParam.InsertAtlTimeMenuParam
;
import
com.hwstudio.antaile.
mbg.po.AtlAppAlioss
;
import
com.hwstudio.antaile.
dto.AtlTimeMenuDTO
;
import
com.hwstudio.antaile.
mbg.po.AtlAppstoreOrd
er
;
import
com.hwstudio.antaile.
entity.AtlUs
er
;
import
com.hwstudio.antaile.
queryparam.QueryAliossAndOrderParam
;
import
com.hwstudio.antaile.
mbg.po.AtlTimeMenu
;
import
com.hwstudio.antaile.queryparam.QueryAtlTimeMenuParam
;
import
com.hwstudio.antaile.queryparam.QueryAtlTimeMenuParam
;
import
com.hwstudio.antaile.service.AtlAppAliossService
;
import
com.hwstudio.antaile.service.AtlTimeMenuService
;
import
com.hwstudio.antaile.service.AtlTimeMenuService
;
import
com.hwstudio.antaile.utils.JsonResult
;
import
com.hwstudio.antaile.utils.JsonResult
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
...
@@ -33,20 +31,35 @@ public class AtlTimeMenuController extends BaseController {
...
@@ -33,20 +31,35 @@ public class AtlTimeMenuController extends BaseController {
private
AtlTimeMenuService
atlTimeMenuService
;
private
AtlTimeMenuService
atlTimeMenuService
;
@ApiOperation
(
"插入时光纪与菜单关系"
)
@ApiOperation
(
"插入时光纪与菜单关系
(清除之前的关系 以传入最后的为准)
"
)
@RequestMapping
(
value
=
"/insertAtlTimeMenu"
,
method
=
RequestMethod
.
POST
)
@RequestMapping
(
value
=
"/insertAtlTimeMenu"
,
method
=
RequestMethod
.
POST
)
public
JsonResult
insertAtlTimeMenu
(
@ApiParam
(
value
=
"传入对象"
)
@RequestBody
InsertAtlTimeMenuParam
insertAtlTimeMenuParam
,
HttpServletRequest
request
)
{
public
JsonResult
insertAtlTimeMenu
(
@ApiParam
(
value
=
"传入对象"
)
@RequestBody
InsertAtlTimeMenuParam
insertAtlTimeMenuParam
)
{
String
token
=
request
.
getHeader
(
"token"
);
AtlUser
atlUser
=
super
.
getHeadToken
(
);
if
(
token
==
null
)
{
if
(
atlUser
==
null
)
{
return
JsonResult
.
notLogin
();
return
JsonResult
.
notLogin
();
}
}
return
this
.
atlTimeMenuService
.
insertAtlTimeMenu
(
insertAtlTimeMenuParam
);
return
this
.
atlTimeMenuService
.
insertAtlTimeMenu
(
insertAtlTimeMenuParam
);
}
}
@ApiOperation
(
"查询时光纪相关菜单"
)
@ApiOperation
(
"查询时光纪相关菜单"
)
@RequestMapping
(
value
=
"/select
TimeMenu
"
,
method
=
RequestMethod
.
GET
)
@RequestMapping
(
value
=
"/select
AtlTimeMenuListByTimeId
"
,
method
=
RequestMethod
.
GET
)
public
JsonResult
selectTimeMenu
(
@ModelAttribute
QueryAtlTimeMenuParam
queryAtlTimeMenuParam
)
{
public
JsonResult
<
List
<
AtlTimeMenuDTO
>>
selectAtlTimeMenuListByTimeId
(
@ModelAttribute
QueryAtlTimeMenuParam
queryAtlTimeMenuParam
)
{
return
this
.
atlTimeMenuService
.
selectTimeMenu
(
queryAtlTimeMenuParam
);
return
JsonResult
.
success
(
"查询成功"
,
this
.
atlTimeMenuService
.
selectAtlTimeMenuListByTimeId
(
queryAtlTimeMenuParam
)
);
}
}
@ApiOperation
(
"传入时光纪id 初始化菜单-恢复至默认情况"
)
@RequestMapping
(
value
=
"/initDefaultMenu"
,
method
=
RequestMethod
.
GET
)
public
JsonResult
initDefaultMenu
(
@ApiParam
(
value
=
"时光纪id"
,
required
=
true
)
@RequestParam
(
value
=
"timeId"
,
required
=
true
)
Long
timeId
)
{
return
this
.
atlTimeMenuService
.
initDefaultMenu
(
timeId
);
}
@ApiOperation
(
"根据id修改一条菜单信息"
)
@RequestMapping
(
value
=
"/updateAtlTimeMenuById"
,
method
=
RequestMethod
.
POST
)
public
JsonResult
updateAtlTimeMenuById
(
@ApiParam
(
value
=
"传入对象"
)
@RequestBody
AtlTimeMenu
atlTimeMenu
)
{
AtlUser
atlUser
=
super
.
getHeadToken
();
if
(
atlUser
==
null
)
{
return
JsonResult
.
notLogin
();
}
return
this
.
atlTimeMenuService
.
updateAtlTimeMenuById
(
atlTimeMenu
);
}
}
}
src/main/java/com/hwstudio/antaile/controller/BaseController.java
View file @
4ed78a78
package
com
.
hwstudio
.
antaile
.
controller
;
package
com
.
hwstudio
.
antaile
.
controller
;
import
com.hwstudio.antaile.entity.AtlUser
;
import
com.hwstudio.antaile.utils.RedisUtil
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
@@ -9,16 +11,21 @@ import java.util.Objects;
...
@@ -9,16 +11,21 @@ import java.util.Objects;
/**
/**
* 功能描述: <br>统一控制器
* 功能描述: <br>统一控制器
* 〈〉
* 〈〉
*
* @since: 1.0.0
* @since: 1.0.0
* @Author:Momo
* @Author:Momo
* @Date: 2019/5/26 17:01
* @Date: 2019/5/26 17:01
*/
*/
public
class
BaseController
{
public
class
BaseController
{
@Autowired
@Autowired
private
HttpServletRequest
request
;
private
HttpServletRequest
request
;
@Autowired
private
RedisUtil
redisUtil
;
/**
/**
* 获取userId
* 获取userId
*
* @return
* @return
*/
*/
protected
Long
getUserId
()
{
protected
Long
getUserId
()
{
...
@@ -32,4 +39,17 @@ public class BaseController {
...
@@ -32,4 +39,17 @@ public class BaseController {
return
Long
.
parseLong
(
userId
.
toString
());
return
Long
.
parseLong
(
userId
.
toString
());
}
}
/**
* 请求url中解析token 获取user对象
*
* @return
*/
public
AtlUser
getHeadToken
()
{
String
token
=
request
.
getHeader
(
"token"
);
AtlUser
atlUser
=
(
AtlUser
)
redisUtil
.
get
(
token
);
if
(
atlUser
==
null
){
return
null
;
}
return
atlUser
;
}
}
}
src/main/java/com/hwstudio/antaile/dto/AtlAppstoreDTO.java
View file @
4ed78a78
...
@@ -27,20 +27,14 @@ public class AtlAppstoreDTO implements Serializable {
...
@@ -27,20 +27,14 @@ public class AtlAppstoreDTO implements Serializable {
private
String
appName
;
private
String
appName
;
@ApiModelProperty
(
value
=
"开发者"
)
@ApiModelProperty
(
value
=
"开发者"
)
private
String
appDeveloper
;
private
String
appDeveloper
;
@ApiModelProperty
(
value
=
"应用介绍"
)
private
String
appIntroduce
;
@ApiModelProperty
(
value
=
"销量"
)
@ApiModelProperty
(
value
=
"销量"
)
private
Long
saleNum
;
private
Long
saleNum
;
@ApiModelProperty
(
value
=
"菜单名称"
)
private
String
menuName
;
@ApiModelProperty
(
value
=
"菜单链接"
)
private
String
menuUrl
;
@ApiModelProperty
(
value
=
"菜单其他链接"
)
private
String
menuOtherUrl
;
@ApiModelProperty
(
value
=
"菜单设置链接"
)
private
String
menuSetUrl
;
@ApiModelProperty
(
value
=
"原价"
)
@ApiModelProperty
(
value
=
"原价"
)
private
BigDecimal
appPrice1
;
private
BigDecimal
appPrice1
;
@ApiModelProperty
(
value
=
"现售价"
)
@ApiModelProperty
(
value
=
"现售价"
)
private
BigDecimal
app
_p
rice2
;
private
BigDecimal
app
P
rice2
;
@ApiModelProperty
(
value
=
"是否上架(0是|1否)"
)
@ApiModelProperty
(
value
=
"是否上架(0是|1否)"
)
private
Integer
isSale
;
private
Integer
isSale
;
@ApiModelProperty
(
value
=
"是否推荐(0是|1否)"
)
@ApiModelProperty
(
value
=
"是否推荐(0是|1否)"
)
...
...
src/main/java/com/hwstudio/antaile/dto/AtlTimeMenuDTO.java
View file @
4ed78a78
package
com
.
hwstudio
.
antaile
.
dto
;
package
com
.
hwstudio
.
antaile
.
dto
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.Data
;
import
java.io.Serializable
;
import
java.io.Serializable
;
...
@@ -12,5 +13,23 @@ import java.io.Serializable;
...
@@ -12,5 +13,23 @@ import java.io.Serializable;
@Data
@Data
public
class
AtlTimeMenuDTO
implements
Serializable
{
public
class
AtlTimeMenuDTO
implements
Serializable
{
@ApiModelProperty
(
value
=
"时光纪菜单id"
)
private
Long
id
;
@ApiModelProperty
(
value
=
"时光纪id"
)
private
Long
timeId
;
@ApiModelProperty
(
value
=
"菜单id"
)
private
Long
menuId
;
@ApiModelProperty
(
value
=
"是否开启(0是|1否)"
)
private
Integer
isOpen
;
@ApiModelProperty
(
value
=
"菜单排序:1最大 9999最小 顺序"
)
private
Integer
menuSort
;
@ApiModelProperty
(
value
=
"菜单名称"
)
private
String
menuName
;
@ApiModelProperty
(
value
=
"菜单类型: 0展示端"
)
private
Integer
menuType
;
@ApiModelProperty
(
value
=
"是否默认菜单(0是|1否)"
)
private
Integer
defaultMenu
;
}
}
src/main/java/com/hwstudio/antaile/entity/AtlTime.java
View file @
4ed78a78
...
@@ -42,4 +42,6 @@ public class AtlTime {
...
@@ -42,4 +42,6 @@ public class AtlTime {
private
Long
blessId
;
private
Long
blessId
;
@ApiModelProperty
(
value
=
"关联的福位格ID(ERP库osh_user_bless_using表bless_idx字段)"
)
@ApiModelProperty
(
value
=
"关联的福位格ID(ERP库osh_user_bless_using表bless_idx字段)"
)
private
Integer
blessIdx
;
private
Integer
blessIdx
;
@ApiModelProperty
(
value
=
"oss配置时光纪相关的路径"
)
private
String
ossCatalogue
;
}
}
\ No newline at end of file
src/main/java/com/hwstudio/antaile/mapper/AtlTimeMenuDao.java
View file @
4ed78a78
package
com
.
hwstudio
.
antaile
.
mapper
;
package
com
.
hwstudio
.
antaile
.
mapper
;
import
com.hwstudio.antaile.dto.AtlTimeMenuDTO
;
import
com.hwstudio.antaile.queryparam.QueryAtlTimeMenuParam
;
import
java.util.List
;
/**
/**
* @Author xh
* @Author xh
* @Date 2021/7/13
* @Date 2021/7/13
...
@@ -7,4 +12,20 @@ package com.hwstudio.antaile.mapper;
...
@@ -7,4 +12,20 @@ package com.hwstudio.antaile.mapper;
*/
*/
public
interface
AtlTimeMenuDao
{
public
interface
AtlTimeMenuDao
{
/**
* 根据时光纪查询菜单
*
* @param queryAtlTimeMenuParam
* @return
*/
List
<
AtlTimeMenuDTO
>
selectAtlTimeMenuListByTimeId
(
QueryAtlTimeMenuParam
queryAtlTimeMenuParam
);
/**
* 查询时光纪下最大的排序菜单
*
* @param timeId
* @return
*/
Integer
selectMaxSortByTimeId
(
Long
timeId
);
}
}
src/main/java/com/hwstudio/antaile/mbg/mapper/SysAtlTimeMapper.java
0 → 100644
View file @
4ed78a78
package
com
.
hwstudio
.
antaile
.
mbg
.
mapper
;
import
com.hwstudio.antaile.mbg.po.SysAtlTime
;
import
com.hwstudio.antaile.mbg.po.SysAtlTimeExample
;
import
java.util.List
;
import
org.apache.ibatis.annotations.Param
;
public
interface
SysAtlTimeMapper
{
long
countByExample
(
SysAtlTimeExample
example
);
int
deleteByExample
(
SysAtlTimeExample
example
);
int
deleteByPrimaryKey
(
Long
id
);
int
insert
(
SysAtlTime
record
);
int
insertSelective
(
SysAtlTime
record
);
List
<
SysAtlTime
>
selectByExample
(
SysAtlTimeExample
example
);
SysAtlTime
selectByPrimaryKey
(
Long
id
);
int
updateByExampleSelective
(
@Param
(
"record"
)
SysAtlTime
record
,
@Param
(
"example"
)
SysAtlTimeExample
example
);
int
updateByExample
(
@Param
(
"record"
)
SysAtlTime
record
,
@Param
(
"example"
)
SysAtlTimeExample
example
);
int
updateByPrimaryKeySelective
(
SysAtlTime
record
);
int
updateByPrimaryKey
(
SysAtlTime
record
);
}
\ No newline at end of file
src/main/java/com/hwstudio/antaile/mbg/po/AtlTimeMenu.java
View file @
4ed78a78
...
@@ -19,6 +19,12 @@ public class AtlTimeMenu implements Serializable {
...
@@ -19,6 +19,12 @@ public class AtlTimeMenu implements Serializable {
@ApiModelProperty
(
value
=
"关联菜单id"
)
@ApiModelProperty
(
value
=
"关联菜单id"
)
private
Long
menuId
;
private
Long
menuId
;
@ApiModelProperty
(
value
=
"是否开启(0是|1否)"
)
private
Integer
isOpen
;
@ApiModelProperty
(
value
=
"菜单排序:1最大 9999最小 顺序"
)
private
Integer
menuSort
;
@ApiModelProperty
(
value
=
"备注"
)
@ApiModelProperty
(
value
=
"备注"
)
private
String
remark
;
private
String
remark
;
...
@@ -56,6 +62,22 @@ public class AtlTimeMenu implements Serializable {
...
@@ -56,6 +62,22 @@ public class AtlTimeMenu implements Serializable {
this
.
menuId
=
menuId
;
this
.
menuId
=
menuId
;
}
}
public
Integer
getIsOpen
()
{
return
isOpen
;
}
public
void
setIsOpen
(
Integer
isOpen
)
{
this
.
isOpen
=
isOpen
;
}
public
Integer
getMenuSort
()
{
return
menuSort
;
}
public
void
setMenuSort
(
Integer
menuSort
)
{
this
.
menuSort
=
menuSort
;
}
public
String
getRemark
()
{
public
String
getRemark
()
{
return
remark
;
return
remark
;
}
}
...
@@ -89,6 +111,8 @@ public class AtlTimeMenu implements Serializable {
...
@@ -89,6 +111,8 @@ public class AtlTimeMenu implements Serializable {
sb
.
append
(
", id="
).
append
(
id
);
sb
.
append
(
", id="
).
append
(
id
);
sb
.
append
(
", timeId="
).
append
(
timeId
);
sb
.
append
(
", timeId="
).
append
(
timeId
);
sb
.
append
(
", menuId="
).
append
(
menuId
);
sb
.
append
(
", menuId="
).
append
(
menuId
);
sb
.
append
(
", isOpen="
).
append
(
isOpen
);
sb
.
append
(
", menuSort="
).
append
(
menuSort
);
sb
.
append
(
", remark="
).
append
(
remark
);
sb
.
append
(
", remark="
).
append
(
remark
);
sb
.
append
(
", createTime="
).
append
(
createTime
);
sb
.
append
(
", createTime="
).
append
(
createTime
);
sb
.
append
(
", updateTime="
).
append
(
updateTime
);
sb
.
append
(
", updateTime="
).
append
(
updateTime
);
...
...
src/main/java/com/hwstudio/antaile/mbg/po/AtlTimeMenuExample.java
View file @
4ed78a78
...
@@ -285,6 +285,126 @@ public class AtlTimeMenuExample {
...
@@ -285,6 +285,126 @@ public class AtlTimeMenuExample {
return
(
Criteria
)
this
;
return
(
Criteria
)
this
;
}
}
public
Criteria
andIsOpenIsNull
()
{
addCriterion
(
"is_open is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIsOpenIsNotNull
()
{
addCriterion
(
"is_open is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIsOpenEqualTo
(
Integer
value
)
{
addCriterion
(
"is_open ="
,
value
,
"isOpen"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIsOpenNotEqualTo
(
Integer
value
)
{
addCriterion
(
"is_open <>"
,
value
,
"isOpen"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIsOpenGreaterThan
(
Integer
value
)
{
addCriterion
(
"is_open >"
,
value
,
"isOpen"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIsOpenGreaterThanOrEqualTo
(
Integer
value
)
{
addCriterion
(
"is_open >="
,
value
,
"isOpen"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIsOpenLessThan
(
Integer
value
)
{
addCriterion
(
"is_open <"
,
value
,
"isOpen"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIsOpenLessThanOrEqualTo
(
Integer
value
)
{
addCriterion
(
"is_open <="
,
value
,
"isOpen"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIsOpenIn
(
List
<
Integer
>
values
)
{
addCriterion
(
"is_open in"
,
values
,
"isOpen"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIsOpenNotIn
(
List
<
Integer
>
values
)
{
addCriterion
(
"is_open not in"
,
values
,
"isOpen"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIsOpenBetween
(
Integer
value1
,
Integer
value2
)
{
addCriterion
(
"is_open between"
,
value1
,
value2
,
"isOpen"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIsOpenNotBetween
(
Integer
value1
,
Integer
value2
)
{
addCriterion
(
"is_open not between"
,
value1
,
value2
,
"isOpen"
);
return
(
Criteria
)
this
;
}
public
Criteria
andMenuSortIsNull
()
{
addCriterion
(
"menu_sort is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andMenuSortIsNotNull
()
{
addCriterion
(
"menu_sort is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andMenuSortEqualTo
(
Integer
value
)
{
addCriterion
(
"menu_sort ="
,
value
,
"menuSort"
);
return
(
Criteria
)
this
;
}
public
Criteria
andMenuSortNotEqualTo
(
Integer
value
)
{
addCriterion
(
"menu_sort <>"
,
value
,
"menuSort"
);
return
(
Criteria
)
this
;
}
public
Criteria
andMenuSortGreaterThan
(
Integer
value
)
{
addCriterion
(
"menu_sort >"
,
value
,
"menuSort"
);
return
(
Criteria
)
this
;
}
public
Criteria
andMenuSortGreaterThanOrEqualTo
(
Integer
value
)
{
addCriterion
(
"menu_sort >="
,
value
,
"menuSort"
);
return
(
Criteria
)
this
;
}
public
Criteria
andMenuSortLessThan
(
Integer
value
)
{
addCriterion
(
"menu_sort <"
,
value
,
"menuSort"
);
return
(
Criteria
)
this
;
}
public
Criteria
andMenuSortLessThanOrEqualTo
(
Integer
value
)
{
addCriterion
(
"menu_sort <="
,
value
,
"menuSort"
);
return
(
Criteria
)
this
;
}
public
Criteria
andMenuSortIn
(
List
<
Integer
>
values
)
{
addCriterion
(
"menu_sort in"
,
values
,
"menuSort"
);
return
(
Criteria
)
this
;
}
public
Criteria
andMenuSortNotIn
(
List
<
Integer
>
values
)
{
addCriterion
(
"menu_sort not in"
,
values
,
"menuSort"
);
return
(
Criteria
)
this
;
}
public
Criteria
andMenuSortBetween
(
Integer
value1
,
Integer
value2
)
{
addCriterion
(
"menu_sort between"
,
value1
,
value2
,
"menuSort"
);
return
(
Criteria
)
this
;
}
public
Criteria
andMenuSortNotBetween
(
Integer
value1
,
Integer
value2
)
{
addCriterion
(
"menu_sort not between"
,
value1
,
value2
,
"menuSort"
);
return
(
Criteria
)
this
;
}
public
Criteria
andRemarkIsNull
()
{
public
Criteria
andRemarkIsNull
()
{
addCriterion
(
"remark is null"
);
addCriterion
(
"remark is null"
);
return
(
Criteria
)
this
;
return
(
Criteria
)
this
;
...
...
src/main/java/com/hwstudio/antaile/mbg/po/SysAtlTime.java
0 → 100644
View file @
4ed78a78
package
com
.
hwstudio
.
antaile
.
mbg
.
po
;
import
io.swagger.annotations.ApiModelProperty
;
import
java.io.Serializable
;
import
java.util.Date
;
import
javax.persistence.*
;
import
org.springframework.format.annotation.DateTimeFormat
;
@Entity
public
class
SysAtlTime
implements
Serializable
{
@ApiModelProperty
(
value
=
"主键"
)
@Id
@GeneratedValue
(
strategy
=
GenerationType
.
IDENTITY
)
private
Long
id
;
@ApiModelProperty
(
value
=
"用户id"
)
private
Long
userId
;
@ApiModelProperty
(
value
=
"模板id"
)
private
Long
templateId
;
@ApiModelProperty
(
value
=
"名称"
)
private
String
name
;
@ApiModelProperty
(
value
=
"关于谁"
)
private
String
aboutName
;
@ApiModelProperty
(
value
=
"封面图"
)
private
String
coverUrl
;
@ApiModelProperty
(
value
=
"域名"
)
private
String
secondUrl
;
@ApiModelProperty
(
value
=
"隐私设置"
)
private
Integer
privacySetting
;
@ApiModelProperty
(
value
=
"状态 0-删除 1-正常"
)
private
Integer
status
;
@ApiModelProperty
(
value
=
"备注"
)
private
String
remarks
;
@ApiModelProperty
(
value
=
"创建时间"
)
@DateTimeFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
private
Date
createDate
;
@ApiModelProperty
(
value
=
"修改时间"
)
@DateTimeFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
private
Date
updateDate
;
@ApiModelProperty
(
value
=
"是否默认 0-否 1-是"
)
private
Integer
isDefault
;
@ApiModelProperty
(
value
=
"二维码地址"
)
private
String
codeUrl
;
@ApiModelProperty
(
value
=
"是否首页推荐 0-否 1-是"
)
private
Integer
isCommend
;
@ApiModelProperty
(
value
=
"是否频道页推荐 0-否 1-是"
)
private
Integer
isChannelCommend
;
@ApiModelProperty
(
value
=
"是否发现页推荐 0-否 1-是"
)
private
Integer
isFindCommend
;
@ApiModelProperty
(
value
=
"阅读量"
)
private
Integer
readCount
;
@ApiModelProperty
(
value
=
"喜欢量"
)
private
Integer
likeCount
;
@ApiModelProperty
(
value
=
"自传书id"
)
private
Long
autobiographyId
;
@ApiModelProperty
(
value
=
"是否快捷发布"
)
private
Integer
isQuickDefault
;
@ApiModelProperty
(
value
=
"福位晋塔ID(ERP库osh_user_bless_using表ID字段)"
)
private
Long
blessUsingId
;
@ApiModelProperty
(
value
=
"关联的福位ID(ERP库osh_user_bless_using表bless_id字段)"
)
private
Long
blessId
;
@ApiModelProperty
(
value
=
"关联的福位格ID(ERP库osh_user_bless_using表bless_idx字段)"
)
private
Integer
blessIdx
;
@ApiModelProperty
(
value
=
"oss配置时光纪相关的路径"
)
private
String
ossCatalogue
;
private
static
final
long
serialVersionUID
=
1L
;
public
Long
getId
()
{
return
id
;
}
public
void
setId
(
Long
id
)
{
this
.
id
=
id
;
}
public
Long
getUserId
()
{
return
userId
;
}
public
void
setUserId
(
Long
userId
)
{
this
.
userId
=
userId
;
}
public
Long
getTemplateId
()
{
return
templateId
;
}
public
void
setTemplateId
(
Long
templateId
)
{
this
.
templateId
=
templateId
;
}
public
String
getName
()
{
return
name
;
}
public
void
setName
(
String
name
)
{
this
.
name
=
name
;
}
public
String
getAboutName
()
{
return
aboutName
;
}
public
void
setAboutName
(
String
aboutName
)
{
this
.
aboutName
=
aboutName
;
}
public
String
getCoverUrl
()
{
return
coverUrl
;
}
public
void
setCoverUrl
(
String
coverUrl
)
{
this
.
coverUrl
=
coverUrl
;
}
public
String
getSecondUrl
()
{
return
secondUrl
;
}
public
void
setSecondUrl
(
String
secondUrl
)
{
this
.
secondUrl
=
secondUrl
;
}
public
Integer
getPrivacySetting
()
{
return
privacySetting
;
}
public
void
setPrivacySetting
(
Integer
privacySetting
)
{
this
.
privacySetting
=
privacySetting
;
}
public
Integer
getStatus
()
{
return
status
;
}
public
void
setStatus
(
Integer
status
)
{
this
.
status
=
status
;
}
public
String
getRemarks
()
{
return
remarks
;
}
public
void
setRemarks
(
String
remarks
)
{
this
.
remarks
=
remarks
;
}
public
Date
getCreateDate
()
{
return
createDate
;
}
public
void
setCreateDate
(
Date
createDate
)
{
this
.
createDate
=
createDate
;
}
public
Date
getUpdateDate
()
{
return
updateDate
;
}
public
void
setUpdateDate
(
Date
updateDate
)
{
this
.
updateDate
=
updateDate
;
}
public
Integer
getIsDefault
()
{
return
isDefault
;
}
public
void
setIsDefault
(
Integer
isDefault
)
{
this
.
isDefault
=
isDefault
;
}
public
String
getCodeUrl
()
{
return
codeUrl
;
}
public
void
setCodeUrl
(
String
codeUrl
)
{
this
.
codeUrl
=
codeUrl
;
}
public
Integer
getIsCommend
()
{
return
isCommend
;
}
public
void
setIsCommend
(
Integer
isCommend
)
{
this
.
isCommend
=
isCommend
;
}
public
Integer
getIsChannelCommend
()
{
return
isChannelCommend
;
}
public
void
setIsChannelCommend
(
Integer
isChannelCommend
)
{
this
.
isChannelCommend
=
isChannelCommend
;
}
public
Integer
getIsFindCommend
()
{
return
isFindCommend
;
}
public
void
setIsFindCommend
(
Integer
isFindCommend
)
{
this
.
isFindCommend
=
isFindCommend
;
}
public
Integer
getReadCount
()
{
return
readCount
;
}
public
void
setReadCount
(
Integer
readCount
)
{
this
.
readCount
=
readCount
;
}
public
Integer
getLikeCount
()
{
return
likeCount
;
}
public
void
setLikeCount
(
Integer
likeCount
)
{
this
.
likeCount
=
likeCount
;
}
public
Long
getAutobiographyId
()
{
return
autobiographyId
;
}
public
void
setAutobiographyId
(
Long
autobiographyId
)
{
this
.
autobiographyId
=
autobiographyId
;
}
public
Integer
getIsQuickDefault
()
{
return
isQuickDefault
;
}
public
void
setIsQuickDefault
(
Integer
isQuickDefault
)
{
this
.
isQuickDefault
=
isQuickDefault
;
}
public
Long
getBlessUsingId
()
{
return
blessUsingId
;
}
public
void
setBlessUsingId
(
Long
blessUsingId
)
{
this
.
blessUsingId
=
blessUsingId
;
}
public
Long
getBlessId
()
{
return
blessId
;
}
public
void
setBlessId
(
Long
blessId
)
{
this
.
blessId
=
blessId
;
}
public
Integer
getBlessIdx
()
{
return
blessIdx
;
}
public
void
setBlessIdx
(
Integer
blessIdx
)
{
this
.
blessIdx
=
blessIdx
;
}
public
String
getOssCatalogue
()
{
return
ossCatalogue
;
}
public
void
setOssCatalogue
(
String
ossCatalogue
)
{
this
.
ossCatalogue
=
ossCatalogue
;
}
@Override
public
String
toString
()
{
StringBuilder
sb
=
new
StringBuilder
();
sb
.
append
(
getClass
().
getSimpleName
());
sb
.
append
(
" ["
);
sb
.
append
(
"Hash = "
).
append
(
hashCode
());
sb
.
append
(
", id="
).
append
(
id
);
sb
.
append
(
", userId="
).
append
(
userId
);
sb
.
append
(
", templateId="
).
append
(
templateId
);
sb
.
append
(
", name="
).
append
(
name
);
sb
.
append
(
", aboutName="
).
append
(
aboutName
);
sb
.
append
(
", coverUrl="
).
append
(
coverUrl
);
sb
.
append
(
", secondUrl="
).
append
(
secondUrl
);
sb
.
append
(
", privacySetting="
).
append
(
privacySetting
);
sb
.
append
(
", status="
).
append
(
status
);
sb
.
append
(
", remarks="
).
append
(
remarks
);
sb
.
append
(
", createDate="
).
append
(
createDate
);
sb
.
append
(
", updateDate="
).
append
(
updateDate
);
sb
.
append
(
", isDefault="
).
append
(
isDefault
);
sb
.
append
(
", codeUrl="
).
append
(
codeUrl
);
sb
.
append
(
", isCommend="
).
append
(
isCommend
);
sb
.
append
(
", isChannelCommend="
).
append
(
isChannelCommend
);
sb
.
append
(
", isFindCommend="
).
append
(
isFindCommend
);
sb
.
append
(
", readCount="
).
append
(
readCount
);
sb
.
append
(
", likeCount="
).
append
(
likeCount
);
sb
.
append
(
", autobiographyId="
).
append
(
autobiographyId
);
sb
.
append
(
", isQuickDefault="
).
append
(
isQuickDefault
);
sb
.
append
(
", blessUsingId="
).
append
(
blessUsingId
);
sb
.
append
(
", blessId="
).
append
(
blessId
);
sb
.
append
(
", blessIdx="
).
append
(
blessIdx
);
sb
.
append
(
", ossCatalogue="
).
append
(
ossCatalogue
);
sb
.
append
(
", serialVersionUID="
).
append
(
serialVersionUID
);
sb
.
append
(
"]"
);
return
sb
.
toString
();
}
}
\ No newline at end of file
src/main/java/com/hwstudio/antaile/mbg/po/SysAtlTimeExample.java
0 → 100644
View file @
4ed78a78
This diff is collapsed.
Click to expand it.
src/main/java/com/hwstudio/antaile/queryparam/QueryAtlTimeMenuParam.java
View file @
4ed78a78
...
@@ -15,7 +15,8 @@ public class QueryAtlTimeMenuParam implements Serializable {
...
@@ -15,7 +15,8 @@ public class QueryAtlTimeMenuParam implements Serializable {
@ApiModelProperty
(
value
=
"时光纪id"
)
@ApiModelProperty
(
value
=
"时光纪id"
)
private
Long
timeId
;
private
Long
timeId
;
@ApiModelProperty
(
value
=
"是否需要查询默认菜单 0是 1否
"
)
@ApiModelProperty
(
value
=
"是否需要查询默认菜单 0是 1否
,根据条件传入,可以不传"
,
required
=
false
)
private
Integer
isQueryDefault
;
private
Integer
isQueryDefault
;
@ApiModelProperty
(
value
=
"是否开启(0是|1否)"
,
required
=
false
)
private
Integer
isOpen
;
}
}
src/main/java/com/hwstudio/antaile/service/AtlAppStoreOrderService.java
View file @
4ed78a78
...
@@ -168,7 +168,7 @@ public class AtlAppStoreOrderService {
...
@@ -168,7 +168,7 @@ public class AtlAppStoreOrderService {
//是否支付(0是|1否)
//是否支付(0是|1否)
criteria
.
andIsPayEqualTo
(
0
);
criteria
.
andIsPayEqualTo
(
0
);
List
<
AtlAppstoreOrder
>
atlAppstoreOrders
=
this
.
atlAppstoreOrderMapper
.
selectByExample
(
example
);
List
<
AtlAppstoreOrder
>
atlAppstoreOrders
=
this
.
atlAppstoreOrderMapper
.
selectByExample
(
example
);
if
(
atlAppstoreOrders
!=
null
&&
atlAppstoreOrders
.
size
()
>
=
0
)
{
if
(
atlAppstoreOrders
!=
null
&&
atlAppstoreOrders
.
size
()
>
0
)
{
return
true
;
return
true
;
}
}
return
false
;
return
false
;
...
...
src/main/java/com/hwstudio/antaile/service/AtlTimeMenuService.java
View file @
4ed78a78
package
com
.
hwstudio
.
antaile
.
service
;
package
com
.
hwstudio
.
antaile
.
service
;
import
com.hwstudio.antaile.InsertParam.InsertAtlTimeMenuParam
;
import
com.hwstudio.antaile.InsertParam.InsertAtlTimeMenuParam
;
import
com.hwstudio.antaile.dto.AtlTimeMenuDTO
;
import
com.hwstudio.antaile.mapper.AtlTimeMenuDao
;
import
com.hwstudio.antaile.mbg.mapper.AtlMenuMapper
;
import
com.hwstudio.antaile.mbg.mapper.AtlMenuMapper
;
import
com.hwstudio.antaile.mbg.mapper.AtlTimeMenuMapper
;
import
com.hwstudio.antaile.mbg.mapper.AtlTimeMenuMapper
;
import
com.hwstudio.antaile.mbg.po.AtlMenu
;
import
com.hwstudio.antaile.mbg.po.AtlMenu
;
...
@@ -28,7 +30,8 @@ public class AtlTimeMenuService {
...
@@ -28,7 +30,8 @@ public class AtlTimeMenuService {
private
AtlTimeMenuMapper
atlTimeMenuMapper
;
private
AtlTimeMenuMapper
atlTimeMenuMapper
;
@Resource
@Resource
private
AtlMenuMapper
atlMenuMapper
;
private
AtlMenuMapper
atlMenuMapper
;
@Resource
private
AtlTimeMenuDao
atlTimeMenuDao
;
/**
/**
* 插入时光纪与菜单关系
* 插入时光纪与菜单关系
...
@@ -44,22 +47,39 @@ public class AtlTimeMenuService {
...
@@ -44,22 +47,39 @@ public class AtlTimeMenuService {
if
(
insertAtlTimeMenuParam
.
getMenuIds
()
==
null
||
insertAtlTimeMenuParam
.
getMenuIds
().
isEmpty
())
{
if
(
insertAtlTimeMenuParam
.
getMenuIds
()
==
null
||
insertAtlTimeMenuParam
.
getMenuIds
().
isEmpty
())
{
return
JsonResult
.
failed
(
"传入菜单ids为空"
);
return
JsonResult
.
failed
(
"传入菜单ids为空"
);
}
}
//插入前先将之前时光纪id 与菜单清除
AtlTimeMenuExample
example
=
new
AtlTimeMenuExample
();
AtlTimeMenuExample
.
Criteria
criteria
=
example
.
createCriteria
();
criteria
.
andTimeIdEqualTo
(
insertAtlTimeMenuParam
.
getTimeId
());
this
.
atlTimeMenuMapper
.
deleteByExample
(
example
);
//循环插入
//循环插入
String
[]
menuIdList
=
insertAtlTimeMenuParam
.
getMenuIds
().
split
(
","
);
String
[]
menuIdList
=
insertAtlTimeMenuParam
.
getMenuIds
().
split
(
","
);
AtlTimeMenu
atlTimeMenu
=
new
AtlTimeMenu
();
AtlTimeMenu
atlTimeMenu
=
new
AtlTimeMenu
();
atlTimeMenu
.
setTimeId
(
insertAtlTimeMenuParam
.
getTimeId
());
atlTimeMenu
.
setTimeId
(
insertAtlTimeMenuParam
.
getTimeId
());
for
(
String
menuId
:
menuIdList
)
{
for
(
String
menuId
:
menuIdList
)
{
atlTimeMenu
.
setMenuId
(
Long
.
valueOf
(
menuId
));
Long
menuIdLong
=
Long
.
valueOf
(
menuId
);
this
.
atlTimeMenuMapper
.
insertSelective
(
atlTimeMenu
);
AtlTimeMenu
atm
=
this
.
queryOneByTimeIdAndMenuId
(
insertAtlTimeMenuParam
.
getTimeId
(),
menuIdLong
);
if
(
atm
==
null
)
{
atlTimeMenu
.
setMenuId
(
menuIdLong
);
//设置排序
atlTimeMenu
.
setMenuSort
(
this
.
atlTimeMenuDao
.
selectMaxSortByTimeId
(
insertAtlTimeMenuParam
.
getTimeId
())
+
1
);
this
.
atlTimeMenuMapper
.
insertSelective
(
atlTimeMenu
);
}
else
{
//存在则打开
atm
.
setIsOpen
(
1
);
this
.
atlTimeMenuMapper
.
updateByPrimaryKeySelective
(
atm
);
}
}
}
return
JsonResult
.
success
(
"操作成功"
);
return
JsonResult
.
success
(
"操作成功"
);
}
}
public
AtlTimeMenu
queryOneByTimeIdAndMenuId
(
Long
timeId
,
Long
menuId
)
{
AtlTimeMenuExample
example
=
new
AtlTimeMenuExample
();
AtlTimeMenuExample
.
Criteria
criteria
=
example
.
createCriteria
();
criteria
.
andTimeIdEqualTo
(
timeId
);
criteria
.
andMenuIdEqualTo
(
menuId
);
List
<
AtlTimeMenu
>
atlTimeMenuList
=
this
.
atlTimeMenuMapper
.
selectByExample
(
example
);
if
(
atlTimeMenuList
!=
null
&&
atlTimeMenuList
.
size
()
>
0
)
{
return
atlTimeMenuList
.
get
(
0
);
}
return
null
;
}
/**
/**
* 查询时光纪相关菜单
* 查询时光纪相关菜单
*
*
...
@@ -88,22 +108,80 @@ public class AtlTimeMenuService {
...
@@ -88,22 +108,80 @@ public class AtlTimeMenuService {
}
}
//如果需要查询默认菜单
//如果需要查询默认菜单
if
(
queryAtlTimeMenuParam
.
getIsQueryDefault
().
equals
(
0
))
{
if
(
queryAtlTimeMenuParam
.
getIsQueryDefault
().
equals
(
0
))
{
//查询默认菜单 一起返回
List
<
AtlMenu
>
atlMenuList1
=
this
.
getDefaultMenu
();
AtlMenuExample
exampleMenu
=
new
AtlMenuExample
();
AtlMenuExample
.
Criteria
criteriaMenu
=
exampleMenu
.
createCriteria
();
//是否显示 0隐藏 1显示
criteriaMenu
.
andIsShowEqualTo
(
1
);
//数据标识 0无效 1有效
criteriaMenu
.
andDataFlagEqualTo
(
1
);
//是否默认菜单(0是|1否)
criteriaMenu
.
andDefaultMenuEqualTo
(
0
);
//删除标志(0|正常|1删除)
criteriaMenu
.
andIsDeleteEqualTo
(
0
);
List
<
AtlMenu
>
atlMenuList1
=
this
.
atlMenuMapper
.
selectByExample
(
exampleMenu
);
//全部加入到上面的List去
//全部加入到上面的List去
atlMenuList
.
addAll
(
atlMenuList1
);
atlMenuList
.
addAll
(
atlMenuList1
);
}
}
return
JsonResult
.
success
(
"查询菜单成功"
,
atlMenuList
);
return
JsonResult
.
success
(
"查询菜单成功"
,
atlMenuList
);
}
}
/**
* 传入时光纪id 初始化菜单-恢复至默认情况
*
* @param timeId
* @return
*/
public
JsonResult
initDefaultMenu
(
Long
timeId
)
{
//插入前先将之前时光纪id 与菜单清除
AtlTimeMenuExample
example
=
new
AtlTimeMenuExample
();
AtlTimeMenuExample
.
Criteria
criteria
=
example
.
createCriteria
();
criteria
.
andTimeIdEqualTo
(
timeId
);
this
.
atlTimeMenuMapper
.
deleteByExample
(
example
);
List
<
AtlMenu
>
atlMenuList
=
this
.
getDefaultMenu
();
if
(
atlMenuList
!=
null
&&
atlMenuList
.
size
()
>
0
)
{
AtlTimeMenu
atlTimeMenu
=
new
AtlTimeMenu
();
atlTimeMenu
.
setTimeId
(
timeId
);
for
(
int
i
=
0
;
i
<
atlMenuList
.
size
();
i
++)
{
atlTimeMenu
.
setMenuId
(
atlMenuList
.
get
(
i
).
getId
());
//默认从1开始排序下去
atlTimeMenu
.
setMenuSort
(
i
+
1
);
this
.
atlTimeMenuMapper
.
insertSelective
(
atlTimeMenu
);
}
}
return
JsonResult
.
success
(
"初始化默认菜单成功"
);
}
/**
* 根据时光纪id 查询相关菜单数据
*
* @param queryAtlTimeMenuParam
* @return
*/
public
List
<
AtlTimeMenuDTO
>
selectAtlTimeMenuListByTimeId
(
QueryAtlTimeMenuParam
queryAtlTimeMenuParam
)
{
return
this
.
atlTimeMenuDao
.
selectAtlTimeMenuListByTimeId
(
queryAtlTimeMenuParam
);
}
/**
* 根据id修改一条菜单信息
* @param atlTimeMenu
* @return
*/
public
JsonResult
updateAtlTimeMenuById
(
AtlTimeMenu
atlTimeMenu
){
if
(
atlTimeMenu
.
getId
()
==
null
){
return
JsonResult
.
failed
(
"传入id为空"
);
}
this
.
atlTimeMenuMapper
.
updateByPrimaryKeySelective
(
atlTimeMenu
);
return
JsonResult
.
success
(
"操作成功"
);
}
/**
* 得到默认菜单
*
* @return
*/
public
List
<
AtlMenu
>
getDefaultMenu
()
{
//查询默认菜单 一起返回
AtlMenuExample
exampleMenu
=
new
AtlMenuExample
();
AtlMenuExample
.
Criteria
criteriaMenu
=
exampleMenu
.
createCriteria
();
//是否显示 0隐藏 1显示
criteriaMenu
.
andIsShowEqualTo
(
1
);
//数据标识 0无效 1有效
criteriaMenu
.
andDataFlagEqualTo
(
1
);
//是否默认菜单(0是|1否)
criteriaMenu
.
andDefaultMenuEqualTo
(
0
);
//删除标志(0|正常|1删除)
criteriaMenu
.
andIsDeleteEqualTo
(
0
);
return
this
.
atlMenuMapper
.
selectByExample
(
exampleMenu
);
}
}
}
src/main/java/com/hwstudio/antaile/service/AtlTimeService.java
View file @
4ed78a78
...
@@ -10,6 +10,8 @@ import com.hwstudio.antaile.dto.*;
...
@@ -10,6 +10,8 @@ import com.hwstudio.antaile.dto.*;
import
com.hwstudio.antaile.entity.*
;
import
com.hwstudio.antaile.entity.*
;
import
com.hwstudio.antaile.exception.BusinessException
;
import
com.hwstudio.antaile.exception.BusinessException
;
import
com.hwstudio.antaile.mapper.*
;
import
com.hwstudio.antaile.mapper.*
;
import
com.hwstudio.antaile.mbg.mapper.SysAtlTimeMapper
;
import
com.hwstudio.antaile.mbg.po.SysAtlTime
;
import
com.hwstudio.antaile.queryparam.QueryAtlTimeByBlessIdAndIdxParam
;
import
com.hwstudio.antaile.queryparam.QueryAtlTimeByBlessIdAndIdxParam
;
import
com.hwstudio.antaile.queryparam.QueryAtlTimeCountParam
;
import
com.hwstudio.antaile.queryparam.QueryAtlTimeCountParam
;
import
com.hwstudio.antaile.utils.CommonPage
;
import
com.hwstudio.antaile.utils.CommonPage
;
...
@@ -55,6 +57,8 @@ public class AtlTimeService {
...
@@ -55,6 +57,8 @@ public class AtlTimeService {
private
AtlTimeArticleFileMapper
atlTimeArticleFileMapper
;
private
AtlTimeArticleFileMapper
atlTimeArticleFileMapper
;
@Resource
@Resource
private
AtlTimeMessageMapper
atlTimeMessageMapper
;
private
AtlTimeMessageMapper
atlTimeMessageMapper
;
@Resource
private
SysAtlTimeMapper
sysAtlTimeMapper
;
/**
/**
* 新增时光纪
* 新增时光纪
...
@@ -868,5 +872,21 @@ public class AtlTimeService {
...
@@ -868,5 +872,21 @@ public class AtlTimeService {
}
}
return
JsonResult
.
success
(
"查询成功"
,
atlTimeDTOList
);
return
JsonResult
.
success
(
"查询成功"
,
atlTimeDTOList
);
}
}
/**
* 根据时光纪id修改一条时光纪数据
*
* @param sysAtlTime
* @return
*/
public
JsonResult
updateByTimeId
(
SysAtlTime
sysAtlTime
)
{
if
(
sysAtlTime
.
getId
()
==
null
){
return
JsonResult
.
failed
(
"传入时光纪id为空"
);
}
this
.
sysAtlTimeMapper
.
updateByPrimaryKeySelective
(
sysAtlTime
);
return
JsonResult
.
success
(
"操作成功"
);
}
}
}
src/main/java/com/hwstudio/antaile/utils/JsonResult.java
View file @
4ed78a78
...
@@ -5,14 +5,15 @@ import io.swagger.annotations.ApiModel;
...
@@ -5,14 +5,15 @@ import io.swagger.annotations.ApiModel;
import
io.swagger.annotations.ApiModelProperty
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.Data
;
import
java.io.Serializable
;
/**
/**
* JsonResult
* JsonResult
* @author whj
* @author whj
* @date 2018/7/29 22:19
* @date 2018/7/29 22:19
*/
*/
@Data
@Data
@ApiModel
public
class
JsonResult
<
T
>
implements
Serializable
{
public
class
JsonResult
<
T
>
{
@ApiModelProperty
(
name
=
"success"
,
value
=
"是否正常通讯"
)
@ApiModelProperty
(
name
=
"success"
,
value
=
"是否正常通讯"
)
private
Boolean
success
=
Boolean
.
TRUE
;
private
Boolean
success
=
Boolean
.
TRUE
;
@ApiModelProperty
(
name
=
"status"
,
value
=
"状态码,200:OK,401:未登录,500:错误"
)
@ApiModelProperty
(
name
=
"status"
,
value
=
"状态码,200:OK,401:未登录,500:错误"
)
...
@@ -21,6 +22,8 @@ public class JsonResult<T> {
...
@@ -21,6 +22,8 @@ public class JsonResult<T> {
private
String
message
;
private
String
message
;
@ApiModelProperty
(
name
=
"data"
,
value
=
"返回数据"
)
@ApiModelProperty
(
name
=
"data"
,
value
=
"返回数据"
)
private
Object
data
;
private
Object
data
;
@ApiModelProperty
(
value
=
"返回结果"
)
private
T
result
;
public
static
JsonResult
success
()
{
public
static
JsonResult
success
()
{
JsonResult
res
=
new
JsonResult
();
JsonResult
res
=
new
JsonResult
();
...
...
src/main/resources/mapping/AtlAppstoreDao.xml
View file @
4ed78a78
...
@@ -4,7 +4,8 @@
...
@@ -4,7 +4,8 @@
<select
id=
"selectAtlAppstoreListByOther"
parameterType=
"com.hwstudio.antaile.queryparam.QueryAtlAppstoreParam"
resultType=
"com.hwstudio.antaile.dto.AtlAppstoreDTO"
>
<select
id=
"selectAtlAppstoreListByOther"
parameterType=
"com.hwstudio.antaile.queryparam.QueryAtlAppstoreParam"
resultType=
"com.hwstudio.antaile.dto.AtlAppstoreDTO"
>
select
select
a.id,a.cats_id catsId,a.app_id appId,a.app_images appImages,a.app_developer appDeveloper,a.app_price1 appPrice1,a.app_price2 appPrice2,
a.id,a.cats_id catsId,a.app_id appId,a.app_name appName,a.app_images appImages,a.app_developer appDeveloper,
a.app_introduce appIntroduce,a.app_price1 appPrice1,a.app_price2 appPrice2,
a.sale_num saleNum,a.is_sale isSale,a.is_recom isRecom,a.is_menu isMenu,a.menu_id menuId,a.create_time createTime,
a.sale_num saleNum,a.is_sale isSale,a.is_recom isRecom,a.is_menu isMenu,a.menu_id menuId,a.create_time createTime,
b.name catsName
b.name catsName
from atl_appstore a
from atl_appstore a
...
...
src/main/resources/mapping/AtlAppstoreOrderDao.xml
View file @
4ed78a78
...
@@ -25,11 +25,13 @@
...
@@ -25,11 +25,13 @@
b.app_name appName,b.app_developer appDeveloper,b.app_name appName,
b.app_name appName,b.app_developer appDeveloper,b.app_name appName,
b.app_introduce appIntroduce,b.app_images appImages,b.is_menu isMenu,b.menu_id menuId,
b.app_introduce appIntroduce,b.app_images appImages,b.is_menu isMenu,b.menu_id menuId,
c.menu_name menuName,
c.menu_name menuName,
d.name catsName,
count(a.app_id) buyNumber
count(a.app_id) buyNumber
from
from
atl_appstore_order a
atl_appstore_order a
left join atl_appstore b ON a.app_id = b.app_id
left join atl_appstore b ON a.app_id = b.app_id
left join atl_menu c ON b.menu_id = c.id
left join atl_menu c ON b.menu_id = c.id
left join atl_appstore_cats d ON b.cats_id = d.id
where 1 = 1
where 1 = 1
and a.is_pay = 0
and a.is_pay = 0
<if
test=
"userId != null"
>
<if
test=
"userId != null"
>
...
...
src/main/resources/mapping/AtlTimeMenuDao.xml
View file @
4ed78a78
...
@@ -3,4 +3,25 @@
...
@@ -3,4 +3,25 @@
<mapper
namespace=
"com.hwstudio.antaile.mapper.AtlTimeMenuDao"
>
<mapper
namespace=
"com.hwstudio.antaile.mapper.AtlTimeMenuDao"
>
<select
id=
"selectAtlTimeMenuListByTimeId"
parameterType=
"com.hwstudio.antaile.queryparam.QueryAtlTimeMenuParam"
resultType=
"com.hwstudio.antaile.dto.AtlTimeMenuDTO"
>
select
a.id,a.time_id timeId,a.menu_id menuId,a.is_open isOpen,a.menu_sort menuSort,
b.menu_name menuName,b.menu_type menuType,b.default_menu defaultMenu
from atl_time_menu a
left join atl_menu b ON a.menu_id = b.id
where a.time_id = #{timeId}
<if
test=
"isQueryDefault != null"
>
and b.default_menu =#{isQueryDefault}
</if>
<if
test=
"isOpen != null"
>
and a.is_open =#{isOpen}
</if>
order by a.menu_sort asc
</select>
<select
id=
"selectMaxSortByTimeId"
parameterType=
"java.lang.Long"
resultType=
"java.lang.Integer"
>
select IFNULL(max(menu_sort),0)
from atl_time_menu
where time_id = #{timeId}
</select>
</mapper>
</mapper>
\ No newline at end of file
src/main/resources/mapping/mbg/AtlTimeMenuMapper.xml
View file @
4ed78a78
...
@@ -5,6 +5,8 @@
...
@@ -5,6 +5,8 @@
<id
column=
"id"
jdbcType=
"BIGINT"
property=
"id"
/>
<id
column=
"id"
jdbcType=
"BIGINT"
property=
"id"
/>
<result
column=
"time_id"
jdbcType=
"BIGINT"
property=
"timeId"
/>
<result
column=
"time_id"
jdbcType=
"BIGINT"
property=
"timeId"
/>
<result
column=
"menu_id"
jdbcType=
"BIGINT"
property=
"menuId"
/>
<result
column=
"menu_id"
jdbcType=
"BIGINT"
property=
"menuId"
/>
<result
column=
"is_open"
jdbcType=
"TINYINT"
property=
"isOpen"
/>
<result
column=
"menu_sort"
jdbcType=
"INTEGER"
property=
"menuSort"
/>
<result
column=
"remark"
jdbcType=
"VARCHAR"
property=
"remark"
/>
<result
column=
"remark"
jdbcType=
"VARCHAR"
property=
"remark"
/>
<result
column=
"create_time"
jdbcType=
"TIMESTAMP"
property=
"createTime"
/>
<result
column=
"create_time"
jdbcType=
"TIMESTAMP"
property=
"createTime"
/>
<result
column=
"update_time"
jdbcType=
"TIMESTAMP"
property=
"updateTime"
/>
<result
column=
"update_time"
jdbcType=
"TIMESTAMP"
property=
"updateTime"
/>
...
@@ -68,7 +70,7 @@
...
@@ -68,7 +70,7 @@
</where>
</where>
</sql>
</sql>
<sql
id=
"Base_Column_List"
>
<sql
id=
"Base_Column_List"
>
id, time_id, menu_id, remark, create_time, update_time
id, time_id, menu_id,
is_open, menu_sort,
remark, create_time, update_time
</sql>
</sql>
<select
id=
"selectByExample"
parameterType=
"com.hwstudio.antaile.mbg.po.AtlTimeMenuExample"
resultMap=
"BaseResultMap"
>
<select
id=
"selectByExample"
parameterType=
"com.hwstudio.antaile.mbg.po.AtlTimeMenuExample"
resultMap=
"BaseResultMap"
>
select
select
...
@@ -104,10 +106,12 @@
...
@@ -104,10 +106,12 @@
<selectKey
keyProperty=
"id"
order=
"AFTER"
resultType=
"java.lang.Long"
>
<selectKey
keyProperty=
"id"
order=
"AFTER"
resultType=
"java.lang.Long"
>
SELECT LAST_INSERT_ID()
SELECT LAST_INSERT_ID()
</selectKey>
</selectKey>
insert into atl_time_menu (time_id, menu_id, remark,
insert into atl_time_menu (time_id, menu_id, is_open,
create_time, update_time)
menu_sort, remark, create_time,
values (#{timeId,jdbcType=BIGINT}, #{menuId,jdbcType=BIGINT}, #{remark,jdbcType=VARCHAR},
update_time)
#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP})
values (#{timeId,jdbcType=BIGINT}, #{menuId,jdbcType=BIGINT}, #{isOpen,jdbcType=TINYINT},
#{menuSort,jdbcType=INTEGER}, #{remark,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP},
#{updateTime,jdbcType=TIMESTAMP})
</insert>
</insert>
<insert
id=
"insertSelective"
parameterType=
"com.hwstudio.antaile.mbg.po.AtlTimeMenu"
>
<insert
id=
"insertSelective"
parameterType=
"com.hwstudio.antaile.mbg.po.AtlTimeMenu"
>
<selectKey
keyProperty=
"id"
order=
"AFTER"
resultType=
"java.lang.Long"
>
<selectKey
keyProperty=
"id"
order=
"AFTER"
resultType=
"java.lang.Long"
>
...
@@ -121,6 +125,12 @@
...
@@ -121,6 +125,12 @@
<if
test=
"menuId != null"
>
<if
test=
"menuId != null"
>
menu_id,
menu_id,
</if>
</if>
<if
test=
"isOpen != null"
>
is_open,
</if>
<if
test=
"menuSort != null"
>
menu_sort,
</if>
<if
test=
"remark != null"
>
<if
test=
"remark != null"
>
remark,
remark,
</if>
</if>
...
@@ -138,6 +148,12 @@
...
@@ -138,6 +148,12 @@
<if
test=
"menuId != null"
>
<if
test=
"menuId != null"
>
#{menuId,jdbcType=BIGINT},
#{menuId,jdbcType=BIGINT},
</if>
</if>
<if
test=
"isOpen != null"
>
#{isOpen,jdbcType=TINYINT},
</if>
<if
test=
"menuSort != null"
>
#{menuSort,jdbcType=INTEGER},
</if>
<if
test=
"remark != null"
>
<if
test=
"remark != null"
>
#{remark,jdbcType=VARCHAR},
#{remark,jdbcType=VARCHAR},
</if>
</if>
...
@@ -167,6 +183,12 @@
...
@@ -167,6 +183,12 @@
<if
test=
"record.menuId != null"
>
<if
test=
"record.menuId != null"
>
menu_id = #{record.menuId,jdbcType=BIGINT},
menu_id = #{record.menuId,jdbcType=BIGINT},
</if>
</if>
<if
test=
"record.isOpen != null"
>
is_open = #{record.isOpen,jdbcType=TINYINT},
</if>
<if
test=
"record.menuSort != null"
>
menu_sort = #{record.menuSort,jdbcType=INTEGER},
</if>
<if
test=
"record.remark != null"
>
<if
test=
"record.remark != null"
>
remark = #{record.remark,jdbcType=VARCHAR},
remark = #{record.remark,jdbcType=VARCHAR},
</if>
</if>
...
@@ -186,6 +208,8 @@
...
@@ -186,6 +208,8 @@
set id = #{record.id,jdbcType=BIGINT},
set id = #{record.id,jdbcType=BIGINT},
time_id = #{record.timeId,jdbcType=BIGINT},
time_id = #{record.timeId,jdbcType=BIGINT},
menu_id = #{record.menuId,jdbcType=BIGINT},
menu_id = #{record.menuId,jdbcType=BIGINT},
is_open = #{record.isOpen,jdbcType=TINYINT},
menu_sort = #{record.menuSort,jdbcType=INTEGER},
remark = #{record.remark,jdbcType=VARCHAR},
remark = #{record.remark,jdbcType=VARCHAR},
create_time = #{record.createTime,jdbcType=TIMESTAMP},
create_time = #{record.createTime,jdbcType=TIMESTAMP},
update_time = #{record.updateTime,jdbcType=TIMESTAMP}
update_time = #{record.updateTime,jdbcType=TIMESTAMP}
...
@@ -202,6 +226,12 @@
...
@@ -202,6 +226,12 @@
<if
test=
"menuId != null"
>
<if
test=
"menuId != null"
>
menu_id = #{menuId,jdbcType=BIGINT},
menu_id = #{menuId,jdbcType=BIGINT},
</if>
</if>
<if
test=
"isOpen != null"
>
is_open = #{isOpen,jdbcType=TINYINT},
</if>
<if
test=
"menuSort != null"
>
menu_sort = #{menuSort,jdbcType=INTEGER},
</if>
<if
test=
"remark != null"
>
<if
test=
"remark != null"
>
remark = #{remark,jdbcType=VARCHAR},
remark = #{remark,jdbcType=VARCHAR},
</if>
</if>
...
@@ -218,6 +248,8 @@
...
@@ -218,6 +248,8 @@
update atl_time_menu
update atl_time_menu
set time_id = #{timeId,jdbcType=BIGINT},
set time_id = #{timeId,jdbcType=BIGINT},
menu_id = #{menuId,jdbcType=BIGINT},
menu_id = #{menuId,jdbcType=BIGINT},
is_open = #{isOpen,jdbcType=TINYINT},
menu_sort = #{menuSort,jdbcType=INTEGER},
remark = #{remark,jdbcType=VARCHAR},
remark = #{remark,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=TIMESTAMP},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP}
update_time = #{updateTime,jdbcType=TIMESTAMP}
...
...
src/main/resources/mapping/mbg/SysAtlTimeMapper.xml
0 → 100644
View file @
4ed78a78
This diff is collapsed.
Click to expand it.
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