Browse Source

mapper更新

Signed-off-by: you.chen <you.chen@cloudcross.com>
you.chen 10 years ago
parent
commit
c21c1cc0d3
25 changed files with 482 additions and 482 deletions
  1. 156 156
      src/main/java/com/cloudcross/ssp/base/web/UserController.java
  2. 1 1
      src/main/java/com/cloudcross/ssp/common/utils/ScheduleAclsUtis.java
  3. 3 3
      src/main/java/com/cloudcross/ssp/model/mapper/ad-group.sql.xml
  4. 8 8
      src/main/java/com/cloudcross/ssp/model/mapper/adv-balance.sql.xml
  5. 1 1
      src/main/java/com/cloudcross/ssp/model/mapper/audit-banner.sql.xml
  6. 7 7
      src/main/java/com/cloudcross/ssp/model/mapper/banner-template.sql.xml
  7. 7 7
      src/main/java/com/cloudcross/ssp/model/mapper/banner.sql.xml
  8. 5 5
      src/main/java/com/cloudcross/ssp/model/mapper/finance.sql.xml
  9. 2 2
      src/main/java/com/cloudcross/ssp/model/mapper/log.sql.xml
  10. 1 1
      src/main/java/com/cloudcross/ssp/model/mapper/messageRead.sql.xml
  11. 17 17
      src/main/java/com/cloudcross/ssp/model/mapper/operator-report.sql.xml
  12. 3 3
      src/main/java/com/cloudcross/ssp/model/mapper/operator.sql.xml
  13. 5 5
      src/main/java/com/cloudcross/ssp/model/mapper/wifi.sql.xml
  14. 1 1
      src/main/java/com/cloudcross/ssp/model/mapper/zone-domain.sql.xml
  15. 2 2
      src/main/java/com/cloudcross/ssp/security/MyAuthenticationFilter.java
  16. 2 2
      src/main/java/com/cloudcross/ssp/security/MySecurityMetadataSource.java
  17. 4 4
      src/main/java/com/cloudcross/ssp/security/MyUserDetailServiceImpl.java
  18. 1 1
      src/main/java/com/cloudcross/ssp/service/impl/BannerService.java
  19. 3 3
      src/main/java/com/cloudcross/ssp/web/AccountController.java
  20. 6 6
      src/main/java/com/cloudcross/ssp/web/LoginController.java
  21. 3 3
      src/main/java/com/cloudcross/ssp/web/ResourcesController.java
  22. 3 3
      src/main/java/com/cloudcross/ssp/web/RolesController.java
  23. 49 49
      src/main/java/com/cloudcross/ssp/web/UserLoginListController.java
  24. 95 95
      src/main/java/com/cloudcross/ssp/web/settings/PasswordController.java
  25. 97 97
      src/main/java/com/cloudcross/ssp/web/settings/ProfileController.java

+ 156 - 156
src/main/java/com/cloudcross/ssp/base/web/UserController.java

@@ -1,156 +1,156 @@
-package com.cloudcross.ssp.base.web;
-
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.List;
-
-import org.apache.commons.lang.ArrayUtils;
-import org.apache.commons.lang.StringUtils;
-import org.apache.log4j.Logger;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.ui.Model;
-import org.springframework.web.bind.annotation.ModelAttribute;
-import org.springframework.web.bind.annotation.PathVariable;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RequestParam;
-import org.springframework.web.bind.annotation.ResponseBody;
-
-import com.cloudcross.ssp.back.model.User;
-import com.cloudcross.ssp.back.service.IUserService;
-import com.cloudcross.ssp.common.consts.Status;
-import com.cloudcross.ssp.common.utils.LangUtil;
-import com.cloudcross.ssp.common.utils.MD5;
-import com.cloudcross.ssp.common.utils.Pager;
-
-public abstract class UserController extends SimpleController {
-	private static final Logger LOG = Logger
-			.getLogger(UserController.class);
-	
-	@Autowired
-	protected IUserService userService;
-	
-	/**
-	 * @return 返回到广告主管理第一页。
-	 */
-	@RequestMapping
-	public String index() {
-		return redirect(page("list"));
-	}
-	
-	@RequestMapping("/list")
-	public String list(Model model,
-			@RequestParam HashMap<String, Object> paramMap,
-			@RequestParam(defaultValue="1") int page) {
-		paramMap.put("userGroupType", getUserGroupType());
-		
-		// 搜索条件:账户类型、账户及姓名
-		// 查询总行数
-		int totalRow = userService.countByParams(paramMap);
-
-		Pager pager = new Pager();
-		pager.setPage(page);
-		pager.setTotalRow(totalRow);
-		
-		List<User> userList = userService.findByParams(paramMap, pager);
-		
-		model.addAllAttributes(paramMap);
-		model.addAttribute("pager", pager);
-		model.addAttribute("userList", userList);
-		return page("list");
-	}
-	
-	/**
-	 * @return 创建广告主账号。
-	 */
-	@RequestMapping("/create")
-	public String create() {
-		return page("create");
-	}
-	
-	/**
-	 * @param id
-	 *            广告主ID
-	 * @return 广告主编辑页面。
-	 */
-	@RequestMapping("/edit/{id}")
-	public String edit(Model model, @PathVariable long id) {
-		// 根据id从数据库中查询广告主对象。
-		User user = userService.findById(id);
-		model.addAttribute("user", user);
-		return page("edit");
-	}
-
-	/**
-	 * 单个或者批量启用功能。
-	 * 
-	 * @return 成功则返回"ok"
-	 */
-	@RequestMapping("enable")
-	public @ResponseBody String enable(Long[] id) {
-		LOG.debug("Args's value: id=" + Arrays.toString(id));
-		if (ArrayUtils.isNotEmpty(id)) {
-			userService.updateStatus(LangUtil.array2List(id),
-					Status.enable.value);
-		}
-		return OK;
-	}
-
-	/**
-	 * 单个或者批量禁用功能。 
-	 * 
-	 * @return 成功则返回"ok"
-	 */
-	@RequestMapping("disable")
-	public @ResponseBody String disable(Long[] id) {
-		LOG.debug("Args's value: id=" + Arrays.toString(id));
-		if (ArrayUtils.isNotEmpty(id)) {
-			userService.updateStatus(LangUtil.array2List(id),
-					Status.disable.value);
-		}
-		// 将来会被改
-		return OK;
-	}
-	
-	/**
-	 * 在保存对象前要验证数据是否合法。
-	 * 
-	 * @return 保存成功返回到广告主管理页面。
-	 */
-	@RequestMapping("/save")
-	public String save(
-			@ModelAttribute("form") User user,
-			@RequestParam(value = "ensurePassword", defaultValue = "") String ensurePassword,
-			@RequestParam("userGroupType") String userGroupType) {
-		// 校验参数
-
-		MD5 md5 = MD5.getInstance();
-		String password = user.getPassword();
-		
-		//添加用户
-		if (user.getId() == null) {
-			if (null == userGroupType) {
-				userGroupType = getUserGroupType();
-			}
-			
-			//加密密码
-			user.setPassword(md5.getMD5(password));
-			
-			userService.add(userGroupType, user);
-		} else {
-			// 编辑用户
-			
-			//加密密码
-			if (StringUtils.isNotBlank(password)) {
-				user.setPassword(md5.getMD5(password));
-			}
-			userService.edit(user);
-		}
-		// 跳转到管理页面。
-		return redirect(page("list"));
-	}
-	
-	/**
-	 * @return 
-	 */
-	protected abstract String getUserGroupType(); 
-}
+//package com.cloudcross.ssp.base.web;
+//
+//import java.util.Arrays;
+//import java.util.HashMap;
+//import java.util.List;
+//
+//import org.apache.commons.lang.ArrayUtils;
+//import org.apache.commons.lang.StringUtils;
+//import org.apache.log4j.Logger;
+//import org.springframework.beans.factory.annotation.Autowired;
+//import org.springframework.ui.Model;
+//import org.springframework.web.bind.annotation.ModelAttribute;
+//import org.springframework.web.bind.annotation.PathVariable;
+//import org.springframework.web.bind.annotation.RequestMapping;
+//import org.springframework.web.bind.annotation.RequestParam;
+//import org.springframework.web.bind.annotation.ResponseBody;
+//
+//import com.cloudcross.ssp.back.model.User;
+//import com.cloudcross.ssp.back.service.IUserService;
+//import com.cloudcross.ssp.common.consts.Status;
+//import com.cloudcross.ssp.common.utils.LangUtil;
+//import com.cloudcross.ssp.common.utils.MD5;
+//import com.cloudcross.ssp.common.utils.Pager;
+//
+//public abstract class UserController extends SimpleController {
+//	private static final Logger LOG = Logger
+//			.getLogger(UserController.class);
+//	
+//	@Autowired
+//	protected IUserService userService;
+//	
+//	/**
+//	 * @return 返回到广告主管理第一页。
+//	 */
+//	@RequestMapping
+//	public String index() {
+//		return redirect(page("list"));
+//	}
+//	
+//	@RequestMapping("/list")
+//	public String list(Model model,
+//			@RequestParam HashMap<String, Object> paramMap,
+//			@RequestParam(defaultValue="1") int page) {
+//		paramMap.put("userGroupType", getUserGroupType());
+//		
+//		// 搜索条件:账户类型、账户及姓名
+//		// 查询总行数
+//		int totalRow = userService.countByParams(paramMap);
+//
+//		Pager pager = new Pager();
+//		pager.setPage(page);
+//		pager.setTotalRow(totalRow);
+//		
+//		List<User> userList = userService.findByParams(paramMap, pager);
+//		
+//		model.addAllAttributes(paramMap);
+//		model.addAttribute("pager", pager);
+//		model.addAttribute("userList", userList);
+//		return page("list");
+//	}
+//	
+//	/**
+//	 * @return 创建广告主账号。
+//	 */
+//	@RequestMapping("/create")
+//	public String create() {
+//		return page("create");
+//	}
+//	
+//	/**
+//	 * @param id
+//	 *            广告主ID
+//	 * @return 广告主编辑页面。
+//	 */
+//	@RequestMapping("/edit/{id}")
+//	public String edit(Model model, @PathVariable long id) {
+//		// 根据id从数据库中查询广告主对象。
+//		User user = userService.findById(id);
+//		model.addAttribute("user", user);
+//		return page("edit");
+//	}
+//
+//	/**
+//	 * 单个或者批量启用功能。
+//	 * 
+//	 * @return 成功则返回"ok"
+//	 */
+//	@RequestMapping("enable")
+//	public @ResponseBody String enable(Long[] id) {
+//		LOG.debug("Args's value: id=" + Arrays.toString(id));
+//		if (ArrayUtils.isNotEmpty(id)) {
+//			userService.updateStatus(LangUtil.array2List(id),
+//					Status.enable.value);
+//		}
+//		return OK;
+//	}
+//
+//	/**
+//	 * 单个或者批量禁用功能。 
+//	 * 
+//	 * @return 成功则返回"ok"
+//	 */
+//	@RequestMapping("disable")
+//	public @ResponseBody String disable(Long[] id) {
+//		LOG.debug("Args's value: id=" + Arrays.toString(id));
+//		if (ArrayUtils.isNotEmpty(id)) {
+//			userService.updateStatus(LangUtil.array2List(id),
+//					Status.disable.value);
+//		}
+//		// 将来会被改
+//		return OK;
+//	}
+//	
+//	/**
+//	 * 在保存对象前要验证数据是否合法。
+//	 * 
+//	 * @return 保存成功返回到广告主管理页面。
+//	 */
+//	@RequestMapping("/save")
+//	public String save(
+//			@ModelAttribute("form") User user,
+//			@RequestParam(value = "ensurePassword", defaultValue = "") String ensurePassword,
+//			@RequestParam("userGroupType") String userGroupType) {
+//		// 校验参数
+//
+//		MD5 md5 = MD5.getInstance();
+//		String password = user.getPassword();
+//		
+//		//添加用户
+//		if (user.getId() == null) {
+//			if (null == userGroupType) {
+//				userGroupType = getUserGroupType();
+//			}
+//			
+//			//加密密码
+//			user.setPassword(md5.getMD5(password));
+//			
+//			userService.add(userGroupType, user);
+//		} else {
+//			// 编辑用户
+//			
+//			//加密密码
+//			if (StringUtils.isNotBlank(password)) {
+//				user.setPassword(md5.getMD5(password));
+//			}
+//			userService.edit(user);
+//		}
+//		// 跳转到管理页面。
+//		return redirect(page("list"));
+//	}
+//	
+//	/**
+//	 * @return 
+//	 */
+//	protected abstract String getUserGroupType(); 
+//}

