|
|
@@ -16,6 +16,8 @@
|
|
|
*/
|
|
|
package org.springblade.modules.ldt.mall.controller;
|
|
|
|
|
|
+import cn.hutool.core.lang.Assert;
|
|
|
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
import io.swagger.annotations.Api;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
import io.swagger.annotations.ApiParam;
|
|
|
@@ -24,13 +26,17 @@ import lombok.AllArgsConstructor;
|
|
|
import javax.validation.Valid;
|
|
|
|
|
|
import org.springblade.common.constant.SystemConstant;
|
|
|
+import org.springblade.core.launch.constant.AppConstant;
|
|
|
import org.springblade.core.mp.support.Condition;
|
|
|
import org.springblade.core.mp.support.Query;
|
|
|
import org.springblade.core.tool.api.R;
|
|
|
import org.springblade.core.tool.utils.Func;
|
|
|
+import org.springblade.modules.ldt.appaccount.entity.AppAccount;
|
|
|
+import org.springblade.modules.ldt.appaccount.service.IAppAccountService;
|
|
|
import org.springblade.modules.ldt.channel.entity.PointChannel;
|
|
|
import org.springblade.modules.ldt.channel.service.IPointChannelService;
|
|
|
import org.springblade.modules.ldt.pointdetail.entity.PointDetail;
|
|
|
+import org.springframework.transaction.annotation.Transactional;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
import org.springframework.web.bind.annotation.RequestParam;
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
@@ -56,7 +62,7 @@ public class MallController extends BladeController {
|
|
|
|
|
|
private final IMallService mallService;
|
|
|
private final IPointChannelService pointChannelService;
|
|
|
-
|
|
|
+ private final IAppAccountService appAccountService;
|
|
|
/**
|
|
|
* 详情
|
|
|
*/
|
|
|
@@ -116,7 +122,9 @@ public class MallController extends BladeController {
|
|
|
@PostMapping("/submit")
|
|
|
@ApiOperationSupport(order = 6)
|
|
|
@ApiOperation(value = "新增或修改", notes = "传入mall")
|
|
|
+ @Transactional
|
|
|
public R submit(@Valid @RequestBody Mall mall) {
|
|
|
+ Assert.notNull(mall.getPersonTel(),"商场关联的手机号不能为空");
|
|
|
//新增商场时同时新增渠道
|
|
|
if(mall.getId() != null){//编辑
|
|
|
return R.status(mallService.updateById(mall));
|
|
|
@@ -134,6 +142,10 @@ public class MallController extends BladeController {
|
|
|
return R.status(pointChannelService.save(pointChannel));
|
|
|
}
|
|
|
|
|
|
+ //判断该手机号是否已经有账号存在
|
|
|
+// AppAccount appAccount = appAccountService.getBaseMapper().selectOne(new QueryWrapper<>(new AppAccount())
|
|
|
+// .lambda().eq(AppAccount::getPhone,));
|
|
|
+
|
|
|
return R.status(false);
|
|
|
}
|
|
|
|