Ver código fonte

1.用户查询金额逻辑修改

wuhp 2 anos atrás
pai
commit
b127d8d941

+ 7 - 8
src/main/java/com/ydtech/modules/admin/service/impl/SysUserAccountServiceImpl.java

@@ -255,18 +255,18 @@ public class SysUserAccountServiceImpl extends ServiceImpl<SysUserAccountMapper,
         StringBuffer stringBuffer = new StringBuffer();
 
         willPromotion =   this.willPromotion(willPromotion,userId);  // 佣金
-        List<InsOrders> willList = insAreaCompanyService.getByUserId(userId);
+        List<InsFeeOrderNew> willList = insFeeOrderNewService.getByUserId(userId);
         if(!CollectionUtils.isEmpty(willList)){
-           for (InsOrders item : willList){
-               String quoteno = item.getQuoteno();
+           for (InsFeeOrderNew item : willList){
+               String quoteno = item.getInsOrderNo();
                stringBuffer.append(quoteno).append(",");
-               if(StringUtils.isNotEmpty(quoteno)){
-                  this.willAmount(quoteno,willHalding,willDocumentary,sysUserAccountVo);  // 推广 非跟单
+               if(ObjectUtils.isNotEmpty(item)){
+                  this.willAmount(item,willHalding,willDocumentary,sysUserAccountVo);  // 推广 非跟单
                }
            }
 
         }
-//        现中
+//        提现现中
         HashMap<String, Object> params = new HashMap<>();
         params.put("auditingStatus","2");  // 待审核
         params.put("userId",userId);
@@ -475,8 +475,7 @@ public class SysUserAccountServiceImpl extends ServiceImpl<SysUserAccountMapper,
         return null;
     }
 
-    private void willAmount(String quoteno, BigDecimal willHalding, BigDecimal willDocumentary,SysUserAccountVo sysUserAccountVo) {
-        InsFeeOrderNew insFeeOrderNew = insFeeOrderNewService.getInsFeeOrderNewByCompanyId(quoteno);
+    private void willAmount(InsFeeOrderNew insFeeOrderNew, BigDecimal willHalding, BigDecimal willDocumentary,SysUserAccountVo sysUserAccountVo) {
         if(ObjectUtils.isNotEmpty(insFeeOrderNew)){
             //交强手续费出口比例
             BigDecimal jqExportProceduresFee = insFeeOrderNew.getJqPremium().multiply(insFeeOrderNew.getJqSuperviseCostsProportion().divide(new BigDecimal(100))).setScale(2,BigDecimal.ROUND_DOWN);

+ 6 - 0
src/main/java/com/ydtech/modules/protocols/dao/InsFeeOrderNewMapper.java

@@ -3,6 +3,9 @@ package com.ydtech.modules.protocols.dao;
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import com.ydtech.modules.protocols.entity.po.InsFeeOrderNew;
 import com.ydtech.modules.protocols.entity.po.PtlAgreementProductCostsAttrLink;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
 
 
 /**
@@ -13,6 +16,9 @@ import com.ydtech.modules.protocols.entity.po.PtlAgreementProductCostsAttrLink;
 public interface InsFeeOrderNewMapper extends BaseMapper<InsFeeOrderNew> {
 
     InsFeeOrderNew getInsFeeOrderEntity(String id);
+
+    List<InsFeeOrderNew> getByUserId(@Param("userId") String userId);
+
 }
 
 

+ 3 - 0
src/main/java/com/ydtech/modules/protocols/service/InsFeeOrderNewService.java

@@ -18,4 +18,7 @@ public interface InsFeeOrderNewService extends IService<InsFeeOrderNew> {
     List<InsFeeOrderNew> getInsFeeOrderNewListByCompanyId(List<String> companyIds);
 
     InsFeeOrderNew getInsFeeOrderEntity(String id);
+
+    List<InsFeeOrderNew> getByUserId(String userId);
+
 }

+ 5 - 0
src/main/java/com/ydtech/modules/protocols/service/impl/InsFeeOrderNewServiceImpl.java

@@ -38,4 +38,9 @@ public class InsFeeOrderNewServiceImpl extends ServiceImpl<InsFeeOrderNewMapper,
     public InsFeeOrderNew getInsFeeOrderEntity(String id) {
         return baseMapper.getInsFeeOrderEntity(id);
     }
+
+    @Override
+    public List<InsFeeOrderNew> getByUserId(String userId) {
+        return baseMapper.getByUserId(userId);
+    }
 }

+ 9 - 0
src/main/resources/mapper/modules/ins/InsFeeOrderNewMapper.xml

@@ -184,6 +184,15 @@
                  AND     a.ins_order_no=#{id}
                 </if>
             </where>
+    </select>
+
+    <select id="getByUserId"  resultType="com.ydtech.modules.protocols.entity.po.InsFeeOrderNew">
+        select a.*  from     ins_fee_order_new a
+        <where>
+           <if test="userId !=null  and  userId !=''">
+                        a.user_id =#{userId}
+          </if>
+        </where>
 
     </select>