+ 1 - 1
src/main/java/com/cloudcross/ssp/common/utils/ScheduleAclsUtis.java

@@ -12,7 +12,7 @@ import net.sf.json.JSONObject;
 
 
 import org.apache.commons.lang.StringUtils;
 import org.apache.commons.lang.StringUtils;
 
 
-import com.cloudcross.ssp.back.model.AdGroupSchedule;
+import com.cloudcross.ssp.model.AdGroupSchedule;
 
 
 
 
 
 

+ 3 - 3
src/main/java/com/cloudcross/ssp/model/mapper/ad-group.sql.xml

@@ -145,7 +145,7 @@
 		limit #{pager.offset}, #{pager.limit}
 		limit #{pager.offset}, #{pager.limit}
 	</select>
 	</select>
 	
 	
-		<select id="findByParams.back" parameterType="map" resultType="com.cloudcross.ssp.model.AdGroup">
+		<select id="findByParamsBack" parameterType="map" resultType="com.cloudcross.ssp.model.AdGroup">
 		select
 		select
 		<include refid="base_column"/>, count(banner_template_id) as bannerNumber
 		<include refid="base_column"/>, count(banner_template_id) as bannerNumber
 		from t_adgroup left join t_banner
 		from t_adgroup left join t_banner
@@ -292,7 +292,7 @@
 			#{status},NOW(),NOW())
 			#{status},NOW(),NOW())
 	</insert>
 	</insert>
 	
 	
