修改了协议关联的数据字典错误的问题
This commit is contained in:
parent
6ca0ab65a6
commit
85877e5aaf
@ -0,0 +1,48 @@
|
|||||||
|
package cn.com.tenlion.operator.controller.api.center.data;
|
||||||
|
|
||||||
|
import cn.com.tenlion.operator.dao.centerdata.ICenterDataDao;
|
||||||
|
import cn.com.tenlion.operator.pojo.dtos.complaint.ComplaintDTO;
|
||||||
|
import cn.com.tenlion.operator.pojo.vos.complaint.ComplaintVO;
|
||||||
|
import cn.com.tenlion.operator.service.centerdata.ICenterDataService;
|
||||||
|
import cn.com.tenlion.operator.serviceother.operator.complaint.IComplaintService;
|
||||||
|
import ink.wgink.annotation.CheckRequestBodyAnnotation;
|
||||||
|
import ink.wgink.common.base.DefaultBaseController;
|
||||||
|
import ink.wgink.interfaces.consts.ISystemConstant;
|
||||||
|
import ink.wgink.module.dictionary.pojo.dtos.DataDTO;
|
||||||
|
import ink.wgink.pojo.ListPage;
|
||||||
|
import ink.wgink.pojo.result.ErrorResult;
|
||||||
|
import ink.wgink.pojo.result.SuccessResult;
|
||||||
|
import ink.wgink.pojo.result.SuccessResultData;
|
||||||
|
import ink.wgink.pojo.result.SuccessResultList;
|
||||||
|
import io.swagger.annotations.*;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ClassName: ComplaintController
|
||||||
|
* @Description: 举报表
|
||||||
|
* @Author: CodeFactory
|
||||||
|
* @Date: 2024-04-02 10:32:34
|
||||||
|
* @Version: 3.0
|
||||||
|
**/
|
||||||
|
@Api(tags = ISystemConstant.API_TAGS_SYSTEM_PREFIX + "数据字典接口")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping(ISystemConstant.API_PREFIX + "/center-data")
|
||||||
|
public class CenterDataController extends DefaultBaseController {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private ICenterDataService iCenterDataService;
|
||||||
|
|
||||||
|
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||||
|
@GetMapping("list/{dataParentId}")
|
||||||
|
public List<DataDTO> list(@PathVariable String dataParentId) {
|
||||||
|
Map<String, Object> params = requestParams();
|
||||||
|
params.put("dataParentId", dataParentId);
|
||||||
|
return iCenterDataService.list(params);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -1,8 +1,10 @@
|
|||||||
package cn.com.tenlion.operator.controller.route.agreementportal;
|
package cn.com.tenlion.operator.controller.route.agreementportal;
|
||||||
|
|
||||||
|
import cn.com.tenlion.operator.properties.SystemApiPathProperties;
|
||||||
import ink.wgink.common.base.DefaultBaseController;
|
import ink.wgink.common.base.DefaultBaseController;
|
||||||
import ink.wgink.interfaces.consts.ISystemConstant;
|
import ink.wgink.interfaces.consts.ISystemConstant;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
@ -20,6 +22,9 @@ import org.springframework.web.servlet.ModelAndView;
|
|||||||
@RequestMapping(ISystemConstant.ROUTE_PREFIX + "/agreementportal")
|
@RequestMapping(ISystemConstant.ROUTE_PREFIX + "/agreementportal")
|
||||||
public class AgreementPortalRouteController extends DefaultBaseController {
|
public class AgreementPortalRouteController extends DefaultBaseController {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private SystemApiPathProperties systemApiPathProperties;
|
||||||
|
|
||||||
@GetMapping("save")
|
@GetMapping("save")
|
||||||
public ModelAndView save() {
|
public ModelAndView save() {
|
||||||
return new ModelAndView("agreementportal/save");
|
return new ModelAndView("agreementportal/save");
|
||||||
@ -32,7 +37,9 @@ public class AgreementPortalRouteController extends DefaultBaseController {
|
|||||||
|
|
||||||
@GetMapping("list")
|
@GetMapping("list")
|
||||||
public ModelAndView list() {
|
public ModelAndView list() {
|
||||||
return new ModelAndView("agreementportal/list");
|
ModelAndView MV = new ModelAndView("agreementportal/list");
|
||||||
|
MV.addObject("centerUrl", systemApiPathProperties.getUserCenter());
|
||||||
|
return MV;
|
||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping("list-old")
|
@GetMapping("list-old")
|
||||||
|
@ -0,0 +1,16 @@
|
|||||||
|
package cn.com.tenlion.operator.dao.centerdata;
|
||||||
|
|
||||||
|
import ink.wgink.exceptions.SearchException;
|
||||||
|
import ink.wgink.module.dictionary.pojo.dtos.DataDTO;
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
@Repository
|
||||||
|
public interface ICenterDataDao {
|
||||||
|
|
||||||
|
DataDTO get(Map<String, Object> params) throws SearchException;
|
||||||
|
|
||||||
|
List<DataDTO> list(Map<String, Object> params) throws SearchException;
|
||||||
|
}
|
@ -0,0 +1,27 @@
|
|||||||
|
package cn.com.tenlion.operator.service.centerdata;
|
||||||
|
|
||||||
|
import ink.wgink.module.dictionary.pojo.dtos.DataDTO;
|
||||||
|
import ink.wgink.pojo.ListPage;
|
||||||
|
import ink.wgink.pojo.result.SuccessResultList;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ClassName: IAgreementService
|
||||||
|
* @Description: 平台协议管理
|
||||||
|
* @Author: CodeFactory
|
||||||
|
* @Date: 2024-03-05 09:32:44
|
||||||
|
* @Version: 3.0
|
||||||
|
**/
|
||||||
|
public interface ICenterDataService {
|
||||||
|
|
||||||
|
DataDTO get(Map<String, Object> params);
|
||||||
|
|
||||||
|
DataDTO get(String dataId);
|
||||||
|
|
||||||
|
List<DataDTO> list(Map<String, Object> params);
|
||||||
|
|
||||||
|
SuccessResultList<List<DataDTO>> listPage(ListPage page);
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,55 @@
|
|||||||
|
package cn.com.tenlion.operator.service.centerdata.impl;
|
||||||
|
|
||||||
|
import cn.com.tenlion.operator.dao.centerdata.ICenterDataDao;
|
||||||
|
import cn.com.tenlion.operator.service.centerdata.ICenterDataService;
|
||||||
|
import com.github.pagehelper.PageHelper;
|
||||||
|
import com.github.pagehelper.PageInfo;
|
||||||
|
import ink.wgink.common.base.DefaultBaseService;
|
||||||
|
import ink.wgink.module.dictionary.pojo.dtos.DataDTO;
|
||||||
|
import ink.wgink.pojo.ListPage;
|
||||||
|
import ink.wgink.pojo.result.SuccessResultList;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ClassName: AgreementServiceImpl
|
||||||
|
* @Description: 平台协议管理
|
||||||
|
* @Author: CodeFactory
|
||||||
|
* @Date: 2024-03-05 09:32:44
|
||||||
|
* @Version: 3.0
|
||||||
|
**/
|
||||||
|
@Service
|
||||||
|
public class CenterDataServiceImpl extends DefaultBaseService implements ICenterDataService {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private ICenterDataDao iCenterDataDao;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public DataDTO get(Map<String, Object> params) {
|
||||||
|
return iCenterDataDao.get(params);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public DataDTO get(String dataId) {
|
||||||
|
Map<String, Object> params = super.getHashMap(2);
|
||||||
|
params.put("dataId", dataId);
|
||||||
|
return get(params);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<DataDTO> list(Map<String, Object> params) {
|
||||||
|
return iCenterDataDao.list(params);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public SuccessResultList<List<DataDTO>> listPage(ListPage page) {
|
||||||
|
PageHelper.startPage(page.getPage(), page.getRows());
|
||||||
|
List<DataDTO> agreementDTOs = list(page.getParams());
|
||||||
|
PageInfo<DataDTO> pageInfo = new PageInfo<>(agreementDTOs);
|
||||||
|
return new SuccessResultList<>(agreementDTOs, pageInfo.getPageNum(), pageInfo.getTotal());
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,47 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="cn.com.tenlion.operator.dao.centerdata.ICenterDataDao">
|
||||||
|
|
||||||
|
<resultMap id="dataDTO" type="ink.wgink.module.dictionary.pojo.dtos.DataDTO">
|
||||||
|
<result column="data_id" property="dataId"/>
|
||||||
|
<result column="data_parent_id" property="dataParentId"/>
|
||||||
|
<result column="data_parent_name" property="dataParentName"/>
|
||||||
|
<result column="data_name" property="dataName"/>
|
||||||
|
<result column="data_summary" property="dataSummary"/>
|
||||||
|
<result column="data_code" property="dataCode"/>
|
||||||
|
<result column="data_sort" property="dataSort"/>
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<select id="get" parameterType="map" resultMap="dataDTO">
|
||||||
|
SELECT
|
||||||
|
t1.data_id,
|
||||||
|
t1.data_parent_id,
|
||||||
|
t1.data_name,
|
||||||
|
t1.data_summary,
|
||||||
|
t1.data_code,
|
||||||
|
t1.data_sort
|
||||||
|
FROM
|
||||||
|
center_data t1
|
||||||
|
WHERE
|
||||||
|
t1.is_delete = 0 AND t1.data_id = #{dataId}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="list" parameterType="map" resultMap="dataDTO">
|
||||||
|
SELECT
|
||||||
|
t1.data_id,
|
||||||
|
t1.data_parent_id,
|
||||||
|
t1.data_name,
|
||||||
|
t1.data_summary,
|
||||||
|
t1.data_code,
|
||||||
|
t1.data_sort
|
||||||
|
FROM
|
||||||
|
center_data t1
|
||||||
|
WHERE
|
||||||
|
t1.is_delete = 0
|
||||||
|
<if test="dataParentId != null and dataParentId != '' ">
|
||||||
|
AND t1.data_parent_id = #{dataParentId}
|
||||||
|
</if>
|
||||||
|
ORDER BY t1.data_sort + 0
|
||||||
|
</select>
|
||||||
|
|
||||||
|
</mapper>
|
@ -93,7 +93,7 @@
|
|||||||
var tableUrl = 'api/agreementportal/listpage';
|
var tableUrl = 'api/agreementportal/listpage';
|
||||||
|
|
||||||
function initagreementportalportalTypeSelect() {
|
function initagreementportalportalTypeSelect() {
|
||||||
top.restAjax.get(top.restAjax.path('api/data/listallbyparentid/b6144a18-c5ea-4286-89fb-441172803d07', []), {}, null, function(code, data, args) {
|
top.restAjax.get(top.restAjax.path('api/center-data/list/b6144a18-c5ea-4286-89fb-441172803d07', []), {}, null, function(code, data, args) {
|
||||||
console.log(data)
|
console.log(data)
|
||||||
laytpl(document.getElementById('agreementportalportalTypeSelectTemplate').innerHTML).render(data, function(html) {
|
laytpl(document.getElementById('agreementportalportalTypeSelectTemplate').innerHTML).render(data, function(html) {
|
||||||
document.getElementById('agreementportalportalTypeSelectTemplateBox').innerHTML = html;
|
document.getElementById('agreementportalportalTypeSelectTemplateBox').innerHTML = html;
|
||||||
|
@ -81,7 +81,7 @@
|
|||||||
var wangEditorObj = {};
|
var wangEditorObj = {};
|
||||||
|
|
||||||
function initagreementportalportalTypeSelect() {
|
function initagreementportalportalTypeSelect() {
|
||||||
top.restAjax.get(top.restAjax.path('api/data/listallbyparentid/b6144a18-c5ea-4286-89fb-441172803d07', []), {}, null, function(code, data, args) {
|
top.restAjax.get(top.restAjax.path('api/center-data/list/b6144a18-c5ea-4286-89fb-441172803d07', []), {}, null, function(code, data, args) {
|
||||||
console.log(data)
|
console.log(data)
|
||||||
laytpl(document.getElementById('agreementportalportalTypeSelectTemplate').innerHTML).render(data, function(html) {
|
laytpl(document.getElementById('agreementportalportalTypeSelectTemplate').innerHTML).render(data, function(html) {
|
||||||
document.getElementById('agreementportalportalTypeSelectTemplateBox').innerHTML = html;
|
document.getElementById('agreementportalportalTypeSelectTemplateBox').innerHTML = html;
|
||||||
|
@ -85,7 +85,7 @@
|
|||||||
var oldSendStatus = '';
|
var oldSendStatus = '';
|
||||||
|
|
||||||
function initagreementportalTypeSelect(selectValue) {
|
function initagreementportalTypeSelect(selectValue) {
|
||||||
top.restAjax.get(top.restAjax.path('api/data/listallbyparentid/b6144a18-c5ea-4286-89fb-441172803d07', []), {}, null, function(code, data, args) {
|
top.restAjax.get(top.restAjax.path('api/center-data/list/b6144a18-c5ea-4286-89fb-441172803d07', []), {}, null, function(code, data, args) {
|
||||||
laytpl(document.getElementById('agreementportalTypeSelectTemplate').innerHTML).render(data, function(html) {
|
laytpl(document.getElementById('agreementportalTypeSelectTemplate').innerHTML).render(data, function(html) {
|
||||||
document.getElementById('agreementportalTypeSelectTemplateBox').innerHTML = html;
|
document.getElementById('agreementportalTypeSelectTemplateBox').innerHTML = html;
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user