Kaynağa Gözat

集团版第二次bug第二次

release_toaliyun_real
xhxu 5 yıl önce
ebeveyn
işleme
4720dfea0a
5 değiştirilmiş dosya ile 36 ekleme ve 18 silme
  1. +14
    -0
      mallinkAdmin/src/main/java/com/iformall/controller/base/BaseController.java
  2. +1
    -1
      mallinkAdmin/src/main/java/com/iformall/controller/sys/WxAdminLogController.java
  3. +3
    -3
      mallinkService/src/main/resources/mapper/WxCUserBasicInfoMapper.xml
  4. +16
    -12
      mallinkService/src/main/resources/mapper/WxLevelConfigMapper.xml
  5. +2
    -2
      mallinkService/src/main/resources/mapper/WxShopMapper.xml

+ 14
- 0
mallinkAdmin/src/main/java/com/iformall/controller/base/BaseController.java Dosyayı Görüntüle

@@ -9,6 +9,7 @@ import com.iformall.domain.po.MallUserInfo;
import com.iformall.domain.po.base.TenantEntity;
import com.iformall.shiro.UserSession;
import com.iformall.utils.IPUtil;
import org.apache.commons.lang3.StringUtils;
import org.apache.shiro.SecurityUtils;
import org.apache.shiro.session.Session;
import org.springframework.web.bind.WebDataBinder;
@@ -74,6 +75,19 @@ public class BaseController {
return tenantEntity;
}

/**
* 处理集团新增修改所需租户信息
* ifParentUpdateTenantInfo
*/
public TenantEntity ifParentUpdateTenantInfo() {
TenantEntity info = this.getTenantInfo();
if(StringUtils.isBlank(info.getTenantId())){
info.setTenantId(info.getParentTenantId());
info.setParentTenantId(null);
}
return info;
}

public String getIpAddr() {
HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest();
String ipaddress = IPUtil.getIpAddr(request);


+ 1
- 1
mallinkAdmin/src/main/java/com/iformall/controller/sys/WxAdminLogController.java Dosyayı Görüntüle

@@ -22,7 +22,7 @@ public class WxAdminLogController extends BaseController {
@PostMapping("pvlog")
public ResultData pvLog(@RequestBody WxAdminLog wxAdminLog) {
logger.debug("[" + getIpAddr() + "] WxAdminLogController::pvLog");
wxAdminLog.updateTenantInfo(getTenantInfo());
wxAdminLog.updateTenantInfo(ifParentUpdateTenantInfo());
wxAdminLogService.saveLogCount(wxAdminLog);
return new ResultData();
}


+ 3
- 3
mallinkService/src/main/resources/mapper/WxCUserBasicInfoMapper.xml Dosyayı Görüntüle

@@ -315,13 +315,13 @@
inner join wx_c_user cu1 on cu1.id = cubi.id
where 1=1
<if test="1 == reportType ">
and cubi.date_format(create_date, '%Y-%m-%d') &lt;= reportTime
and cubi.date_format(cubi.create_date, '%Y-%m-%d') &lt;= cubi.reportTime
</if>
<if test="2 == reportType ">
and cubi.date_format(create_date, '%Y-%m') &lt;= reportTime
and cubi.date_format(cubi.create_date, '%Y-%m') &lt;= cubi.reportTime
</if>
<if test="3 == reportType ">
and cubi.date_format(create_date, '%Y') &lt;= reportTime
and cubi.date_format(cubi.create_date, '%Y') &lt;= cubi.reportTime
</if>
<if test=" null != tenantId and '' != tenantId">
and cubi.`tenant_id` = #{tenantId}


+ 16
- 12
mallinkService/src/main/resources/mapper/WxLevelConfigMapper.xml Dosyayı Görüntüle

@@ -15,47 +15,50 @@
</resultMap>

<sql id="allColumns">
`id`, `tenant_id`, `points`, `level`, `description`, `create_date`, `update_date`, `discount_enable`, `capability`,`scale`
wlc.`id`, wlc.`tenant_id`, wlc.`points`, wlc.`level`, wlc.`description`, wlc.`create_date`, wlc.`update_date`, wlc.`discount_enable`, wlc.`capability`,wlc.`scale`
</sql>

<sql id="dynamicWhereConditions">
where 1 = 1

<if test=" null != id ">
and `id` = #{id}
and wlc.`id` = #{id}
</if>

<if test=" null != tenantId ">
and `tenant_id` = #{tenantId}
<if test=" null != tenantId and '' != tenantId">
and wlc.`tenant_id` = #{tenantId}
</if>
<if test=" null != parentTenantId and '' != parentTenantId">
and wm.`parent_tenant_id` = #{parentTenantId}
</if>

<if test=" null != points ">
and `points` = #{points}
and wlc.`points` = #{points}
</if>

<if test=" null != level ">
and `level` like concat('%', #{level},'%')
and wlc.`level` like concat('%', #{level},'%')
</if>

<if test=" null != description ">
and `description` like concat('%', #{description},'%')
and wlc.`description` like concat('%', #{description},'%')
</if>

<if test=" null != createDate ">
and `create_date` = #{createDate}
and wlc.`create_date` = #{createDate}
</if>

<if test=" null != updateDate ">
and `update_date` = #{updateDate}
and wlc.`update_date` = #{updateDate}
</if>

<if test=" null != discountEnable ">
and `discount_enable` = #{discountEnable}
and wlc.`discount_enable` = #{discountEnable}
</if>


<if test=" null != ids ">
and id in
and wlc.id in
<foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")">
#{idItem}
</foreach>
@@ -66,7 +69,8 @@
<select id="findList" parameterType="com.iformall.domain.po.WxLevelConfig" resultMap="BaseResultMap">
select
<include refid="allColumns"/>
from wx_level_config
from wx_level_config wlc
left join wx_mall wm on wm.tenant_id = wlc.tenant_id
<include refid="dynamicWhereConditions"/>
</select>



+ 2
- 2
mallinkService/src/main/resources/mapper/WxShopMapper.xml Dosyayı Görüntüle

@@ -246,10 +246,10 @@
</select>

<select id="notRentListMapAsPage" parameterType="com.iformall.domain.po.WxShop" resultType="hashmap">
select s.id as id, s.tenant_id tenantId, s.parent_tenant_id parentTenantId, s.shop_number shopNumber,CONVERT(s.build_area,SIGNED)buildArea,
select s.id as id, s.tenant_id tenantId, s.parent_tenant_id parentTenantId, s.shop_number shopNumber,CONVERT(s.build_area,SIGNED) buildArea,
s.img_url imgUrl,CONVERT(s.operation_area,SIGNED) operationArea,
s.status,b.building_name building,f.floor_name floor,s.manager,s.manager_phone managerPhone,
s.type,s.point_type pointType,s.addr,DATEDIFF(now(),s.create_date) freeDay,s.create_date as create_date
s.type,s.point_type pointType,s.addr,DATEDIFF(now(),s.create_date) freeDay,s.create_date as createDate
from wx_shop s
left join wx_mall_building b on s.building=b.id
left join wx_mall_floor f on s.floor=f.id


Yükleniyor…
İptal
Kaydet