Просмотр исходного кода

Merge branch 'release_toaliyun_real_20230701' of https://git.malls.iformall.com/server/formallProject into release_toaliyun_real_20230701

release_toaliyun_real
lin 2 лет назад
Родитель
Сommit
6745f992f9
12 измененных файлов: 172 добавлений и 10 удалений
  1. +23
    -0
      mallinkAdmin/src/main/java/com/iformall/controller/basic/WxMallController.java
  2. +1
    -1
      mallinkService/src/main/java/com/iformall/domain/po/WxCoupon.java
  3. +31
    -0
      mallinkService/src/main/java/com/iformall/domain/po/WxMallNoticeContact.java
  4. +17
    -0
      mallinkService/src/main/java/com/iformall/mapper/WxMallNoticeContactMapper.java
  5. +6
    -0
      mallinkService/src/main/java/com/iformall/service/WxMallService.java
  6. +24
    -4
      mallinkService/src/main/java/com/iformall/service/impl/WxMallServiceImpl.java
  7. +1
    -1
      mallinkService/src/main/java/com/iformall/service/order/entity/WxComposeChildOrderShare.java
  8. +1
    -1
      mallinkService/src/main/java/com/iformall/service/pay/service/fee/TtServiceFeeService.java
  9. +1
    -1
      mallinkService/src/main/java/com/iformall/service/pay/service/fee/WxServiceFeeService.java
  10. +1
    -1
      mallinkService/src/main/resources/mapper/WxCouponMapper.xml
  11. +65
    -0
      mallinkService/src/main/resources/mapper/WxMallNoticeContactMapper.xml
  12. +1
    -1
      mallinkService/src/main/resources/mapper/WxMallVersionMapper.xml

+ 23
- 0
mallinkAdmin/src/main/java/com/iformall/controller/basic/WxMallController.java Просмотреть файл

@@ -2,10 +2,13 @@ package com.iformall.controller.basic;

import com.google.code.kaptcha.Constants;
import com.iformall.annotation.SystemControllerLog;
import com.iformall.common.ErrorCode;
import com.iformall.common.Result;
import com.iformall.common.ResultData;
import com.iformall.controller.base.BaseController;
import com.iformall.domain.po.TtMallIm;
import com.iformall.domain.po.WxMall;
import com.iformall.domain.po.WxMallNoticeContact;
import com.iformall.enums.EnumGroupSupport;
import com.iformall.service.WxMallService;
import com.iformall.utils.ShiroUtils;
@@ -97,4 +100,24 @@ public class WxMallController extends BaseController {
}


@ApiOperation("根据id查询")
@GetMapping("/noticeContact")
@SystemControllerLog(description = "商城-查询通知配置")
public ResultData noticeContact() {
logger.debug("[" + getIpAddr() + "] WxMallController::noticeContact");
WxMallNoticeContact noticeContact = wxMallService.getNoticeContact(getTenantInfo());
return new ResultData(noticeContact);
}

@ApiOperation("更新接口")
@PostMapping("saveNoticeContact")
@SystemControllerLog(description = "更新")
public ResultData saveNoticeContact(@RequestBody WxMallNoticeContact record) {
logger.debug("[" + getIpAddr() + "] WxMallController::saveNoticeContact");
record.updateTenantInfo(getTenantInfo());
wxMallService.saveNoticeContact(record);
return new ResultData(record);
}


}

+ 1
- 1
mallinkService/src/main/java/com/iformall/domain/po/WxCoupon.java Просмотреть файл

