|
|
|
@@ -7,8 +7,11 @@ import com.iformall.common.ErrorCode; |
|
|
|
import com.iformall.common.ResultData; |
|
|
|
import com.iformall.controller.base.BaseController; |
|
|
|
import com.iformall.domain.po.WxMall; |
|
|
|
import com.iformall.domain.po.base.TenantEntity; |
|
|
|
import com.iformall.enums.EnumYesOrNo; |
|
|
|
import com.iformall.service.WxMallService; |
|
|
|
import io.swagger.annotations.ApiOperation; |
|
|
|
import org.apache.commons.lang3.StringUtils; |
|
|
|
import org.slf4j.Logger; |
|
|
|
import org.slf4j.LoggerFactory; |
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
@@ -40,6 +43,39 @@ public class WxMallController extends BaseController { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
@ApiOperation("查询商场集团列表") |
|
|
|
@PostMapping("addAadmin") |
|
|
|
@SystemControllerLog(description = "商场基础数据") |
|
|
|
public ResultData addAadmin(@RequestBody WxMall wxMall) { |
|
|
|
logger.debug("[" + getIpAddr() + "] WxProjectConfigController::getMallList"); |
|
|
|
try { |
|
|
|
if(wxMall == null){ |
|
|
|
return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL.getCode()); |
|
|
|
} |
|
|
|
TenantEntity tenantEntity = ifParentTenantInfoAlone(); |
|
|
|
wxMall.setParentTenantId(tenantEntity.getTenantId()); |
|
|
|
if(StringUtils.isBlank(wxMall.getName())){ |
|
|
|
return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL.getCode(),"名称不能为空"); |
|
|
|
} |
|
|
|
if(StringUtils.isBlank(wxMall.getAdminName())){ |
|
|
|
return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL.getCode(),"管理员不能为空"); |
|
|
|
} |
|
|
|
if(StringUtils.isBlank(wxMall.getAdminPhone())){ |
|
|
|
return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL.getCode(),"手机号不能为空"); |
|
|
|
} |
|
|
|
if(wxMall.getAdminStatus() == null){ |
|
|
|
wxMall.setAdminStatus(EnumYesOrNo.YES.getCode()); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return new ResultData(); |
|
|
|
}catch (Exception e){ |
|
|
|
logger.error(e.getMessage(),e); |
|
|
|
return new ResultData(ErrorCode.SYS_SERVER_ERROR); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
@ApiOperation("根据id更新接口") |
|
|
|
@PostMapping("update") |
|
|
|
@SystemControllerLog(description = "商城-更新") |
|
|
|
|