2 Commits
5ba97c2089
...
67106e4511
Author | SHA1 | Message | Date |
---|---|---|---|
|
67106e4511 |
10-08-收款查询,收款撤回
|
2 days ago |
|
cd74e4910f |
9-28 新增收款
|
2 weeks ago |
13 changed files with 365 additions and 10 deletions
-
16pom.xml
-
1src/main/java/com/example/demo/DemoApplication.java
-
3src/main/java/com/example/demo/config/FlowableDataSourceConfig.java
-
2src/main/java/com/example/demo/config/Mysql1DataSourceConfig.java
-
50src/main/java/com/example/demo/controller/cash/CashCollectionController.java
-
4src/main/java/com/example/demo/controller/coin/RefundController.java
-
16src/main/java/com/example/demo/domain/vo/cash/CashCollection.java
-
2src/main/java/com/example/demo/domain/vo/coin/Page.java
-
37src/main/java/com/example/demo/mapper/cash/CashCollectionMapper.java
-
10src/main/java/com/example/demo/service/cash/CashCollectionService.java
-
115src/main/java/com/example/demo/serviceImpl/cash/CashCollectionServiceImpl.java
-
2src/main/resources/application.yml
-
115src/main/resources/cashMapper/CashCollectionMapper.xml
@ -0,0 +1,37 @@ |
|||||
|
package com.example.demo.mapper.cash; |
||||
|
|
||||
|
import com.example.demo.domain.entity.CashRecord; |
||||
|
import com.example.demo.domain.vo.cash.CashCollection; |
||||
|
import org.apache.ibatis.annotations.Mapper; |
||||
|
import org.apache.ibatis.annotations.Param; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* @program: gold-java |
||||
|
* @ClassName CashCollectionMapper |
||||
|
* @description: |
||||
|
* @author: Ethan |
||||
|
* @create: 2025−09-26 17:17 |
||||
|
* @Version 1.0 |
||||
|
**/ |
||||
|
@Mapper |
||||
|
public interface CashCollectionMapper { |
||||
|
|
||||
|
//根据jwcode获取所属地区 |
||||
|
String getMarketByJwcode(@Param("jwcode") Integer jwcode); |
||||
|
//新增收款订单 |
||||
|
void add(CashRecord cashRecord); |
||||
|
//根据订单号获取订单id,状态 |
||||
|
CashRecord selectByOrderCode(@Param("orderCode") String orderCode); |
||||
|
//更新订单状态 |
||||
|
int updateStatus(@Param("orderCode") String orderCode, |
||||
|
@Param("status") Integer status); |
||||
|
//编辑订单 |
||||
|
// 编辑订单(状态=5)后重新提交 |
||||
|
int updateByOrderCode(@Param("cashRecord") CashRecord cashRecord); |
||||
|
//多条件查询收款订单列表 |
||||
|
List<CashCollection> selectCollection1(@Param("pageNum") Integer pageNum, |
||||
|
@Param("pageSize") Integer pageSize, |
||||
|
@Param("cashCollection") CashCollection cashCollection); |
||||
|
} |
@ -0,0 +1,115 @@ |
|||||
|
<?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.example.demo.mapper.cash.CashCollectionMapper"> |
||||
|
|
||||
|
|
||||
|
<insert id="add" parameterType="com.example.demo.domain.entity.CashRecord" |
||||
|
useGeneratedKeys="true" keyProperty="id"> |
||||
|
insert into |
||||
|
cash_record(order_type,jwcode,name,market,activity, |
||||
|
order_code,goods_name,good_num, |
||||
|
payment_currency,payment_amount,received_market, |
||||
|
pay_type,pay_time,status,submitter_id, |
||||
|
voucher,remark) |
||||
|
values(#{orderType},#{jwcode},#{name},#{market},#{activity}, |
||||
|
#{orderCode},#{goodsName},#{goodNum},#{paymentCurrency}, |
||||
|
#{paymentAmount},#{receivedMarket},#{payType},#{payTime}, |
||||
|
#{status},#{submitterId},#{voucher},#{remark}) |
||||
|
</insert> |
||||
|
<!--更新订单状态--> |
||||
|
<update id="updateStatus"> |
||||
|
update cash_record |
||||
|
set status=#{status} |
||||
|
where order_code=#{orderCode} |
||||
|
</update> |
||||
|
<!--更新订单--> |
||||
|
<update id="updateByOrderCode"> |
||||
|
UPDATE cash_record |
||||
|
<set> |
||||
|
jwcode = #{cashRecord.jwcode}, |
||||
|
name = #{cashRecord.name}, |
||||
|
market = #{cashRecord.market}, |
||||
|
activity = #{cashRecord.activity}, |
||||
|
goods_name = #{cashRecord.goodsName}, |
||||
|
good_num = #{cashRecord.goodNum}, |
||||
|
payment_currency = #{cashRecord.paymentCurrency}, |
||||
|
payment_amount = #{cashRecord.paymentAmount}, |
||||
|
received_market = #{cashRecord.receivedMarket}, |
||||
|
pay_type = #{cashRecord.payType}, |
||||
|
pay_time = #{cashRecord.payTime}, |
||||
|
voucher = #{cashRecord.voucher}, |
||||
|
remark = #{cashRecord.remark}, |
||||
|
status = 0, |
||||
|
</set> |
||||
|
WHERE order_code = #{cashRecord.orderCode} |
||||
|
AND status = 5 |
||||
|
</update> |
||||
|
<!--根据jwcode获取所属地区--> |
||||
|
<select id="getMarketByJwcode" resultType="java.lang.String"> |
||||
|
select market from user where jwcode=#{jwcode} |
||||
|
</select> |
||||
|
<!--根据订单号获取订单id与状态--> |
||||
|
<select id="selectByOrderCode" resultType="com.example.demo.domain.entity.CashRecord"> |
||||
|
select id ,status |
||||
|
from cash_record |
||||
|
where order_code=#{orderCode} |
||||
|
</select> |
||||
|
<!--多条件查询收款订单列表--> |
||||
|
<select id="selectCollection1" resultType="com.example.demo.domain.vo.cash.CashCollection"> |
||||
|
select cr.id,cr.jwcode,cr.name,cr.market,cr.activity,cr.order_code,cr.bank_code, |
||||
|
cr.goods_name,cr.good_num,cr.payment_currency,cr.payment_amount, |
||||
|
cr.received_currency,cr.received_amount,cr.handling_charge, |
||||
|
cr.received_market,cr.pay_type,cr.pay_time,cr.received_time, |
||||
|
cr.status,cr.submitter_id,cr.voucher,cr.remark,cr.reject_reason, |
||||
|
cr.create_time,cr.update_time, |
||||
|
a.admin_name as submitterName |
||||
|
|
||||
|
|
||||
|
from cash_record cr |
||||
|
left join admin a on cr.submitter_id = a.account |
||||
|
<where> |
||||
|
1 = 1 |
||||
|
/*判断market 是否不为总部且 markets 不为空*/ |
||||
|
<if test="cashCollection.markets != null and cashCollection.markets.size() > 0"> |
||||
|
AND ( |
||||
|
<foreach collection="cashCollection.markets" item="market" open="" close="" separator=" OR "> |
||||
|
cr.market = #{market} |
||||
|
</foreach> |
||||
|
) |
||||
|
</if> |
||||
|
<if test="cashCollection.market != null and cashCollection.market != ''"> |
||||
|
AND cr.market = #{cashCollection.market} |
||||
|
</if> |
||||
|
<if test="cashCollection.jwcode != null and cashCollection.jwcode!=''"> |
||||
|
AND cr.jwcode = #{cashCollection.jwcode} |
||||
|
</if> |
||||
|
<if test="cashCollection.name!=null and cashCollection.name !=''"> |
||||
|
AND cr.name like concat('%',#{cashCollection.name},'%') |
||||
|
</if> |
||||
|
<if test="cashCollection.activity!=null and cashCollection.activity!=''"> |
||||
|
AND cr.activity like concat('%',#{cashCollection.activity},'%') |
||||
|
</if> |
||||
|
<if test="cashCollection.goodsName!=null and cashCollection.goodsName!=''"> |
||||
|
AND cr.goods_name like concat('%',#{cashCollection.goodsName},'%') |
||||
|
</if> |
||||
|
<if test="cashCollection.payType!=null and cashCollection.payType!=''"> |
||||
|
AND cr.pay_type = #{cashCollection.payType} |
||||
|
</if> |
||||
|
<if test="cashCollection.status!=null and cashCollection.status!=''"> |
||||
|
AND cr.status = #{cashCollection.status} |
||||
|
</if> |
||||
|
<if test="cashCollection.startTime!=null and cashCollection.endTime!=null"> |
||||
|
AND cr.pay_time between #{cashCollection.startTime} and #{cashCollection.endTime} |
||||
|
</if> |
||||
|
and cr.order_type=1 |
||||
|
</where> |
||||
|
<choose> |
||||
|
<when test="cashCollection.sortField != null and cashCollection.sortField.length > 0 or cashCollection.sortOrder != null and cashCollection.sortOrder.length > 0"> |
||||
|
ORDER BY ${cashCollection.sortField} ${cashCollection.sortOrder} |
||||
|
</when> |
||||
|
<otherwise> |
||||
|
ORDER BY update_time DESC |
||||
|
</otherwise> |
||||
|
</choose> |
||||
|
</select> |
||||
|
</mapper> |
Write
Preview
Loading…
Cancel
Save
Reference in new issue