Procházet zdrojové kódy

tt

release_toaliyun_real
xhxu před 5 roky
rodič
revize
1413253e1f
5 změnil soubory, kde provedl 67 přidání a 6 odebrání
  1. +4
    -1
      mallinkService/src/main/java/com/iformall/domain/po/WxMall.java
  2. +12
    -2
      mallinkService/src/main/resources/mapper/TtCouponMapper.xml
  3. +3
    -1
      mallinkService/src/main/resources/mapper/WxMallMapper.xml
  4. +12
    -2
      mallinkService/src/main/resources/mapper/WxMerchantMapper.xml
  5. +36
    -0
      mallinkTTAdmin/src/main/java/com/iformall/controller/basic/WxMallController.java

+ 4
- 1
mallinkService/src/main/java/com/iformall/domain/po/WxMall.java Zobrazit soubor

@@ -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)
private Long adminId;

@@ -179,6 +179,9 @@ public class WxMall extends TenantEntity {
@io.swagger.annotations.ApiModelProperty(value="管理员登陆密码",name="adminPassword")
private String adminPassword;

@io.swagger.annotations.ApiModelProperty(value="1:有效,0:禁止登录",name="adminStatus")
private Integer adminStatus;

@TableField(exist = false)
@io.swagger.annotations.ApiModelProperty(value="查询-开始时间",name="startTime")
private Date startTime;


+ 12
- 2
mallinkService/src/main/resources/mapper/TtCouponMapper.xml Zobrazit soubor

@@ -107,7 +107,12 @@
</if>

<if test=" null != mark">
and c.`mark` = #{mark}
<if test="mark == 0" >
and (c.`mark` is null or m.`mark` &lt;&gt; 1)
</if>
<if test="mark == 1" >
and c.`mark` = 1
</if>
</if>

<if test="startdate != null">
@@ -161,7 +166,12 @@
and c.`status` = #{status}
</if>
<if test=" null != mark">
and c.`mark` = #{mark}
<if test="mark == 0" >
and (c.`mark` is null or m.`mark` &lt;&gt; 1)
</if>
<if test="mark == 1" >
and c.`mark` = 1
</if>
</if>
<if test=" null != businessId ">
and c.`business_id` = #{businessId}


+ 3
- 1
mallinkService/src/main/resources/mapper/WxMallMapper.xml Zobrazit soubor

@@ -46,6 +46,8 @@
<result column="admin_name" jdbcType="VARCHAR" property="adminName"/>
<result column="admin_phone" jdbcType="VARCHAR" property="adminPhone"/>
<result column="admin_username" jdbcType="VARCHAR" property="adminUsername"/>
<result column="admin_status" jdbcType="INTEGER" property="adminStatus"/>

</resultMap>

<sql id="allColumns">
@@ -232,7 +234,7 @@
select
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`,
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
left join mall_user_info mui on m.tenant_id = mui.tenant_id and mui.is_admin = 1
where 1=1


+ 12
- 2
mallinkService/src/main/resources/mapper/WxMerchantMapper.xml Zobrazit soubor

@@ -135,7 +135,12 @@
and m.`is_admin` = #{isAdmin}
</if>
<if test=" null != mark ">
and m.`mark` = #{mark}
<if test="mark == 0" >
and (m.`mark` is null or m.`mark` &lt;&gt; 1)
</if>
<if test="mark == 1" >
and m.`mark` = 1
</if>
</if>
<if test=" null != isDel ">
and m.`is_del` = #{isDel}
@@ -359,7 +364,12 @@
and m.`is_admin` = #{isAdmin}
</if>
<if test=" null != mark ">
and m.`mark` = #{mark}
<if test="mark == 0" >
and (m.`mark` is null or m.`mark` &lt;&gt; 1)
</if>
<if test="mark == 1" >
and m.`mark` = 1
</if>
</if>
<if test=" null != isDel ">
and m.`is_del` = #{isDel}


+ 36
- 0
mallinkTTAdmin/src/main/java/com/iformall/controller/basic/WxMallController.java Zobrazit soubor

@@ -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 = "商城-更新")


Načítá se…
Zrušit
Uložit