pull/1121/head
parent
9a69e37bc4
commit
bd7013990b
|
|
@ -66,7 +66,7 @@ public class SysDictDataController extends BaseController {
|
|||
return R.ok(BeanUtil.toBean(dictDataService.selectById(dictDataId), DictDataResVO.class));
|
||||
}
|
||||
|
||||
@PreAuthorize("@ss.hasAnyRoles('admin,general_admin,store')")
|
||||
@PreAuthorize("@ss.hasAnyRoles('admin,general_admin,store,seller,agent')||@ss.hasSupplierSubRole()")
|
||||
@GetMapping(value = "/type/{dictType}")
|
||||
@ApiOperation(value = "根据字典类型查询字典数据信息", httpMethod = "GET", response = R.class)
|
||||
public R<List<DictDataResVO>> dictType(@PathVariable String dictType) {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
package com.ruoyi.web.controller.xkt;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import cn.hutool.json.JSONUtil;
|
||||
import com.github.pagehelper.Page;
|
||||
|
|
@ -9,7 +10,6 @@ import com.ruoyi.common.core.domain.R;
|
|||
import com.ruoyi.common.core.page.PageVO;
|
||||
import com.ruoyi.common.utils.SecurityUtils;
|
||||
import com.ruoyi.framework.notice.fs.FsNotice;
|
||||
import com.ruoyi.web.controller.xkt.vo.BasePageVO;
|
||||
import com.ruoyi.web.controller.xkt.vo.PhoneNumberVO;
|
||||
import com.ruoyi.web.controller.xkt.vo.account.*;
|
||||
import com.ruoyi.xkt.dto.account.*;
|
||||
|
|
@ -139,9 +139,16 @@ public class AssetController extends XktBaseController {
|
|||
@PreAuthorize("@ss.hasAnyRoles('store')||@ss.hasSupplierSubRole()")
|
||||
@ApiOperation(value = "档口交易明细")
|
||||
@PostMapping("store/trans-detail/page")
|
||||
public R<PageVO<TransDetailStorePageItemVO>> pageStoreTransDetail(@Validated @RequestBody BasePageVO vo) {
|
||||
public R<PageVO<TransDetailStorePageItemVO>> pageStoreTransDetail(@Validated @RequestBody TransDetailPageQueryVO vo) {
|
||||
TransDetailStoreQueryDTO queryDTO = BeanUtil.toBean(vo, TransDetailStoreQueryDTO.class);
|
||||
queryDTO.setStoreId(SecurityUtils.getStoreId());
|
||||
//日期转时间
|
||||
if (queryDTO.getTransTimeBegin() != null) {
|
||||
queryDTO.setTransTimeBegin(DateUtil.beginOfDay(queryDTO.getTransTimeBegin()));
|
||||
}
|
||||
if (queryDTO.getTransTimeEnd() != null) {
|
||||
queryDTO.setTransTimeEnd(DateUtil.endOfDay(queryDTO.getTransTimeEnd()));
|
||||
}
|
||||
Page<TransDetailStorePageItemDTO> pageDTO = assetService.pageStoreTransDetail(queryDTO);
|
||||
return success(PageVO.of(pageDTO, TransDetailStorePageItemVO.class));
|
||||
}
|
||||
|
|
@ -149,9 +156,16 @@ public class AssetController extends XktBaseController {
|
|||
@PreAuthorize("@ss.hasAnyRoles('seller,agent')")
|
||||
@ApiOperation(value = "卖家交易明细")
|
||||
@PostMapping("user/trans-detail/page")
|
||||
public R<PageVO<TransDetailUserPageItemVO>> pageUserTransDetail(@Validated @RequestBody BasePageVO vo) {
|
||||
public R<PageVO<TransDetailUserPageItemVO>> pageUserTransDetail(@Validated @RequestBody TransDetailPageQueryVO vo) {
|
||||
TransDetailUserQueryDTO queryDTO = BeanUtil.toBean(vo, TransDetailUserQueryDTO.class);
|
||||
queryDTO.setUserId(SecurityUtils.getUserId());
|
||||
//日期转时间
|
||||
if (queryDTO.getTransTimeBegin() != null) {
|
||||
queryDTO.setTransTimeBegin(DateUtil.beginOfDay(queryDTO.getTransTimeBegin()));
|
||||
}
|
||||
if (queryDTO.getTransTimeEnd() != null) {
|
||||
queryDTO.setTransTimeEnd(DateUtil.endOfDay(queryDTO.getTransTimeEnd()));
|
||||
}
|
||||
Page<TransDetailUserPageItemDTO> pageDTO = assetService.pageUserTransDetail(queryDTO);
|
||||
return success(PageVO.of(pageDTO, TransDetailUserPageItemVO.class));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -174,6 +174,8 @@ public class StoreOrderController extends XktBaseController {
|
|||
@ResponseHeader
|
||||
public R<PageVO<StoreOrderPageItemVO>> page(@Validated @RequestBody StoreOrderPageQueryVO vo) {
|
||||
StoreOrderQueryDTO queryDTO = BeanUtil.toBean(vo, StoreOrderQueryDTO.class);
|
||||
//日期转时间
|
||||
date2Time(queryDTO);
|
||||
if (1 == vo.getSrcPage()) {
|
||||
queryDTO.setOrderUserId(SecurityUtils.getUserId());
|
||||
} else {
|
||||
|
|
@ -195,6 +197,8 @@ public class StoreOrderController extends XktBaseController {
|
|||
@ResponseHeader
|
||||
public void export(@Validated @RequestBody StoreOrderQueryVO vo, HttpServletResponse response) {
|
||||
StoreOrderQueryDTO queryDTO = BeanUtil.toBean(vo, StoreOrderQueryDTO.class);
|
||||
//日期转时间
|
||||
date2Time(queryDTO);
|
||||
Long storeId = SecurityUtils.getStoreId();
|
||||
queryDTO.setStoreId(storeId);
|
||||
String storeName = storeService.getStoreNameByIds(Collections.singletonList(storeId)).get(storeId);
|
||||
|
|
@ -213,6 +217,8 @@ public class StoreOrderController extends XktBaseController {
|
|||
@ResponseHeader
|
||||
public void exportPendingShipment(@Validated @RequestBody StoreOrderQueryVO vo, HttpServletResponse response) {
|
||||
StoreOrderQueryDTO queryDTO = BeanUtil.toBean(vo, StoreOrderQueryDTO.class);
|
||||
//日期转时间
|
||||
date2Time(queryDTO);
|
||||
Long storeId = SecurityUtils.getStoreId();
|
||||
queryDTO.setStoreId(storeId);
|
||||
queryDTO.setOrderStatus(EOrderStatus.PENDING_SHIPMENT.getValue());
|
||||
|
|
@ -473,4 +479,19 @@ public class StoreOrderController extends XktBaseController {
|
|||
}
|
||||
throw new ServiceException("未知支付渠道");
|
||||
}
|
||||
|
||||
private void date2Time(StoreOrderQueryDTO queryDTO) {
|
||||
if (queryDTO.getOrderTimeBegin() != null) {
|
||||
queryDTO.setOrderTimeBegin(DateUtil.beginOfDay(queryDTO.getOrderTimeBegin()));
|
||||
}
|
||||
if (queryDTO.getOrderTimeEnd() != null) {
|
||||
queryDTO.setOrderTimeEnd(DateUtil.endOfDay(queryDTO.getOrderTimeEnd()));
|
||||
}
|
||||
if (queryDTO.getPayTimeBegin() != null) {
|
||||
queryDTO.setPayTimeBegin(DateUtil.beginOfDay(queryDTO.getPayTimeBegin()));
|
||||
}
|
||||
if (queryDTO.getPayTimeEnd() != null) {
|
||||
queryDTO.setPayTimeEnd(DateUtil.endOfDay(queryDTO.getPayTimeEnd()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,46 @@
|
|||
package com.ruoyi.web.controller.xkt.vo.account;
|
||||
|
||||
import com.ruoyi.web.controller.xkt.vo.BasePageVO;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.ToString;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @author liangyq
|
||||
* @date 2025-04-28 18:59
|
||||
*/
|
||||
@ApiModel
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
public class TransDetailPageQueryVO extends BasePageVO {
|
||||
/**
|
||||
* 交易开始时间
|
||||
*/
|
||||
@ApiModelProperty(value = "交易开始时间")
|
||||
private Date transTimeBegin;
|
||||
/**
|
||||
* 交易结束时间
|
||||
*/
|
||||
@ApiModelProperty(value = "交易结束时间")
|
||||
private Date transTimeEnd;
|
||||
/**
|
||||
* 订单号
|
||||
*/
|
||||
@ApiModelProperty(value = "订单号")
|
||||
private String orderNo;
|
||||
/**
|
||||
* 交易类型: 档口[2:档口代发订单 3:提现 5:充值 6:推广费 7:推广费退款 8:会员费 9:会员费退款] 卖家[1:下单 4:退款]
|
||||
*/
|
||||
@ApiModelProperty(value = "交易类型: 档口[2:档口代发订单 3:提现 5:充值 6:推广费 7:推广费退款 8:会员费 9:会员费退款] 卖家[1:下单 4:退款]")
|
||||
private Integer transType;
|
||||
/**
|
||||
* 支付方式[1:支付宝 3:余额]
|
||||
*/
|
||||
@ApiModelProperty(value = "支付方式[1:支付宝 3:余额]")
|
||||
private Integer payType;
|
||||
}
|
||||
|
|
@ -0,0 +1,41 @@
|
|||
package com.ruoyi.xkt.dto.account;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @author liangyq
|
||||
* @date 2025-08-17
|
||||
*/
|
||||
@Data
|
||||
public class TransDetailQueryDTO {
|
||||
/**
|
||||
* 账户ID: 查询档口明细
|
||||
*/
|
||||
private Long internalAccountId;
|
||||
/**
|
||||
* 用户ID: 查询卖家明细
|
||||
*/
|
||||
private Long userId;
|
||||
/**
|
||||
* 交易开始时间
|
||||
*/
|
||||
private Date transTimeBegin;
|
||||
/**
|
||||
* 交易结束时间
|
||||
*/
|
||||
private Date transTimeEnd;
|
||||
/**
|
||||
* 订单号
|
||||
*/
|
||||
private String orderNo;
|
||||
/**
|
||||
* 交易类型: 档口[2:档口代发订单 3:提现 5:充值 6:推广费 7:推广费退款 8:会员费 9:会员费退款] 卖家[1:下单 4:退款]
|
||||
*/
|
||||
private Integer transType;
|
||||
/**
|
||||
* 支付方式[1:支付宝 3:余额]
|
||||
*/
|
||||
private Integer payType;
|
||||
}
|
||||
|
|
@ -5,6 +5,8 @@ import lombok.Data;
|
|||
import lombok.EqualsAndHashCode;
|
||||
import lombok.ToString;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @author liangyq
|
||||
* @date 2025-04-28 18:59
|
||||
|
|
@ -17,4 +19,24 @@ public class TransDetailStoreQueryDTO extends BasePageDTO {
|
|||
* 档口ID
|
||||
*/
|
||||
private Long storeId;
|
||||
/**
|
||||
* 交易开始时间
|
||||
*/
|
||||
private Date transTimeBegin;
|
||||
/**
|
||||
* 交易结束时间
|
||||
*/
|
||||
private Date transTimeEnd;
|
||||
/**
|
||||
* 订单号
|
||||
*/
|
||||
private String orderNo;
|
||||
/**
|
||||
* 交易类型: 档口[2:档口代发订单 3:提现 5:充值 6:推广费 7:推广费退款 8:会员费 9:会员费退款] 卖家[1:下单 4:退款]
|
||||
*/
|
||||
private Integer transType;
|
||||
/**
|
||||
* 支付方式[1:支付宝 3:余额]
|
||||
*/
|
||||
private Integer payType;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,6 +5,8 @@ import lombok.Data;
|
|||
import lombok.EqualsAndHashCode;
|
||||
import lombok.ToString;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @author liangyq
|
||||
* @date 2025-04-28 18:59
|
||||
|
|
@ -17,4 +19,24 @@ public class TransDetailUserQueryDTO extends BasePageDTO {
|
|||
* 用户ID
|
||||
*/
|
||||
private Long userId;
|
||||
/**
|
||||
* 交易开始时间
|
||||
*/
|
||||
private Date transTimeBegin;
|
||||
/**
|
||||
* 交易结束时间
|
||||
*/
|
||||
private Date transTimeEnd;
|
||||
/**
|
||||
* 订单号
|
||||
*/
|
||||
private String orderNo;
|
||||
/**
|
||||
* 交易类型: 档口[2:档口代发订单 3:提现 5:充值 6:推广费 7:推广费退款 8:会员费 9:会员费退款] 卖家[1:下单 4:退款]
|
||||
*/
|
||||
private Integer transType;
|
||||
/**
|
||||
* 支付方式[1:支付宝 3:余额]
|
||||
*/
|
||||
private Integer payType;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ package com.ruoyi.xkt.mapper;
|
|||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.ruoyi.xkt.domain.InternalAccount;
|
||||
import com.ruoyi.xkt.dto.account.TransDetailQueryDTO;
|
||||
import com.ruoyi.xkt.dto.account.TransDetailStorePageItemDTO;
|
||||
import com.ruoyi.xkt.dto.account.TransDetailUserPageItemDTO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
|
@ -35,16 +36,16 @@ public interface InternalAccountMapper extends BaseMapper<InternalAccount> {
|
|||
/**
|
||||
* 档口交易明细
|
||||
*
|
||||
* @param id
|
||||
* @param queryDTO
|
||||
* @return
|
||||
*/
|
||||
List<TransDetailStorePageItemDTO> listStoreTransDetailPageItem(@Param("id")Long id);
|
||||
List<TransDetailStorePageItemDTO> listStoreTransDetailPageItem(TransDetailQueryDTO queryDTO);
|
||||
|
||||
/**
|
||||
* 卖家交易明细
|
||||
*
|
||||
* @param userId
|
||||
* @param queryDTO
|
||||
* @return
|
||||
*/
|
||||
List<TransDetailUserPageItemDTO> listUserTransDetailPageItem(@Param("userId")Long userId);
|
||||
List<TransDetailUserPageItemDTO> listUserTransDetailPageItem(TransDetailQueryDTO queryDTO);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ package com.ruoyi.xkt.service;
|
|||
|
||||
import com.ruoyi.xkt.domain.InternalAccount;
|
||||
import com.ruoyi.xkt.dto.account.InternalAccountAddDTO;
|
||||
import com.ruoyi.xkt.dto.account.TransDetailQueryDTO;
|
||||
import com.ruoyi.xkt.dto.account.TransDetailStorePageItemDTO;
|
||||
import com.ruoyi.xkt.dto.account.TransDetailUserPageItemDTO;
|
||||
import com.ruoyi.xkt.dto.finance.TransInfo;
|
||||
|
|
@ -84,16 +85,16 @@ public interface IInternalAccountService {
|
|||
/**
|
||||
* 档口交易明细
|
||||
*
|
||||
* @param internalAccountId
|
||||
* @param queryDTO
|
||||
* @return
|
||||
*/
|
||||
List<TransDetailStorePageItemDTO> listStoreTransDetailPageItem(Long internalAccountId);
|
||||
List<TransDetailStorePageItemDTO> listStoreTransDetailPageItem(TransDetailQueryDTO queryDTO);
|
||||
|
||||
/**
|
||||
* 卖家交易明细
|
||||
*
|
||||
* @param userId
|
||||
* @param queryDTO
|
||||
* @return
|
||||
*/
|
||||
List<TransDetailUserPageItemDTO> listUserTransDetailPageItem(Long userId);
|
||||
List<TransDetailUserPageItemDTO> listUserTransDetailPageItem(TransDetailQueryDTO queryDTO);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -217,7 +217,9 @@ public class AssetServiceImpl implements IAssetService {
|
|||
EAccountOwnerType.STORE);
|
||||
Assert.notNull(internalAccount);
|
||||
Page<TransDetailStorePageItemDTO> page = PageHelper.startPage(queryDTO.getPageNum(), queryDTO.getPageSize());
|
||||
internalAccountService.listStoreTransDetailPageItem(internalAccount.getId());
|
||||
TransDetailQueryDTO tdq = BeanUtil.toBean(queryDTO,TransDetailQueryDTO.class);
|
||||
tdq.setInternalAccountId(internalAccount.getId());
|
||||
internalAccountService.listStoreTransDetailPageItem(tdq);
|
||||
return page;
|
||||
}
|
||||
|
||||
|
|
@ -225,7 +227,9 @@ public class AssetServiceImpl implements IAssetService {
|
|||
public Page<TransDetailUserPageItemDTO> pageUserTransDetail(TransDetailUserQueryDTO queryDTO) {
|
||||
Assert.notNull(queryDTO.getUserId());
|
||||
Page<TransDetailUserPageItemDTO> page = PageHelper.startPage(queryDTO.getPageNum(), queryDTO.getPageSize());
|
||||
internalAccountService.listUserTransDetailPageItem(queryDTO.getUserId());
|
||||
TransDetailQueryDTO tdq = BeanUtil.toBean(queryDTO,TransDetailQueryDTO.class);
|
||||
tdq.setUserId(queryDTO.getUserId());
|
||||
internalAccountService.listUserTransDetailPageItem(tdq);
|
||||
return page;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@ import com.ruoyi.common.utils.bean.BeanValidators;
|
|||
import com.ruoyi.xkt.domain.InternalAccount;
|
||||
import com.ruoyi.xkt.domain.InternalAccountTransDetail;
|
||||
import com.ruoyi.xkt.dto.account.InternalAccountAddDTO;
|
||||
import com.ruoyi.xkt.dto.account.TransDetailQueryDTO;
|
||||
import com.ruoyi.xkt.dto.account.TransDetailStorePageItemDTO;
|
||||
import com.ruoyi.xkt.dto.account.TransDetailUserPageItemDTO;
|
||||
import com.ruoyi.xkt.dto.finance.TransInfo;
|
||||
|
|
@ -249,13 +250,13 @@ public class InternalAccountServiceImpl implements IInternalAccountService {
|
|||
}
|
||||
|
||||
@Override
|
||||
public List<TransDetailStorePageItemDTO> listStoreTransDetailPageItem(Long internalAccountId) {
|
||||
return internalAccountMapper.listStoreTransDetailPageItem(internalAccountId);
|
||||
public List<TransDetailStorePageItemDTO> listStoreTransDetailPageItem(TransDetailQueryDTO queryDTO) {
|
||||
return internalAccountMapper.listStoreTransDetailPageItem(queryDTO);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<TransDetailUserPageItemDTO> listUserTransDetailPageItem(Long userId) {
|
||||
return internalAccountMapper.listUserTransDetailPageItem(userId);
|
||||
public List<TransDetailUserPageItemDTO> listUserTransDetailPageItem(TransDetailQueryDTO queryDTO) {
|
||||
return internalAccountMapper.listUserTransDetailPageItem(queryDTO);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -14,7 +14,8 @@
|
|||
<foreach collection="ids" item="id" separator="," open="(" close=")">#{id}</foreach> FOR UPDATE
|
||||
</select>
|
||||
|
||||
<select id="listStoreTransDetailPageItem" resultType="com.ruoyi.xkt.dto.account.TransDetailStorePageItemDTO">
|
||||
<select id="listStoreTransDetailPageItem" parameterType="com.ruoyi.xkt.dto.account.TransDetailQueryDTO"
|
||||
resultType="com.ruoyi.xkt.dto.account.TransDetailStorePageItemDTO">
|
||||
SELECT
|
||||
so.order_no,
|
||||
iatd.trans_time,
|
||||
|
|
@ -42,12 +43,30 @@
|
|||
LEFT JOIN finance_bill fb ON iatd.src_bill_id = fb.id
|
||||
LEFT JOIN store_order so ON fb.rel_id = so.id AND fb.rel_type = 1
|
||||
WHERE
|
||||
iatd.internal_account_id = #{id}
|
||||
iatd.internal_account_id = #{internalAccountId}
|
||||
AND fb.bill_status = 3
|
||||
AND iatd.del_flag = '0'
|
||||
<if test="transTimeBegin != null and transTimeEnd != null">
|
||||
AND iatd.trans_time BETWEEN #{transTimeBegin} AND #{transTimeEnd}
|
||||
</if>
|
||||
<if test="orderNo != null and orderNo !=''">
|
||||
AND so.order_no LIKE CONCAT('%', #{orderNo}, '%')
|
||||
</if>
|
||||
<if test="transType != null">
|
||||
AND fb.src_type = #{transType}
|
||||
</if>
|
||||
<if test="payType != null">
|
||||
<if test="payType == 3">
|
||||
AND fb.bill_type = 3
|
||||
</if>
|
||||
<if test="payType == 1">
|
||||
AND fb.bill_type != 3
|
||||
</if>
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="listUserTransDetailPageItem" resultType="com.ruoyi.xkt.dto.account.TransDetailUserPageItemDTO">
|
||||
<select id="listUserTransDetailPageItem" parameterType="com.ruoyi.xkt.dto.account.TransDetailQueryDTO"
|
||||
resultType="com.ruoyi.xkt.dto.account.TransDetailUserPageItemDTO">
|
||||
SELECT
|
||||
so.order_no,
|
||||
fb.create_time trans_time,
|
||||
|
|
@ -64,6 +83,20 @@
|
|||
so.order_user_id = #{userId}
|
||||
AND fb.bill_status = 3
|
||||
AND so.del_flag = '0'
|
||||
<if test="transTimeBegin != null and transTimeEnd != null">
|
||||
AND fb.create_time BETWEEN #{transTimeBegin} AND #{transTimeEnd}
|
||||
</if>
|
||||
<if test="orderNo != null and orderNo !=''">
|
||||
AND so.order_no LIKE CONCAT('%', #{orderNo}, '%')
|
||||
</if>
|
||||
<if test="transType != null">
|
||||
AND fb.src_type = #{transType}
|
||||
</if>
|
||||
<if test="payType != null">
|
||||
<if test="payType == 3">
|
||||
AND false
|
||||
</if>
|
||||
</if>
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
Loading…
Reference in New Issue