package com.ygj.yuemum.controller.distributionchannel; import com.alibaba.fastjson.JSONObject; import com.ygj.yuemum.domain.distributionchannel.DcIntroduceLog; import com.ygj.yuemum.domain.distributionchannel.DcQueryReport; import com.ygj.yuemum.service.distributionchannel.DcIntroduceLogService; import io.swagger.annotations.Api; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; import java.util.List; import java.util.Map; @Api(tags = "介绍日志相关接口") @RestController public class DcIntroduceLogController { @Autowired private DcIntroduceLogService dcIntroduceLogService; @PostMapping ("/queryDcIntroduceLogs") public String queryDcIntroduceLogs(@ModelAttribute DcIntroduceLog dcIntroduceLog) { Map queryDcIntroduceLogs = dcIntroduceLogService.queryDcIntroduceLogs(dcIntroduceLog); String jso = JSONObject.toJSONString(queryDcIntroduceLogs); return jso; } @PostMapping ("/getDcReport") public String getDcReport(@ModelAttribute DcQueryReport dcQueryReport) { Map queryDcIntroduceLogs = dcIntroduceLogService.getDcReport(dcQueryReport); String jso = JSONObject.toJSONString(queryDcIntroduceLogs); return jso; } @PostMapping ("/queryDcILbyrebate") public String queryDcILbyrebate(@ModelAttribute DcIntroduceLog dcIntroduceLog) { Map queryDcIntroduceLogs = dcIntroduceLogService.queryDcILbyrebate(dcIntroduceLog); String jso = JSONObject.toJSONString(queryDcIntroduceLogs); return jso; } @PostMapping("/insertDcIntroduceLog") public int insertDcIntroduceLog(@ModelAttribute DcIntroduceLog dcIntroduceLog) { return dcIntroduceLogService.insertDcIntroduceLog(dcIntroduceLog); } @GetMapping("/getDcIntroduceLogs") public List getDcIntroduceLogs(@RequestParam("phone") String phone) { return dcIntroduceLogService.getDcIntroduceLogs(phone); } }