| | |
| | | import com.dy.pmsGlobal.daoBa.BaUserRoleMapper; |
| | | import com.dy.pmsGlobal.pojoBa.BaUser; |
| | | import com.dy.pmsGlobal.pojoBa.BaUserRole; |
| | | import com.dy.pmsGlobal.util.QrCodeConstant; |
| | | import com.dy.pmsGlobal.util.QrCodeUtil; |
| | | import com.google.zxing.WriterException; |
| | | import lombok.extern.slf4j.Slf4j; |
| | |
| | | private BaUserMapper dao; |
| | | @Autowired |
| | | private BaUserRoleMapper urDao; |
| | | private static final String stationPrefix = "101" ; |
| | | |
| | | /** |
| | | * 生成指定位数随机数字密码 |
| | |
| | | rsVo.obj = this.dao.selectSome(params) ; |
| | | rsVo.obj.parallelStream().forEach(item->{ |
| | | try { |
| | | byte[] codes = QrCodeUtil.genQrCode(stationPrefix+item.id); |
| | | byte[] codes = QrCodeUtil.genQrCode(QrCodeConstant.TypeWorker+item.id); |
| | | item.qrCode = "data:image/jpeg;base64," + Base64.encode(codes); |
| | | } catch (IOException e) { |
| | | e.printStackTrace(); |