@@ -154,7 +154,7 @@ public class WxCoupon extends TenantEntity {
private Integer inventory;
@io.swagger.annotations.ApiModelProperty(value="购买须知",name="remark")
private String remark;
@io.swagger.annotations.ApiModelProperty(value="EnumCouponStatus 状态(-1:全部,0:草稿/待生效,1:已生效,2:已失效,3:已作废)",name="status")
@io.swagger.annotations.ApiModelProperty(value="EnumCouponStatus ",name="status")
private Integer status;
@io.swagger.annotations.ApiModelProperty(value="创建时间",name="createDate")
private Date createDate;


+ 31
- 0
mallinkService/src/main/java/com/iformall/domain/po/WxMallNoticeContact.java Просмотреть файл

@@ -0,0 +1,31 @@
package com.iformall.domain.po;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.iformall.domain.po.base.TenantEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;

@JsonIgnoreProperties(value = {"handler"})
@TableName(value = "wx_mall_notice_contact")
@Data
@EqualsAndHashCode(callSuper = true)
public class WxMallNoticeContact extends TenantEntity {

@TableId(type= IdType.AUTO)
protected Long id;

@io.swagger.annotations.ApiModelProperty(value="",name="phone")
private String phone;

@io.swagger.annotations.ApiModelProperty(value="通知开关",name="phoneEnabled")
private Integer phoneEnabled;

@io.swagger.annotations.ApiModelProperty(value="",name="email")
private String email;

@io.swagger.annotations.ApiModelProperty(value="抖音应用版本EnumDouyinApplicationVersion",name="douyinApplictionVersion")
private Integer emailEnabled;
}

+ 17
- 0
mallinkService/src/main/java/com/iformall/mapper/WxMallNoticeContactMapper.java Просмотреть файл

@@ -0,0 +1,17 @@
package com.iformall.mapper;

import com.iformall.common.CommonMapper;
import com.iformall.domain.po.WxMallNoticeContact;
import com.iformall.domain.po.WxMallVersion;
import com.iformall.domain.po.base.TenantEntity;

import java.util.List;

public interface WxMallNoticeContactMapper extends CommonMapper<WxMallNoticeContact, Long> {

List<WxMallNoticeContact> findList(WxMallNoticeContact wxMall);

WxMallNoticeContact getByTenantId(String tenantId);

WxMallNoticeContact getByTenantInfo(TenantEntity tenantEntity);
}

+ 6
- 0
mallinkService/src/main/java/com/iformall/service/WxMallService.java Просмотреть файл

@@ -2,6 +2,7 @@ package com.iformall.service;

import com.github.pagehelper.PageInfo;
import com.iformall.common.ResultData;
import com.iformall.domain.po.WxMallNoticeContact;
import com.iformall.domain.po.WxProjectConfig;
import com.iformall.domain.po.base.TenantEntity;
import com.iformall.domain.po.WxMall;
@@ -102,4 +103,9 @@ public interface WxMallService {
EnumDouyinApplicationVersion getDouyinApplicationVersion(TenantEntity tenantEntity);

WxMall getRandomMall(String randmKey, String tenantId);

WxMallNoticeContact getNoticeContact(TenantEntity tenantInfo);

void saveNoticeContact(WxMallNoticeContact record);

}

+ 24
- 4
mallinkService/src/main/java/com/iformall/service/impl/WxMallServiceImpl.java Просмотреть файл

@@ -10,10 +10,7 @@ import com.iformall.domain.po.*;
import com.iformall.domain.po.base.TenantEntity;
import com.iformall.enums.*;
import com.iformall.exception.MallinkException;
import com.iformall.mapper.WxMallBuildingMapper;
import com.iformall.mapper.WxMallFloorMapper;
import com.iformall.mapper.WxMallMapper;
import com.iformall.mapper.WxMallVersionMapper;
import com.iformall.mapper.*;
import com.iformall.service.MallUserInfoService;
import com.iformall.service.WxMallService;
import com.iformall.utils.Constant;
@@ -63,6 +60,9 @@ public class WxMallServiceImpl implements WxMallService {
@Autowired
WxMallVersionMapper wxMallVersionMapper;

@Autowired
WxMallNoticeContactMapper wxMallNoticeContactMapper;



@Override
@@ -459,4 +459,24 @@ public class WxMallServiceImpl implements WxMallService {
return mall;
}

@Override
public WxMallNoticeContact getNoticeContact(TenantEntity tenantInfo) {
return wxMallNoticeContactMapper.getByTenantInfo(tenantInfo);
}

@Override
public void saveNoticeContact(WxMallNoticeContact record) {
if(record.getId() == null){
WxMallNoticeContact byTenantInfo = wxMallNoticeContactMapper.getByTenantInfo(record);
if(byTenantInfo != null){
record.setId(byTenantInfo.getId());
}
}
if(record.getId() == null){
wxMallNoticeContactMapper.insert(record);
}else{
wxMallNoticeContactMapper.updateById(record);
}
}

}

+ 1
- 1
mallinkService/src/main/java/com/iformall/service/order/entity/WxComposeChildOrderShare.java Просмотреть файл

@@ -75,7 +75,7 @@ public class WxComposeChildOrderShare {
private Long merchantId;//收款商户
private String merchantUid;//收款商户

public void setServiceAmount(Integer serviceAmount){
public void handleServiceAmount(Integer serviceAmount){
if(this.realPayMent == null){
return;
}


+ 1
- 1
mallinkService/src/main/java/com/iformall/service/pay/service/fee/TtServiceFeeService.java Просмотреть файл

@@ -145,7 +145,7 @@ public class TtServiceFeeService implements ServiceFeeAdapterService{
//商品设置的总分佣率
int allCommission = getAllCommission(payAccount,wxComposeChildOrderShare.getOrderId());
int serviceAmount = PayUtils.getPayRate(wxComposeChildOrderShare.getRealPayMent(), allCommission, true);
wxComposeChildOrderShare.setServiceAmount(serviceAmount);
wxComposeChildOrderShare.handleServiceAmount(serviceAmount);
return true;
}



+ 1
- 1
mallinkService/src/main/java/com/iformall/service/pay/service/fee/WxServiceFeeService.java Просмотреть файл

@@ -91,7 +91,7 @@ public class WxServiceFeeService implements ServiceFeeAdapterService{
//商品设置的总分佣率
int allCommission = getAllCommission(payAccount,wxComposeChildOrderShare.getOrderId());
int serviceAmount = PayUtils.getPayRate(wxComposeChildOrderShare.getRealPayMent(), allCommission, true);
wxComposeChildOrderShare.setServiceAmount(serviceAmount);
wxComposeChildOrderShare.handleServiceAmount(serviceAmount);
return true;

}


+ 1
- 1
mallinkService/src/main/resources/mapper/WxCouponMapper.xml Просмотреть файл

@@ -470,7 +470,7 @@
<select id="findSendCouponIds" parameterType="java.util.HashMap" resultType="Long">
select id
from wx_coupon
where c.`version` = 0 and `tenant_id` = #{tenantId}
where `version` = 0 and `tenant_id` = #{tenantId}
and ((valid_type=1
<choose>
<when test="expired == 0">


+ 65
- 0
mallinkService/src/main/resources/mapper/WxMallNoticeContactMapper.xml Просмотреть файл

@@ -0,0 +1,65 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.iformall.mapper.WxMallNoticeContactMapper">
<resultMap id="BaseResultMap" type="com.iformall.domain.po.WxMallNoticeContact">
<id column="id" jdbcType="BIGINT" property="id"/>
<result column="tenant_id" jdbcType="VARCHAR" property="tenantId"/>
<result column="parent_tenant_id" jdbcType="VARCHAR" property="parentTenantId"/>
<result column="phone" jdbcType="VARCHAR" property="phone"/>
<result column="phone_enabled" jdbcType="INTEGER" property="phoneEnabled"/>
<result column="email" jdbcType="VARCHAR" property="email"/>
<result column="email_enabled" jdbcType="INTEGER" property="emailEnabled"/>
</resultMap>

<sql id="allColumns">
`id`,`tenant_id`,`parent_tenant_id`,`phone`,`phone_enabled`,`email`,`email_enabled`
</sql>

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

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

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

<if test=" null != ids ">
and id in
<foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")">
#{idItem}
</foreach>
</if>
<if test=" null != sortColumns">order by ${sortColumns}</if>
</sql>

<select id="findList" parameterType="com.iformall.domain.po.WxMallNoticeContact" resultMap="BaseResultMap">
select
<include refid="allColumns"/>
from wx_mall_notice_contact
<include refid="dynamicWhereConditions"/>
</select>

<select id="getByTenantId" parameterType="string" resultMap="BaseResultMap">
select
<include refid="allColumns"/>
from wx_mall_notice_contact
where `tenant_id` = #{tenantId}
</select>
<select id="getByTenantInfo" parameterType="com.iformall.domain.po.base.TenantEntity" resultMap="BaseResultMap">
select
<include refid="allColumns"/>
from wx_mall_notice_contact
where `tenant_id` = #{tenantId}
<if test=" null != parentTenantId and '' != parentTenantId">
and `parent_tenant_id` = #{parentTenantId}
</if>
</select>

</mapper>

+ 1
- 1
mallinkService/src/main/resources/mapper/WxMallVersionMapper.xml Просмотреть файл

@@ -20,7 +20,7 @@
</if>

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


Загрузка…
Отмена
Сохранить