| | |
| | | if(Objects.nonNull(user)){ |
| | | dto.setStoreId(user.getStoreId()); |
| | | } |
| | | |
| | | if (dto.getUserId()!=null){ |
| | | TAppUser byId = tAppUserService.getById(dto.getUserId()); |
| | | dto.setName(byId.getName()); |
| | | dto.setPhone(byId.getPhone()); |
| | | } |
| | | orderService.save(dto); |
| | | |
| | | List<TOptometryDetail> optometryDetails = dto.getOptometryDetails(); |
| | |
| | | private Integer gender; |
| | | @ApiModelProperty(value = "微信昵称") |
| | | @TableField("name") |
| | | private Integer name; |
| | | private String name; |
| | | @ApiModelProperty(value = "支付方式") |
| | | @TableField("payTypeName") |
| | | private String payTypeName; |
| | |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | @ApiModel(value = "订单售后查询参数") |
| | | public class TOrderAftersalesQuery extends BasePage { |
| | |
| | | private String startTime; |
| | | @ApiModelProperty(value = "结束时间 2023-11-11") |
| | | private String endTime; |
| | | |
| | | @ApiModelProperty(value = "用户ids 前端忽略") |
| | | private List<Integer> userIds; |
| | | } |
| | |
| | | package com.jilongda.manage.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.jilongda.common.basic.PageInfo; |
| | | import com.jilongda.manage.mapper.TAppUserMapper; |
| | | import com.jilongda.manage.model.TAppUser; |
| | | import com.jilongda.manage.model.TOrderAftersales; |
| | | import com.jilongda.manage.mapper.TOrderAftersalesMapper; |
| | | import com.jilongda.manage.query.TOrderAftersalesQuery; |
| | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.jilongda.manage.vo.TOrderAftersalesVO; |
| | | import com.jilongda.manage.vo.TSupplierVO; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.util.StringUtils; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | @Service |
| | | public class TOrderAftersalesServiceImpl extends ServiceImpl<TOrderAftersalesMapper, TOrderAftersales> implements TOrderAftersalesService { |
| | | |
| | | @Autowired |
| | | private TAppUserMapper appUserMapper; |
| | | @Override |
| | | public PageInfo<TOrderAftersalesVO> pageList(TOrderAftersalesQuery query) { |
| | | if (StringUtils.hasLength(query.getName())){ |
| | | List<Integer> collect = appUserMapper.selectList(new LambdaQueryWrapper<TAppUser>() |
| | | .eq(TAppUser::getName, query.getName())).stream() |
| | | .map(TAppUser::getId).collect(Collectors.toList()); |
| | | if (collect.isEmpty())collect.add(-1); |
| | | query.setUserIds(collect); |
| | | } |
| | | PageInfo<TOrderAftersalesVO> pageInfo = new PageInfo<>(query.getPageNum(), query.getPageSize()); |
| | | List<TOrderAftersalesVO> list = this.baseMapper.pageList(query,pageInfo); |
| | | pageInfo.setRecords(list); |
| | |
| | | |
| | | public class OssUploadUtil { |
| | | //OSS图片访问域名 |
| | | public static String oss_domain = "https://we-park-life.oss-cn-beijing.aliyuncs.com/"; |
| | | public static String accessKeyId = "LTAI47eyqWWhBPXM"; |
| | | public static String accessKeySecret = "orsYX78NvgXS9KbN7wCwRja1wkUwPc"; |
| | | public static String bucketName="we-park-life"; |
| | | public static String endpoint = "oss-cn-beijing.aliyuncs.com"; |
| | | public static String oss_domain = "https://yandu66.oss-cn-shenzhen.aliyuncs.com/"; |
| | | public static String accessKeyId = "LTAI5tL1dE1DzT4ZYdDQZ8k7"; |
| | | public static String accessKeySecret = "4SZBtTyLhOoYRcfMS4SVAtGz8ZnxRP"; |
| | | public static String bucketName="yandu66"; |
| | | public static String endpoint = "oss-cn-shenzhen.aliyuncs.com"; |
| | | |
| | | public static OSSClient ossClient = new OSSClient(endpoint, accessKeyId,accessKeySecret); |
| | | |
| | |
| | | </sql> |
| | | <select id="pageList" resultType="com.jilongda.manage.vo.TOrderAftersalesVO"> |
| | | select toa.id, toa.code, toa.sysId, toa.optometristId, toa.orderId, toa.reason, toa.handleResult, toa.createTime, toa.updateTime, |
| | | toa.createBy, toa.updateBy, toa.isDelete,tau.name, tau.phone, tau.realName, ts.name as storeName, o.orderMoney |
| | | toa.createBy, toa.updateBy, toa.isDelete, ts.name as storeName, o.orderMoney,tau.`name` as `name`, |
| | | o.realName |
| | | from t_order_aftersales toa |
| | | left join t_app_user tau on toa.sysId = tau.id |
| | | left join t_order o on toa.orderId = o.id |
| | | left join t_store ts on o.storeId = ts.id |
| | | left join t_app_user tau on o.userId = tau.id |
| | | <where> |
| | | <if test="query.name != null and query.name != ''"> |
| | | and tau.name like concat('%',#{query.name},'%') |
| | | </if> |
| | | <if test="query.phone != null and query.phone != ''"> |
| | | and tau.phone like concat('%',#{query.phone},'%') |
| | | and o.phone like concat('%',#{query.phone},'%') |
| | | </if> |
| | | <if test="query.userIds != null and query.userIds.size()>0"> |
| | | AND o.userId IN |
| | | <foreach collection="query.userIds" close=")" open="(" item="id" separator=","> |
| | | #{id} |
| | | </foreach> |
| | | </if> |
| | | <if test="query.storeId != null"> |
| | | and o.storeId = #{query.phone} |