14 changed files with 672 additions and 3 deletions
@ -0,0 +1,97 @@ |
|||||
|
/** |
||||
|
* Copyright 2018 人人开源 https://www.renren.io
|
||||
|
* <p> |
||||
|
* This program is free software: you can redistribute it and/or modify |
||||
|
* it under the terms of the GNU General Public License as published by |
||||
|
* the Free Software Foundation, either version 3 of the License, or |
||||
|
* (at your option) any later version. |
||||
|
* <p> |
||||
|
* This program is distributed in the hope that it will be useful, |
||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
|
* GNU General Public License for more details. |
||||
|
* <p> |
||||
|
* You should have received a copy of the GNU General Public License |
||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
*/ |
||||
|
|
||||
|
package com.epmet.dto; |
||||
|
|
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.io.Serializable; |
||||
|
import java.util.Date; |
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* 居民端用户对议题建议或意见表 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2020-11-18 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class IssueSuggestionDTO implements Serializable { |
||||
|
|
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
/** |
||||
|
* 主键 |
||||
|
*/ |
||||
|
private String id; |
||||
|
|
||||
|
/** |
||||
|
* 客户Id customer.id |
||||
|
*/ |
||||
|
private String customerId; |
||||
|
|
||||
|
/** |
||||
|
* 议题id |
||||
|
*/ |
||||
|
private String issueId; |
||||
|
|
||||
|
/** |
||||
|
* 议题所属网格id |
||||
|
*/ |
||||
|
private String gridId; |
||||
|
|
||||
|
/** |
||||
|
* 对议题的想法 |
||||
|
*/ |
||||
|
private String suggestion; |
||||
|
|
||||
|
/** |
||||
|
* 1公开; 0匿名 |
||||
|
*/ |
||||
|
private Integer publicFlag; |
||||
|
|
||||
|
/** |
||||
|
* 删除标识:0 未删除 1已删除 |
||||
|
*/ |
||||
|
private String delFlag; |
||||
|
|
||||
|
/** |
||||
|
* 乐观锁 |
||||
|
*/ |
||||
|
private Integer revision; |
||||
|
|
||||
|
/** |
||||
|
* 提建议的人 |
||||
|
*/ |
||||
|
private String createdBy; |
||||
|
|
||||
|
/** |
||||
|
* 创建时间 |
||||
|
*/ |
||||
|
private Date createdTime; |
||||
|
|
||||
|
/** |
||||
|
* 修改人ID |
||||
|
*/ |
||||
|
private String updatedBy; |
||||
|
|
||||
|
/** |
||||
|
* 修改时间 |
||||
|
*/ |
||||
|
private Date updatedTime; |
||||
|
|
||||
|
} |
@ -0,0 +1,33 @@ |
|||||
|
package com.epmet.dto.form; |
||||
|
|
||||
|
import lombok.Data; |
||||
|
|
||||
|
import javax.validation.constraints.NotBlank; |
||||
|
import java.io.Serializable; |
||||
|
|
||||
|
/** |
||||
|
* 查询用户对于某个议题的想法 返回一条记录 |
||||
|
* |
||||
|
* @author yinzuomei@elink-cn.com |
||||
|
* @date 2020/11/18 10:09 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class UserIssueSuggestionFormDTO implements Serializable { |
||||
|
private static final long serialVersionUID = -8506264833919404944L; |
||||
|
/** |
||||
|
* 用户id |
||||
|
*/ |
||||
|
@NotBlank(message = "userId不能为空") |
||||
|
private String userId; |
||||
|
|
||||
|
/** |
||||
|
* 议题id |
||||
|
*/ |
||||
|
@NotBlank(message = "issueId不能为空") |
||||
|
private String issueId; |
||||
|
|
||||
|
public UserIssueSuggestionFormDTO( String userId, String issueId) { |
||||
|
this.userId = userId; |
||||
|
this.issueId = issueId; |
||||
|
} |
||||
|
} |
@ -0,0 +1,97 @@ |
|||||
|
/** |
||||
|
* Copyright 2018 人人开源 https://www.renren.io
|
||||
|
* <p> |
||||
|
* This program is free software: you can redistribute it and/or modify |
||||
|
* it under the terms of the GNU General Public License as published by |
||||
|
* the Free Software Foundation, either version 3 of the License, or |
||||
|
* (at your option) any later version. |
||||
|
* <p> |
||||
|
* This program is distributed in the hope that it will be useful, |
||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
|
* GNU General Public License for more details. |
||||
|
* <p> |
||||
|
* You should have received a copy of the GNU General Public License |
||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
*/ |
||||
|
|
||||
|
package com.epmet.controller; |
||||
|
|
||||
|
import com.epmet.commons.tools.page.PageData; |
||||
|
import com.epmet.commons.tools.utils.Result; |
||||
|
import com.epmet.commons.tools.validator.AssertUtils; |
||||
|
import com.epmet.commons.tools.validator.ValidatorUtils; |
||||
|
import com.epmet.commons.tools.validator.group.AddGroup; |
||||
|
import com.epmet.commons.tools.validator.group.DefaultGroup; |
||||
|
import com.epmet.commons.tools.validator.group.UpdateGroup; |
||||
|
import com.epmet.dto.IssueSuggestionDTO; |
||||
|
import com.epmet.dto.form.UserIssueSuggestionFormDTO; |
||||
|
import com.epmet.service.IssueSuggestionService; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.web.bind.annotation.*; |
||||
|
|
||||
|
import java.util.Map; |
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* 居民端用户对议题建议或意见表 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2020-11-18 |
||||
|
*/ |
||||
|
@RestController |
||||
|
@RequestMapping("issuesuggestion") |
||||
|
public class IssueSuggestionController { |
||||
|
|
||||
|
@Autowired |
||||
|
private IssueSuggestionService issueSuggestionService; |
||||
|
|
||||
|
@GetMapping("page") |
||||
|
public Result<PageData<IssueSuggestionDTO>> page(@RequestParam Map<String, Object> params){ |
||||
|
PageData<IssueSuggestionDTO> page = issueSuggestionService.page(params); |
||||
|
return new Result<PageData<IssueSuggestionDTO>>().ok(page); |
||||
|
} |
||||
|
|
||||
|
@GetMapping("{id}") |
||||
|
public Result<IssueSuggestionDTO> get(@PathVariable("id") String id){ |
||||
|
IssueSuggestionDTO data = issueSuggestionService.get(id); |
||||
|
return new Result<IssueSuggestionDTO>().ok(data); |
||||
|
} |
||||
|
|
||||
|
@PostMapping |
||||
|
public Result save(@RequestBody IssueSuggestionDTO dto){ |
||||
|
//效验数据
|
||||
|
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); |
||||
|
issueSuggestionService.save(dto); |
||||
|
return new Result(); |
||||
|
} |
||||
|
|
||||
|
@PutMapping |
||||
|
public Result update(@RequestBody IssueSuggestionDTO dto){ |
||||
|
//效验数据
|
||||
|
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); |
||||
|
issueSuggestionService.update(dto); |
||||
|
return new Result(); |
||||
|
} |
||||
|
|
||||
|
@DeleteMapping |
||||
|
public Result delete(@RequestBody String[] ids){ |
||||
|
//效验数据
|
||||
|
AssertUtils.isArrayEmpty(ids, "id"); |
||||
|
issueSuggestionService.delete(ids); |
||||
|
return new Result(); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @param formDTO |
||||
|
* @author yinzuomei |
||||
|
* @description 查询用户对于某个议题的想法 返回一条记录 |
||||
|
* @Date 2020/11/18 10:12 |
||||
|
**/ |
||||
|
@PostMapping("queryuserissuesuggestion") |
||||
|
public Result<IssueSuggestionDTO> queryUserIssueSuggestion(@RequestBody UserIssueSuggestionFormDTO formDTO){ |
||||
|
ValidatorUtils.validateEntity(formDTO); |
||||
|
IssueSuggestionDTO issueSuggestionDTO=issueSuggestionService.queryUserIssueSuggestion(formDTO); |
||||
|
return new Result<IssueSuggestionDTO>().ok(issueSuggestionDTO); |
||||
|
} |
||||
|
} |
@ -0,0 +1,43 @@ |
|||||
|
/** |
||||
|
* Copyright 2018 人人开源 https://www.renren.io
|
||||
|
* <p> |
||||
|
* This program is free software: you can redistribute it and/or modify |
||||
|
* it under the terms of the GNU General Public License as published by |
||||
|
* the Free Software Foundation, either version 3 of the License, or |
||||
|
* (at your option) any later version. |
||||
|
* <p> |
||||
|
* This program is distributed in the hope that it will be useful, |
||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
|
* GNU General Public License for more details. |
||||
|
* <p> |
||||
|
* You should have received a copy of the GNU General Public License |
||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
*/ |
||||
|
|
||||
|
package com.epmet.dao; |
||||
|
|
||||
|
import com.epmet.commons.mybatis.dao.BaseDao; |
||||
|
import com.epmet.dto.IssueSuggestionDTO; |
||||
|
import com.epmet.dto.form.UserIssueSuggestionFormDTO; |
||||
|
import com.epmet.entity.IssueSuggestionEntity; |
||||
|
import org.apache.ibatis.annotations.Mapper; |
||||
|
|
||||
|
/** |
||||
|
* 居民端用户对议题建议或意见表 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2020-11-18 |
||||
|
*/ |
||||
|
@Mapper |
||||
|
public interface IssueSuggestionDao extends BaseDao<IssueSuggestionEntity> { |
||||
|
|
||||
|
/** |
||||
|
* @return com.epmet.dto.IssueSuggestionDTO |
||||
|
* @param formDTO |
||||
|
* @author yinzuomei |
||||
|
* @description 查询用户对于某个议题的想法 返回一条记录 |
||||
|
* @Date 2020/11/18 10:12 |
||||
|
**/ |
||||
|
IssueSuggestionDTO selectUserIssueSuggestion(UserIssueSuggestionFormDTO formDTO); |
||||
|
} |
@ -0,0 +1,66 @@ |
|||||
|
/** |
||||
|
* Copyright 2018 人人开源 https://www.renren.io
|
||||
|
* <p> |
||||
|
* This program is free software: you can redistribute it and/or modify |
||||
|
* it under the terms of the GNU General Public License as published by |
||||
|
* the Free Software Foundation, either version 3 of the License, or |
||||
|
* (at your option) any later version. |
||||
|
* <p> |
||||
|
* This program is distributed in the hope that it will be useful, |
||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
|
* GNU General Public License for more details. |
||||
|
* <p> |
||||
|
* You should have received a copy of the GNU General Public License |
||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
*/ |
||||
|
|
||||
|
package com.epmet.entity; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.annotation.TableName; |
||||
|
|
||||
|
import com.epmet.commons.mybatis.entity.BaseEpmetEntity; |
||||
|
import lombok.Data; |
||||
|
import lombok.EqualsAndHashCode; |
||||
|
|
||||
|
import java.util.Date; |
||||
|
|
||||
|
/** |
||||
|
* 居民端用户对议题建议或意见表 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2020-11-18 |
||||
|
*/ |
||||
|
@Data |
||||
|
@EqualsAndHashCode(callSuper=false) |
||||
|
@TableName("issue_suggestion") |
||||
|
public class IssueSuggestionEntity extends BaseEpmetEntity { |
||||
|
|
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
/** |
||||
|
* 客户Id customer.id |
||||
|
*/ |
||||
|
private String customerId; |
||||
|
|
||||
|
/** |
||||
|
* 议题id |
||||
|
*/ |
||||
|
private String issueId; |
||||
|
|
||||
|
/** |
||||
|
* 议题所属网格id |
||||
|
*/ |
||||
|
private String gridId; |
||||
|
|
||||
|
/** |
||||
|
* 对议题的想法 |
||||
|
*/ |
||||
|
private String suggestion; |
||||
|
|
||||
|
/** |
||||
|
* 1公开; 0匿名 |
||||
|
*/ |
||||
|
private Integer publicFlag; |
||||
|
|
||||
|
} |
@ -0,0 +1,104 @@ |
|||||
|
/** |
||||
|
* Copyright 2018 人人开源 https://www.renren.io
|
||||
|
* <p> |
||||
|
* This program is free software: you can redistribute it and/or modify |
||||
|
* it under the terms of the GNU General Public License as published by |
||||
|
* the Free Software Foundation, either version 3 of the License, or |
||||
|
* (at your option) any later version. |
||||
|
* <p> |
||||
|
* This program is distributed in the hope that it will be useful, |
||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
|
* GNU General Public License for more details. |
||||
|
* <p> |
||||
|
* You should have received a copy of the GNU General Public License |
||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
*/ |
||||
|
|
||||
|
package com.epmet.service; |
||||
|
|
||||
|
import com.epmet.commons.mybatis.service.BaseService; |
||||
|
import com.epmet.commons.tools.page.PageData; |
||||
|
import com.epmet.dto.IssueSuggestionDTO; |
||||
|
import com.epmet.dto.form.UserIssueSuggestionFormDTO; |
||||
|
import com.epmet.entity.IssueSuggestionEntity; |
||||
|
|
||||
|
import java.util.List; |
||||
|
import java.util.Map; |
||||
|
|
||||
|
/** |
||||
|
* 居民端用户对议题建议或意见表 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2020-11-18 |
||||
|
*/ |
||||
|
public interface IssueSuggestionService extends BaseService<IssueSuggestionEntity> { |
||||
|
|
||||
|
/** |
||||
|
* 默认分页 |
||||
|
* |
||||
|
* @param params |
||||
|
* @return PageData<IssueSuggestionDTO> |
||||
|
* @author generator |
||||
|
* @date 2020-11-18 |
||||
|
*/ |
||||
|
PageData<IssueSuggestionDTO> page(Map<String, Object> params); |
||||
|
|
||||
|
/** |
||||
|
* 默认查询 |
||||
|
* |
||||
|
* @param params |
||||
|
* @return java.util.List<IssueSuggestionDTO> |
||||
|
* @author generator |
||||
|
* @date 2020-11-18 |
||||
|
*/ |
||||
|
List<IssueSuggestionDTO> list(Map<String, Object> params); |
||||
|
|
||||
|
/** |
||||
|
* 单条查询 |
||||
|
* |
||||
|
* @param id |
||||
|
* @return IssueSuggestionDTO |
||||
|
* @author generator |
||||
|
* @date 2020-11-18 |
||||
|
*/ |
||||
|
IssueSuggestionDTO get(String id); |
||||
|
|
||||
|
/** |
||||
|
* 默认保存 |
||||
|
* |
||||
|
* @param dto |
||||
|
* @return void |
||||
|
* @author generator |
||||
|
* @date 2020-11-18 |
||||
|
*/ |
||||
|
void save(IssueSuggestionDTO dto); |
||||
|
|
||||
|
/** |
||||
|
* 默认更新 |
||||
|
* |
||||
|
* @param dto |
||||
|
* @return void |
||||
|
* @author generator |
||||
|
* @date 2020-11-18 |
||||
|
*/ |
||||
|
void update(IssueSuggestionDTO dto); |
||||
|
|
||||
|
/** |
||||
|
* 批量删除 |
||||
|
* |
||||
|
* @param ids |
||||
|
* @return void |
||||
|
* @author generator |
||||
|
* @date 2020-11-18 |
||||
|
*/ |
||||
|
void delete(String[] ids); |
||||
|
|
||||
|
/** |
||||
|
* @param formDTO |
||||
|
* @author yinzuomei |
||||
|
* @description 查询用户对于某个议题的想法 返回一条记录 |
||||
|
* @Date 2020/11/18 10:12 |
||||
|
**/ |
||||
|
IssueSuggestionDTO queryUserIssueSuggestion(UserIssueSuggestionFormDTO formDTO); |
||||
|
} |
@ -0,0 +1,111 @@ |
|||||
|
/** |
||||
|
* Copyright 2018 人人开源 https://www.renren.io
|
||||
|
* <p> |
||||
|
* This program is free software: you can redistribute it and/or modify |
||||
|
* it under the terms of the GNU General Public License as published by |
||||
|
* the Free Software Foundation, either version 3 of the License, or |
||||
|
* (at your option) any later version. |
||||
|
* <p> |
||||
|
* This program is distributed in the hope that it will be useful, |
||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
|
* GNU General Public License for more details. |
||||
|
* <p> |
||||
|
* You should have received a copy of the GNU General Public License |
||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
*/ |
||||
|
|
||||
|
package com.epmet.service.impl; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
||||
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||
|
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; |
||||
|
import com.epmet.commons.tools.constant.FieldConstant; |
||||
|
import com.epmet.commons.tools.page.PageData; |
||||
|
import com.epmet.commons.tools.utils.ConvertUtils; |
||||
|
import com.epmet.dao.IssueSuggestionDao; |
||||
|
import com.epmet.dto.IssueSuggestionDTO; |
||||
|
import com.epmet.dto.form.UserIssueSuggestionFormDTO; |
||||
|
import com.epmet.entity.IssueSuggestionEntity; |
||||
|
import com.epmet.service.IssueSuggestionService; |
||||
|
import org.apache.commons.lang3.StringUtils; |
||||
|
import org.springframework.stereotype.Service; |
||||
|
import org.springframework.transaction.annotation.Transactional; |
||||
|
|
||||
|
import java.util.Arrays; |
||||
|
import java.util.List; |
||||
|
import java.util.Map; |
||||
|
|
||||
|
/** |
||||
|
* 居民端用户对议题建议或意见表 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2020-11-18 |
||||
|
*/ |
||||
|
@Service |
||||
|
public class IssueSuggestionServiceImpl extends BaseServiceImpl<IssueSuggestionDao, IssueSuggestionEntity> implements IssueSuggestionService { |
||||
|
|
||||
|
@Override |
||||
|
public PageData<IssueSuggestionDTO> page(Map<String, Object> params) { |
||||
|
IPage<IssueSuggestionEntity> page = baseDao.selectPage( |
||||
|
getPage(params, FieldConstant.CREATED_TIME, false), |
||||
|
getWrapper(params) |
||||
|
); |
||||
|
return getPageData(page, IssueSuggestionDTO.class); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public List<IssueSuggestionDTO> list(Map<String, Object> params) { |
||||
|
List<IssueSuggestionEntity> entityList = baseDao.selectList(getWrapper(params)); |
||||
|
|
||||
|
return ConvertUtils.sourceToTarget(entityList, IssueSuggestionDTO.class); |
||||
|
} |
||||
|
|
||||
|
private QueryWrapper<IssueSuggestionEntity> getWrapper(Map<String, Object> params){ |
||||
|
String id = (String)params.get(FieldConstant.ID_HUMP); |
||||
|
|
||||
|
QueryWrapper<IssueSuggestionEntity> wrapper = new QueryWrapper<>(); |
||||
|
wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); |
||||
|
|
||||
|
return wrapper; |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public IssueSuggestionDTO get(String id) { |
||||
|
IssueSuggestionEntity entity = baseDao.selectById(id); |
||||
|
return ConvertUtils.sourceToTarget(entity, IssueSuggestionDTO.class); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
@Transactional(rollbackFor = Exception.class) |
||||
|
public void save(IssueSuggestionDTO dto) { |
||||
|
IssueSuggestionEntity entity = ConvertUtils.sourceToTarget(dto, IssueSuggestionEntity.class); |
||||
|
insert(entity); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
@Transactional(rollbackFor = Exception.class) |
||||
|
public void update(IssueSuggestionDTO dto) { |
||||
|
IssueSuggestionEntity entity = ConvertUtils.sourceToTarget(dto, IssueSuggestionEntity.class); |
||||
|
updateById(entity); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
@Transactional(rollbackFor = Exception.class) |
||||
|
public void delete(String[] ids) { |
||||
|
// 逻辑删除(@TableLogic 注解)
|
||||
|
baseDao.deleteBatchIds(Arrays.asList(ids)); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @param formDTO |
||||
|
* @author yinzuomei |
||||
|
* @description 查询用户对于某个议题的想法 返回一条记录 |
||||
|
* @Date 2020/11/18 10:12 |
||||
|
**/ |
||||
|
@Override |
||||
|
public IssueSuggestionDTO queryUserIssueSuggestion(UserIssueSuggestionFormDTO formDTO) { |
||||
|
return baseDao.selectUserIssueSuggestion(formDTO); |
||||
|
} |
||||
|
|
||||
|
} |
@ -0,0 +1,37 @@ |
|||||
|
drop table if exists issue_application; |
||||
|
CREATE TABLE `issue_application` ( |
||||
|
`ID` varchar(64) NOT NULL COMMENT '主键', |
||||
|
`CUSTOMER_ID` varchar(32) NOT NULL COMMENT '客户ID', |
||||
|
`ISSUE_TITLE` varchar(128) NOT NULL COMMENT '议题名称 ', |
||||
|
`SUGGESTION` varchar(1024) NOT NULL COMMENT '建议', |
||||
|
`APPLY_STATUS` varchar(32) NOT NULL COMMENT '审核状态:under_auditing:待审核;approved:通过;rejected:驳回', |
||||
|
`TOPIC_ID` varchar(32) NOT NULL COMMENT '话题id', |
||||
|
`GROUP_ID` varchar(64) NOT NULL COMMENT '小组id', |
||||
|
`GRID_ID` varchar(32) NOT NULL COMMENT '网格ID 居民端议题对应一个网格Id', |
||||
|
`ISSUE_ID` varchar(64) DEFAULT NULL COMMENT '审核通过后对应的 议题id', |
||||
|
`PASSED_REASON` varchar(1024) DEFAULT NULL COMMENT '审核通过时填写的理由', |
||||
|
`DEL_FLAG` varchar(1) NOT NULL DEFAULT '0' COMMENT '删除标识 0未删除、1已删除', |
||||
|
`REVISION` int(11) NOT NULL DEFAULT '0' COMMENT '乐观锁', |
||||
|
`CREATED_BY` varchar(32) NOT NULL COMMENT '创建人', |
||||
|
`CREATED_TIME` datetime NOT NULL COMMENT '创建时间:第一次提交审核的时间,注意和历史表的第一条记录时间一致', |
||||
|
`UPDATED_BY` varchar(32) NOT NULL COMMENT '更新人', |
||||
|
`UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', |
||||
|
PRIMARY KEY (`ID`) |
||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='话题转议题申请表'; |
||||
|
|
||||
|
drop table if exists issue_application_history; |
||||
|
CREATE TABLE `issue_application_history` ( |
||||
|
`ID` varchar(64) NOT NULL COMMENT '主键', |
||||
|
`CUSTOMER_ID` varchar(32) NOT NULL COMMENT '客户ID', |
||||
|
`ISSUE_APPLICATION_ID` varchar(64) NOT NULL COMMENT '话题转议题申请表 issue_application.id', |
||||
|
`ACTION_TYPE` varchar(32) NOT NULL COMMENT 'under_auditing:提交审核;\r\napproved:审核通过,\r\nrejected:驳回', |
||||
|
`REASON` varchar(1024) DEFAULT NULL COMMENT '审核时的说明', |
||||
|
`STAFF_NAME` varchar(255) DEFAULT NULL COMMENT '工作端人员姓名', |
||||
|
`DEL_FLAG` varchar(1) NOT NULL DEFAULT '0' COMMENT '删除标识:0 未删除 1已删除', |
||||
|
`REVISION` int(11) NOT NULL DEFAULT '0' COMMENT '乐观锁', |
||||
|
`CREATED_BY` varchar(64) NOT NULL COMMENT '创建人 提交人', |
||||
|
`CREATED_TIME` datetime NOT NULL COMMENT '创建时间', |
||||
|
`UPDATED_BY` varchar(64) NOT NULL COMMENT '修改人ID', |
||||
|
`UPDATED_TIME` datetime NOT NULL COMMENT '修改时间', |
||||
|
PRIMARY KEY (`ID`) |
||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='话题转议题审核历史表'; |
@ -0,0 +1,16 @@ |
|||||
|
drop table if exists issue_suggestion; |
||||
|
CREATE TABLE `issue_suggestion` ( |
||||
|
`ID` varchar(64) NOT NULL COMMENT '主键', |
||||
|
`CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户Id customer.id', |
||||
|
`ISSUE_ID` varchar(64) NOT NULL COMMENT '议题id', |
||||
|
`GRID_ID` varchar(64) NOT NULL COMMENT '议题所属网格id', |
||||
|
`SUGGESTION` varchar(512) NOT NULL COMMENT '对议题的想法', |
||||
|
`PUBLIC_FLAG` tinyint(1) NOT NULL COMMENT '1公开; 0匿名', |
||||
|
`DEL_FLAG` varchar(1) NOT NULL DEFAULT '0' COMMENT '删除标识:0 未删除 1已删除', |
||||
|
`REVISION` int(11) NOT NULL DEFAULT '0' COMMENT '乐观锁', |
||||
|
`CREATED_BY` varchar(64) NOT NULL COMMENT '提建议的人', |
||||
|
`CREATED_TIME` datetime NOT NULL COMMENT '创建时间', |
||||
|
`UPDATED_BY` varchar(64) NOT NULL COMMENT '修改人ID', |
||||
|
`UPDATED_TIME` datetime NOT NULL COMMENT '修改时间', |
||||
|
PRIMARY KEY (`ID`) |
||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='居民端用户对议题建议或意见表'; |
@ -0,0 +1,18 @@ |
|||||
|
<?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="com.epmet.dao.IssueSuggestionDao"> |
||||
|
<!-- 查询用户对于某个议题的想法 返回一条记录 --> |
||||
|
<select id="selectUserIssueSuggestion" parameterType="com.epmet.dto.form.UserIssueSuggestionFormDTO" resultType="com.epmet.dto.IssueSuggestionDTO"> |
||||
|
SELECT |
||||
|
* |
||||
|
FROM |
||||
|
issue_suggestion i |
||||
|
WHERE |
||||
|
i.DEL_FLAG = '0' |
||||
|
AND i.ISSUE_ID = #{issueId} |
||||
|
AND i.CREATED_BY=#{userId} |
||||
|
</select> |
||||
|
|
||||
|
|
||||
|
</mapper> |
Loading…
Reference in new issue