Commit 2a617d59 by huluobin

long 序列化

parent c8bd587b
......@@ -22,5 +22,11 @@ public interface TimesCardService extends IService<TimesCardType> {
*/
TimesCardType getAggregate(Integer id);
/**
* 次卡详情
*
* @param id
* @return
*/
TimesCardType getTimesCardTypeDetail(Integer id);
}
......@@ -4,6 +4,8 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.gogirl.application.market.TimesCardService;
import com.gogirl.domain.market.timescard.TimesCardType;
import com.gogirl.domain.market.timescard.TimesCardTypeContent;
import com.gogirl.infrastructure.mapper.market.timescard.TimesCardTypeContentMapper;
import com.gogirl.infrastructure.mapper.market.timescard.TimesCardTypeMapper;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
......@@ -16,6 +18,7 @@ import java.util.List;
@Slf4j
public class TimesCardServiceImpl extends ServiceImpl<TimesCardTypeMapper, TimesCardType> implements TimesCardService {
private final TimesCardTypeContentMapper timesCardTypeContentMapper;
private final TimesCardTypeMapper timesCardTypeMapper;
public List<TimesCardType> getTimesCardTypeList() {
......@@ -25,6 +28,10 @@ public class TimesCardServiceImpl extends ServiceImpl<TimesCardTypeMapper, Times
}
public TimesCardType getAggregate(Integer id) {
TimesCardType timesCardType = this.getById(id);
List<TimesCardTypeContent> timesCardTypeContentList = timesCardTypeContentMapper.selectList(
new LambdaQueryWrapper<TimesCardTypeContent>().eq(TimesCardTypeContent::getCardTypeId, id)
);
return timesCardTypeMapper.selectAggregate(id);
}
......
......@@ -72,7 +72,7 @@ public class TimesCardController {
@GetMapping("/customer/timescard/getTimesCardTypeDetail")
@GogirlMember
public JsonResult<TimesCardType> getTimesCardTypeDetail(@RequestParam Integer id) {
return JsonResult.success(timesCardService.getTimesCardTypeDetail(id));
return JsonResult.success(timesCardService.getAggregate(id));
}
@ApiOperation(value = "用户购买次卡")
......
......@@ -92,8 +92,8 @@
left join sys_member_authority sma on sma.member_id = tct.id
left join store_manage sm on sm.id = sma.data_id
where tct.id = #{id,jdbcType=INTEGER}
and sma.type=1
and sma.member_type=10
# and sma.type=1
# and sma.member_type=10
and tct.status =1
</select>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment