git-svn-id: https://192.168.57.71/svn/jsgkj@824 931142cf-59ea-a443-aa0e-51397b428577
@@ -1,16 +1,14 @@
package com.xt.js.gkaq.frame.mappers;
+import com.xt.js.gkaq.common.BaseMapper;
import com.xt.js.gkaq.frame.model.ButtonModel;
-import java.util.List;
-public interface ButtonModelMapper {
- int deleteByPrimaryKey(String id);
+public interface ButtonModelMapper extends BaseMapper<ButtonModel> {
- int insert(ButtonModel record);
-
- ButtonModel selectByPrimaryKey(String id);
- List<ButtonModel> selectAll();
- int updateByPrimaryKey(ButtonModel record);
+ /**
+ * 根据菜单ID删除关联的按钮
+ * @param pid
+ * @return
+ */
+ int deleteByMenu(String menu);
}
@@ -1,7 +1,12 @@
package com.xt.js.gkaq.frame.model;
-public class ButtonModel {
- private String id;
+import com.xt.js.gkaq.common.BaseUUIDModel;
+
+public class ButtonModel extends BaseUUIDModel {
+ * serialVersionUID
+ private static final long serialVersionUID = -4829431105521798820L;
private String name;
@@ -15,20 +20,6 @@ public class ButtonModel {
private Long sortno;
- private Object createTime;
- private Object updateTime;
- private String state;
- public String getId() {
- return id;
- }
- public void setId(String id) {
- this.id = id == null ? null : id.trim();
public String getName() {
return name;
@@ -77,27 +68,4 @@ public class ButtonModel {
this.sortno = sortno;
- public Object getCreateTime() {
- return createTime;
- public void setCreateTime(Object createTime) {
- this.createTime = createTime;
- public Object getUpdateTime() {
- return updateTime;
- public void setUpdateTime(Object updateTime) {
- this.updateTime = updateTime;
- public String getState() {
- return state;
- public void setState(String state) {
- this.state = state == null ? null : state.trim();
@@ -0,0 +1,12 @@
+package com.xt.js.gkaq.frame.service;
+import com.xt.js.gkaq.common.BaseUUIDModelService;
+import com.xt.js.gkaq.frame.model.ButtonModel;
+/**
+ * °´Å¥·þÎñ½Ó¿Ú
+public interface ButtonService extends BaseUUIDModelService<ButtonModel> {
+ public int deleteByMenu(String menu);
+}
@@ -0,0 +1,26 @@
+package com.xt.js.gkaq.frame.service.impl;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import com.xt.js.gkaq.common.BaseUUIDModelServiceImpl;
+import com.xt.js.gkaq.frame.mappers.ButtonModelMapper;
+import com.xt.js.gkaq.frame.service.ButtonService;
+@Service
+public class ButtonServiceImpl extends BaseUUIDModelServiceImpl<ButtonModel> implements ButtonService {
+ @Autowired
+ private ButtonModelMapper mapper;
+ @Override
+ protected BaseMapper<ButtonModel> getMapper() {
+ return mapper;
+ }
+ public int deleteByMenu(String menu) {
+ return mapper.deleteByMenu(menu);
@@ -49,4 +49,8 @@
select ID, NAME, CODE, MENU, ICON, REMARK, SORTNO, CREATE_TIME, UPDATE_TIME, STATE
from AQ_BASIC_FRAME_BUTTON
</select>
+ <delete id="deleteByMenu" parameterType="java.lang.String" >
+ delete from AQ_BASIC_FRAME_BUTTON
+ where MENU = #{menu,jdbcType=VARCHAR}
+ </delete>
</mapper>