Forráskód Böngészése

fix 有效子账号添加规格条件筛选

zoujiajian 3 éve
szülő
commit
d313b434f5

+ 2 - 2
netflix-dao/src/main/java/com/cyksj/mapper/AccountMapper.java

@@ -18,11 +18,11 @@ import java.util.List;
  */
 public interface AccountMapper extends BaseMapper<Account> {
 
-	IPage<ExpiredAccountDataView> getExpiredAccountView(@Param("isCorpWx") Boolean isCorpWx, @Param("customerService") String customerService, @Param("goodsId") Integer goodsId, @Param("account") String account, @Param("renewStatus") Boolean renewStatus, @Param("handleStatus") Boolean handleStatus, @Param("cnAccount") String cnAccount, @Param("usAccount") String usAccount, @Param("userId") Integer userId, @Param("startTime") String startTime, @Param("endTime") String endTime, @Param("now") String now, @Param("page") Page page);
+	IPage<ExpiredAccountDataView> getExpiredAccountView(@Param("isCorpWx") Boolean isCorpWx, @Param("customerService") String customerService, @Param("goodsId") Long goodsId, @Param("skuId") Long skuId, @Param("account") String account, @Param("renewStatus") Boolean renewStatus, @Param("handleStatus") Boolean handleStatus, @Param("cnAccount") String cnAccount, @Param("usAccount") String usAccount, @Param("userId") Integer userId, @Param("startTime") String startTime, @Param("endTime") String endTime, @Param("now") String now, @Param("page") Page page);
 
 	List<Account> getNoAppleOneAccount(String appleOne);
 
 	List<OrderDon> getNoAppleOneOrderDon(@Param("skuIds") List<Long> skuIds, @Param("yesZeroDate") Date yesZeroDate, @Param("thisZeroDate") Date thisZeroDate, @Param("noOrderStatus") List<String> noOrderStatus);
 
-	List<ExcelAccountData> getExpiredAccountViewNoPage(@Param("isCorpWx") Boolean isCorpWx, @Param("customerService") String customerService, @Param("goodsId") Integer goodsId, @Param("account") String account, @Param("renewStatus") Boolean renewStatus, @Param("handleStatus") Boolean handleStatus, @Param("cnAccount") String cnAccount, @Param("usAccount") String usAccount, @Param("userId") Integer userId, @Param("startTime") String startTime, @Param("endTime") String endTime, @Param("now") String now);
+	List<ExcelAccountData> getExpiredAccountViewNoPage(@Param("isCorpWx") Boolean isCorpWx, @Param("customerService") String customerService, @Param("goodsId") Long goodsId, @Param("skuId") Long skuId, @Param("account") String account, @Param("renewStatus") Boolean renewStatus, @Param("handleStatus") Boolean handleStatus, @Param("cnAccount") String cnAccount, @Param("usAccount") String usAccount, @Param("userId") Integer userId, @Param("startTime") String startTime, @Param("endTime") String endTime, @Param("now") String now);
 }

+ 6 - 0
netflix-dao/src/main/resources/mapper/AccountMapper.xml

@@ -42,6 +42,9 @@
             <if test="goodsId != null">
                 and a.goods_id = #{goodsId}
             </if>
+            <if test="skuId != null">
+                and gdk.id = #{skuId}
+            </if>
             <if test="account != null and account != ''">
                 and a.account like '%${account}%'
             </if>
@@ -132,6 +135,9 @@
             <if test="goodsId != null">
                 and a.goods_id = #{goodsId}
             </if>
+            <if test="skuId != null">
+                and gdk.id = #{skuId}
+            </if>
             <if test="account != null and account != ''">
                 and a.account like '%${account}%'
             </if>

+ 2 - 2
netflix-service/src/main/java/com/cyksj/service/mange/CmsAccountService.java

