Commit 5623230d by 墨竹

Merge branch 'feature-qywx-fee' into developer

parents b1c0909a 7f9cfeb1
package com.gic.haoban.manage.api.dto.fee;
import java.io.Serializable;
import java.util.Date;
/**
* 企业微信账号拦截日志(TabHaobanQywxFeeAccountInterceptLog)实体类
*
* @author mozhu
* @since 2022-08-10 10:27:47
*/
public class HaobanQywxFeeAccountInterceptLogDTO implements Serializable {
private static final long serialVersionUID = -14545100741695880L;
private Long feeAccountInterceptId;
private String corpId;
private String wxEnterpriseId;
/**
* 用户id
*/
private String wxUserId;
/**
* 员工id
*/
private String staffId;
private Date qwCreateTime;
public Long getFeeAccountInterceptId() {
return feeAccountInterceptId;
}
public void setFeeAccountInterceptId(Long feeAccountInterceptId) {
this.feeAccountInterceptId = feeAccountInterceptId;
}
public String getCorpId() {
return corpId;
}
public void setCorpId(String corpId) {
this.corpId = corpId;
}
public String getWxEnterpriseId() {
return wxEnterpriseId;
}
public void setWxEnterpriseId(String wxEnterpriseId) {
this.wxEnterpriseId = wxEnterpriseId;
}
public String getWxUserId() {
return wxUserId;
}
public void setWxUserId(String wxUserId) {
this.wxUserId = wxUserId;
}
public String getStaffId() {
return staffId;
}
public void setStaffId(String staffId) {
this.staffId = staffId;
}
public Date getQwCreateTime() {
return qwCreateTime;
}
public void setQwCreateTime(Date qwCreateTime) {
this.qwCreateTime = qwCreateTime;
}
}
......@@ -47,4 +47,14 @@ public interface HaobanQywxFeeApiService {
*/
List<HaobanQywxFeeDetailDTO> feeDetail(String wxEnterpriseId);
/**
* 添加拦截记录
*
* @param param 参数
* @author mozhu
* @date 2022-08-10 11:01:56
*/
void addInterceptLog(String param);
}
package com.gic.haoban.manage.service.dao.mapper.fee;
import com.gic.haoban.manage.service.entity.fee.TabHaobanQywxFeeAccountInterceptLog;
import org.apache.ibatis.annotations.Param;
import org.springframework.data.domain.Pageable;
import java.util.List;
/**
* 企业微信账号拦截日志(TabHaobanQywxFeeAccountInterceptLog)表数据库访问层
*
* @author mozhu
* @since 2022-08-10 10:27:45
*/
public interface TabHaobanQywxFeeAccountInterceptLogMapper {
/**
* 通过ID查询单条数据
*
* @param feeAccountId 主键
* @return 实例对象
*/
TabHaobanQywxFeeAccountInterceptLog queryById(Long feeAccountId);
/**
* 查询指定行数据
*
* @param tabHaobanQywxFeeAccountInterceptLog 查询条件
* @param pageable 分页对象
* @return 对象列表
*/
List<TabHaobanQywxFeeAccountInterceptLog> queryAllByLimit(TabHaobanQywxFeeAccountInterceptLog tabHaobanQywxFeeAccountInterceptLog, @Param("pageable") Pageable pageable);
/**
* 新增数据
*
* @param tabHaobanQywxFeeAccountInterceptLog 实例对象
* @return 影响行数
*/
int insert(TabHaobanQywxFeeAccountInterceptLog tabHaobanQywxFeeAccountInterceptLog);
/**
* 批量新增数据(MyBatis原生foreach方法)
*
* @param entities List<TabHaobanQywxFeeAccountInterceptLog> 实例对象列表
* @return 影响行数
*/
int insertBatch(@Param("entities") List<TabHaobanQywxFeeAccountInterceptLog> entities);
/**
* 修改数据
*
* @param tabHaobanQywxFeeAccountInterceptLog 实例对象
* @return 影响行数
*/
int update(TabHaobanQywxFeeAccountInterceptLog tabHaobanQywxFeeAccountInterceptLog);
/**
* 通过主键删除数据
*
* @param feeAccountId 主键
* @return 影响行数
*/
int deleteById(Long feeAccountId);
}
package com.gic.haoban.manage.service.entity.fee;
import java.io.Serializable;
import java.util.Date;
/**
* 企业微信账号拦截日志(TabHaobanQywxFeeAccountInterceptLog)实体类
*
* @author mozhu
* @since 2022-08-10 10:27:47
*/
public class TabHaobanQywxFeeAccountInterceptLog implements Serializable {
private static final long serialVersionUID = -14545100741695880L;
private Long feeAccountInterceptId;
private String corpId;
private String wxEnterpriseId;
/**
* 用户id
*/
private String wxUserId;
/**
* 员工id
*/
private String staffId;
private Date qwCreateTime;
public Long getFeeAccountInterceptId() {
return feeAccountInterceptId;
}
public void setFeeAccountInterceptId(Long feeAccountInterceptId) {
this.feeAccountInterceptId = feeAccountInterceptId;
}
public String getCorpId() {
return corpId;
}
public void setCorpId(String corpId) {
this.corpId = corpId;
}
public String getWxEnterpriseId() {
return wxEnterpriseId;
}
public void setWxEnterpriseId(String wxEnterpriseId) {
this.wxEnterpriseId = wxEnterpriseId;
}
public String getWxUserId() {
return wxUserId;
}
public void setWxUserId(String wxUserId) {
this.wxUserId = wxUserId;
}
public String getStaffId() {
return staffId;
}
public void setStaffId(String staffId) {
this.staffId = staffId;
}
public Date getQwCreateTime() {
return qwCreateTime;
}
public void setQwCreateTime(Date qwCreateTime) {
this.qwCreateTime = qwCreateTime;
}
}
package com.gic.haoban.manage.service.service.fee;
import com.gic.haoban.manage.service.entity.fee.TabHaobanQywxFeeAccountInterceptLog;
/**
* 企业微信账号拦截日志(TabHaobanQywxFeeAccountInterceptLog)表服务接口
*
* @author mozhu
* @since 2022-08-10 10:27:49
*/
public interface HaobanQywxFeeAccountInterceptLogService {
/**
* 通过ID查询单条数据
*
* @param feeAccountId 主键
* @return 实例对象
*/
TabHaobanQywxFeeAccountInterceptLog queryById(Long feeAccountId);
/**
* 新增数据
*
* @param tabHaobanQywxFeeAccountInterceptLog 实例对象
* @return 实例对象
*/
TabHaobanQywxFeeAccountInterceptLog insert(TabHaobanQywxFeeAccountInterceptLog tabHaobanQywxFeeAccountInterceptLog);
/**
* 修改数据
*
* @param tabHaobanQywxFeeAccountInterceptLog 实例对象
* @return 实例对象
*/
TabHaobanQywxFeeAccountInterceptLog update(TabHaobanQywxFeeAccountInterceptLog tabHaobanQywxFeeAccountInterceptLog);
/**
* 通过主键删除数据
*
* @param feeAccountId 主键
* @return 是否成功
*/
boolean deleteById(Long feeAccountId);
}
package com.gic.haoban.manage.service.service.fee.impl;
import com.gic.haoban.manage.service.dao.mapper.fee.TabHaobanQywxFeeAccountInterceptLogMapper;
import com.gic.haoban.manage.service.entity.fee.TabHaobanQywxFeeAccountInterceptLog;
import com.gic.haoban.manage.service.service.fee.HaobanQywxFeeAccountInterceptLogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
/**
* 企业微信账号拦截日志(TabHaobanQywxFeeAccountInterceptLog)表服务实现类
*
* @author mozhu
* @since 2022-08-10 10:27:50
*/
@Service
public class HaobanQywxFeeAccountInterceptLogServiceImpl implements HaobanQywxFeeAccountInterceptLogService {
@Autowired
private TabHaobanQywxFeeAccountInterceptLogMapper tabHaobanQywxFeeAccountInterceptLogMapper;
/**
* 通过ID查询单条数据
*
* @param feeAccountId 主键
* @return 实例对象
*/
@Override
public TabHaobanQywxFeeAccountInterceptLog queryById(Long feeAccountId) {
return this.tabHaobanQywxFeeAccountInterceptLogMapper.queryById(feeAccountId);
}
/**
* 新增数据
*
* @param tabHaobanQywxFeeAccountInterceptLog 实例对象
* @return 实例对象
*/
@Override
public TabHaobanQywxFeeAccountInterceptLog insert(TabHaobanQywxFeeAccountInterceptLog tabHaobanQywxFeeAccountInterceptLog) {
this.tabHaobanQywxFeeAccountInterceptLogMapper.insert(tabHaobanQywxFeeAccountInterceptLog);
return tabHaobanQywxFeeAccountInterceptLog;
}
/**
* 修改数据
*
* @param tabHaobanQywxFeeAccountInterceptLog 实例对象
* @return 实例对象
*/
@Override
public TabHaobanQywxFeeAccountInterceptLog update(TabHaobanQywxFeeAccountInterceptLog tabHaobanQywxFeeAccountInterceptLog) {
this.tabHaobanQywxFeeAccountInterceptLogMapper.update(tabHaobanQywxFeeAccountInterceptLog);
return this.queryById(tabHaobanQywxFeeAccountInterceptLog.getFeeAccountInterceptId());
}
/**
* 通过主键删除数据
*
* @param feeAccountId 主键
* @return 是否成功
*/
@Override
public boolean deleteById(Long feeAccountId) {
return this.tabHaobanQywxFeeAccountInterceptLogMapper.deleteById(feeAccountId) > 0;
}
}
package com.gic.haoban.manage.service.service.out.impl.fee;
import cn.hutool.core.date.DateUtil;
import com.alibaba.fastjson.JSON;
import com.gic.api.base.commons.Page;
import com.gic.commons.util.EntityUtil;
import com.gic.commons.util.UniqueIdUtils;
import com.gic.haoban.common.utils.PageUtil;
import com.gic.haoban.manage.api.constants.Manage3Constants;
import com.gic.haoban.manage.api.dto.WxEnterpriseDTO;
import com.gic.haoban.manage.api.dto.fee.HaobanQywxFeeAccountInterceptLogDTO;
import com.gic.haoban.manage.api.dto.fee.HaobanQywxFeeDTO;
import com.gic.haoban.manage.api.dto.fee.HaobanQywxFeeDetailDTO;
import com.gic.haoban.manage.api.dto.qdto.QywxFeeListQDTO;
import com.gic.haoban.manage.api.service.fee.HaobanQywxFeeApiService;
import com.gic.haoban.manage.service.config.Config;
import com.gic.haoban.manage.service.entity.TabHaobanStaff;
import com.gic.haoban.manage.service.entity.fee.TabHaobanQywxFee;
import com.gic.haoban.manage.service.entity.fee.TabHaobanQywxFeeAccountStaff;
import com.gic.haoban.manage.service.entity.fee.TabHaobanQywxFeeOrder;
import com.gic.haoban.manage.service.entity.fee.TabHaobanQywxFeeOrderAccount;
import com.gic.haoban.manage.service.entity.fee.*;
import com.gic.haoban.manage.service.pojo.bo.fee.HaobanQywxFeeBO;
import com.gic.haoban.manage.service.service.StaffService;
import com.gic.haoban.manage.service.service.WxEnterpriseService;
import com.gic.haoban.manage.service.service.fee.HaobanQywxFeeAccountStaffService;
import com.gic.haoban.manage.service.service.fee.HaobanQywxFeeOrderAccountService;
import com.gic.haoban.manage.service.service.fee.HaobanQywxFeeOrderService;
import com.gic.haoban.manage.service.service.fee.HaobanQywxFeeService;
import com.gic.haoban.manage.service.service.fee.*;
import com.gic.wechat.api.dto.qywx.fee.*;
import com.gic.wechat.api.dto.qywx.fee.qdto.FeeOrderListQDTO;
import com.gic.wechat.api.service.qywx.QywxUserApiService;
......@@ -58,6 +55,8 @@ public class HaobanQywxFeeApiServiceImpl implements HaobanQywxFeeApiService {
private WxEnterpriseService wxEnterpriseService;
@Autowired
private StaffService staffService;
@Autowired
private HaobanQywxFeeAccountInterceptLogService haobanQywxFeeAccountInterceptLogService;
@Override
public void insert(String param) {
......@@ -248,4 +247,11 @@ public class HaobanQywxFeeApiServiceImpl implements HaobanQywxFeeApiService {
public List<HaobanQywxFeeDetailDTO> feeDetail(String wxEnterpriseId) {
return haobanQywxFeeAccountStaffService.feeDetail(wxEnterpriseId);
}
@Override
public void addInterceptLog(String param) {
HaobanQywxFeeAccountInterceptLogDTO haobanQywxFeeAccountInterceptLogDTO = JSON.toJavaObject(JSON.parseObject(param),HaobanQywxFeeAccountInterceptLogDTO.class);
haobanQywxFeeAccountInterceptLogDTO.setFeeAccountInterceptId(UniqueIdUtils.uniqueLong());
haobanQywxFeeAccountInterceptLogService.insert(EntityUtil.changeEntityNew(TabHaobanQywxFeeAccountInterceptLog.class,haobanQywxFeeAccountInterceptLogDTO));
}
}
<?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.gic.haoban.manage.service.dao.mapper.fee.TabHaobanQywxFeeAccountInterceptLogMapper">
<resultMap type="com.gic.haoban.manage.service.entity.fee.TabHaobanQywxFeeAccountInterceptLog"
id="TabHaobanQywxFeeAccountInterceptLogMap">
<result property="feeAccountInterceptId" column="fee_account_intercept_id" jdbcType="INTEGER"/>
<result property="corpId" column="corp_id" jdbcType="VARCHAR"/>
<result property="wxEnterpriseId" column="wx_enterprise_id" jdbcType="VARCHAR"/>
<result property="wxUserId" column="wx_user_id" jdbcType="VARCHAR"/>
<result property="staffId" column="staff_id" jdbcType="VARCHAR"/>
<result property="qwCreateTime" column="qw_create_time" jdbcType="TIMESTAMP"/>
</resultMap>
<sql id="Base_Column_List">
fee_account_intercept_id
, corp_id, wx_enterprise_id, wx_user_id, staff_id, qw_create_time
</sql>
<!--查询单个-->
<select id="queryById" resultMap="TabHaobanQywxFeeAccountInterceptLogMap">
select
<include refid="Base_Column_List"/>
from tab_haoban_qywx_fee_account_intercept_log
where fee_account_id = #{feeAccountId}
</select>
<!--查询指定行数据-->
<select id="queryAllByLimit" resultMap="TabHaobanQywxFeeAccountInterceptLogMap">
select
<include refid="Base_Column_List"/>
from tab_haoban_qywx_fee_account_intercept_log
<where>
<if test="feeAccountInterceptId != null">
and fee_account_intercept_id = #{feeAccountInterceptId}
</if>
<if test="corpId != null and corpId != ''">
and corp_id = #{corpId}
</if>
<if test="wxEnterpriseId != null and wxEnterpriseId != ''">
and wx_enterprise_id = #{wxEnterpriseId}
</if>
<if test="wxUserId != null and wxUserId != ''">
and wx_user_id = #{wxUserId}
</if>
<if test="staffId != null and staffId != ''">
and staff_id = #{staffId}
</if>
<if test="qwCreateTime != null">
and qw_create_time = #{qwCreateTime}
</if>
</where>
limit #{pageable.offset}, #{pageable.pageSize}
</select>
<!--新增所有列-->
<insert id="insert" keyProperty="feeAccountId" useGeneratedKeys="true">
insert into tab_haoban_qywx_fee_account_intercept_log(fee_account_intercept_id, corp_id, wx_enterprise_id, wx_user_id,
staff_id, qw_create_time)
values (#{feeAccountInterceptId}, #{corpId}, #{wxEnterpriseId}, #{wxUserId}, #{staffId}, #{qwCreateTime})
</insert>
<insert id="insertBatch" keyProperty="feeAccountId" useGeneratedKeys="true">
insert into tab_haoban_qywx_fee_account_intercept_log(fee_account_intercept_id, corp_id, wx_enterprise_id, wx_user_id,
staff_id, qw_create_time)
values
<foreach collection="entities" item="entity" separator=",">
(#{entity.feeAccountInterceptId}, #{entity.corpId}, #{entity.wxEnterpriseId}, #{entity.wxUserId}, #{entity.staffId},
#{entity.qwCreateTime})
</foreach>
</insert>
<!--通过主键修改数据-->
<update id="update">
update tab_haoban_qywx_fee_account_intercept_log
<set>
<if test="corpId != null and corpId != ''">
corp_id = #{corpId},
</if>
<if test="wxEnterpriseId != null and wxEnterpriseId != ''">
wx_enterprise_id = #{wxEnterpriseId},
</if>
<if test="wxUserId != null and wxUserId != ''">
wx_user_id = #{wxUserId},
</if>
<if test="staffId != null and staffId != ''">
staff_id = #{staffId},
</if>
<if test="qwCreateTime != null">
qw_create_time = #{qwCreateTime},
</if>
</set>
where fee_account_intercept_id = #{feeAccountInterceptId}
</update>
<!--通过主键删除-->
<delete id="deleteById">
delete
from tab_haoban_qywx_fee_account_intercept_log
where fee_account_id = #{feeAccountId}
</delete>
</mapper>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment