Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
H
haoban-manage3.0
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
haoban3.0
haoban-manage3.0
Commits
1d3e256a
Commit
1d3e256a
authored
Jan 20, 2022
by
墨竹
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:跳过登录修改
parent
db9f4627
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
69 additions
and
61 deletions
+69
-61
ControllerException.java
.../gic/haoban/manage/web/exception/ControllerException.java
+0
-10
ClerkController.java
...com/gic/haoban/manage/web/controller/ClerkController.java
+16
-7
StoreController.java
...com/gic/haoban/manage/web/controller/StoreController.java
+48
-39
WxEnterpriseInfoController.java
...ban/manage/web/controller/WxEnterpriseInfoController.java
+5
-5
No files found.
haoban-manage3-web/src/main/java/com/gic/haoban/manage/web/exception/ControllerException.java
deleted
100644 → 0
View file @
db9f4627
package
com
.
gic
.
haoban
.
manage
.
web
.
exception
;
/**
* Created 2018/7/24.
*
* @author hua
*/
public
class
ControllerException
extends
Exception
{
}
haoban-manage3-wx/src/main/java/com/gic/haoban/manage/web/controller/ClerkController.java
View file @
1d3e256a
...
...
@@ -186,9 +186,13 @@ public class ClerkController extends WebBaseController {
}
//获取后台认证配置
@RequestMapping
(
"/get-audit-setting"
)
/**
* 会员小程序-获取后台认证配置
* @param wxEnterpriseId
* @return
*/
@IgnoreLogin
@RequestMapping
(
"/get-audit-setting"
)
public
HaobanResponse
getAuditSetting
(
String
wxEnterpriseId
)
{
if
(
StringUtils
.
isAnyBlank
(
wxEnterpriseId
))
{
return
resultResponse
(
HaoBanErrCode
.
ERR_2
);
...
...
@@ -200,9 +204,14 @@ public class ClerkController extends WebBaseController {
return
resultResponse
(
HaoBanErrCode
.
ERR_1
,
auditSettingVO
);
}
//获取后台认证配置
@RequestMapping
(
"/get-user-setting"
)
/**
* 会员小程序-获取后台认证配置
* @param wxEnterpriseId
* @param staffId
* @return
*/
@IgnoreLogin
@RequestMapping
(
"/get-user-setting"
)
public
HaobanResponse
getUserSetting
(
String
wxEnterpriseId
,
String
staffId
)
{
if
(
StringUtils
.
isAnyBlank
(
wxEnterpriseId
))
{
return
resultResponse
(
HaoBanErrCode
.
ERR_2
);
...
...
@@ -244,8 +253,8 @@ public class ClerkController extends WebBaseController {
return
resultResponse
(
HaoBanErrCode
.
ERR_1
,
auditSettingVO
);
}
@RequestMapping
(
"/get-operation-setting"
)
@IgnoreLogin
@RequestMapping
(
"/get-operation-setting"
)
public
HaobanResponse
getOperatorSetting
(
String
wxEnterpriseId
,
String
enterpriseId
)
{
// 查询操作配置
OperationSettingDTO
dto
=
operationSettingApiService
.
getByWxEnterpriseId
(
wxEnterpriseId
);
...
...
@@ -1155,12 +1164,12 @@ public class ClerkController extends WebBaseController {
}
/**
* 外部联系人需要发送的好友
*
会员小程序-
外部联系人需要发送的好友
*
* @return
*/
@RequestMapping
(
"push-friend"
)
@IgnoreLogin
@RequestMapping
(
"push-friend"
)
public
HaobanResponse
friendList
(
String
relationKey
)
{
externalClerkRelatedApiService
.
pushExternalByRelationKey
(
relationKey
);
return
resultResponse
(
HaoBanErrCode
.
ERR_1
);
...
...
haoban-manage3-wx/src/main/java/com/gic/haoban/manage/web/controller/StoreController.java
View file @
1d3e256a
...
...
@@ -63,9 +63,16 @@ public class StoreController extends WebBaseController {
@Autowired
private
StaffApiService
staffApiService
;
//门店列表
@RequestMapping
(
"/store-list"
)
/**
* 会员小程序-门店列表
*
* @param staffId
* @param wxEnterpriseId
* @param version
* @return
*/
@IgnoreLogin
@RequestMapping
(
"/store-list"
)
public
HaobanResponse
storeList
(
String
staffId
,
String
wxEnterpriseId
,
String
version
)
{
if
(
StringUtils
.
isAnyBlank
(
staffId
,
wxEnterpriseId
))
{
return
resultResponse
(
HaoBanErrCode
.
ERR_2
);
...
...
@@ -133,37 +140,38 @@ public class StoreController extends WebBaseController {
list
.
add
(
vo
);
}
return
resultResponse
(
HaoBanErrCode
.
ERR_1
,
list
);
}
//获取首页销售数据
@RequestMapping
(
"/sale-date"
)
public
HaobanResponse
saleDate
(
String
storeId
,
String
clerkType
,
String
clerkId
)
{
if
(
StringUtils
.
isAnyBlank
(
storeId
,
clerkType
,
clerkId
))
{
public
HaobanResponse
saleDate
(
String
storeId
,
String
clerkType
,
String
clerkId
)
{
if
(
StringUtils
.
isAnyBlank
(
storeId
,
clerkType
,
clerkId
))
{
return
resultResponse
(
HaoBanErrCode
.
ERR_2
);
}
StoreDTO
store
=
storeService
.
getStore
(
storeId
);
if
(
store
==
null
)
{
if
(
store
==
null
)
{
return
resultResponse
(
HaoBanErrCode
.
ERR_111146
);
}
String
enterpriseId
=
store
.
getEnterpriseId
();
String
date
=
DateUtil
.
format
(
new
Date
(),
"yyyy-MM-dd"
);
if
(
"0"
.
equals
(
clerkType
))
{
HaobanDataDTO
HaobanDataDTO
=
haobanDataApiService
.
getSaleDataByDateByClerkId
(
enterpriseId
,
storeId
,
clerkId
,
date
);
return
resultResponse
(
HaoBanErrCode
.
ERR_1
,
HaobanDataDTO
);
if
(
"0"
.
equals
(
clerkType
))
{
HaobanDataDTO
HaobanDataDTO
=
haobanDataApiService
.
getSaleDataByDateByClerkId
(
enterpriseId
,
storeId
,
clerkId
,
date
);
return
resultResponse
(
HaoBanErrCode
.
ERR_1
,
HaobanDataDTO
);
}
HaobanDataDTO
HaobanDataDTO
=
haobanDataApiService
.
getSaleDataByDate
(
enterpriseId
,
storeId
,
date
);
return
resultResponse
(
HaoBanErrCode
.
ERR_1
,
HaobanDataDTO
);
return
resultResponse
(
HaoBanErrCode
.
ERR_1
,
HaobanDataDTO
);
}
//获取省市区
@IgnoreLogin
@RequestMapping
(
"/get-area-list"
)
public
HaobanResponse
getArea
(
Integer
type
,
String
id
)
{
public
HaobanResponse
getArea
(
Integer
type
,
String
id
)
{
if
(
type
==
null
)
{
return
resultResponse
(
HaoBanErrCode
.
ERR_2
);
}
List
<
ProvinceDTO
>
provinceList
=
new
ArrayList
<
ProvinceDTO
>();
List
<
CityDTO
>
cityList
=
new
ArrayList
<
CityDTO
>();
List
<
CountyDTO
>
countyList
=
new
ArrayList
<
CountyDTO
>();
List
<
ProvinceDTO
>
provinceList
=
new
ArrayList
<
ProvinceDTO
>();
List
<
CityDTO
>
cityList
=
new
ArrayList
<
CityDTO
>();
List
<
CountyDTO
>
countyList
=
new
ArrayList
<
CountyDTO
>();
switch
(
type
)
{
// 省
case
1
:
...
...
@@ -202,20 +210,21 @@ public class StoreController extends WebBaseController {
return
resultResponse
(
HaoBanErrCode
.
ERR_8
);
}
//修改门店数据
@RequestMapping
(
"/change-store-detail"
)
public
HaobanResponse
changeStoreDetail
(
String
wxEnterpriseId
,
String
storeId
,
String
staffId
,
String
changeField
,
String
oldValue
,
String
newValue
)
{
if
(
StringUtils
.
isAnyBlank
(
wxEnterpriseId
,
storeId
,
changeField
))
{
public
HaobanResponse
changeStoreDetail
(
String
wxEnterpriseId
,
String
storeId
,
String
staffId
,
String
changeField
,
String
oldValue
,
String
newValue
)
{
if
(
StringUtils
.
isAnyBlank
(
wxEnterpriseId
,
storeId
,
changeField
))
{
return
resultResponse
(
HaoBanErrCode
.
ERR_2
);
}
if
(
StringUtils
.
isBlank
(
oldValue
))
{
if
(
StringUtils
.
isBlank
(
oldValue
))
{
oldValue
=
""
;
}
if
(
StringUtils
.
isBlank
(
newValue
))
{
if
(
StringUtils
.
isBlank
(
newValue
))
{
newValue
=
""
;
}
//增加判断是否是门店面积数字合法
if
(
StoreFieldEnum
.
STORE_AREA
.
getValue
().
equals
(
changeField
))
{
if
(
StoreFieldEnum
.
STORE_AREA
.
getValue
().
equals
(
changeField
))
{
try
{
Double
.
parseDouble
(
newValue
);
}
catch
(
Exception
e
)
{
...
...
@@ -223,9 +232,9 @@ public class StoreController extends WebBaseController {
}
}
//门店图片修改判断
if
(
StoreFieldEnum
.
STORE_IMAG
.
getValue
().
equals
(
changeField
))
{
if
(
StoreFieldEnum
.
STORE_IMAG
.
getValue
().
equals
(
changeField
))
{
//修改门店图片,不能为空
if
(
StringUtils
.
isBlank
(
newValue
))
{
if
(
StringUtils
.
isBlank
(
newValue
))
{
return
resultResponse
(
HaoBanErrCode
.
ERR_400020
);
}
}
...
...
@@ -238,21 +247,21 @@ public class StoreController extends WebBaseController {
logger
.
info
(
"==================bbb"
);
//默认开启审核
int
auditFlag
=
1
;
if
(
auditSettingDTO
!=
null
)
{
if
(
auditSettingDTO
!=
null
)
{
auditFlag
=
auditSettingDTO
.
getAuditFlag
();
}
logger
.
info
(
"==================auditFlag={}"
,
auditFlag
);
if
(
auditFlag
==
1
)
{
logger
.
info
(
"==================auditFlag={}"
,
auditFlag
);
if
(
auditFlag
==
1
)
{
//要审核
logger
.
info
(
"==================11111"
);
AuditDTO
auditDTO
=
auditApiService
.
findByStoreIdAndChangeField
(
storeId
,
changeField
);
if
(
auditDTO
==
null
)
{
if
(
auditDTO
==
null
)
{
//为空,可继续提交审核
int
i
=
auditApiService
.
save
(
1
,
wxEnterpriseId
,
enterpriseId
,
staffId
,
storeId
,
changeField
,
oldValue
,
newValue
);
}
else
{
int
i
=
auditApiService
.
save
(
1
,
wxEnterpriseId
,
enterpriseId
,
staffId
,
storeId
,
changeField
,
oldValue
,
newValue
);
}
else
{
return
resultResponse
(
HaoBanErrCode
.
ERR_400018
);
}
}
else
{
}
else
{
logger
.
info
(
"==================22222"
);
auditApiService
.
editStoreInfo
(
storeId
,
changeField
,
oldValue
,
newValue
);
}
...
...
@@ -262,7 +271,7 @@ public class StoreController extends WebBaseController {
//获取门店详情
@RequestMapping
(
"/store-detail"
)
public
HaobanResponse
storeDetail
(
String
enterpriseId
,
String
storeId
,
String
wxEnterpriseId
,
String
staffId
)
{
if
(
StringUtils
.
isAnyBlank
(
storeId
))
{
if
(
StringUtils
.
isAnyBlank
(
storeId
))
{
return
resultResponse
(
HaoBanErrCode
.
ERR_2
);
}
...
...
@@ -271,34 +280,34 @@ public class StoreController extends WebBaseController {
List
<
StorePhotoDTO
>
imgDTOList
=
storeService
.
getStoreImages
(
storeId
);
StoreDTO
store
=
storeService
.
getStore
(
storeId
);
StoreDetailVO
vo
=
EntityUtil
.
changeEntity
(
StoreDetailVO
.
class
,
store
);
if
(
CollectionUtil
.
isNotEmpty
(
imgDTOList
))
{
List
<
String
>
imgList
=
imgDTOList
.
stream
().
map
(
s
->
s
.
getQcloudImageUrl
()).
collect
(
Collectors
.
toList
());
if
(
CollectionUtil
.
isNotEmpty
(
imgDTOList
))
{
List
<
String
>
imgList
=
imgDTOList
.
stream
().
map
(
s
->
s
.
getQcloudImageUrl
()).
collect
(
Collectors
.
toList
());
vo
.
setImgList
(
imgList
);
}
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
"HH:mm"
);
if
(
vo
.
getOpenTime
()!=
null
)
{
if
(
vo
.
getOpenTime
()
!=
null
)
{
vo
.
setOpenTimeStr
(
sdf
.
format
(
vo
.
getOpenTime
()));
}
if
(
vo
.
getCloseTime
()!=
null
)
{
if
(
vo
.
getCloseTime
()
!=
null
)
{
vo
.
setCloseTimeStr
(
sdf
.
format
(
vo
.
getCloseTime
()));
}
vo
.
setAreaId
(
store
.
getAreaId
());
vo
.
setStoreAddress
(
store
.
getFullArea
()+
" "
+
store
.
getStoreAddress
());
vo
.
setStoreAddress
(
store
.
getFullArea
()
+
" "
+
store
.
getStoreAddress
());
// StaffDepartmentRelatedDTO staffDepartmentRelatedDTO = staffDepartmentRelatedApiService.getByStaffDepartmentRelatedId(staffDepartmentRelatedId);
// vo.setClerkCode(staffDepartmentRelatedDTO.getClerkCode());
// vo.setBindFlag(StringUtils.isEmpty(staffDepartmentRelatedDTO.getClerkCode())?0:1);
vo
.
setAuditDetail
(
list
);
AuditSettingDTO
auditSettingDTO
=
auditSettingApiService
.
findSettingByWxEnterpriseId
(
wxEnterpriseId
);
vo
.
setAuditFlag
(
auditSettingDTO
==
null
?
0
:
auditSettingDTO
.
getAuditFlag
());
if
(
vo
.
getStoreArea
()
==
null
||
vo
.
getStoreArea
()==-
1
)
{
vo
.
setAuditFlag
(
auditSettingDTO
==
null
?
0
:
auditSettingDTO
.
getAuditFlag
());
if
(
vo
.
getStoreArea
()
==
null
||
vo
.
getStoreArea
()
==
-
1
)
{
vo
.
setStoreArea
(-
1
d
);
}
ClerkMainStoreRelatedDTO
mainStore
=
clerkMainStoreRelatedApiService
.
getWxEnterpriseIdAndStaffId
(
wxEnterpriseId
,
staffId
);
if
(
mainStore
!=
null
&&
mainStore
.
getStoreId
().
equals
(
storeId
))
{
ClerkMainStoreRelatedDTO
mainStore
=
clerkMainStoreRelatedApiService
.
getWxEnterpriseIdAndStaffId
(
wxEnterpriseId
,
staffId
);
if
(
mainStore
!=
null
&&
mainStore
.
getStoreId
().
equals
(
storeId
))
{
vo
.
setMainStoreFlag
(
1
);
}
else
{
}
else
{
vo
.
setMainStoreFlag
(
0
);
}
WxEnterpriseRelationDetailDTO
enterpriseBindInfo
=
wxEnterpriseRelatedApiService
.
getEnterpriseBindInfo
(
wxEnterpriseId
,
enterpriseId
);
...
...
haoban-manage3-wx/src/main/java/com/gic/haoban/manage/web/controller/WxEnterpriseInfoController.java
View file @
1d3e256a
...
...
@@ -246,8 +246,8 @@ public class WxEnterpriseInfoController extends WebBaseController {
* @param qo
* @return
*/
@RequestMapping
(
"get-user-by-member-code"
)
@IgnoreLogin
@RequestMapping
(
"get-user-by-member-code"
)
public
HaobanResponse
getInfoByMemberCode
(
GetUserByMemberCodeQo
qo
)
{
WxEnterpriseDTO
enterpriseDetailDTO
=
null
;
if
(
StringUtils
.
isNotBlank
(
qo
.
getCorpId
()))
{
...
...
@@ -395,15 +395,15 @@ public class WxEnterpriseInfoController extends WebBaseController {
}
/**
*
获取绑定信息(会员小程序用)
*
会员小程序-获取绑定信息
*
* @param externalUserid
* @param wxUserId
* @param wxEnterpriseId
* @return
*/
@RequestMapping
(
"get-send-message-info"
)
@IgnoreLogin
@RequestMapping
(
"get-send-message-info"
)
public
HaobanResponse
getMessageMember
(
String
externalUserid
,
String
wxUserId
,
String
wxEnterpriseId
,
String
gicEnterpriseId
)
{
if
(
StringUtils
.
isAnyBlank
(
externalUserid
,
wxUserId
,
wxEnterpriseId
))
{
return
resultResponse
(
HaoBanErrCode
.
ERR_2
);
...
...
@@ -443,7 +443,7 @@ public class WxEnterpriseInfoController extends WebBaseController {
}
/**
*
绑定好友(会员小程序调用)
*
会员小程序-绑定好友
*
* @param memberId
* @param enterpriseId
...
...
@@ -451,8 +451,8 @@ public class WxEnterpriseInfoController extends WebBaseController {
* @param relationKey
* @return
*/
@RequestMapping
(
"member-bind-friend"
)
@IgnoreLogin
@RequestMapping
(
"member-bind-friend"
)
public
HaobanResponse
memberBindFriend
(
String
memberId
,
String
enterpriseId
,
String
unionid
,
String
relationKey
)
{
if
(
StringUtils
.
isAnyBlank
(
memberId
,
enterpriseId
,
relationKey
))
{
return
resultResponse
(
HaoBanErrCode
.
ERR_2
);
...
...
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