-	<insert id="addAdGroup.back" parameterType="com.cloudcross.ssp.model.AdGroup"  useGeneratedKeys="true"
+	<insert id="addAdGroupBack" parameterType="com.cloudcross.ssp.model.AdGroup"  useGeneratedKeys="true"
 		keyProperty="id">
 		keyProperty="id">
 		insert into t_adgroup
 		insert into t_adgroup
 			(name,campaign_id,order_id,activate_time,expire_time,totalbudget,
 			(name,campaign_id,order_id,activate_time,expire_time,totalbudget,
@@ -374,7 +374,7 @@
 		</where>
 		</where>
 	</update>
 	</update>
 	
 	
-		<update id="editAdGroup.back" parameterType="com.cloudcross.ssp.model.AdGroup">
+		<update id="editAdGroupBack" parameterType="com.cloudcross.ssp.model.AdGroup">
 		update t_adgroup
 		update t_adgroup
 		set name = #{adGroupName},
 		set name = #{adGroupName},
 		activate_time = #{startDate},
 		activate_time = #{startDate},

+ 8 - 8
src/main/java/com/cloudcross/ssp/model/mapper/adv-balance.sql.xml

@@ -169,7 +169,7 @@
 	</select>
 	</select>
 
 
 
 
-	<select id="countByParams.back" parameterType="map" resultType="int">
+	<select id="countByParamsBack" parameterType="map" resultType="int">
 		select count(id) from t_adv_balance
 		select count(id) from t_adv_balance
 		<where> 
 		<where> 
 		advertiser_id = 0 and agent_id != 0 and status != -1
 		advertiser_id = 0 and agent_id != 0 and status != -1
@@ -179,7 +179,7 @@
 		</where>
 		</where>
 	</select>
 	</select>
 	
 	
-	<select id="findByParams.back" parameterType="map" resultType="com.cloudcross.ssp.model.AdvBalance">
+	<select id="findByParamsBack" parameterType="map" resultType="com.cloudcross.ssp.model.AdvBalance">
 		select <include refid="base_column"/>, name as agentName from t_adv_balance left join
 		select <include refid="base_column"/>, name as agentName from t_adv_balance left join
 		t_adv_agent on t_adv_balance.agent_id = t_adv_agent.id
 		t_adv_agent on t_adv_balance.agent_id = t_adv_agent.id
 		<where> 
 		<where> 
@@ -192,7 +192,7 @@
 		limit #{pager.offset}, #{pager.limit} 
 		limit #{pager.offset}, #{pager.limit} 
 	</select>
 	</select>
 	
 	
-	<select id="findByParams1.back" parameterType="map" resultType="com.cloudcross.ssp.model.AdvBalance">
+	<select id="findByParams1Back" parameterType="map" resultType="com.cloudcross.ssp.model.AdvBalance">
 	select <include refid="base_column"/>, name as agentName from t_adv_balance left join
 	select <include refid="base_column"/>, name as agentName from t_adv_balance left join
 		t_adv_agent on t_adv_balance.agent_id = t_adv_agent.id
 		t_adv_agent on t_adv_balance.agent_id = t_adv_agent.id
 		<where> 
 		<where> 
@@ -204,27 +204,27 @@
 		order by act_time desc
 		order by act_time desc
 	</select>
 	</select>
 	
 	
-	<select id="findBalanceByAgentId.back" parameterType="long" resultType="float">
+	<select id="findBalanceByAgentIdBack" parameterType="long" resultType="float">
 		select balance from t_adv_balance where agent_id = #{agentId} and status != -1 order by id desc limit 1
 		select balance from t_adv_balance where agent_id = #{agentId} and status != -1 order by id desc limit 1
 	</select>
 	</select>
 	
 	
 	
 	
-	<insert id="add.back" parameterType="com.cloudcross.ssp.model.AdvBalance">
+	<insert id="addBack" parameterType="com.cloudcross.ssp.model.AdvBalance">
 		insert into t_adv_balance(account_id,agent_id,act_time,num,charge,balance) 
 		insert into t_adv_balance(account_id,agent_id,act_time,num,charge,balance) 
 		values(#{accountId},#{agentId},#{actTime},#{num},#{charge},#{balance})
 		values(#{accountId},#{agentId},#{actTime},#{num},#{charge},#{balance})
 	</insert>
 	</insert>
 	
 	
-	<select id="findById.back" parameterType="long" resultType="com.cloudcross.ssp.model.AdvBalance">
+	<select id="findByIdBack" parameterType="long" resultType="com.cloudcross.ssp.model.AdvBalance">
 		select <include refid="base_column"/> from t_adv_balance
 		select <include refid="base_column"/> from t_adv_balance
 		where id = #{id} and status != -1
 		where id = #{id} and status != -1
 	</select>
 	</select>
 	
 	
-	<update id="updateBalanceByAgentId.back" parameterType="map">
+	<update id="updateBalanceByAgentIdBack" parameterType="map">
 		  update t_adv_balance set balance = #{balance}
 		  update t_adv_balance set balance = #{balance}
     	  where id in (select * from (select id from t_adv_balance where agent_id = #{agentId} and status != -1 order by id desc limit 1) as a)
     	  where id in (select * from (select id from t_adv_balance where agent_id = #{agentId} and status != -1 order by id desc limit 1) as a)
 	</update>
 	</update>
 	
 	
-	<delete id="deleteAdvBalanceById.back" parameterType="long">
+	<delete id="deleteAdvBalanceByIdBack" parameterType="long">
 		delete from t_adv_balance where id = #{id}
 		delete from t_adv_balance where id = #{id}
 	</delete>
 	</delete>
 
 

+ 1 - 1
src/main/java/com/cloudcross/ssp/model/mapper/audit-banner.sql.xml

@@ -102,7 +102,7 @@
      <result property="advertiserName" column="advertiserName"/>
      <result property="advertiserName" column="advertiserName"/>
     <association property="bannerTemplate" javaType="com.cloudcross.ssp.model.BannerTemplate" resultMap="bannerTemplate"/>
     <association property="bannerTemplate" javaType="com.cloudcross.ssp.model.BannerTemplate" resultMap="bannerTemplate"/>
 </resultMap>  
 </resultMap>  
-<resultMap type="com.cloudcross.ssp.back.model.BannerTemplate" id="bannerTemplate">  
+<resultMap type="com.cloudcross.ssp.model.BannerTemplate" id="bannerTemplate">  
    <id property="id" column="bannerTemplateId"/>  
    <id property="id" column="bannerTemplateId"/>  
    <result property="advertiserId" column="advertiserId"/> 
    <result property="advertiserId" column="advertiserId"/> 
    <result property="name" column="name"/>
    <result property="name" column="name"/>

+ 7 - 7
src/main/java/com/cloudcross/ssp/model/mapper/banner-template.sql.xml

@@ -98,7 +98,7 @@
 	</select>
 	</select>
 	<select id="findById" parameterType="long" resultType="com.cloudcross.ssp.model.BannerTemplate">
 	<select id="findById" parameterType="long" resultType="com.cloudcross.ssp.model.BannerTemplate">
 		select
 		select
-		<include refid="base_column"/>
+		<include refid="base_columnoperator"/>
 		from t_banner_template
 		from t_banner_template
 		<where>
 		<where>
 		id = #{id}
 		id = #{id}
@@ -147,7 +147,7 @@ where b.banner_template_id = a.id and a.id in
 	
 	
 	<select id="findByCampaignId" parameterType="long" resultType="com.cloudcross.ssp.model.AdGroup">
 	<select id="findByCampaignId" parameterType="long" resultType="com.cloudcross.ssp.model.AdGroup">
 	    select
 	    select
-		<include refid="base_column"/>
+		<include refid="base_columnadvertiser"/>
 		from t_adgroup 
 		from t_adgroup 
 		where campaign_id=#{campaignId} and t_adgroup.status!=-1
 		where campaign_id=#{campaignId} and t_adgroup.status!=-1
 	</select>
 	</select>
@@ -259,7 +259,7 @@ where b.banner_template_id = a.id and a.id in
 	</select>
 	</select>
 
 
 	<select id="findByParams2advertiser" parameterType="map" resultType="com.cloudcross.ssp.model.BannerTemplate">
 	<select id="findByParams2advertiser" parameterType="map" resultType="com.cloudcross.ssp.model.BannerTemplate">
-		select <include refid="base_column"/>
+		select <include refid="base_columnadvertiser"/>
 		from t_banner_template
 		from t_banner_template
 		<where>
 		<where>
 			<if test="status != null">
 			<if test="status != null">
@@ -290,9 +290,9 @@ where b.banner_template_id = a.id and a.id in
 		order by t_banner_template.id desc
 		order by t_banner_template.id desc
 		limit #{pager.offset}, #{pager.limit}
 		limit #{pager.offset}, #{pager.limit}
 	</select>
 	</select>
-	<select id="findByParams2Operator" parameterType="map" resultType="com.cloudcross.ssp.operator.model.BannerTemplate">
+	<select id="findByParams2Operator" parameterType="map" resultType="com.cloudcross.ssp.model.BannerTemplate">
 		select
 		select
-		<include refid="base_column" />
+		<include refid="base_columnoperator" />
 		from t_banner_template
 		from t_banner_template
 		<where>
 		<where>
 			<if test="status != null">
 			<if test="status != null">
@@ -323,7 +323,7 @@ where b.banner_template_id = a.id and a.id in
 		
 		
 	<select id="findByParams4advertiser" parameterType="map" resultType="com.cloudcross.ssp.model.BannerTemplate">
 	<select id="findByParams4advertiser" parameterType="map" resultType="com.cloudcross.ssp.model.BannerTemplate">
 		select
 		select
-		<include refid="base_column"/>
+		<include refid="base_columnadvertiser"/>
 		from t_banner_template
 		from t_banner_template
 		<where>
 		<where>
 		id not in (select banner_template_id from t_banner where adgroup_id=#{adGroupId})
 		id not in (select banner_template_id from t_banner where adgroup_id=#{adGroupId})
@@ -350,7 +350,7 @@ where b.banner_template_id = a.id and a.id in
 
 
 <select id="findByParams4operator" parameterType="map" resultType="com.cloudcross.ssp.model.BannerTemplate">
 <select id="findByParams4operator" parameterType="map" resultType="com.cloudcross.ssp.model.BannerTemplate">
 		select
 		select
-		<include refid="base_column"/>
+		<include refid="base_columnoperator"/>
 		from t_banner_template
 		from t_banner_template
 		<where>
 		<where>
 		id not in (select banner_template_id from t_banner where adgroup_id=#{adGroupId})
 		id not in (select banner_template_id from t_banner where adgroup_id=#{adGroupId})

+ 7 - 7
src/main/java/com/cloudcross/ssp/model/mapper/banner.sql.xml

@@ -104,7 +104,7 @@
 		</where>
 		</where>
 	</select>
 	</select>
 	
 	
-	<select id="findByIdOperator" parameterType="int" resultMap="banner">  
+	<select id="findByIdOperator" parameterType="int" resultMap="Banner">  
 		select <include refid="base_column_operator"/> ,<include refid="banner_template_base_column"/>
 		select <include refid="base_column_operator"/> ,<include refid="banner_template_base_column"/>
 		from t_banner b inner join t_banner_template bt on b.banner_template_id = bt.id left join t_banner_operator bo
 		from t_banner b inner join t_banner_template bt on b.banner_template_id = bt.id left join t_banner_operator bo
 on b.id=bo.banner_id where b.id=#{id}
 on b.id=bo.banner_id where b.id=#{id}
@@ -143,7 +143,7 @@ on b.id=bo.banner_id where b.id=#{id}
 		</if>
 		</if>
 	</select>
 	</select>
 	
 	
-	<select id="findByZoneSize" parameterType="HashMap" resultMap="banner">  
+	<select id="findByZoneSize" parameterType="HashMap" resultMap="Banner">  
 		select <include refid="base_column_operator"/> ,<include refid="banner_template_base_column"/>
 		select <include refid="base_column_operator"/> ,<include refid="banner_template_base_column"/>
 		from t_banner b inner join t_banner_template bt on b.banner_template_id = bt.id
 		from t_banner b inner join t_banner_template bt on b.banner_template_id = bt.id
 		where bt.status != -1 and checked != 2 and checked !=0
 		where bt.status != -1 and checked != 2 and checked !=0
@@ -181,7 +181,7 @@ on b.id=bo.banner_id where b.id=#{id}
     <result property="supdated" column="supdated"/>  
     <result property="supdated" column="supdated"/>  
     <association property="bannerTemplate" javaType="com.cloudcross.ssp.model.BannerTemplate" resultMap="bannerTemplate"/>
     <association property="bannerTemplate" javaType="com.cloudcross.ssp.model.BannerTemplate" resultMap="bannerTemplate"/>
 </resultMap>  
 </resultMap>  
-<resultMap type="com.cloudcross.ssp.model.BannerTemplate" id="bannerTemplate">  
+<resultMap type="com.cloudcross.ssp.model.BannerTemplate" id="BannerTemplate">  
    <id property="id" column="bannerTemplateId"/>  
    <id property="id" column="bannerTemplateId"/>  
    <result property="advertiserId" column="advertiserId"/>
    <result property="advertiserId" column="advertiserId"/>
    <result property="agentId" column="agentId"/>  
    <result property="agentId" column="agentId"/>  
@@ -195,7 +195,7 @@ on b.id=bo.banner_id where b.id=#{id}
    <result property="updated" column="updated"/>     
    <result property="updated" column="updated"/>     
 </resultMap>  
 </resultMap>  
 
 
-<resultMap type="com.cloudcross.ssp.model.Banner" id="banneroperator">
+<!--<resultMap type="com.cloudcross.ssp.model.Banner" id="banneroperator">
 		<id property="id" column="bannerId"/>
 		<id property="id" column="bannerId"/>
 		<result property="bannerTemplateId" column="bannerTemplateId"/> 
 		<result property="bannerTemplateId" column="bannerTemplateId"/> 
 		<result property="orderId" column="orderId"/>
 		<result property="orderId" column="orderId"/>
@@ -209,8 +209,8 @@ on b.id=bo.banner_id where b.id=#{id}
 	    <result property="updated" column="updated"/> 
 	    <result property="updated" column="updated"/> 
 	    <result property="memo" column="memo"/> 
 	    <result property="memo" column="memo"/> 
 	    <association property="bannerTemplate" resultMap="com.cloudcross.ssp.model.BannerTemplate"/>
 	    <association property="bannerTemplate" resultMap="com.cloudcross.ssp.model.BannerTemplate"/>
-	</resultMap>  
-	<resultMap type="com.cloudcross.ssp.operator.model.BannerTemplate" id="bannerTemplate">  
+	</resultMap>  -->
+	<!--  <resultMap type="com.cloudcross.ssp.model.BannerTemplate" id="bannerTemplate">  
 	   <id property="id" column="banner_templateId"/>  
 	   <id property="id" column="banner_templateId"/>  
 	   <result property="advertiserId" column="advertiserId"/> 
 	   <result property="advertiserId" column="advertiserId"/> 
 	   <result property="name" column="name"/>
 	   <result property="name" column="name"/>
@@ -221,7 +221,7 @@ on b.id=bo.banner_id where b.id=#{id}
 	   <result property="height" column="height"/> 
 	   <result property="height" column="height"/> 
 	   <result property="status" column="status"/>   
 	   <result property="status" column="status"/>   
 	   <result property="updated" column="bannerTemplateUpdated"/>     
 	   <result property="updated" column="bannerTemplateUpdated"/>     
-	</resultMap>
+	</resultMap>-->
 	
 	
 	<insert id="addBanner" parameterType="com.cloudcross.ssp.model.Banner" useGeneratedKeys="true"
 	<insert id="addBanner" parameterType="com.cloudcross.ssp.model.Banner" useGeneratedKeys="true"
 		keyProperty="id">
 		keyProperty="id">

+ 5 - 5
src/main/java/com/cloudcross/ssp/model/mapper/finance.sql.xml

@@ -18,7 +18,7 @@
 	</sql>
 	</sql>
 	
 	
 	<!-- 此时加入了帐号管理,只有该帐号下的广告主显示 -->
 	<!-- 此时加入了帐号管理,只有该帐号下的广告主显示 -->
-	<select id="findByParams"  parameterType="map" resultType="com.cloudcross.ssp.advertiser.model.Finance">
+	<select id="findByParams"  parameterType="map" resultType="com.cloudcross.ssp.model.Finance">
 	    select a.id,b.name as advertiserName,(sum(a.allocate)-sum(a.consume)) as adBalance,sum(a.allocate) as sumAllocation,max(a.act_time) as upDated from t_adv_balance a,t_advertiser b 
 	    select a.id,b.name as advertiserName,(sum(a.allocate)-sum(a.consume)) as adBalance,sum(a.allocate) as sumAllocation,max(a.act_time) as upDated from t_adv_balance a,t_advertiser b 
         where a.advertiser_id=b.id and a.agent_id=b.agent_id
         where a.advertiser_id=b.id and a.agent_id=b.agent_id
         and a.agent_id=#{agentId}
         and a.agent_id=#{agentId}
@@ -55,7 +55,7 @@
 	</select>
 	</select>
 	
 	
 	<!-- 最主要的是下面的balance,此时的balance对应为广告主的余额 -->
 	<!-- 最主要的是下面的balance,此时的balance对应为广告主的余额 -->
-	<select id="findById" parameterType="long" resultType="com.cloudcross.ssp.advertiser.model.Finance">
+	<select id="findById" parameterType="long" resultType="com.cloudcross.ssp.model.Finance">
 		select 
 		select 
 		id,
 		id,
 		account_id as accountId,
 		account_id as accountId,
@@ -72,21 +72,21 @@
 		where id = #{id}
 		where id = #{id}
 	</select>
 	</select>
 	
 	
-	<insert id="editFinance"  parameterType="com.cloudcross.ssp.advertiser.model.Finance">
+	<insert id="editFinance"  parameterType="com.cloudcross.ssp.model.Finance">
           insert into t_adv_balance
           insert into t_adv_balance
           (account_id,agent_id,advertiser_id,charge,allocate,consume,memo,num,balance,act_time)
           (account_id,agent_id,advertiser_id,charge,allocate,consume,memo,num,balance,act_time)
           values
           values
           (#{accountId},#{agentId},#{advertiserId},0,#{allocate},0,#{memo},#{num},#{balance}+#{allocate},NOW())                    
           (#{accountId},#{agentId},#{advertiserId},0,#{allocate},0,#{memo},#{num},#{balance}+#{allocate},NOW())                    
 	</insert>
 	</insert>
 	
 	
-	<insert id="addFinance"  parameterType="com.cloudcross.ssp.advertiser.model.Finance">
+	<insert id="addFinance"  parameterType="com.cloudcross.ssp.model.Finance">
 	      insert into t_adv_balance
 	      insert into t_adv_balance
           (account_id,agent_id,advertiser_id,allocate,balance,act_time)
           (account_id,agent_id,advertiser_id,allocate,balance,act_time)
           values
           values
           (#{accountId},#{agentId},0,#{allocate},#{agentBalance}-#{allocate},NOW())    	
           (#{accountId},#{agentId},0,#{allocate},#{agentBalance}-#{allocate},NOW())    	
 	</insert>
 	</insert>
 	
 	
-	<select id="findByBalance"  parameterType="map" resultType="com.cloudcross.ssp.advertiser.model.Finance" >
+	<select id="findByBalance"  parameterType="map" resultType="com.cloudcross.ssp.model.Finance" >
 	     select a.balance as agentBalance from t_adv_balance a 
 	     select a.balance as agentBalance from t_adv_balance a 
 	     where a.agent_id = #{agentId} and a.advertiser_id = 0
 	     where a.agent_id = #{agentId} and a.advertiser_id = 0
 	     and a.account_id = #{accountId}
 	     and a.account_id = #{accountId}

+ 2 - 2
src/main/java/com/cloudcross/ssp/model/mapper/log.sql.xml

@@ -30,7 +30,7 @@
 		order by id   desc
 		order by id   desc
 		limit #{pager.offset}, #{pager.limit}
 		limit #{pager.offset}, #{pager.limit}
 	</select>
 	</select>
-	<select id="selectByParams1"  parameterType="map" resultType="com.cloudcross.ssp.operator.model.Log">
+	<select id="selectByParams1"  parameterType="map" resultType="com.cloudcross.ssp.model.Log">
 		select 
 		select 
 		oper_time as operTime,
 		oper_time as operTime,
 		account_name as accountName,
 		account_name as accountName,
@@ -84,7 +84,7 @@
 		 	where id=#{id}
 		 	where id=#{id}
 	</update>	
 	</update>	
 	<!-- 导出Excel用 -->
 	<!-- 导出Excel用 -->
-	<select id="findDeliverEffectAnalysis" parameterType="map" resultType="com.cloudcross.ssp.advertiser.model.Log">
+	<select id="findDeliverEffectAnalysis" parameterType="map" resultType="com.cloudcross.ssp.model.Log">
 		select 
 		select 
 		<include refid="base_column" />
 		<include refid="base_column" />
 		from t_log 	where 
 		from t_log 	where 

+ 1 - 1
src/main/java/com/cloudcross/ssp/model/mapper/messageRead.sql.xml

@@ -8,7 +8,7 @@
 		account_id as accountId,
 		account_id as accountId,
 	</sql>
 	</sql>
 	
 	
-	<insert id="addMessageRead" parameterType="com.cloudcross.ssp.back.model.MessageRead">
+	<insert id="addMessageRead" parameterType="com.cloudcross.ssp.model.MessageRead">
 		insert into t_message_read (message_id,account_id)
 		insert into t_message_read (message_id,account_id)
 		values(#{messageId},#{accountId})
 		values(#{messageId},#{accountId})
 	</insert>
 	</insert>

+ 17 - 17
src/main/java/com/cloudcross/ssp/model/mapper/operator-report.sql.xml

@@ -19,7 +19,7 @@
 	</select>
 	</select>
 	
 	
 	
 	
-	<select id="findDeliverEffectAnalysis" parameterType="map" resultType="com.cloudcross.ssp.back.model.OperatorReport">
+	<select id="findDeliverEffectAnalysis" parameterType="map" resultType="com.cloudcross.ssp.model.OperatorReport">
 		select 
 		select 
 		zone_id as zoneId,date as reportDate,sum(pv) as pv,sum(uv) as uv,sum(impression) as impression,
 		zone_id as zoneId,date as reportDate,sum(pv) as pv,sum(uv) as uv,sum(impression) as impression,
 		sum(uimpression) as uImpression, sum(uclick) as uClick,
 		sum(uimpression) as uImpression, sum(uclick) as uClick,
@@ -39,7 +39,7 @@
 		limit #{pager.offset}, #{pager.limit}
 		limit #{pager.offset}, #{pager.limit}
 	</select>
 	</select>
 	
 	
-	<select id="findSum" parameterType="map" resultType="com.cloudcross.ssp.back.model.OperatorReport">
+	<select id="findSum" parameterType="map" resultType="com.cloudcross.ssp.model.OperatorReport">
 		select sum(pv) as pv, sum(uv) as uv, sum(impression) as impression, sum(click) as click, sum(income) as income
 		select sum(pv) as pv, sum(uv) as uv, sum(impression) as impression, sum(click) as click, sum(income) as income
 		from t_rpt_zone where date &gt;= #{startDate} and #{endDate} &gt;=date
 		from t_rpt_zone where date &gt;= #{startDate} and #{endDate} &gt;=date
 		<if test="zoneId!=null">
 		<if test="zoneId!=null">
@@ -51,7 +51,7 @@
 	</select>
 	</select>
 	
 	
 	
 	
-	<select id="findDeliverEffectAnalysis1" parameterType="map" resultType="com.cloudcross.ssp.back.model.OperatorReport">
+	<select id="findDeliverEffectAnalysis1" parameterType="map" resultType="com.cloudcross.ssp.model.OperatorReport">
 		select 
 		select 
 		zone_id as zoneId,date as reportDate,sum(pv) as pv,sum(uv) as uv,sum(impression) as impression,
 		zone_id as zoneId,date as reportDate,sum(pv) as pv,sum(uv) as uv,sum(impression) as impression,
 		sum(uimpression) as uImpression, sum(uclick) as uClick,
 		sum(uimpression) as uImpression, sum(uclick) as uClick,
@@ -79,7 +79,7 @@
 		 ) as a )
 		 ) as a )
 	</select>
 	</select>
 	
 	
-	<select id="findBySize" parameterType="map" resultType="com.cloudcross.ssp.back.model.OperatorReport">
+	<select id="findBySize" parameterType="map" resultType="com.cloudcross.ssp.model.OperatorReport">
 		select 
 		select 
 	    id,date as reportDate,width ,height,100*sum(pv)/(select sum(pv) from t_rpt_zone_size 
 	    id,date as reportDate,width ,height,100*sum(pv)/(select sum(pv) from t_rpt_zone_size 
 	    where
 	    where
@@ -101,7 +101,7 @@
 		limit #{pager.offset}, #{pager.limit}
 		limit #{pager.offset}, #{pager.limit}
 	</select>
 	</select>
 	
 	
-	<select id="findBySize1" parameterType="map" resultType="com.cloudcross.ssp.back.model.OperatorReport">
+	<select id="findBySize1" parameterType="map" resultType="com.cloudcross.ssp.model.OperatorReport">
 		select 
 		select 
 	    id,date as reportDate,width ,height,100*sum(pv)/(select sum(pv) from t_rpt_zone_size 
 	    id,date as reportDate,width ,height,100*sum(pv)/(select sum(pv) from t_rpt_zone_size 
 	    where
 	    where
@@ -132,7 +132,7 @@
 		 ) as a )
 		 ) as a )
 	</select>
 	</select>
 	
 	
-	<select id="findByPosition" parameterType="map" resultType="com.cloudcross.ssp.back.model.OperatorReport">
+	<select id="findByPosition" parameterType="map" resultType="com.cloudcross.ssp.model.OperatorReport">
 		select 
 		select 
 	    id,date as reportDate,position,100*sum(pv)/(select sum(pv) from t_rpt_zone_position where 
 	    id,date as reportDate,position,100*sum(pv)/(select sum(pv) from t_rpt_zone_position where 
 		 date &gt;= #{startDate} and #{endDate} &gt;=date
 		 date &gt;= #{startDate} and #{endDate} &gt;=date
@@ -153,7 +153,7 @@
       	limit #{pager.offset}, #{pager.limit}
       	limit #{pager.offset}, #{pager.limit}
 	</select>
 	</select>
 	
 	
-	<select id="findByPosition1" parameterType="map" resultType="com.cloudcross.ssp.back.model.OperatorReport">
+	<select id="findByPosition1" parameterType="map" resultType="com.cloudcross.ssp.model.OperatorReport">
 		select 
 		select 
 	    id,date as reportDate,position,100*sum(pv)/(select sum(pv) from t_rpt_zone_position where 
 	    id,date as reportDate,position,100*sum(pv)/(select sum(pv) from t_rpt_zone_position where 
 		 date &gt;= #{startDate} and #{endDate} &gt;=date
 		 date &gt;= #{startDate} and #{endDate} &gt;=date
@@ -181,7 +181,7 @@
 		 </if>
 		 </if>
 		  ) as a)
 		  ) as a)
 	</select>
 	</select>
-	<select id="findBySystem" parameterType="map" resultType="com.cloudcross.ssp.back.model.OperatorReport">
+	<select id="findBySystem" parameterType="map" resultType="com.cloudcross.ssp.model.OperatorReport">
 		select 
 		select 
 	    os as system,100*(sum(pv)/(select sum(pv) from t_rpt_zone_os
 	    os as system,100*(sum(pv)/(select sum(pv) from t_rpt_zone_os
 		where date &gt;= #{startDate} and #{endDate} &gt;=date
 		where date &gt;= #{startDate} and #{endDate} &gt;=date
@@ -204,7 +204,7 @@
 	</select>
 	</select>
 	
 	
 	
 	
-	<select id="findBySystem1" parameterType="map" resultType="com.cloudcross.ssp.back.model.OperatorReport">
+	<select id="findBySystem1" parameterType="map" resultType="com.cloudcross.ssp.model.OperatorReport">
 		select 
 		select 
 	    os as system,100*(sum(pv)/(select sum(pv) from t_rpt_zone_os
 	    os as system,100*(sum(pv)/(select sum(pv) from t_rpt_zone_os
 		where date &gt;= #{startDate} and #{endDate} &gt;=date
 		where date &gt;= #{startDate} and #{endDate} &gt;=date
@@ -226,7 +226,7 @@
 	</select>
 	</select>
 	
 	
 	
 	
-	<select id="findByDevice" parameterType="map" resultType="com.cloudcross.ssp.back.model.OperatorReport">
+	<select id="findByDevice" parameterType="map" resultType="com.cloudcross.ssp.model.OperatorReport">
 		select 
 		select 
 	    id,date as reportDate,device,100*sum(pv)/
 	    id,date as reportDate,device,100*sum(pv)/
 	    (select sum(pv) from t_rpt_zone_device where date &gt;= #{startDate} and #{endDate} &gt;=date
 	    (select sum(pv) from t_rpt_zone_device where date &gt;= #{startDate} and #{endDate} &gt;=date
@@ -254,7 +254,7 @@
 		</if> ) as t)
 		</if> ) as t)
 	</select>
 	</select>
 	
 	
-	<select id="findByAllAreal" parameterType="map" resultType="com.cloudcross.ssp.back.model.OperatorReport">
+	<select id="findByAllAreal" parameterType="map" resultType="com.cloudcross.ssp.model.OperatorReport">
 		  select 
 		  select 
 	    a.id,a.date as reportDate,b.cn,b.cn_city,100*sum(a.pv)/(select sum(pv) from t_rpt_zone_location where date &gt;= #{startDate} and #{endDate} &gt;=date
 	    a.id,a.date as reportDate,b.cn,b.cn_city,100*sum(a.pv)/(select sum(pv) from t_rpt_zone_location where date &gt;= #{startDate} and #{endDate} &gt;=date
 		<if test="operatorId!=null">
 		<if test="operatorId!=null">
@@ -273,7 +273,7 @@
 		limit #{pager.offset}, #{pager.limit}
 		limit #{pager.offset}, #{pager.limit}
 	</select>
 	</select>
 	
 	
-	<select id="findByAreal" parameterType="map" resultType="com.cloudcross.ssp.back.model.OperatorReport">
+	<select id="findByAreal" parameterType="map" resultType="com.cloudcross.ssp.model.OperatorReport">
 		select 
 		select 
 	    b.cn,b.cn_city,100*sum(a.pv)/(select sum(pv) from t_rpt_zone_location where date &gt;= #{startDate} and #{endDate} &gt;=date
 	    b.cn,b.cn_city,100*sum(a.pv)/(select sum(pv) from t_rpt_zone_location where date &gt;= #{startDate} and #{endDate} &gt;=date
 		<if test="operatorId!=null">
 		<if test="operatorId!=null">
@@ -291,7 +291,7 @@
        group by b.cn_city
        group by b.cn_city
 	</select>
 	</select>
 	
 	
-	<select id="findAllArea" parameterType="map" resultType="com.cloudcross.ssp.back.model.OperatorReport">
+	<select id="findAllArea" parameterType="map" resultType="com.cloudcross.ssp.model.OperatorReport">
 		select 
 		select 
 	    a.id,a.date as reportDate,b.cn,b.cn_city,100*sum(a.pv)/(select sum(pv) from t_rpt_zone_location where date &gt;= #{startDate} and #{endDate} &gt;=date
 	    a.id,a.date as reportDate,b.cn,b.cn_city,100*sum(a.pv)/(select sum(pv) from t_rpt_zone_location where date &gt;= #{startDate} and #{endDate} &gt;=date
 		<if test="operatorId!=null">
 		<if test="operatorId!=null">
@@ -319,7 +319,7 @@
 		</if>) as a) 
 		</if>) as a) 
 	</select>
 	</select>
 	
 	
-	<select id="findByPlace" parameterType="map" resultType="com.cloudcross.ssp.back.model.OperatorReport">
+	<select id="findByPlace" parameterType="map" resultType="com.cloudcross.ssp.model.OperatorReport">
 		select t_place.name as place,sum(p.pv) as pv, sum(p.uv) as uv, sum(p.impression) as impression,
 		select t_place.name as place,sum(p.pv) as pv, sum(p.uv) as uv, sum(p.impression) as impression,
 		sum(uimpression) as uImpression, sum(uclick) as uClick,
 		sum(uimpression) as uImpression, sum(uclick) as uClick,
 		 sum(p.click) as click, sum(p.ecpm) as eCpm,
 		 sum(p.click) as click, sum(p.ecpm) as eCpm,
@@ -343,7 +343,7 @@
 	</select>
 	</select>
 	
 	
 	
 	
-	<select id="findByPlace1" parameterType="map" resultType="com.cloudcross.ssp.back.model.OperatorReport">
+	<select id="findByPlace1" parameterType="map" resultType="com.cloudcross.ssp.model.OperatorReport">
 		select t_place.name as place,sum(p.pv) as pv, sum(p.uv) as uv, sum(p.impression) as impression, 
 		select t_place.name as place,sum(p.pv) as pv, sum(p.uv) as uv, sum(p.impression) as impression, 
 		sum(uimpression) as uImpression, sum(uclick) as uClick,
 		sum(uimpression) as uImpression, sum(uclick) as uClick,
 		sum(p.click) as click, sum(p.ecpm) as eCpm,
 		sum(p.click) as click, sum(p.ecpm) as eCpm,
@@ -374,7 +374,7 @@
 		 ) as a) 
 		 ) as a) 
 	</select>
 	</select>
 	
 	
-	<select id="findByApmac" parameterType="map" resultType="com.cloudcross.ssp.back.model.OperatorReport">
+	<select id="findByApmac" parameterType="map" resultType="com.cloudcross.ssp.model.OperatorReport">
 		select apmac, sum(pv) as pv, sum(uv) as uv, sum(impression) as impression, 
 		select apmac, sum(pv) as pv, sum(uv) as uv, sum(impression) as impression, 
 		sum(uimpression) as uImpression,
 		sum(uimpression) as uImpression,
 		sum(uclick) as uClick,sum(click) as click, sum(ecpm) as eCpm,
 		sum(uclick) as uClick,sum(click) as click, sum(ecpm) as eCpm,
@@ -394,7 +394,7 @@
 	limit #{pager.offset}, #{pager.limit}
 	limit #{pager.offset}, #{pager.limit}
 	</select>
 	</select>
 	
 	
-	<select id="findByApmac1" parameterType="map" resultType="com.cloudcross.ssp.back.model.OperatorReport">
+	<select id="findByApmac1" parameterType="map" resultType="com.cloudcross.ssp.model.OperatorReport">
 			select apmac, sum(pv) as pv, sum(uv) as uv, sum(impression) as impression, 
 			select apmac, sum(pv) as pv, sum(uv) as uv, sum(impression) as impression, 
 		sum(uimpression) as uImpression,
 		sum(uimpression) as uImpression,
 		sum(uclick) as uClick,sum(click) as click, sum(ecpm) as eCpm,
 		sum(uclick) as uClick,sum(click) as click, sum(ecpm) as eCpm,

+ 3 - 3
src/main/java/com/cloudcross/ssp/model/mapper/operator.sql.xml

@@ -27,7 +27,7 @@
 		</where>
 		</where>
 	</select>
 	</select>
 	
 	
-	<select id="getNew" parameterType="com.cloudcross.ssp.back.model.Operator" resultType="com.cloudcross.ssp.back.model.Operator">
+	<select id="getNew" parameterType="com.cloudcross.ssp.model.Operator" resultType="com.cloudcross.ssp.model.Operator">
 		select 
 		select 
 		<include refid="base_column" />
 		<include refid="base_column" />
 		from t_operator
 		from t_operator
@@ -88,12 +88,12 @@
 		where id=#{id}
 		where id=#{id}
 	</update>
 	</update>
 	
 	
-	<insert id="add" parameterType="com.cloudcross.ssp.back.model.Operator">
+	<insert id="add" parameterType="com.cloudcross.ssp.model.Operator">
 		insert into t_operator(company_name,link_man,tel,mobile,account,homepage,account_name,bank,status,admin_id,address,zip,email)
 		insert into t_operator(company_name,link_man,tel,mobile,account,homepage,account_name,bank,status,admin_id,address,zip,email)
 		values(#{companyName},#{linkMan},#{tel},#{mobile},#{account},#{homePage},#{accountName},#{bank}, #{status},#{adminId},#{address},#{zip},#{email})
 		values(#{companyName},#{linkMan},#{tel},#{mobile},#{account},#{homePage},#{accountName},#{bank}, #{status},#{adminId},#{address},#{zip},#{email})
 	</insert>
 	</insert>
 	
 	
-	<select id="selectById" parameterType="int" resultType="com.cloudcross.ssp.back.model.Operator">
+	<select id="selectById" parameterType="int" resultType="com.cloudcross.ssp.model.Operator">
 		select 
 		select 
 		<include refid="base_column" />
 		<include refid="base_column" />
 		from t_operator
 		from t_operator

+ 5 - 5
src/main/java/com/cloudcross/ssp/model/mapper/wifi.sql.xml

@@ -137,7 +137,7 @@
 	</insert>
 	</insert>
 	
 	
 
 
-	<select id="findAddress" parameterType="map" resultType="com.cloudcross.ssp.advertiser.model.Wifi">
+	<select id="findAddress" parameterType="map" resultType="com.cloudcross.ssp.model.Wifi">
        select 
        select 
 		<include refid="base_column2" />
 		<include refid="base_column2" />
 		from t_wifi where 1 = 1
 		from t_wifi where 1 = 1
@@ -151,7 +151,7 @@
 		order by  id				
 		order by  id				
 	</select>
 	</select>
 	
 	
-  	<select id="findWifi" parameterType="map" resultType="com.cloudcross.ssp.advertiser.model.Wifi">
+  	<select id="findWifi" parameterType="map" resultType="com.cloudcross.ssp.model.Wifi">
        select 
        select 
        <include refid="base_column2" />
        <include refid="base_column2" />
        from t_wifi where location in (select location from t_wifi where location = #{location})
        from t_wifi where location in (select location from t_wifi where location = #{location})
@@ -159,13 +159,13 @@
        and longitude &lt;= #{maxlng}	and longitude &gt;= #{minlng}			
        and longitude &lt;= #{maxlng}	and longitude &gt;= #{minlng}			
 	</select>
 	</select>
 	
 	
-	<select id="findLocation" parameterType="String" resultType="com.cloudcross.ssp.advertiser.model.Wifi">
+	<select id="findLocation" parameterType="String" resultType="com.cloudcross.ssp.model.Wifi">
        select 
        select 
        <include refid="base_column2" />
        <include refid="base_column2" />
        from t_wifi where location = #{location}			
        from t_wifi where location = #{location}			
 	</select>
 	</select>
 	
 	
-	<select id="findAllAdgroupWifi" parameterType="Long" resultType="com.cloudcross.ssp.advertiser.model.Wifi">
+	<select id="findAllAdgroupWifi" parameterType="Long" resultType="com.cloudcross.ssp.model.Wifi">
        select 
        select 
        <include refid="base_column2" />
        <include refid="base_column2" />
        from t_wifi where id in (select wifi_id from t_adgroup_wifi where adgroup_id = #{adGroupId})
        from t_wifi where id in (select wifi_id from t_adgroup_wifi where adgroup_id = #{adGroupId})
@@ -183,7 +183,7 @@
 	delete from t_adgroup_wifi where adgroup_id = #{adGroupId} 
 	delete from t_adgroup_wifi where adgroup_id = #{adGroupId} 
 	</delete>
 	</delete>
 	
 	
-	<select id="selectByParams"  parameterType="map" resultType="com.cloudcross.ssp.advertiser.model.Wifi">
+	<select id="selectByParams"  parameterType="map" resultType="com.cloudcross.ssp.model.Wifi">
 		select 
 		select 
 		<include refid="base_column2" />
 		<include refid="base_column2" />
 		from t_wifi where 1 = 1
 		from t_wifi where 1 = 1

+ 1 - 1
src/main/java/com/cloudcross/ssp/model/mapper/zone-domain.sql.xml

@@ -15,7 +15,7 @@
 		select <include refid="base_column"/> from t_zone_domain where zone_id = #{zoneId} and t_zone_domain.status = 0
 		select <include refid="base_column"/> from t_zone_domain where zone_id = #{zoneId} and t_zone_domain.status = 0
 	</select>
 	</select>
 	
 	
-	<update id="deleteZoneDomain" parameterType="com.cloudcross.ssp.operator.model.Zone">
+	<update id="deleteZoneDomain" parameterType="com.cloudcross.ssp.model.Zone">
 		update t_zone_domain set status=-1,supdated=#{supdated} where zone_id = #{id}
 		update t_zone_domain set status=-1,supdated=#{supdated} where zone_id = #{id}
 	</update>
 	</update>
 	
 	

+ 2 - 2
src/main/java/com/cloudcross/ssp/security/MyAuthenticationFilter.java

@@ -14,8 +14,8 @@ import org.springframework.security.web.authentication.SimpleUrlAuthenticationFa
 import org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter;
 import org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter;
 import org.springframework.stereotype.Service;
 import org.springframework.stereotype.Service;
 
 
-import com.cloudcross.ssp.back.model.Account;
-import com.cloudcross.ssp.back.service.IAccountService;
+import com.cloudcross.ssp.model.Account;
+import com.cloudcross.ssp.service.IAccountService;
 //import com.lanyuan.entity.UserLoginList;
 //import com.lanyuan.entity.UserLoginList;
 import com.cloudcross.ssp.common.utils.Common;
 import com.cloudcross.ssp.common.utils.Common;
 //import com.lanyuan.dao.UserDao;
 //import com.lanyuan.dao.UserDao;

+ 2 - 2
src/main/java/com/cloudcross/ssp/security/MySecurityMetadataSource.java

@@ -15,8 +15,8 @@ import org.springframework.security.web.FilterInvocation;
 import org.springframework.security.web.access.intercept.FilterInvocationSecurityMetadataSource;
 import org.springframework.security.web.access.intercept.FilterInvocationSecurityMetadataSource;
 import org.springframework.stereotype.Service;
 import org.springframework.stereotype.Service;
 
 
-import com.cloudcross.ssp.back.model.Resources;
-import com.cloudcross.ssp.back.service.IResourcesService;
+import com.cloudcross.ssp.model.Resources;
+import com.cloudcross.ssp.service.IResourcesService;
 
 
 /**
 /**
  * 加载资源与权限的对应关系
  * 加载资源与权限的对应关系

+ 4 - 4
src/main/java/com/cloudcross/ssp/security/MyUserDetailServiceImpl.java

@@ -13,10 +13,10 @@ import org.springframework.security.core.userdetails.UserDetailsService;
 import org.springframework.security.core.userdetails.UsernameNotFoundException;
 import org.springframework.security.core.userdetails.UsernameNotFoundException;
 import org.springframework.stereotype.Service;
 import org.springframework.stereotype.Service;
 
 
-import com.cloudcross.ssp.back.model.Account;
-import com.cloudcross.ssp.back.model.Resources;
-import com.cloudcross.ssp.back.service.IAccountService;
-import com.cloudcross.ssp.back.service.IResourcesService;
+import com.cloudcross.ssp.model.Account;
+import com.cloudcross.ssp.model.Resources;
+import com.cloudcross.ssp.service.IAccountService;
+import com.cloudcross.ssp.service.IResourcesService;
 import com.cloudcross.ssp.base.service.MyUser;
 import com.cloudcross.ssp.base.service.MyUser;
 import com.cloudcross.ssp.common.utils.PropertiesUtils;
 import com.cloudcross.ssp.common.utils.PropertiesUtils;
 /**
 /**

+ 1 - 1
src/main/java/com/cloudcross/ssp/service/impl/BannerService.java

@@ -17,7 +17,7 @@ import com.cloudcross.ssp.model.Account;
 import com.cloudcross.ssp.model.Banner;
 import com.cloudcross.ssp.model.Banner;
 import com.cloudcross.ssp.model.BannerTemplate;
 import com.cloudcross.ssp.model.BannerTemplate;
 import com.cloudcross.ssp.model.Log;
 import com.cloudcross.ssp.model.Log;
-import com.cloudcross.ssp.operator.model.Zone;
+import com.cloudcross.ssp.model.Zone;
 import com.cloudcross.ssp.service.IBannerService;
 import com.cloudcross.ssp.service.IBannerService;
 import com.cloudcross.ssp.service.ILogService;
 import com.cloudcross.ssp.service.ILogService;
 import com.cloudcross.ssp.base.dao.GenericIBatisDao;
 import com.cloudcross.ssp.base.dao.GenericIBatisDao;

+ 3 - 3
src/main/java/com/cloudcross/ssp/web/AccountController.java

@@ -10,9 +10,9 @@ import org.springframework.ui.Model;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.ResponseBody;
 import org.springframework.web.bind.annotation.ResponseBody;
 
 
-import com.cloudcross.ssp.back.model.Account;
-import com.cloudcross.ssp.back.model.Resources;
-import com.cloudcross.ssp.back.service.IAccountService;
+import com.cloudcross.ssp.model.Account;
+import com.cloudcross.ssp.model.Resources;
+import com.cloudcross.ssp.service.IAccountService;
 import com.cloudcross.ssp.common.utils.Common;
 import com.cloudcross.ssp.common.utils.Common;
 import com.cloudcross.ssp.common.utils.Md5Tool;
 import com.cloudcross.ssp.common.utils.Md5Tool;
 //import com.cloudcross.ssp.common.utils.POIUtils;
 //import com.cloudcross.ssp.common.utils.POIUtils;

+ 6 - 6
src/main/java/com/cloudcross/ssp/web/LoginController.java

@@ -31,12 +31,12 @@ import org.springframework.ui.Model;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.ResponseBody;
 import org.springframework.web.bind.annotation.ResponseBody;
 
 
-import com.cloudcross.ssp.back.model.Account;
-import com.cloudcross.ssp.back.model.Advertiser;
-import com.cloudcross.ssp.back.model.UserLogin;
-import com.cloudcross.ssp.back.service.impl.AccountService;
-import com.cloudcross.ssp.back.service.impl.AdvertiserService;
-import com.cloudcross.ssp.back.service.impl.UserLoginService;
+import com.cloudcross.ssp.model.Account;
+import com.cloudcross.ssp.model.Advertiser;
+import com.cloudcross.ssp.model.UserLogin;
+import com.cloudcross.ssp.service.impl.AccountService;
+import com.cloudcross.ssp.service.impl.AdvertiserService;
+import com.cloudcross.ssp.service.impl.UserLoginService;
 import com.cloudcross.ssp.base.web.SimpleController;
 import com.cloudcross.ssp.base.web.SimpleController;
 import com.cloudcross.ssp.common.utils.Common;
 import com.cloudcross.ssp.common.utils.Common;
 import com.cloudcross.ssp.common.utils.Md5Tool;
 import com.cloudcross.ssp.common.utils.Md5Tool;

+ 3 - 3
src/main/java/com/cloudcross/ssp/web/ResourcesController.java

@@ -16,9 +16,9 @@ import org.springframework.ui.Model;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.ResponseBody;
 import org.springframework.web.bind.annotation.ResponseBody;
 
 
-import com.cloudcross.ssp.back.model.Params;
-import com.cloudcross.ssp.back.model.Resources;
-import com.cloudcross.ssp.back.service.IResourcesService;
+import com.cloudcross.ssp.model.Params;
+import com.cloudcross.ssp.model.Resources;
+import com.cloudcross.ssp.service.IResourcesService;
 import com.cloudcross.ssp.common.utils.Common;
 import com.cloudcross.ssp.common.utils.Common;
 import com.cloudcross.ssp.common.utils.PropertiesUtils;
 import com.cloudcross.ssp.common.utils.PropertiesUtils;
 import com.cloudcross.ssp.common.utils.TreeObject;
 import com.cloudcross.ssp.common.utils.TreeObject;

+ 3 - 3
src/main/java/com/cloudcross/ssp/web/RolesController.java

@@ -9,9 +9,9 @@ import org.springframework.ui.Model;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.ResponseBody;
 import org.springframework.web.bind.annotation.ResponseBody;
 
 
-import com.cloudcross.ssp.back.model.Resources;
-import com.cloudcross.ssp.back.model.Roles;
-import com.cloudcross.ssp.back.service.IRolesService;
+import com.cloudcross.ssp.model.Resources;
+import com.cloudcross.ssp.model.Roles;
+import com.cloudcross.ssp.service.IRolesService;
 import com.cloudcross.ssp.common.utils.Common;
 import com.cloudcross.ssp.common.utils.Common;
 import com.cloudcross.ssp.pulgin.mybatis.plugin.PageView;
 import com.cloudcross.ssp.pulgin.mybatis.plugin.PageView;
 //import javax.inject.Inject;
 //import javax.inject.Inject;

+ 49 - 49
src/main/java/com/cloudcross/ssp/web/UserLoginListController.java

@@ -1,49 +1,49 @@
-package com.cloudcross.ssp.web;
-
-
-//import javax.inject.Inject;
-
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Controller;
-import org.springframework.ui.Model;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.ResponseBody;
-
-import com.cloudcross.ssp.back.model.Resources;
-import com.cloudcross.ssp.back.model.UserLogin;
-import com.cloudcross.ssp.back.service.IUserLoginService;
-import com.cloudcross.ssp.common.utils.Common;
-import com.cloudcross.ssp.pulgin.mybatis.plugin.PageView;
-
-
-/**
- * 
- * @author lanyuan
- * 2013-11-19
- * @Email: mmm333zzz520@163.com
- * @version 1.0v
- */
-@Controller
-@RequestMapping("/background/userLoginList/")
-public class UserLoginListController extends BaseController{
-	@Autowired
-	private IUserLoginService userLoginService;
-	
-	/**
-	 * @param model
-	 * 存放返回界面的model
-	 * @return
-	 */
-	@RequestMapping("query")
-	public String list(Model model, Resources menu, String pageNow) {
-		return Common.BACKGROUND_PATH+"/userLoginList/list";
-	}
-	
-	@ResponseBody
-	@RequestMapping("queryList")
-	public PageView query(UserLogin userLogin,String pageNow,String pagesize) {
-		pageView = userLoginService.query(getPageView(pageNow,pagesize), userLogin);
-		return pageView;
-	}
-	
-}
+//package com.cloudcross.ssp.web;
+//
+//
+////import javax.inject.Inject;
+//
+//import org.springframework.beans.factory.annotation.Autowired;
+//import org.springframework.stereotype.Controller;
+//import org.springframework.ui.Model;
+//import org.springframework.web.bind.annotation.RequestMapping;
+//import org.springframework.web.bind.annotation.ResponseBody;
+//
+//import com.cloudcross.ssp.back.model.Resources;
+//import com.cloudcross.ssp.back.model.UserLogin;
+//import com.cloudcross.ssp.back.service.IUserLoginService;
+//import com.cloudcross.ssp.common.utils.Common;
+//import com.cloudcross.ssp.pulgin.mybatis.plugin.PageView;
+//
+//
+///**
+// * 
+// * @author lanyuan
+// * 2013-11-19
+// * @Email: mmm333zzz520@163.com
+// * @version 1.0v
+// */
+//@Controller
+//@RequestMapping("/background/userLoginList/")
+//public class UserLoginListController extends BaseController{
+//	@Autowired
+//	private IUserLoginService userLoginService;
+//	
+//	/**
+//	 * @param model
+//	 * 存放返回界面的model
+//	 * @return
+//	 */
+//	@RequestMapping("query")
+//	public String list(Model model, Resources menu, String pageNow) {
+//		return Common.BACKGROUND_PATH+"/userLoginList/list";
+//	}
+//	
+//	@ResponseBody
+//	@RequestMapping("queryList")
+//	public PageView query(UserLogin userLogin,String pageNow,String pagesize) {
+//		pageView = userLoginService.query(getPageView(pageNow,pagesize), userLogin);
+//		return pageView;
+//	}
+//	
+//}

+ 95 - 95
src/main/java/com/cloudcross/ssp/web/settings/PasswordController.java

@@ -1,95 +1,95 @@
-package com.cloudcross.ssp.web.settings;
-
-import java.util.Date;
-import java.util.HashMap;
-import java.util.Map;
-
-import org.apache.commons.lang.RandomStringUtils;
-import org.apache.commons.lang.StringUtils;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Controller;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RequestMethod;
-import org.springframework.web.bind.annotation.RequestParam;
-import org.springframework.web.bind.annotation.ResponseBody;
-
-import com.cloudcross.ssp.back.model.User;
-import com.cloudcross.ssp.back.service.IUserService;
-import com.cloudcross.ssp.base.service.IMailService;
-import com.cloudcross.ssp.base.web.result.AjaxResult;
-import com.cloudcross.ssp.common.utils.MD5;
-import com.cloudcross.ssp.common.utils.MapBuilder;
-
-/**
- * 账户密码相关功能。
- * 
- * @author qaohao
- */
-@Controller
-@RequestMapping("/settings/password")
-public class PasswordController {
-	
-	@Autowired
-    private IMailService mailService;
-	
-	@Autowired
-	private IUserService userService;
-	
-	/**
-	 * @return 找回密码页面。
-	 */
-	@RequestMapping("/find")
-	public String find() {
-		return "settings/password/find";
-	}
-	
-	/**
-	 * @return 找回密码页面。
-	 */
-	
-	@RequestMapping(value = "/reset", method = { RequestMethod.GET })
-	public @ResponseBody AjaxResult reset(@RequestParam String email) {
-	
-		AjaxResult result = new AjaxResult();
-		
-		//声明变量,存放邮件模板中需要的数据
- 		Map  userMap = new HashMap();
-		User user = userService.findByUsername(email);
-		
-		//数据库中不存在,直接返回
-		if(null ==user){
-			result.setStatus("false");
-			result.setMsg("您输入的邮箱地址无效,请重新输入");
-			return result;
-		}
-		//获得随机生成密码(六位,字母+数字)
-		String password =   RandomStringUtils.random(6,true,true);
-		
-		//排除密码为纯数字或者字母的可能
-		while(StringUtils.isAlpha(password) || StringUtils.isNumeric(password)){
-			password =  RandomStringUtils.random(6,true,true);
-		}
-		
-		//修改数据库中用户密码
-		user.setPassword(MD5.getInstance().getMD5(password));
-		user.setModifyDate(new Date());
-		userService.edit(user);
-		
-		userMap.put("username", user.getUsername());
-		userMap.put("password", password);
-		
-		try {
-			mailService.sendMessage("密码找回邮件", "resetPassword.ftl",
-					MapBuilder.create(HashMap.class).addAll(userMap).map(),
-					user.getUsername());
-		} catch (Exception e) {
-			e.printStackTrace();
-			result.setStatus("false");
-			result.setMsg("邮件发送失败");
-			return result ;
-		}
-		result.setStatus("ok");
-		result.setMsg("包含新密码的电子邮件已发送到您的邮箱");
-		return result;
-	}
-}
+//package com.cloudcross.ssp.web.settings;
+//
+//import java.util.Date;
+//import java.util.HashMap;
+//import java.util.Map;
+//
+//import org.apache.commons.lang.RandomStringUtils;
+//import org.apache.commons.lang.StringUtils;
+//import org.springframework.beans.factory.annotation.Autowired;
+//import org.springframework.stereotype.Controller;
+//import org.springframework.web.bind.annotation.RequestMapping;
+//import org.springframework.web.bind.annotation.RequestMethod;
+//import org.springframework.web.bind.annotation.RequestParam;
+//import org.springframework.web.bind.annotation.ResponseBody;
+//
+//import com.cloudcross.ssp.back.model.User;
+//import com.cloudcross.ssp.back.service.IUserService;
+//import com.cloudcross.ssp.base.service.IMailService;
+//import com.cloudcross.ssp.base.web.result.AjaxResult;
+//import com.cloudcross.ssp.common.utils.MD5;
+//import com.cloudcross.ssp.common.utils.MapBuilder;
+//
+///**
+// * 账户密码相关功能。
+// * 
+// * @author qaohao
+// */
+//@Controller
+//@RequestMapping("/settings/password")
+//public class PasswordController {
+//	
+//	@Autowired
+//    private IMailService mailService;
+//	
+//	@Autowired
+//	private IUserService userService;
+//	
+//	/**
+//	 * @return 找回密码页面。
+//	 */
+//	@RequestMapping("/find")
+//	public String find() {
+//		return "settings/password/find";
+//	}
+//	
+//	/**
+//	 * @return 找回密码页面。
+//	 */
+//	
+//	@RequestMapping(value = "/reset", method = { RequestMethod.GET })
+//	public @ResponseBody AjaxResult reset(@RequestParam String email) {
+//	
+//		AjaxResult result = new AjaxResult();
+//		
+//		//声明变量,存放邮件模板中需要的数据
+// 		Map  userMap = new HashMap();
+//		User user = userService.findByUsername(email);
+//		
+//		//数据库中不存在,直接返回
+//		if(null ==user){
+//			result.setStatus("false");
+//			result.setMsg("您输入的邮箱地址无效,请重新输入");
+//			return result;
+//		}
+//		//获得随机生成密码(六位,字母+数字)
+//		String password =   RandomStringUtils.random(6,true,true);
+//		
+//		//排除密码为纯数字或者字母的可能
+//		while(StringUtils.isAlpha(password) || StringUtils.isNumeric(password)){
+//			password =  RandomStringUtils.random(6,true,true);
+//		}
+//		
+//		//修改数据库中用户密码
+//		user.setPassword(MD5.getInstance().getMD5(password));
+//		user.setModifyDate(new Date());
+//		userService.edit(user);
+//		
+//		userMap.put("username", user.getUsername());
+//		userMap.put("password", password);
+//		
+//		try {
+//			mailService.sendMessage("密码找回邮件", "resetPassword.ftl",
+//					MapBuilder.create(HashMap.class).addAll(userMap).map(),
+//					user.getUsername());
+//		} catch (Exception e) {
+//			e.printStackTrace();
+//			result.setStatus("false");
+//			result.setMsg("邮件发送失败");
+//			return result ;
+//		}
+//		result.setStatus("ok");
+//		result.setMsg("包含新密码的电子邮件已发送到您的邮箱");
+//		return result;
+//	}
+//}

+ 97 - 97
src/main/java/com/cloudcross/ssp/web/settings/ProfileController.java

@@ -1,97 +1,97 @@
-package com.cloudcross.ssp.web.settings;
-
-import java.util.Date;
-import java.util.Map;
-
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Controller;
-import org.springframework.ui.Model;
-import org.springframework.web.bind.annotation.ModelAttribute;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RequestParam;
-import org.springframework.web.bind.annotation.ResponseBody;
-
-import com.cloudcross.ssp.back.model.User;
-import com.cloudcross.ssp.back.service.IUserService;
-import com.cloudcross.ssp.base.web.SimpleController;
-import com.cloudcross.ssp.base.web.result.AjaxResult;
-import com.cloudcross.ssp.common.utils.MD5;
-
-/**
- * 账户信息设置功能。
- * 
- * @author qaohao
- */
-@Controller
-@RequestMapping("/settings/profile")
-public class ProfileController extends SimpleController {
-	@Autowired
-	IUserService userService;
-
-	/**
-	 * 进入用户修改页面,根据用户名查询查询用户信息
-	 * @param model 
-	 * @return  用户信息修改页面
-	 */
-	@RequestMapping
-	public String profile(Model model) {
-		model.addAttribute("user", getLoginUser());
-		return index;
-	}
-
-	/**
-	 * 修改用户信息
-	 * @param model
-	 * @param user 页面输入的用户信息
-	 * @param paramMap 页面参数
-	 * @return 修改用户信息后,返回修改结果
-	 */
-	@RequestMapping("/save")
-	public @ResponseBody AjaxResult save(Model model, @ModelAttribute("form") User user,
-			@RequestParam Map<String, Object> paramMap) {
-
-		//声明修改用户返回的结果
-		AjaxResult result = new AjaxResult();
-		
-		// 根据用户名获得用户信息
-		User userInfo = userService.findByUsername(user.getUsername());
-
-		//修改用户信息时,用户ID ,状态与原用户保持一致
-		user.setId(userInfo.getId());
-		user.setStatus(userInfo.getStatus());
-		
-		//用户信息修改的时间
-		user.setModifyDate(new Date());
-
-		//用户需要修改密码时
-		if (paramMap.get("isModifyPwd").equals("true")) {
-			MD5 md5 = MD5.getInstance();
-			String inputPwd = md5.getMD5(user.getPassword());
-			
-			//原密码输入错误
-			if (!userInfo.getPassword().equals(inputPwd)) {
-  				result.setMsg("原始密码输入不正确,请您重新输入");
-  				result.setStatus("false");
-				return result;
-			}
-			user.setPassword(md5.getMD5((String) paramMap.get("newPassword")));
-		} else {
-			//用户不需要改密码时,用户登录密码为原密码
-			user.setPassword(userInfo.getPassword());
-		}
-		
-		//修改用户信息
-		boolean sign = userService.edit(user);
-		
-		//成功跳转到首页
-		if (sign) {
-			result.setStatus("ok");
-			return result;
-		}
-		//失败返回当前页面,并提示
-		result.setStatus("false");
-		result.setMsg( "修改信息失败");
-		return result;
-	}
-
-}
+//package com.cloudcross.ssp.web.settings;
+//
+//import java.util.Date;
+//import java.util.Map;
+//
+//import org.springframework.beans.factory.annotation.Autowired;
+//import org.springframework.stereotype.Controller;
+//import org.springframework.ui.Model;
+//import org.springframework.web.bind.annotation.ModelAttribute;
+//import org.springframework.web.bind.annotation.RequestMapping;
+//import org.springframework.web.bind.annotation.RequestParam;
+//import org.springframework.web.bind.annotation.ResponseBody;
+//
+//import com.cloudcross.ssp.back.model.User;
+//import com.cloudcross.ssp.back.service.IUserService;
+//import com.cloudcross.ssp.base.web.SimpleController;
+//import com.cloudcross.ssp.base.web.result.AjaxResult;
+//import com.cloudcross.ssp.common.utils.MD5;
+//
+///**
+// * 账户信息设置功能。
+// * 
+// * @author qaohao
+// */
+//@Controller
+//@RequestMapping("/settings/profile")
+//public class ProfileController extends SimpleController {
+//	@Autowired
+//	IUserService userService;
+//
+//	/**
+//	 * 进入用户修改页面,根据用户名查询查询用户信息
+//	 * @param model 
+//	 * @return  用户信息修改页面
+//	 */
+//	@RequestMapping
+//	public String profile(Model model) {
+//		model.addAttribute("user", getLoginUser());
+//		return index;
+//	}
+//
+//	/**
+//	 * 修改用户信息
+//	 * @param model
+//	 * @param user 页面输入的用户信息
+//	 * @param paramMap 页面参数
+//	 * @return 修改用户信息后,返回修改结果
+//	 */
+//	@RequestMapping("/save")
+//	public @ResponseBody AjaxResult save(Model model, @ModelAttribute("form") User user,
+//			@RequestParam Map<String, Object> paramMap) {
+//
+//		//声明修改用户返回的结果
+//		AjaxResult result = new AjaxResult();
+//		
+//		// 根据用户名获得用户信息
+//		User userInfo = userService.findByUsername(user.getUsername());
+//
+//		//修改用户信息时,用户ID ,状态与原用户保持一致
+//		user.setId(userInfo.getId());
+//		user.setStatus(userInfo.getStatus());
+//		
+//		//用户信息修改的时间
+//		user.setModifyDate(new Date());
+//
+//		//用户需要修改密码时
+//		if (paramMap.get("isModifyPwd").equals("true")) {
+//			MD5 md5 = MD5.getInstance();
+//			String inputPwd = md5.getMD5(user.getPassword());
+//			
+//			//原密码输入错误
+//			if (!userInfo.getPassword().equals(inputPwd)) {
+//  				result.setMsg("原始密码输入不正确,请您重新输入");
+//  				result.setStatus("false");
+//				return result;
+//			}
+//			user.setPassword(md5.getMD5((String) paramMap.get("newPassword")));
+//		} else {
+//			//用户不需要改密码时,用户登录密码为原密码
+//			user.setPassword(userInfo.getPassword());
+//		}
+//		
+//		//修改用户信息
+//		boolean sign = userService.edit(user);
+//		
+//		//成功跳转到首页
+//		if (sign) {
+//			result.setStatus("ok");
+//			return result;
+//		}
+//		//失败返回当前页面,并提示
+//		result.setStatus("false");
+//		result.setMsg( "修改信息失败");
+//		return result;
+//	}
+//
+//}