| | |
| | | JSONObject data = new JSONObject();
|
| | | data.put("userInfo", userInfo);
|
| | |
|
| | | Integer goodsType = null; // 版本区分
|
| | | if (!VersionUtil.greaterThan_1_6_0(acceptData.getPlatform(), acceptData.getVersion())) {
|
| | | goodsType = Constant.SOURCE_TYPE_TAOBAO;
|
| | | } |
| | | |
| | | /* 总订单统计 */
|
| | | Map<String, BigDecimal> countOrder = commonOrderService.countHistoryOrder(uid, null, null);
|
| | | Map<String, BigDecimal> countOrder = commonOrderService.countHistoryOrder(uid, null, goodsType);
|
| | | int self = 0;
|
| | | if (countOrder.get("totalSelf") != null) {
|
| | | self = countOrder.get("totalSelf").intValue();
|
| | |
| | | data.put("invite", invite);
|
| | |
|
| | | /* 今日订单统计 */
|
| | | Map<String, BigDecimal> countToday = commonOrderService.countHistoryOrder(uid, 1, null);
|
| | | Map<String, BigDecimal> countToday = commonOrderService.countHistoryOrder(uid, 1, goodsType);
|
| | |
|
| | | int todaySelf = 0;
|
| | | if (countToday.get("totalSelf") != null) {
|
| | |
| | | data.put("today", todaydata);
|
| | |
|
| | | /* 昨日订单统计 */
|
| | | Map<String, BigDecimal> countYesterday = commonOrderService.countHistoryOrder(uid, 2, null);
|
| | | Map<String, BigDecimal> countYesterday = commonOrderService.countHistoryOrder(uid, 2, goodsType);
|
| | | int yesterdaySelf = 0;
|
| | | if (countYesterday.get("totalSelf") != null) {
|
| | | yesterdaySelf = countYesterday.get("totalSelf").intValue();
|
| | |
| | | BigDecimal sharemoney = new BigDecimal(0.00);
|
| | | Object inviteCount = 0;
|
| | | BigDecimal inviteMoney = new BigDecimal(0.00);
|
| | | |
| | | Integer goodsType = null; // 版本区分
|
| | | if (!VersionUtil.greaterThan_1_6_0(acceptData.getPlatform(), acceptData.getVersion())) {
|
| | | goodsType = Constant.SOURCE_TYPE_TAOBAO;
|
| | | } |
| | |
|
| | | Map<String, Object> shareMap = commonOrderService.countBonusOrderMoneyAndNumber(uid, 2, dateType, null,
|
| | | null);
|
| | | null, goodsType);
|
| | | if (shareMap != null) {
|
| | | Object totalNum = shareMap.get("totalNum");
|
| | | if (totalNum != null) {
|
| | |
| | |
|
| | | // 邀请统计
|
| | | Map<String, Object> inviteMap = commonOrderService.countBonusOrderMoneyAndNumber(uid, 3, dateType, null,
|
| | | null);
|
| | | null, goodsType);
|
| | | if (inviteMap != null) {
|
| | | Object totalNum = inviteMap.get("totalNum");
|
| | | if (totalNum != null) {
|
| | |
| | | * @param out
|
| | | */
|
| | | @RequestMapping(value = "accordtorage", method = RequestMethod.POST)
|
| | | public void accordtorage(AcceptData acceptData, Long uid, Long id, Integer goodsType, PrintWriter out) {
|
| | | public void accordtorage(AcceptData acceptData, Long uid, long id, Integer goodsType, PrintWriter out) {
|
| | |
|
| | | if (id == null) {
|
| | | out.print(JsonUtil.loadFalseResult("未选择商品"));
|
| | | return;
|
| | | }
|
| | | |
| | | if (uid == null) {
|
| | | out.print(JsonUtil.loadFalseResult("用户未登录"));
|
| | | return;
|
| | |
| | | JSONObject data = new JSONObject();
|
| | | data.put("storageState", storageState);
|
| | | out.print(JsonUtil.loadTrueResult(data));
|
| | |
|
| | | } catch (Exception e) {
|
| | | out.print(JsonUtil.loadFalseResult("操作失败"));
|
| | | e.printStackTrace();
|
| | |
| | | * @return |
| | | */ |
| | | Map<String, Object> countBonusOrderMoneyAndNumber(@Param("uid") Long uid, @Param("type") Integer type, |
| | | @Param("day") Integer day, @Param("startTime") String startTime, @Param("endTime") String endTime); |
| | | @Param("day") Integer day, @Param("startTime") String startTime, @Param("endTime") String endTime, @Param("source")Integer source); |
| | | |
| | | int countByOrderNOAndOrderType(@Param("orderNO") String orderNO, @Param("orderType") int orderType); |
| | | |
| | |
| | | yeshi_ec_common_order co ON co.`co_id`=ho.`ho_order_id` WHERE hb.hb_id |
| | | IS NOT NULL |
| | | <include refid="SELECT_PARAM_ORDER_CREATE_TIME" /> |
| | | <if test="day != null and day == 4"> |
| | | AND co.`co_state` = 2 |
| | | <!-- 上月 :统计已收货 --> |
| | | </if> |
| | | <if test="day != null and day == 4">AND co.`co_state` = 2</if> <!-- 上月 :统计已收货 --> |
| | | <if test="source != null">AND co.co_source_type = #{source}</if> |
| | | GROUP BY co.`co_order_no`, co.`co_source_type` )A |
| | | </select> |
| | | <sql id="SELECT_HONGBAO_STATE"> |
| | |
| | |
|
| | | @Override
|
| | | public Map<String, Object> countBonusOrderMoneyAndNumber(Long uid, Integer type, Integer day, String startTime,
|
| | | String endTime) {
|
| | | return commonOrderMapper.countBonusOrderMoneyAndNumber(uid, type, day, startTime, endTime);
|
| | | String endTime, Integer source) {
|
| | | return commonOrderMapper.countBonusOrderMoneyAndNumber(uid, type, day, startTime, endTime, source);
|
| | | }
|
| | |
|
| | | @Override
|
| | |
| | |
|
| | | import org.springframework.core.task.TaskExecutor;
|
| | | import org.springframework.stereotype.Service;
|
| | | import org.springframework.transaction.annotation.Transactional;
|
| | | import org.yeshi.utils.JsonUtil;
|
| | | import org.yeshi.utils.entity.FileUploadResult;
|
| | |
|
| | |
| | |
|
| | |
|
| | | @Override
|
| | | @Transactional
|
| | | public void addCommonGoods(Long uid, Set<Long> ids) throws UserGoodsStorageException {
|
| | |
|
| | | if (uid == null) {
|
| | |
| | | * @return
|
| | | */
|
| | | public Map<String, Object> countBonusOrderMoneyAndNumber(Long uid, Integer type, Integer day, String startTime,
|
| | | String endTime);
|
| | | String endTime, Integer source);
|
| | |
|
| | | /**
|
| | | * 根据条件统计
|