init
This commit is contained in:
@@ -14,6 +14,7 @@ import com.ruoyi.common.core.validate.EditGroup;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.xq.domain.Dynamic;
|
||||
import com.ruoyi.xq.dto.admin.common.AuditFailReq;
|
||||
import com.ruoyi.xq.dto.admin.dynamic.DynamicAddReq;
|
||||
import com.ruoyi.xq.dto.admin.dynamic.DynamicAdminVo;
|
||||
import com.ruoyi.xq.dto.app.common.IdsReq;
|
||||
import com.ruoyi.xq.service.DynamicService;
|
||||
@@ -87,8 +88,9 @@ public class DynamicController extends BaseController {
|
||||
@Log(title = "动态", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody Dynamic bo) {
|
||||
return toAjax(dynamicService.save(bo));
|
||||
public R<Void> add(@RequestBody DynamicAddReq bo) {
|
||||
dynamicService.saveDynamic(bo);
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -11,6 +11,7 @@ import com.ruoyi.xq.dto.app.areacode.AreaCodeHomeVo;
|
||||
import com.ruoyi.xq.dto.app.areacode.AreaCodeQuery;
|
||||
import com.ruoyi.xq.dto.app.areacode.AreaCodeTree;
|
||||
import com.ruoyi.xq.dto.app.setting.AgreementDTO;
|
||||
import com.ruoyi.xq.mapper.AreaCodeMapper;
|
||||
import com.ruoyi.xq.service.AgreementSettingService;
|
||||
import com.ruoyi.xq.service.AreaCodeService;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
@@ -20,6 +21,7 @@ import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
@RestController
|
||||
@@ -57,12 +59,14 @@ public class SettingAppController {
|
||||
return R.ok(new AgreementDTO(anchorJoinAgreement));
|
||||
}
|
||||
|
||||
@Resource
|
||||
private AreaCodeMapper areaCodeMapper;
|
||||
|
||||
@GetMapping("/areaCode/homeCity")
|
||||
@Operation(summary = "获取首页城市选择列表")
|
||||
@Log(title = "获取首页城市选择列表", businessType = BusinessType.OTHER, isSaveDb = false)
|
||||
public R<List<AreaCodeHomeVo>> homeCity(){
|
||||
List<AreaCode> list = areaCodeService.list(Wrappers.lambdaQuery(AreaCode.class).eq(AreaCode::getLevel, "city"));
|
||||
List<AreaCodeHomeVo> vos = BeanConvertUtil.convertListTo(list, AreaCodeHomeVo::new);
|
||||
List<AreaCodeHomeVo> vos = areaCodeMapper.homeCity();
|
||||
return R.ok(vos);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user