Commit 96865929 authored by wuwz's avatar wuwz

装修公司

parent ec4f8270
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>个人信息-$!{config.title}</title>
<meta name="keywords" content="$!config.keywords" />
<meta name="description" content="$!config.description" />
<meta name="generator" content="shopping 2.0" />
<meta name="author" content="www.shopping.com">
<meta name="copyright" content="shopping Inc. All Rights Reserved">
<link href="$!webPath/resources/style/system/front/default/css/public.css" type="text/css" rel="stylesheet" />
<link href="$!webPath/resources/style/system/front/default/css/user.css" type="text/css" rel="stylesheet" />
<link href="$!webPath/resources/style/common/css/jquery-ui-1.8.22.custom.css" type=text/css rel=stylesheet>
<link href="$!webPath/resources/style/system/front/default/css/upload.css" type="text/css" rel="stylesheet" />
<script src="$!webPath/resources/js/jquery-1.11.0.min.js"></script>
<script>
</script>
<style>
td#centerbg {
padding: 0 0 0 25px;
}
#opertitle{
height:35px;
}
.proname{width: 200px;padding: 10px;}
.opertr td{
padding:10px;}
table.user_table table {
background: #fff;
}
.alldel{height: 50px;margin-top: 10px;}
</style>
</head>
<body>
$!httpInclude.include("/top.htm")
$!httpInclude.include("/seller/nav_head.htm")
<div class="seller_nav" #if(!$!user.store) style="height:auto;"#end> <i class="seller_navr"></i> <i class="seller_navl"></i>
<div class="main">
<ul>
<li><span><a href="$!webPath/seller/index.htm">卖家中心</a></span>
</li>
<li><span><a href="$!webPath/buyer/index.htm">买家中心</a></span></li>
<li><span><a href="$!webPath/buyer/account.htm">我的账户</a></span></li>
<li><span><a href="$!webPath/design/decorate_message.htm">设计师</a></span></li>
<li class="this"><span><a href="$!webPath/design/decorate_message.htm">装修公司</a></span></li>
</ul>
#if($!user.store)
<span class="seller_nav_a"><a href="javascript:void(0);" dialog_uri="$!webPath/seller/store_quick_menu.htm" dialog_title="设置快捷操作" dialog_width="730" dialog_height="100" dialog_id="store_quick_menu">设置快捷操作</a></span>
#end
</div>
</div>
<div class="main">
<div class="user_center">
<table width="1000" border="0" cellspacing="0" cellpadding="0" class="user_table">
<tr>
<td width="177" id="userbg" valign="top">
<div class="seller">
<!--店铺设置-->
<div class="product_manage2">
<div class="protitle_seller">设计师中心</div>
<ul class="sellul">
<ul>
<li><a href="$!webPath/design/decorate_message.htm" target="_blank">资料管理</a></li>
<li><a href="javascript:void(0);" child_show="true"><b><img src="$!webPath/resources/style/system/front/default/images/usercenter/seller_menu_sub.png" width="9" height="9" /></b>作品管理</a>
<ul>
<li op="goods"><a href='$!webPath/design/decorate_works_edit.htm'>作品新增</a></li>
<li op="goods"><a href='$!webPath/design/decorate_work_list.htm'>作品管理</a></li>
</ul>
</li>
</ul>
</ul>
</div>
</div>
</td>
<td id="centerbg" valign="top">
<table>
<tr>
<td colspan="4">
<div class="buyer_position">
<div class="buyer_p_box">
<a href="$!webPath/design/decorate_message.htm">装修公司</a> >
<span>作品管理</span>
</div>
</div>
</td>
</tr>
<tr id="opertitle">
<td width="220">作品封面</td>
<td class="proname" width="220">作品名称</td>
<td width="217" class="proclassify">装修类型</td>
<td width="217" class="proclassify">装修风格</td>
<td width="240" align="center">操作</td>
</tr>
#if($objs)
#foreach($obj in $objs)
<tr class="opertr">
<td class="proname" valign="middle" >
#if($obj.main_img)
#set($img="$!webPath/$!{obj.main_img.path}/$!{obj.main_img.name}")
#end
</span><span class="imgpro">
<img src="$img" width="60" height="63" /></span><span class="nameproduct">
</span></td>
<td class="proclassify" >#if($!obj.worksName) $!{obj.worksName} #end</td>
<td class="promoney">#if($!obj.decorateType.typeName) $!{obj.decorateType.typeName} #end</td>
<td class="promoney">#if($!obj.decorateStyle.styleName) $!{obj.decorateStyle.styleName} #end</td>
<td class="operajt"><span class="edit"><a href="$!webPath/design/works_edit.htm?id=$!obj.id" target="_blank">编辑</a></span>
<span class="del">
<!-- <a href="javascript:if(confirm('删除后不可恢复?'))window.location.href='$!webPath/seller/goods_del.htm?mulitId=$!obj.id'">删除</a></span></td> -->
</tr>
#end
#end
<tr>
<td colspan="4">
<div class="alldel">
<div class="userfenye">$!gotoPageHTML</div>
</div>
</td>
</tr>
</table>
</td>
</tr>
</table>
</div>
</div>
$!httpInclude.include("/footer.htm")
</body>
</html>
...@@ -194,6 +194,7 @@ $!httpInclude.include("/seller/nav_head.htm") ...@@ -194,6 +194,7 @@ $!httpInclude.include("/seller/nav_head.htm")
<li><span><a href="$!webPath/buyer/index.htm">买家中心</a></span></li> <li><span><a href="$!webPath/buyer/index.htm">买家中心</a></span></li>
<li><span><a href="$!webPath/buyer/account.htm">我的账户</a></span></li> <li><span><a href="$!webPath/buyer/account.htm">我的账户</a></span></li>
<li class="this"><span><a href="$!webPath/design/design_message.htm">设计师</a></span></li> <li class="this"><span><a href="$!webPath/design/design_message.htm">设计师</a></span></li>
<li><span><a href="$!webPath/design/decorate_message.htm">装修公司</a></span></li>
</ul> </ul>
#if($!user.store) #if($!user.store)
<span class="seller_nav_a"><a href="javascript:void(0);" dialog_uri="$!webPath/seller/store_quick_menu.htm" dialog_title="设置快捷操作" dialog_width="730" dialog_height="100" dialog_id="store_quick_menu">设置快捷操作</a></span> <span class="seller_nav_a"><a href="javascript:void(0);" dialog_uri="$!webPath/seller/store_quick_menu.htm" dialog_title="设置快捷操作" dialog_width="730" dialog_height="100" dialog_id="store_quick_menu">设置快捷操作</a></span>
......
...@@ -74,6 +74,7 @@ $!httpInclude.include("/seller/nav_head.htm") ...@@ -74,6 +74,7 @@ $!httpInclude.include("/seller/nav_head.htm")
<li><span><a href="$!webPath/buyer/index.htm">买家中心</a></span></li> <li><span><a href="$!webPath/buyer/index.htm">买家中心</a></span></li>
<li><span><a href="$!webPath/buyer/account.htm">我的账户</a></span></li> <li><span><a href="$!webPath/buyer/account.htm">我的账户</a></span></li>
<li><span><a href="$!webPath/design/design_message.htm">设计师</a></span></li> <li><span><a href="$!webPath/design/design_message.htm">设计师</a></span></li>
<li><span><a href="$!webPath/design/decorate_message.htm">装修公司</a></span></li>
</ul> </ul>
#if($!user.store) #if($!user.store)
<span class="seller_nav_a"><a href="javascript:void(0);" dialog_uri="$!webPath/seller/store_quick_menu.htm" dialog_title="设置快捷操作" dialog_width="730" dialog_height="100" dialog_id="store_quick_menu">设置快捷操作</a></span> <span class="seller_nav_a"><a href="javascript:void(0);" dialog_uri="$!webPath/seller/store_quick_menu.htm" dialog_title="设置快捷操作" dialog_width="730" dialog_height="100" dialog_id="store_quick_menu">设置快捷操作</a></span>
......
...@@ -35,6 +35,14 @@ ...@@ -35,6 +35,14 @@
<filter-name>jpaFilter</filter-name> <filter-name>jpaFilter</filter-name>
<url-pattern>*.htm</url-pattern> <url-pattern>*.htm</url-pattern>
</filter-mapping> </filter-mapping>
<!-- <filter>
<filter-name>hibernate-session</filter-name>
<filter-class>org.springframework.orm.hibernate3.support.OpenSessionInViewFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>hibernate-session</filter-name>
<url-pattern>*.htm</url-pattern>
</filter-mapping> -->
<!--编码过滤器--> <!--编码过滤器-->
<filter> <filter>
<filter-name>encoding-filter</filter-name> <filter-name>encoding-filter</filter-name>
......
package com.shopping.foundation.dao;
import org.springframework.stereotype.Repository;
import com.shopping.core.base.GenericDAO;
import com.shopping.foundation.domain.Decorate;
@Repository("decorateDAO")
public class DecorateDAO extends GenericDAO<Decorate> {
}
package com.shopping.foundation.dao;
import org.springframework.stereotype.Repository;
import com.shopping.core.base.GenericDAO;
import com.shopping.foundation.domain.DecorateStyle;
@Repository("decorateStyleDAO")
public class DecorateStyleDAO extends GenericDAO<DecorateStyle> {
}
package com.shopping.foundation.dao;
import org.springframework.stereotype.Repository;
import com.shopping.core.base.GenericDAO;
import com.shopping.foundation.domain.DecorateType;
@Repository("decorateTypeDAO")
public class DecorateTypeDAO extends GenericDAO<DecorateType> {
}
package com.shopping.foundation.dao;
import org.springframework.stereotype.Repository;
import com.shopping.core.base.GenericDAO;
import com.shopping.foundation.domain.DecorateWork;
@Repository("decorateWorkDAO")
public class DecorateWorkDAO extends GenericDAO<DecorateWork> {
}
...@@ -69,6 +69,10 @@ public class Accessory extends IdEntity { ...@@ -69,6 +69,10 @@ public class Accessory extends IdEntity {
@ManyToMany(mappedBy = "accessory") @ManyToMany(mappedBy = "accessory")
private List<Works> works = new ArrayList<Works>(); private List<Works> works = new ArrayList<Works>();
// 做品图片
@ManyToMany(mappedBy = "accessory")
private List<DecorateWork> decorateWorks = new ArrayList<DecorateWork>();
/*@OneToOne /*@OneToOne
private Works main_img;*/ private Works main_img;*/
......
package com.shopping.foundation.domain;
import java.util.ArrayList;
import java.util.List;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinTable;
import javax.persistence.ManyToMany;
import javax.persistence.OneToMany;
import javax.persistence.OneToOne;
import javax.persistence.Table;
import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;
import com.shopping.core.domain.IdEntity;
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
@Entity
@Table(name = "shopping_decorate")
public class Decorate extends IdEntity {
// 名
private String decorationName;
// 咨询次数
private Long consult;
// 区域
@OneToOne(fetch = FetchType.EAGER)
private Area area;
// 师用户
@OneToOne(fetch = FetchType.EAGER)
private User user;
@OneToOne(cascade = { javax.persistence.CascadeType.REMOVE }, fetch = FetchType.EAGER)
private Accessory acc;
// 地址
private String decorationArea;
// 联系方式
private String decorationPhone;
@ManyToMany (fetch = FetchType.LAZY)
@JoinTable(name = "shopping_decorate_style_relation", joinColumns = {
@javax.persistence.JoinColumn(name = "decorate_id") }, inverseJoinColumns = {
@javax.persistence.JoinColumn(name = "style_id") })
private List<DecorateStyle> decorateStyle = new ArrayList<DecorateStyle>();
@ManyToMany (fetch = FetchType.LAZY)
@JoinTable(name = "shopping_decorate_type_relation", joinColumns = {
@javax.persistence.JoinColumn(name = "decorate_id") }, inverseJoinColumns = {
@javax.persistence.JoinColumn(name = "type_id") })
private List<DecorateType> decorateType = new ArrayList<DecorateType>();
// 装修公司作品
@OneToMany(mappedBy = "decorateWorks", targetEntity = DecorateWork.class, fetch = FetchType.LAZY)
private List<DecorateWork> works = new ArrayList<DecorateWork>();
public String getDecorationName() {
return decorationName;
}
public void setDecorationName(String decorationName) {
this.decorationName = decorationName;
}
public Long getConsult() {
return consult;
}
public void setConsult(Long consult) {
this.consult = consult;
}
public Area getArea() {
return area;
}
public void setArea(Area area) {
this.area = area;
}
public User getUser() {
return user;
}
public void setUser(User user) {
this.user = user;
}
public Accessory getAcc() {
return acc;
}
public void setAcc(Accessory acc) {
this.acc = acc;
}
public String getDecorationArea() {
return decorationArea;
}
public void setDecorationArea(String decorationArea) {
this.decorationArea = decorationArea;
}
public String getDecorationPhone() {
return decorationPhone;
}
public void setDecorationPhone(String decorationPhone) {
this.decorationPhone = decorationPhone;
}
public List<DecorateStyle> getDecorateStyle() {
return decorateStyle;
}
public void setDecorateStyle(List<DecorateStyle> decorateStyle) {
this.decorateStyle = decorateStyle;
}
public List<DecorateType> getDecorateType() {
return decorateType;
}
public void setDecorateType(List<DecorateType> decorateType) {
this.decorateType = decorateType;
}
public List<DecorateWork> getWorks() {
return works;
}
public void setWorks(List<DecorateWork> works) {
this.works = works;
}
}
package com.shopping.foundation.domain;
import java.util.ArrayList;
import java.util.List;
import javax.persistence.Entity;
import javax.persistence.ManyToMany;
import javax.persistence.Table;
import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;
import com.shopping.core.domain.IdEntity;
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
@Entity
@Table(name = "shopping_decorate_style")
public class DecorateStyle extends IdEntity {
// 名
private String styleName;
// 排序序列
private int sequence;
@ManyToMany(mappedBy = "decorateStyle")
private List<Decorate> decorates = new ArrayList<Decorate>();
public String getStyleName() {
return styleName;
}
public void setStyleName(String styleName) {
this.styleName = styleName;
}
public int getSequence() {
return sequence;
}
public void setSequence(int sequence) {
this.sequence = sequence;
}
public List<Decorate> getDecorates() {
return decorates;
}
public void setDecorates(List<Decorate> decorates) {
this.decorates = decorates;
}
}
package com.shopping.foundation.domain;
import java.util.ArrayList;
import java.util.List;
import javax.persistence.Entity;
import javax.persistence.ManyToMany;
import javax.persistence.Table;
import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;
import com.shopping.core.domain.IdEntity;
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
@Entity
@Table(name = "shopping_decorate_type")
public class DecorateType extends IdEntity {
// 名
private String typeName;
// 排序序列
private int sequence;
@ManyToMany(mappedBy = "decorateType")
private List<Decorate> decorate = new ArrayList<Decorate>();
public String getTypeName() {
return typeName;
}
public void setTypeName(String typeName) {
this.typeName = typeName;
}
public int getSequence() {
return sequence;
}
public void setSequence(int sequence) {
this.sequence = sequence;
}
public List<Decorate> getDecorate() {
return decorate;
}
public void setDecorate(List<Decorate> decorate) {
this.decorate = decorate;
}
}
package com.shopping.foundation.domain;
import java.util.ArrayList;
import java.util.List;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinTable;
import javax.persistence.ManyToMany;
import javax.persistence.ManyToOne;
import javax.persistence.OneToOne;
import javax.persistence.Table;
import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;
import com.shopping.core.domain.IdEntity;
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
@Entity
@Table(name = "shopping_decorate_work")
public class DecorateWork extends IdEntity {
//作品名称
private String worksName;
@ManyToOne(targetEntity = Decorate.class, fetch = FetchType.LAZY)
@JoinTable(name = "shopping_decorate_work_relation", joinColumns = {
@javax.persistence.JoinColumn(name = "work_id") }, inverseJoinColumns = {
@javax.persistence.JoinColumn(name = "decorate_id") })
private Decorate decorateWorks;
@ManyToMany(fetch = FetchType.EAGER)
@JoinTable(name = "shopping_decowork_photo_relation", joinColumns = {
@javax.persistence.JoinColumn(name = "decorate_works_id") }, inverseJoinColumns = {
@javax.persistence.JoinColumn(name = "photo_id") })
private List<Accessory> accessory = new ArrayList<Accessory>();
//作品主图
@OneToOne
private Accessory main_img;
//作品描述
private String introduction;
//作品类型
@OneToOne
private DecorateType decorateType;
//作品风格
@OneToOne
private DecorateStyle decorateStyle;
public String getWorksName() {
return worksName;
}
public void setWorksName(String worksName) {
this.worksName = worksName;
}
public Decorate getDecorateWorks() {
return decorateWorks;
}
public void setDecorateWorks(Decorate decorateWorks) {
this.decorateWorks = decorateWorks;
}
public List<Accessory> getAccessory() {
return accessory;
}
public void setAccessory(List<Accessory> accessory) {
this.accessory = accessory;
}
public Accessory getMain_img() {
return main_img;
}
public void setMain_img(Accessory main_img) {
this.main_img = main_img;
}
public String getIntroduction() {
return introduction;
}
public void setIntroduction(String introduction) {
this.introduction = introduction;
}
public DecorateType getDecorateType() {
return decorateType;
}
public void setDecorateType(DecorateType decorateType) {
this.decorateType = decorateType;
}
public DecorateStyle getDecorateStyle() {
return decorateStyle;
}
public void setDecorateStyle(DecorateStyle decorateStyle) {
this.decorateStyle = decorateStyle;
}
}
...@@ -7,7 +7,6 @@ import javax.persistence.Entity; ...@@ -7,7 +7,6 @@ import javax.persistence.Entity;
import javax.persistence.FetchType; import javax.persistence.FetchType;
import javax.persistence.JoinTable; import javax.persistence.JoinTable;
import javax.persistence.ManyToMany; import javax.persistence.ManyToMany;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany; import javax.persistence.OneToMany;
import javax.persistence.OneToOne; import javax.persistence.OneToOne;
import javax.persistence.Table; import javax.persistence.Table;
......
...@@ -32,7 +32,7 @@ public class DesignExpert extends IdEntity { ...@@ -32,7 +32,7 @@ public class DesignExpert extends IdEntity {
// 排序序列 // 排序序列
private int sequence; private int sequence;
// 设计师 // 设计师 designExpert
@ManyToMany(mappedBy = "designExpert") @ManyToMany(mappedBy = "designExpert")
private List<Design> design = new ArrayList<Design>(); private List<Design> design = new ArrayList<Design>();
......
...@@ -11,6 +11,7 @@ import java.util.TreeSet; ...@@ -11,6 +11,7 @@ import java.util.TreeSet;
import javax.persistence.Column; import javax.persistence.Column;
import javax.persistence.Entity; import javax.persistence.Entity;
import javax.persistence.FetchType; import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.JoinTable; import javax.persistence.JoinTable;
import javax.persistence.ManyToMany; import javax.persistence.ManyToMany;
import javax.persistence.ManyToOne; import javax.persistence.ManyToOne;
...@@ -252,6 +253,18 @@ public class User extends IdEntity implements UserDetails { ...@@ -252,6 +253,18 @@ public class User extends IdEntity implements UserDetails {
//会员级别 //会员级别
private int level; private int level;
// 装修公司信息
@OneToOne
private Decorate decorate;
public Decorate getDecorate() {
return decorate;
}
public void setDecorate(Decorate decorate) {
this.decorate = decorate;
}
public int getLevel() { public int getLevel() {
return level; return level;
} }
......
package com.shopping.foundation.domain.query;
import org.springframework.web.servlet.ModelAndView;
import com.shopping.core.query.QueryObject;
public class DecorateQueryObject extends QueryObject {
public DecorateQueryObject(String currentPage, ModelAndView mv, String orderBy, String orderType) {
super(currentPage, mv, orderBy, orderType);
}
public DecorateQueryObject() {
}
}
package com.shopping.foundation.domain.query;
import org.springframework.web.servlet.ModelAndView;
import com.shopping.core.query.QueryObject;
public class DecorateStyleQueryObject extends QueryObject {
public DecorateStyleQueryObject(String currentPage, ModelAndView mv, String orderBy, String orderType) {
super(currentPage, mv, orderBy, orderType);
}
public DecorateStyleQueryObject() {
}
}
package com.shopping.foundation.domain.query;
import org.springframework.web.servlet.ModelAndView;
import com.shopping.core.query.QueryObject;
public class DecorateTypeQueryObject extends QueryObject {
public DecorateTypeQueryObject(String currentPage, ModelAndView mv, String orderBy, String orderType) {
super(currentPage, mv, orderBy, orderType);
}
public DecorateTypeQueryObject() {
}
}
package com.shopping.foundation.domain.query;
import org.springframework.web.servlet.ModelAndView;
import com.shopping.core.query.QueryObject;
public class DecorateWorkQueryObject extends QueryObject {
public DecorateWorkQueryObject(String currentPage, ModelAndView mv, String orderBy, String orderType) {
super(currentPage, mv, orderBy, orderType);
}
public DecorateWorkQueryObject() {
}
}
package com.shopping.foundation.service;
import java.util.List;
import java.util.Map;
import com.shopping.core.query.support.IPageList;
import com.shopping.core.query.support.IQueryObject;
import com.shopping.foundation.domain.Decorate;
public interface IDecorateService {
public abstract boolean save(Decorate decorate);
public abstract Decorate getObjById(Long paramLong);
public abstract boolean delete(Long paramLong);
public abstract boolean update(Decorate decorate);
public abstract List<Decorate> query(String paramString, Map paramMap, int paramInt1, int paramInt2);
public abstract IPageList list(IQueryObject paramIQueryObject);
}
package com.shopping.foundation.service;
import java.util.List;
import java.util.Map;
import com.shopping.core.query.support.IPageList;
import com.shopping.core.query.support.IQueryObject;
import com.shopping.foundation.domain.DecorateStyle;
public interface IDecorateStyleService {
public abstract boolean save(DecorateStyle decorateStyle);
public abstract DecorateStyle getObjById(Long paramLong);
public abstract boolean delete(Long paramLong);
public abstract boolean update(DecorateStyle decorateStyle);
public abstract List<DecorateStyle> query(String paramString, Map paramMap, int paramInt1, int paramInt2);
public abstract IPageList list(IQueryObject paramIQueryObject);
}
package com.shopping.foundation.service;
import java.util.List;
import java.util.Map;
import com.shopping.core.query.support.IPageList;
import com.shopping.core.query.support.IQueryObject;
import com.shopping.foundation.domain.DecorateType;
public interface IDecorateTypeService {
public abstract boolean save(DecorateType decorateType);
public abstract DecorateType getObjById(Long paramLong);
public abstract boolean delete(Long paramLong);
public abstract boolean update(DecorateType decorateType);
public abstract List<DecorateType> query(String paramString, Map paramMap, int paramInt1, int paramInt2);
public abstract IPageList list(IQueryObject paramIQueryObject);
}
package com.shopping.foundation.service;
import java.util.List;
import java.util.Map;
import com.shopping.core.query.support.IPageList;
import com.shopping.core.query.support.IQueryObject;
import com.shopping.foundation.domain.DecorateWork;
public interface IDecorateWork {
public abstract boolean save(DecorateWork decorateWork);
public abstract DecorateWork getObjById(Long paramLong);
public abstract boolean delete(Long paramLong);
public abstract boolean update(DecorateWork decorateWork);
public abstract List<DecorateWork> query(String paramString, Map paramMap, int paramInt1, int paramInt2);
public abstract IPageList list(IQueryObject paramIQueryObject);
}
package com.shopping.foundation.service.impl;
import java.util.List;
import java.util.Map;
import javax.annotation.Resource;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import com.shopping.core.dao.IGenericDAO;
import com.shopping.core.query.GenericPageList;
import com.shopping.core.query.PageObject;
import com.shopping.core.query.support.IPageList;
import com.shopping.core.query.support.IQueryObject;
import com.shopping.foundation.domain.Decorate;
import com.shopping.foundation.service.IDecorateService;
@Service
@Transactional
public class DecorateServiceImpl implements IDecorateService {
@Resource(name = "decorateDAO")
private IGenericDAO<Decorate> decorateDAO;
@Override
public boolean save(Decorate decorate) {
try {
this.decorateDAO.save(decorate);
return true;
} catch (Exception e) {
e.printStackTrace();
}
return false;
}
@Override
public Decorate getObjById(Long id) {
Decorate decorate = (Decorate)this.decorateDAO.get(id);
if (decorate != null) {
return decorate;
}
return null;
}
@Override
public boolean delete(Long id) {
try {
this.decorateDAO.remove(id);
return true;
} catch (Exception e) {
e.printStackTrace();
}
return false;
}
@Override
public boolean update(Decorate decorate) {
try {
this.decorateDAO.update(decorate);
return true;
} catch (Exception e) {
e.printStackTrace();
}
return false;
}
@Override
public List<Decorate> query(String query, Map params, int begin, int max) {
return this.decorateDAO.query(query, params, begin, max);
}
@Override
public IPageList list(IQueryObject properties) {
if (properties == null) {
return null;
}
String query = properties.getQuery();
Map params = properties.getParameters();
GenericPageList pList = new GenericPageList(Decorate.class, query, params, this.decorateDAO);
if (properties != null) {
PageObject pageObj = properties.getPageObj();
if (pageObj != null)
pList.doList(pageObj.getCurrentPage() == null ? 0 : pageObj.getCurrentPage().intValue(), pageObj.getPageSize() == null ? 0 : pageObj.getPageSize().intValue());
} else {
pList.doList(0, -1);
}
return pList;
}
}
package com.shopping.foundation.service.impl;
import java.util.List;
import java.util.Map;
import javax.annotation.Resource;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import com.shopping.core.dao.IGenericDAO;
import com.shopping.core.query.GenericPageList;
import com.shopping.core.query.PageObject;
import com.shopping.core.query.support.IPageList;
import com.shopping.core.query.support.IQueryObject;
import com.shopping.foundation.domain.DecorateStyle;
import com.shopping.foundation.service.IDecorateStyleService;
@Service
@Transactional
public class DecorateStyleServiceImpl implements IDecorateStyleService {
@Resource(name = "decorateStyleDAO")
private IGenericDAO<DecorateStyle>decorateStyleDAO;
@Override
public boolean save(DecorateStyle decorateStyle) {
try {
this.decorateStyleDAO.save(decorateStyle);
return true;
} catch (Exception e) {
e.printStackTrace();
}
return false;
}
@Override
public DecorateStyle getObjById(Long id) {
DecorateStyle decorateStyle = (DecorateStyle)this.decorateStyleDAO.get(id);
if (decorateStyle != null) {
return decorateStyle;
}
return null;
}
@Override
public boolean delete(Long id) {
try {
this.decorateStyleDAO.remove(id);
return true;
} catch (Exception e) {
e.printStackTrace();
}
return false;
}
@Override
public boolean update(DecorateStyle decorateStyle) {
try {
this.decorateStyleDAO.update(decorateStyle);
return true;
} catch (Exception e) {
e.printStackTrace();
}
return false;
}
@Override
public List<DecorateStyle> query(String query, Map params, int begin, int max) {
return this.decorateStyleDAO.query(query, params, begin, max);
}
@Override
public IPageList list(IQueryObject properties) {
if (properties == null) {
return null;
}
String query = properties.getQuery();
Map params = properties.getParameters();
GenericPageList pList = new GenericPageList(DecorateStyle.class, query, params, this.decorateStyleDAO);
if (properties != null) {
PageObject pageObj = properties.getPageObj();
if (pageObj != null)
pList.doList(pageObj.getCurrentPage() == null ? 0 : pageObj.getCurrentPage().intValue(), pageObj.getPageSize() == null ? 0 : pageObj.getPageSize().intValue());
} else {
pList.doList(0, -1);
}
return pList;
}
}
package com.shopping.foundation.service.impl;
import java.util.List;
import java.util.Map;
import javax.annotation.Resource;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import com.shopping.core.dao.IGenericDAO;
import com.shopping.core.query.GenericPageList;
import com.shopping.core.query.PageObject;
import com.shopping.core.query.support.IPageList;
import com.shopping.core.query.support.IQueryObject;
import com.shopping.foundation.domain.DecorateType;
import com.shopping.foundation.service.IDecorateTypeService;
@Service
@Transactional
public class DecorateTypeServiceImpl implements IDecorateTypeService {
@Resource(name = "decorateTypeDAO")
private IGenericDAO<DecorateType>decorateTypeDAO;
@Override
public boolean save(DecorateType decorateType) {
try {
this.decorateTypeDAO.save(decorateType);
return true;
} catch (Exception e) {
e.printStackTrace();
}
return false;
}
@Override
public DecorateType getObjById(Long id) {
DecorateType decorateType = (DecorateType)this.decorateTypeDAO.get(id);
if (decorateType != null) {
return decorateType;
}
return null;
}
@Override
public boolean delete(Long id) {
try {
this.decorateTypeDAO.remove(id);
return true;
} catch (Exception e) {
e.printStackTrace();
}
return false;
}
@Override
public boolean update(DecorateType decorateType) {
try {
this.decorateTypeDAO.update(decorateType);
return true;
} catch (Exception e) {
e.printStackTrace();
}
return false;
}
@Override
public List<DecorateType> query(String query, Map params, int begin, int max) {
return this.decorateTypeDAO.query(query, params, begin, max);
}
@Override
public IPageList list(IQueryObject properties) {
if (properties == null) {
return null;
}
String query = properties.getQuery();
Map params = properties.getParameters();
GenericPageList pList = new GenericPageList(DecorateType.class, query, params, this.decorateTypeDAO);
if (properties != null) {
PageObject pageObj = properties.getPageObj();
if (pageObj != null)
pList.doList(pageObj.getCurrentPage() == null ? 0 : pageObj.getCurrentPage().intValue(), pageObj.getPageSize() == null ? 0 : pageObj.getPageSize().intValue());
} else {
pList.doList(0, -1);
}
return pList;
}
}
package com.shopping.foundation.service.impl;
import java.util.List;
import java.util.Map;
import javax.annotation.Resource;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import com.shopping.core.dao.IGenericDAO;
import com.shopping.core.query.GenericPageList;
import com.shopping.core.query.PageObject;
import com.shopping.core.query.support.IPageList;
import com.shopping.core.query.support.IQueryObject;
import com.shopping.foundation.domain.DecorateWork;
import com.shopping.foundation.service.IDecorateWork;
@Service
@Transactional
public class DecorateWorkServiceImpl implements IDecorateWork {
@Resource(name = "decorateWorkDAO")
private IGenericDAO<DecorateWork> decorateWorkDAO;
@Override
public boolean save(DecorateWork decorateWork) {
try {
this.decorateWorkDAO.save(decorateWork);
return true;
} catch (Exception e) {
e.printStackTrace();
}
return false;
}
@Override
public DecorateWork getObjById(Long id) {
DecorateWork decorateWork = (DecorateWork)this.decorateWorkDAO.get(id);
if (decorateWork != null) {
return decorateWork;
}
return null;
}
@Override
public boolean delete(Long id) {
try {
this.decorateWorkDAO.remove(id);
return true;
} catch (Exception e) {
e.printStackTrace();
}
return false;
}
@Override
public boolean update(DecorateWork decorateWork) {
try {
this.decorateWorkDAO.update(decorateWork);
return true;
} catch (Exception e) {
e.printStackTrace();
}
return false;
}
@Override
public List<DecorateWork> query(String query, Map params, int begin, int max) {
return this.decorateWorkDAO.query(query, params, begin, max);
}
@Override
public IPageList list(IQueryObject properties) {
if (properties == null) {
return null;
}
String query = properties.getQuery();
Map params = properties.getParameters();
GenericPageList pList = new GenericPageList(DecorateWork.class, query, params, this.decorateWorkDAO);
if (properties != null) {
PageObject pageObj = properties.getPageObj();
if (pageObj != null)
pList.doList(pageObj.getCurrentPage() == null ? 0 : pageObj.getCurrentPage().intValue(), pageObj.getPageSize() == null ? 0 : pageObj.getPageSize().intValue());
} else {
pList.doList(0, -1);
}
return pList;
}
}
This diff is collapsed.
...@@ -277,8 +277,8 @@ public class LoginViewAction { ...@@ -277,8 +277,8 @@ public class LoginViewAction {
String password, String email, String code, String refereeId) throws HttpException, IOException { String password, String email, String code, String refereeId) throws HttpException, IOException {
// 获取refereeId推荐人id // 获取refereeId推荐人id
if ((refereeId == null) || (refereeId.equals(""))) { if (!(refereeId == null) && !(refereeId.equals(""))) {
refereeId = (String) request.getAttribute("refereeId"); //refereeId = (String) request.getAttribute("refereeId");
}else { }else {
refereeId = "32804"; refereeId = "32804";
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment