Commit 29f04c34 by 墨竹

fix:多人导购解绑状态删除

parent 365a134b
......@@ -129,5 +129,16 @@ public interface TabHaobanHmClerkRelationMapper {
* @return
*/
TabHaobanHmClerkRelation getHmClerkByHmIdAndStaffId(@Param("hmId") Long hmId, @Param("staffId") String staffId);
/**
* 更新状态通过id
*
* @param status
* @param relationId
* @return int
* @author mozhu
* @date 2022-07-21 16:32:43
*/
int updateStatusById(@Param("status") Integer status, @Param("relationId") Long relationId);
}
......@@ -147,4 +147,16 @@ public interface HmClerkRelationService {
*/
HmClerkRelationBO getHmClerkByHmIdAndStaffId(Long hmId,String staffId);
/**
* 更新状态通过id
*
* @param status 状态
* @param relationId 关系id
* @return int
* @author mozhu
* @date 2022-07-21 16:32:14
*/
int updateStatusById(Integer status, Long relationId);
}
......@@ -106,4 +106,9 @@ public class HmClerkRelationServiceImpl implements HmClerkRelationService {
public HmClerkRelationBO getHmClerkByHmIdAndStaffId(Long hmId, String staffId) {
return EntityUtil.changeEntityByOrika(HmClerkRelationBO.class,tabHaobanHmClerkRelationMapper.getHmClerkByHmIdAndStaffId(hmId,staffId));
}
@Override
public int updateStatusById(Integer status, Long relationId) {
return tabHaobanHmClerkRelationMapper.updateStatusById(status,relationId);
}
}
......@@ -568,6 +568,9 @@ public class HmQrcodeApiServiceImpl implements HmQrcodeApiService {
for (HmClerkRelationBO hmClerkRelationBO : hmClerkRelationBOS) {
Long hmId = hmClerkRelationBO.getHmId();
List<String> clerkIds = hmClerkRelationService.getClerkIdByHmId(hmId);
hmClerkRelationService.updateStatusById(0,hmClerkRelationBO.getRelationId());
clerkIds.remove(clerkId);
// 更新活码
HmQrcodeQDTO hmQrcodeQDTO = new HmQrcodeQDTO();
......
......@@ -182,5 +182,13 @@
where hm_id = #{hmId} and staff_id = #{staffId} and status = 1 limit 1
</select>
<update id="updateStatusById">
update tab_haoban_hm_clerk_relation
<set>
status = #{status},update_time = now()
</set>
where relation_id = #{relationId}
</update>
</mapper>
......@@ -287,7 +287,7 @@
</update>
<update id="resetAddNumAndOverFlag">
update
update tab_haoban_hm_qrcode
<set>
add_num = 0,over_flag = 0,update_time = now()
</set>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment