yexianchao 1 месяц назад
Родитель
Сommit
f959c5c58d

+ 1 - 1
crm-custom/src/main/java/com/crm/custom/controller/CustomController.java

@@ -229,7 +229,7 @@ public class CustomController extends BaseLoginController {
         } else {
             infoDto.setIbInfo(null);
         }
-        infoDto.setPosition(customInfoService.getPosition(entity.getId()));
+        //infoDto.setPosition(customInfoService.getPosition(entity.getId()));
         return BaseResultDto.success(infoDto);
     }
 

+ 4 - 1
crm-custom/src/main/java/com/crm/custom/controller/GoldenOrderController.java

@@ -9,6 +9,7 @@ import com.crm.rely.backend.model.dto.golden.order.GoldenOrderListDto;
 import com.crm.rely.backend.model.entity.custom.info.CustomInfoEntity;
 import com.crm.rely.backend.model.entity.golden.order.GoldenOrderAddEntity;
 import com.crm.rely.backend.model.entity.golden.order.GoldenOrderSearchEntity;
+import com.crm.rely.backend.util.DateUtil;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.validation.annotation.Validated;
 import org.springframework.web.bind.annotation.*;
@@ -27,7 +28,9 @@ public class GoldenOrderController {
         }else {
             entity.setCustomId(infoEntity.getId());
         }
-
+        if (entity.getEndDate() != null) {
+            entity.setEndDate(DateUtil.addDate(entity.getEndDate(), 1));
+        }
         return goldenOrderService.searchPageList(entity);
     }
 

+ 1 - 1
crm-custom/src/main/java/com/crm/custom/controller/GoldenRewardQuestionController.java

@@ -76,7 +76,7 @@ public class GoldenRewardQuestionController {
     }
 
     @Transactional(rollbackFor = Exception.class)
