Merge branch 'master' of http://139.186.142.91:10010/r/productDev/zbomyoujia
| | |
| | | Response response = client.newCall(request).execute(); |
| | | if (response.isSuccessful()) { |
| | | InputStream inputStream = new ByteArrayInputStream(response.body().bytes()); |
| | | /* ByteArrayOutputStream baos = new ByteArrayOutputStream(); |
| | | /*ByteArrayOutputStream baos = new ByteArrayOutputStream(); |
| | | byte[] buffer = new byte[1024]; |
| | | int len = -1; |
| | | while ((len = inputStream.read(buffer)) != -1) { |
| | |
| | | package com.doumee.core.utils; |
| | | |
| | | import com.google.zxing.common.BitMatrix; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.commons.fileupload.FileItem; |
| | | import org.apache.commons.fileupload.FileItemFactory; |
| | | import org.apache.commons.fileupload.disk.DiskFileItemFactory; |
| | |
| | | import java.math.RoundingMode; |
| | | import java.net.URL; |
| | | |
| | | @Slf4j |
| | | public class GeneratePicUtil { |
| | | |
| | | static String bg="https://shoeslxkj.oss-cn-beijing.aliyuncs.com/file/20230404/SysBaseBackGround/D56231512C0B4A4C9D06B02F9566B0B0.png"; |
| | |
| | | }return null; |
| | | } |
| | | private static BufferedImage getImgIO(InputStream is) { |
| | | if(is ==null){ |
| | | log.error("=============================qrcode error 小程序码为空"); |
| | | }else{ |
| | | |
| | | log.error("=============================qrcode okay 小程序码有有數據"); |
| | | } |
| | | try { |
| | | return ImageIO.read(is); |
| | | }catch (Exception e){ |
| | | log.error("=============================qrcode error 小程序码为空11111111111:"+e.getMessage()); |
| | | |
| | | }return null; |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | public static InputStream generateShareImg(String imgurl, InputStream mpCode, String title) { |
| | | public static InputStream generateShareImg(String imgurl, InputStream mpCode1, String title) { |
| | | |
| | | BufferedImage bi = new BufferedImage(750, 976, BufferedImage.TYPE_INT_RGB); |
| | | //得到它的绘制环境(这张图片的笔) |
| | |
| | | g2.drawString("查看更多精彩内容", 40,820+th); |
| | | |
| | | |
| | | BufferedImage img3 = getImgIO(mpCode); |
| | | BufferedImage img3 = getImgIO(mpCode1); |
| | | if(img3!=null){ |
| | | g2.setColor(Color.white); |
| | | g2.drawImage(img3, 530, 736, 180, 180, null); |
| | | } |
| | | InputStream inputStream = bufferedImageToInputStream(bi); |
| | |
| | | g2.drawImage(setRadius(img1,img1.getWidth(),0,0), (int)(20*rate), (int)(h-68*rate), (int)(48*rate) ,(int)(48*rate), null); |
| | | } |
| | | |
| | | Font font =new Font("黑体", Font.PLAIN, (int)(28 * rate)); |
| | | FontMetrics fontMetrics = g2.getFontMetrics(font); |
| | | int textWidth = fontMetrics.stringWidth(name); |
| | | |
| | | g2.setColor(Color.white); |
| | | g2.setFont(new Font("黑体", Font.PLAIN, (int)(28 * rate))); |
| | | g2.drawString(name, (int) (80*rate),h-(int)((64-th)*rate)); |
| | | Font font =new Font("黑体", Font.PLAIN, (int)(24 * rate)); |
| | | g2.setColor(Color.white); |
| | | g2.setFont(font); |
| | | g2.drawString(name, (int) (80*rate),h-(int)((64-th)*rate)); |
| | | g2.setColor(Color.white); |
| | | g2.setFont(new Font("黑体", Font.PLAIN, (int)(24* rate))); |
| | | g2.drawString("扫描看更多", (int)(w -(textWidth+30*rate)),h-(int)(rate*(50-th))); |
| | | FontMetrics fontMetrics = g2.getFontMetrics(font); |
| | | int textWidth = fontMetrics.stringWidth("扫码看更多"); |
| | | g2.drawString("扫码看更多", (int)(w -(textWidth+20*rate)),h-(int)(rate*(50-th))); |
| | | |
| | | BufferedImage img3 = getImgIO(mpCode); |
| | | if(img3!=null){ |
| | |
| | | */ |
| | | PageData<Shop> findPage(PageWrap<Shop> pageWrap); |
| | | |
| | | List<Shop> getUserShopList(Long userId); |
| | | |
| | | /** |
| | | * 条件统计 |
| | | * |
| | |
| | | public BjParamConfigResponse getBjParamConfig(){ |
| | | BjParamConfigResponse bjParamConfigResponse = new BjParamConfigResponse(); |
| | | List<BjParam> bjParamList = bjParamMapper.selectList(new QueryWrapper<BjParam>() |
| | | .lambda().eq(BjParam::getIsdeleted,Constants.ZERO)); |
| | | .lambda().eq(BjParam::getIsdeleted,Constants.ZERO).orderByAsc(BjParam::getSortnum)); |
| | | if(com.github.xiaoymin.knife4j.core.util.CollectionUtils.isNotEmpty(bjParamList)){ |
| | | List<BjParam> roughList = bjParamList.stream().filter(i->i.getType().equals(Constants.ZERO+"")&& StringUtils.isEmpty(i.getParentId())).collect(Collectors.toList()); |
| | | if(com.github.xiaoymin.knife4j.core.util.CollectionUtils.isNotEmpty(roughList)){ |
| | |
| | | ztContentListRequest.setId(id); |
| | | ZTCaseInfoResponse response = zbomZhongTaiService.getWholecaseInfo(ztContentListRequest); |
| | | if(Objects.nonNull(response)){ |
| | | // if(StringUtils.isNotBlank(response.getPanorama())){ |
| | | // response.setPanorama( |
| | | // response.getPanorama().replace("https://720.","https://720-3.").replace("https://720-2.","https://720-3.") |
| | | // ); |
| | | // } |
| | | //查询导购信息 进行信息绑定与返回 |
| | | if(StringUtils.isNotBlank(salesId)){ |
| | | Users users = usersMapper.selectById(salesId); |
| | |
| | | ); |
| | | } |
| | | |
| | | @Override |
| | | public List<Shop> getUserShopList(Long userId) { |
| | | Users users = usersMapper.selectById(userId); |
| | | if(Objects.isNull(users)){ |
| | | return new ArrayList<>(); |
| | | } |
| | | Shop userShop = shopMapper.selectById(users.getDepartmentId()); |
| | | if(Objects.isNull(userShop)){ |
| | | return new ArrayList<>(); |
| | | } |
| | | List<Shop> shopList = shopMapper.selectList(new QueryWrapper<Shop>() |
| | | .lambda() |
| | | .eq(Shop::getScode,userShop.getScode()) |
| | | .eq(Shop::getType,Constants.TWO) |
| | | .eq(Shop::getSecondType,Constants.THREE) |
| | | ); |
| | | //查询经营范围信息 |
| | | List<CategorySeg> categorySegAllList = categorySegMapper.selectList(new QueryWrapper<CategorySeg>().lambda() |
| | | .isNotNull(CategorySeg::getOrgId) |
| | | .eq(CategorySeg::getIsdeleted,Constants.ZERO)); |
| | | if(com.github.xiaoymin.knife4j.core.util.CollectionUtils.isNotEmpty(categorySegAllList)){ |
| | | for (Shop shop:shopList) { |
| | | if(StringUtils.isBlank(shop.getOrgId())){ |
| | | continue; |
| | | } |
| | | List<CategorySeg> categorySegList = categorySegAllList.stream().filter(i->i.getOrgId().equals(shop.getOrgId())).collect(Collectors.toList()); |
| | | List<UnitCodeVo> unitCodeVoList =systemDictDataBiz.getUnitList(); |
| | | List<String> seqNameList = new ArrayList<>(); |
| | | for(CategorySeg model : categorySegList){ |
| | | String seqName = systemDictDataBiz.getUnitName(model.getUnitCode(),unitCodeVoList); |
| | | if(Objects.nonNull(seqName)){ |
| | | seqNameList.add(seqName); |
| | | } |
| | | } |
| | | shop.setSeqNameList(seqNameList); |
| | | } |
| | | } |
| | | return shopList; |
| | | } |
| | | |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.github.yulichang.interfaces.MPJBaseJoin; |
| | | import com.github.yulichang.wrapper.MPJLambdaWrapper; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import okhttp3.Response; |
| | | import org.apache.catalina.User; |
| | | import org.apache.commons.lang3.StringUtils; |
| | |
| | | * @date 2024/07/04 14:40 |
| | | */ |
| | | @Service |
| | | @Slf4j |
| | | public class UsersServiceImpl implements UsersService { |
| | | |
| | | |
| | |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"更新手机号失败"); |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"获取手机号失败"); |
| | | } |
| | | |
| | | |
| | |
| | | |
| | | @Override |
| | | public String getContentShareImg(Users users, ContentShareImgDto param){ |
| | | log.error("======================start===========:海报开始"+JSONObject.toJSONString(param)); |
| | | users = usersMapper.selectById(users.getId()); |
| | | this.getUsersDetail(users); |
| | | if(StringUtils.isBlank(param.getImgurl())){ |
| | |
| | | |
| | | private String dealShareImgNoUser(ContentShareImgDto param, Users users, String shareFolder, String path) { |
| | | String url =null; |
| | | //内容分享海报图片 |
| | | //内容分享海报图片 |
| | | log.error("======================start===========:海报开始"); |
| | | InputStream mpCode = Constants.generateWxMiniImgStream(systemDictDataBiz.queryByCode(Constants.WX_MINI_CONFIG, Constants.WX_TOKEN_CUSTOMER).getCode(), |
| | | //"userId="+users.getId()+"&articleId="+param.getArticleId(), |
| | | param.getArticleId()+"_"+users.getId(), |
| | | param.getPageUrl());//小程序 |
| | | |
| | | log.error("======================mpcode===========:获取小程序码开始"); |
| | | String title = systemDictDataBiz.queryByCode(Constants.WEIXIN_DEFAULT_IMGS, Constants.SHARE_HAIBAO_HEADER_TITLE).getCode(); |
| | | InputStream inputStream = GeneratePicUtil.generateShareImg( |
| | | param.getImgurl() |
| | | ,mpCode |
| | | ,title); |
| | | |
| | | log.error("======================huatu===========:画图结束"); |
| | | TyyZosUtil obs = new TyyZosUtil( systemDictDataBiz.queryByCode(Constants.OBJCET_STORAGE, Constants.ENDPOINT).getCode(), |
| | | systemDictDataBiz.queryByCode(Constants.OBJCET_STORAGE, Constants.ACCESS_ID).getCode(), |
| | | systemDictDataBiz.queryByCode(Constants.OBJCET_STORAGE, Constants.ACCESS_KEY).getCode()); |
| | |
| | | } |
| | | |
| | | @UserLoginRequired |
| | | @ApiOperation(value = "获取员工管理门店列表", notes = "员工端小程序") |
| | | @GetMapping("/userShopList") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(paramType = "header", dataType = "String", name = "token", value = "用户token值", required = true) |
| | | }) |
| | | public ApiResponse<List<Shop>> userShopList () { |
| | | return ApiResponse.success(shopService.getUserShopList(getMemberId())); |
| | | } |
| | | |
| | | @UserLoginRequired |
| | | @ApiOperation(value = "门店详情", notes = "员工端小程序") |
| | | @GetMapping("/shopDetail") |
| | | @ApiImplicitParams({ |
| | |
| | | export const loginByPhone = (data) => { |
| | | return request({ |
| | | url: '/web/personnel/loginByPhone', |
| | | datas |
| | | data |
| | | }) |
| | | } |
| | | // 发送验证码 |
| | |
| | | margin-bottom: 26rpx; |
| | | } |
| | | .main_content .text { |
| | | line-height: 36rpx; |
| | | font-size: 26rpx; |
| | | color: #555555; |
| | | margin-bottom: 40rpx; |
| | |
| | | itemClick(e) { |
| | | const item = e.currentTarget.dataset.item |
| | | console.log('item', item); |
| | | actionDo({actionType: 'view',id: item.id}) |
| | | if(item.contentType == 'video'){ |
| | | wx.previewMedia({ |
| | | sources: [{ url: item.content, type: 'video' }] |
| | | }) |
| | | }) |
| | | actionDo({actionType: 'view',id: item.id}) |
| | | } |
| | | if(item.contentType == 'link'){ |
| | | wx.navigateTo({ |
| | |
| | | // 通过eventChannel向被打开页面传送数据 |
| | | res.eventChannel.emit('data',{link:item.content} ); |
| | | } |
| | | }) |
| | | }) |
| | | actionDo({actionType: 'view',id: item.id}) |
| | | } |
| | | if(item.contentType == 'page'){ |
| | | getApp().globalData.catalogCode=item.content |
| | | wx.switchTab({ |
| | | url: '/pages/discover/discover' |
| | | }) |
| | | }) |
| | | actionDo({actionType: 'view',id: item.id}) |
| | | } |
| | | }, |
| | | cateClick(e) { |
| | |
| | | <view class="container"> |
| | | <view style="height: {{clientTop - 2}}px;"></view> |
| | | <view class="search_wrap"> |
| | | <image class="icon" src="../../static/home_ic_search@2x.png" mode="widthFix"></image> |
| | | <input model:value="{{ searchValue }}" placeholder="搜索" type="text" /> |
| | | <view class="container" > |
| | | <view class="search_fix"> |
| | | <view style="height: {{clientTop - 2}}px;"></view> |
| | | <view class="search_wrap"> |
| | | <image class="icon" src="../../static/home_ic_search@2x.png" mode="widthFix"></image> |
| | | <input model:value="{{ searchValue }}" placeholder="搜索" type="text" /> |
| | | </view> |
| | | </view> |
| | | <view class="everyday"> |
| | | <view class="everyday" > |
| | | <view class="header" bindtap="promotionClick"> |
| | | <view class="title">每日上新</view> |
| | | <view class="more"> |
| | |
| | | .search_fix{ |
| | | position: fixed; |
| | | z-index: 10000; |
| | | width: 100%; |
| | | height: 206rpx; |
| | | background-color: white; |
| | | } |
| | | .search_wrap { |
| | | display: flex; |
| | | align-items: center; |
| | |
| | | .everyday { |
| | | width: 670rpx; |
| | | height: 466rpx; |
| | | margin: 40rpx; |
| | | margin: 206rpx 40rpx; |
| | | background: linear-gradient(180deg, #F2E7E1 0%, #FEFEFD 30%, #FFFFFF 100%), #FFFFFF; |
| | | box-shadow: 0rpx 4rpx 20rpx 0rpx rgba(176, 135, 113, 0.2); |
| | | border-radius: 8rpx; |
| | |
| | | z-index: -1; |
| | | } |
| | | |
| | | |
| | | .container { |
| | | padding: 26rpx 40rpx; |
| | | .avatar { |
| | |
| | | color: #999999; |
| | | text-align: center; |
| | | } |
| | | } |
| | | } |
| | | .card_wrap{ |
| | | position: fixed; |
| | | border-radius: 8rpx; |
| | | top: 50%; |
| | | left: 75rpx; |
| | | transform: translate(0, -50%); |
| | | width: 600rpx; |
| | | background-color: rgba(0, 0, 0, .2); |
| | | z-index: 999; |
| | | .img1{ |
| | | image{ |
| | | width: 600rpx; |
| | | border-radius: 8rpx ; |
| | | } |
| | | } |
| | | .btns{ |
| | | margin-top: 30rpx; |
| | | display: flex; |
| | | justify-content: space-between; |
| | | width: 100%; |
| | | .btn{ |
| | | width: 290rpx; |
| | | height: 88rpx; |
| | | border-radius: 8rpx; |
| | | border: 2rpx solid #FFFFFF; |
| | | display: flex; |
| | | justify-content: center; |
| | | align-items: center; |
| | | color: #fff; |
| | | } |
| | | .save{ |
| | | border: none; |
| | | background: linear-gradient( 180deg, #E0B49C 0%, #B68B74 100%); |
| | | } |
| | | } |
| | | } |
| | |
| | | <view class="card"> |
| | | <image src="../../static/images/mingpian_bg_nianxian.png" class="bg"></image> |
| | | <view>从业年限</view> |
| | | <view class="num">{{ info.jobDate || '5' }}</view> |
| | | <view class="num">{{ userInfo.jobDate || '5' }}</view> |
| | | </view> |
| | | <view class="card"> |
| | | <image src="../../static/images/mingpian_bg_kehu.png" class="bg"></image> |
| | | <view>服务客户</view> |
| | | <view class="num" wx:if="{{ info.costomerNum || info.costomerNum == 0 }}">{{ info.costomerNum || '--' }}+</view> |
| | | <view class="num" wx:if="{{ userInfo.costomerNum || userInfo.costomerNum == 0 }}">{{ userInfo.costomerNum || '--' }}+</view> |
| | | <view wx:else class="num">--</view> |
| | | </view> |
| | | </view> |
| | |
| | | font-size: 40rpx; |
| | | display: flex; |
| | | } |
| | | |
| | | .guide .title { |
| | | font-weight: 500; |
| | | font-size: 32rpx; |
| | |
| | | color: #999999; |
| | | text-align: center; |
| | | } |
| | | |
| | | .card_wrap { |
| | | position: fixed; |
| | | border-radius: 8rpx; |
| | | top: 50%; |
| | | left: 75rpx; |
| | | transform: translate(0, -50%); |
| | | width: 600rpx; |
| | | background-color: rgba(0, 0, 0, 0.2); |
| | | z-index: 999; |
| | | } |
| | | .card_wrap .img1 image { |
| | | width: 600rpx; |
| | | border-radius: 8rpx ; |
| | | } |
| | | .card_wrap .btns { |
| | | margin-top: 30rpx; |
| | | display: flex; |
| | | justify-content: space-between; |
| | | width: 100%; |
| | | } |
| | | .card_wrap .btns .btn { |
| | | width: 290rpx; |
| | | height: 88rpx; |
| | | border-radius: 8rpx; |
| | | border: 2rpx solid #FFFFFF; |
| | | display: flex; |
| | | justify-content: center; |
| | | align-items: center; |
| | | color: #fff; |
| | | } |
| | | .card_wrap .btns .save { |
| | | border: none; |
| | | background: linear-gradient(180deg, #E0B49C 0%, #B68B74 100%); |
| | | } |
| | |
| | | // export const baseUrl = 'http://192.168.0.135:10027' |
| | | export const baseUrl = 'https://dmtest.ahapp.net/web_interface' // 本地 |
| | | export const baseUrl = 'http://192.168.0.135:10027' |
| | | // export const baseUrl = 'https://dmtest.ahapp.net/web_interface' // 本地 |
| | | // export const baseUrl = 'http://zbtest.ahapp.net/zbom_interface/jx/wechat/' //测试服务器 |
| | | |
| | | // export const imageUrl = 'https://osswebcdn.zbom.com/jiaxuan/images/' |