| | |
| | | package com.doumee.service.business.impl; |
| | | import com.doumee.core.model.LoginUserInfo; |
| | | import com.google.common.collect.Lists; |
| | | |
| | | import com.doumee.biz.system.SystemDictDataBiz; |
| | | import com.doumee.core.constants.Constants; |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.core.utils.Utils; |
| | | import com.doumee.core.wx.WxMiniUtilService; |
| | | import com.doumee.dao.business.LocksMapper; |
| | | import com.doumee.dao.business.join.LocksJoinMapper; |
| | | import com.doumee.dao.business.model.BaseParam; |
| | | import com.doumee.dao.business.model.Bikes; |
| | | import com.doumee.dao.business.model.Locks; |
| | | import com.doumee.dao.business.model.Sites; |
| | | import com.doumee.dao.system.model.SystemDictData; |
| | | import com.doumee.service.business.LocksService; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; |
| | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.doumee.service.business.SitesService; |
| | | import com.github.yulichang.wrapper.MPJLambdaWrapper; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.apache.shiro.SecurityUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.util.CollectionUtils; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * 锁头信息表Service实现 |
| | |
| | | |
| | | @Autowired |
| | | private LocksJoinMapper locksJoinMapper; |
| | | |
| | | |
| | | @Autowired |
| | | private WxMiniUtilService wxMiniUtilService; |
| | | |
| | | |
| | | @Autowired |
| | | private SystemDictDataBiz systemDictDataBiz; |
| | | |
| | | @Override |
| | | public String create(Locks locks) { |
| | |
| | | } |
| | | |
| | | @Override |
| | | public List<Locks> findLockBase64List(Locks locks) { |
| | | LoginUserInfo loginUserInfo = (LoginUserInfo) SecurityUtils.getSubject().getPrincipal(); |
| | | |
| | | QueryWrapper<Locks> wrapper = new QueryWrapper<>(locks); |
| | | wrapper.lambda().orderByAsc(Locks::getCode); |
| | | List<Locks> locksList = locksMapper.selectList(wrapper); |
| | | SystemDictData systemDictData = systemDictDataBiz.queryByCode(Constants.MINI_PROGRAMME,Constants.ACCESS_TOKEN); |
| | | if (!CollectionUtils.isEmpty(locksList)){ |
| | | // 检查是否有图片信息没有更新保存图片 |
| | | locksList.forEach(s-> { |
| | | if (StringUtils.isBlank(s.getInfo())){ |
| | | wxMiniUtilService.generateWXMiniCode(s, systemDictData); |
| | | s.setEditor(loginUserInfo.getId()); |
| | | s.setEditDate(new Date()); |
| | | updateById(s); |
| | | } |
| | | }); |
| | | return locksList; |
| | | } |
| | | return new ArrayList<>(); |
| | | } |
| | | |
| | | @Override |
| | | public PageData<Locks> findPage(PageWrap<Locks> pageWrap) { |
| | | IPage<Locks> page = new Page<>(pageWrap.getPage(), pageWrap.getCapacity()); |
| | | MPJLambdaWrapper<Locks> queryWrapper = new MPJLambdaWrapper<>(); |