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
a87a0542
Commit
a87a0542
authored
May 09, 2020
by
fudahua
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/developer' into developer
parents
c3b1e83f
8776e2f5
Show whitespace changes
Inline
Side-by-side
Showing
49 changed files
with
2859 additions
and
20 deletions
+2859
-20
MaidianDictDTO.java
...in/java/com/gic/haoban/manage/api/dto/MaidianDictDTO.java
+129
-0
MaidianDictModuleDTO.java
...a/com/gic/haoban/manage/api/dto/MaidianDictModuleDTO.java
+69
-0
MaidianDictPageDTO.java
...ava/com/gic/haoban/manage/api/dto/MaidianDictPageDTO.java
+81
-0
MaterialCategoryDTO.java
...va/com/gic/haoban/manage/api/dto/MaterialCategoryDTO.java
+79
-0
MaterialDTO.java
.../main/java/com/gic/haoban/manage/api/dto/MaterialDTO.java
+169
-0
MaidianDictApiService.java
.../gic/haoban/manage/api/service/MaidianDictApiService.java
+25
-0
MaterialApiService.java
...com/gic/haoban/manage/api/service/MaterialApiService.java
+32
-0
MemberUnionidRelatedApiService.java
...an/manage/api/service/MemberUnionidRelatedApiService.java
+3
-0
StaffApiService.java
...va/com/gic/haoban/manage/api/service/StaffApiService.java
+1
-0
StaffDepartmentRelatedApiService.java
.../manage/api/service/StaffDepartmentRelatedApiService.java
+1
-1
MaidianDictController.java
...c/haoban/manage/web/controller/MaidianDictController.java
+63
-0
dubbo-haoban-manage3-operation-web.xml
...ain/webapp/WEB-INF/dubbo-haoban-manage3-operation-web.xml
+1
-3
MemberUnionidRelatedMapper.java
...manage/service/dao/mapper/MemberUnionidRelatedMapper.java
+3
-0
StaffMapper.java
...com/gic/haoban/manage/service/dao/mapper/StaffMapper.java
+2
-0
TabHaobanMaidianDictMapper.java
...manage/service/dao/mapper/TabHaobanMaidianDictMapper.java
+22
-0
TabHaobanMaidianDictModuleMapper.java
.../service/dao/mapper/TabHaobanMaidianDictModuleMapper.java
+22
-0
TabHaobanMaterialCategoryMapper.java
...e/service/dao/mapper/TabHaobanMaterialCategoryMapper.java
+27
-0
TabHaobanMaterialMapper.java
...an/manage/service/dao/mapper/TabHaobanMaterialMapper.java
+25
-0
TabHaobanMaidianDict.java
...ic/haoban/manage/service/entity/TabHaobanMaidianDict.java
+129
-0
TabHaobanMaidianDictModule.java
...ban/manage/service/entity/TabHaobanMaidianDictModule.java
+69
-0
TabHaobanMaterial.java
...m/gic/haoban/manage/service/entity/TabHaobanMaterial.java
+169
-0
TabHaobanMaterialCategory.java
...oban/manage/service/entity/TabHaobanMaterialCategory.java
+79
-0
MaterialCategoryService.java
...aoban/manage/service/service/MaterialCategoryService.java
+19
-0
MaterialService.java
...om/gic/haoban/manage/service/service/MaterialService.java
+20
-0
MemberUnionRelatedService.java
...ban/manage/service/service/MemberUnionRelatedService.java
+0
-1
MaterialCategoryServiceImpl.java
...age/service/service/impl/MaterialCategoryServiceImpl.java
+52
-0
MaterialServiceImpl.java
...oban/manage/service/service/impl/MaterialServiceImpl.java
+54
-0
StaffServiceImpl.java
.../haoban/manage/service/service/impl/StaffServiceImpl.java
+3
-0
BindApiServiceImpl.java
...n/manage/service/service/out/impl/BindApiServiceImpl.java
+91
-2
MaidianDictApiServiceImpl.java
...e/service/service/out/impl/MaidianDictApiServiceImpl.java
+89
-0
MaterialApiServiceImpl.java
...nage/service/service/out/impl/MaterialApiServiceImpl.java
+199
-0
MemberUnionidRelatedApiServiceImpl.java
.../service/out/impl/MemberUnionidRelatedApiServiceImpl.java
+8
-1
StaffApiServiceImpl.java
.../manage/service/service/out/impl/StaffApiServiceImpl.java
+10
-0
dubbo-haoban-manage-service.xml
...ervice/src/main/resources/dubbo-haoban-manage-service.xml
+2
-0
MemberUnionidRelatedMapper.xml
.../src/main/resources/mapper/MemberUnionidRelatedMapper.xml
+11
-0
StaffDepartmentRelatedMapper.xml
...rc/main/resources/mapper/StaffDepartmentRelatedMapper.xml
+0
-2
StaffMapper.xml
...manage3-service/src/main/resources/mapper/StaffMapper.xml
+9
-0
TabHaobanMaidianDictMapper.xml
.../src/main/resources/mapper/TabHaobanMaidianDictMapper.xml
+188
-0
TabHaobanMaidianDictModuleMapper.xml
...ain/resources/mapper/TabHaobanMaidianDictModuleMapper.xml
+116
-0
TabHaobanMaterialCategoryMapper.xml
...main/resources/mapper/TabHaobanMaterialCategoryMapper.xml
+136
-0
TabHaobanMaterialMapper.xml
...ice/src/main/resources/mapper/TabHaobanMaterialMapper.xml
+241
-0
ClerkController.java
...com/gic/haoban/manage/web/controller/ClerkController.java
+21
-1
DepartmentContoller.java
...gic/haoban/manage/web/controller/DepartmentContoller.java
+6
-6
MaterialController.java
.../gic/haoban/manage/web/controller/MaterialController.java
+210
-0
HaoBanErrCode.java
...java/com/gic/haoban/manage/web/errCode/HaoBanErrCode.java
+9
-0
DepartmentAddQO.java
...in/java/com/gic/haoban/manage/web/qo/DepartmentAddQO.java
+4
-3
dubbo-haoban-manage-web.xml
...3-web/src/main/webapp/WEB-INF/dubbo-haoban-manage-web.xml
+2
-0
MaterialController.java
.../gic/haoban/manage/web/controller/MaterialController.java
+66
-0
MaterialVO.java
...rc/main/java/com/gic/haoban/manage/web/vo/MaterialVO.java
+93
-0
No files found.
haoban-manage3-api/src/main/java/com/gic/haoban/manage/api/dto/MaidianDictDTO.java
0 → 100644
View file @
a87a0542
package
com
.
gic
.
haoban
.
manage
.
api
.
dto
;
import
java.io.Serializable
;
import
java.util.Date
;
public
class
MaidianDictDTO
implements
Serializable
{
private
String
dictId
;
private
String
dictName
;
private
String
dictData
;
private
String
dictDescrible
;
private
String
moduleId
;
private
Date
createTime
;
private
Date
updateTime
;
private
Integer
status
;
private
String
operationPerson
;
private
Integer
loginFlag
;
private
Integer
transitFlag
;
private
String
code
;
private
static
final
long
serialVersionUID
=
1L
;
public
String
getDictId
()
{
return
dictId
;
}
public
void
setDictId
(
String
dictId
)
{
this
.
dictId
=
dictId
==
null
?
null
:
dictId
.
trim
();
}
public
String
getDictName
()
{
return
dictName
;
}
public
void
setDictName
(
String
dictName
)
{
this
.
dictName
=
dictName
==
null
?
null
:
dictName
.
trim
();
}
public
String
getDictData
()
{
return
dictData
;
}
public
void
setDictData
(
String
dictData
)
{
this
.
dictData
=
dictData
==
null
?
null
:
dictData
.
trim
();
}
public
String
getDictDescrible
()
{
return
dictDescrible
;
}
public
void
setDictDescrible
(
String
dictDescrible
)
{
this
.
dictDescrible
=
dictDescrible
==
null
?
null
:
dictDescrible
.
trim
();
}
public
String
getModuleId
()
{
return
moduleId
;
}
public
void
setModuleId
(
String
moduleId
)
{
this
.
moduleId
=
moduleId
==
null
?
null
:
moduleId
.
trim
();
}
public
Date
getCreateTime
()
{
return
createTime
;
}
public
void
setCreateTime
(
Date
createTime
)
{
this
.
createTime
=
createTime
;
}
public
Date
getUpdateTime
()
{
return
updateTime
;
}
public
void
setUpdateTime
(
Date
updateTime
)
{
this
.
updateTime
=
updateTime
;
}
public
Integer
getStatus
()
{
return
status
;
}
public
void
setStatus
(
Integer
status
)
{
this
.
status
=
status
;
}
public
String
getOperationPerson
()
{
return
operationPerson
;
}
public
void
setOperationPerson
(
String
operationPerson
)
{
this
.
operationPerson
=
operationPerson
==
null
?
null
:
operationPerson
.
trim
();
}
public
Integer
getLoginFlag
()
{
return
loginFlag
;
}
public
void
setLoginFlag
(
Integer
loginFlag
)
{
this
.
loginFlag
=
loginFlag
;
}
public
Integer
getTransitFlag
()
{
return
transitFlag
;
}
public
void
setTransitFlag
(
Integer
transitFlag
)
{
this
.
transitFlag
=
transitFlag
;
}
public
String
getCode
()
{
return
code
;
}
public
void
setCode
(
String
code
)
{
this
.
code
=
code
==
null
?
null
:
code
.
trim
();
}
}
\ No newline at end of file
haoban-manage3-api/src/main/java/com/gic/haoban/manage/api/dto/MaidianDictModuleDTO.java
0 → 100644
View file @
a87a0542
package
com
.
gic
.
haoban
.
manage
.
api
.
dto
;
import
java.io.Serializable
;
import
java.util.Date
;
public
class
MaidianDictModuleDTO
implements
Serializable
{
private
String
moduleId
;
private
String
moduleName
;
private
Date
createTime
;
private
Date
updateTime
;
private
Integer
status
;
private
String
operationPerson
;
private
static
final
long
serialVersionUID
=
1L
;
public
String
getModuleId
()
{
return
moduleId
;
}
public
void
setModuleId
(
String
moduleId
)
{
this
.
moduleId
=
moduleId
==
null
?
null
:
moduleId
.
trim
();
}
public
String
getModuleName
()
{
return
moduleName
;
}
public
void
setModuleName
(
String
moduleName
)
{
this
.
moduleName
=
moduleName
==
null
?
null
:
moduleName
.
trim
();
}
public
Date
getCreateTime
()
{
return
createTime
;
}
public
void
setCreateTime
(
Date
createTime
)
{
this
.
createTime
=
createTime
;
}
public
Date
getUpdateTime
()
{
return
updateTime
;
}
public
void
setUpdateTime
(
Date
updateTime
)
{
this
.
updateTime
=
updateTime
;
}
public
Integer
getStatus
()
{
return
status
;
}
public
void
setStatus
(
Integer
status
)
{
this
.
status
=
status
;
}
public
String
getOperationPerson
()
{
return
operationPerson
;
}
public
void
setOperationPerson
(
String
operationPerson
)
{
this
.
operationPerson
=
operationPerson
==
null
?
null
:
operationPerson
.
trim
();
}
}
\ No newline at end of file
haoban-manage3-api/src/main/java/com/gic/haoban/manage/api/dto/MaidianDictPageDTO.java
0 → 100644
View file @
a87a0542
package
com
.
gic
.
haoban
.
manage
.
api
.
dto
;
import
java.io.Serializable
;
import
java.util.Date
;
import
java.util.List
;
public
class
MaidianDictPageDTO
implements
Serializable
{
private
String
moduleId
;
private
String
moduleName
;
private
Date
createTime
;
private
Date
updateTime
;
private
Integer
status
;
private
String
operationPerson
;
private
List
<
MaidianDictDTO
>
pageList
;
private
static
final
long
serialVersionUID
=
1L
;
public
List
<
MaidianDictDTO
>
getPageList
()
{
return
pageList
;
}
public
void
setPageList
(
List
<
MaidianDictDTO
>
pageList
)
{
this
.
pageList
=
pageList
;
}
public
String
getModuleId
()
{
return
moduleId
;
}
public
void
setModuleId
(
String
moduleId
)
{
this
.
moduleId
=
moduleId
==
null
?
null
:
moduleId
.
trim
();
}
public
String
getModuleName
()
{
return
moduleName
;
}
public
void
setModuleName
(
String
moduleName
)
{
this
.
moduleName
=
moduleName
==
null
?
null
:
moduleName
.
trim
();
}
public
Date
getCreateTime
()
{
return
createTime
;
}
public
void
setCreateTime
(
Date
createTime
)
{
this
.
createTime
=
createTime
;
}
public
Date
getUpdateTime
()
{
return
updateTime
;
}
public
void
setUpdateTime
(
Date
updateTime
)
{
this
.
updateTime
=
updateTime
;
}
public
Integer
getStatus
()
{
return
status
;
}
public
void
setStatus
(
Integer
status
)
{
this
.
status
=
status
;
}
public
String
getOperationPerson
()
{
return
operationPerson
;
}
public
void
setOperationPerson
(
String
operationPerson
)
{
this
.
operationPerson
=
operationPerson
==
null
?
null
:
operationPerson
.
trim
();
}
}
\ No newline at end of file
haoban-manage3-api/src/main/java/com/gic/haoban/manage/api/dto/MaterialCategoryDTO.java
0 → 100644
View file @
a87a0542
package
com
.
gic
.
haoban
.
manage
.
api
.
dto
;
import
java.util.Date
;
public
class
MaterialCategoryDTO
{
private
String
categoryId
;
private
String
categoryName
;
private
String
categoryParentId
;
private
String
wxEnterpriseId
;
private
Integer
statusFlag
;
private
Date
createTime
;
private
Date
updateTime
;
private
static
final
long
serialVersionUID
=
1L
;
public
String
getCategoryId
()
{
return
categoryId
;
}
public
void
setCategoryId
(
String
categoryId
)
{
this
.
categoryId
=
categoryId
==
null
?
null
:
categoryId
.
trim
();
}
public
String
getCategoryName
()
{
return
categoryName
;
}
public
void
setCategoryName
(
String
categoryName
)
{
this
.
categoryName
=
categoryName
==
null
?
null
:
categoryName
.
trim
();
}
public
String
getCategoryParentId
()
{
return
categoryParentId
;
}
public
void
setCategoryParentId
(
String
categoryParentId
)
{
this
.
categoryParentId
=
categoryParentId
==
null
?
null
:
categoryParentId
.
trim
();
}
public
String
getWxEnterpriseId
()
{
return
wxEnterpriseId
;
}
public
void
setWxEnterpriseId
(
String
wxEnterpriseId
)
{
this
.
wxEnterpriseId
=
wxEnterpriseId
==
null
?
null
:
wxEnterpriseId
.
trim
();
}
public
Integer
getStatusFlag
()
{
return
statusFlag
;
}
public
void
setStatusFlag
(
Integer
statusFlag
)
{
this
.
statusFlag
=
statusFlag
;
}
public
Date
getCreateTime
()
{
return
createTime
;
}
public
void
setCreateTime
(
Date
createTime
)
{
this
.
createTime
=
createTime
;
}
public
Date
getUpdateTime
()
{
return
updateTime
;
}
public
void
setUpdateTime
(
Date
updateTime
)
{
this
.
updateTime
=
updateTime
;
}
}
haoban-manage3-api/src/main/java/com/gic/haoban/manage/api/dto/MaterialDTO.java
0 → 100644
View file @
a87a0542
package
com
.
gic
.
haoban
.
manage
.
api
.
dto
;
import
java.util.Date
;
public
class
MaterialDTO
{
private
String
materialId
;
private
String
materialTitle
;
private
Integer
materialType
;
private
String
categoryId
;
private
String
materialContent
;
private
String
wxLastUploadTime
;
private
String
mediaId
;
private
String
wxEnterpriseId
;
private
String
staffId
;
private
String
staffName
;
private
String
imgUrl
;
private
String
materialDesc
;
private
Integer
statusFlag
;
private
String
link
;
private
Date
createTime
;
private
Date
updateTime
;
private
static
final
long
serialVersionUID
=
1L
;
public
String
getMaterialId
()
{
return
materialId
;
}
public
void
setMaterialId
(
String
materialId
)
{
this
.
materialId
=
materialId
==
null
?
null
:
materialId
.
trim
();
}
public
String
getMaterialTitle
()
{
return
materialTitle
;
}
public
void
setMaterialTitle
(
String
materialTitle
)
{
this
.
materialTitle
=
materialTitle
==
null
?
null
:
materialTitle
.
trim
();
}
public
Integer
getMaterialType
()
{
return
materialType
;
}
public
void
setMaterialType
(
Integer
materialType
)
{
this
.
materialType
=
materialType
;
}
public
String
getCategoryId
()
{
return
categoryId
;
}
public
void
setCategoryId
(
String
categoryId
)
{
this
.
categoryId
=
categoryId
==
null
?
null
:
categoryId
.
trim
();
}
public
String
getMaterialContent
()
{
return
materialContent
;
}
public
void
setMaterialContent
(
String
materialContent
)
{
this
.
materialContent
=
materialContent
==
null
?
null
:
materialContent
.
trim
();
}
public
String
getWxLastUploadTime
()
{
return
wxLastUploadTime
;
}
public
void
setWxLastUploadTime
(
String
wxLastUploadTime
)
{
this
.
wxLastUploadTime
=
wxLastUploadTime
==
null
?
null
:
wxLastUploadTime
.
trim
();
}
public
String
getMediaId
()
{
return
mediaId
;
}
public
void
setMediaId
(
String
mediaId
)
{
this
.
mediaId
=
mediaId
==
null
?
null
:
mediaId
.
trim
();
}
public
String
getWxEnterpriseId
()
{
return
wxEnterpriseId
;
}
public
void
setWxEnterpriseId
(
String
wxEnterpriseId
)
{
this
.
wxEnterpriseId
=
wxEnterpriseId
==
null
?
null
:
wxEnterpriseId
.
trim
();
}
public
String
getStaffId
()
{
return
staffId
;
}
public
void
setStaffId
(
String
staffId
)
{
this
.
staffId
=
staffId
==
null
?
null
:
staffId
.
trim
();
}
public
String
getStaffName
()
{
return
staffName
;
}
public
void
setStaffName
(
String
staffName
)
{
this
.
staffName
=
staffName
==
null
?
null
:
staffName
.
trim
();
}
public
String
getImgUrl
()
{
return
imgUrl
;
}
public
void
setImgUrl
(
String
imgUrl
)
{
this
.
imgUrl
=
imgUrl
==
null
?
null
:
imgUrl
.
trim
();
}
public
String
getMaterialDesc
()
{
return
materialDesc
;
}
public
void
setMaterialDesc
(
String
materialDesc
)
{
this
.
materialDesc
=
materialDesc
==
null
?
null
:
materialDesc
.
trim
();
}
public
Integer
getStatusFlag
()
{
return
statusFlag
;
}
public
void
setStatusFlag
(
Integer
statusFlag
)
{
this
.
statusFlag
=
statusFlag
;
}
public
String
getLink
()
{
return
link
;
}
public
void
setLink
(
String
link
)
{
this
.
link
=
link
==
null
?
null
:
link
.
trim
();
}
public
Date
getCreateTime
()
{
return
createTime
;
}
public
void
setCreateTime
(
Date
createTime
)
{
this
.
createTime
=
createTime
;
}
public
Date
getUpdateTime
()
{
return
updateTime
;
}
public
void
setUpdateTime
(
Date
updateTime
)
{
this
.
updateTime
=
updateTime
;
}
}
haoban-manage3-api/src/main/java/com/gic/haoban/manage/api/service/MaidianDictApiService.java
0 → 100644
View file @
a87a0542
package
com
.
gic
.
haoban
.
manage
.
api
.
service
;
import
java.util.List
;
import
com.gic.haoban.manage.api.dto.MaidianDictDTO
;
import
com.gic.haoban.manage.api.dto.MaidianDictModuleDTO
;
import
com.gic.haoban.manage.api.dto.MaidianDictPageDTO
;
/**
* Created by tgs on 2020/2/9.
*/
public
interface
MaidianDictApiService
{
void
saveModule
(
MaidianDictModuleDTO
dto
);
void
savePage
(
MaidianDictDTO
dto
);
void
delPage
(
String
dictId
);
void
delModule
(
String
moduleId
);
List
<
MaidianDictPageDTO
>
dictPage
();
}
haoban-manage3-api/src/main/java/com/gic/haoban/manage/api/service/MaterialApiService.java
0 → 100644
View file @
a87a0542
package
com
.
gic
.
haoban
.
manage
.
api
.
service
;
import
java.util.List
;
import
com.gic.api.base.commons.Page
;
import
com.gic.haoban.base.api.common.BasePageInfo
;
import
com.gic.haoban.manage.api.dto.MaterialCategoryDTO
;
import
com.gic.haoban.manage.api.dto.MaterialDTO
;
public
interface
MaterialApiService
{
boolean
hasCategoryNameExsit
(
String
categoryName
,
String
categoryParentId
,
String
categoryId
);
void
insertCategory
(
MaterialCategoryDTO
materialCategoryDTO
);
List
<
MaterialCategoryDTO
>
listCategory
(
String
wxEnterpriseId
);
MaterialCategoryDTO
selectMaterialCategoryById
(
String
categoryId
);
void
editCategory
(
MaterialCategoryDTO
materialCategoryDTO
);
List
<
MaterialDTO
>
listMaterialByCategoryId
(
String
categoryId
);
void
insertMaterial
(
MaterialDTO
materialDTO
);
MaterialDTO
selectMaterialById
(
String
materialId
);
void
editMaterial
(
MaterialDTO
materialDTO
);
Page
<
MaterialDTO
>
listMaterial
(
String
wxEnterpriseId
,
String
keyword
,
String
categoryId
,
Integer
materialType
,
BasePageInfo
pageInfo
);
}
haoban-manage3-api/src/main/java/com/gic/haoban/manage/api/service/MemberUnionidRelatedApiService.java
View file @
a87a0542
package
com
.
gic
.
haoban
.
manage
.
api
.
service
;
package
com
.
gic
.
haoban
.
manage
.
api
.
service
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.List
;
import
com.gic.haoban.manage.api.dto.MemberStoreDTO
;
import
com.gic.haoban.manage.api.dto.MemberStoreDTO
;
...
@@ -17,6 +18,8 @@ public interface MemberUnionidRelatedApiService {
...
@@ -17,6 +18,8 @@ public interface MemberUnionidRelatedApiService {
List
<
MemberUnionidRelatedDTO
>
getByWxUserIdAndWxEnterpriseId
(
String
wxUserId
,
String
wxEnterpriseId
);
List
<
MemberUnionidRelatedDTO
>
getByWxUserIdAndWxEnterpriseId
(
String
wxUserId
,
String
wxEnterpriseId
);
List
<
MemberUnionidRelatedDTO
>
listByWxEnterpriseIdAndDate
(
String
wxEnterpriseId
,
Date
date
);
List
<
MemberStoreDTO
>
listByExTernalUseridAndWxUserId
(
String
externalUserid
,
String
wxUserId
);
List
<
MemberStoreDTO
>
listByExTernalUseridAndWxUserId
(
String
externalUserid
,
String
wxUserId
);
String
add
(
String
wxEnterpriseId
,
String
selfExternalUserId
,
String
userId1
);
String
add
(
String
wxEnterpriseId
,
String
selfExternalUserId
,
String
userId1
);
...
...
haoban-manage3-api/src/main/java/com/gic/haoban/manage/api/service/StaffApiService.java
View file @
a87a0542
...
@@ -18,6 +18,7 @@ public interface StaffApiService {
...
@@ -18,6 +18,7 @@ public interface StaffApiService {
public
List
<
StaffDTO
>
listByIds
(
List
<
String
>
staffIds
);
public
List
<
StaffDTO
>
listByIds
(
List
<
String
>
staffIds
);
public
List
<
StaffDTO
>
listByWxUserId
(
String
wxUserId
);
public
StaffDTO
selectByNationcodeAndPhoneNumber
(
String
wxEnterpriseId
,
String
nationcode
,
String
phoneNumber
);
public
StaffDTO
selectByNationcodeAndPhoneNumber
(
String
wxEnterpriseId
,
String
nationcode
,
String
phoneNumber
);
...
...
haoban-manage3-api/src/main/java/com/gic/haoban/manage/api/service/StaffDepartmentRelatedApiService.java
View file @
a87a0542
...
@@ -33,7 +33,7 @@ public interface StaffDepartmentRelatedApiService {
...
@@ -33,7 +33,7 @@ public interface StaffDepartmentRelatedApiService {
String
getPageUrl
(
int
type
,
String
data
);
String
getPageUrl
(
int
type
,
String
data
);
//发送消息,单人发送
//发送消息,单人发送
boolean
sendSingleMessage
(
String
wxUser
Id
,
String
title
,
String
content
,
String
pageUrl
);
boolean
sendSingleMessage
(
String
clerk
Id
,
String
title
,
String
content
,
String
pageUrl
);
List
<
StaffDepartmentRelatedDTO
>
listByStaffIds
(
List
<
String
>
staffIds
);
List
<
StaffDepartmentRelatedDTO
>
listByStaffIds
(
List
<
String
>
staffIds
);
...
...
haoban-manage3-operation-web/src/main/java/com/gic/haoban/manage/web/controller/MaidianDictController.java
0 → 100644
View file @
a87a0542
package
com
.
gic
.
haoban
.
manage
.
web
.
controller
;
import
java.util.List
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
com.alibaba.csp.sentinel.util.StringUtil
;
import
com.gic.haoban.common.utils.HaobanResponse
;
import
com.gic.haoban.manage.api.dto.MaidianDictDTO
;
import
com.gic.haoban.manage.api.dto.MaidianDictModuleDTO
;
import
com.gic.haoban.manage.api.dto.MaidianDictPageDTO
;
import
com.gic.haoban.manage.api.service.MaidianDictApiService
;
import
com.gic.haoban.manage.web.errCode.HaoBanErrCode
;
@RequestMapping
(
"/maidian"
)
@RestController
public
class
MaidianDictController
extends
WebBaseController
{
private
static
final
String
LOGIN_URL
=
"/haoban-manage3-web/yw-login"
;
private
static
Logger
logger
=
LoggerFactory
.
getLogger
(
MaidianDictController
.
class
);
@Autowired
private
MaidianDictApiService
maidianDictApiService
;
//保存模块
@RequestMapping
(
"save-module"
)
public
HaobanResponse
saveModule
(
MaidianDictModuleDTO
dto
)
{
maidianDictApiService
.
saveModule
(
dto
);
return
resultResponse
(
HaoBanErrCode
.
ERR_1
);
}
//保存字典
@RequestMapping
(
"save-page"
)
public
HaobanResponse
savePage
(
MaidianDictDTO
dto
)
{
if
(
StringUtil
.
isEmpty
(
dto
.
getModuleId
())){
return
resultResponse
(
HaoBanErrCode
.
ERR_2
);
}
maidianDictApiService
.
savePage
(
dto
);
return
resultResponse
(
HaoBanErrCode
.
ERR_1
);
}
//删除模块
@RequestMapping
(
"del-module"
)
public
HaobanResponse
delModule
(
String
moduleId
)
{
maidianDictApiService
.
delModule
(
moduleId
);
return
resultResponse
(
HaoBanErrCode
.
ERR_1
);
}
//删除字典
@RequestMapping
(
"del-page"
)
public
HaobanResponse
delPage
(
String
dictId
)
{
maidianDictApiService
.
delPage
(
dictId
);
return
resultResponse
(
HaoBanErrCode
.
ERR_1
);
}
//字典页面
@RequestMapping
(
"dict-page"
)
public
HaobanResponse
dictPage
(
)
{
List
<
MaidianDictPageDTO
>
result
=
maidianDictApiService
.
dictPage
();
return
resultResponse
(
HaoBanErrCode
.
ERR_1
,
result
);
}
}
haoban-manage3-operation-web/src/main/webapp/WEB-INF/dubbo-haoban-manage3-operation-web.xml
View file @
a87a0542
...
@@ -32,8 +32,6 @@
...
@@ -32,8 +32,6 @@
<dubbo:reference
interface=
"com.gic.haoban.manage.api.service.StaffDepartmentRelatedApiService"
id=
"staffDepartmentRelatedApiService"
/>
<dubbo:reference
interface=
"com.gic.haoban.manage.api.service.StaffDepartmentRelatedApiService"
id=
"staffDepartmentRelatedApiService"
/>
<dubbo:reference
interface=
"com.gic.haoban.manage.api.service.DictApiService"
id=
"dictApiService"
/>
<dubbo:reference
interface=
"com.gic.haoban.manage.api.service.DictApiService"
id=
"dictApiService"
/>
<dubbo:reference
interface=
"com.gic.haoban.manage.api.service.HelpApiService"
id=
"helpApiService"
/>
<dubbo:reference
interface=
"com.gic.haoban.manage.api.service.HelpApiService"
id=
"helpApiService"
/>
<dubbo:reference
interface=
"com.gic.haoban.manage.api.service.MaidianDictApiService"
id=
"maidianDictApiService"
/>
</beans>
</beans>
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/dao/mapper/MemberUnionidRelatedMapper.java
View file @
a87a0542
package
com
.
gic
.
haoban
.
manage
.
service
.
dao
.
mapper
;
package
com
.
gic
.
haoban
.
manage
.
service
.
dao
.
mapper
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.List
;
import
org.apache.ibatis.annotations.Param
;
import
org.apache.ibatis.annotations.Param
;
...
@@ -28,6 +29,8 @@ public interface MemberUnionidRelatedMapper {
...
@@ -28,6 +29,8 @@ public interface MemberUnionidRelatedMapper {
List
<
MemberUnionidRelated
>
getByWxUserIdAndWxEnterpriseId
(
@Param
(
"wxUserId"
)
String
wxUserId
,
@Param
(
"wxEnterpriseId"
)
String
wxEnterpriseId
);
List
<
MemberUnionidRelated
>
getByWxUserIdAndWxEnterpriseId
(
@Param
(
"wxUserId"
)
String
wxUserId
,
@Param
(
"wxEnterpriseId"
)
String
wxEnterpriseId
);
List
<
MemberUnionidRelated
>
listByWxEnterpriseIdAndDate
(
@Param
(
"wxEnterpriseId"
)
String
wxEnterpriseId
,
@Param
(
"date"
)
Date
date
);
MemberUnionidRelated
getByParams
(
@Param
(
"wxUserId"
)
String
wxUserId
,
@Param
(
"enterpriseId"
)
String
enterpriseId
,
MemberUnionidRelated
getByParams
(
@Param
(
"wxUserId"
)
String
wxUserId
,
@Param
(
"enterpriseId"
)
String
enterpriseId
,
@Param
(
"externalName"
)
String
name
,
@Param
(
"addCreateTime"
)
String
createTime
);
@Param
(
"externalName"
)
String
name
,
@Param
(
"addCreateTime"
)
String
createTime
);
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/dao/mapper/StaffMapper.java
View file @
a87a0542
...
@@ -25,6 +25,8 @@ public interface StaffMapper {
...
@@ -25,6 +25,8 @@ public interface StaffMapper {
List
<
TabHaobanStaff
>
listByIds
(
@Param
(
"staffIds"
)
List
<
String
>
staffIds
);
List
<
TabHaobanStaff
>
listByIds
(
@Param
(
"staffIds"
)
List
<
String
>
staffIds
);
List
<
TabHaobanStaff
>
listByWxUserId
(
@Param
(
"wxUserId"
)
String
wxUserId
);
List
<
TabHaobanStaff
>
listLikeName
(
@Param
(
"staffName"
)
String
staffName
);
List
<
TabHaobanStaff
>
listLikeName
(
@Param
(
"staffName"
)
String
staffName
);
Page
<
TabHaobanStaff
>
pageStaff
(
@Param
(
"staffIds"
)
Set
<
String
>
staffIds
,
@Param
(
"activeFlag"
)
Integer
activeFlag
,
@Param
(
"keyword"
)
String
keyword
);
Page
<
TabHaobanStaff
>
pageStaff
(
@Param
(
"staffIds"
)
Set
<
String
>
staffIds
,
@Param
(
"activeFlag"
)
Integer
activeFlag
,
@Param
(
"keyword"
)
String
keyword
);
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/dao/mapper/TabHaobanMaidianDictMapper.java
0 → 100644
View file @
a87a0542
package
com
.
gic
.
haoban
.
manage
.
service
.
dao
.
mapper
;
import
java.util.List
;
import
com.gic.haoban.manage.service.entity.TabHaobanMaidianDict
;
public
interface
TabHaobanMaidianDictMapper
{
int
deleteByPrimaryKey
(
String
dictId
);
int
insert
(
TabHaobanMaidianDict
record
);
int
insertSelective
(
TabHaobanMaidianDict
record
);
TabHaobanMaidianDict
selectByPrimaryKey
(
String
dictId
);
int
updateByPrimaryKeySelective
(
TabHaobanMaidianDict
record
);
int
updateByPrimaryKey
(
TabHaobanMaidianDict
record
);
List
<
TabHaobanMaidianDict
>
listByModuleId
(
String
moduleId
);
}
\ No newline at end of file
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/dao/mapper/TabHaobanMaidianDictModuleMapper.java
0 → 100644
View file @
a87a0542
package
com
.
gic
.
haoban
.
manage
.
service
.
dao
.
mapper
;
import
java.util.List
;
import
com.gic.haoban.manage.service.entity.TabHaobanMaidianDictModule
;
public
interface
TabHaobanMaidianDictModuleMapper
{
int
deleteByPrimaryKey
(
String
moduleId
);
int
insert
(
TabHaobanMaidianDictModule
record
);
int
insertSelective
(
TabHaobanMaidianDictModule
record
);
TabHaobanMaidianDictModule
selectByPrimaryKey
(
String
moduleId
);
int
updateByPrimaryKeySelective
(
TabHaobanMaidianDictModule
record
);
int
updateByPrimaryKey
(
TabHaobanMaidianDictModule
record
);
List
<
TabHaobanMaidianDictModule
>
list
();
}
\ No newline at end of file
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/dao/mapper/TabHaobanMaterialCategoryMapper.java
0 → 100644
View file @
a87a0542
package
com
.
gic
.
haoban
.
manage
.
service
.
dao
.
mapper
;
import
java.util.List
;
import
org.apache.ibatis.annotations.Param
;
import
com.gic.haoban.manage.api.dto.MaterialCategoryDTO
;
import
com.gic.haoban.manage.service.entity.TabHaobanMaterialCategory
;
public
interface
TabHaobanMaterialCategoryMapper
{
int
deleteByPrimaryKey
(
String
categoryId
);
int
insert
(
TabHaobanMaterialCategory
record
);
int
insertSelective
(
TabHaobanMaterialCategory
record
);
TabHaobanMaterialCategory
selectByPrimaryKey
(
String
categoryId
);
int
updateByPrimaryKeySelective
(
TabHaobanMaterialCategory
record
);
int
updateByPrimaryKey
(
TabHaobanMaterialCategory
record
);
TabHaobanMaterialCategory
selectByCategoryNameAndParentId
(
@Param
(
"categoryName"
)
String
categoryName
,
@Param
(
"categoryParentId"
)
String
categoryParentId
);
List
<
TabHaobanMaterialCategory
>
listCategory
(
@Param
(
"wxEnterpriseId"
)
String
wxEnterpriseId
);
}
\ No newline at end of file
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/dao/mapper/TabHaobanMaterialMapper.java
0 → 100644
View file @
a87a0542
package
com
.
gic
.
haoban
.
manage
.
service
.
dao
.
mapper
;
import
org.apache.ibatis.annotations.Param
;
import
com.gic.haoban.manage.service.entity.TabHaobanMaterial
;
import
com.github.pagehelper.Page
;
public
interface
TabHaobanMaterialMapper
{
int
deleteByPrimaryKey
(
String
materialId
);
int
insert
(
TabHaobanMaterial
record
);
int
insertSelective
(
TabHaobanMaterial
record
);
TabHaobanMaterial
selectByPrimaryKey
(
String
materialId
);
int
updateByPrimaryKeySelective
(
TabHaobanMaterial
record
);
int
updateByPrimaryKey
(
TabHaobanMaterial
record
);
TabHaobanMaterial
listMaterialByCategoryId
(
String
categoryId
);
Page
<
TabHaobanMaterial
>
listMaterial
(
@Param
(
"wxEnterpriseId"
)
String
wxEnterpriseId
,
@Param
(
"keyword"
)
String
keyword
,
@Param
(
"categoryId"
)
String
categoryId
,
@Param
(
"materialType"
)
Integer
materialType
);
}
\ No newline at end of file
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/entity/TabHaobanMaidianDict.java
0 → 100644
View file @
a87a0542
package
com
.
gic
.
haoban
.
manage
.
service
.
entity
;
import
java.io.Serializable
;
import
java.util.Date
;
public
class
TabHaobanMaidianDict
implements
Serializable
{
private
String
dictId
;
private
String
dictName
;
private
String
dictData
;
private
String
dictDescrible
;
private
String
moduleId
;
private
Date
createTime
;
private
Date
updateTime
;
private
Integer
status
;
private
String
operationPerson
;
private
Integer
loginFlag
;
private
Integer
transitFlag
;
private
String
code
;
private
static
final
long
serialVersionUID
=
1L
;
public
String
getDictId
()
{
return
dictId
;
}
public
void
setDictId
(
String
dictId
)
{
this
.
dictId
=
dictId
==
null
?
null
:
dictId
.
trim
();
}
public
String
getDictName
()
{
return
dictName
;
}
public
void
setDictName
(
String
dictName
)
{
this
.
dictName
=
dictName
==
null
?
null
:
dictName
.
trim
();
}
public
String
getDictData
()
{
return
dictData
;
}
public
void
setDictData
(
String
dictData
)
{
this
.
dictData
=
dictData
==
null
?
null
:
dictData
.
trim
();
}
public
String
getDictDescrible
()
{
return
dictDescrible
;
}
public
void
setDictDescrible
(
String
dictDescrible
)
{
this
.
dictDescrible
=
dictDescrible
==
null
?
null
:
dictDescrible
.
trim
();
}
public
String
getModuleId
()
{
return
moduleId
;
}
public
void
setModuleId
(
String
moduleId
)
{
this
.
moduleId
=
moduleId
==
null
?
null
:
moduleId
.
trim
();
}
public
Date
getCreateTime
()
{
return
createTime
;
}
public
void
setCreateTime
(
Date
createTime
)
{
this
.
createTime
=
createTime
;
}
public
Date
getUpdateTime
()
{
return
updateTime
;
}
public
void
setUpdateTime
(
Date
updateTime
)
{
this
.
updateTime
=
updateTime
;
}
public
Integer
getStatus
()
{
return
status
;
}
public
void
setStatus
(
Integer
status
)
{
this
.
status
=
status
;
}
public
String
getOperationPerson
()
{
return
operationPerson
;
}
public
void
setOperationPerson
(
String
operationPerson
)
{
this
.
operationPerson
=
operationPerson
==
null
?
null
:
operationPerson
.
trim
();
}
public
Integer
getLoginFlag
()
{
return
loginFlag
;
}
public
void
setLoginFlag
(
Integer
loginFlag
)
{
this
.
loginFlag
=
loginFlag
;
}
public
Integer
getTransitFlag
()
{
return
transitFlag
;
}
public
void
setTransitFlag
(
Integer
transitFlag
)
{
this
.
transitFlag
=
transitFlag
;
}
public
String
getCode
()
{
return
code
;
}
public
void
setCode
(
String
code
)
{
this
.
code
=
code
==
null
?
null
:
code
.
trim
();
}
}
\ No newline at end of file
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/entity/TabHaobanMaidianDictModule.java
0 → 100644
View file @
a87a0542
package
com
.
gic
.
haoban
.
manage
.
service
.
entity
;
import
java.io.Serializable
;
import
java.util.Date
;
public
class
TabHaobanMaidianDictModule
implements
Serializable
{
private
String
moduleId
;
private
String
moduleName
;
private
Date
createTime
;
private
Date
updateTime
;
private
Integer
status
;
private
String
operationPerson
;
private
static
final
long
serialVersionUID
=
1L
;
public
String
getModuleId
()
{
return
moduleId
;
}
public
void
setModuleId
(
String
moduleId
)
{
this
.
moduleId
=
moduleId
==
null
?
null
:
moduleId
.
trim
();
}
public
String
getModuleName
()
{
return
moduleName
;
}
public
void
setModuleName
(
String
moduleName
)
{
this
.
moduleName
=
moduleName
==
null
?
null
:
moduleName
.
trim
();
}
public
Date
getCreateTime
()
{
return
createTime
;
}
public
void
setCreateTime
(
Date
createTime
)
{
this
.
createTime
=
createTime
;
}
public
Date
getUpdateTime
()
{
return
updateTime
;
}
public
void
setUpdateTime
(
Date
updateTime
)
{
this
.
updateTime
=
updateTime
;
}
public
Integer
getStatus
()
{
return
status
;
}
public
void
setStatus
(
Integer
status
)
{
this
.
status
=
status
;
}
public
String
getOperationPerson
()
{
return
operationPerson
;
}
public
void
setOperationPerson
(
String
operationPerson
)
{
this
.
operationPerson
=
operationPerson
==
null
?
null
:
operationPerson
.
trim
();
}
}
\ No newline at end of file
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/entity/TabHaobanMaterial.java
0 → 100644
View file @
a87a0542
package
com
.
gic
.
haoban
.
manage
.
service
.
entity
;
import
java.io.Serializable
;
import
java.util.Date
;
public
class
TabHaobanMaterial
implements
Serializable
{
private
String
materialId
;
private
String
materialTitle
;
private
Integer
materialType
;
private
String
categoryId
;
private
String
materialContent
;
private
String
wxLastUploadTime
;
private
String
mediaId
;
private
String
wxEnterpriseId
;
private
String
staffId
;
private
String
staffName
;
private
String
imgUrl
;
private
String
materialDesc
;
private
Integer
statusFlag
;
private
String
link
;
private
Date
createTime
;
private
Date
updateTime
;
private
static
final
long
serialVersionUID
=
1L
;
public
String
getMaterialId
()
{
return
materialId
;
}
public
void
setMaterialId
(
String
materialId
)
{
this
.
materialId
=
materialId
==
null
?
null
:
materialId
.
trim
();
}
public
String
getMaterialTitle
()
{
return
materialTitle
;
}
public
void
setMaterialTitle
(
String
materialTitle
)
{
this
.
materialTitle
=
materialTitle
==
null
?
null
:
materialTitle
.
trim
();
}
public
Integer
getMaterialType
()
{
return
materialType
;
}
public
void
setMaterialType
(
Integer
materialType
)
{
this
.
materialType
=
materialType
;
}
public
String
getCategoryId
()
{
return
categoryId
;
}
public
void
setCategoryId
(
String
categoryId
)
{
this
.
categoryId
=
categoryId
==
null
?
null
:
categoryId
.
trim
();
}
public
String
getMaterialContent
()
{
return
materialContent
;
}
public
void
setMaterialContent
(
String
materialContent
)
{
this
.
materialContent
=
materialContent
==
null
?
null
:
materialContent
.
trim
();
}
public
String
getWxLastUploadTime
()
{
return
wxLastUploadTime
;
}
public
void
setWxLastUploadTime
(
String
wxLastUploadTime
)
{
this
.
wxLastUploadTime
=
wxLastUploadTime
==
null
?
null
:
wxLastUploadTime
.
trim
();
}
public
String
getMediaId
()
{
return
mediaId
;
}
public
void
setMediaId
(
String
mediaId
)
{
this
.
mediaId
=
mediaId
==
null
?
null
:
mediaId
.
trim
();
}
public
String
getWxEnterpriseId
()
{
return
wxEnterpriseId
;
}
public
void
setWxEnterpriseId
(
String
wxEnterpriseId
)
{
this
.
wxEnterpriseId
=
wxEnterpriseId
==
null
?
null
:
wxEnterpriseId
.
trim
();
}
public
String
getStaffId
()
{
return
staffId
;
}
public
void
setStaffId
(
String
staffId
)
{
this
.
staffId
=
staffId
==
null
?
null
:
staffId
.
trim
();
}
public
String
getStaffName
()
{
return
staffName
;
}
public
void
setStaffName
(
String
staffName
)
{
this
.
staffName
=
staffName
==
null
?
null
:
staffName
.
trim
();
}
public
String
getImgUrl
()
{
return
imgUrl
;
}
public
void
setImgUrl
(
String
imgUrl
)
{
this
.
imgUrl
=
imgUrl
==
null
?
null
:
imgUrl
.
trim
();
}
public
String
getMaterialDesc
()
{
return
materialDesc
;
}
public
void
setMaterialDesc
(
String
materialDesc
)
{
this
.
materialDesc
=
materialDesc
==
null
?
null
:
materialDesc
.
trim
();
}
public
Integer
getStatusFlag
()
{
return
statusFlag
;
}
public
void
setStatusFlag
(
Integer
statusFlag
)
{
this
.
statusFlag
=
statusFlag
;
}
public
String
getLink
()
{
return
link
;
}
public
void
setLink
(
String
link
)
{
this
.
link
=
link
==
null
?
null
:
link
.
trim
();
}
public
Date
getCreateTime
()
{
return
createTime
;
}
public
void
setCreateTime
(
Date
createTime
)
{
this
.
createTime
=
createTime
;
}
public
Date
getUpdateTime
()
{
return
updateTime
;
}
public
void
setUpdateTime
(
Date
updateTime
)
{
this
.
updateTime
=
updateTime
;
}
}
\ No newline at end of file
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/entity/TabHaobanMaterialCategory.java
0 → 100644
View file @
a87a0542
package
com
.
gic
.
haoban
.
manage
.
service
.
entity
;
import
java.io.Serializable
;
import
java.util.Date
;
public
class
TabHaobanMaterialCategory
implements
Serializable
{
private
String
categoryId
;
private
String
categoryName
;
private
String
categoryParentId
;
private
String
wxEnterpriseId
;
private
Integer
statusFlag
;
private
Date
createTime
;
private
Date
updateTime
;
private
static
final
long
serialVersionUID
=
1L
;
public
String
getCategoryId
()
{
return
categoryId
;
}
public
void
setCategoryId
(
String
categoryId
)
{
this
.
categoryId
=
categoryId
==
null
?
null
:
categoryId
.
trim
();
}
public
String
getCategoryName
()
{
return
categoryName
;
}
public
void
setCategoryName
(
String
categoryName
)
{
this
.
categoryName
=
categoryName
==
null
?
null
:
categoryName
.
trim
();
}
public
String
getCategoryParentId
()
{
return
categoryParentId
;
}
public
void
setCategoryParentId
(
String
categoryParentId
)
{
this
.
categoryParentId
=
categoryParentId
==
null
?
null
:
categoryParentId
.
trim
();
}
public
String
getWxEnterpriseId
()
{
return
wxEnterpriseId
;
}
public
void
setWxEnterpriseId
(
String
wxEnterpriseId
)
{
this
.
wxEnterpriseId
=
wxEnterpriseId
==
null
?
null
:
wxEnterpriseId
.
trim
();
}
public
Integer
getStatusFlag
()
{
return
statusFlag
;
}
public
void
setStatusFlag
(
Integer
statusFlag
)
{
this
.
statusFlag
=
statusFlag
;
}
public
Date
getCreateTime
()
{
return
createTime
;
}
public
void
setCreateTime
(
Date
createTime
)
{
this
.
createTime
=
createTime
;
}
public
Date
getUpdateTime
()
{
return
updateTime
;
}
public
void
setUpdateTime
(
Date
updateTime
)
{
this
.
updateTime
=
updateTime
;
}
}
\ No newline at end of file
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/MaterialCategoryService.java
0 → 100644
View file @
a87a0542
package
com
.
gic
.
haoban
.
manage
.
service
.
service
;
import
java.util.List
;
import
com.gic.haoban.manage.api.dto.MaterialCategoryDTO
;
public
interface
MaterialCategoryService
{
MaterialCategoryDTO
hasCategoryNameExsit
(
String
categoryName
,
String
categoryParentId
);
void
insert
(
MaterialCategoryDTO
materialCategoryDTO
);
List
<
MaterialCategoryDTO
>
listCategory
(
String
wxEnterpriseId
);
MaterialCategoryDTO
selectMaterialCategoryById
(
String
categoryId
);
void
editCategory
(
MaterialCategoryDTO
materialCategoryDTO
);
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/MaterialService.java
0 → 100644
View file @
a87a0542
package
com
.
gic
.
haoban
.
manage
.
service
.
service
;
import
java.util.List
;
import
com.gic.haoban.manage.api.dto.MaterialDTO
;
public
interface
MaterialService
{
List
<
MaterialDTO
>
listMaterialByCategoryId
(
String
categoryId
);
void
insertMaterial
(
MaterialDTO
materialDTO
);
MaterialDTO
selectMaterialById
(
String
materialId
);
void
edit
(
MaterialDTO
materialDTO
);
com
.
github
.
pagehelper
.
Page
listMaterial
(
String
wxEnterpriseId
,
String
keyword
,
String
categoryId
,
Integer
materialType
);
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/MemberUnionRelatedService.java
View file @
a87a0542
...
@@ -19,5 +19,4 @@ public interface MemberUnionRelatedService {
...
@@ -19,5 +19,4 @@ public interface MemberUnionRelatedService {
void
update
(
MemberUnionidRelatedDTO
exsitDTO
);
void
update
(
MemberUnionidRelatedDTO
exsitDTO
);
void
clean
(
String
cid
);
void
clean
(
String
cid
);
}
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/impl/MaterialCategoryServiceImpl.java
0 → 100644
View file @
a87a0542
package
com
.
gic
.
haoban
.
manage
.
service
.
service
.
impl
;
import
java.util.Date
;
import
java.util.List
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
com.gic.haoban.common.utils.EntityUtil
;
import
com.gic.haoban.common.utils.StringUtil
;
import
com.gic.haoban.manage.api.dto.MaterialCategoryDTO
;
import
com.gic.haoban.manage.service.dao.mapper.TabHaobanMaterialCategoryMapper
;
import
com.gic.haoban.manage.service.entity.TabHaobanMaterialCategory
;
import
com.gic.haoban.manage.service.service.MaterialCategoryService
;
@Service
public
class
MaterialCategoryServiceImpl
implements
MaterialCategoryService
{
@Autowired
private
TabHaobanMaterialCategoryMapper
mapper
;
@Override
public
MaterialCategoryDTO
hasCategoryNameExsit
(
String
categoryName
,
String
categoryParentId
)
{
return
EntityUtil
.
changeEntityByJSON
(
MaterialCategoryDTO
.
class
,
mapper
.
selectByCategoryNameAndParentId
(
categoryName
,
categoryParentId
));
}
@Override
public
void
insert
(
MaterialCategoryDTO
materialCategoryDTO
)
{
materialCategoryDTO
.
setCategoryId
(
StringUtil
.
randomUUID
());
materialCategoryDTO
.
setCreateTime
(
new
Date
());
materialCategoryDTO
.
setUpdateTime
(
materialCategoryDTO
.
getCreateTime
());
materialCategoryDTO
.
setStatusFlag
(
1
);
mapper
.
insert
(
EntityUtil
.
changeEntityByJSON
(
TabHaobanMaterialCategory
.
class
,
materialCategoryDTO
));
}
@Override
public
List
<
MaterialCategoryDTO
>
listCategory
(
String
wxEnterpriseId
)
{
return
EntityUtil
.
changeEntityListByJSON
(
MaterialCategoryDTO
.
class
,
mapper
.
listCategory
(
wxEnterpriseId
));
}
@Override
public
MaterialCategoryDTO
selectMaterialCategoryById
(
String
categoryId
)
{
return
EntityUtil
.
changeEntityByJSON
(
MaterialCategoryDTO
.
class
,
mapper
.
selectByPrimaryKey
(
categoryId
));
}
@Override
public
void
editCategory
(
MaterialCategoryDTO
materialCategoryDTO
)
{
materialCategoryDTO
.
setUpdateTime
(
new
Date
());
mapper
.
updateByPrimaryKeySelective
(
EntityUtil
.
changeEntityByJSON
(
TabHaobanMaterialCategory
.
class
,
materialCategoryDTO
));
}
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/impl/MaterialServiceImpl.java
0 → 100644
View file @
a87a0542
package
com
.
gic
.
haoban
.
manage
.
service
.
service
.
impl
;
import
java.util.Date
;
import
java.util.List
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
com.gic.haoban.common.utils.EntityUtil
;
import
com.gic.haoban.common.utils.StringUtil
;
import
com.gic.haoban.manage.api.dto.MaterialDTO
;
import
com.gic.haoban.manage.service.dao.mapper.TabHaobanMaterialMapper
;
import
com.gic.haoban.manage.service.entity.TabHaobanMaterial
;
import
com.gic.haoban.manage.service.service.MaterialService
;
import
com.github.pagehelper.Page
;
@Service
public
class
MaterialServiceImpl
implements
MaterialService
{
@Autowired
private
TabHaobanMaterialMapper
mapper
;
@Override
public
List
<
MaterialDTO
>
listMaterialByCategoryId
(
String
categoryId
)
{
return
EntityUtil
.
changeEntityListByJSON
(
MaterialDTO
.
class
,
mapper
.
listMaterialByCategoryId
(
categoryId
));
}
@Override
public
void
insertMaterial
(
MaterialDTO
materialDTO
)
{
materialDTO
.
setCreateTime
(
new
Date
());
materialDTO
.
setUpdateTime
(
materialDTO
.
getCreateTime
());
materialDTO
.
setStatusFlag
(
1
);
materialDTO
.
setMaterialId
(
StringUtil
.
randomUUID
());
mapper
.
insert
(
EntityUtil
.
changeEntityByJSON
(
TabHaobanMaterial
.
class
,
materialDTO
));
}
@Override
public
MaterialDTO
selectMaterialById
(
String
materialId
)
{
return
EntityUtil
.
changeEntityByJSON
(
MaterialDTO
.
class
,
mapper
.
selectByPrimaryKey
(
materialId
));
}
@Override
public
void
edit
(
MaterialDTO
materialDTO
)
{
materialDTO
.
setUpdateTime
(
new
Date
());
mapper
.
updateByPrimaryKeySelective
(
EntityUtil
.
changeEntityByJSON
(
TabHaobanMaterial
.
class
,
materialDTO
));
}
@Override
public
Page
<
TabHaobanMaterial
>
listMaterial
(
String
wxEnterpriseId
,
String
keyword
,
String
categoryId
,
Integer
materialType
)
{
return
mapper
.
listMaterial
(
wxEnterpriseId
,
keyword
,
categoryId
,
materialType
);
}
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/impl/StaffServiceImpl.java
View file @
a87a0542
...
@@ -30,6 +30,9 @@ public class StaffServiceImpl implements StaffService {
...
@@ -30,6 +30,9 @@ public class StaffServiceImpl implements StaffService {
@Override
@Override
public
TabHaobanStaff
selectByNationcodeAndPhoneNumber
(
String
wxEnterpriseId
,
String
nationcode
,
String
phoneNumber
)
{
public
TabHaobanStaff
selectByNationcodeAndPhoneNumber
(
String
wxEnterpriseId
,
String
nationcode
,
String
phoneNumber
)
{
if
(
StringUtils
.
isBlank
(
phoneNumber
)){
return
null
;
}
return
mapper
.
selectByNationcodeAndPhoneNumber
(
wxEnterpriseId
,
nationcode
,
phoneNumber
);
return
mapper
.
selectByNationcodeAndPhoneNumber
(
wxEnterpriseId
,
nationcode
,
phoneNumber
);
}
}
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/BindApiServiceImpl.java
View file @
a87a0542
...
@@ -9,6 +9,9 @@ import org.slf4j.Logger;
...
@@ -9,6 +9,9 @@ import org.slf4j.Logger;
import
org.slf4j.LoggerFactory
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
cn.hutool.core.collection.CollectionUtil
;
import
com.alibaba.csp.sentinel.util.StringUtil
;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.JSONObject
;
import
com.gic.clerk.api.dto.ClerkDTO
;
import
com.gic.clerk.api.dto.ClerkDTO
;
import
com.gic.clerk.api.service.ClerkService
;
import
com.gic.clerk.api.service.ClerkService
;
...
@@ -16,6 +19,7 @@ import com.gic.enterprise.api.service.StoreService;
...
@@ -16,6 +19,7 @@ import com.gic.enterprise.api.service.StoreService;
import
com.gic.haoban.manage.api.dto.DepartmentDTO
;
import
com.gic.haoban.manage.api.dto.DepartmentDTO
;
import
com.gic.haoban.manage.api.dto.StaffDTO
;
import
com.gic.haoban.manage.api.dto.StaffDTO
;
import
com.gic.haoban.manage.api.dto.StaffDepartmentRelatedDTO
;
import
com.gic.haoban.manage.api.dto.StaffDepartmentRelatedDTO
;
import
com.gic.haoban.manage.api.enums.AppPageType
;
import
com.gic.haoban.manage.api.service.BindApiService
;
import
com.gic.haoban.manage.api.service.BindApiService
;
import
com.gic.haoban.manage.api.service.DepartmentApiService
;
import
com.gic.haoban.manage.api.service.DepartmentApiService
;
import
com.gic.haoban.manage.api.service.StaffApiService
;
import
com.gic.haoban.manage.api.service.StaffApiService
;
...
@@ -92,12 +96,26 @@ public class BindApiServiceImpl implements BindApiService {
...
@@ -92,12 +96,26 @@ public class BindApiServiceImpl implements BindApiService {
clerkDTO
.
setHeadImgUrl
(
StringUtils
.
isEmpty
(
staffDTO
.
getHeadImg
())?
""
:
staffDTO
.
getHeadImg
());
clerkDTO
.
setHeadImgUrl
(
StringUtils
.
isEmpty
(
staffDTO
.
getHeadImg
())?
""
:
staffDTO
.
getHeadImg
());
clerkService
.
updateClerk
(
clerkDTO
);
clerkService
.
updateClerk
(
clerkDTO
);
}
}
//消息推送
if
(
StringUtils
.
isNotEmpty
(
oldStaffDepartmentRelatedDTO
.
getClerkCode
())){
String
clerkId
=
list
.
get
(
0
).
getClerkId
();
String
storeName
=
departmentDTO
.
getDepartmentName
();
String
staffName
=
staffDTO
.
getStaffName
();
String
clerkCode
=
oldStaffDepartmentRelatedDTO
.
getClerkCode
();
String
content
=
"【"
+
staffName
+
"】:【"
+
storeName
+
"】"
+
staffName
+
"导购code:"
+
clerkCode
+
"已解绑,请重新分配会员!"
;
JSONObject
jsonObject
=
new
JSONObject
();
jsonObject
.
put
(
"storeId"
,
storeId
);
String
data
=
jsonObject
.
toJSONString
();
String
pageUrl
=
staffDepartmentRelatedApiService
.
getPageUrl
(
AppPageType
.
MEMBER_LIST
.
getCode
(),
data
);
staffDepartmentRelatedApiService
.
sendSingleMessage
(
clerkId
,
"分配会员通知"
,
content
,
pageUrl
);
}
logger
.
info
(
"===========================》888888888888888"
);
logger
.
info
(
"===========================》888888888888888"
);
}
}
@Transactional
@Transactional
@Override
@Override
public
void
clerkUnbind
(
String
departmentId
,
String
fromClerkCode
,
public
void
clerkUnbind
(
String
departmentId
,
String
fromClerkCode
,
String
toStaffId
,
String
manager
)
{
String
toStaffId
,
String
manager
)
{
DepartmentDTO
departmentDTO
=
departmentApiService
.
selectById
(
departmentId
);
StaffDepartmentRelatedDTO
staffDepartmentRelatedDTO
=
staffDepartmentRelatedApiService
.
getOneByStaffIdAndDepartmentId
(
toStaffId
,
departmentId
);
StaffDepartmentRelatedDTO
staffDepartmentRelatedDTO
=
staffDepartmentRelatedApiService
.
getOneByStaffIdAndDepartmentId
(
toStaffId
,
departmentId
);
String
oldClerkCode
=
staffDepartmentRelatedDTO
.
getClerkCode
();
String
oldClerkCode
=
staffDepartmentRelatedDTO
.
getClerkCode
();
if
(
"1"
.
equals
(
manager
)){
if
(
"1"
.
equals
(
manager
)){
...
@@ -116,11 +134,11 @@ public class BindApiServiceImpl implements BindApiService {
...
@@ -116,11 +134,11 @@ public class BindApiServiceImpl implements BindApiService {
dto
.
setUpdateTime
(
new
Date
());
dto
.
setUpdateTime
(
new
Date
());
staffDepartmentRelatedApiService
.
updateById
(
dto
);
staffDepartmentRelatedApiService
.
updateById
(
dto
);
//更新gic数据
//更新gic数据
DepartmentDTO
departmentDTO
=
departmentApiService
.
selectById
(
departmentId
);
String
storeId
=
departmentDTO
.
getRelatedId
();
String
storeId
=
departmentDTO
.
getRelatedId
();
List
<
String
>
clerkCodes
=
new
ArrayList
<>();
List
<
String
>
clerkCodes
=
new
ArrayList
<>();
clerkCodes
.
add
(
fromClerkCode
);
clerkCodes
.
add
(
fromClerkCode
);
List
<
ClerkDTO
>
list
=
clerkService
.
listClerk
(
storeId
,
clerkCodes
,
true
);
List
<
ClerkDTO
>
list
=
clerkService
.
listClerk
(
storeId
,
clerkCodes
,
true
);
String
clerkName
=
CollectionUtil
.
isEmpty
(
list
)?
null
:
list
.
get
(
0
).
getClerkName
();
//获取姓名,发消息用
StaffDTO
staffDTO
=
staffApiService
.
selectById
(
toStaffId
);
StaffDTO
staffDTO
=
staffApiService
.
selectById
(
toStaffId
);
for
(
ClerkDTO
clerkDTO
:
list
){
for
(
ClerkDTO
clerkDTO
:
list
){
clerkDTO
.
setPhoneNumber
(
staffDTO
.
getPhoneNumber
());
clerkDTO
.
setPhoneNumber
(
staffDTO
.
getPhoneNumber
());
...
@@ -138,6 +156,24 @@ public class BindApiServiceImpl implements BindApiService {
...
@@ -138,6 +156,24 @@ public class BindApiServiceImpl implements BindApiService {
clerkDTO
.
setHeadImgUrl
(
""
);
clerkDTO
.
setHeadImgUrl
(
""
);
clerkService
.
updateClerk
(
clerkDTO
);
clerkService
.
updateClerk
(
clerkDTO
);
}
}
//发送消息
if
(
StringUtil
.
isNotBlank
(
fromClerkCode
)){
//发送消息
ClerkDTO
leader
=
clerkService
.
getClerkLeaderByStoreId
(
storeId
);
String
clerkId
=
leader
.
getClerkId
();
String
storeName
=
departmentDTO
.
getDepartmentName
();
String
staffName
=
clerkName
;
String
leaderName
=
leader
.
getClerkName
();
String
clerkCode
=
fromClerkCode
;
String
content
=
"【"
+
leaderName
+
"】:【"
+
storeName
+
"】"
+
staffName
+
"导购code:"
+
clerkCode
+
"已解绑,请重新分配会员!"
;
JSONObject
jsonObject
=
new
JSONObject
();
jsonObject
.
put
(
"storeId"
,
storeId
);
String
data
=
jsonObject
.
toJSONString
();
String
pageUrl
=
staffDepartmentRelatedApiService
.
getPageUrl
(
AppPageType
.
MEMBER_LIST
.
getCode
(),
data
);
staffDepartmentRelatedApiService
.
sendSingleMessage
(
clerkId
,
"分配会员通知"
,
content
,
pageUrl
);
}
}
else
{
}
else
{
//把别人的的clerkCode置空
//把别人的的clerkCode置空
...
@@ -158,7 +194,6 @@ public class BindApiServiceImpl implements BindApiService {
...
@@ -158,7 +194,6 @@ public class BindApiServiceImpl implements BindApiService {
dto
.
setUpdateTime
(
new
Date
());
dto
.
setUpdateTime
(
new
Date
());
staffDepartmentRelatedApiService
.
updateById
(
dto
);
staffDepartmentRelatedApiService
.
updateById
(
dto
);
//更新gic数据
//更新gic数据
DepartmentDTO
departmentDTO
=
departmentApiService
.
selectById
(
departmentId
);
String
storeId
=
departmentDTO
.
getRelatedId
();
String
storeId
=
departmentDTO
.
getRelatedId
();
List
<
String
>
clerkCodes
=
new
ArrayList
<>();
List
<
String
>
clerkCodes
=
new
ArrayList
<>();
clerkCodes
.
add
(
fromClerkCode
);
clerkCodes
.
add
(
fromClerkCode
);
...
@@ -184,6 +219,25 @@ public class BindApiServiceImpl implements BindApiService {
...
@@ -184,6 +219,25 @@ public class BindApiServiceImpl implements BindApiService {
clerkDTO
.
setHeadImgUrl
(
""
);
clerkDTO
.
setHeadImgUrl
(
""
);
clerkService
.
updateClerk
(
clerkDTO
);
clerkService
.
updateClerk
(
clerkDTO
);
}
}
//发送消息
if
(
StringUtil
.
isNotBlank
(
dto
.
getClerkCode
())){
//发送消息
ClerkDTO
leader
=
clerkService
.
getClerkLeaderByStoreId
(
storeId
);
String
clerkId
=
leader
.
getClerkId
();
String
storeName
=
departmentDTO
.
getDepartmentName
();
String
staffName
=
staffDTO
.
getStaffName
();
String
leaderName
=
leader
.
getClerkName
();
String
clerkCode
=
dto
.
getClerkCode
();
String
content
=
"【"
+
leaderName
+
"】:【"
+
storeName
+
"】"
+
staffName
+
"导购code:"
+
clerkCode
+
"已解绑,请重新分配会员!"
;
JSONObject
jsonObject
=
new
JSONObject
();
jsonObject
.
put
(
"storeId"
,
storeId
);
String
data
=
jsonObject
.
toJSONString
();
String
pageUrl
=
staffDepartmentRelatedApiService
.
getPageUrl
(
AppPageType
.
MEMBER_LIST
.
getCode
(),
data
);
staffDepartmentRelatedApiService
.
sendSingleMessage
(
clerkId
,
"分配会员通知"
,
content
,
pageUrl
);
}
}
}
}
}
@Transactional
@Transactional
...
@@ -203,12 +257,29 @@ public class BindApiServiceImpl implements BindApiService {
...
@@ -203,12 +257,29 @@ public class BindApiServiceImpl implements BindApiService {
List
<
String
>
clerkCodes
=
new
ArrayList
<>();
List
<
String
>
clerkCodes
=
new
ArrayList
<>();
clerkCodes
.
add
(
fromClerkCode
);
clerkCodes
.
add
(
fromClerkCode
);
List
<
ClerkDTO
>
list
=
clerkService
.
listClerk
(
storeId
,
clerkCodes
,
true
);
List
<
ClerkDTO
>
list
=
clerkService
.
listClerk
(
storeId
,
clerkCodes
,
true
);
String
clerkName
=
CollectionUtil
.
isEmpty
(
list
)?
null
:
list
.
get
(
0
).
getClerkName
();
//获取姓名,发消息用
for
(
ClerkDTO
clerkDTO
:
list
){
for
(
ClerkDTO
clerkDTO
:
list
){
clerkDTO
.
setPhoneNumber
(
"--"
);
clerkDTO
.
setPhoneNumber
(
"--"
);
clerkDTO
.
setClerkName
(
clerkDTO
.
getClerkName
()+
"(已解绑)"
);
clerkDTO
.
setClerkName
(
clerkDTO
.
getClerkName
()+
"(已解绑)"
);
clerkDTO
.
setHeadImgUrl
(
""
);
clerkDTO
.
setHeadImgUrl
(
""
);
clerkService
.
updateClerk
(
clerkDTO
);
clerkService
.
updateClerk
(
clerkDTO
);
}
}
//发送消息
if
(
StringUtil
.
isNotBlank
(
fromClerkCode
)){
//发送消息
ClerkDTO
leader
=
clerkService
.
getClerkLeaderByStoreId
(
storeId
);
String
clerkId
=
leader
.
getClerkId
();
String
storeName
=
departmentDTO
.
getDepartmentName
();
String
staffName
=
clerkName
;
String
leaderName
=
leader
.
getClerkName
();
String
clerkCode
=
fromClerkCode
;
String
content
=
"【"
+
leaderName
+
"】:【"
+
storeName
+
"】"
+
staffName
+
"导购code:"
+
clerkCode
+
"已解绑,请重新分配会员!"
;
JSONObject
jsonObject
=
new
JSONObject
();
jsonObject
.
put
(
"storeId"
,
storeId
);
String
data
=
jsonObject
.
toJSONString
();
String
pageUrl
=
staffDepartmentRelatedApiService
.
getPageUrl
(
AppPageType
.
MEMBER_LIST
.
getCode
(),
data
);
staffDepartmentRelatedApiService
.
sendSingleMessage
(
clerkId
,
"分配会员通知"
,
content
,
pageUrl
);
}
}
}
@Transactional
@Transactional
@Override
@Override
...
@@ -245,6 +316,7 @@ public class BindApiServiceImpl implements BindApiService {
...
@@ -245,6 +316,7 @@ public class BindApiServiceImpl implements BindApiService {
List
<
String
>
clerkCodes
=
new
ArrayList
<>();
List
<
String
>
clerkCodes
=
new
ArrayList
<>();
clerkCodes
.
add
(
fromClerkCode
);
clerkCodes
.
add
(
fromClerkCode
);
List
<
ClerkDTO
>
list
=
clerkService
.
listClerk
(
storeId
,
clerkCodes
,
true
);
List
<
ClerkDTO
>
list
=
clerkService
.
listClerk
(
storeId
,
clerkCodes
,
true
);
String
clerkName
=
CollectionUtil
.
isEmpty
(
list
)?
null
:
list
.
get
(
0
).
getClerkName
();
//获取姓名,发消息用
StaffDepartmentRelatedDTO
staffDepartmentRelatedDTO
=
staffDepartmentRelatedApiService
.
getByStaffDepartmentRelatedId
(
fromStaffDepartmentRelatedId
);
StaffDepartmentRelatedDTO
staffDepartmentRelatedDTO
=
staffDepartmentRelatedApiService
.
getByStaffDepartmentRelatedId
(
fromStaffDepartmentRelatedId
);
StaffDTO
staffDTO
=
staffApiService
.
selectById
(
staffDepartmentRelatedDTO
.
getStaffId
());
StaffDTO
staffDTO
=
staffApiService
.
selectById
(
staffDepartmentRelatedDTO
.
getStaffId
());
for
(
ClerkDTO
clerkDTO
:
list
){
for
(
ClerkDTO
clerkDTO
:
list
){
...
@@ -253,6 +325,23 @@ public class BindApiServiceImpl implements BindApiService {
...
@@ -253,6 +325,23 @@ public class BindApiServiceImpl implements BindApiService {
clerkDTO
.
setHeadImgUrl
(
StringUtils
.
isEmpty
(
staffDTO
.
getHeadImg
())?
""
:
staffDTO
.
getHeadImg
());
clerkDTO
.
setHeadImgUrl
(
StringUtils
.
isEmpty
(
staffDTO
.
getHeadImg
())?
""
:
staffDTO
.
getHeadImg
());
clerkService
.
updateClerk
(
clerkDTO
);
clerkService
.
updateClerk
(
clerkDTO
);
}
}
//发送消息
if
(
StringUtil
.
isNotBlank
(
fromClerkCode
)){
//发送消息
ClerkDTO
leader
=
clerkService
.
getClerkLeaderByStoreId
(
storeId
);
String
clerkId
=
leader
.
getClerkId
();
String
storeName
=
departmentDTO
.
getDepartmentName
();
String
staffName
=
clerkName
;
String
leaderName
=
leader
.
getClerkName
();
String
clerkCode
=
fromClerkCode
;
String
content
=
"【"
+
leaderName
+
"】:【"
+
storeName
+
"】"
+
staffName
+
"导购code:"
+
clerkCode
+
"已解绑,请重新分配会员!"
;
JSONObject
jsonObject
=
new
JSONObject
();
jsonObject
.
put
(
"storeId"
,
storeId
);
String
data
=
jsonObject
.
toJSONString
();
String
pageUrl
=
staffDepartmentRelatedApiService
.
getPageUrl
(
AppPageType
.
MEMBER_LIST
.
getCode
(),
data
);
staffDepartmentRelatedApiService
.
sendSingleMessage
(
clerkId
,
"分配会员通知"
,
content
,
pageUrl
);
}
}
}
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/MaidianDictApiServiceImpl.java
0 → 100644
View file @
a87a0542
package
com
.
gic
.
haoban
.
manage
.
service
.
service
.
out
.
impl
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
cn.hutool.core.collection.CollectionUtil
;
import
com.alibaba.csp.sentinel.util.StringUtil
;
import
com.gic.commons.util.EntityUtil
;
import
com.gic.haoban.common.utils.UuidUtil
;
import
com.gic.haoban.manage.api.dto.MaidianDictDTO
;
import
com.gic.haoban.manage.api.dto.MaidianDictModuleDTO
;
import
com.gic.haoban.manage.api.dto.MaidianDictPageDTO
;
import
com.gic.haoban.manage.api.service.MaidianDictApiService
;
import
com.gic.haoban.manage.service.dao.mapper.TabHaobanMaidianDictMapper
;
import
com.gic.haoban.manage.service.dao.mapper.TabHaobanMaidianDictModuleMapper
;
import
com.gic.haoban.manage.service.entity.TabHaobanMaidianDict
;
import
com.gic.haoban.manage.service.entity.TabHaobanMaidianDictModule
;
import
java.util.Date
;
import
java.util.List
;
/**
* Created by tgs on 2020/2/9.
*/
@Service
public
class
MaidianDictApiServiceImpl
implements
MaidianDictApiService
{
@Autowired
private
TabHaobanMaidianDictMapper
tabHaobanMaidianDictMapper
;
@Autowired
private
TabHaobanMaidianDictModuleMapper
tabHaobanMaidianDictModuleMapper
;
@Override
public
void
saveModule
(
MaidianDictModuleDTO
dto
)
{
TabHaobanMaidianDictModule
tab
=
EntityUtil
.
changeEntityByJSON
(
TabHaobanMaidianDictModule
.
class
,
dto
);
if
(
StringUtil
.
isEmpty
(
tab
.
getModuleId
())){
//新增
tab
.
setCreateTime
(
new
Date
());
tab
.
setUpdateTime
(
new
Date
());
tab
.
setStatus
(
1
);
tab
.
setModuleId
(
UuidUtil
.
randomUUID
());
tabHaobanMaidianDictModuleMapper
.
insert
(
tab
);
}
else
{
//更新
tab
.
setUpdateTime
(
new
Date
());
tabHaobanMaidianDictModuleMapper
.
updateByPrimaryKey
(
tab
);
}
}
@Override
public
void
savePage
(
MaidianDictDTO
dto
)
{
TabHaobanMaidianDict
tab
=
EntityUtil
.
changeEntityByJSON
(
TabHaobanMaidianDict
.
class
,
dto
);
if
(
StringUtil
.
isEmpty
(
tab
.
getDictId
())){
//新增
tab
.
setCreateTime
(
new
Date
());
tab
.
setUpdateTime
(
new
Date
());
tab
.
setStatus
(
1
);
tab
.
setModuleId
(
UuidUtil
.
randomUUID
());
tabHaobanMaidianDictMapper
.
insert
(
tab
);
}
else
{
//更新
tab
.
setUpdateTime
(
new
Date
());
tabHaobanMaidianDictMapper
.
updateByPrimaryKey
(
tab
);
}
}
@Override
public
void
delPage
(
String
dictId
)
{
tabHaobanMaidianDictMapper
.
deleteByPrimaryKey
(
dictId
);
}
@Override
public
void
delModule
(
String
moduleId
)
{
tabHaobanMaidianDictModuleMapper
.
deleteByPrimaryKey
(
moduleId
);
}
@Override
public
List
<
MaidianDictPageDTO
>
dictPage
()
{
List
<
TabHaobanMaidianDictModule
>
list
=
tabHaobanMaidianDictModuleMapper
.
list
();
List
<
MaidianDictPageDTO
>
result
=
EntityUtil
.
changeEntityListByJSON
(
MaidianDictPageDTO
.
class
,
list
);
if
(
CollectionUtil
.
isEmpty
(
result
)){
return
result
;
}
for
(
MaidianDictPageDTO
dto
:
result
){
String
moduleId
=
dto
.
getModuleId
();
List
<
TabHaobanMaidianDict
>
dictList
=
tabHaobanMaidianDictMapper
.
listByModuleId
(
moduleId
);
List
<
MaidianDictDTO
>
subList
=
EntityUtil
.
changeEntityListByJSON
(
MaidianDictDTO
.
class
,
dictList
);
dto
.
setPageList
(
subList
);
}
return
result
;
}
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/MaterialApiServiceImpl.java
0 → 100644
View file @
a87a0542
package
com
.
gic
.
haoban
.
manage
.
service
.
service
.
out
.
impl
;
import
java.io.InputStream
;
import
java.net.URL
;
import
java.util.List
;
import
org.apache.commons.io.IOUtils
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
com.alibaba.fastjson.JSON
;
import
com.gic.api.base.commons.JSONResponse
;
import
com.gic.api.base.commons.Page
;
import
com.gic.commons.util.GlobalInfo
;
import
com.gic.commons.util.GlobalVar
;
import
com.gic.haoban.base.api.common.BasePageInfo
;
import
com.gic.haoban.common.utils.PageUtil
;
import
com.gic.haoban.manage.api.dto.DepartmentDTO
;
import
com.gic.haoban.manage.api.dto.MaterialCategoryDTO
;
import
com.gic.haoban.manage.api.dto.MaterialDTO
;
import
com.gic.haoban.manage.api.dto.WxEnterpriseDTO
;
import
com.gic.haoban.manage.api.service.MaterialApiService
;
import
com.gic.haoban.manage.service.config.Config
;
import
com.gic.haoban.manage.service.service.MaterialCategoryService
;
import
com.gic.haoban.manage.service.service.MaterialService
;
import
com.gic.haoban.manage.service.service.WxEnterpriseService
;
import
com.gic.thirdparty.api.dto.PicUploadResDTO
;
import
com.gic.wechat.api.enums.QywxMediaTypeEnum
;
import
com.gic.wechat.api.service.qywx.QywxSuiteApiService
;
import
com.github.pagehelper.PageHelper
;
@Service
public
class
MaterialApiServiceImpl
implements
MaterialApiService
{
@Autowired
private
MaterialCategoryService
materialCategoryService
;
@Autowired
private
MaterialService
materialService
;
@Autowired
private
QywxSuiteApiService
qywxSuiteApiService
;
@Autowired
private
WxEnterpriseService
wxEnterpriseService
;
@Autowired
private
Config
config
;
private
static
Logger
logger
=
LoggerFactory
.
getLogger
(
MaterialApiServiceImpl
.
class
);
@Override
public
boolean
hasCategoryNameExsit
(
String
categoryName
,
String
categoryParentId
,
String
categoryId
)
{
MaterialCategoryDTO
category
=
materialCategoryService
.
hasCategoryNameExsit
(
categoryName
,
categoryParentId
);
if
(
category
!=
null
){
if
(
category
.
getCategoryId
().
equals
(
categoryId
)){
return
false
;
}
else
{
return
true
;
}
}
return
false
;
}
@Override
public
void
insertCategory
(
MaterialCategoryDTO
materialCategoryDTO
)
{
materialCategoryService
.
insert
(
materialCategoryDTO
);
}
@Override
public
List
<
MaterialCategoryDTO
>
listCategory
(
String
wxEnterpriseId
)
{
return
materialCategoryService
.
listCategory
(
wxEnterpriseId
);
}
@Override
public
MaterialCategoryDTO
selectMaterialCategoryById
(
String
categoryId
)
{
return
materialCategoryService
.
selectMaterialCategoryById
(
categoryId
);
}
@Override
public
void
editCategory
(
MaterialCategoryDTO
materialCategoryDTO
)
{
materialCategoryService
.
editCategory
(
materialCategoryDTO
);
}
@Override
public
List
<
MaterialDTO
>
listMaterialByCategoryId
(
String
categoryId
)
{
return
materialService
.
listMaterialByCategoryId
(
categoryId
);
}
@Override
public
void
insertMaterial
(
MaterialDTO
materialDTO
)
{
Integer
type
=
materialDTO
.
getMaterialType
();
String
wxEnterpriseId
=
materialDTO
.
getWxEnterpriseId
();
WxEnterpriseDTO
enterprise
=
wxEnterpriseService
.
selectById
(
wxEnterpriseId
);
if
(
type
==
null
){
return
;
}
if
(
enterprise
==
null
){
return
;
}
QywxMediaTypeEnum
fileType
=
null
;
String
url
=
""
;
if
(
type
==
2
){
fileType
=
QywxMediaTypeEnum
.
IMAGE
;
url
=
materialDTO
.
getImgUrl
();
}
if
(
type
==
4
){
fileType
=
QywxMediaTypeEnum
.
VIDEO
;
url
=
materialDTO
.
getLink
();
}
if
(
type
==
5
){
fileType
=
QywxMediaTypeEnum
.
FILE
;
url
=
materialDTO
.
getLink
();
}
if
(
fileType
!=
null
){
JSONResponse
jp
=
qywxSuiteApiService
.
uploadMedia
(
enterprise
.
getCorpid
(),
config
.
getWxSuiteid
(),
getFileByte
(
url
),
fileType
.
getCode
());
if
(
jp
.
getErrorCode
()
==
0
){
materialDTO
.
setMediaId
(
jp
.
getResult
().
toString
());
materialService
.
insertMaterial
(
materialDTO
);
}
}
else
{
materialService
.
insertMaterial
(
materialDTO
);
}
}
@Override
public
MaterialDTO
selectMaterialById
(
String
materialId
)
{
return
materialService
.
selectMaterialById
(
materialId
);
}
@Override
public
void
editMaterial
(
MaterialDTO
materialDTO
)
{
Integer
type
=
materialDTO
.
getMaterialType
();
String
materialId
=
materialDTO
.
getMaterialId
();
MaterialDTO
old
=
materialService
.
selectMaterialById
(
materialId
);
String
wxEnterpriseId
=
old
.
getWxEnterpriseId
();
WxEnterpriseDTO
enterprise
=
wxEnterpriseService
.
selectById
(
wxEnterpriseId
);
if
(
type
==
null
){
return
;
}
if
(
enterprise
==
null
){
return
;
}
QywxMediaTypeEnum
fileType
=
null
;
String
url
=
""
;
String
oldUrl
=
""
;
if
(
type
==
2
){
fileType
=
QywxMediaTypeEnum
.
IMAGE
;
url
=
materialDTO
.
getImgUrl
();
oldUrl
=
old
.
getImgUrl
();
}
if
(
type
==
4
){
fileType
=
QywxMediaTypeEnum
.
VIDEO
;
url
=
materialDTO
.
getLink
();
oldUrl
=
old
.
getLink
();
}
if
(
type
==
5
){
fileType
=
QywxMediaTypeEnum
.
FILE
;
url
=
materialDTO
.
getLink
();
oldUrl
=
old
.
getLink
();
}
if
(
fileType
!=
null
&&
!
url
.
equals
(
oldUrl
)){
JSONResponse
jp
=
qywxSuiteApiService
.
uploadMedia
(
enterprise
.
getCorpid
(),
config
.
getWxSuiteid
(),
getFileByte
(
url
),
fileType
.
getCode
());
if
(
jp
.
getErrorCode
()
==
0
){
materialDTO
.
setMediaId
(
jp
.
getResult
().
toString
());
materialService
.
edit
(
materialDTO
);
}
}
else
{
materialService
.
edit
(
materialDTO
);
}
}
@Override
public
Page
<
MaterialDTO
>
listMaterial
(
String
wxEnterpriseId
,
String
keyword
,
String
categoryId
,
Integer
materialType
,
BasePageInfo
pageInfo
)
{
PageHelper
.
startPage
(
pageInfo
.
getPageNum
(),
pageInfo
.
getPageSize
());
return
PageUtil
.
changePageHelperToCurrentPage
(
materialService
.
listMaterial
(
wxEnterpriseId
,
keyword
,
categoryId
,
materialType
),
MaterialDTO
.
class
);
}
private
byte
[]
getFileByte
(
String
url
)
{
try
{
InputStream
in
=
new
URL
(
url
).
openStream
();
byte
[]
data
=
IOUtils
.
toByteArray
(
in
);
return
data
;
}
catch
(
Exception
e
){
}
return
null
;
}
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/MemberUnionidRelatedApiServiceImpl.java
View file @
a87a0542
...
@@ -10,6 +10,7 @@ import com.gic.wechat.api.service.qywx.QywxUserApiService;
...
@@ -10,6 +10,7 @@ import com.gic.wechat.api.service.qywx.QywxUserApiService;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.Arrays
;
import
java.util.Arrays
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.List
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
...
@@ -21,6 +22,7 @@ import org.springframework.stereotype.Service;
...
@@ -21,6 +22,7 @@ import org.springframework.stereotype.Service;
import
com.gic.clerk.api.dto.ClerkDTO
;
import
com.gic.clerk.api.dto.ClerkDTO
;
import
com.gic.clerk.api.service.ClerkService
;
import
com.gic.clerk.api.service.ClerkService
;
import
com.gic.commons.util.EntityUtil
;
import
com.gic.commons.util.MD5Utils
;
import
com.gic.commons.util.MD5Utils
;
import
com.gic.commons.util.Md5Util
;
import
com.gic.commons.util.Md5Util
;
import
com.gic.commons.util.StringUtil
;
import
com.gic.commons.util.StringUtil
;
...
@@ -105,7 +107,6 @@ public class MemberUnionidRelatedApiServiceImpl implements MemberUnionidRelatedA
...
@@ -105,7 +107,6 @@ public class MemberUnionidRelatedApiServiceImpl implements MemberUnionidRelatedA
private
ClerkMainStoreRelatedService
clerkMainStoreRelatedService
;
private
ClerkMainStoreRelatedService
clerkMainStoreRelatedService
;
@Autowired
@Autowired
private
StoreService
storeService
;
private
StoreService
storeService
;
@Autowired
@Autowired
private
Config
config
;
private
Config
config
;
...
@@ -614,6 +615,12 @@ public class MemberUnionidRelatedApiServiceImpl implements MemberUnionidRelatedA
...
@@ -614,6 +615,12 @@ public class MemberUnionidRelatedApiServiceImpl implements MemberUnionidRelatedA
return
list
;
return
list
;
}
}
@Override
@Override
public
List
<
MemberUnionidRelatedDTO
>
listByWxEnterpriseIdAndDate
(
String
wxEnterpriseId
,
Date
date
)
{
List
<
MemberUnionidRelated
>
list
=
memberUnionidRelatedMapper
.
listByWxEnterpriseIdAndDate
(
wxEnterpriseId
,
date
);
return
EntityUtil
.
changeEntityListByJSON
(
MemberUnionidRelatedDTO
.
class
,
list
);
}
@Override
public
void
freshWxFrend
(
String
wxEnterpriseId
,
String
wxUserId
)
{
public
void
freshWxFrend
(
String
wxEnterpriseId
,
String
wxUserId
)
{
log
.
info
(
"【刷下好友】wxUserId={}"
,
wxUserId
);
log
.
info
(
"【刷下好友】wxUserId={}"
,
wxUserId
);
WxEnterpriseDTO
enterprise
=
wxEnterpriseService
.
selectById
(
wxEnterpriseId
);
WxEnterpriseDTO
enterprise
=
wxEnterpriseService
.
selectById
(
wxEnterpriseId
);
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/StaffApiServiceImpl.java
View file @
a87a0542
...
@@ -21,6 +21,7 @@ import com.gic.redis.data.anno.RedisCache;
...
@@ -21,6 +21,7 @@ import com.gic.redis.data.anno.RedisCache;
import
com.gic.thirdparty.api.dto.PicUploadResDTO
;
import
com.gic.thirdparty.api.dto.PicUploadResDTO
;
import
com.gic.thirdparty.api.service.QQCloudPicService
;
import
com.gic.thirdparty.api.service.QQCloudPicService
;
import
com.vdurmont.emoji.EmojiParser
;
import
com.vdurmont.emoji.EmojiParser
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.io.IOUtils
;
import
org.apache.commons.io.IOUtils
;
import
org.apache.commons.lang.StringUtils
;
import
org.apache.commons.lang.StringUtils
;
...
@@ -780,6 +781,10 @@ public class StaffApiServiceImpl implements StaffApiService {
...
@@ -780,6 +781,10 @@ public class StaffApiServiceImpl implements StaffApiService {
}
}
}
}
if
(
StringUtils
.
isBlank
(
clerkMid
.
getPhoneNumber
())
||
"--"
.
equals
(
clerkMid
.
getPhoneNumber
())){
return
;
}
if
(
wxEnterpriseRelatedApiService
.
enterpriseUseNew
(
clerkMid
.
getEnterpriseId
())){
if
(
wxEnterpriseRelatedApiService
.
enterpriseUseNew
(
clerkMid
.
getEnterpriseId
())){
try
{
try
{
addClerkByGic
(
clerkMid
);
addClerkByGic
(
clerkMid
);
...
@@ -1216,6 +1221,11 @@ public class StaffApiServiceImpl implements StaffApiService {
...
@@ -1216,6 +1221,11 @@ public class StaffApiServiceImpl implements StaffApiService {
}
}
return
resp
;
return
resp
;
}
}
@Override
public
List
<
StaffDTO
>
listByWxUserId
(
String
wxUserId
)
{
List
<
TabHaobanStaff
>
list
=
staffMapper
.
listByWxUserId
(
wxUserId
);
return
EntityUtil
.
changeEntityListByJSON
(
StaffDTO
.
class
,
list
);
}
// private String getMobile(String phoneNumber,String nationcode){
// private String getMobile(String phoneNumber,String nationcode){
// String mobile = nationcode + phoneNumber;
// String mobile = nationcode + phoneNumber;
...
...
haoban-manage3-service/src/main/resources/dubbo-haoban-manage-service.xml
View file @
a87a0542
...
@@ -39,6 +39,8 @@
...
@@ -39,6 +39,8 @@
<dubbo:service
interface=
"com.gic.haoban.manage.api.service.AuditApiService"
ref=
"auditApiServiceImpl"
timeout=
"10000"
/>
<dubbo:service
interface=
"com.gic.haoban.manage.api.service.AuditApiService"
ref=
"auditApiServiceImpl"
timeout=
"10000"
/>
<dubbo:service
interface=
"com.gic.haoban.manage.api.service.ClerkMainStoreRelatedApiService"
ref=
"clerkMainStoreRelatedApiServiceImpl"
timeout=
"10000"
/>
<dubbo:service
interface=
"com.gic.haoban.manage.api.service.ClerkMainStoreRelatedApiService"
ref=
"clerkMainStoreRelatedApiServiceImpl"
timeout=
"10000"
/>
<dubbo:service
interface=
"com.gic.haoban.manage.api.service.MaidianLogApiService"
ref=
"maidianLogApiServiceImpl"
timeout=
"10000"
/>
<dubbo:service
interface=
"com.gic.haoban.manage.api.service.MaidianLogApiService"
ref=
"maidianLogApiServiceImpl"
timeout=
"10000"
/>
<dubbo:service
interface=
"com.gic.haoban.manage.api.service.MaidianDictApiService"
ref=
"maidianDictApiServiceImpl"
timeout=
"10000"
/>
<dubbo:service
interface=
"com.gic.haoban.manage.api.service.MaterialApiService"
ref=
"materialApiServiceImpl"
timeout=
"10000"
/>
<dubbo:service
interface=
"com.gic.haoban.manage.api.service.DealSyncOperationApiService"
<dubbo:service
interface=
"com.gic.haoban.manage.api.service.DealSyncOperationApiService"
ref=
"dealSyncOperationApiServiceImpl"
timeout=
"10000"
/>
ref=
"dealSyncOperationApiServiceImpl"
timeout=
"10000"
/>
...
...
haoban-manage3-service/src/main/resources/mapper/MemberUnionidRelatedMapper.xml
View file @
a87a0542
...
@@ -220,6 +220,17 @@
...
@@ -220,6 +220,17 @@
and status_flag = 1
and status_flag = 1
and wx_enterprise_id = #{wxEnterpriseId}
and wx_enterprise_id = #{wxEnterpriseId}
</select>
</select>
<select
id=
"listByWxEnterpriseIdAndDate"
resultMap=
"BaseResultMap"
parameterType=
"java.lang.String"
>
select
<include
refid=
"Base_Column_List"
/>
from tab_haoban_member_unionid_related
where status_flag = 1
and wx_enterprise_id = #{wxEnterpriseId}
<if
test=
"date != null"
>
and TO_DAYS(create_time)
<![CDATA[ >= ]]>
TO_DAYS(#{date,jdbcType=TIMESTAMP})
</if>
</select>
<select
id=
"listByExTernalUseridAndWxUserId"
resultMap=
"BaseResultMap"
parameterType=
"java.lang.String"
>
<select
id=
"listByExTernalUseridAndWxUserId"
resultMap=
"BaseResultMap"
parameterType=
"java.lang.String"
>
select
select
<include
refid=
"Base_Column_List"
/>
<include
refid=
"Base_Column_List"
/>
...
...
haoban-manage3-service/src/main/resources/mapper/StaffDepartmentRelatedMapper.xml
View file @
a87a0542
...
@@ -299,7 +299,6 @@
...
@@ -299,7 +299,6 @@
#{id,jdbcType=VARCHAR}
#{id,jdbcType=VARCHAR}
</foreach>
</foreach>
and status_flag = 1
and status_flag = 1
group by staff_id
</select>
</select>
</mapper>
</mapper>
\ No newline at end of file
haoban-manage3-service/src/main/resources/mapper/StaffMapper.xml
View file @
a87a0542
...
@@ -291,6 +291,15 @@
...
@@ -291,6 +291,15 @@
</foreach>
</foreach>
</if>
</if>
</select>
</select>
<select
id=
"listByWxUserId"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from tab_haoban_staff
where status_flag = 1
<if
test=
"wxUserId != null"
>
and wx_user_id = #{wxUserId,jdbcType=VARCHAR}
</if>
</select>
<select
id=
"listLikeName"
resultMap=
"BaseResultMap"
>
<select
id=
"listLikeName"
resultMap=
"BaseResultMap"
>
select
select
...
...
haoban-manage3-service/src/main/resources/mapper/TabHaobanMaidianDictMapper.xml
0 → 100644
View file @
a87a0542
<?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.gic.haoban.manage.service.dao.mapper.TabHaobanMaidianDictMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"com.gic.haoban.manage.service.entity.TabHaobanMaidianDict"
>
<id
column=
"dict_id"
property=
"dictId"
jdbcType=
"VARCHAR"
/>
<result
column=
"dict_name"
property=
"dictName"
jdbcType=
"VARCHAR"
/>
<result
column=
"dict_data"
property=
"dictData"
jdbcType=
"VARCHAR"
/>
<result
column=
"dict_describle"
property=
"dictDescrible"
jdbcType=
"VARCHAR"
/>
<result
column=
"module_id"
property=
"moduleId"
jdbcType=
"VARCHAR"
/>
<result
column=
"create_time"
property=
"createTime"
jdbcType=
"TIMESTAMP"
/>
<result
column=
"update_time"
property=
"updateTime"
jdbcType=
"TIMESTAMP"
/>
<result
column=
"status"
property=
"status"
jdbcType=
"INTEGER"
/>
<result
column=
"operation_person"
property=
"operationPerson"
jdbcType=
"VARCHAR"
/>
<result
column=
"login_flag"
property=
"loginFlag"
jdbcType=
"INTEGER"
/>
<result
column=
"transit_flag"
property=
"transitFlag"
jdbcType=
"INTEGER"
/>
<result
column=
"code"
property=
"code"
jdbcType=
"VARCHAR"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
dict_id, dict_name, dict_data, dict_describle, module_id, create_time, update_time,
status, operation_person, login_flag, transit_flag, code
</sql>
<select
id=
"selectByPrimaryKey"
resultMap=
"BaseResultMap"
parameterType=
"java.lang.String"
>
select
<include
refid=
"Base_Column_List"
/>
from tab_haoban_maidian_dict
where dict_id = #{dictId,jdbcType=VARCHAR}
</select>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.String"
>
delete from tab_haoban_maidian_dict
where dict_id = #{dictId,jdbcType=VARCHAR}
</delete>
<insert
id=
"insert"
parameterType=
"com.gic.haoban.manage.service.entity.TabHaobanMaidianDict"
>
insert into tab_haoban_maidian_dict (dict_id, dict_name, dict_data,
dict_describle, module_id, create_time,
update_time, status, operation_person,
login_flag, transit_flag, code
)
values (#{dictId,jdbcType=VARCHAR}, #{dictName,jdbcType=VARCHAR}, #{dictData,jdbcType=VARCHAR},
#{dictDescrible,jdbcType=VARCHAR}, #{moduleId,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP},
#{updateTime,jdbcType=TIMESTAMP}, #{status,jdbcType=INTEGER}, #{operationPerson,jdbcType=VARCHAR},
#{loginFlag,jdbcType=INTEGER}, #{transitFlag,jdbcType=INTEGER}, #{code,jdbcType=VARCHAR}
)
</insert>
<insert
id=
"insertSelective"
parameterType=
"com.gic.haoban.manage.service.entity.TabHaobanMaidianDict"
>
insert into tab_haoban_maidian_dict
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"dictId != null"
>
dict_id,
</if>
<if
test=
"dictName != null"
>
dict_name,
</if>
<if
test=
"dictData != null"
>
dict_data,
</if>
<if
test=
"dictDescrible != null"
>
dict_describle,
</if>
<if
test=
"moduleId != null"
>
module_id,
</if>
<if
test=
"createTime != null"
>
create_time,
</if>
<if
test=
"updateTime != null"
>
update_time,
</if>
<if
test=
"status != null"
>
status,
</if>
<if
test=
"operationPerson != null"
>
operation_person,
</if>
<if
test=
"loginFlag != null"
>
login_flag,
</if>
<if
test=
"transitFlag != null"
>
transit_flag,
</if>
<if
test=
"code != null"
>
code,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"dictId != null"
>
#{dictId,jdbcType=VARCHAR},
</if>
<if
test=
"dictName != null"
>
#{dictName,jdbcType=VARCHAR},
</if>
<if
test=
"dictData != null"
>
#{dictData,jdbcType=VARCHAR},
</if>
<if
test=
"dictDescrible != null"
>
#{dictDescrible,jdbcType=VARCHAR},
</if>
<if
test=
"moduleId != null"
>
#{moduleId,jdbcType=VARCHAR},
</if>
<if
test=
"createTime != null"
>
#{createTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"updateTime != null"
>
#{updateTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"status != null"
>
#{status,jdbcType=INTEGER},
</if>
<if
test=
"operationPerson != null"
>
#{operationPerson,jdbcType=VARCHAR},
</if>
<if
test=
"loginFlag != null"
>
#{loginFlag,jdbcType=INTEGER},
</if>
<if
test=
"transitFlag != null"
>
#{transitFlag,jdbcType=INTEGER},
</if>
<if
test=
"code != null"
>
#{code,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<update
id=
"updateByPrimaryKeySelective"
parameterType=
"com.gic.haoban.manage.service.entity.TabHaobanMaidianDict"
>
update tab_haoban_maidian_dict
<set
>
<if
test=
"dictName != null"
>
dict_name = #{dictName,jdbcType=VARCHAR},
</if>
<if
test=
"dictData != null"
>
dict_data = #{dictData,jdbcType=VARCHAR},
</if>
<if
test=
"dictDescrible != null"
>
dict_describle = #{dictDescrible,jdbcType=VARCHAR},
</if>
<if
test=
"moduleId != null"
>
module_id = #{moduleId,jdbcType=VARCHAR},
</if>
<if
test=
"createTime != null"
>
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"updateTime != null"
>
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"status != null"
>
status = #{status,jdbcType=INTEGER},
</if>
<if
test=
"operationPerson != null"
>
operation_person = #{operationPerson,jdbcType=VARCHAR},
</if>
<if
test=
"loginFlag != null"
>
login_flag = #{loginFlag,jdbcType=INTEGER},
</if>
<if
test=
"transitFlag != null"
>
transit_flag = #{transitFlag,jdbcType=INTEGER},
</if>
<if
test=
"code != null"
>
code = #{code,jdbcType=VARCHAR},
</if>
</set>
where dict_id = #{dictId,jdbcType=VARCHAR}
</update>
<update
id=
"updateByPrimaryKey"
parameterType=
"com.gic.haoban.manage.service.entity.TabHaobanMaidianDict"
>
update tab_haoban_maidian_dict
set dict_name = #{dictName,jdbcType=VARCHAR},
dict_data = #{dictData,jdbcType=VARCHAR},
dict_describle = #{dictDescrible,jdbcType=VARCHAR},
module_id = #{moduleId,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP},
status = #{status,jdbcType=INTEGER},
operation_person = #{operationPerson,jdbcType=VARCHAR},
login_flag = #{loginFlag,jdbcType=INTEGER},
transit_flag = #{transitFlag,jdbcType=INTEGER},
code = #{code,jdbcType=VARCHAR}
where dict_id = #{dictId,jdbcType=VARCHAR}
</update>
<select
id=
"listByModuleId"
resultMap=
"BaseResultMap"
parameterType=
"java.lang.String"
>
select
<include
refid=
"Base_Column_List"
/>
from tab_haoban_maidian_dict
where module_id = #{moduleId,jdbcType=VARCHAR}
and status = 1
order by create_time
</select>
</mapper>
\ No newline at end of file
haoban-manage3-service/src/main/resources/mapper/TabHaobanMaidianDictModuleMapper.xml
0 → 100644
View file @
a87a0542
<?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.gic.haoban.manage.service.dao.mapper.TabHaobanMaidianDictModuleMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"com.gic.haoban.manage.service.entity.TabHaobanMaidianDictModule"
>
<id
column=
"module_id"
property=
"moduleId"
jdbcType=
"VARCHAR"
/>
<result
column=
"module_name"
property=
"moduleName"
jdbcType=
"VARCHAR"
/>
<result
column=
"create_time"
property=
"createTime"
jdbcType=
"TIMESTAMP"
/>
<result
column=
"update_time"
property=
"updateTime"
jdbcType=
"TIMESTAMP"
/>
<result
column=
"status"
property=
"status"
jdbcType=
"INTEGER"
/>
<result
column=
"operation_person"
property=
"operationPerson"
jdbcType=
"VARCHAR"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
module_id, module_name, create_time, update_time, status, operation_person
</sql>
<select
id=
"selectByPrimaryKey"
resultMap=
"BaseResultMap"
parameterType=
"java.lang.String"
>
select
<include
refid=
"Base_Column_List"
/>
from tab_haoban_maidian_dict_module
where module_id = #{moduleId,jdbcType=VARCHAR}
</select>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.String"
>
delete from tab_haoban_maidian_dict_module
where module_id = #{moduleId,jdbcType=VARCHAR}
</delete>
<insert
id=
"insert"
parameterType=
"com.gic.haoban.manage.service.entity.TabHaobanMaidianDictModule"
>
insert into tab_haoban_maidian_dict_module (module_id, module_name, create_time,
update_time, status, operation_person
)
values (#{moduleId,jdbcType=VARCHAR}, #{moduleName,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP},
#{updateTime,jdbcType=TIMESTAMP}, #{status,jdbcType=INTEGER}, #{operationPerson,jdbcType=VARCHAR}
)
</insert>
<insert
id=
"insertSelective"
parameterType=
"com.gic.haoban.manage.service.entity.TabHaobanMaidianDictModule"
>
insert into tab_haoban_maidian_dict_module
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"moduleId != null"
>
module_id,
</if>
<if
test=
"moduleName != null"
>
module_name,
</if>
<if
test=
"createTime != null"
>
create_time,
</if>
<if
test=
"updateTime != null"
>
update_time,
</if>
<if
test=
"status != null"
>
status,
</if>
<if
test=
"operationPerson != null"
>
operation_person,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"moduleId != null"
>
#{moduleId,jdbcType=VARCHAR},
</if>
<if
test=
"moduleName != null"
>
#{moduleName,jdbcType=VARCHAR},
</if>
<if
test=
"createTime != null"
>
#{createTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"updateTime != null"
>
#{updateTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"status != null"
>
#{status,jdbcType=INTEGER},
</if>
<if
test=
"operationPerson != null"
>
#{operationPerson,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<update
id=
"updateByPrimaryKeySelective"
parameterType=
"com.gic.haoban.manage.service.entity.TabHaobanMaidianDictModule"
>
update tab_haoban_maidian_dict_module
<set
>
<if
test=
"moduleName != null"
>
module_name = #{moduleName,jdbcType=VARCHAR},
</if>
<if
test=
"createTime != null"
>
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"updateTime != null"
>
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"status != null"
>
status = #{status,jdbcType=INTEGER},
</if>
<if
test=
"operationPerson != null"
>
operation_person = #{operationPerson,jdbcType=VARCHAR},
</if>
</set>
where module_id = #{moduleId,jdbcType=VARCHAR}
</update>
<update
id=
"updateByPrimaryKey"
parameterType=
"com.gic.haoban.manage.service.entity.TabHaobanMaidianDictModule"
>
update tab_haoban_maidian_dict_module
set module_name = #{moduleName,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP},
status = #{status,jdbcType=INTEGER},
operation_person = #{operationPerson,jdbcType=VARCHAR}
where module_id = #{moduleId,jdbcType=VARCHAR}
</update>
<select
id=
"list"
resultMap=
"BaseResultMap"
parameterType=
"java.lang.String"
>
select
<include
refid=
"Base_Column_List"
/>
from tab_haoban_maidian_dict_module
where status =1
order by create_time
</select>
</mapper>
\ No newline at end of file
haoban-manage3-service/src/main/resources/mapper/TabHaobanMaterialCategoryMapper.xml
0 → 100644
View file @
a87a0542
<?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.gic.haoban.manage.service.dao.mapper.TabHaobanMaterialCategoryMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"com.gic.haoban.manage.service.entity.TabHaobanMaterialCategory"
>
<id
column=
"category_id"
property=
"categoryId"
jdbcType=
"VARCHAR"
/>
<result
column=
"category_name"
property=
"categoryName"
jdbcType=
"VARCHAR"
/>
<result
column=
"category_parent_id"
property=
"categoryParentId"
jdbcType=
"VARCHAR"
/>
<result
column=
"wx_enterprise_id"
property=
"wxEnterpriseId"
jdbcType=
"VARCHAR"
/>
<result
column=
"status_flag"
property=
"statusFlag"
jdbcType=
"INTEGER"
/>
<result
column=
"create_time"
property=
"createTime"
jdbcType=
"TIMESTAMP"
/>
<result
column=
"update_time"
property=
"updateTime"
jdbcType=
"TIMESTAMP"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
category_id, category_name, category_parent_id, wx_enterprise_id, status_flag, create_time,
update_time
</sql>
<select
id=
"selectByPrimaryKey"
resultMap=
"BaseResultMap"
parameterType=
"java.lang.String"
>
select
<include
refid=
"Base_Column_List"
/>
from tab_haoban_material_category
where category_id = #{categoryId,jdbcType=VARCHAR}
</select>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.String"
>
delete from tab_haoban_material_category
where category_id = #{categoryId,jdbcType=VARCHAR}
</delete>
<insert
id=
"insert"
parameterType=
"com.gic.haoban.manage.service.entity.TabHaobanMaterialCategory"
>
insert into tab_haoban_material_category (category_id, category_name, category_parent_id,
wx_enterprise_id, status_flag, create_time,
update_time)
values (#{categoryId,jdbcType=VARCHAR}, #{categoryName,jdbcType=VARCHAR}, #{categoryParentId,jdbcType=VARCHAR},
#{wxEnterpriseId,jdbcType=VARCHAR}, #{statusFlag,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP},
#{updateTime,jdbcType=TIMESTAMP})
</insert>
<insert
id=
"insertSelective"
parameterType=
"com.gic.haoban.manage.service.entity.TabHaobanMaterialCategory"
>
insert into tab_haoban_material_category
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"categoryId != null"
>
category_id,
</if>
<if
test=
"categoryName != null"
>
category_name,
</if>
<if
test=
"categoryParentId != null"
>
category_parent_id,
</if>
<if
test=
"wxEnterpriseId != null"
>
wx_enterprise_id,
</if>
<if
test=
"statusFlag != null"
>
status_flag,
</if>
<if
test=
"createTime != null"
>
create_time,
</if>
<if
test=
"updateTime != null"
>
update_time,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"categoryId != null"
>
#{categoryId,jdbcType=VARCHAR},
</if>
<if
test=
"categoryName != null"
>
#{categoryName,jdbcType=VARCHAR},
</if>
<if
test=
"categoryParentId != null"
>
#{categoryParentId,jdbcType=VARCHAR},
</if>
<if
test=
"wxEnterpriseId != null"
>
#{wxEnterpriseId,jdbcType=VARCHAR},
</if>
<if
test=
"statusFlag != null"
>
#{statusFlag,jdbcType=INTEGER},
</if>
<if
test=
"createTime != null"
>
#{createTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"updateTime != null"
>
#{updateTime,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<update
id=
"updateByPrimaryKeySelective"
parameterType=
"com.gic.haoban.manage.service.entity.TabHaobanMaterialCategory"
>
update tab_haoban_material_category
<set
>
<if
test=
"categoryName != null"
>
category_name = #{categoryName,jdbcType=VARCHAR},
</if>
<if
test=
"categoryParentId != null"
>
category_parent_id = #{categoryParentId,jdbcType=VARCHAR},
</if>
<if
test=
"wxEnterpriseId != null"
>
wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR},
</if>
<if
test=
"statusFlag != null"
>
status_flag = #{statusFlag,jdbcType=INTEGER},
</if>
<if
test=
"createTime != null"
>
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"updateTime != null"
>
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
</set>
where category_id = #{categoryId,jdbcType=VARCHAR}
</update>
<update
id=
"updateByPrimaryKey"
parameterType=
"com.gic.haoban.manage.service.entity.TabHaobanMaterialCategory"
>
update tab_haoban_material_category
set category_name = #{categoryName,jdbcType=VARCHAR},
category_parent_id = #{categoryParentId,jdbcType=VARCHAR},
wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR},
status_flag = #{statusFlag,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP}
where category_id = #{categoryId,jdbcType=VARCHAR}
</update>
<select
id=
"selectByCategoryNameAndParentId"
resultMap=
"BaseResultMap"
parameterType=
"java.lang.String"
>
select
<include
refid=
"Base_Column_List"
/>
from tab_haoban_material_category
where category_name = #{categoryName,jdbcType=VARCHAR}
and status_flag = 1
and category_parent_id = #{categoryParentId}
</select>
<select
id=
"listCategory"
resultMap=
"BaseResultMap"
parameterType=
"java.lang.String"
>
select
<include
refid=
"Base_Column_List"
/>
from tab_haoban_material_category
where status_flag = 1
and wx_enterprise_id = #{wxEnterpriseId}
</select>
</mapper>
\ No newline at end of file
haoban-manage3-service/src/main/resources/mapper/TabHaobanMaterialMapper.xml
0 → 100644
View file @
a87a0542
<?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.gic.haoban.manage.service.dao.mapper.TabHaobanMaterialMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"com.gic.haoban.manage.service.entity.TabHaobanMaterial"
>
<id
column=
"material_id"
property=
"materialId"
jdbcType=
"VARCHAR"
/>
<result
column=
"material_title"
property=
"materialTitle"
jdbcType=
"VARCHAR"
/>
<result
column=
"material_type"
property=
"materialType"
jdbcType=
"INTEGER"
/>
<result
column=
"category_id"
property=
"categoryId"
jdbcType=
"VARCHAR"
/>
<result
column=
"material_content"
property=
"materialContent"
jdbcType=
"VARCHAR"
/>
<result
column=
"wx_last_upload_time"
property=
"wxLastUploadTime"
jdbcType=
"VARCHAR"
/>
<result
column=
"media_id"
property=
"mediaId"
jdbcType=
"VARCHAR"
/>
<result
column=
"wx_enterprise_id"
property=
"wxEnterpriseId"
jdbcType=
"VARCHAR"
/>
<result
column=
"staff_id"
property=
"staffId"
jdbcType=
"VARCHAR"
/>
<result
column=
"staff_name"
property=
"staffName"
jdbcType=
"VARCHAR"
/>
<result
column=
"img_url"
property=
"imgUrl"
jdbcType=
"VARCHAR"
/>
<result
column=
"material_desc"
property=
"materialDesc"
jdbcType=
"VARCHAR"
/>
<result
column=
"status_flag"
property=
"statusFlag"
jdbcType=
"INTEGER"
/>
<result
column=
"link"
property=
"link"
jdbcType=
"VARCHAR"
/>
<result
column=
"create_time"
property=
"createTime"
jdbcType=
"TIMESTAMP"
/>
<result
column=
"update_time"
property=
"updateTime"
jdbcType=
"TIMESTAMP"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
material_id, material_title, material_type, category_id, material_content, wx_last_upload_time,
media_id, wx_enterprise_id, staff_id, staff_name, img_url, material_desc, status_flag,
link, create_time, update_time
</sql>
<select
id=
"selectByPrimaryKey"
resultMap=
"BaseResultMap"
parameterType=
"java.lang.String"
>
select
<include
refid=
"Base_Column_List"
/>
from tab_haoban_material
where material_id = #{materialId,jdbcType=VARCHAR}
</select>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.String"
>
delete from tab_haoban_material
where material_id = #{materialId,jdbcType=VARCHAR}
</delete>
<insert
id=
"insert"
parameterType=
"com.gic.haoban.manage.service.entity.TabHaobanMaterial"
>
insert into tab_haoban_material (material_id, material_title, material_type,
category_id, material_content, wx_last_upload_time,
media_id, wx_enterprise_id, staff_id,
staff_name, img_url, material_desc,
status_flag, link, create_time,
update_time)
values (#{materialId,jdbcType=VARCHAR}, #{materialTitle,jdbcType=VARCHAR}, #{materialType,jdbcType=INTEGER},
#{categoryId,jdbcType=VARCHAR}, #{materialContent,jdbcType=VARCHAR}, #{wxLastUploadTime,jdbcType=VARCHAR},
#{mediaId,jdbcType=VARCHAR}, #{wxEnterpriseId,jdbcType=VARCHAR}, #{staffId,jdbcType=VARCHAR},
#{staffName,jdbcType=VARCHAR}, #{imgUrl,jdbcType=VARCHAR}, #{materialDesc,jdbcType=VARCHAR},
#{statusFlag,jdbcType=INTEGER}, #{link,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP},
#{updateTime,jdbcType=TIMESTAMP})
</insert>
<insert
id=
"insertSelective"
parameterType=
"com.gic.haoban.manage.service.entity.TabHaobanMaterial"
>
insert into tab_haoban_material
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"materialId != null"
>
material_id,
</if>
<if
test=
"materialTitle != null"
>
material_title,
</if>
<if
test=
"materialType != null"
>
material_type,
</if>
<if
test=
"categoryId != null"
>
category_id,
</if>
<if
test=
"materialContent != null"
>
material_content,
</if>
<if
test=
"wxLastUploadTime != null"
>
wx_last_upload_time,
</if>
<if
test=
"mediaId != null"
>
media_id,
</if>
<if
test=
"wxEnterpriseId != null"
>
wx_enterprise_id,
</if>
<if
test=
"staffId != null"
>
staff_id,
</if>
<if
test=
"staffName != null"
>
staff_name,
</if>
<if
test=
"imgUrl != null"
>
img_url,
</if>
<if
test=
"materialDesc != null"
>
material_desc,
</if>
<if
test=
"statusFlag != null"
>
status_flag,
</if>
<if
test=
"link != null"
>
link,
</if>
<if
test=
"createTime != null"
>
create_time,
</if>
<if
test=
"updateTime != null"
>
update_time,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"materialId != null"
>
#{materialId,jdbcType=VARCHAR},
</if>
<if
test=
"materialTitle != null"
>
#{materialTitle,jdbcType=VARCHAR},
</if>
<if
test=
"materialType != null"
>
#{materialType,jdbcType=INTEGER},
</if>
<if
test=
"categoryId != null"
>
#{categoryId,jdbcType=VARCHAR},
</if>
<if
test=
"materialContent != null"
>
#{materialContent,jdbcType=VARCHAR},
</if>
<if
test=
"wxLastUploadTime != null"
>
#{wxLastUploadTime,jdbcType=VARCHAR},
</if>
<if
test=
"mediaId != null"
>
#{mediaId,jdbcType=VARCHAR},
</if>
<if
test=
"wxEnterpriseId != null"
>
#{wxEnterpriseId,jdbcType=VARCHAR},
</if>
<if
test=
"staffId != null"
>
#{staffId,jdbcType=VARCHAR},
</if>
<if
test=
"staffName != null"
>
#{staffName,jdbcType=VARCHAR},
</if>
<if
test=
"imgUrl != null"
>
#{imgUrl,jdbcType=VARCHAR},
</if>
<if
test=
"materialDesc != null"
>
#{materialDesc,jdbcType=VARCHAR},
</if>
<if
test=
"statusFlag != null"
>
#{statusFlag,jdbcType=INTEGER},
</if>
<if
test=
"link != null"
>
#{link,jdbcType=VARCHAR},
</if>
<if
test=
"createTime != null"
>
#{createTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"updateTime != null"
>
#{updateTime,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<update
id=
"updateByPrimaryKeySelective"
parameterType=
"com.gic.haoban.manage.service.entity.TabHaobanMaterial"
>
update tab_haoban_material
<set
>
<if
test=
"materialTitle != null"
>
material_title = #{materialTitle,jdbcType=VARCHAR},
</if>
<if
test=
"materialType != null"
>
material_type = #{materialType,jdbcType=INTEGER},
</if>
<if
test=
"categoryId != null"
>
category_id = #{categoryId,jdbcType=VARCHAR},
</if>
<if
test=
"materialContent != null"
>
material_content = #{materialContent,jdbcType=VARCHAR},
</if>
<if
test=
"wxLastUploadTime != null"
>
wx_last_upload_time = #{wxLastUploadTime,jdbcType=VARCHAR},
</if>
<if
test=
"mediaId != null"
>
media_id = #{mediaId,jdbcType=VARCHAR},
</if>
<if
test=
"wxEnterpriseId != null"
>
wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR},
</if>
<if
test=
"staffId != null"
>
staff_id = #{staffId,jdbcType=VARCHAR},
</if>
<if
test=
"staffName != null"
>
staff_name = #{staffName,jdbcType=VARCHAR},
</if>
<if
test=
"imgUrl != null"
>
img_url = #{imgUrl,jdbcType=VARCHAR},
</if>
<if
test=
"materialDesc != null"
>
material_desc = #{materialDesc,jdbcType=VARCHAR},
</if>
<if
test=
"statusFlag != null"
>
status_flag = #{statusFlag,jdbcType=INTEGER},
</if>
<if
test=
"link != null"
>
link = #{link,jdbcType=VARCHAR},
</if>
<if
test=
"createTime != null"
>
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"updateTime != null"
>
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
</set>
where material_id = #{materialId,jdbcType=VARCHAR}
</update>
<update
id=
"updateByPrimaryKey"
parameterType=
"com.gic.haoban.manage.service.entity.TabHaobanMaterial"
>
update tab_haoban_material
set material_title = #{materialTitle,jdbcType=VARCHAR},
material_type = #{materialType,jdbcType=INTEGER},
category_id = #{categoryId,jdbcType=VARCHAR},
material_content = #{materialContent,jdbcType=VARCHAR},
wx_last_upload_time = #{wxLastUploadTime,jdbcType=VARCHAR},
media_id = #{mediaId,jdbcType=VARCHAR},
wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR},
staff_id = #{staffId,jdbcType=VARCHAR},
staff_name = #{staffName,jdbcType=VARCHAR},
img_url = #{imgUrl,jdbcType=VARCHAR},
material_desc = #{materialDesc,jdbcType=VARCHAR},
status_flag = #{statusFlag,jdbcType=INTEGER},
link = #{link,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP}
where material_id = #{materialId,jdbcType=VARCHAR}
</update>
<select
id=
"listMaterialByCategoryId"
resultMap=
"BaseResultMap"
parameterType=
"java.lang.String"
>
select
<include
refid=
"Base_Column_List"
/>
from tab_haoban_material
where category_id = #{categoryId,jdbcType=VARCHAR}
and status_flag = 1
</select>
<select
id=
"listMaterial"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from tab_haoban_material
where status_flag = 1
and wx_enterprise_id = #{wxEnterpriseId}
</select>
</mapper>
\ No newline at end of file
haoban-manage3-web/src/main/java/com/gic/haoban/manage/web/controller/ClerkController.java
View file @
a87a0542
...
@@ -12,6 +12,8 @@ import org.springframework.web.bind.annotation.RestController;
...
@@ -12,6 +12,8 @@ import org.springframework.web.bind.annotation.RestController;
import
cn.hutool.core.collection.CollectionUtil
;
import
cn.hutool.core.collection.CollectionUtil
;
import
com.alibaba.csp.sentinel.util.StringUtil
;
import
com.alibaba.fastjson.JSONObject
;
import
com.gic.clerk.api.dto.ClerkDTO
;
import
com.gic.clerk.api.dto.ClerkDTO
;
import
com.gic.clerk.api.service.ClerkService
;
import
com.gic.clerk.api.service.ClerkService
;
import
com.gic.commons.util.EntityUtil
;
import
com.gic.commons.util.EntityUtil
;
...
@@ -19,6 +21,7 @@ import com.gic.haoban.common.utils.HaobanResponse;
...
@@ -19,6 +21,7 @@ import com.gic.haoban.common.utils.HaobanResponse;
import
com.gic.haoban.manage.api.dto.DepartmentDTO
;
import
com.gic.haoban.manage.api.dto.DepartmentDTO
;
import
com.gic.haoban.manage.api.dto.StaffDTO
;
import
com.gic.haoban.manage.api.dto.StaffDTO
;
import
com.gic.haoban.manage.api.dto.StaffDepartmentRelatedDTO
;
import
com.gic.haoban.manage.api.dto.StaffDepartmentRelatedDTO
;
import
com.gic.haoban.manage.api.enums.AppPageType
;
import
com.gic.haoban.manage.api.service.DepartmentApiService
;
import
com.gic.haoban.manage.api.service.DepartmentApiService
;
import
com.gic.haoban.manage.api.service.StaffApiService
;
import
com.gic.haoban.manage.api.service.StaffApiService
;
import
com.gic.haoban.manage.api.service.StaffDepartmentRelatedApiService
;
import
com.gic.haoban.manage.api.service.StaffDepartmentRelatedApiService
;
...
@@ -93,7 +96,7 @@ public class ClerkController extends WebBaseController{
...
@@ -93,7 +96,7 @@ public class ClerkController extends WebBaseController{
return
resultResponse
(
HaoBanErrCode
.
ERR_2
);
return
resultResponse
(
HaoBanErrCode
.
ERR_2
);
}
}
StaffDepartmentRelatedDTO
staffDepartmentRelatedDTO
=
staffDepartmentRelatedApiService
.
getByStaffDepartmentRelatedId
(
fromStaffDepartmentRelatedId
);
StaffDepartmentRelatedDTO
staffDepartmentRelatedDTO
=
staffDepartmentRelatedApiService
.
getByStaffDepartmentRelatedId
(
fromStaffDepartmentRelatedId
);
String
oldClerkCode
=
staffDepartmentRelatedDTO
.
getClerkCode
();
//将指定人绑定clerkCode
//将指定人绑定clerkCode
StaffDepartmentRelatedDTO
dto
=
new
StaffDepartmentRelatedDTO
();
StaffDepartmentRelatedDTO
dto
=
new
StaffDepartmentRelatedDTO
();
dto
.
setStaffDepartmentRelatedId
(
fromStaffDepartmentRelatedId
);
dto
.
setStaffDepartmentRelatedId
(
fromStaffDepartmentRelatedId
);
...
@@ -125,6 +128,23 @@ public class ClerkController extends WebBaseController{
...
@@ -125,6 +128,23 @@ public class ClerkController extends WebBaseController{
clerkService
.
updateClerk
(
clerkDTO
);
clerkService
.
updateClerk
(
clerkDTO
);
}
}
}
}
//发送消息
if
(
StringUtil
.
isNotBlank
(
oldClerkCode
)){
//发送消息
ClerkDTO
leader
=
clerkService
.
getClerkLeaderByStoreId
(
storeId
);
String
clerkId
=
leader
.
getClerkId
();
String
storeName
=
departmentDTO
.
getDepartmentName
();
String
staffName
=
staffDTO
.
getStaffName
();
String
leaderName
=
leader
.
getClerkName
();
String
clerkCode
=
oldClerkCode
;
String
content
=
"【"
+
leaderName
+
"】:【"
+
storeName
+
"】"
+
staffName
+
"导购code:"
+
clerkCode
+
"已解绑,请重新分配会员!"
;
JSONObject
jsonObject
=
new
JSONObject
();
jsonObject
.
put
(
"storeId"
,
storeId
);
String
data
=
jsonObject
.
toJSONString
();
String
pageUrl
=
staffDepartmentRelatedApiService
.
getPageUrl
(
AppPageType
.
MEMBER_LIST
.
getCode
(),
data
);
staffDepartmentRelatedApiService
.
sendSingleMessage
(
clerkId
,
"分配会员通知"
,
content
,
pageUrl
);
}
return
resultResponse
(
HaoBanErrCode
.
ERR_1
);
return
resultResponse
(
HaoBanErrCode
.
ERR_1
);
}
}
...
...
haoban-manage3-web/src/main/java/com/gic/haoban/manage/web/controller/DepartmentContoller.java
View file @
a87a0542
...
@@ -439,8 +439,8 @@ public class DepartmentContoller extends WebBaseController{
...
@@ -439,8 +439,8 @@ public class DepartmentContoller extends WebBaseController{
public
void
syncDepartment
(
String
editDepartment
,
String
delDepartmentIds
,
String
addDepartment
){
public
void
syncDepartment
(
String
editDepartment
,
String
delDepartmentIds
,
String
addDepartment
){
if
(
StringUtils
.
isNotBlank
(
addDepartment
))
{
if
(
StringUtils
.
isNotBlank
(
addDepartment
))
{
List
<
DepartmentAddQO
>
list
=
JSONArray
.
parseArray
(
addDepartment
,
DepartmentAddQO
.
class
);
List
<
DepartmentAddQO
>
list
=
JSONArray
.
parseArray
(
addDepartment
,
DepartmentAddQO
.
class
);
int
sort
=
0
;
long
sort
=
0
;
int
maxSort
=
list
.
size
();
long
maxSort
=
list
.
size
();
for
(
DepartmentAddQO
departmentAddQO
:
list
)
{
for
(
DepartmentAddQO
departmentAddQO
:
list
)
{
String
parentId
=
departmentAddQO
.
getParentId
();
String
parentId
=
departmentAddQO
.
getParentId
();
DepartmentDTO
dto
=
departmentApiService
.
selectById
(
parentId
);
DepartmentDTO
dto
=
departmentApiService
.
selectById
(
parentId
);
...
@@ -494,8 +494,8 @@ public class DepartmentContoller extends WebBaseController{
...
@@ -494,8 +494,8 @@ public class DepartmentContoller extends WebBaseController{
logger
.
info
(
"【部门修改】editDepartment={}"
,
editDepartment
);
logger
.
info
(
"【部门修改】editDepartment={}"
,
editDepartment
);
if
(
StringUtils
.
isNotBlank
(
editDepartment
))
{
if
(
StringUtils
.
isNotBlank
(
editDepartment
))
{
List
<
DepartmentEditQO
>
list
=
JSONArray
.
parseArray
(
editDepartment
,
DepartmentEditQO
.
class
);
List
<
DepartmentEditQO
>
list
=
JSONArray
.
parseArray
(
editDepartment
,
DepartmentEditQO
.
class
);
int
sort
=
0
;
long
sort
=
0
;
int
maxSort
=
list
.
size
();
long
maxSort
=
list
.
size
();
logger
.
info
(
"【部门修改】list={}"
,
JSON
.
toJSONString
(
list
));
logger
.
info
(
"【部门修改】list={}"
,
JSON
.
toJSONString
(
list
));
for
(
DepartmentEditQO
departmentQO
:
list
)
{
for
(
DepartmentEditQO
departmentQO
:
list
)
{
String
parentId
=
departmentQO
.
getParentId
();
String
parentId
=
departmentQO
.
getParentId
();
...
@@ -641,8 +641,8 @@ public class DepartmentContoller extends WebBaseController{
...
@@ -641,8 +641,8 @@ public class DepartmentContoller extends WebBaseController{
logger
.
info
(
"【处理子节点】sonDepartment={},parentId={}"
,
sonDepartment
,
parentId
);
logger
.
info
(
"【处理子节点】sonDepartment={},parentId={}"
,
sonDepartment
,
parentId
);
if
(
StringUtils
.
isNotBlank
(
sonDepartment
))
{
if
(
StringUtils
.
isNotBlank
(
sonDepartment
))
{
List
<
DepartmentAddQO
>
list
=
JSONArray
.
parseArray
(
sonDepartment
,
DepartmentAddQO
.
class
);
List
<
DepartmentAddQO
>
list
=
JSONArray
.
parseArray
(
sonDepartment
,
DepartmentAddQO
.
class
);
int
maxSort
=
list
.
size
();
long
maxSort
=
list
.
size
();
int
sort
=
0
;
long
sort
=
0
;
for
(
DepartmentAddQO
departmentAddQO
:
list
)
{
for
(
DepartmentAddQO
departmentAddQO
:
list
)
{
Integer
type
=
departmentAddQO
.
getType
();
Integer
type
=
departmentAddQO
.
getType
();
Integer
isStore
=
0
;
Integer
isStore
=
0
;
...
...
haoban-manage3-web/src/main/java/com/gic/haoban/manage/web/controller/MaterialController.java
0 → 100644
View file @
a87a0542
package
com
.
gic
.
haoban
.
manage
.
web
.
controller
;
import
java.util.List
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
com.gic.api.base.commons.Page
;
import
com.gic.haoban.base.api.common.BasePageInfo
;
import
com.gic.haoban.common.utils.HaobanResponse
;
import
com.gic.haoban.manage.api.dto.DepartmentDTO
;
import
com.gic.haoban.manage.api.dto.MaterialCategoryDTO
;
import
com.gic.haoban.manage.api.dto.MaterialDTO
;
import
com.gic.haoban.manage.api.dto.StaffDTO
;
import
com.gic.haoban.manage.api.service.MaterialApiService
;
import
com.gic.haoban.manage.web.auth.AuthRequestUtil
;
import
com.gic.haoban.manage.web.errCode.HaoBanErrCode
;
import
com.gic.haoban.manage.web.vo.LoginVO
;
@RestController
public
class
MaterialController
extends
WebBaseController
{
@Autowired
private
MaterialApiService
materialApiService
;
/**
* 素材分组新增
* @return
*/
@RequestMapping
(
"/mateial-add-category"
)
public
HaobanResponse
materialAddCategory
(
MaterialCategoryDTO
materialCategoryDTO
)
{
LoginVO
login
=
(
LoginVO
)
AuthRequestUtil
.
getLoginUser
();
String
wxEnterpriseId
=
login
.
getWxEnterpriseId
();
materialCategoryDTO
.
setWxEnterpriseId
(
wxEnterpriseId
);
String
categoryName
=
materialCategoryDTO
.
getCategoryName
();
String
categoryParentId
=
materialCategoryDTO
.
getCategoryParentId
();
if
(
StringUtils
.
isAnyBlank
(
categoryParentId
,
categoryName
)){
return
resultResponse
(
HaoBanErrCode
.
ERR_2
);
}
boolean
flag
=
materialApiService
.
hasCategoryNameExsit
(
categoryName
,
categoryParentId
,
null
);
if
(
flag
){
return
resultResponse
(
HaoBanErrCode
.
ERR_10015
);
}
materialApiService
.
insertCategory
(
materialCategoryDTO
);
return
resultResponse
(
HaoBanErrCode
.
ERR_1
);
}
/**
* 素材分组查询
* @return
*/
@RequestMapping
(
"/category-list"
)
public
HaobanResponse
categoryList
(
String
wxEnterpriseId
)
{
List
<
MaterialCategoryDTO
>
list
=
materialApiService
.
listCategory
(
wxEnterpriseId
);
return
resultResponse
(
HaoBanErrCode
.
ERR_1
,
list
);
}
/**
* 素材分组修改
* @return
*/
@RequestMapping
(
"/category-edit"
)
public
HaobanResponse
categoryEdit
(
MaterialCategoryDTO
materialCategoryDTO
)
{
String
categoryName
=
materialCategoryDTO
.
getCategoryName
();
String
categoryId
=
materialCategoryDTO
.
getCategoryId
();
if
(
StringUtils
.
isAnyBlank
(
categoryName
,
categoryId
)){
return
resultResponse
(
HaoBanErrCode
.
ERR_2
);
}
MaterialCategoryDTO
dto
=
materialApiService
.
selectMaterialCategoryById
(
categoryId
);
if
(
dto
==
null
){
return
resultResponse
(
HaoBanErrCode
.
ERR_10016
);
}
String
categoryParentId
=
dto
.
getCategoryParentId
();
boolean
flag
=
materialApiService
.
hasCategoryNameExsit
(
categoryName
,
categoryParentId
,
materialCategoryDTO
.
getCategoryId
());
if
(
flag
){
return
resultResponse
(
HaoBanErrCode
.
ERR_10015
);
}
materialApiService
.
editCategory
(
materialCategoryDTO
);
return
resultResponse
(
HaoBanErrCode
.
ERR_1
);
}
/**
* 素材分组删除
* @return
*/
@RequestMapping
(
"/category-del"
)
public
HaobanResponse
categoryDel
(
String
categoryId
)
{
MaterialCategoryDTO
dto
=
materialApiService
.
selectMaterialCategoryById
(
categoryId
);
if
(
dto
==
null
){
return
resultResponse
(
HaoBanErrCode
.
ERR_10016
);
}
List
<
MaterialDTO
>
list
=
materialApiService
.
listMaterialByCategoryId
(
categoryId
);
if
(!
list
.
isEmpty
()){
return
resultResponse
(
HaoBanErrCode
.
ERR_10017
);
}
dto
.
setStatusFlag
(
0
);
materialApiService
.
editCategory
(
dto
);
return
resultResponse
(
HaoBanErrCode
.
ERR_1
);
}
/**
* 素材新增
* @return
*/
@RequestMapping
(
"/material-add"
)
public
HaobanResponse
materialAdd
(
MaterialDTO
materialDTO
)
{
LoginVO
login
=
(
LoginVO
)
AuthRequestUtil
.
getLoginUser
();
String
wxEnterpriseId
=
login
.
getWxEnterpriseId
();
materialDTO
.
setWxEnterpriseId
(
wxEnterpriseId
);
StaffDTO
staff
=
login
.
getStaffDTO
();
materialDTO
.
setStaffId
(
staff
.
getStaffId
());
materialDTO
.
setStaffName
(
staff
.
getStaffName
());
String
materialTitle
=
materialDTO
.
getMaterialTitle
();
String
categoryId
=
materialDTO
.
getCategoryId
();
Integer
categoryType
=
materialDTO
.
getMaterialType
();
if
(
StringUtils
.
isAnyBlank
(
categoryId
,
materialTitle
)){
return
resultResponse
(
HaoBanErrCode
.
ERR_2
);
}
if
(
categoryType
==
null
){
return
resultResponse
(
HaoBanErrCode
.
ERR_2
);
}
materialApiService
.
insertMaterial
(
materialDTO
);
return
resultResponse
(
HaoBanErrCode
.
ERR_1
);
}
/**
* 素材详情
* @return
*/
@RequestMapping
(
"/material-detail"
)
public
HaobanResponse
materialDetail
(
String
materialId
)
{
MaterialDTO
dto
=
materialApiService
.
selectMaterialById
(
materialId
);
return
resultResponse
(
HaoBanErrCode
.
ERR_1
,
dto
);
}
/**
* 素材修改
* @return
*/
@RequestMapping
(
"/material-eidt"
)
public
HaobanResponse
materialEdit
(
MaterialDTO
materialDTO
)
{
LoginVO
login
=
(
LoginVO
)
AuthRequestUtil
.
getLoginUser
();
StaffDTO
staff
=
login
.
getStaffDTO
();
materialDTO
.
setStaffId
(
staff
.
getStaffId
());
materialDTO
.
setStaffName
(
staff
.
getStaffName
());
String
materialId
=
materialDTO
.
getMaterialId
();
MaterialDTO
dto
=
materialApiService
.
selectMaterialById
(
materialId
);
if
(
dto
==
null
){
return
resultResponse
(
HaoBanErrCode
.
ERR_2
);
}
materialApiService
.
editMaterial
(
materialDTO
);
return
resultResponse
(
HaoBanErrCode
.
ERR_1
);
}
/**
* 素材删除
* @return
*/
@RequestMapping
(
"/material-del"
)
public
HaobanResponse
materialEdit
(
String
materialIds
)
{
if
(
StringUtils
.
isBlank
(
materialIds
)){
return
resultResponse
(
HaoBanErrCode
.
ERR_2
);
}
String
[]
stringArr
=
materialIds
.
split
(
","
);
for
(
String
materialId
:
stringArr
)
{
MaterialDTO
dto
=
materialApiService
.
selectMaterialById
(
materialId
);
if
(
dto
==
null
){
continue
;
}
dto
.
setStatusFlag
(
0
);
materialApiService
.
editMaterial
(
dto
);
}
return
resultResponse
(
HaoBanErrCode
.
ERR_1
);
}
/**
* 素材查询
* @return
*/
@RequestMapping
(
"/material-list"
)
public
HaobanResponse
materialList
(
String
wxEnterpriseId
,
String
keyword
,
String
categoryId
,
Integer
materialType
,
BasePageInfo
pageInfo
)
{
Page
<
MaterialDTO
>
page
=
materialApiService
.
listMaterial
(
wxEnterpriseId
,
keyword
,
categoryId
,
materialType
,
pageInfo
);
return
resultResponse
(
HaoBanErrCode
.
ERR_1
,
page
);
}
/**
* 素材批量转移
* @return
*/
@RequestMapping
(
"/material-batch"
)
public
HaobanResponse
materialBatch
(
String
materialIds
,
String
categoryId
)
{
String
[]
stringArr
=
materialIds
.
split
(
","
);
for
(
String
materialId
:
stringArr
)
{
MaterialDTO
dto
=
materialApiService
.
selectMaterialById
(
materialId
);
if
(
dto
==
null
){
continue
;
}
dto
.
setCategoryId
(
categoryId
);;
materialApiService
.
editMaterial
(
dto
);
}
return
resultResponse
(
HaoBanErrCode
.
ERR_1
);
}
}
haoban-manage3-web/src/main/java/com/gic/haoban/manage/web/errCode/HaoBanErrCode.java
View file @
a87a0542
...
@@ -87,8 +87,17 @@ public enum HaoBanErrCode {
...
@@ -87,8 +87,17 @@ public enum HaoBanErrCode {
ERR_10014
(
10014
,
"暂存部门人员不能删除"
),
ERR_10014
(
10014
,
"暂存部门人员不能删除"
),
ERR_10015
(
10015
,
"分组已存在"
),
ERR_10016
(
10016
,
"分组不存在"
),
ERR_10017
(
10017
,
"存在素材不能删除"
),
ERR_10018
(
10018
,
"素材不存在"
),
ERR_100015
(
100015
,
"暂存部门不能删除"
),
ERR_100015
(
100015
,
"暂存部门不能删除"
),
ERR_DEFINE
(-
888
,
"自定义错误"
),
ERR_DEFINE
(-
888
,
"自定义错误"
),
ERR_OTHER
(-
999
,
"未知错误code"
);
ERR_OTHER
(-
999
,
"未知错误code"
);
private
int
code
;
private
int
code
;
...
...
haoban-manage3-web/src/main/java/com/gic/haoban/manage/web/qo/DepartmentAddQO.java
View file @
a87a0542
...
@@ -20,7 +20,7 @@ public class DepartmentAddQO implements Serializable {
...
@@ -20,7 +20,7 @@ public class DepartmentAddQO implements Serializable {
private
Boolean
addFlag
;
private
Boolean
addFlag
;
private
Integer
sort
;
private
Long
sort
;
private
Integer
type
;
private
Integer
type
;
...
@@ -59,11 +59,12 @@ public class DepartmentAddQO implements Serializable {
...
@@ -59,11 +59,12 @@ public class DepartmentAddQO implements Serializable {
public
Integer
getSort
()
{
public
Long
getSort
()
{
return
sort
;
return
sort
;
}
}
public
void
setSort
(
Integer
sort
)
{
public
void
setSort
(
Long
sort
)
{
this
.
sort
=
sort
;
this
.
sort
=
sort
;
}
}
...
...
haoban-manage3-web/src/main/webapp/WEB-INF/dubbo-haoban-manage-web.xml
View file @
a87a0542
...
@@ -52,6 +52,8 @@
...
@@ -52,6 +52,8 @@
<dubbo:reference
interface=
"com.gic.haoban.manage.api.service.DictApiService"
id=
"dictApiService"
/>
<dubbo:reference
interface=
"com.gic.haoban.manage.api.service.DictApiService"
id=
"dictApiService"
/>
<dubbo:reference
interface=
"com.gic.haoban.manage.api.service.HelpApiService"
id=
"helpApiService"
/>
<dubbo:reference
interface=
"com.gic.haoban.manage.api.service.HelpApiService"
id=
"helpApiService"
/>
<dubbo:reference
interface=
"com.gic.haoban.manage.api.service.MaterialApiService"
id=
"materialApiService"
/>
<dubbo:reference
interface=
"com.gic.haoban.manage.api.service.MemberUnionidRelatedApiService"
id=
"memberUnionidRelatedApiService"
/>
<dubbo:reference
interface=
"com.gic.haoban.manage.api.service.MemberUnionidRelatedApiService"
id=
"memberUnionidRelatedApiService"
/>
<dubbo:reference
interface=
"com.gic.wechat.token.api.service.QywxTokenManageService"
id=
"qywxTokenManageService"
/>
<dubbo:reference
interface=
"com.gic.wechat.token.api.service.QywxTokenManageService"
id=
"qywxTokenManageService"
/>
...
...
haoban-manage3-wx/src/main/java/com/gic/haoban/manage/web/controller/MaterialController.java
0 → 100644
View file @
a87a0542
package
com
.
gic
.
haoban
.
manage
.
web
.
controller
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.stream.Collectors
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
com.gic.api.base.commons.Page
;
import
com.gic.haoban.base.api.common.BasePageInfo
;
import
com.gic.haoban.common.utils.EntityUtil
;
import
com.gic.haoban.common.utils.HaobanResponse
;
import
com.gic.haoban.manage.api.dto.MaterialCategoryDTO
;
import
com.gic.haoban.manage.api.dto.MaterialDTO
;
import
com.gic.haoban.manage.api.service.MaterialApiService
;
import
com.gic.haoban.manage.web.errCode.HaoBanErrCode
;
import
com.gic.haoban.manage.web.vo.MaterialVO
;
@RestController
public
class
MaterialController
extends
WebBaseController
{
@Autowired
private
MaterialApiService
materialApiService
;
/**
* 素材查询
* @return
*/
@RequestMapping
(
"/material-list"
)
public
HaobanResponse
materialList
(
String
wxEnterpriseId
,
String
keyword
,
String
categoryId
,
Integer
materialType
,
BasePageInfo
pageInfo
)
{
Page
<
MaterialDTO
>
page
=
materialApiService
.
listMaterial
(
wxEnterpriseId
,
keyword
,
categoryId
,
materialType
,
pageInfo
);
return
resultResponse
(
HaoBanErrCode
.
ERR_1
,
page
);
}
/**
* 素材查询
* @return
*/
@RequestMapping
(
"/material-type"
)
public
HaobanResponse
materialType
(
String
wxEnterpriseId
)
{
List
<
MaterialCategoryDTO
>
list
=
materialApiService
.
listCategory
(
wxEnterpriseId
);
List
<
MaterialVO
>
handerList
=
new
ArrayList
<
MaterialVO
>();
for
(
MaterialCategoryDTO
materialCategoryDTO
:
list
)
{
if
(
"0"
.
equals
(
materialCategoryDTO
.
getCategoryParentId
())){
handerList
.
add
(
EntityUtil
.
changeEntityByJSON
(
MaterialVO
.
class
,
materialCategoryDTO
));
}
}
Map
<
String
,
List
<
MaterialCategoryDTO
>>
map
=
list
.
stream
().
collect
(
Collectors
.
groupingBy
(
MaterialCategoryDTO:
:
getCategoryParentId
));
handerSonMaterial
(
handerList
,
map
);
return
resultResponse
(
HaoBanErrCode
.
ERR_1
,
handerList
);
}
private
void
handerSonMaterial
(
List
<
MaterialVO
>
handerList
,
Map
<
String
,
List
<
MaterialCategoryDTO
>>
map
){
for
(
MaterialVO
materialVO
:
handerList
)
{
List
<
MaterialCategoryDTO
>
sonList
=
map
.
get
(
materialVO
.
getCategoryParentId
());
List
<
MaterialVO
>
sonVoList
=
EntityUtil
.
changeEntityListByJSON
(
MaterialVO
.
class
,
sonList
);
materialVO
.
setList
(
sonVoList
);
while
(
sonList
!=
null
){
handerSonMaterial
(
sonVoList
,
map
);
}
}
}
}
haoban-manage3-wx/src/main/java/com/gic/haoban/manage/web/vo/MaterialVO.java
0 → 100644
View file @
a87a0542
package
com
.
gic
.
haoban
.
manage
.
web
.
vo
;
import
java.io.Serializable
;
import
java.util.Date
;
import
java.util.List
;
public
class
MaterialVO
implements
Serializable
{
private
String
categoryId
;
private
String
categoryName
;
private
String
categoryParentId
;
private
String
wxEnterpriseId
;
private
Integer
statusFlag
;
private
List
<
MaterialVO
>
list
;
private
Date
createTime
;
private
Date
updateTime
;
private
static
final
long
serialVersionUID
=
1L
;
public
String
getCategoryId
()
{
return
categoryId
;
}
public
void
setCategoryId
(
String
categoryId
)
{
this
.
categoryId
=
categoryId
==
null
?
null
:
categoryId
.
trim
();
}
public
String
getCategoryName
()
{
return
categoryName
;
}
public
void
setCategoryName
(
String
categoryName
)
{
this
.
categoryName
=
categoryName
==
null
?
null
:
categoryName
.
trim
();
}
public
String
getCategoryParentId
()
{
return
categoryParentId
;
}
public
void
setCategoryParentId
(
String
categoryParentId
)
{
this
.
categoryParentId
=
categoryParentId
==
null
?
null
:
categoryParentId
.
trim
();
}
public
String
getWxEnterpriseId
()
{
return
wxEnterpriseId
;
}
public
void
setWxEnterpriseId
(
String
wxEnterpriseId
)
{
this
.
wxEnterpriseId
=
wxEnterpriseId
==
null
?
null
:
wxEnterpriseId
.
trim
();
}
public
Integer
getStatusFlag
()
{
return
statusFlag
;
}
public
void
setStatusFlag
(
Integer
statusFlag
)
{
this
.
statusFlag
=
statusFlag
;
}
public
Date
getCreateTime
()
{
return
createTime
;
}
public
void
setCreateTime
(
Date
createTime
)
{
this
.
createTime
=
createTime
;
}
public
Date
getUpdateTime
()
{
return
updateTime
;
}
public
void
setUpdateTime
(
Date
updateTime
)
{
this
.
updateTime
=
updateTime
;
}
public
List
<
MaterialVO
>
getList
()
{
return
list
;
}
public
void
setList
(
List
<
MaterialVO
>
list
)
{
this
.
list
=
list
;
}
}
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