| @@ -160,7 +160,7 @@ public class WxMall extends TenantEntity { | |||||
| } | } | ||||
| } | } | ||||
| @io.swagger.annotations.ApiModelProperty(value="管理员姓名",name="adminName") | |||||
| @io.swagger.annotations.ApiModelProperty(value="管理员Id",name="adminId") | |||||
| @TableField(exist = false) | @TableField(exist = false) | ||||
| private Long adminId; | private Long adminId; | ||||
| @@ -179,6 +179,9 @@ public class WxMall extends TenantEntity { | |||||
| @io.swagger.annotations.ApiModelProperty(value="管理员登陆密码",name="adminPassword") | @io.swagger.annotations.ApiModelProperty(value="管理员登陆密码",name="adminPassword") | ||||
| private String adminPassword; | private String adminPassword; | ||||
| @io.swagger.annotations.ApiModelProperty(value="1:有效,0:禁止登录",name="adminStatus") | |||||
| private Integer adminStatus; | |||||
| @TableField(exist = false) | @TableField(exist = false) | ||||
| @io.swagger.annotations.ApiModelProperty(value="查询-开始时间",name="startTime") | @io.swagger.annotations.ApiModelProperty(value="查询-开始时间",name="startTime") | ||||
| private Date startTime; | private Date startTime; | ||||
| @@ -107,7 +107,12 @@ | |||||
| </if> | </if> | ||||
| <if test=" null != mark"> | <if test=" null != mark"> | ||||
| and c.`mark` = #{mark} | |||||
| <if test="mark == 0" > | |||||
| and (c.`mark` is null or m.`mark` <> 1) | |||||
| </if> | |||||
| <if test="mark == 1" > | |||||
| and c.`mark` = 1 | |||||
| </if> | |||||
| </if> | </if> | ||||
| <if test="startdate != null"> | <if test="startdate != null"> | ||||
| @@ -161,7 +166,12 @@ | |||||
| and c.`status` = #{status} | and c.`status` = #{status} | ||||
| </if> | </if> | ||||
| <if test=" null != mark"> | <if test=" null != mark"> | ||||
| and c.`mark` = #{mark} | |||||
| <if test="mark == 0" > | |||||
| and (c.`mark` is null or m.`mark` <> 1) | |||||
| </if> | |||||
| <if test="mark == 1" > | |||||
| and c.`mark` = 1 | |||||
| </if> | |||||
| </if> | </if> | ||||
| <if test=" null != businessId "> | <if test=" null != businessId "> | ||||
| and c.`business_id` = #{businessId} | and c.`business_id` = #{businessId} | ||||
| @@ -46,6 +46,8 @@ | |||||
| <result column="admin_name" jdbcType="VARCHAR" property="adminName"/> | <result column="admin_name" jdbcType="VARCHAR" property="adminName"/> | ||||
| <result column="admin_phone" jdbcType="VARCHAR" property="adminPhone"/> | <result column="admin_phone" jdbcType="VARCHAR" property="adminPhone"/> | ||||
| <result column="admin_username" jdbcType="VARCHAR" property="adminUsername"/> | <result column="admin_username" jdbcType="VARCHAR" property="adminUsername"/> | ||||
| <result column="admin_status" jdbcType="INTEGER" property="adminStatus"/> | |||||
| </resultMap> | </resultMap> | ||||
| <sql id="allColumns"> | <sql id="allColumns"> | ||||
| @@ -232,7 +234,7 @@ | |||||
| select | select | ||||
| m.`id`,m.`tenant_id`,m.`parent_tenant_id`,m.`name`,m.`group`,m.`country`,m.`province`,m.`city`,m.`addr`, | m.`id`,m.`tenant_id`,m.`parent_tenant_id`,m.`name`,m.`group`,m.`country`,m.`province`,m.`city`,m.`addr`, | ||||
| m.`service_phone`,m.`valid_start`, m.`valid_end`, | m.`service_phone`,m.`valid_start`, m.`valid_end`, | ||||
| mui.`id` admin_id,mui.`username` admin_username,mui.`name` admin_name,mui.`phone` admin_phone | |||||
| mui.`id` admin_id,mui.`username` admin_username,mui.`name` admin_name,mui.`phone` admin_phone,mui.status admin_status | |||||
| from wx_mall m | from wx_mall m | ||||
| left join mall_user_info mui on m.tenant_id = mui.tenant_id and mui.is_admin = 1 | left join mall_user_info mui on m.tenant_id = mui.tenant_id and mui.is_admin = 1 | ||||
| where 1=1 | where 1=1 | ||||
| @@ -135,7 +135,12 @@ | |||||
| and m.`is_admin` = #{isAdmin} | and m.`is_admin` = #{isAdmin} | ||||
| </if> | </if> | ||||
| <if test=" null != mark "> | <if test=" null != mark "> | ||||
| and m.`mark` = #{mark} | |||||
| <if test="mark == 0" > | |||||
| and (m.`mark` is null or m.`mark` <> 1) | |||||
| </if> | |||||
| <if test="mark == 1" > | |||||
| and m.`mark` = 1 | |||||
| </if> | |||||
| </if> | </if> | ||||
| <if test=" null != isDel "> | <if test=" null != isDel "> | ||||
| and m.`is_del` = #{isDel} | and m.`is_del` = #{isDel} | ||||
| @@ -359,7 +364,12 @@ | |||||
| and m.`is_admin` = #{isAdmin} | and m.`is_admin` = #{isAdmin} | ||||
| </if> | </if> | ||||
| <if test=" null != mark "> | <if test=" null != mark "> | ||||
| and m.`mark` = #{mark} | |||||
| <if test="mark == 0" > | |||||
| and (m.`mark` is null or m.`mark` <> 1) | |||||
| </if> | |||||
| <if test="mark == 1" > | |||||
| and m.`mark` = 1 | |||||
| </if> | |||||
| </if> | </if> | ||||
| <if test=" null != isDel "> | <if test=" null != isDel "> | ||||
| and m.`is_del` = #{isDel} | and m.`is_del` = #{isDel} | ||||
| @@ -7,8 +7,11 @@ import com.iformall.common.ErrorCode; | |||||
| import com.iformall.common.ResultData; | import com.iformall.common.ResultData; | ||||
| import com.iformall.controller.base.BaseController; | import com.iformall.controller.base.BaseController; | ||||
| import com.iformall.domain.po.WxMall; | import com.iformall.domain.po.WxMall; | ||||
| import com.iformall.domain.po.base.TenantEntity; | |||||
| import com.iformall.enums.EnumYesOrNo; | |||||
| import com.iformall.service.WxMallService; | import com.iformall.service.WxMallService; | ||||
| import io.swagger.annotations.ApiOperation; | import io.swagger.annotations.ApiOperation; | ||||
| import org.apache.commons.lang3.StringUtils; | |||||
| import org.slf4j.Logger; | import org.slf4j.Logger; | ||||
| import org.slf4j.LoggerFactory; | import org.slf4j.LoggerFactory; | ||||
| import org.springframework.beans.factory.annotation.Autowired; | 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更新接口") | @ApiOperation("根据id更新接口") | ||||
| @PostMapping("update") | @PostMapping("update") | ||||
| @SystemControllerLog(description = "商城-更新") | @SystemControllerLog(description = "商城-更新") | ||||