@@ -15,11 +15,11 @@ import java.util.List;
  * @date 2022/9/27 6:23 PM
  */
 public interface CmsAccountService extends IService<Account> {
-	IPage<ExpiredAccountDataView> getExpiredAccountView(Boolean isCorpWx, String customerService, Integer goodsId, String account, Boolean renewStatus, Boolean handleStatus, String cnAccount, String usAccount, Integer userId, String startTime, String endTime, String now, Long offset, Long limit);
+	IPage<ExpiredAccountDataView> getExpiredAccountView(Boolean isCorpWx, String customerService, Long goodsId, Long skuId, String account, Boolean renewStatus, Boolean handleStatus, String cnAccount, String usAccount, Integer userId, String startTime, String endTime, String now, Long offset, Long limit);
 
 	List<Account> getNoAppleOneAccount(String appleOne);
 
 	List<OrderDon> getNoAppleOneOrderDon(List<Long> skuIds, Date yesZeroDate, Date thisZeroDate, List<String> noOrderStatus);
 
-	List<ExcelAccountData> getExpiredAccountViewNoPage(Boolean isCorpWx, String customerService, Integer goodsId, String account, Boolean renewStatus, Boolean handleStatus, String cnAccount, String usAccount, Integer userId, String startDate, String endDate, String toString);
+	List<ExcelAccountData> getExpiredAccountViewNoPage(Boolean isCorpWx, String customerService, Long goodsId, Long skuId, String account, Boolean renewStatus, Boolean handleStatus, String cnAccount, String usAccount, Integer userId, String startDate, String endDate, String toString);
 }

+ 4 - 4
netflix-service/src/main/java/com/cyksj/service/mange/account/CmsAccountServiceImpl.java

@@ -27,13 +27,13 @@ public class CmsAccountServiceImpl extends ServiceImpl<AccountMapper, Account> i
 	private final AccountMapper accountMapper;
 
 	@Override
