切换店铺统计 √
下单选择会员 √ 注册会员 √ 完善手机号 √ 会员流水信息同步 √
This commit is contained in:
@@ -4,6 +4,7 @@ import cn.hutool.core.convert.Convert;
|
|||||||
import cn.hutool.core.thread.ThreadUtil;
|
import cn.hutool.core.thread.ThreadUtil;
|
||||||
import cn.hutool.core.util.ObjUtil;
|
import cn.hutool.core.util.ObjUtil;
|
||||||
import cn.hutool.core.util.StrUtil;
|
import cn.hutool.core.util.StrUtil;
|
||||||
|
import com.czg.account.service.ShopConfigService;
|
||||||
import com.czg.annotation.SaStaffCheckPermission;
|
import com.czg.annotation.SaStaffCheckPermission;
|
||||||
import com.czg.config.RabbitPublisher;
|
import com.czg.config.RabbitPublisher;
|
||||||
import com.czg.exception.CzgException;
|
import com.czg.exception.CzgException;
|
||||||
@@ -48,6 +49,8 @@ public class ProductController {
|
|||||||
private final RabbitPublisher rabbitPublisher;
|
private final RabbitPublisher rabbitPublisher;
|
||||||
@Resource
|
@Resource
|
||||||
private ShopSyncService shopSyncService;
|
private ShopSyncService shopSyncService;
|
||||||
|
@Resource
|
||||||
|
private ShopConfigService shopConfigService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 商品-分页
|
* 商品-分页
|
||||||
@@ -291,6 +294,24 @@ public class ProductController {
|
|||||||
return CzgResult.success(data);
|
return CzgResult.success(data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 商品-报损
|
||||||
|
*/
|
||||||
|
@PostMapping("sync")
|
||||||
|
@OperationLog("商品-同步主店商品信息")
|
||||||
|
//@SaAdminCheckPermission("product:sync")
|
||||||
|
public CzgResult<Void> sync() {
|
||||||
|
long shopId = StpKit.USER.getShopId(0L);
|
||||||
|
long sysUserId = StpKit.USER.getLoginIdAsLong();
|
||||||
|
Long headShopId = StpKit.USER.getHeadShopId();
|
||||||
|
ThreadUtil.execAsync(() -> {
|
||||||
|
shopSyncService.sync(headShopId, shopId, sysUserId);
|
||||||
|
});
|
||||||
|
CzgResult<Void> ret = CzgResult.success();
|
||||||
|
ret.setMsg("操作成功,数据正在后台同步中...");
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
private void asyncToBranchShop(Long id) {
|
private void asyncToBranchShop(Long id) {
|
||||||
long shopId = StpKit.USER.getShopId(0L);
|
long shopId = StpKit.USER.getShopId(0L);
|
||||||
long sysUserId = StpKit.USER.getLoginIdAsLong();
|
long sysUserId = StpKit.USER.getLoginIdAsLong();
|
||||||
|
|||||||
Reference in New Issue
Block a user