Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gs1-office-web-sit
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
吴迪
gs1-office-web-sit
Commits
2490b642
Commit
2490b642
authored
Nov 22, 2021
by
吴迪
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
【新增】首页接口提交
parent
bae28f80
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
79 additions
and
14 deletions
+79
-14
ShortCodeController.java
...office/modules/manage/controller/ShortCodeController.java
+6
-5
ShortCodeDao.java
src/main/java/io/office/modules/manage/dao/ShortCodeDao.java
+6
-1
ShortCodeService.java
...va/io/office/modules/manage/service/ShortCodeService.java
+2
-1
ShortCodeServiceImpl.java
...ice/modules/manage/service/impl/ShortCodeServiceImpl.java
+3
-2
ShortCodeVo.java
...java/io/office/modules/manage/vo/request/ShortCodeVo.java
+56
-1
SysLoginController.java
.../io/office/modules/sys/controller/SysLoginController.java
+2
-0
ShortCodeDao.xml
src/main/resources/mapper/manage/ShortCodeDao.xml
+4
-4
No files found.
src/main/java/io/office/modules/manage/controller/ShortCodeController.java
View file @
2490b642
...
@@ -4,10 +4,10 @@ import java.util.Arrays;
...
@@ -4,10 +4,10 @@ import java.util.Arrays;
import
java.util.Map
;
import
java.util.Map
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
io.office.modules.app.annotation.Login
;
import
io.office.modules.manage.entity.ShortCodeEntity
;
import
io.office.modules.manage.entity.ShortCodeEntity
;
import
io.office.modules.manage.service.ShortCodeService
;
import
io.office.modules.manage.service.ShortCodeService
;
import
io.office.modules.manage.utils.IdKeysConstant
;
import
io.office.modules.manage.vo.request.ShortCodeVo
;
import
io.office.modules.manage.utils.IdWorkerUtils
;
import
org.apache.shiro.authz.annotation.RequiresPermissions
;
import
org.apache.shiro.authz.annotation.RequiresPermissions
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.PathVariable
;
...
@@ -90,12 +90,13 @@ public class ShortCodeController {
...
@@ -90,12 +90,13 @@ public class ShortCodeController {
}
}
@Login
@RequestMapping
(
"/api/getList"
)
@RequestMapping
(
"/api/getList"
)
// @RequiresPermissions("manage:shortcode:delete")
// @RequiresPermissions("manage:shortcode:delete")
public
R
getList
(){
public
R
getList
(
@RequestBody
ShortCodeVo
shortCodeVo
){
System
.
out
.
println
(
IdWorkerUtils
.
getSEQByKey
(
IdKeysConstant
.
ID_SEQ_KEY
));
return
R
.
ok
();
return
R
.
ok
()
.
put
(
"data"
,
shortCodeService
.
getList
(
shortCodeVo
))
;
}
}
...
...
src/main/java/io/office/modules/manage/dao/ShortCodeDao.java
View file @
2490b642
...
@@ -3,8 +3,11 @@ package io.office.modules.manage.dao;
...
@@ -3,8 +3,11 @@ package io.office.modules.manage.dao;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
io.office.modules.manage.entity.ShortCodeEntity
;
import
io.office.modules.manage.entity.ShortCodeEntity
;
import
io.office.modules.manage.vo.request.ShortCodeVo
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Mapper
;
import
java.util.List
;
/**
/**
* ${comments}
* ${comments}
*
*
...
@@ -14,5 +17,7 @@ import org.apache.ibatis.annotations.Mapper;
...
@@ -14,5 +17,7 @@ import org.apache.ibatis.annotations.Mapper;
*/
*/
@Mapper
@Mapper
public
interface
ShortCodeDao
extends
BaseMapper
<
ShortCodeEntity
>
{
public
interface
ShortCodeDao
extends
BaseMapper
<
ShortCodeEntity
>
{
List
<
ShortCodeVo
>
getList
(
ShortCodeVo
shortCodeVo
);
}
}
src/main/java/io/office/modules/manage/service/ShortCodeService.java
View file @
2490b642
...
@@ -3,6 +3,7 @@ package io.office.modules.manage.service;
...
@@ -3,6 +3,7 @@ package io.office.modules.manage.service;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
io.office.common.utils.PageUtils
;
import
io.office.common.utils.PageUtils
;
import
io.office.modules.manage.entity.ShortCodeEntity
;
import
io.office.modules.manage.entity.ShortCodeEntity
;
import
io.office.modules.manage.vo.request.ShortCodeVo
;
import
java.util.List
;
import
java.util.List
;
...
@@ -20,7 +21,7 @@ public interface ShortCodeService extends IService<ShortCodeEntity> {
...
@@ -20,7 +21,7 @@ public interface ShortCodeService extends IService<ShortCodeEntity> {
PageUtils
queryPage
(
Map
<
String
,
Object
>
params
);
PageUtils
queryPage
(
Map
<
String
,
Object
>
params
);
List
<
ShortCode
Entity
>
getList
(
ShortCodeEntity
shortCodeEntity
);
List
<
ShortCode
Vo
>
getList
(
ShortCodeVo
shortCodeVo
);
}
}
src/main/java/io/office/modules/manage/service/impl/ShortCodeServiceImpl.java
View file @
2490b642
...
@@ -3,6 +3,7 @@ package io.office.modules.manage.service.impl;
...
@@ -3,6 +3,7 @@ package io.office.modules.manage.service.impl;
import
io.office.modules.manage.dao.ShortCodeDao
;
import
io.office.modules.manage.dao.ShortCodeDao
;
import
io.office.modules.manage.entity.ShortCodeEntity
;
import
io.office.modules.manage.entity.ShortCodeEntity
;
import
io.office.modules.manage.service.ShortCodeService
;
import
io.office.modules.manage.service.ShortCodeService
;
import
io.office.modules.manage.vo.request.ShortCodeVo
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
java.util.List
;
import
java.util.List
;
...
@@ -30,10 +31,10 @@ public class ShortCodeServiceImpl extends ServiceImpl<ShortCodeDao, ShortCodeEnt
...
@@ -30,10 +31,10 @@ public class ShortCodeServiceImpl extends ServiceImpl<ShortCodeDao, ShortCodeEnt
}
}
@Override
@Override
public
List
<
ShortCode
Entity
>
getList
(
ShortCodeEntity
shortCodeEntity
)
{
public
List
<
ShortCode
Vo
>
getList
(
ShortCodeVo
shortCodeVo
)
{
return
null
;
return
baseMapper
.
getList
(
shortCodeVo
)
;
}
}
...
...
src/main/java/io/office/modules/manage/vo/request/ShortCodeVo.java
View file @
2490b642
package
io
.
office
.
modules
.
manage
.
vo
.
request
;
package
io
.
office
.
modules
.
manage
.
vo
.
request
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
lombok.Data
;
import
lombok.Data
;
import
java.io.Serializable
;
import
java.io.Serializable
;
import
java.util.Date
;
/**
/**
*
*
...
@@ -14,11 +16,64 @@ import java.io.Serializable;
...
@@ -14,11 +16,64 @@ import java.io.Serializable;
@Data
@Data
public
class
ShortCodeVo
implements
Serializable
{
public
class
ShortCodeVo
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
private
static
final
long
serialVersionUID
=
1L
;
private
String
captcha
;
private
String
uuid
;
private
String
shortCode
;
private
String
shortCode
;
private
String
firmName
;
private
String
firmName
;
private
String
registerAddress
;
private
String
registerAddress
;
@TableId
private
Integer
fId
;
/**
* $column.comments
*/
/**
* $column.comments
*/
private
Date
loginDate
;
/**
* $column.comments
*/
private
String
approveMan
;
/**
* $column.comments
*/
private
Date
logoutDate
;
/**
* $column.comments
*/
private
String
logoutFlag
;
/**
* $column.comments
*/
private
String
produceName
;
/**
* $column.comments
*/
private
String
brandName
;
/**
* $column.comments
*/
private
String
produceStyle
;
/**
* $column.comments
*/
private
String
producePack
;
/**
* $column.comments
*/
private
String
memo
;
/**
* $column.comments
*/
private
String
issueFlag
;
/**
* $column.comments
*/
private
Date
issueDate
;
private
String
fireName
;
...
...
src/main/java/io/office/modules/sys/controller/SysLoginController.java
View file @
2490b642
...
@@ -9,6 +9,7 @@
...
@@ -9,6 +9,7 @@
package
io
.
office
.
modules
.
sys
.
controller
;
package
io
.
office
.
modules
.
sys
.
controller
;
import
io.office.common.utils.R
;
import
io.office.common.utils.R
;
import
io.office.modules.app.annotation.Login
;
import
io.office.modules.sys.entity.SysUserEntity
;
import
io.office.modules.sys.entity.SysUserEntity
;
import
io.office.modules.sys.form.SysLoginForm
;
import
io.office.modules.sys.form.SysLoginForm
;
import
io.office.modules.sys.service.SysCaptchaService
;
import
io.office.modules.sys.service.SysCaptchaService
;
...
@@ -62,6 +63,7 @@ public class SysLoginController extends AbstractController {
...
@@ -62,6 +63,7 @@ public class SysLoginController extends AbstractController {
/**
/**
* 登录
* 登录
*/
*/
@Login
@PostMapping
(
"/sys/login"
)
@PostMapping
(
"/sys/login"
)
public
Map
<
String
,
Object
>
login
(
@RequestBody
SysLoginForm
form
)
throws
IOException
{
public
Map
<
String
,
Object
>
login
(
@RequestBody
SysLoginForm
form
)
throws
IOException
{
/*boolean captcha = sysCaptchaService.validate(form.getUuid(), form.getCaptcha());
/*boolean captcha = sysCaptchaService.validate(form.getUuid(), form.getCaptcha());
...
...
src/main/resources/mapper/manage/ShortCodeDao.xml
View file @
2490b642
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"modules.manage.dao.ShortCodeDao"
>
<mapper
namespace=
"
io.office.
modules.manage.dao.ShortCodeDao"
>
<!-- 可根据自己的需求,是否要使用 -->
<!-- 可根据自己的需求,是否要使用 -->
<resultMap
type=
"io.office.modules.manage.entity.ShortCodeEntity"
id=
"shortCodeMap"
>
<resultMap
type=
"io.office.modules.manage.entity.ShortCodeEntity"
id=
"shortCodeMap"
>
...
@@ -22,17 +22,17 @@
...
@@ -22,17 +22,17 @@
<select
id=
"getList"
parameterType=
"io.office.modules.manage.vo.request.ShortCodeVo"
resultType=
"io.office.modules.manage.
entity.ShortCodeEntity
"
>
<select
id=
"getList"
parameterType=
"io.office.modules.manage.vo.request.ShortCodeVo"
resultType=
"io.office.modules.manage.
vo.request.ShortCodeVo
"
>
select top 300 * from short_code a left join firm b on a.f_id=b.f_id
select top 300 * from short_code a left join firm b on a.f_id=b.f_id
<where>
<where>
<if
test=
"shortCode!=null and shortCode!=''"
>
<if
test=
"shortCode!=null and shortCode!=''"
>
a.short_code = #{shortCode}
a.short_code = #{shortCode}
</if>
</if>
<if
test=
"firmName!=null and firmName!=''"
>
<if
test=
"firmName!=null and firmName!=''"
>
and b.firm_name like
'%'#{firmName}'%'
and b.firm_name like
concat(concat('%',#{firmName}),'%')
</if>
</if>
<if
test=
"registerAddress!=null and registerAddress!=''"
>
<if
test=
"registerAddress!=null and registerAddress!=''"
>
and b.register_address like
'%'#{registerAddress}'%'
and b.register_address like
concat(concat('%',#{registerAddress}),'%')
</if>
</if>
</where>
</where>
...
...
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