jiangqs
2023-07-13 cfd0118ef446a66f91999afc7b1e46ca607adf50
ruoyi-modules/ruoyi-shop/src/main/java/com/ruoyi/shop/service/impl/shop/ShopServiceImpl.java
@@ -30,6 +30,7 @@
import javax.annotation.Resource;
import java.math.BigDecimal;
import java.nio.charset.StandardCharsets;
import java.text.ParseException;
import java.util.*;
import java.util.function.Function;
@@ -202,6 +203,12 @@
            newShop = true;
        }
        BeanUtils.copyProperties(mgtEditShopDto,shop);
        String shopDetail = shop.getShopDetail();
        if(StringUtils.isNotBlank(shopDetail)){
            byte[] decodedBytes = Base64.getDecoder().decode(shopDetail);
            shopDetail = new String(decodedBytes, StandardCharsets.UTF_8);
            shop.setShopDetail(shopDetail);
        }
        //商户编号
        if(mgtEditShopDto.getShopId()==null){
            String shopNo = CodeFactoryUtil.getShopNo();
@@ -495,6 +502,12 @@
        Shop shop = this.getById(shopId);
        //基本信息拷贝
        BeanUtils.copyProperties(shop,mgtShopInfoVo);
        String shopDetail = mgtShopInfoVo.getShopDetail();
        if(StringUtils.isNotBlank(shopDetail)){
            byte[] encodedBytes = Base64.getEncoder().encode(shopDetail.getBytes(StandardCharsets.UTF_8));
            shopDetail = new String(encodedBytes, StandardCharsets.UTF_8);
            mgtShopInfoVo.setShopDetail(shopDetail);
        }
        //商户标签
        List<ShopRelTag> shopRelTagList = shopRelTagService.listShopRelTagByShopId(shopId);
        if(shopRelTagList!=null&&!shopRelTagList.isEmpty()){
@@ -592,7 +605,7 @@
        }
        shop.setBelongUserId(mgtTransferShopDto.getTransferUserId());
        this.saveOrUpdate(shop);
        ShopRelUser shopRelUser = new ShopRelUser();
        /*ShopRelUser shopRelUser = new ShopRelUser();
        shopRelUser.setDelFlag(0);
        shopRelUser.setShopId(shop.getShopId());
        shopRelUser.setUserId(mgtTransferShopDto.getTransferUserId());
@@ -600,7 +613,7 @@
        shopRelUser.setUserMobile(sysUser.getPhonenumber());
        shopRelUser.setUserDeptId(sysUser.getDeptId());
        shopRelUser.setUserName(sysUser.getNickName());
        shopRelUserService.save(shopRelUser);
        shopRelUserService.save(shopRelUser);*/
    }
    /**