Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
A
Aidea
Project
Project
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
sa_aidea
Aidea
Commits
22d47957
Commit
22d47957
authored
Oct 09, 2020
by
黎聪聪
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
收货地址管理
parent
6e1433a6
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
1481 additions
and
3 deletions
+1481
-3
qrcodeRecordlist.html
...n/webapp/WEB-INF/views/qrcodeRecord/qrcodeRecordlist.html
+5
-1
pom.xml
membercard-modules/pom.xml
+1
-0
pom.xml
membercard-modules/shipping-address-module/pom.xml
+15
-0
AddressMapper.java
.../src/main/java/com/cftech/addresst/dao/AddressMapper.java
+17
-0
AddressMapper.xml
...e/src/main/java/com/cftech/addresst/dao/AddressMapper.xml
+207
-0
Address.java
...dule/src/main/java/com/cftech/addresst/model/Address.java
+69
-0
Area.java
...-module/src/main/java/com/cftech/addresst/model/Area.java
+19
-0
AddressService.java
...main/java/com/cftech/addresst/service/AddressService.java
+18
-0
AddressServiceImpl.java
.../com/cftech/addresst/service/impl/AddressServiceImpl.java
+38
-0
AddressController.java
.../main/java/com/cftech/addresst/web/AddressController.java
+201
-0
address.sql
...ules/shipping-address-module/src/sqls/address/address.sql
+1
-0
pom.xml
membercard-modules/shipping-address-web/pom.xml
+28
-0
addressform.html
...eb/src/main/webapp/WEB-INF/views/address/addressform.html
+390
-0
addresslist.html
...eb/src/main/webapp/WEB-INF/views/address/addresslist.html
+470
-0
fanssgroupadd.html
...c/main/webapp/WEB-INF/views/fanssgroup/fanssgroupadd.html
+2
-2
No files found.
behavior-modules/qrcode-record-module-web/src/main/webapp/WEB-INF/views/qrcodeRecord/qrcodeRecordlist.html
View file @
22d47957
...
...
@@ -105,7 +105,11 @@
<table
id=
"table"
class=
"table table-bordered table-striped"
>
<thead>
<tr>
<td
hidden=
"true"
>
Id
</td><th>
粉丝openid
</th><th>
二维码类型
</th><th>
二维码
</th><th>
扫码时间
</th>
<td
hidden=
"true"
>
Id
</td
><th>
粉丝openid
</th>
<th>
二维码类型
</th>
<th>
二维码
</th>
<th>
扫码时间
</th>
</tr>
</thead>
<tbody
id=
"tablebody"
>
...
...
membercard-modules/pom.xml
View file @
22d47957
...
...
@@ -18,6 +18,7 @@
<module>
member-module-web
</module>
<module>
membercard-module
</module>
<module>
membercard-module-web
</module>
<module>
shipping-address-module
</module>
</modules>
<dependencies>
...
...
membercard-modules/shipping-address-module/pom.xml
0 → 100644
View file @
22d47957
<?xml version="1.0" encoding="UTF-8"?>
<project
xmlns=
"http://maven.apache.org/POM/4.0.0"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=
"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
>
<parent>
<artifactId>
membercard-modules
</artifactId>
<groupId>
com.cftech
</groupId>
<version>
1.0-SNAPSHOT
</version>
</parent>
<modelVersion>
4.0.0
</modelVersion>
<artifactId>
shipping-address-module
</artifactId>
</project>
\ No newline at end of file
membercard-modules/shipping-address-module/src/main/java/com/cftech/addresst/dao/AddressMapper.java
0 → 100644
View file @
22d47957
package
com
.
cftech
.
addresst
.
dao
;
import
com.cftech.addresst.model.Address
;
import
com.cftech.addresst.model.Area
;
import
com.cftech.core.generic.GenericDao
;
import
java.util.List
;
/**
* 收货地址管理Mapper
*
* @author Licc
* @date: 2020-09-29 17:17
*/
public
interface
AddressMapper
extends
GenericDao
<
Address
>
{
List
<
Area
>
listArea
();
}
\ No newline at end of file
membercard-modules/shipping-address-module/src/main/java/com/cftech/addresst/dao/AddressMapper.xml
0 → 100644
View file @
22d47957
This diff is collapsed.
Click to expand it.
membercard-modules/shipping-address-module/src/main/java/com/cftech/addresst/model/Address.java
0 → 100644
View file @
22d47957
package
com
.
cftech
.
addresst
.
model
;
import
com.cftech.core.poi.ExportConfig
;
import
lombok.Data
;
import
java.io.Serializable
;
import
java.util.Date
;
/**
* 收货地址管理
*
* @author Licc
* @date: 2020-09-29 17:17
*/
@Data
public
class
Address
extends
Area
implements
Serializable
{
/* 主键id */
private
Long
id
;
/* openId */
@ExportConfig
(
value
=
"openId"
,
width
=
100
,
showLevel
=
1
)
private
String
openId
;
/* 收货人name */
@ExportConfig
(
value
=
"收货人name"
,
width
=
100
,
showLevel
=
1
)
private
String
addressName
;
/* 详细收货地址 */
@ExportConfig
(
value
=
"详细收货地址"
,
width
=
100
,
showLevel
=
1
)
private
String
address
;
/* 省份id */
@ExportConfig
(
value
=
"省份id"
,
width
=
100
,
showLevel
=
1
)
private
Long
provinceId
;
/* 城市id */
@ExportConfig
(
value
=
"城市id"
,
width
=
100
,
showLevel
=
1
)
private
Long
cityId
;
/* 区县id*/
@ExportConfig
(
value
=
"区县id"
,
width
=
100
,
showLevel
=
1
)
private
Long
areaId
;
/* 性别 */
@ExportConfig
(
value
=
"性别"
,
width
=
100
,
showLevel
=
1
)
private
Long
sex
;
/* 手机号 */
@ExportConfig
(
value
=
"手机号"
,
width
=
100
,
showLevel
=
1
)
private
String
phone
;
/* 是否为默认地址 */
@ExportConfig
(
value
=
"是否为默认地址"
,
width
=
100
,
showLevel
=
1
)
private
String
whether
;
/* 所属的账号 */
private
Long
accountsId
;
/* 删除标识 */
private
boolean
delFlag
;
/* 状态 */
private
String
status
;
/* 创建时间 */
private
Date
createTime
;
/* 更新时间 */
private
Date
updateTime
;
/* 备注 */
private
String
description
;
/* 创建人 */
private
Long
createBy
;
/* 更新人 */
private
Long
updateBy
;
public
Address
()
{
this
.
delFlag
=
false
;
this
.
status
=
"0"
;
}
}
\ No newline at end of file
membercard-modules/shipping-address-module/src/main/java/com/cftech/addresst/model/Area.java
0 → 100644
View file @
22d47957
package
com
.
cftech
.
addresst
.
model
;
import
lombok.Data
;
/**
* @author :licc
* @date :Created in 2020/9/30 10:38
* @description:
*/
@Data
public
class
Area
{
private
Long
areaId
;
private
String
areaName
;
private
Long
cityType
;
private
Long
affiliationareaId
;
private
String
provinceName
;
private
String
cityName
;
private
String
countyName
;
}
membercard-modules/shipping-address-module/src/main/java/com/cftech/addresst/service/AddressService.java
0 → 100644
View file @
22d47957
package
com
.
cftech
.
addresst
.
service
;
import
com.cftech.addresst.model.Address
;
import
com.cftech.addresst.model.Area
;
import
com.cftech.core.generic.GenericService
;
import
java.util.List
;
/**
* 收货地址管理Service
*
* @author Licc
* @date: 2020-09-29 17:17
*/
public
interface
AddressService
extends
GenericService
<
Address
>
{
List
<
Area
>
listArea
();
}
membercard-modules/shipping-address-module/src/main/java/com/cftech/addresst/service/impl/AddressServiceImpl.java
0 → 100644
View file @
22d47957
package
com
.
cftech
.
addresst
.
service
.
impl
;
import
com.cftech.addresst.model.Address
;
import
com.cftech.addresst.dao.AddressMapper
;
import
com.cftech.addresst.model.Area
;
import
com.cftech.addresst.service.AddressService
;
import
com.cftech.core.generic.GenericDao
;
import
com.cftech.core.generic.GenericServiceImpl
;
import
com.cftech.core.sql.Conds
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Qualifier
;
import
org.springframework.stereotype.Service
;
import
java.util.List
;
/**
* 收货地址管理ServiceImpl
*
* @author Licc
* @date: 2020-09-29 17:17
*/
@Service
(
"addressService"
)
public
class
AddressServiceImpl
extends
GenericServiceImpl
<
Address
>
implements
AddressService
{
@Autowired
@Qualifier
(
"addressMapper"
)
private
AddressMapper
addressMapper
;
@Override
public
GenericDao
<
Address
>
getGenericMapper
()
{
return
addressMapper
;
}
@Override
public
List
<
Area
>
listArea
()
{
return
addressMapper
.
listArea
();
}
}
\ No newline at end of file
membercard-modules/shipping-address-module/src/main/java/com/cftech/addresst/web/AddressController.java
0 → 100644
View file @
22d47957
package
com
.
cftech
.
addresst
.
web
;
import
com.alibaba.fastjson.JSONObject
;
import
com.cftech.addresst.model.Address
;
import
com.cftech.addresst.model.Area
;
import
com.cftech.addresst.service.AddressService
;
import
com.cftech.core.poi.ExcelKit
;
import
com.cftech.core.scope.OrderType
;
import
com.cftech.core.sql.Conds
;
import
com.cftech.core.sql.Sort
;
import
com.cftech.core.util.Constants
;
import
com.cftech.sys.security.PermissionSign
;
import
com.cftech.sys.security.UserUtils
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.shiro.authz.annotation.RequiresPermissions
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.ui.Model
;
import
org.springframework.util.StringUtils
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.multipart.MultipartFile
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletResponse
;
import
java.io.File
;
import
java.io.IOException
;
import
java.util.List
;
/**
* 收货地址管理Controller
* <p>
* 权限字符串说明:
* 查看:public static final String ADDRESS_VIEW = "qy:address:view"
* 查看:public static final String ADDRESS_EDIT = "qy:address:edit"
*
* @author Licc
* @date: 2020-09-29 17:17
*/
@Slf4j
@Controller
@RequestMapping
(
"/a/address"
)
public
class
AddressController
{
public
static
final
String
ADDRESS_VIEW
=
"qy:address:view"
;
public
static
final
String
ADDRESS_EDIT
=
"qy:address:edit"
;
@Autowired
private
AddressService
addressService
;
//列表页面
@RequiresPermissions
(
value
=
ADDRESS_VIEW
)
@RequestMapping
(
"/list"
)
public
String
list
(
HttpServletRequest
request
,
Model
model
)
{
Long
accountId
=
UserUtils
.
getmpaccounts
(
request
);
model
.
addAttribute
(
"accountId"
,
accountId
);
return
"address/addresslist"
;
}
//编辑页面(新增、修改)
@RequiresPermissions
(
value
=
ADDRESS_VIEW
)
@RequestMapping
(
"/form"
)
public
String
form
(
HttpServletRequest
request
,
String
id
,
Model
model
)
{
if
(!
StringUtils
.
isEmpty
(
id
))
{
Address
address
=
addressService
.
fetchById
(
id
);
model
.
addAttribute
(
"data"
,
address
);
}
return
"address/addressform"
;
}
//提交数据(新增、修改)
@RequiresPermissions
(
value
=
ADDRESS_EDIT
)
@RequestMapping
(
value
=
"/formData"
,
method
=
{
RequestMethod
.
GET
})
@ResponseBody
public
JSONObject
formData
(
Address
address
,
Model
model
,
HttpServletRequest
request
)
{
Long
accountsId
=
UserUtils
.
getmpaccounts
(
request
);
JSONObject
rtnJson
=
new
JSONObject
();
try
{
if
(
address
!=
null
&&
address
.
getId
()
!=
null
)
{
address
.
setUpdateBy
(
UserUtils
.
getUser
().
getId
());
addressService
.
update
(
address
);
rtnJson
.
put
(
"errorNo"
,
0
);
}
else
{
address
.
setAccountsId
(
accountsId
);
address
.
setDelFlag
(
false
);
address
.
setAccountsId
(
UserUtils
.
getmpaccounts
(
request
));
address
.
setCreateBy
(
UserUtils
.
getUser
().
getId
());
address
.
setUpdateBy
(
UserUtils
.
getUser
().
getId
());
addressService
.
save
(
address
);
rtnJson
.
put
(
"errorNo"
,
2
);
}
}
catch
(
Exception
e
)
{
rtnJson
.
put
(
"errorNo"
,
1
);
}
return
rtnJson
;
}
//获取列表数据
@RequiresPermissions
(
value
=
ADDRESS_VIEW
)
@RequestMapping
(
value
=
"/listData"
)
@ResponseBody
public
JSONObject
listData
(
int
iDisplayStart
,
int
iDisplayLength
,
Address
address
,
HttpServletRequest
request
)
{
Long
accountsId
=
UserUtils
.
getmpaccounts
(
request
);
Conds
conds
=
new
Conds
();
conds
.
equal
(
"t.del_flag"
,
Constants
.
DEL_FLAG_0
);
conds
.
equal
(
"t.accounts_id"
,
accountsId
);
if
(!
StringUtils
.
isEmpty
(
address
.
getAddressName
())){
conds
.
like
(
"t.address_name"
,
address
.
getAddressName
());
}
if
(!
StringUtils
.
isEmpty
(
address
.
getProvinceId
())){
conds
.
equal
(
"t.province_id"
,
address
.
getProvinceId
());
}
if
(!
StringUtils
.
isEmpty
(
address
.
getCityId
())){
conds
.
equal
(
"t.city_id"
,
address
.
getCityId
());
}
if
(!
StringUtils
.
isEmpty
(
address
.
getAreaId
())){
conds
.
equal
(
"t.area_id"
,
address
.
getAreaId
());
}
Sort
sort
=
new
Sort
(
"t.create_time"
,
OrderType
.
DESC
);
List
<
Address
>
list
=
addressService
.
fetchSearchByPage
(
conds
,
sort
,
iDisplayStart
,
iDisplayLength
);
Integer
counts
=
addressService
.
count
(
conds
);
JSONObject
rtnJson
=
new
JSONObject
();
rtnJson
.
put
(
"iTotalRecords"
,
counts
);
rtnJson
.
put
(
"iTotalDisplayRecords"
,
counts
);
rtnJson
.
put
(
"aaData"
,
list
);
return
rtnJson
;
}
//删除数据
@RequiresPermissions
(
value
=
ADDRESS_EDIT
)
@RequestMapping
(
"/delete"
)
@ResponseBody
public
JSONObject
delete
(
String
id
)
{
JSONObject
rtnJosn
=
new
JSONObject
();
try
{
addressService
.
delete
(
id
);
rtnJosn
.
put
(
"errorNo"
,
0
);
}
catch
(
Exception
e
)
{
rtnJosn
.
put
(
"errorNo"
,
1
);
}
return
rtnJosn
;
}
@GetMapping
(
"/listArea"
)
@ResponseBody
public
List
<
Area
>
listArea
(){
return
addressService
.
listArea
();
}
@RequestMapping
(
"/exportExcel"
)
@RequiresPermissions
(
value
=
ADDRESS_VIEW
)
public
void
exportExcel
(
HttpServletRequest
request
,
HttpServletResponse
response
)
{
Long
accountId
=
UserUtils
.
getmpaccounts
(
request
);
Sort
sort
=
new
Sort
(
"create_time"
,
OrderType
.
ASC
);
Conds
conds
=
new
Conds
();
conds
.
equal
(
"del_flag"
,
0
);
conds
.
equal
(
"accounts_id"
,
accountId
);
List
<
Address
>
list
=
addressService
.
fetchSearchByPage
(
conds
,
sort
,
0
,
0
);
ExcelKit
.
$Export
(
Address
.
class
,
response
).
toExcel
(
list
,
"收货地址管理信息"
);
}
@RequestMapping
(
"/templateExcel"
)
@RequiresPermissions
(
value
=
ADDRESS_VIEW
)
public
void
templateExcel
(
HttpServletRequest
request
,
HttpServletResponse
response
)
{
ExcelKit
.
$Export
(
Address
.
class
,
response
).
toExcel
(
null
,
"收货地址管理信息"
);
}
@RequestMapping
(
"/importExcel"
)
@RequiresPermissions
(
value
=
ADDRESS_EDIT
)
public
String
importExcel
(
HttpServletRequest
request
,
MultipartFile
file
,
Model
model
)
{
Long
accountId
=
UserUtils
.
getmpaccounts
(
request
);
if
(
file
==
null
)
{
return
list
(
request
,
model
);
}
// 构造临时路径来存储上传的文件
String
uploadPath
=
System
.
getProperty
(
"java.io.tmpdir"
);
File
uploadDir
=
new
File
(
uploadPath
);
if
(!
uploadDir
.
exists
())
{
uploadDir
.
mkdir
();
}
String
fileName
=
file
.
getOriginalFilename
();
String
filePath
=
uploadPath
+
File
.
separator
+
fileName
;
File
storeFile
=
new
File
(
filePath
);
try
{
file
.
transferTo
(
storeFile
);
ExcelKit
.
$Import
().
setEmptyCellValue
(
""
).
readExcel
(
storeFile
,
rowData
->
{
if
(!
StringUtils
.
isEmpty
(
rowData
.
get
(
0
)))
{
Address
address
=
new
Address
();
address
.
setAccountsId
(
accountId
);
addressService
.
save
(
address
);
}
});
}
catch
(
IOException
e
)
{
log
.
error
(
e
.
getMessage
());
}
return
list
(
request
,
model
);
}
}
membercard-modules/shipping-address-module/src/sqls/address/address.sql
0 → 100644
View file @
22d47957
CREATE
TABLE
`t_shipping_address`
(
`id`
bigint
(
20
)
NOT
NULL
AUTO_INCREMENT
COMMENT
'主键id'
,
`_id`
bigint
(
20
)
NULL
DEFAULT
NULL
COMMENT
'收货地址id'
,
`open_id`
bigint
(
20
)
NULL
DEFAULT
NULL
COMMENT
'openId'
,
`_address_name`
varchar
(
50
)
NULL
DEFAULT
NULL
COMMENT
'收货人name'
,
`_address`
varchar
(
50
)
NULL
DEFAULT
NULL
COMMENT
'详细收货地址'
,
`province_id`
bigint
(
20
)
NULL
DEFAULT
NULL
COMMENT
''
,
`city_id`
datetime
NULL
DEFAULT
NULL
COMMENT
''
,
`area_id`
datetime
NULL
DEFAULT
NULL
COMMENT
''
,
`sex`
bigint
(
20
)
NULL
DEFAULT
NULL
COMMENT
'性别'
,
`_phone`
varchar
(
20
)
NULL
DEFAULT
NULL
COMMENT
'手机号'
,
`whether`
varchar
(
50
)
NULL
DEFAULT
NULL
COMMENT
'是否为默认地址'
,
`accounts_id`
bigint
(
20
)
NULL
DEFAULT
NULL
COMMENT
'所属的账号'
,
`del_flag`
tinyint
(
4
)
NOT
NULL
DEFAULT
0
COMMENT
'删除标识'
,
`status`
varchar
(
10
)
NULL
DEFAULT
'0'
COMMENT
'状态'
,
`create_time`
datetime
NULL
DEFAULT
CURRENT_TIMESTAMP
COMMENT
'创建时间'
,
`update_time`
datetime
NULL
ON
UPDATE
CURRENT_TIMESTAMP
COMMENT
'更新时间'
,
`description`
varchar
(
100
)
NULL
DEFAULT
NULL
COMMENT
'备注'
,
`create_by`
bigint
(
20
)
NULL
DEFAULT
NULL
COMMENT
'创建人'
,
`update_by`
bigint
(
20
)
NULL
DEFAULT
NULL
COMMENT
'更新人'
,
PRIMARY
KEY
(
`id`
)
)
ENGINE
=
InnoDB
AUTO_INCREMENT
=
1
DEFAULT
CHARSET
=
utf8
COMMENT
=
'收货地址管理表'
;
\ No newline at end of file
membercard-modules/shipping-address-web/pom.xml
0 → 100644
View file @
22d47957
<?xml version="1.0" encoding="UTF-8"?>
<project
xmlns=
"http://maven.apache.org/POM/4.0.0"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=
"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
>
<parent>
<artifactId>
membercard-modules
</artifactId>
<groupId>
com.cftech
</groupId>
<version>
1.0-SNAPSHOT
</version>
</parent>
<modelVersion>
4.0.0
</modelVersion>
<artifactId>
consult-module-web
</artifactId>
<packaging>
war
</packaging>
<name>
consult-module-web Maven Webapp
</name>
<url>
http://maven.apache.org
</url>
<dependencies>
<dependency>
<groupId>
com.cftech
</groupId>
<artifactId>
shipping-address-module
</artifactId>
<version>
1.0-SNAPSHOT
</version>
</dependency>
</dependencies>
<build>
<finalName>
shipping-address-web
</finalName>
</build>
</project>
\ No newline at end of file
membercard-modules/shipping-address-web/src/main/webapp/WEB-INF/views/address/addressform.html
0 → 100644
View file @
22d47957
This diff is collapsed.
Click to expand it.
membercard-modules/shipping-address-web/src/main/webapp/WEB-INF/views/address/addresslist.html
0 → 100644
View file @
22d47957
This diff is collapsed.
Click to expand it.
mp-modules/mp-fanss-module-web/src/main/webapp/WEB-INF/views/fanssgroup/fanssgroupadd.html
View file @
22d47957
...
...
@@ -86,7 +86,7 @@
<input
type=
"text"
style=
"display: none"
name=
"_csrf_header"
value=
"${_csrf.headerName}"
/>
<div
class=
"box-footer"
>
<input
class=
"btn btn-primary"
id=
"save"
value=
"保存"
type=
"submit
"
>
<input
class=
"btn btn-primary"
id=
"save"
value=
"保存"
type=
"button
"
>
<a
href=
"#springUrl('/a/fanssgroup/list')"
class=
"btn btn-default"
>
取消
</a>
</div>
</form>
...
...
@@ -133,7 +133,7 @@
recdTypeAdd
.
init
();
});
var
recdTypeAdd
=
function
()
{
var
initForm
=
function
()
{
...
...
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