-	public IPage<ExpiredAccountDataView> getExpiredAccountView(Boolean isCorpWx, String customerService, Integer goodsId, String account, Boolean renewStatus, Boolean handleStatus, String cnAccount, String usAccount, Integer userId, String startTime, String endTime, String now, Long offset, Long limit) {
-		return accountMapper.getExpiredAccountView(isCorpWx, customerService, goodsId, account, renewStatus, handleStatus, cnAccount, usAccount, userId, startTime, endTime, now, new Page<>(offset, limit));
+	public IPage<ExpiredAccountDataView> getExpiredAccountView(Boolean isCorpWx, String customerService, Long goodsId, Long skuId, String account, Boolean renewStatus, Boolean handleStatus, String cnAccount, String usAccount, Integer userId, String startTime, String endTime, String now, Long offset, Long limit) {
+		return accountMapper.getExpiredAccountView(isCorpWx, customerService, goodsId, skuId, account, renewStatus, handleStatus, cnAccount, usAccount, userId, startTime, endTime, now, new Page<>(offset, limit));
 	}
 
 	@Override
-	public List<ExcelAccountData> getExpiredAccountViewNoPage(Boolean isCorpWx, String customerService, Integer goodsId, String account, Boolean renewStatus, Boolean handleStatus, String cnAccount, String usAccount, Integer userId, String startTime, String endTime, String now) {
-		return accountMapper.getExpiredAccountViewNoPage(isCorpWx, customerService, goodsId, account, renewStatus, handleStatus, cnAccount, usAccount, userId, startTime, endTime, now);
+	public List<ExcelAccountData> getExpiredAccountViewNoPage(Boolean isCorpWx, String customerService, Long goodsId, Long skuId, String account, Boolean renewStatus, Boolean handleStatus, String cnAccount, String usAccount, Integer userId, String startTime, String endTime, String now) {
+		return accountMapper.getExpiredAccountViewNoPage(isCorpWx, customerService, goodsId, skuId, account, renewStatus, handleStatus, cnAccount, usAccount, userId, startTime, endTime, now);
 	}
 
 	@Override

+ 4 - 4
netflix-service/src/main/java/com/cyksj/service/mange/statistics/StatisticsDataService.java

@@ -17,13 +17,13 @@ import java.util.List;
 public interface StatisticsDataService {
 	Result<BackgroundDataView> getStatisticsByCondition(Long startTime, Long endTime);
 
-	IPage<ExpiredAccountDataView> getExpiredAccountView(Boolean isCorpWx, String customerService, Integer goodsId, String account, Boolean renewStatus, Boolean handleStatus, String cnAccount, String usAccount, Integer uid, Long startTime, Long endTime, Long start, Long limit);
+	IPage<ExpiredAccountDataView> getExpiredAccountView(Boolean isCorpWx, String customerService, Long goodsId, Long skuId, String account, Boolean renewStatus, Boolean handleStatus, String cnAccount, String usAccount, Integer uid, Long startTime, Long endTime, Long start, Long limit);
 
-	Result<String> updateRenewStatus(Integer relationId);
+	Result<String> updateRenewStatus(Long relationId);
 
-	Result<String> updateHandleStatus(Integer relationId);
+	Result<String> updateHandleStatus(Long relationId);
 
-	List<ExcelAccountData> getExpiredAccountViewNoPage(Boolean isCorpWx, String customerService, Integer goodsId, String account, Boolean renewStatus, Boolean handleStatus, String cnAccount, String usAccount, Integer userId, Long startTime, Long endTime);
+	List<ExcelAccountData> getExpiredAccountViewNoPage(Boolean isCorpWx, String customerService, Long goodsId, Long skuId, String account, Boolean renewStatus, Boolean handleStatus, String cnAccount, String usAccount, Integer userId, Long startTime, Long endTime);
 
 	BackgroundDataView getTitleData();
 }

+ 6 - 6
netflix-service/src/main/java/com/cyksj/service/mange/statistics/impl/StatisticsDataServiceImpl.java

@@ -146,7 +146,7 @@ public class StatisticsDataServiceImpl implements StatisticsDataService {
 	}
 
 	@Override
-	public IPage<ExpiredAccountDataView> getExpiredAccountView(Boolean isCorpWx, String customerService, Integer goodsId, String account, Boolean renewStatus, Boolean handleStatus, String cnAccount, String usAccount, Integer userId, Long startTime, Long endTime, Long start, Long limit) {
+	public IPage<ExpiredAccountDataView> getExpiredAccountView(Boolean isCorpWx, String customerService, Long goodsId, Long skuId, String account, Boolean renewStatus, Boolean handleStatus, String cnAccount, String usAccount, Integer userId, Long startTime, Long endTime, Long start, Long limit) {
 		String startDate = null;
 		String endDate = null;
 		if (startTime != null) {
@@ -155,12 +155,12 @@ public class StatisticsDataServiceImpl implements StatisticsDataService {
 		if (endTime != null) {
 			endDate = DateTime.of(endTime).toString();
 		}
-		IPage<ExpiredAccountDataView> expiredAccountDataViews = accountService.getExpiredAccountView(isCorpWx, customerService, goodsId, account, renewStatus, handleStatus, cnAccount, usAccount, userId, startDate, endDate, DateTime.now().toString(), start, limit);
+		IPage<ExpiredAccountDataView> expiredAccountDataViews = accountService.getExpiredAccountView(isCorpWx, customerService, goodsId, skuId, account, renewStatus, handleStatus, cnAccount, usAccount, userId, startDate, endDate, DateTime.now().toString(), start, limit);
 		return expiredAccountDataViews;
 	}
 
 	@Override
-	public List<ExcelAccountData> getExpiredAccountViewNoPage(Boolean isCorpWx, String customerService, Integer goodsId, String account, Boolean renewStatus, Boolean handleStatus, String cnAccount, String usAccount, Integer userId, Long startTime, Long endTime) {
+	public List<ExcelAccountData> getExpiredAccountViewNoPage(Boolean isCorpWx, String customerService, Long goodsId, Long skuId, String account, Boolean renewStatus, Boolean handleStatus, String cnAccount, String usAccount, Integer userId, Long startTime, Long endTime) {
 		String startDate = null;
 		String endDate = null;
 		if (startTime != null) {
@@ -169,7 +169,7 @@ public class StatisticsDataServiceImpl implements StatisticsDataService {
 		if (endTime != null) {
 			endDate = DateTime.of(endTime).toString();
 		}
-		List<ExcelAccountData> expiredAccountDataViews = accountService.getExpiredAccountViewNoPage(isCorpWx, customerService, goodsId, account, renewStatus, handleStatus, cnAccount, usAccount, userId, startDate, endDate, DateTime.now().toString());
+		List<ExcelAccountData> expiredAccountDataViews = accountService.getExpiredAccountViewNoPage(isCorpWx, customerService, goodsId, skuId, account, renewStatus, handleStatus, cnAccount, usAccount, userId, startDate, endDate, DateTime.now().toString());
 		return expiredAccountDataViews;
 	}
 
@@ -209,7 +209,7 @@ public class StatisticsDataServiceImpl implements StatisticsDataService {
 	}
 
 	@Override
-	public Result<String> updateRenewStatus(Integer relationId) {
+	public Result<String> updateRenewStatus(Long relationId) {
 		GroupsRelation groupsRelation = groupsRelationMapper.selectById(relationId);
 		groupsRelation.setRenewStatus(!groupsRelation.getRenewStatus());
 		groupsRelationMapper.updateById(groupsRelation);
@@ -217,7 +217,7 @@ public class StatisticsDataServiceImpl implements StatisticsDataService {
 	}
 
 	@Override
-	public Result<String> updateHandleStatus(Integer relationId) {
+	public Result<String> updateHandleStatus(Long relationId) {
 		GroupsRelation groupsRelation = groupsRelationMapper.selectById(relationId);
 		groupsRelation.setIsHandle(!groupsRelation.getIsHandle());
 		groupsRelationMapper.updateById(groupsRelation);

+ 6 - 6
netflix-web/src/main/java/com/cyksj/web/controller/manage/statistics/StatisticsDataController.java

@@ -92,16 +92,16 @@ public class StatisticsDataController {
 	 * 有效子账号数列表
 	 */
 	@GetMapping("/expired/account")
-	public Result<IPage<ExpiredAccountDataView>> getExpiredAccountView(Boolean isCorpWx, String customerService, Integer goodsId, String account, Boolean renewStatus, Boolean handleStatus, String cnAccount, String usAccount, Integer userId, Long startTime, Long endTime, @RequestParam(required = false, defaultValue = "1") Long start, @RequestParam(required = false, defaultValue = "10") Long limit) {
-		return GatewayResponse.SUCCESS.newBuilder().toResult(statisticsDataService.getExpiredAccountView(isCorpWx, customerService, goodsId, account, renewStatus, handleStatus, cnAccount, usAccount, userId, startTime, endTime, start, limit));
+	public Result<IPage<ExpiredAccountDataView>> getExpiredAccountView(Boolean isCorpWx, String customerService, Long goodsId, Long skuId, String account, Boolean renewStatus, Boolean handleStatus, String cnAccount, String usAccount, Integer userId, Long startTime, Long endTime, @RequestParam(required = false, defaultValue = "1") Long start, @RequestParam(required = false, defaultValue = "10") Long limit) {
+		return GatewayResponse.SUCCESS.newBuilder().toResult(statisticsDataService.getExpiredAccountView(isCorpWx, customerService, goodsId, skuId, account, renewStatus, handleStatus, cnAccount, usAccount, userId, startTime, endTime, start, limit));
 	}
 
 	/**
 	 * 导出有效子账号数
 	 */
 	@GetMapping("/export/account")
-	public void exportAccount(Boolean isCorpWx, String customerService, Integer goodsId, String account, Boolean renewStatus, Boolean handleStatus, String cnAccount, String usAccount, Integer userId, Long startTime, Long endTime, HttpServletResponse response) {
-		List<ExcelAccountData> expiredAccountView = statisticsDataService.getExpiredAccountViewNoPage(isCorpWx, customerService, goodsId, account, renewStatus, handleStatus, cnAccount, usAccount, userId, startTime, endTime);
+	public void exportAccount(Boolean isCorpWx, String customerService, Long goodsId, Long skuId, String account, Boolean renewStatus, Boolean handleStatus, String cnAccount, String usAccount, Integer userId, Long startTime, Long endTime, HttpServletResponse response) {
+		List<ExcelAccountData> expiredAccountView = statisticsDataService.getExpiredAccountViewNoPage(isCorpWx, customerService, goodsId, skuId, account, renewStatus, handleStatus, cnAccount, usAccount, userId, startTime, endTime);
 		EasyExcelUtils.createExcelStreamMutilByEasyExcel(response, ExcelAccountData.class, expiredAccountView, "有效子账号", "有效子账号", ExcelTypeEnum.XLSX, null);
 	}
 
@@ -109,7 +109,7 @@ public class StatisticsDataController {
 	 * 到期状态续费意愿修改
 	 */
 	@PutMapping("/put/renewStatus/{relationId}")
-	public Result<String> updateRenewStatus(@PathVariable Integer relationId) {
+	public Result<String> updateRenewStatus(@PathVariable Long relationId) {
 		if (relationId == null || relationId < 1) {
 			throw BusinessRuntimeException.getInstance("用户关联组id不存在");
 		}
@@ -120,7 +120,7 @@ public class StatisticsDataController {
 	 * 处理状态修改
 	 */
 	@PutMapping("/put/handleStatus/{relationId}")
-	public Result<String> updateHandleStatus(@PathVariable Integer relationId) {
+	public Result<String> updateHandleStatus(@PathVariable Long relationId) {
 		if (relationId == null || relationId < 1) {
 			throw BusinessRuntimeException.getInstance("用户关联组id不存在");
 		}