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
1
Merge Requests
1
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
9e9feff5
Commit
9e9feff5
authored
Jul 06, 2022
by
墨竹
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:活码修改
parent
bedd7a7a
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
118 additions
and
102 deletions
+118
-102
HmQrcodeListQDTO.java
...m/gic/haoban/manage/api/dto/qdto/hm/HmQrcodeListQDTO.java
+22
-41
HmQrcodeApiService.java
.../gic/haoban/manage/api/service/hm/HmQrcodeApiService.java
+11
-0
TabHaobanHmQrcodeMapper.java
...manage/service/dao/mapper/hm/TabHaobanHmQrcodeMapper.java
+12
-0
TabHaobanHmQrcodeServiceImpl.java
...service/service/hm/impl/TabHaobanHmQrcodeServiceImpl.java
+1
-1
HmQrcodeApiServiceImpl.java
...e/service/service/out/impl/hm/HmQrcodeApiServiceImpl.java
+15
-0
TabHaobanHmQrcodeMapper.xml
.../src/main/resources/mapper/hm/TabHaobanHmQrcodeMapper.xml
+29
-59
HmQrcodeController.java
...c/haoban/manage/web/controller/hm/HmQrcodeController.java
+28
-1
No files found.
haoban-manage3-api/src/main/java/com/gic/haoban/manage/api/dto/qdto/hm/HmQrcodeListQDTO.java
View file @
9e9feff5
...
...
@@ -4,6 +4,7 @@ import com.gic.haoban.base.api.common.BasePageInfo;
import
java.io.Serializable
;
import
java.util.Date
;
import
java.util.List
;
/**
* 活码(TabHaobanHmQrcode)实体类
...
...
@@ -16,8 +17,7 @@ public class HmQrcodeListQDTO extends BasePageInfo implements Serializable {
private
static
final
long
serialVersionUID
=
887910678030827375L
;
private
Long
hmId
;
private
String
hmCode
;
/**
* 1单人 2多人
*/
...
...
@@ -27,11 +27,10 @@ public class HmQrcodeListQDTO extends BasePageInfo implements Serializable {
private
String
enterpriseId
;
private
String
name
;
private
String
keyword
;
private
String
creatorName
;
private
String
storeSearch
;
private
Date
createTimeStart
;
private
Date
createTimeEnd
;
...
...
@@ -42,10 +41,6 @@ public class HmQrcodeListQDTO extends BasePageInfo implements Serializable {
private
String
storeId
;
private
String
storeName
;
private
String
storeCode
;
private
String
clerkId
;
private
String
clerkName
;
...
...
@@ -57,6 +52,8 @@ public class HmQrcodeListQDTO extends BasePageInfo implements Serializable {
*/
private
Long
hmGroupId
;
private
List
<
String
>
storeIdList
;
public
Long
getHmId
()
{
return
hmId
;
}
...
...
@@ -65,14 +62,6 @@ public class HmQrcodeListQDTO extends BasePageInfo implements Serializable {
this
.
hmId
=
hmId
;
}
public
String
getHmCode
()
{
return
hmCode
;
}
public
void
setHmCode
(
String
hmCode
)
{
this
.
hmCode
=
hmCode
;
}
public
Integer
getHmType
()
{
return
hmType
;
}
...
...
@@ -97,20 +86,12 @@ public class HmQrcodeListQDTO extends BasePageInfo implements Serializable {
this
.
enterpriseId
=
enterpriseId
;
}
public
String
getName
()
{
return
name
;
}
public
void
setName
(
String
name
)
{
this
.
name
=
name
;
}
public
String
getCreatorName
()
{
return
creatorName
;
public
String
getKeyword
()
{
return
keyword
;
}
public
void
set
CreatorName
(
String
creatorName
)
{
this
.
creatorName
=
creatorName
;
public
void
set
Keyword
(
String
keyword
)
{
this
.
keyword
=
keyword
;
}
public
Date
getCreateTimeStart
()
{
...
...
@@ -145,20 +126,12 @@ public class HmQrcodeListQDTO extends BasePageInfo implements Serializable {
this
.
storeId
=
storeId
;
}
public
String
getStore
Name
()
{
return
store
Name
;
public
String
getStore
Search
()
{
return
store
Search
;
}
public
void
setStoreName
(
String
storeName
)
{
this
.
storeName
=
storeName
;
}
public
String
getStoreCode
()
{
return
storeCode
;
}
public
void
setStoreCode
(
String
storeCode
)
{
this
.
storeCode
=
storeCode
;
public
void
setStoreSearch
(
String
storeSearch
)
{
this
.
storeSearch
=
storeSearch
;
}
public
String
getClerkId
()
{
...
...
@@ -192,5 +165,13 @@ public class HmQrcodeListQDTO extends BasePageInfo implements Serializable {
public
void
setHmGroupId
(
Long
hmGroupId
)
{
this
.
hmGroupId
=
hmGroupId
;
}
public
List
<
String
>
getStoreIdList
()
{
return
storeIdList
;
}
public
void
setStoreIdList
(
List
<
String
>
storeIdList
)
{
this
.
storeIdList
=
storeIdList
;
}
}
haoban-manage3-api/src/main/java/com/gic/haoban/manage/api/service/hm/HmQrcodeApiService.java
View file @
9e9feff5
...
...
@@ -51,4 +51,15 @@ public interface HmQrcodeApiService {
* @date 2022-07-05 10:59:03
*/
HmQrcodeDTO
queryById
(
Long
hmId
);
/**
* 作废
*
* @param hmId hm id
* @return boolean
* @author mozhu
* @date 2022-07-06 13:40:27
*/
boolean
delById
(
Long
hmId
);
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/dao/mapper/hm/TabHaobanHmQrcodeMapper.java
View file @
9e9feff5
...
...
@@ -61,5 +61,17 @@ public interface TabHaobanHmQrcodeMapper {
*/
int
deleteById
(
Long
hmId
);
/**
* 更新状态通过id
*
* @param statusFlag 状态标志
* @param hmId hm id
* @return int
* @author mozhu
* @date 2022-07-06 13:42:07
*/
int
updateStatusById
(
@Param
(
"statusFlag"
)
Integer
statusFlag
,
@Param
(
"hmId"
)
Long
hmId
);
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/hm/impl/TabHaobanHmQrcodeServiceImpl.java
View file @
9e9feff5
...
...
@@ -65,6 +65,6 @@ public class TabHaobanHmQrcodeServiceImpl implements TabHaobanHmQrcodeService {
*/
@Override
public
boolean
deleteById
(
Long
hmId
)
{
return
this
.
tabHaobanHmQrcodeMapper
.
deleteById
(
hmId
)
>
0
;
return
this
.
tabHaobanHmQrcodeMapper
.
updateStatusById
(
2
,
hmId
)
>
0
;
}
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/hm/HmQrcodeApiServiceImpl.java
View file @
9e9feff5
...
...
@@ -15,6 +15,7 @@ import com.gic.haoban.manage.api.dto.qdto.hm.HmQrcodeListQDTO;
import
com.gic.haoban.manage.api.dto.qdto.hm.HmQrcodeQDTO
;
import
com.gic.haoban.manage.api.service.hm.HmQrcodeApiService
;
import
com.gic.haoban.manage.service.config.Config
;
import
com.gic.haoban.manage.service.pojo.bo.hm.HmQrcodeBO
;
import
com.gic.haoban.manage.service.service.StaffClerkRelationService
;
import
com.gic.haoban.manage.service.service.WxEnterpriseService
;
import
com.gic.haoban.manage.service.service.hm.TabHaobanHmClerkRelationService
;
...
...
@@ -163,4 +164,18 @@ public class HmQrcodeApiServiceImpl implements HmQrcodeApiService {
public
HmQrcodeDTO
queryById
(
Long
hmId
)
{
return
EntityUtil
.
changeEntityByOrika
(
HmQrcodeDTO
.
class
,
hmQrcodeService
.
queryById
(
hmId
));
}
@Override
public
boolean
delById
(
Long
hmId
)
{
HmQrcodeBO
hmQrcodeBO
=
hmQrcodeService
.
queryById
(
hmId
);
if
(
hmQrcodeBO
==
null
)
{
return
false
;
}
WxEnterpriseDTO
wxEnterpriseDTO
=
wxEnterpriseService
.
selectById
(
hmQrcodeBO
.
getWxEnterpriseId
());
boolean
flag
=
qywxUserApiService
.
delContactWay
(
wxEnterpriseDTO
.
getCorpid
(),
config
.
getWxSuiteid
(),
hmQrcodeBO
.
getWxConfigId
());
if
(
flag
)
{
hmQrcodeService
.
deleteById
(
hmId
);
}
return
true
;
}
}
haoban-manage3-service/src/main/resources/mapper/hm/TabHaobanHmQrcodeMapper.xml
View file @
9e9feff5
...
...
@@ -87,78 +87,39 @@
<if
test=
"enterpriseId != null and enterpriseId != ''"
>
and enterprise_id = #{enterpriseId}
</if>
<if
test=
"name != null and name != ''"
>
and name = #{name}
</if>
<if
test=
"creatorId != null and creatorId != ''"
>
and creator_id = #{creatorId}
</if>
<if
test=
"creatorName != null and creatorName != ''"
>
and creator_name = #{creatorName}
</if>
<if
test=
"modifierId != null and modifierId != ''"
>
and modifier_id = #{modifierId}
<if
test=
"keyword != null and keyword != ''"
>
and ( name like CONCAT('%',#{keyword},'%') or hm_code like CONCAT('%',#{keyword},'%') or
creator_name like CONCAT('%',#{keyword},'%'))
</if>
<if
test=
"modifierName != null and modifierName != ''"
>
and modifier_name = #{modifierName}
</if>
<if
test=
"createTime != null"
>
and create_time = #{createTime}
<if
test=
"createTimeStart != null"
>
and create_time
<![CDATA[ >= ]]>
#{createTime}
</if>
<if
test=
"updateTime != null"
>
and update_time = #{updateTime}
</if>
<if
test=
"memberLabelId != null and memberLabelId != ''"
>
and member_label_id = #{memberLabelId}
<if
test=
"createTimeEnd != null"
>
and create_time
<![CDATA[ >= ]]>
#{createTimeEnd}
</if>
<if
test=
"passFlag != null"
>
and pass_flag = #{passFlag}
</if>
<if
test=
"welcomeId != null and welcomeId != ''"
>
and welcome_id = #{welcomeId}
</if>
<if
test=
"statusFlag != null"
>
and status_flag = #{statusFlag}
</if>
<if
test=
"addNum != null"
>
and add_num = #{addNum}
</if>
<if
test=
"overFlag != null"
>
and over_flag = #{overFlag}
</if>
<if
test=
"wxConfigId != null and wxConfigId != ''"
>
and wx_config_id = #{wxConfigId}
</if>
<if
test=
"wxQrcode != null and wxQrcode != ''"
>
and wx_qrcode = #{wxQrcode}
</if>
<if
test=
"wxUserId != null and wxUserId != ''"
>
and wx_user_id = #{wxUserId}
</if>
<if
test=
"storeId != null and storeId != ''"
>
and store_id = #{storeId}
</if>
<if
test=
"storeName != null and storeName != ''"
>
and store_name = #{storeName}
</if>
<if
test=
"storeCode != null and storeCode != ''"
>
and store_code = #{storeCode}
</if>
<if
test=
"clerkId != null and clerkId != ''"
>
and clerk_id = #{clerkId}
</if>
<if
test=
"clerkName != null and clerkName != ''"
>
and clerk_name = #{clerkName}
</if>
<if
test=
"clerkCode != null and clerkCode != ''"
>
and clerk_code = #{clerkCode}
</if>
<if
test=
"hmUserNum != null"
>
and hm_user_num = #{hmUserNum}
<if
test=
"storeSearch != null and storeSearch != ''"
>
and ( store_name like CONCAT('%',#{storeSearch},'%') or store_code like CONCAT('%',#{storeSearch},'%') )
</if>
<if
test=
"hmGroupId != null"
>
and hm_group_id = #{hmGroupId}
</if>
<if
test=
"null != storeIdList and storeIdList.size gt 0"
>
and store_id in
<foreach
collection=
"storeIdList"
index=
"index"
item=
"item"
open=
"("
separator=
","
close=
")"
>
#{item}
</foreach>
</if>
</where>
</select>
...
...
@@ -292,5 +253,14 @@
where hm_id = #{hmId}
</delete>
<update
id=
"updateStatusById"
>
update tab_haoban_hm_qrcode
<set>
status_flag = #{statusFlag},
update_time = now()
</set>
where hm_id = #{hmId}
</update>
</mapper>
haoban-manage3-web/src/main/java/com/gic/haoban/manage/web/controller/hm/HmQrcodeController.java
View file @
9e9feff5
package
com
.
gic
.
haoban
.
manage
.
web
.
controller
.
hm
;
import
cn.hutool.core.convert.Convert
;
import
com.gic.commons.webapi.reponse.RestResponse
;
import
com.gic.haoban.base.api.common.PageResult2
;
import
com.gic.haoban.base.api.common.pojo.dto.WebLoginDTO
;
...
...
@@ -9,13 +10,18 @@ import com.gic.haoban.manage.api.dto.hm.HmQrcodeDTO;
import
com.gic.haoban.manage.api.dto.hm.HmQrcodeListDTO
;
import
com.gic.haoban.manage.api.dto.qdto.hm.HmQrcodeListQDTO
;
import
com.gic.haoban.manage.api.dto.qdto.hm.HmQrcodeQDTO
;
import
com.gic.haoban.manage.api.service.StaffApiService
;
import
com.gic.haoban.manage.api.service.hm.HmQrcodeApiService
;
import
com.gic.haoban.manage.web.errCode.HaoBanErrCode
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.RestController
;
import
java.util.List
;
/**
* 活码(TabHaobanHmQrcode)表控制层
*
...
...
@@ -27,6 +33,8 @@ import org.springframework.web.bind.annotation.RestController;
public
class
HmQrcodeController
{
@Autowired
private
HmQrcodeApiService
hmQrcodeApiService
;
@Autowired
private
StaffApiService
staffApiService
;
/**
* 新增
...
...
@@ -71,6 +79,14 @@ public class HmQrcodeController {
*/
@RequestMapping
(
value
=
"list"
,
method
=
RequestMethod
.
POST
)
public
RestResponse
<
PageResult2
<
HmQrcodeListDTO
>>
update
(
@RequestBody
HmQrcodeListQDTO
hmQrcodeListQDTO
)
{
WebLoginDTO
loginUser
=
AuthWebRequestUtil
.
getLoginUser
();
List
<
String
>
storeList
=
staffApiService
.
getHaoBanStoreIdsRolesByClerkId
(
loginUser
.
getClerkId
(),
loginUser
.
getWxEnterpriseId
());
if
(
CollectionUtils
.
isEmpty
(
storeList
))
{
return
RestResponse
.
failure
(
Convert
.
toStr
(
HaoBanErrCode
.
ERR_100007
.
getCode
()),
HaoBanErrCode
.
ERR_100007
.
getMsg
());
}
if
(!
storeList
.
contains
(
"-1"
))
{
hmQrcodeListQDTO
.
setStoreIdList
(
storeList
);
}
return
RestResponse
.
successResult
(
this
.
hmQrcodeApiService
.
queryListByPage
(
hmQrcodeListQDTO
));
}
...
...
@@ -80,9 +96,20 @@ public class HmQrcodeController {
* @return
*/
@RequestMapping
(
value
=
"detail"
,
method
=
RequestMethod
.
GET
)
public
RestResponse
update
(
Long
hmId
)
{
public
RestResponse
detail
(
Long
hmId
)
{
HmQrcodeDTO
hmQrcodeDTO
=
this
.
hmQrcodeApiService
.
queryById
(
hmId
);
return
RestResponse
.
successResult
(
hmQrcodeDTO
);
}
/**
* 作废
* @param hmId
* @return
*/
@RequestMapping
(
value
=
"del"
,
method
=
RequestMethod
.
DELETE
)
public
RestResponse
del
(
Long
hmId
)
{
this
.
hmQrcodeApiService
.
delById
(
hmId
);
return
RestResponse
.
successResult
();
}
}
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