|
@@ -1,6 +1,7 @@
|
|
|
package com.sqx.modules.shop.service.impl;
|
|
package com.sqx.modules.shop.service.impl;
|
|
|
|
|
|
|
|
import cn.hutool.core.util.ObjectUtil;
|
|
import cn.hutool.core.util.ObjectUtil;
|
|
|
|
|
+import cn.hutool.core.util.StrUtil;
|
|
|
import com.alibaba.fastjson.JSON;
|
|
import com.alibaba.fastjson.JSON;
|
|
|
import com.alibaba.fastjson.JSONArray;
|
|
import com.alibaba.fastjson.JSONArray;
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
import com.alibaba.fastjson.JSONObject;
|
|
@@ -8,6 +9,7 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
|
|
+import com.sqx.common.exception.SqxException;
|
|
|
import com.sqx.common.utils.Constant;
|
|
import com.sqx.common.utils.Constant;
|
|
|
import com.sqx.common.utils.PageUtils;
|
|
import com.sqx.common.utils.PageUtils;
|
|
|
import com.sqx.common.utils.Result;
|
|
import com.sqx.common.utils.Result;
|
|
@@ -37,6 +39,7 @@ import com.sqx.modules.order.entity.TbOrder;
|
|
|
import com.sqx.modules.pay.service.CashOutService;
|
|
import com.sqx.modules.pay.service.CashOutService;
|
|
|
import com.sqx.modules.shop.dao.ShopMessageDao;
|
|
import com.sqx.modules.shop.dao.ShopMessageDao;
|
|
|
import com.sqx.modules.shop.dto.ShopAuditDTO;
|
|
import com.sqx.modules.shop.dto.ShopAuditDTO;
|
|
|
|
|
+import com.sqx.modules.shop.dto.ShopAuditUpdateDTO;
|
|
|
import com.sqx.modules.shop.service.ShopMessageService;
|
|
import com.sqx.modules.shop.service.ShopMessageService;
|
|
|
import com.sqx.modules.sys.dao.SysUserDao;
|
|
import com.sqx.modules.sys.dao.SysUserDao;
|
|
|
import com.sqx.modules.sys.entity.SysUserEntity;
|
|
import com.sqx.modules.sys.entity.SysUserEntity;
|
|
@@ -499,6 +502,56 @@ public class ShopMessageServiceImpl extends ServiceImpl<ShopMessageDao, GoodsSho
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
@Override
|
|
|
|
|
+ public void updateShopAuthentication(Long shopId, ShopAuditUpdateDTO dto) {
|
|
|
|
|
+ GoodsShop goodsShop = baseMapper.selectById(shopId);
|
|
|
|
|
+ if (ObjectUtil.isNull(goodsShop)) {
|
|
|
|
|
+ throw new SqxException("店铺信息不存在");
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ boolean isNeedUpdate = false;
|
|
|
|
|
+ GoodsShop newGoodsShop = new GoodsShop();
|
|
|
|
|
+ newGoodsShop.setShopId(shopId);
|
|
|
|
|
+ if (StrUtil.isNotBlank(dto.getShopCover())) {
|
|
|
|
|
+ newGoodsShop.setShopCover(dto.getShopCover());
|
|
|
|
|
+ isNeedUpdate = true;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ if (StrUtil.isNotBlank(dto.getRealName())) {
|
|
|
|
|
+ newGoodsShop.setRealName(dto.getRealName());
|
|
|
|
|
+ isNeedUpdate = true;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ if (StrUtil.isNotBlank(dto.getIdentityCardNumber())) {
|
|
|
|
|
+ newGoodsShop.setIdentitycardNumber(dto.getIdentityCardNumber());
|
|
|
|
|
+ isNeedUpdate = true;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ if (StrUtil.isNotBlank(dto.getPhone())) {
|
|
|
|
|
+ newGoodsShop.setPhone(dto.getPhone());
|
|
|
|
|
+ isNeedUpdate = true;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ if (StrUtil.isNotBlank(dto.getBusinessLicense())) {
|
|
|
|
|
+ newGoodsShop.setBusinessLicense(dto.getBusinessLicense());
|
|
|
|
|
+ isNeedUpdate = true;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ if (StrUtil.isNotBlank(dto.getIdentityCardPro())) {
|
|
|
|
|
+ newGoodsShop.setIdentitycardPro(dto.getIdentityCardPro());
|
|
|
|
|
+ isNeedUpdate = true;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ if (StrUtil.isNotBlank(dto.getIdentityCardCon())) {
|
|
|
|
|
+ newGoodsShop.setIdentitycardCon(dto.getIdentityCardCon());
|
|
|
|
|
+ isNeedUpdate = true;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ if (isNeedUpdate) {
|
|
|
|
|
+ updateById(newGoodsShop);
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ @Override
|
|
|
public Result sendMsgs(String phone, String state) {
|
|
public Result sendMsgs(String phone, String state) {
|
|
|
return userService.sendMsg(phone,"ruzhu");
|
|
return userService.sendMsg(phone,"ruzhu");
|
|
|
}
|
|
}
|