|
|
@@ -27,6 +27,8 @@ import org.slf4j.LoggerFactory; |
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
import org.springframework.web.bind.annotation.*; |
|
|
|
|
|
|
|
import java.util.List; |
|
|
|
|
|
|
|
|
|
|
|
@RestController |
|
|
|
@RequestMapping("/api/voiceMould") |
|
|
@@ -64,7 +66,16 @@ public class VoiceMouldController extends BaseController { |
|
|
|
public ResultData findById(Long id) { |
|
|
|
logger.debug("[" + getIpAddr() + "] MouldPatchController::findById"); |
|
|
|
VoiceMould voiceMould = voiceMouldService.getDetailById(id); |
|
|
|
|
|
|
|
if(voiceMould.getParentId() == 0l && voiceMould.getCountSub() > 0){ |
|
|
|
VoiceMould voiceQ = new VoiceMould(); |
|
|
|
voiceQ.setParentId(voiceMould.getId()); |
|
|
|
voiceQ.setStatus(EnumaMouldPatchStatus.put_on.getCode()); |
|
|
|
voiceQ.setSortColumns(BaseEntity.SortField.UpdateDate_DESC); |
|
|
|
List<VoiceMould> sublist = voiceMouldService.getClist(voiceQ); |
|
|
|
if(sublist != null && !sublist.isEmpty()){ |
|
|
|
voiceMould.setSubVoiceMould(sublist); |
|
|
|
} |
|
|
|
} |
|
|
|
return new ResultData(voiceMould); |
|
|
|
} |
|
|
|
|
|
|
@@ -96,6 +107,7 @@ public class VoiceMouldController extends BaseController { |
|
|
|
} |
|
|
|
|
|
|
|
VoiceMould voiceMould = new VoiceMould(); |
|
|
|
voiceMould.setParentId(0l); |
|
|
|
voiceMould.setSex(sex); |
|
|
|
voiceMould.setSendType(EnumMouldSendType.auto.getCode()); |
|
|
|
voiceMould.setStatus(EnumaMouldPatchStatus.put_on.getCode()); |
|
|
|