Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
djm-data-handler
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
软件中心
djm-data-handler
Commits
30b2740c
Commit
30b2740c
authored
Oct 22, 2024
by
软件中心
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加AreaConfigController
parent
3bbba332
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
235 additions
and
25 deletions
+235
-25
src/main/java/com/dr/controller/AreaConfigController.java
+71
-0
src/main/java/com/dr/controller/MeowShopDataReportController.java
+25
-25
src/main/java/com/dr/entity/AreaConfigEntity.java
+48
-0
src/main/java/com/dr/mapper/AreaConfigMapper.java
+34
-0
src/main/java/com/dr/vo/CommonUtilVO.java
+33
-0
src/main/resources/mapping/AreaConfigMapper.xml
+24
-0
No files found.
src/main/java/com/dr/controller/AreaConfigController.java
0 → 100644
View file @
30b2740c
package
com
.
dr
.
controller
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.dr.util.Result
;
import
com.dr.vo.CommonUtilVO
;
import
com.dr.entity.AreaConfigEntity
;
import
com.dr.mapper.AreaConfigMapper
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
java.util.ArrayList
;
import
java.util.List
;
/**
* @description
* @author luocong
* @date 2023/10/16 14:17
* @version 1.0
*/
@RequestMapping
(
"/djmaftersales/areaConfig"
)
@RestController
public
class
AreaConfigController
extends
BaseController
{
@Autowired
private
AreaConfigMapper
areaConfigMapper
;
/**
* 获取城市区域,如华南,华东
*
* @return 城市级别
*/
@GetMapping
(
"/getRegionList"
)
public
Result
<
List
<
CommonUtilVO
>>
getRegionList
()
{
List
<
AreaConfigEntity
>
list
=
this
.
areaConfigMapper
.
selectList
(
new
LambdaQueryWrapper
<
AreaConfigEntity
>().
select
(
AreaConfigEntity:
:
getId
,
AreaConfigEntity:
:
getAreaConfigName
)
.
eq
(
AreaConfigEntity:
:
getType
,
1
)
.
eq
(
AreaConfigEntity:
:
getDeleted
,
0
));
List
<
CommonUtilVO
>
commonUtilVOList
=
new
ArrayList
<>();
list
.
forEach
(
t
->
{
CommonUtilVO
commonUtilVO
=
new
CommonUtilVO
();
commonUtilVO
.
setId
(
t
.
getId
());
commonUtilVO
.
setName
(
t
.
getAreaConfigName
());
commonUtilVOList
.
add
(
commonUtilVO
);
});
return
new
Result
<
List
<
CommonUtilVO
>>().
ok
(
commonUtilVOList
);
}
/**
* 获取城市区域,一线,二线
*
* @return 城市级别
*/
@GetMapping
(
"/getLineCityCode"
)
public
Result
<
List
<
CommonUtilVO
>>
getLineCityCode
()
{
List
<
AreaConfigEntity
>
list
=
this
.
areaConfigMapper
.
selectList
(
new
LambdaQueryWrapper
<
AreaConfigEntity
>().
select
(
AreaConfigEntity:
:
getId
,
AreaConfigEntity:
:
getAreaConfigName
)
.
eq
(
AreaConfigEntity:
:
getType
,
0
)
.
eq
(
AreaConfigEntity:
:
getDeleted
,
0
));
List
<
CommonUtilVO
>
commonUtilVOList
=
new
ArrayList
<>();
list
.
forEach
(
t
->
{
CommonUtilVO
commonUtilVO
=
new
CommonUtilVO
();
commonUtilVO
.
setId
(
t
.
getId
());
commonUtilVO
.
setName
(
t
.
getAreaConfigName
());
commonUtilVOList
.
add
(
commonUtilVO
);
});
return
new
Result
<
List
<
CommonUtilVO
>>().
ok
(
commonUtilVOList
);
}
}
src/main/java/com/dr/controller/MeowShopDataReportController.java
View file @
30b2740c
...
...
@@ -45,7 +45,7 @@ public class MeowShopDataReportController extends BaseController {
})
@ApiOperation
(
value
=
"业绩报表下载"
,
notes
=
"业绩报表下载"
,
httpMethod
=
"POST"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"lineCityId"
,
value
=
"城市线id"
,
required
=
true
,
dataType
=
"long"
,
paramType
=
"form"
),
@ApiImplicitParam
(
name
=
"lineCityId"
,
value
=
"城市线id"
,
required
=
true
,
dataType
=
"long"
),
})
@PostMapping
(
"/performanceDownload"
)
public
Result
<
Void
>
performanceDownload
(
HttpServletRequest
request
,
JwtHelper
jwtHelper
,
@RequestParam
(
value
=
"lineCityId"
)
Long
lineCityId
)
{
...
...
@@ -54,7 +54,7 @@ public class MeowShopDataReportController extends BaseController {
}
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"shopAccount"
,
value
=
"门店账号集"
,
dataType
=
"array"
,
paramType
=
"form"
),
@ApiImplicitParam
(
name
=
"shopAccount"
,
value
=
"门店账号集"
,
dataType
=
"array"
),
@ApiImplicitParam
(
name
=
"selectType"
,
value
=
"选择类型(0-我的,1-全国)"
,
required
=
true
,
dataType
=
"int"
,
paramType
=
"form"
)
})
@ApiOperation
(
value
=
"耗材消耗排行"
,
notes
=
"耗材消耗排行"
,
httpMethod
=
"POST"
)
...
...
@@ -67,7 +67,7 @@ public class MeowShopDataReportController extends BaseController {
}
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"shopAccount"
,
value
=
"门店账号集"
,
dataType
=
"array"
,
paramType
=
"form"
),
@ApiImplicitParam
(
name
=
"shopAccount"
,
value
=
"门店账号集"
,
dataType
=
"array"
),
@ApiImplicitParam
(
name
=
"selectType"
,
value
=
"选择类型(0-我的,1-全国)"
,
required
=
true
,
dataType
=
"int"
,
paramType
=
"form"
)
})
@ApiOperation
(
value
=
"耗材消耗报表下载"
,
notes
=
"耗材消耗报表下载"
,
httpMethod
=
"POST"
)
...
...
@@ -80,7 +80,7 @@ public class MeowShopDataReportController extends BaseController {
}
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"regionId"
,
value
=
"区域id"
,
required
=
true
,
dataType
=
"long"
,
paramType
=
"form"
)
@ApiImplicitParam
(
name
=
"regionId"
,
value
=
"区域id"
,
required
=
true
,
dataType
=
"long"
)
})
@ApiOperation
(
value
=
"皮肤问题推荐方案接口"
,
notes
=
"皮肤问题推荐方案接口"
,
httpMethod
=
"POST"
)
@PostMapping
(
"/skinProblemRecommend"
)
...
...
@@ -104,8 +104,8 @@ public class MeowShopDataReportController extends BaseController {
}
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"flag"
,
value
=
"日期 1-昨天 2-近七天 3-近三十天"
,
required
=
true
,
dataType
=
"int"
,
paramType
=
"form"
),
@ApiImplicitParam
(
name
=
"shopAccount"
,
value
=
"门店账号集,全选不要传值"
,
dataType
=
"array"
,
paramType
=
"form"
)
@ApiImplicitParam
(
name
=
"flag"
,
value
=
"日期 1-昨天 2-近七天 3-近三十天"
,
required
=
true
,
dataType
=
"int"
),
@ApiImplicitParam
(
name
=
"shopAccount"
,
value
=
"门店账号集,全选不要传值"
,
dataType
=
"array"
)
})
@ApiOperation
(
value
=
"员工排行数据"
,
notes
=
"员工排行数据"
,
httpMethod
=
"POST"
)
@PostMapping
(
"/empOperateRank"
)
...
...
@@ -115,9 +115,9 @@ public class MeowShopDataReportController extends BaseController {
}
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"flag"
,
value
=
"日期 1-昨天 2-近七天 3-近三十天"
,
required
=
true
,
dataType
=
"int"
,
paramType
=
"form"
),
@ApiImplicitParam
(
name
=
"pageNum"
,
value
=
"页数,默认1"
,
dataType
=
"int"
,
paramType
=
"form"
),
@ApiImplicitParam
(
name
=
"pageSize"
,
value
=
"条数,默认5"
,
dataType
=
"int"
,
paramType
=
"form"
)
@ApiImplicitParam
(
name
=
"flag"
,
value
=
"日期 1-昨天 2-近七天 3-近三十天"
,
required
=
true
,
dataType
=
"int"
),
@ApiImplicitParam
(
name
=
"pageNum"
,
value
=
"页数,默认1"
,
dataType
=
"int"
),
@ApiImplicitParam
(
name
=
"pageSize"
,
value
=
"条数,默认5"
,
dataType
=
"int"
)
})
@ApiOperation
(
value
=
"门店消耗排行数据"
,
notes
=
"门店消耗排行数据"
,
httpMethod
=
"POST"
)
@PostMapping
(
"/shopConsumerRank"
)
...
...
@@ -130,9 +130,9 @@ public class MeowShopDataReportController extends BaseController {
}
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"deviceCode"
,
value
=
"设备类型code"
,
dataType
=
"string"
,
paramType
=
"form"
),
@ApiImplicitParam
(
name
=
"pageNum"
,
value
=
"页数,默认1"
,
dataType
=
"int"
,
paramType
=
"form"
),
@ApiImplicitParam
(
name
=
"pageSize"
,
value
=
"条数,默认5"
,
dataType
=
"int"
,
paramType
=
"form"
)
@ApiImplicitParam
(
name
=
"deviceCode"
,
value
=
"设备类型code"
,
dataType
=
"string"
),
@ApiImplicitParam
(
name
=
"pageNum"
,
value
=
"页数,默认1"
,
dataType
=
"int"
),
@ApiImplicitParam
(
name
=
"pageSize"
,
value
=
"条数,默认5"
,
dataType
=
"int"
)
})
@ApiOperation
(
value
=
"设备地域分布"
,
notes
=
"设备地域分布"
,
httpMethod
=
"POST"
)
@PostMapping
(
"/regionalDistribution"
)
...
...
@@ -152,9 +152,9 @@ public class MeowShopDataReportController extends BaseController {
}
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"flag"
,
value
=
"日期 1-昨天 2-近七天 3-近三十天"
,
required
=
true
,
dataType
=
"int"
,
paramType
=
"form"
),
@ApiImplicitParam
(
name
=
"pageNum"
,
value
=
"页数,默认1"
,
dataType
=
"int"
,
paramType
=
"form"
),
@ApiImplicitParam
(
name
=
"pageSize"
,
value
=
"条数,默认5"
,
dataType
=
"int"
,
paramType
=
"form"
)
@ApiImplicitParam
(
name
=
"flag"
,
value
=
"日期 1-昨天 2-近七天 3-近三十天"
,
required
=
true
,
dataType
=
"int"
),
@ApiImplicitParam
(
name
=
"pageNum"
,
value
=
"页数,默认1"
,
dataType
=
"int"
),
@ApiImplicitParam
(
name
=
"pageSize"
,
value
=
"条数,默认5"
,
dataType
=
"int"
)
})
@ApiOperation
(
value
=
"检测排行"
,
notes
=
"检测排行"
,
httpMethod
=
"POST"
)
@PostMapping
(
"/checkCaseRank"
)
...
...
@@ -167,8 +167,8 @@ public class MeowShopDataReportController extends BaseController {
}
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"pageNum"
,
value
=
"页数,默认1"
,
dataType
=
"int"
,
paramType
=
"form"
),
@ApiImplicitParam
(
name
=
"pageSize"
,
value
=
"条数,默认5"
,
dataType
=
"int"
,
paramType
=
"form"
)
@ApiImplicitParam
(
name
=
"pageNum"
,
value
=
"页数,默认1"
,
dataType
=
"int"
),
@ApiImplicitParam
(
name
=
"pageSize"
,
value
=
"条数,默认5"
,
dataType
=
"int"
)
})
@ApiOperation
(
value
=
"产品推广曝光"
,
notes
=
"产品推广曝光"
,
httpMethod
=
"POST"
)
@PostMapping
(
"/productRecommend"
)
...
...
@@ -180,9 +180,9 @@ public class MeowShopDataReportController extends BaseController {
}
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"flag"
,
value
=
"日期 1-昨天 2-近七天 3-近三十天"
,
required
=
true
,
dataType
=
"int"
,
paramType
=
"form"
),
@ApiImplicitParam
(
name
=
"pageNum"
,
value
=
"页数,默认1"
,
dataType
=
"int"
,
paramType
=
"form"
),
@ApiImplicitParam
(
name
=
"pageSize"
,
value
=
"条数,默认5"
,
dataType
=
"int"
,
paramType
=
"form"
)
@ApiImplicitParam
(
name
=
"flag"
,
value
=
"日期 1-昨天 2-近七天 3-近三十天"
,
required
=
true
,
dataType
=
"int"
),
@ApiImplicitParam
(
name
=
"pageNum"
,
value
=
"页数,默认1"
,
dataType
=
"int"
),
@ApiImplicitParam
(
name
=
"pageSize"
,
value
=
"条数,默认5"
,
dataType
=
"int"
)
})
@ApiOperation
(
value
=
"客户到店排行"
,
notes
=
"客户到店排行"
,
httpMethod
=
"POST"
)
@PostMapping
(
"/arriveShopRank"
)
...
...
@@ -195,7 +195,7 @@ public class MeowShopDataReportController extends BaseController {
}
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"shopAccount"
,
value
=
"门店账号集"
,
dataType
=
"array"
,
paramType
=
"form"
)
@ApiImplicitParam
(
name
=
"shopAccount"
,
value
=
"门店账号集"
,
dataType
=
"array"
)
})
@ApiOperation
(
value
=
"年龄分布"
,
notes
=
"年龄分布"
,
httpMethod
=
"POST"
)
@PostMapping
(
"/ageDistribution"
)
...
...
@@ -205,8 +205,8 @@ public class MeowShopDataReportController extends BaseController {
}
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"pageNum"
,
value
=
"页数,默认1"
,
dataType
=
"int"
,
paramType
=
"form"
),
@ApiImplicitParam
(
name
=
"pageSize"
,
value
=
"条数,默认5"
,
dataType
=
"int"
,
paramType
=
"form"
)
@ApiImplicitParam
(
name
=
"pageNum"
,
value
=
"页数,默认1"
,
dataType
=
"int"
),
@ApiImplicitParam
(
name
=
"pageSize"
,
value
=
"条数,默认5"
,
dataType
=
"int"
)
})
@ApiOperation
(
value
=
"客户地域分布"
,
notes
=
"设备地域分布"
,
httpMethod
=
"POST"
)
@PostMapping
(
"/clientDistribution"
)
...
...
@@ -218,8 +218,8 @@ public class MeowShopDataReportController extends BaseController {
}
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"pageNum"
,
value
=
"页数,默认1"
,
dataType
=
"int"
,
paramType
=
"form"
),
@ApiImplicitParam
(
name
=
"pageSize"
,
value
=
"条数,默认5"
,
dataType
=
"int"
,
paramType
=
"form"
)
@ApiImplicitParam
(
name
=
"pageNum"
,
value
=
"页数,默认1"
,
dataType
=
"int"
),
@ApiImplicitParam
(
name
=
"pageSize"
,
value
=
"条数,默认5"
,
dataType
=
"int"
)
})
@ApiOperation
(
value
=
"下载中心查询列表"
,
notes
=
"下载中心查询列表"
,
httpMethod
=
"POST"
)
@PostMapping
(
"/downloadCenter/list"
)
...
...
src/main/java/com/dr/entity/AreaConfigEntity.java
0 → 100644
View file @
30b2740c
package
com
.
dr
.
entity
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
lombok.Data
;
import
java.io.Serializable
;
import
java.util.Date
;
/**
* @description 城市地区分配表
* @author luocong
* @date 2023-10-16 11:43
* @version 1.0
*/
@Data
@TableName
(
"t_area_config"
)
public
class
AreaConfigEntity
implements
Serializable
{
private
static
final
long
serialVersionUID
=
-
3642198331315443307L
;
/**
* id
*/
@TableId
(
type
=
IdType
.
AUTO
)
private
Long
id
;
/**
* 所属区域名称
*/
private
String
areaConfigName
;
/**
* 类型(0-城市线(1线,2线),1-区域,(如华东、华南地区))
*/
private
Integer
type
;
/**
* 创建时间
*/
private
Date
createTime
;
/**
* 修改时间
*/
private
Date
updateTime
;
/**
* 是否删除(0-否,1是,默认0)
*/
private
Integer
deleted
;
}
src/main/java/com/dr/mapper/AreaConfigMapper.java
0 → 100644
View file @
30b2740c
package
com
.
dr
.
mapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.dr.entity.AreaConfigEntity
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
/**
* @description 城市地区分配表
* @author luocong
* @date 2023-10-16 11:43
* @version 1.0
*/
@Mapper
public
interface
AreaConfigMapper
extends
BaseMapper
<
AreaConfigEntity
>
{
/**
* 查询地区
*
* @param cityId 城市id
* @return AreaConfigEntity
*/
AreaConfigEntity
selectLineCity
(
@Param
(
"cityId"
)
Integer
cityId
);
/**
* 根据区域配置地区查询市区id
*
* @param regionId 区域配置表id
* @return 市区id
*/
List
<
Integer
>
selectAreaIdListByConf
(
@Param
(
"regionId"
)
Long
regionId
);
}
src/main/java/com/dr/vo/CommonUtilVO.java
0 → 100644
View file @
30b2740c
package
com
.
dr
.
vo
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
lombok.ToString
;
import
java.io.Serializable
;
/**
* @description 通用id、名字对象列表
* @author luocong
* @date 2023/7/25 11:11
* @version 1.0
*/
@ApiModel
(
value
=
"CommonUtilVO"
,
description
=
"通用id、名字对象列表"
)
@AllArgsConstructor
@NoArgsConstructor
@ToString
@Data
public
class
CommonUtilVO
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1381003815036954020L
;
@ApiModelProperty
(
value
=
"id"
)
private
Long
id
;
@ApiModelProperty
(
value
=
"名称"
)
private
String
name
;
}
src/main/resources/mapping/AreaConfigMapper.xml
0 → 100644
View file @
30b2740c
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.dr.mapper.AreaConfigMapper"
>
<select
id=
"selectLineCity"
resultType=
"com.dr.entity.AreaConfigEntity"
>
SELECT
t1.*
FROM
t_area_config t1
LEFT JOIN t_a_config_area t2 ON t1.id = t2.area_config_id
WHERE
t1.deleted = 0
AND t2.deleted = 0
AND t1.type = 0
AND t2.area_id = #{cityId}
</select>
<select
id=
"selectAreaIdListByConf"
resultType=
"java.lang.Integer"
>
select t1.area_id from t_a_config_area t1 where t1.area_config_id = #{regionId}
</select>
</mapper>
\ No newline at end of file
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