liukangdong
2024-07-26 296fc0dbd38fb9528c9d1f91ec9bc3758e27e994
Merge branch 'master' of http://139.186.142.91:10010/r/productDev/zbomyoujia
已修改17个文件
223 ■■■■ 文件已修改
server/service/src/main/java/com/doumee/core/utils/Constants.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/service/src/main/java/com/doumee/core/utils/GeneratePicUtil.java 32 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/service/src/main/java/com/doumee/service/business/ShopService.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/service/src/main/java/com/doumee/service/business/impl/BjParamServiceImpl.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/service/src/main/java/com/doumee/service/business/impl/GetZhongTaiDataServiceImpl.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/service/src/main/java/com/doumee/service/business/impl/ShopServiceImpl.java 40 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/service/src/main/java/com/doumee/service/business/impl/UsersServiceImpl.java 11 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/web/src/main/java/com/doumee/api/web/PersonnelApi.java 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
wechat_staff/api/index.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
wechat_staff/pages/detailDis/product.wxss 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
wechat_staff/pages/homeId/index.js 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
wechat_staff/pages/index/index.wxml 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
wechat_staff/pages/index/index.wxss 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
wechat_staff/pages/store/staff.less 39 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
wechat_staff/pages/store/staff.wxml 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
wechat_staff/pages/store/staff.wxss 36 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
wechat_staff/utils/config.js 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/service/src/main/java/com/doumee/core/utils/Constants.java
@@ -695,7 +695,7 @@
            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) {
server/service/src/main/java/com/doumee/core/utils/GeneratePicUtil.java
@@ -1,6 +1,7 @@
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;
@@ -21,6 +22,7 @@
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";
@@ -391,14 +393,22 @@
        }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);
        //得到它的绘制环境(这张图片的笔)
@@ -438,8 +448,9 @@
        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);
@@ -529,16 +540,15 @@
            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){
server/service/src/main/java/com/doumee/service/business/ShopService.java
@@ -93,6 +93,8 @@
     */
    PageData<Shop> findPage(PageWrap<Shop> pageWrap);
    List<Shop> getUserShopList(Long userId);
    /**
     * 条件统计
     *
server/service/src/main/java/com/doumee/service/business/impl/BjParamServiceImpl.java
@@ -216,7 +216,7 @@
    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)){
server/service/src/main/java/com/doumee/service/business/impl/GetZhongTaiDataServiceImpl.java
@@ -338,6 +338,11 @@
        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);
server/service/src/main/java/com/doumee/service/business/impl/ShopServiceImpl.java
@@ -1032,4 +1032,44 @@
        );
    }
    @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;
    }
}
server/service/src/main/java/com/doumee/service/business/impl/UsersServiceImpl.java
@@ -45,6 +45,7 @@
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;
@@ -78,6 +79,7 @@
 * @date 2024/07/04 14:40
 */
@Service
@Slf4j
public class UsersServiceImpl implements UsersService {
@@ -441,7 +443,7 @@
        } catch (Exception e) {
            e.printStackTrace();
        }
        throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"更新手机号失败");
        throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"获取手机号失败");
    }
@@ -676,6 +678,7 @@
    @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())){
@@ -727,18 +730,20 @@
    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());
server/web/src/main/java/com/doumee/api/web/PersonnelApi.java
@@ -151,6 +151,16 @@
    }
    @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({
wechat_staff/api/index.js
@@ -13,7 +13,7 @@
export const loginByPhone = (data) => {
  return request({
    url: '/web/personnel/loginByPhone',
    datas
    data
  })
}
// 发送验证码
wechat_staff/pages/detailDis/product.wxss
@@ -61,6 +61,7 @@
  margin-bottom: 26rpx;
}
.main_content .text {
  line-height: 36rpx;
  font-size: 26rpx;
  color: #555555;
  margin-bottom: 40rpx;
wechat_staff/pages/homeId/index.js
@@ -53,11 +53,11 @@
  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({
@@ -66,13 +66,15 @@
          // 通过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) {
wechat_staff/pages/index/index.wxml
@@ -1,10 +1,12 @@
<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">
wechat_staff/pages/index/index.wxss
@@ -1,3 +1,10 @@
.search_fix{
   position: fixed;
   z-index: 10000;
   width: 100%;
   height: 206rpx;
   background-color: white;
}
.search_wrap {
  display: flex;
  align-items: center;
@@ -15,7 +22,7 @@
.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;
wechat_staff/pages/store/staff.less
@@ -8,6 +8,7 @@
  z-index: -1;
}
.container {
  padding: 26rpx 40rpx;
  .avatar {
@@ -198,4 +199,40 @@
    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%);
    }
  }
}
wechat_staff/pages/store/staff.wxml
@@ -20,12 +20,12 @@
      <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>
wechat_staff/pages/store/staff.wxss
@@ -105,6 +105,7 @@
  font-size: 40rpx;
  display: flex;
}
.guide .title {
  font-weight: 500;
  font-size: 32rpx;
@@ -187,3 +188,38 @@
  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%);
}
wechat_staff/utils/config.js
@@ -1,5 +1,5 @@
// 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/'