-    @Scheduled(cron = "0 36 17 * * ?")
+    @Scheduled(cron = "0 20 0 * * ?")
     public void rewardQuestionTask() throws Exception {
         try {
             log.info("有奖问答统计任务开始 ---------------");

+ 1 - 1
crm-custom/src/main/resources/application-test.yml

@@ -1,7 +1,7 @@
 spring:
   datasource:
     driver-class-name: com.mysql.jdbc.Driver
-    url: jdbc:mysql://localhost:28571/crm_golden?useUnicode=true&characterEncoding=utf8&serverTimezone=UTC&allowMultiQueries=true&useSSL=false
+    url: jdbc:mysql://localhost:3306/crm_golden?useUnicode=true&characterEncoding=utf8&serverTimezone=UTC&allowMultiQueries=true&useSSL=false
     username: root
     password: NSH01Y0GTmUNjgg6xw80qg==
   jpa:

+ 0 - 15
crm-manager/src/main/java/com/crm/manager/controller/CustomInfoController.java

@@ -221,22 +221,7 @@ public class CustomInfoController {
      */
     @PostMapping("/search/real")
     public BaseResultDto realList(@RequestBody CustomSearchEntity entity, UserInfoEntity infoEntity) throws Exception {
-        entity.setStatus(StatusConstants.PASSED_STATUS);
-        if (!PrefixEnum.PREFIX_SYSTEM.equals(infoEntity.getPrefix())) {
-            entity.setAgentId(infoEntity.getId());
-        }
-//        if (!PrefixEnum.PREFIX_SYSTEM.equals(infoEntity.getPrefix())) {
-//            entity.setStamp(infoEntity.getIbInfo().getStamp());
-//        }else {
-//            entity.setStamp(null);
-//        }
-        if (PrefixEnum.PREFIX_SALE.equals(infoEntity.getPrefix())) {
-            entity.setStamp(infoEntity.getStamp());
-        } else {
-            entity.setStamp(null);
-        }
 
-        validSortName(entity.getSortName());
         return customInfoService.getPageList(entity);
     }
 

+ 4 - 4
crm-manager/src/main/java/com/crm/manager/service/impl/CustomInfoServiceImpl.java

@@ -114,9 +114,9 @@ public class CustomInfoServiceImpl implements CustomInfoService {
             CustomListDto dto = new CustomListDto();
             BeanUtils.copyProperties(view, dto);
 
-            if (!Strings.isNullOrEmpty(entity.getStamp())) {
+            /*if (!Strings.isNullOrEmpty(entity.getStamp())) {
                 dto.setPhone(RexUtil.rexPhone(dto.getPhone()));
-            }
+            }*/
             dtos.add(dto);
         }
         return dtos;
@@ -394,9 +394,9 @@ public class CustomInfoServiceImpl implements CustomInfoService {
 
         CustomInfoDto infoDto = new CustomInfoDto();
         BeanUtils.copyProperties(customView, infoDto);
-        if (customView.getAddressLine() != null) {
+        /*if (customView.getAddressLine() != null) {
             infoDto.setAddressLines(Arrays.asList(customView.getAddressLine().split("@#")));
-        }
+        }*/
         /*
             获取文件信息
          */

+ 2 - 2
crm-manager/src/main/resources/application-test.yml

@@ -1,7 +1,7 @@
 spring:
   datasource:
     driver-class-name: com.mysql.jdbc.Driver
-    url: jdbc:mysql://localhost:28571/crm_golden?useUnicode=true&characterEncoding=utf8&serverTimezone=UTC&allowMultiQueries=true&useSSL=false
+    url: jdbc:mysql://localhost:3306/crm_golden?useUnicode=true&characterEncoding=utf8&serverTimezone=UTC&allowMultiQueries=true&useSSL=false
     username: root
     password: NSH01Y0GTmUNjgg6xw80qg==
   jpa:
@@ -24,7 +24,7 @@ login:
 web:
   upload-path: ../upload
   export-path: C:\server\cwg_crm\export
-  front-path: D:/server/golden/manager-service/front
+  front-path: /usr/local/golden_server/manager-service/front
 ribbon:
   ReadTimeout: 60000
   ConnectTimeout: 60000

+ 13 - 160
crm-manager/src/main/resources/mapper/CustomInfoDao.xml

@@ -7,127 +7,29 @@
     <select id="listCustom"
             parameterType="com.crm.rely.backend.model.entity.custom.info.CustomSearchEntity"
             resultType="com.crm.rely.backend.model.pojo.view.CustomView">
-        select custom.id,first_name,middle
-        middle,last_name,custom.email,custom.country,custom.country_name,custom.country_en_name,custom.identity,
-        custom.name_en,custom.head_picture,custom.phone,
-        custom.add_ip, custom.approve_time, custom.
-        last_time,custom.birth,custom.valid,custom.add_time,custom.last_ip,custom.`status`,ifnull(custom.apply_real_status,0)
-        apply_real_status,custom.apply_real_time,custom.approve_desc,custom.approve_time,custom.c_id,agent.ib_no as
-        agent_ib_no,sales.ib_no sales_ib_no,
-        custom.agent_id, custom.sno
+        select custom.*
         from custom_info custom
-        left join user_info agent on agent.id = custom.agent_id
-        left join user_info sales on sales.id = agent.sales_id
         <where>
-            <if test="stamp != null">
-                and agent.stamp like binary concat(#{stamp},'%')
-            </if>
-            <!--            <if test="(groupId!=null and groupId > 0)">-->
-            <!--                and agent.group_id = #{groupId}-->
-            <!--            </if>-->
-
-            <if test="email != null and email !=''">
-                and custom.email =#{email}
+            <if test="name != null and name !=''">
+                and custom.name line concat ('%',#{name},'%')
             </if>
             <if test="email != null and email !=''">
-                and custom.email =#{email}
-            </if>
-            <if test="agentIbNo != null and agentIbNo !=''">
-                and agent.ib_no like binary concat(#{agentIbNo},'%')
-            </if>
-            <if test="salesIbNo != null and salesIbNo !=''">
-                and sales.ib_no like binary concat(#{salesIbNo},'%')
-            </if>
-            <if test="lastIp != null and lastIp !=''">
-                and custom.last_ip like binary concat(#{lastIp},'%')
+                and custom.email line concat (#{email},'%')
             </if>
             <if test="identity != null and identity !=''">
-                and custom.identity =#{identity}
+                and custom.identity = #{identity}
             </if>
             <if test="cId != null">
                 and custom.c_id =#{cId}
             </if>
             <if test="startDate != null">
-                <if test="status!=null">
-                    and custom.add_time <![CDATA[>=]]>#{startDate}
-                </if>
-                <if test="status==null">
-                    and custom.approve_time <![CDATA[>=]]>#{startDate}
-                </if>
+                and custom.add_time <![CDATA[>=]]>#{startDate}
             </if>
             <if test="endDate != null">
-                <if test="status!=null">
-                    and custom.add_time <![CDATA[<=]]>#{endDate}
-                </if>
-                <if test="status==null">
-                    and custom.approve_time <![CDATA[<=]]>#{endDate}
-                </if>
+                and custom.add_time <![CDATA[<=]]>#{endDate}
             </if>
-            <if test="status!=null">
-                <if test="status==0">
-                    <if test="potentialStatus==null">
-                        and (custom.status in (1,3) and ( custom.apply_real_status in(0,3) or custom.apply_real_status
-                        is null))
-                    </if>
-                    <if test="potentialStatus!=null">
-                        <if test="potentialStatus==0">
-                            and (custom.apply_real_status =0 or custom.apply_real_status is null)
-                        </if>
-                        <if test="potentialStatus==1">
-                            and (custom.status = 3 or custom.apply_real_status=3)
-                        </if>
-                    </if>
-                </if>
-                <if test="status==1">
-                    and (custom.status =1 and custom.apply_real_status=1)
-                </if>
-                <if test="status==2">
-                    and (custom.status =2 )
-                </if>
-                <if test="status==3">
-                    and (custom.status = 3 or custom.apply_real_status=3)
-                </if>
-            </if>
-
         </where>
-        <if test="status!=null">
-            <if test="status==1">
-                order by
-                <if test="sortType!=null and sortName!=null and sortName !=''">
-                    <if test="sortType==1">
-                        custom.${sortName},
-                    </if>
-                    <if test="sortType==2">
-                        custom.${sortName} desc,
-                    </if>
-                </if>
-                custom.apply_real_time desc,custom.status asc
-            </if>
-            <if test="status!=1">
-                order by
-                <if test="sortType!=null and sortName!=null and sortName !=''">
-                    <if test="sortType==1">
-                        custom.${sortName},
-                    </if>
-                    <if test="sortType==2">
-                        custom.${sortName} desc,
-                    </if>
-                </if>
-                custom.add_time desc,custom.status asc
-            </if>
-        </if>
-        <if test="status==null">
-            order by
-            <if test="sortType!=null and sortName!=null and sortName !=''">
-                <if test="sortType==1">
-                    custom.${sortName},
-                </if>
-                <if test="sortType==2">
-                    custom.${sortName} desc,
-                </if>
-            </if>
-            custom.approve_time desc, custom.add_time desc,custom.status asc
-        </if>
+        order by custom.add_time desc
         <if test="page != null">
             limit #{page.offset},#{page.row}
         </if>
@@ -138,26 +40,12 @@
             resultType="Integer">
         select count(*)
         from custom_info custom
-        left join user_info agent on agent.id = custom.agent_id
-        left join user_info sales on sales.id = agent.sales_id
         <where>
-            <if test="stamp != null">
-                and agent.stamp like binary concat(#{stamp},'%')
+            <if test="name != null and name !=''">
+                and custom.name line concat ('%',#{name},'%')
             </if>
-            <!--            <if test="groupId != null and groupId > 0">-->
-            <!--                and agent.group_id = #{groupId}-->
-            <!--            </if>-->
             <if test="email != null and email !=''">
-                and custom.email =#{email}
-            </if>
-            <if test="agentIbNo != null and agentIbNo !=''">
-                and agent.ib_no like binary concat(#{agentIbNo},'%')
-            </if>
-            <if test="salesIbNo != null and salesIbNo !=''">
-                and sales.ib_no like binary concat(#{salesIbNo},'%')
-            </if>
-            <if test="lastIp != null and lastIp !=''">
-                and custom.last_ip like binary concat(#{lastIp},'%')
+                and custom.email line concat ('%',#{email},'%')
             </if>
             <if test="identity != null and identity !=''">
                 and custom.identity =#{identity}
@@ -166,45 +54,10 @@
                 and custom.c_id =#{cId}
             </if>
             <if test="startDate != null">
-                <if test="status!=null">
-                    and custom.add_time <![CDATA[>=]]>#{startDate}
-                </if>
-                <if test="status==null">
-                    and custom.approve_time <![CDATA[>=]]>#{startDate}
-                </if>
+                and custom.add_time <![CDATA[>=]]>#{startDate}
             </if>
             <if test="endDate != null">
-                <if test="status!=null">
-                    and custom.add_time <![CDATA[<=]]>#{endDate}
-                </if>
-                <if test="status==null">
-                    and custom.approve_time <![CDATA[<=]]>#{endDate}
-                </if>
-            </if>
-            <if test="status!=null">
-                <if test="status==0">
-                    <if test="potentialStatus==null">
-                        and (custom.status in (1,3) and ( custom.apply_real_status in(0,3) or custom.apply_real_status
-                        is null))
-                    </if>
-                    <if test="potentialStatus!=null">
-                        <if test="potentialStatus==0">
-                            and (custom.apply_real_status =0 or custom.apply_real_status is null)
-                        </if>
-                        <if test="potentialStatus==1">
-                            and (custom.status = 3 or custom.apply_real_status=3)
-                        </if>
-                    </if>
-                </if>
-                <if test="status==1">
-                    and (custom.status =1 and custom.apply_real_status=1)
-                </if>
-                <if test="status==2">
-                    and (custom.status =2 )
-                </if>
-                <if test="status==3">
-                    and (custom.status = 3 or custom.apply_real_status=3)
-                </if>
+                and custom.add_time <![CDATA[<=]]>#{endDate}
             </if>
 
         </where>

+ 2 - 0
crm-model/src/main/java/com/crm/rely/backend/model/dto/custom/InfoDto.java

@@ -19,6 +19,8 @@ public class InfoDto extends InfoEntity {
 
     private UserInfoDto ibInfo;
 
+    private String name;
+
     private String firstName;
 
     private String middle;

+ 4 - 25
crm-model/src/main/java/com/crm/rely/backend/model/dto/custom/potential/CustomListDto.java

@@ -2,6 +2,7 @@ package com.crm.rely.backend.model.dto.custom.potential;
 
 import lombok.Data;
 
+import java.math.BigDecimal;
 import java.util.Date;
 
 /**
@@ -12,43 +13,21 @@ public class CustomListDto {
 
     private Long id;
 
-    private String firstName;
-
-    private String middle;
-
-    private String lastName;
-
     private String email;
 
-    private String nameEn;
-    private String headPicture;
+    private String name;
 
     private Date addTime;
 
     private String addIp;
 
-    private String lastIp;
-
-    private Integer status;
-
-    private Integer applyRealStatus;
-
-    private Date applyRealTime;
-
-    private String approveDesc;
-    private Date approveTime;
-
     private Long cId;
 
     private Integer valid;
 
     private String phone;
-    private Long agentId;
-
-    private String agentIbNo;
-    private String salesIbNo;
-
-    private String sno;
 
     private String identity;
+
+    private BigDecimal totalSpendingAmount;
 }

+ 2 - 1
crm-model/src/main/java/com/crm/rely/backend/model/dto/golden/goods/GoldenCustomBalanceRecordListDto.java

@@ -17,5 +17,6 @@ public class GoldenCustomBalanceRecordListDto {
      */
     private Integer type;
 
-    private Date createTime;
+    private Date addTime;
+
 }

+ 2 - 0
crm-model/src/main/java/com/crm/rely/backend/model/entity/custom/info/CustomSearchEntity.java

@@ -13,6 +13,8 @@ public class CustomSearchEntity extends BaseDateAndPageSearchEntity {
 
     private Long cId;
 
+    private String name;
+
     private String email;
 
     private String stamp;

+ 5 - 89
crm-model/src/main/java/com/crm/rely/backend/model/pojo/view/CustomView.java

@@ -14,111 +14,27 @@ public class CustomView {
 
     private Long id;
 
-    private Long ibId;
-
     private String firstName;
 
     private String middle;
 
     private String lastName;
 
-    private String nameEn;
-
-    private String lang;
-    /**
-     * 邮箱(唯一)
-     */
     private String email;
 
-    /**
-     * 区号
-     */
-    private String areaCode;
-
-    /**
-     * 手机(唯一)
-     */
-    private String phone;
-
-    /**
-     * 性别 1:男 2:女
-     */
-    private Integer gender;
-
-    /**
-     * 出生日期
-     */
-    private Date birth;
-
-    /**
-     * 身份证件号 身份证 护照等
-     */
-    private String identity;
-
-    /**
-     * 国家
-     */
-    private String country;
-
-    /**
-     * 国家中文名称
-     */
-    private String countryName;
-
-    /**
-     * 国家英文名称
-     */
-    private String countryEnName;
-
-    private String state;
-
-    private String city;
-
-    private String zipCode;
-
-    /**
-     * 详细地址
-     */
-    private String addressLine;
-
-    private String taxNumber;
-
-    private Integer status;
-
-    private Integer applyRealStatus;
-
-    private Date applyRealTime;
-
-    private String approveDesc;
-
-    private Date approveTime;
-
-    /**
-     * 是否禁止登陆
-     */
-    private Integer valid;
+    private String name;
 
     private Date addTime;
 
-    private String headPicture;
-
-    private String agent;
-
-    private Date lastTime;
-
-    private String lastIp;
-
     private String addIp;
 
     private Long cId;
 
-    private BigDecimal usdAmount;
+    private Integer valid;
 
-    private BigDecimal cnyAmount;
+    private String phone;
 
-    private Long agentId;
+    private String identity;
 
-    private String agentIbNo;
-    private String salesIbNo;
-    private String sno;
+    private BigDecimal totalSpendingAmount;
 }

+ 6 - 4
crm-pay/src/main/java/com/crm/pay/service/impl/FinanceWithdrawServiceImpl.java

@@ -1352,10 +1352,12 @@ public class FinanceWithdrawServiceImpl implements FinanceWithdrawService {
                 || PayConstants.REJECTED_STATUS.equals(table.getSubmitStatus())
                 || PayConstants.REJECTED_STATUS.equals(table.getBackstageStatus())
                 || PayConstants.REJECTED_STATUS.equals(table.getInfoStatus())
-                || PayConstants.CANCEL_STATUS.equals(table.getBackstageStatus()))
-                && table.getOperationType() != null
-                && PayConstants.OPERATION_TYPE_AUTOMATIC == table.getOperationType()
-                && PayConstants.MANAGER_COMPLETED_STATUS.equals(table.getWithdrawStatus())) {
+                || PayConstants.CANCEL_STATUS.equals(table.getBackstageStatus())
+                ||PayConstants.REJECTED_STATUS.equals(table.getStatus()))
+                //&& table.getOperationType() != null
+                //&& PayConstants.OPERATION_TYPE_AUTOMATIC == table.getOperationType()
+                //&& PayConstants.MANAGER_COMPLETED_STATUS.equals(table.getWithdrawStatus())
+        ) {
 
             CustomInfoTable customInfoTable = customInfoRepository.findFirstById(table.getCustomId());
             if (customInfoTable == null) {

+ 1 - 1
crm-pay/src/main/resources/application-test.yml

@@ -1,7 +1,7 @@
 spring:
   datasource:
     driver-class-name: com.mysql.jdbc.Driver
-    url: jdbc:mysql://localhost:28571/crm_golden?useUnicode=true&characterEncoding=utf8&serverTimezone=UTC&allowMultiQueries=true&useSSL=false
+    url: jdbc:mysql://localhost:3306/crm_golden?useUnicode=true&characterEncoding=utf8&serverTimezone=UTC&allowMultiQueries=true&useSSL=false
     username: root
     password: NSH01Y0GTmUNjgg6xw80qg==
   jpa: