Merge #81 into master from cc_20260320_standard_expense_Type
feat:时间调整 * cc_20260320_standard_expense_Type: (40 commits squashed) - feat:费用类型新增 - feat:费用类型 - feat:默认数据 - feat:类型调整 - Merge branch 'master' into cc_20260320_standard_expense_Type - feat:逻辑调整 - Merge branch 'master' into cc_20260320_standard_expense_Type - feat:逻辑调整-标准店 - feat:逻辑调整-标准店 - feat:逻辑调整-标准店 - feat:逻辑调整-标准店 - feat:查询预分账调整 - feat:查询预分账调整 - feat:心愿单 校验调整 - feat:心愿单 校验调整 - feat:心愿单 金额校验调整 - feat:心愿单 金额校验调整 - feat:心愿单 金额校验调整 - feat:先推送账单 再推送 - feat:先推送账单 再推送 - feat:先推送账单 再推送 - feat:先推送账单 再推送 - feat:先推送账单 再推送 - feat:先推送账单 再推送 优化推送 当系统使用费为零的时候 推送数据重置的问题 - Merge branch 'master' into cc_20260320_standard_expense_Type - feat:接口新增字段 - feat:接口新增字段 - feat:接口新增字段 - feat:接口新增字段 - feat:接口新增字段 - feat:接口新增字段 - feat:数据调整 - feat:新增系统服务费 - feat:新增系统服务费 319 - feat:新增系统服务费 319 - feat:新增系统服务费 319 - feat:时间调整 - feat:时间调整 - feat:时间调整 - feat:时间调整 Signed-off-by: 正新 <accounts_6964c7bcd2a2c377c5bbd01b@mail.teambition.com> Merged-by: 正新 <accounts_6964c7bcd2a2c377c5bbd01b@mail.teambition.com> CR-link: https://codeup.aliyun.com/692ea314dec569489f6f167c/hangzhou/java/custom_zxjp/change/81
This commit is contained in:
@@ -40,7 +40,7 @@ public class ConfigOptionDAO {
|
||||
return configOptionMapper.deleteByExample(example) > 0;
|
||||
}
|
||||
|
||||
public List<ConfigOptionDO> query(String categoryCode, String itemCode, Integer active, String optionName) {
|
||||
public List<ConfigOptionDO> query(String categoryCode, String itemCode, Integer active, String optionName,String expenseTypeCode) {
|
||||
Example example = new Example(ConfigOptionDO.class);
|
||||
Example.Criteria criteria = example.createCriteria();
|
||||
if (Objects.nonNull(categoryCode)) {
|
||||
@@ -52,6 +52,9 @@ public class ConfigOptionDAO {
|
||||
if (Objects.nonNull(active)) {
|
||||
criteria.andEqualTo("active", active);
|
||||
}
|
||||
if (Objects.nonNull(expenseTypeCode)) {
|
||||
criteria.andEqualTo("expense_type_code", expenseTypeCode);
|
||||
}
|
||||
if (Objects.nonNull(optionName) && !optionName.trim().isEmpty()) {
|
||||
criteria.andLike("optionName", "%" + optionName.trim() + "%");
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.cool.store.dao.fees;
|
||||
|
||||
import com.cool.store.dto.fees.WalletAllocationDTO;
|
||||
import com.cool.store.entity.fees.WalletAllocationConfigDO;
|
||||
import com.cool.store.mapper.fees.WalletAllocationConfigMapper;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
@@ -62,6 +63,15 @@ public class WalletAllocationConfigDAO {
|
||||
return walletAllocationConfigMapper.selectByExample(example);
|
||||
}
|
||||
|
||||
|
||||
|
||||
public List<WalletAllocationDTO> selectByExpenseTypeList(Integer joinBrand, List<String> expenseTypeList) {
|
||||
if (joinBrand==null){
|
||||
return null;
|
||||
}
|
||||
return walletAllocationConfigMapper.getAllWalletAllocation(joinBrand,expenseTypeList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*/
|
||||
|
||||
@@ -41,6 +41,10 @@ public class PreAllocationRecordDAO {
|
||||
return preAllocationRecordMapper.deleteByShopId(shopId) > 0;
|
||||
}
|
||||
|
||||
public boolean updateByPayNoList(List<String> payNoList,Integer status) {
|
||||
return preAllocationRecordMapper.updateByPayNoList(payNoList,status)>0;
|
||||
}
|
||||
|
||||
public boolean insertBatch(List<PreAllocationRecordDO> list) {
|
||||
return preAllocationRecordMapper.insertBatch(list) > 0;
|
||||
}
|
||||
@@ -49,7 +53,21 @@ public class PreAllocationRecordDAO {
|
||||
return preAllocationRecordMapper.updateBatch(list) > 0;
|
||||
}
|
||||
|
||||
public boolean batchUpdateEditableFields(List<PreAllocationRecordDO> list) {
|
||||
if (list == null || list.isEmpty()) {
|
||||
return false;
|
||||
}
|
||||
return preAllocationRecordMapper.batchUpdateEditableFields(list) > 0;
|
||||
}
|
||||
|
||||
public boolean updateByOrderId(Long orderId) {
|
||||
return preAllocationRecordMapper.updateByOrderId(orderId) > 0;
|
||||
}
|
||||
|
||||
public boolean deleteByIdsNotPaid(List<Long> ids) {
|
||||
if (ids == null || ids.isEmpty()) {
|
||||
return false;
|
||||
}
|
||||
return preAllocationRecordMapper.deleteByIdsNotPaid(ids) > 0;
|
||||
}
|
||||
}
|
||||
@@ -23,6 +23,10 @@ public class StoreOrderDAO {
|
||||
return storeOrderMapper.getById(id);
|
||||
}
|
||||
|
||||
public Integer deleteById(StoreOrderDO storeOrderDO){
|
||||
return storeOrderMapper.delete(storeOrderDO);
|
||||
}
|
||||
|
||||
public List<StoreOrderDO> queryPage(Long shopId, Integer status) {
|
||||
return storeOrderMapper.queryPage(shopId, status);
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.cool.store.dao.order;
|
||||
|
||||
import com.cool.store.dto.fees.ExpenseTypeAmountDTO;
|
||||
import com.cool.store.entity.order.StoreOrderOptionSnapshotDO;
|
||||
import com.cool.store.mapper.order.StoreOrderOptionSnapshotMapper;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
@@ -7,8 +8,10 @@ import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@Repository
|
||||
@RequiredArgsConstructor
|
||||
@@ -51,4 +54,10 @@ public class StoreOrderOptionSnapshotDAO {
|
||||
mapper.batchUpdateQuantityAndAmount(list);
|
||||
}
|
||||
|
||||
public List<ExpenseTypeAmountDTO> getExpenseTypeAmountByOrderId(Long orderId) {
|
||||
if (orderId == null) {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
return mapper.getExpenseTypeAmountByOrderId(orderId);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -82,15 +82,21 @@ public class StoreWishlistDAO {
|
||||
return mapper.listByLineIdAndStoreTypeAndVersion(lineId, storeTypeId, versionNo);
|
||||
}
|
||||
|
||||
public List<MiniStoreWishlistListVO> listByLineId(Long lineId, Long storeTypeId) {
|
||||
public List<MiniStoreWishlistListVO> listByLineId(Long lineId, Long storeTypeId,Integer wishlistStatus) {
|
||||
if (lineId == null) {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
return mapper.listByLineId(lineId, storeTypeId);
|
||||
return mapper.listByLineId(lineId, storeTypeId,wishlistStatus);
|
||||
}
|
||||
|
||||
public List<MiniStoreWishlistListVO> listByVersionList(String keyword,Long storeTypeId,Integer wishlistStatus) {
|
||||
return mapper.listByVersionList(keyword,storeTypeId,wishlistStatus);
|
||||
}
|
||||
|
||||
public Boolean unbindPoint(Long id) {
|
||||
if (id == null) {
|
||||
return Boolean.FALSE;
|
||||
}
|
||||
return mapper.unbindPoint(id);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.cool.store.dao.store;
|
||||
|
||||
import com.cool.store.entity.AssessmentDataDO;
|
||||
import com.cool.store.entity.CloseStoreAuditRecordDO;
|
||||
import com.cool.store.entity.store.StoreTypeDO;
|
||||
import com.cool.store.entity.store.StoreTypeOptionDO;
|
||||
@@ -42,6 +43,12 @@ public class StoreTypeOptionDAO {
|
||||
return mapper.updateByExampleSelective(update,example);
|
||||
}
|
||||
|
||||
public List<StoreTypeOptionDO> selectByIds(List<Long> optionIds,Long storeTypeId){
|
||||
Example example = new Example(StoreTypeOptionDO.class);
|
||||
example.createCriteria().andIn("optionId", optionIds).andEqualTo("storeTypeId",storeTypeId);
|
||||
return mapper.selectByExample(example);
|
||||
}
|
||||
|
||||
public List<StoreTypeOptionDO> listByStoreTypeId(Long storeTypeId) {
|
||||
return mapper.select(StoreTypeOptionDO.builder().storeTypeId(storeTypeId).build());
|
||||
}
|
||||
|
||||
@@ -1,7 +1,16 @@
|
||||
package com.cool.store.mapper.fees;
|
||||
|
||||
import com.cool.store.dto.fees.WalletAllocationDTO;
|
||||
import com.cool.store.entity.fees.WalletAllocationConfigDO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import tk.mybatis.mapper.common.Mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface WalletAllocationConfigMapper extends Mapper<WalletAllocationConfigDO> {
|
||||
|
||||
List<WalletAllocationDTO> getAllWalletAllocation(@Param("joinBrand") Integer joinBrand,
|
||||
@Param("expenseTypeList") List<String> expenseTypeList);
|
||||
|
||||
|
||||
}
|
||||
@@ -24,5 +24,11 @@ public interface PreAllocationRecordMapper extends Mapper<PreAllocationRecordDO>
|
||||
|
||||
int updateBatch(@Param("list") List<PreAllocationRecordDO> list);
|
||||
|
||||
int batchUpdateEditableFields(@Param("list") List<PreAllocationRecordDO> list);
|
||||
|
||||
int updateByOrderId(Long orderId);
|
||||
|
||||
int deleteByIdsNotPaid(@Param("ids") List<Long> ids);
|
||||
|
||||
Integer updateByPayNoList(@Param("payNoList") List<String> payNoList, @Param("status") Integer status);
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.cool.store.mapper.order;
|
||||
|
||||
import com.cool.store.dto.fees.ExpenseTypeAmountDTO;
|
||||
import com.cool.store.entity.order.StoreOrderOptionSnapshotDO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import tk.mybatis.mapper.common.Mapper;
|
||||
@@ -15,4 +16,6 @@ public interface StoreOrderOptionSnapshotMapper extends Mapper<StoreOrderOptionS
|
||||
int deleteByOrderId(@Param("orderId") Long orderId);
|
||||
|
||||
void batchUpdateQuantityAndAmount(@Param("list") List<StoreOrderOptionSnapshotDO> list);
|
||||
|
||||
List<ExpenseTypeAmountDTO> getExpenseTypeAmountByOrderId(@Param("orderId") Long orderId);
|
||||
}
|
||||
|
||||
@@ -27,7 +27,8 @@ public interface StoreWishlistMapper extends Mapper<StoreWishlistDO> {
|
||||
@Param("versionNo") String versionNo);
|
||||
|
||||
List<MiniStoreWishlistListVO> listByLineId(@Param("lineId") Long lineId,
|
||||
@Param("storeTypeId") Long storeTypeId);
|
||||
@Param("storeTypeId") Long storeTypeId,
|
||||
@Param("wishlistStatus") Integer wishlistStatus);
|
||||
|
||||
|
||||
List<MiniStoreWishlistListVO> listByVersionList(@Param("keyword") String keyword,
|
||||
@@ -41,5 +42,11 @@ public interface StoreWishlistMapper extends Mapper<StoreWishlistDO> {
|
||||
*/
|
||||
Boolean updateByLineId(Long lineId) ;
|
||||
|
||||
/**
|
||||
* 心愿单解绑点位
|
||||
* @return
|
||||
*/
|
||||
Boolean unbindPoint(@Param("wishlistId") Long wishlistId);
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -11,6 +11,8 @@
|
||||
<result column="status" property="status" jdbcType="INTEGER"/>
|
||||
<result column="is_deleted" property="isDeleted" jdbcType="INTEGER"/>
|
||||
<result column="remark" property="remark" jdbcType="VARCHAR"/>
|
||||
<result column="expense_type_code" property="expenseTypeCode" jdbcType="VARCHAR"/>
|
||||
<result column="multiple_choice" property="multipleChoice" jdbcType="TINYINT"/>
|
||||
<result column="created_user_id" property="createdUserId" jdbcType="VARCHAR"/>
|
||||
<result column="created_time" property="createdTime" jdbcType="TIMESTAMP"/>
|
||||
<result column="updated_user_id" property="updatedUserId" jdbcType="VARCHAR"/>
|
||||
@@ -27,6 +29,8 @@
|
||||
<result column="sort_no" property="sortNo" jdbcType="INTEGER"/>
|
||||
<result column="status" property="status" jdbcType="INTEGER"/>
|
||||
<result column="remark" property="remark" jdbcType="VARCHAR"/>
|
||||
<result column="expense_type_code" property="expenseTypeCode" jdbcType="VARCHAR"/>
|
||||
<result column="multiple_choice" property="multipleChoice" jdbcType="TINYINT"/>
|
||||
<result column="created_user_id" property="createdUserId" jdbcType="VARCHAR"/>
|
||||
<result column="created_time" property="createdTime" jdbcType="TIMESTAMP"/>
|
||||
<result column="updated_user_id" property="updatedUserId" jdbcType="VARCHAR"/>
|
||||
@@ -43,6 +47,8 @@
|
||||
i.sort_no,
|
||||
i.status,
|
||||
i.remark,
|
||||
i.expense_type_code,
|
||||
i.multiple_choice,
|
||||
i.created_user_id,
|
||||
i.created_time,
|
||||
i.updated_user_id,
|
||||
|
||||
@@ -19,13 +19,14 @@
|
||||
<result column="option_remark" property="optionRemark" jdbcType="VARCHAR"/>
|
||||
<result column="create_time" property="createTime" jdbcType="TIMESTAMP"/>
|
||||
<result column="update_time" property="updateTime" jdbcType="TIMESTAMP"/>
|
||||
<result column="expense_type_code" property="expenseTypeCode" jdbcType="VARCHAR"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="Base_Column_List">
|
||||
id, category_code, item_code, option_code, option_name, option_description,
|
||||
option_price, original_option_price, image_url, video_url,
|
||||
is_active, sort_order, option_remark,
|
||||
create_time, update_time, option_unit
|
||||
create_time, update_time, option_unit,expense_type_code
|
||||
</sql>
|
||||
|
||||
<select id="listActiveByIds" resultMap="BaseResultMap">
|
||||
|
||||
@@ -12,4 +12,28 @@
|
||||
<result column="create_user_id" jdbcType="VARCHAR" property="createUserId" />
|
||||
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
||||
</resultMap>
|
||||
|
||||
<select id="getAllWalletAllocation" resultType="com.cool.store.dto.fees.WalletAllocationDTO">
|
||||
select
|
||||
a.join_brand as joinBrand,
|
||||
a.expense_type as expenseType,
|
||||
b.payee_code as payeeCode,
|
||||
b.payee_name as payeeName
|
||||
from zxjp_fees_wallet_allocation_config a
|
||||
left join zxjp_fees_wallet_allocation_company b
|
||||
on a.id = b.config_id
|
||||
<where>
|
||||
<if test="joinBrand!=null">
|
||||
and join_brand = #{joinBrand}
|
||||
</if>
|
||||
<if test="expenseTypeList!=null and expenseTypeList.size>0">
|
||||
and expense_type in (
|
||||
<foreach collection="expenseTypeList" item="item" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
)
|
||||
</if>
|
||||
</where>
|
||||
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -80,6 +80,19 @@
|
||||
</foreach>
|
||||
</update>
|
||||
|
||||
<update id="batchUpdateEditableFields">
|
||||
<foreach collection="list" item="i" separator=";">
|
||||
UPDATE zxjp_pre_allocation_record
|
||||
SET expense_type = #{i.expenseType},
|
||||
payee_name = #{i.payeeName},
|
||||
payee_code = #{i.payeeCode},
|
||||
pay_amount = #{i.payAmount},
|
||||
update_time = NOW()
|
||||
WHERE id = #{i.id}
|
||||
AND allocation_status != 1
|
||||
</foreach>
|
||||
</update>
|
||||
|
||||
<update id="updateByOrderId">
|
||||
<foreach collection="list" item="i" separator=";">
|
||||
UPDATE zxjp_pre_allocation_record
|
||||
@@ -90,6 +103,25 @@
|
||||
</foreach>
|
||||
</update>
|
||||
|
||||
<update id="updateByPayNoList">
|
||||
UPDATE zxjp_pre_allocation_record
|
||||
SET allocation_status = #{status},
|
||||
update_time = NOW()
|
||||
where pay_no in
|
||||
<foreach collection="payNoList" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</update>
|
||||
|
||||
<delete id="deleteByIdsNotPaid">
|
||||
DELETE FROM zxjp_pre_allocation_record
|
||||
WHERE allocation_status != 1
|
||||
AND id IN
|
||||
<foreach collection="ids" item="id" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
|
||||
|
||||
</mapper>
|
||||
|
||||
@@ -22,25 +22,26 @@
|
||||
<result column="amount" property="amount" jdbcType="DECIMAL"/>
|
||||
<result column="original_amount" property="originalAmount" jdbcType="DECIMAL"/>
|
||||
<result column="create_time" property="createTime" jdbcType="TIMESTAMP"/>
|
||||
<result column="expense_type_code" property="expenseTypeCode" jdbcType="VARCHAR"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="Base_Column_List">
|
||||
id, order_id, shop_id, store_type_id, option_id, category_code, item_code,
|
||||
option_code, option_name, option_price, original_option_price, option_remark, image_url, video_url,
|
||||
quantity, amount, original_amount, create_time, option_unit
|
||||
quantity, amount, original_amount, create_time, option_unit, expense_type_code
|
||||
</sql>
|
||||
|
||||
<insert id="insertBatch">
|
||||
INSERT INTO zxjp_store_order_option_snapshot
|
||||
(order_id, shop_id, store_type_id, option_id, category_code, item_code,
|
||||
option_code, option_name, option_price, original_option_price, option_remark, image_url, video_url,
|
||||
quantity, amount, original_amount, create_time, option_unit)
|
||||
quantity, amount, original_amount, create_time, option_unit,expense_type_code)
|
||||
VALUES
|
||||
<foreach collection="list" item="item" separator=",">
|
||||
(#{item.orderId}, #{item.shopId}, #{item.storeTypeId}, #{item.optionId},
|
||||
#{item.categoryCode}, #{item.itemCode}, #{item.optionCode}, #{item.optionName},
|
||||
#{item.optionPrice}, #{item.originalOptionPrice}, #{item.optionRemark}, #{item.imageUrl}, #{item.videoUrl},
|
||||
#{item.quantity}, #{item.amount}, #{item.originalAmount}, NOW(), #{item.optionUnit})
|
||||
#{item.quantity}, #{item.amount}, #{item.originalAmount}, NOW(), #{item.optionUnit}, #{item.expenseTypeCode})
|
||||
</foreach>
|
||||
</insert>
|
||||
|
||||
@@ -64,7 +65,8 @@
|
||||
a.amount,
|
||||
a.original_amount,
|
||||
a.create_time,
|
||||
a.option_unit
|
||||
a.option_unit,
|
||||
a.expense_type_code
|
||||
FROM zxjp_store_order_option_snapshot a left join
|
||||
zxjp_cfg_item_category b on a.category_code = b.category_code
|
||||
WHERE order_id = #{orderId}
|
||||
@@ -103,4 +105,16 @@
|
||||
</foreach>
|
||||
</update>
|
||||
|
||||
<select id="getExpenseTypeAmountByOrderId" resultType="com.cool.store.dto.fees.ExpenseTypeAmountDTO">
|
||||
select sum(a.amount) as totalAmount ,
|
||||
a.expense_type_code as expenseType
|
||||
from zxjp_store_order_option_snapshot a
|
||||
<where>
|
||||
<if test="orderId!=null">
|
||||
and a.order_id = #{orderId}
|
||||
</if>
|
||||
</where>
|
||||
group by a.expense_type_code
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
||||
@@ -85,6 +85,9 @@
|
||||
<if test="storeTypeId != null">
|
||||
AND w.store_type_id = #{storeTypeId}
|
||||
</if>
|
||||
<if test="wishlistStatus != null">
|
||||
AND w.wishlist_status = #{wishlistStatus}
|
||||
</if>
|
||||
ORDER BY w.create_time DESC
|
||||
</select>
|
||||
|
||||
@@ -129,6 +132,14 @@
|
||||
AND deleted = 0
|
||||
</update>
|
||||
|
||||
<update id="unbindPoint">
|
||||
UPDATE zxjp_store_wishlist
|
||||
SET wishlist_status = 5,
|
||||
point_id = null,
|
||||
update_time = NOW()
|
||||
WHERE id = #{wishlistId}
|
||||
</update>
|
||||
|
||||
|
||||
|
||||
</mapper>
|
||||
|
||||
Reference in New Issue
Block a user