| | |
| | | import org.springframework.web.multipart.MultipartHttpServletRequest; |
| | | import org.yeshi.utils.JsonUtil; |
| | | |
| | | import com.google.gson.Gson; |
| | | import com.yeshi.fanli.controller.admin.utils.AdminUtils; |
| | | import com.yeshi.fanli.dto.ChartTDO; |
| | | import com.yeshi.fanli.dto.common.CategoryInfoDTO; |
| | | import com.yeshi.fanli.entity.bus.user.HongBaoV2; |
| | | import com.yeshi.fanli.entity.goods.CommonGoods; |
| | |
| | | import com.yeshi.fanli.util.taobao.TaoBaoOrderUtil; |
| | | import com.yeshi.fanli.vo.order.CommonOrderVO; |
| | | |
| | | import net.sf.json.JSONArray; |
| | | import net.sf.json.JSONObject; |
| | | |
| | | @Controller |
| | |
| | | data.put("selfNumEnd", selfNumEnd); |
| | | data.put("shareNumEnd", shareNumEnd); |
| | | data.put("selfNum", selfNum); |
| | | data.put("description", shareNum); |
| | | data.put("shareNum", shareNum); |
| | | JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult(data)); |
| | | } |
| | | |
| | |
| | | import com.yeshi.fanli.entity.bus.user.UserExtraTaoBaoInfo;
|
| | | import com.yeshi.fanli.entity.bus.user.UserInfo;
|
| | | import com.yeshi.fanli.entity.bus.user.UserInfoExtra;
|
| | | import com.yeshi.fanli.entity.bus.user.UserInviteValidNum;
|
| | | import com.yeshi.fanli.entity.bus.user.UserRank;
|
| | | import com.yeshi.fanli.entity.bus.user.vip.UserVIPInfo;
|
| | | import com.yeshi.fanli.entity.common.AdminUser;
|
| | |
| | | import com.yeshi.fanli.service.inter.user.UserRankService;
|
| | | import com.yeshi.fanli.service.inter.user.integral.IntegralDetailService;
|
| | | import com.yeshi.fanli.service.inter.user.invite.ThreeSaleSerivce;
|
| | | import com.yeshi.fanli.service.inter.user.invite.UserInviteValidNumService;
|
| | | import com.yeshi.fanli.service.inter.user.tb.UserExtraTaoBaoInfoService;
|
| | | import com.yeshi.fanli.service.inter.user.vip.UserVIPInfoService;
|
| | | import com.yeshi.fanli.tag.PageEntity;
|
| | |
| | | @Resource
|
| | | private IntegralDetailService integralDetailService;
|
| | |
|
| | |
|
| | | @Resource
|
| | | private UserInviteValidNumService userInviteValidNumService;
|
| | |
|
| | | /**
|
| | | * 查询用户信息列表 正常用户/异常用户
|
| | |
| | | continue;
|
| | | }
|
| | |
|
| | | |
| | | UserInfo user = userInfoService.selectByPKey(userInfo.getId());
|
| | | if (user != null) {
|
| | | detail.setUserInfo(user);
|
| | |
| | | }
|
| | |
|
| | | long count = userMoneyDetailService.countQuery(key, keyType);
|
| | |
|
| | | int totalPage = (int) (count % pageSize == 0 ? count / pageSize : count / pageSize + 1);
|
| | | PageEntity pe = new PageEntity(pageIndex, pageSize, count, totalPage);
|
| | |
|
| | |
|
| | | GsonBuilder gsonBuilder = new GsonBuilder().setDateFormat("yyyy-MM-dd HH:mm:ss");
|
| | | gsonBuilder.registerTypeAdapter(UserMoneyDetailTypeEnum.class, new JsonSerializer<UserMoneyDetailTypeEnum>() {
|
| | |
| | | }
|
| | | });
|
| | | Gson gson = gsonBuilder.create();
|
| | | |
| | |
|
| | | JSONObject data = new JSONObject();
|
| | | data.put("pe", pe);
|
| | |
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("查询失败"));
|
| | | }
|
| | | }
|
| | | |
| | | |
| | | |
| | | /**
|
| | | * 用户粉丝统计
|
| | | * |
| | | * @param callback
|
| | | * @param pageIndex
|
| | | * @param pageSize
|
| | | * @param id
|
| | | * @param out
|
| | | */
|
| | | @RequestMapping(value = "countTeamFans")
|
| | | public void countTeamFans(String callback, Long uid, PrintWriter out) {
|
| | | int doneFirst = 0;
|
| | | int doneSecond = 0;
|
| | | UserInviteValidNum userInviteValidNum = userInviteValidNumService.selectByPrimaryKey(uid);
|
| | | if (userInviteValidNum != null) {
|
| | | doneFirst = userInviteValidNum.getNumFirst() == null ? 0 : userInviteValidNum.getNumFirst();
|
| | | doneSecond = userInviteValidNum.getNumSecond() == null ? 0 : userInviteValidNum.getNumSecond();
|
| | | }
|
| | | JSONObject data = new JSONObject();
|
| | | data.put("doneFirst", doneFirst); |
| | | data.put("doneSecond", doneSecond); |
| | | JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult(data));
|
| | | }
|
| | |
|
| | | |
| | | }
|
| | |
| | | minDay = TimeUtil.parseYYYYMMDD(DateUtil.getFirstDayOfMonth(date));
|
| | | maxDay = TimeUtil.parseYYYYMMDD_HHMMSS(DateUtil.getLastDayOfMonth(date) + " 23:59:59");
|
| | | }
|
| | | List<TeamDividentsVO> list = teamDividentsSourceOrderUserMapService.listByDateAndTargetUid((page-1) * pageSize, pageSize, uid, minDay, maxDay);
|
| | | List<TeamDividentsVO> list = teamDividentsSourceOrderUserMapService.listByDateAndTargetUid((page-1) * pageSize, pageSize, uid, minDay, maxDay, key);
|
| | | if (list == null) {
|
| | | list = new ArrayList<>();
|
| | | }
|
| | | long count = teamDividentsSourceOrderUserMapService.countByDateAndTargetUid(uid, minDay, maxDay);
|
| | | long count = teamDividentsSourceOrderUserMapService.countByDateAndTargetUid(uid, minDay, maxDay, key);
|
| | |
|
| | | GsonBuilder builder = new GsonBuilder();
|
| | | builder.registerTypeAdapter(BigDecimal.class, new JsonSerializer<BigDecimal>() {
|
| | |
| | | JSONObject object = new JSONObject();
|
| | |
|
| | | if (page == 1) {
|
| | | TeamDividentsVO teamDividentsVO = teamDividentsSourceOrderUserMapService.sumByDateAndTargetUid(uid, minDay, maxDay);
|
| | | TeamDividentsVO teamDividentsVO = teamDividentsSourceOrderUserMapService.sumByDateAndTargetUid(uid, minDay, maxDay, key);
|
| | | if (teamDividentsVO == null) {
|
| | | teamDividentsVO = new TeamDividentsVO();
|
| | | teamDividentsVO.setSubsidy(BigDecimal.ZERO);
|
| | |
| | | * @return |
| | | */ |
| | | List<TeamDividentsVO> listByDateAndTargetUid(@Param("start") long start, @Param("count") int count, |
| | | @Param("targetUid") Long targetUid, @Param("minTime") Date minTime, @Param("maxTime") Date maxTime); |
| | | @Param("targetUid") Long targetUid, @Param("minTime") Date minTime, |
| | | @Param("maxTime") Date maxTime, @Param("key")String key); |
| | | |
| | | |
| | | Long countByDateAndTargetUid(@Param("targetUid") Long targetUid, @Param("minTime") Date minTime, @Param("maxTime") Date maxTime); |
| | | Long countByDateAndTargetUid(@Param("targetUid") Long targetUid, @Param("minTime") Date minTime, |
| | | @Param("maxTime") Date maxTime, @Param("key")String key); |
| | | |
| | | |
| | | TeamDividentsVO sumByDateAndTargetUid(@Param("targetUid") Long targetUid, @Param("minTime") Date minTime, @Param("maxTime") Date maxTime); |
| | | TeamDividentsVO sumByDateAndTargetUid(@Param("targetUid") Long targetUid, @Param("minTime") Date minTime, |
| | | @Param("maxTime") Date maxTime , @Param("key")String key); |
| | | |
| | | |
| | | } |
| | |
| | | LEFT JOIN yeshi_ec_team_dividents_source_order t ON d.`sou_source_order_id` = t.`tdo_id` |
| | | WHERE d.`sou_target_uid` = #{targetUid} AND t.`tdo_create_time` >= #{minTime} |
| | | AND t.`tdo_create_time` <![CDATA[<=]]>#{maxTime} |
| | | <if test = "key != null and key != ''"> |
| | | AND (t.`tdo_order_no` = #{key} OR d.`sou_source_uid` = #{key}) |
| | | </if> |
| | | GROUP BY t.`tdo_order_no`,t.`tdo_source_type` |
| | | ORDER BY t.`tdo_create_time` DESC |
| | | LIMIT #{start},#{count} |
| | |
| | | SELECT COUNT(A.sou_id) FROM (SELECT d.`sou_id` FROM yeshi_ec_team_dividents_source_order_user d |
| | | LEFT JOIN yeshi_ec_team_dividents_source_order t ON d.`sou_source_order_id` = t.`tdo_id` |
| | | WHERE d.`sou_target_uid` = #{targetUid} AND t.`tdo_create_time` >= #{minTime} |
| | | AND t.`tdo_create_time` <![CDATA[<=]]>#{maxTime} |
| | | AND t.`tdo_create_time` <![CDATA[<=]]>#{maxTime} |
| | | <if test = "key != null and key != ''"> |
| | | AND (t.`tdo_order_no` = #{key} OR d.`sou_source_uid` = #{key}) |
| | | </if> |
| | | GROUP BY t.`tdo_order_no`,t.`tdo_source_type`)A |
| | | </select> |
| | | |
| | |
| | | LEFT JOIN yeshi_ec_team_dividents_source_order t ON d.`sou_source_order_id` = t.`tdo_id` |
| | | WHERE d.`sou_target_uid` = #{targetUid} AND t.`tdo_create_time` >= #{minTime} |
| | | AND t.`tdo_create_time` <![CDATA[<=]]>#{maxTime} |
| | | <if test = "key != null and key != ''"> |
| | | AND (t.`tdo_order_no` = #{key} OR d.`sou_source_uid` = #{key}) |
| | | </if> |
| | | </select> |
| | | </mapper> |
| | |
| | | }
|
| | |
|
| | | @Override
|
| | | public List<TeamDividentsVO> listByDateAndTargetUid(long start, int count, Long targetUid,Date minTime,Date maxTime) {
|
| | | return teamDividentsSourceOrderUserMapMapper.listByDateAndTargetUid(start, count, targetUid, minTime, maxTime);
|
| | | public List<TeamDividentsVO> listByDateAndTargetUid(long start, int count, Long targetUid,Date minTime,Date maxTime, String key) {
|
| | | return teamDividentsSourceOrderUserMapMapper.listByDateAndTargetUid(start, count, targetUid, minTime, maxTime, key);
|
| | | }
|
| | |
|
| | | @Override
|
| | | public long countByDateAndTargetUid(Long targetUid,Date minTime,Date maxTime) {
|
| | | Long count = teamDividentsSourceOrderUserMapMapper.countByDateAndTargetUid(targetUid, minTime, maxTime);
|
| | | public long countByDateAndTargetUid(Long targetUid,Date minTime,Date maxTime, String key) {
|
| | | Long count = teamDividentsSourceOrderUserMapMapper.countByDateAndTargetUid(targetUid, minTime, maxTime, key);
|
| | | if (count == null)
|
| | | count = 0L;
|
| | | return count;
|
| | | }
|
| | |
|
| | | @Override
|
| | | public TeamDividentsVO sumByDateAndTargetUid(Long targetUid,Date minTime,Date maxTime) {
|
| | | return teamDividentsSourceOrderUserMapMapper.sumByDateAndTargetUid(targetUid, minTime, maxTime);
|
| | | public TeamDividentsVO sumByDateAndTargetUid(Long targetUid,Date minTime,Date maxTime, String key) {
|
| | | return teamDividentsSourceOrderUserMapMapper.sumByDateAndTargetUid(targetUid, minTime, maxTime, key);
|
| | | }
|
| | |
|
| | | }
|
| | |
| | | * @param maxTime
|
| | | * @return
|
| | | */
|
| | | public List<TeamDividentsVO> listByDateAndTargetUid(long start, int count, Long targetUid, Date minTime, Date maxTime);
|
| | | public List<TeamDividentsVO> listByDateAndTargetUid(long start, int count, Long targetUid, Date minTime, Date maxTime, String key);
|
| | |
|
| | | public long countByDateAndTargetUid(Long targetUid, Date minTime, Date maxTime);
|
| | | public long countByDateAndTargetUid(Long targetUid, Date minTime, Date maxTime, String key);
|
| | |
|
| | | public TeamDividentsVO sumByDateAndTargetUid(Long targetUid, Date minTime, Date maxTime);
|
| | | public TeamDividentsVO sumByDateAndTargetUid(Long targetUid, Date minTime, Date maxTime, String key);
|
| | |
|
| | | }
|