Просмотр исходного кода

Merge branch 'vip_price_827' into online1

yonge 3 лет назад
Родитель
Сommit
d90b071233
18 измененных файлов с 345 добавлено и 309 удалено
  1. 0 4
      cms/src/main/resources/config/mybatis/SysNewsInformationMapper.xml
  2. 32 0
      mec-auth/mec-auth-api/src/main/java/com/ym/mec/auth/api/entity/SysUserDevice.java
  3. 2 7
      mec-auth/mec-auth-server/src/main/java/com/ym/mec/auth/core/filter/UsernameAuthenticationFilter.java
  4. 9 27
      mec-auth/mec-auth-server/src/main/java/com/ym/mec/auth/core/provider/PhoneAuthenticationProvider.java
  5. 5 3
      mec-auth/mec-auth-server/src/main/java/com/ym/mec/auth/dal/dao/SysUserDeviceDao.java
  6. 11 3
      mec-auth/mec-auth-server/src/main/java/com/ym/mec/auth/service/SysUserDeviceService.java
  7. 68 18
      mec-auth/mec-auth-server/src/main/java/com/ym/mec/auth/service/impl/SysUserDeviceServiceImpl.java
  8. 1 1
      mec-auth/mec-auth-server/src/main/java/com/ym/mec/auth/web/controller/UserDeviceController.java
  9. 48 34
      mec-auth/mec-auth-server/src/main/resources/config/mybatis/SysUserDeviceMapper.xml
  10. 77 0
      mec-biz/src/main/java/com/ym/mec/biz/dal/entity/MemberFeeSetting.java
  11. 0 15
      mec-biz/src/main/java/com/ym/mec/biz/service/StudentRegistrationService.java
  12. 4 4
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/MemberRankSettingServiceImpl.java
  13. 7 7
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/MusicGroupPaymentCalenderServiceImpl.java
  14. 1 1
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/MusicGroupSchoolTermCourseDetailServiceImpl.java
  15. 0 119
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/StudentRegistrationServiceImpl.java
  16. 0 2
      mec-biz/src/main/resources/config/mybatis/EmployeeMapper.xml
  17. 65 56
      mec-biz/src/main/resources/config/mybatis/MemberFeeSettingMapper.xml
  18. 15 8
      mec-biz/src/main/resources/config/mybatis/MemberRankOrganizationFeeMapperMapper.xml

+ 0 - 4
cms/src/main/resources/config/mybatis/SysNewsInformationMapper.xml

@@ -125,12 +125,8 @@
 			<if test="type != null">
 				type_ = #{type},
 			</if>
-			<if test="onlineTime != null">
 				online_time_ = #{onlineTime},
-			</if>
-			<if test="offlineTime != null">
 				offline_time_ = #{offlineTime},
-			</if>
 			<if test="subType != null">
 				sub_type_ = #{subType},
 			</if>

+ 32 - 0
mec-auth/mec-auth-api/src/main/java/com/ym/mec/auth/api/entity/SysUserDevice.java

@@ -1,5 +1,7 @@
 package com.ym.mec.auth.api.entity;
 
+import java.util.Date;
+
 import org.apache.commons.lang3.builder.ToStringBuilder;
 
 /**
@@ -19,9 +21,15 @@ public class SysUserDevice {
 	/** 绑定时间 */
 	private java.util.Date bindTime;
 	
+	private Date updateTime;
+	
 	/** 设备类型 */
 	private String deviceType;
 	
+	private String clientId;
+	
+	private Integer delFlag;
+	
 	private SysUser user;
 	
 	public void setId(Integer id){
@@ -56,6 +64,14 @@ public class SysUserDevice {
 		return this.bindTime;
 	}
 			
+	public Date getUpdateTime() {
+		return updateTime;
+	}
+
+	public void setUpdateTime(Date updateTime) {
+		this.updateTime = updateTime;
+	}
+
 	public void setDeviceType(String deviceType){
 		this.deviceType = deviceType;
 	}
@@ -64,6 +80,22 @@ public class SysUserDevice {
 		return this.deviceType;
 	}
 			
+	public String getClientId() {
+		return clientId;
+	}
+
+	public void setClientId(String clientId) {
+		this.clientId = clientId;
+	}
+
+	public Integer getDelFlag() {
+		return delFlag;
+	}
+
+	public void setDelFlag(Integer delFlag) {
+		this.delFlag = delFlag;
+	}
+
 	public SysUser getUser() {
 		return user;
 	}

+ 2 - 7
mec-auth/mec-auth-server/src/main/java/com/ym/mec/auth/core/filter/UsernameAuthenticationFilter.java

@@ -9,7 +9,6 @@ import javax.servlet.http.HttpServletResponse;
 
 import org.apache.commons.lang3.StringUtils;
 import org.springframework.security.authentication.AuthenticationServiceException;
-import org.springframework.security.authentication.BadCredentialsException;
 import org.springframework.security.authentication.LockedException;
 import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;
 import org.springframework.security.core.Authentication;
@@ -94,13 +93,9 @@ public class UsernameAuthenticationFilter extends AbstractAuthenticationProcessi
 		Authentication authentication = this.getAuthenticationManager().authenticate(authRequest);
 		
 		String deviceNum = request.getParameter(deviceNumParameter);
-		if (StringUtils.isNotBlank(deviceNum) && !StringUtils.equals("STUDENT", clientId)) {
+		if (StringUtils.isNotBlank(deviceNum)) {
 			// 检查设备
-			try {
-				sysUserDeviceService.bindDevice(userInfo.getSysUser().getId(), deviceNum);
-			} catch (Exception e) {
-				throw new BadCredentialsException("当前设备已绑定账号,请更换设备");
-			}
+			sysUserDeviceService.bindDevice(clientId, userInfo.getSysUser().getId(), deviceNum);
 		}
 
 		return authentication;

+ 9 - 27
mec-auth/mec-auth-server/src/main/java/com/ym/mec/auth/core/provider/PhoneAuthenticationProvider.java

@@ -1,7 +1,6 @@
 package com.ym.mec.auth.core.provider;
 
 import java.util.Date;
-import java.util.List;
 
 import org.apache.commons.lang3.StringUtils;
 import org.springframework.security.authentication.BadCredentialsException;
@@ -17,11 +16,9 @@ import org.springframework.transaction.annotation.Transactional;
 import com.ym.mec.auth.api.dto.SysUserInfo;
 import com.ym.mec.auth.api.entity.LoginEntity;
 import com.ym.mec.auth.api.entity.SysUser;
-import com.ym.mec.auth.api.entity.SysUserDevice;
 import com.ym.mec.auth.config.token.PhoneAuthenticationToken;
 import com.ym.mec.auth.service.SysUserDeviceService;
 import com.ym.mec.auth.service.SysUserService;
-import com.ym.mec.common.exception.BizException;
 import com.ym.mec.common.service.IdGeneratorService;
 
 public class PhoneAuthenticationProvider extends AbstractAuthenticationProvider {
@@ -73,37 +70,22 @@ public class PhoneAuthenticationProvider extends AbstractAuthenticationProvider
 			if (isRegister == false || StringUtils.equals("SYSTEM", clientId)) {
 				throw new LockedException("用户不存在");
 			}
-			if (StringUtils.isNotBlank(deviceNum) && !StringUtils.equals("STUDENT", clientId)) {
-				// 检查设备
-				List<SysUserDevice> sysUserDeviceList = sysUserDeviceService.queryByDeviceNum(deviceNum);
-
-				if (sysUserDeviceList != null && sysUserDeviceList.size() > 0) {
-					throw new BadCredentialsException("当前设备已绑定账号,请更换设备");
-				}
-
-				userInfo = sysUserService.initUser(loginEntity.getPhone(), clientId);
-
-				SysUserDevice sysUserDevice = new SysUserDevice();
-				sysUserDevice.setUserId(userInfo.getSysUser().getId());
-				sysUserDevice.setDeviceNum(deviceNum);
-				sysUserDevice.setBindTime(new Date());
-				sysUserDeviceService.insert(sysUserDevice);
-			} else {
-				userInfo = sysUserService.initUser(loginEntity.getPhone(), clientId);
+			
+			userInfo = sysUserService.initUser(loginEntity.getPhone(), clientId);
+			
+			if (StringUtils.isNotBlank(deviceNum)) {
+				sysUserDeviceService.bindDevice(clientId, userInfo.getSysUser().getId(), deviceNum);
 			}
 		} else {
 			SysUser user = userInfo.getSysUser();
 			if (user == null) {
 				throw new LockedException("用户不存在");
 			}
-			if (StringUtils.isNotBlank(deviceNum) && !StringUtils.equals("STUDENT", clientId)) {
-				// 检查设备
-				try {
-					sysUserDeviceService.bindDevice(user.getId(), deviceNum);
-				} catch (Exception e) {
-					throw new BadCredentialsException("当前设备已绑定账号,请更换设备");
-				}
+			
+			if (StringUtils.isNotBlank(deviceNum)) {
+				sysUserDeviceService.bindDevice(clientId, user.getId(), deviceNum);
 			}
+			
 			if (!userInfo.getSysUser().getUserType().contains(clientId)) {
 				if (isRegister == false || StringUtils.equals("SYSTEM", clientId)) {
 					throw new LockedException("用户不存在");

+ 5 - 3
mec-auth/mec-auth-server/src/main/java/com/ym/mec/auth/dal/dao/SysUserDeviceDao.java

@@ -2,12 +2,14 @@ package com.ym.mec.auth.dal.dao;
 
 import java.util.List;
 
+import org.apache.ibatis.annotations.Param;
+
 import com.ym.mec.auth.api.entity.SysUserDevice;
 import com.ym.mec.common.dal.BaseDAO;
 
 public interface SysUserDeviceDao extends BaseDAO<Integer, SysUserDevice> {
 
-	List<SysUserDevice> queryByUserId(Integer userId);
-	
-	List<SysUserDevice> queryByDeviceNum(String deviceNum);
+	List<SysUserDevice> queryByUserId(@Param("clientId") String clientId, @Param("userId") Integer userId);
+
+	List<SysUserDevice> queryByDeviceNum(@Param("clientId") String clientId, @Param("deviceNum") String deviceNum);
 }

+ 11 - 3
mec-auth/mec-auth-server/src/main/java/com/ym/mec/auth/service/SysUserDeviceService.java

@@ -7,15 +7,23 @@ import com.ym.mec.common.service.BaseService;
 
 public interface SysUserDeviceService extends BaseService<Integer, SysUserDevice> {
 
-	List<SysUserDevice> queryByUserId(Integer userId);
+	List<SysUserDevice> queryByUserId(String clientId, Integer userId);
 
-	List<SysUserDevice> queryByDeviceNum(String deviceNum);
+	List<SysUserDevice> queryByDeviceNum(String clientId, String deviceNum);
 
 	/**
 	 * 绑定设备号
+	 * @param clientId
 	 * @param userId
 	 * @param deviceNum
 	 * @return
 	 */
-	boolean bindDevice(Integer userId, String deviceNum) throws Exception;
+	boolean bindDevice(String clientId, Integer userId, String deviceNum);
+
+	/**
+	 * 逻辑删除
+	 * @param id
+	 * @return
+	 */
+	boolean deleteWithLogic(Integer id);
 }

+ 68 - 18
mec-auth/mec-auth-server/src/main/java/com/ym/mec/auth/service/impl/SysUserDeviceServiceImpl.java

@@ -1,9 +1,13 @@
 package com.ym.mec.auth.service.impl;
 
+import java.util.ArrayList;
 import java.util.Date;
 import java.util.List;
+import java.util.stream.Collectors;
 
+import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.authentication.BadCredentialsException;
 import org.springframework.stereotype.Service;
 
 import com.ym.mec.auth.api.entity.SysUserDevice;
@@ -24,33 +28,79 @@ public class SysUserDeviceServiceImpl extends BaseServiceImpl<Integer, SysUserDe
 	}
 
 	@Override
-	public List<SysUserDevice> queryByUserId(Integer userId) {
-		return sysUserDeviceDao.queryByUserId(userId);
+	public List<SysUserDevice> queryByUserId(String clientId, Integer userId) {
+		return sysUserDeviceDao.queryByUserId(clientId, userId);
 	}
 
 	@Override
-	public List<SysUserDevice> queryByDeviceNum(String deviceNum) {
-		return sysUserDeviceDao.queryByDeviceNum(deviceNum);
+	public List<SysUserDevice> queryByDeviceNum(String clientId, String deviceNum) {
+		return sysUserDeviceDao.queryByDeviceNum(clientId, deviceNum);
 	}
 
 	@Override
-	public boolean bindDevice(Integer userId, String deviceNum) throws Exception {
-		//查询设备号是否已存在
-		List<SysUserDevice> sysUserDeviceList = sysUserDeviceDao.queryByDeviceNum(deviceNum);
-		
-		if (sysUserDeviceList != null && sysUserDeviceList.size() > 0) {
-			if (sysUserDeviceList.stream().filter(sud -> sud.getUserId().equals(userId)).count() > 0) {
-				return true;
-			} else {
-				throw new Exception("当前设备已绑定账号,请更换设备");
+	public boolean bindDevice(String clientId, Integer userId, String deviceNum) {
+
+		if (StringUtils.equals(clientId, "STUDENT")) {
+			// 检查学生是否绑定了多个设备号
+			List<SysUserDevice> studentDeviceList = queryByUserId(clientId, userId);
+
+			if (studentDeviceList == null) {
+				studentDeviceList = new ArrayList<SysUserDevice>();
 			}
+
+			List<String> deviceList = studentDeviceList.stream().map(t -> t.getDeviceNum()).collect(Collectors.toList());
+
+			if (!deviceList.contains(deviceNum)) {
+				if (deviceList.size() >= 5) {
+					throw new BadCredentialsException("当前账号绑定设备过多,请联系主教老师");
+				}
+
+				SysUserDevice sysUserDevice = new SysUserDevice();
+				sysUserDevice.setUserId(userId);
+				sysUserDevice.setDeviceNum(deviceNum);
+				sysUserDevice.setBindTime(new Date());
+				sysUserDevice.setClientId(clientId);
+				sysUserDeviceDao.insert(sysUserDevice);
+			}
+		} else {
+			// 查询设备号是否已存在
+			List<SysUserDevice> sysUserDeviceList = sysUserDeviceDao.queryByDeviceNum(null, deviceNum);
+
+			if (sysUserDeviceList == null) {
+				sysUserDeviceList = new ArrayList<SysUserDevice>();
+			}
+
+			sysUserDeviceList = sysUserDeviceList.stream().filter(sud -> !StringUtils.equals(sud.getClientId(), "STUDENT")).collect(Collectors.toList());
+
+			if (sysUserDeviceList != null && sysUserDeviceList.size() > 0) {
+				if (sysUserDeviceList.stream().filter(sud -> sud.getUserId().equals(userId)).count() > 0) {
+
+					return true;
+				}
+
+				throw new BadCredentialsException("当前设备已绑定账号,请更换设备");
+			}
+
+			SysUserDevice sysUserDevice = new SysUserDevice();
+			sysUserDevice.setUserId(userId);
+			sysUserDevice.setDeviceNum(deviceNum);
+			sysUserDevice.setBindTime(new Date());
+			sysUserDevice.setClientId(clientId);
+			sysUserDeviceDao.insert(sysUserDevice);
 		}
+
+		return true;
+	}
+
+	@Override
+	public boolean deleteWithLogic(Integer id) {
 		
-		SysUserDevice sysUserDevice = new SysUserDevice();
-		sysUserDevice.setUserId(userId);
-		sysUserDevice.setDeviceNum(deviceNum);
-		sysUserDevice.setBindTime(new Date());
-		sysUserDeviceDao.insert(sysUserDevice);
+		SysUserDevice sysUserDevice = sysUserDeviceDao.get(id);
+		if(sysUserDevice != null){
+			sysUserDevice.setDelFlag(1);
+			
+			sysUserDeviceDao.update(sysUserDevice);
+		}
 		
 		return true;
 	}

+ 1 - 1
mec-auth/mec-auth-server/src/main/java/com/ym/mec/auth/web/controller/UserDeviceController.java

@@ -36,7 +36,7 @@ public class UserDeviceController extends BaseController {
 	@PostMapping(value = "/unbind")
 	@AuditLogAnnotation(operateName = "设备号解除绑定",interfaceURL = "userDevice/unbind")
 	public Object unbind(Integer id) {
-		return succeed(sysUserDeviceService.delete(id));
+		return succeed(sysUserDeviceService.deleteWithLogic(id));
 	}
 
 }

+ 48 - 34
mec-auth/mec-auth-server/src/main/resources/config/mybatis/SysUserDeviceMapper.xml

@@ -9,6 +9,9 @@
 		<result column="device_num_" property="deviceNum" />
 		<result column="bind_time_" property="bindTime" />
 		<result column="device_type_" property="deviceType" />
+		<result column="client_id_" property="clientId" />
+		<result column="del_flag_" property="delFlag" />
+		<result column="update_time_" property="updateTime" />
 		<result column="phone_" property="user.phone" />
 		<result column="real_name_" property="user.realName" />
 	</resultMap>
@@ -31,8 +34,8 @@
 		<!-- <selectKey resultClass="int" keyProperty="id" > SELECT SEQ_WSDEFINITION_ID.nextval 
 			AS ID FROM DUAL </selectKey> -->
 		INSERT INTO sys_user_device
-		(id_,user_id_,device_num_,bind_time_,device_type_)
-		VALUES(#{id},#{userId},#{deviceNum},#{bindTime},#{deviceType})
+		(id_,user_id_,device_num_,bind_time_,device_type_,client_id_,del_flag_)
+		VALUES(#{id},#{userId},#{deviceNum},#{bindTime},#{deviceType},#{clientId},0)
 	</insert>
 
 	<!-- 根据主键查询一条记录 -->
@@ -54,6 +57,13 @@
 			<if test="bindTime != null">
 				bind_time_ = #{bindTime},
 			</if>
+			<if test="clientId != null">
+				client_id_ = #{clientId},
+			</if>
+			<if test="delFlag != null">
+				del_flag_ = #{delFlag},
+			</if>
+			update_time_ = now()
 		</set>
 		WHERE id_ = #{id}
 	</update>
@@ -66,20 +76,19 @@
 	<!-- 分页查询 -->
 	<select id="queryPage" resultMap="SysUserDevice" parameterType="map">
 		SELECT ud.*,u.phone_,u.real_name_ FROM sys_user_device ud left join sys_user u on ud.user_id_ = u.id_ 
-		<where>
-			<if test="search != null and search != ''">
-				and (u.real_name_ LIKE CONCAT('%',#{search},'%') OR u.phone_ LIKE CONCAT('%',#{search},'%') OR u.id_ like CONCAT('%',#{search},'%'))
-			</if>
-			<if test="deviceNum != null">
-				and device_num_ = #{deviceNum}
-			</if>
-			<if test="bindStartTime != null">
-				and date(bind_time_) &gt;= #{bindStartTime}
-			</if>
-			<if test="bindEndTime != null">
-				and date(bind_time_) &lt;= #{bindEndTime}
-			</if>
-		</where>
+		where ud.del_flag_ = 0
+		<if test="search != null and search != ''">
+			and (u.real_name_ LIKE CONCAT('%',#{search},'%') OR u.phone_ LIKE CONCAT('%',#{search},'%') OR u.id_ like CONCAT('%',#{search},'%'))
+		</if>
+		<if test="deviceNum != null">
+			and device_num_ = #{deviceNum}
+		</if>
+		<if test="bindStartTime != null">
+			and date(bind_time_) &gt;= #{bindStartTime}
+		</if>
+		<if test="bindEndTime != null">
+			and date(bind_time_) &lt;= #{bindEndTime}
+		</if>
 		ORDER BY id_
 		<include refid="global.limit" />
 	</select>
@@ -87,28 +96,33 @@
 	<!-- 查询当前表的总记录数 -->
 	<select id="queryCount" resultType="int">
 		SELECT COUNT(ud.user_id_) FROM sys_user_device ud left join sys_user u on ud.user_id_ = u.id_
-		<where>
-			<if test="search != null and search != ''">
-				and (u.real_name_ LIKE CONCAT('%',#{search},'%') OR u.phone_ LIKE CONCAT('%',#{search},'%') OR u.id_ like CONCAT('%',#{search},'%'))
-			</if>
-			<if test="deviceNum != null">
-				and device_num_ = #{deviceNum}
-			</if>
-			<if test="bindStartTime != null">
-				and date(bind_time_) &gt;= #{bindStartTime}
-			</if>
-			<if test="bindEndTime != null">
-				and date(bind_time_) &lt;= #{bindEndTime}
-			</if>
-		</where>
+		where ud.del_flag_ = 0
+		<if test="search != null and search != ''">
+			and (u.real_name_ LIKE CONCAT('%',#{search},'%') OR u.phone_ LIKE CONCAT('%',#{search},'%') OR u.id_ like CONCAT('%',#{search},'%'))
+		</if>
+		<if test="deviceNum != null">
+			and device_num_ = #{deviceNum}
+		</if>
+		<if test="bindStartTime != null">
+			and date(bind_time_) &gt;= #{bindStartTime}
+		</if>
+		<if test="bindEndTime != null">
+			and date(bind_time_) &lt;= #{bindEndTime}
+		</if>
 	</select>
 	
-	<select id="queryByUserId" resultMap="SysUserDevice">
-		SELECT * FROM sys_user_device WHERE user_id_ = #{userId}
+	<select id="queryByUserId" resultMap="SysUserDevice" parameterType="map">
+		SELECT * FROM sys_user_device WHERE user_id_ = #{userId} and del_flag_ = 0
+		<if test="clientId != null">
+			and client_id_ = #{clientId}
+		</if>
 	</select>
 	
-	<select id="queryByDeviceNum" resultMap="SysUserDevice">
-		SELECT * FROM sys_user_device WHERE device_num_ = #{deviceNum}
+	<select id="queryByDeviceNum" resultMap="SysUserDevice" parameterType="map">
+		SELECT * FROM sys_user_device WHERE device_num_ = #{deviceNum} and del_flag_ = 0
+		<if test="clientId != null">
+			and client_id_ = #{clientId}
+		</if>
 	</select>
 	
 </mapper>

+ 77 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/entity/MemberFeeSetting.java

@@ -14,24 +14,45 @@ public class MemberFeeSetting {
 	private java.math.BigDecimal currentDayFee;
 	
 	/**  */
+	private java.math.BigDecimal groupPurchaseDayFee;
+	
+	/**  */
 	private java.math.BigDecimal originalDayFee;
 	
 	/**  */
 	private java.math.BigDecimal currentMonthFee;
 	
 	/**  */
+	private java.math.BigDecimal groupPurchaseMonthFee;
+	
+	/**  */
 	private java.math.BigDecimal originalMonthFee;
 	
 	/**  */
+	private java.math.BigDecimal currentQuarterlyFee;
+	
+	/**  */
+	private java.math.BigDecimal groupPurchaseQuarterlyFee;
+	
+	/**  */
+	private java.math.BigDecimal originalQuarterlyFee;
+	
+	/**  */
 	private java.math.BigDecimal currentHalfYearFee;
 	
 	/**  */
+	private java.math.BigDecimal groupPurchaseHalfYearFee;
+	
+	/**  */
 	private java.math.BigDecimal originalHalfYearFee;
 	
 	/**  */
 	private java.math.BigDecimal currentYearFee;
 	
 	/**  */
+	private java.math.BigDecimal groupPurchaseYearFee;
+	
+	/**  */
 	private java.math.BigDecimal originalYearFee;
 	
 	public void setId(Integer id){
@@ -50,6 +71,14 @@ public class MemberFeeSetting {
 		return this.currentDayFee;
 	}
 			
+	public void setGroupPurchaseDayFee(java.math.BigDecimal groupPurchaseDayFee){
+		this.groupPurchaseDayFee = groupPurchaseDayFee;
+	}
+	
+	public java.math.BigDecimal getGroupPurchaseDayFee(){
+		return this.groupPurchaseDayFee;
+	}
+			
 	public void setOriginalDayFee(java.math.BigDecimal originalDayFee){
 		this.originalDayFee = originalDayFee;
 	}
@@ -66,6 +95,14 @@ public class MemberFeeSetting {
 		return this.currentMonthFee;
 	}
 			
+	public void setGroupPurchaseMonthFee(java.math.BigDecimal groupPurchaseMonthFee){
+		this.groupPurchaseMonthFee = groupPurchaseMonthFee;
+	}
+	
+	public java.math.BigDecimal getGroupPurchaseMonthFee(){
+		return this.groupPurchaseMonthFee;
+	}
+			
 	public void setOriginalMonthFee(java.math.BigDecimal originalMonthFee){
 		this.originalMonthFee = originalMonthFee;
 	}
@@ -74,6 +111,30 @@ public class MemberFeeSetting {
 		return this.originalMonthFee;
 	}
 			
+	public void setCurrentQuarterlyFee(java.math.BigDecimal currentQuarterlyFee){
+		this.currentQuarterlyFee = currentQuarterlyFee;
+	}
+	
+	public java.math.BigDecimal getCurrentQuarterlyFee(){
+		return this.currentQuarterlyFee;
+	}
+			
+	public void setGroupPurchaseQuarterlyFee(java.math.BigDecimal groupPurchaseQuarterlyFee){
+		this.groupPurchaseQuarterlyFee = groupPurchaseQuarterlyFee;
+	}
+	
+	public java.math.BigDecimal getGroupPurchaseQuarterlyFee(){
+		return this.groupPurchaseQuarterlyFee;
+	}
+			
+	public void setOriginalQuarterlyFee(java.math.BigDecimal originalQuarterlyFee){
+		this.originalQuarterlyFee = originalQuarterlyFee;
+	}
+	
+	public java.math.BigDecimal getOriginalQuarterlyFee(){
+		return this.originalQuarterlyFee;
+	}
+			
 	public void setCurrentHalfYearFee(java.math.BigDecimal currentHalfYearFee){
 		this.currentHalfYearFee = currentHalfYearFee;
 	}
@@ -82,6 +143,14 @@ public class MemberFeeSetting {
 		return this.currentHalfYearFee;
 	}
 			
+	public void setGroupPurchaseHalfYearFee(java.math.BigDecimal groupPurchaseHalfYearFee){
+		this.groupPurchaseHalfYearFee = groupPurchaseHalfYearFee;
+	}
+	
+	public java.math.BigDecimal getGroupPurchaseHalfYearFee(){
+		return this.groupPurchaseHalfYearFee;
+	}
+			
 	public void setOriginalHalfYearFee(java.math.BigDecimal originalHalfYearFee){
 		this.originalHalfYearFee = originalHalfYearFee;
 	}
@@ -98,6 +167,14 @@ public class MemberFeeSetting {
 		return this.currentYearFee;
 	}
 			
+	public void setGroupPurchaseYearFee(java.math.BigDecimal groupPurchaseYearFee){
+		this.groupPurchaseYearFee = groupPurchaseYearFee;
+	}
+	
+	public java.math.BigDecimal getGroupPurchaseYearFee(){
+		return this.groupPurchaseYearFee;
+	}
+			
 	public void setOriginalYearFee(java.math.BigDecimal originalYearFee){
 		this.originalYearFee = originalYearFee;
 	}

+ 0 - 15
mec-biz/src/main/java/com/ym/mec/biz/service/StudentRegistrationService.java

@@ -122,21 +122,6 @@ public interface StudentRegistrationService extends BaseService<Long, StudentReg
                                  List<MusicGroupPaymentCalenderCourseSettings> newCourses, Boolean buyMaintenance, Boolean buyCloudTeacher, Boolean buyCloudTeacherPlus) throws Exception;
 
     /**
-     * 学生注册缴费重新下订单
-     *
-     * @param goodsList
-     * @param userId
-     * @param amount
-     * @param courseFee
-     * @param goodsGroups
-     * @param buyCloudTeacher
-     * @return
-     */
-    StudentPaymentOrder reAddOrder(
-            Integer userId, BigDecimal amount, String orderNo, String paymentChannel, BigDecimal courseFee,
-            List<MusicGroupSubjectGoodsGroup> goodsGroups, String musicGroupId, StudentPaymentOrder oldOrder, BigDecimal remitFee, BigDecimal courseRemitFee, List<MusicGroupPaymentCalenderCourseSettings> newCourses, Boolean buyMaintenance, Boolean buyCloudTeacher) throws Exception;
-
-    /**
      * 查询用户指定乐团的报名信息
      *
      * @param userId       用户编号

+ 4 - 4
mec-biz/src/main/java/com/ym/mec/biz/service/impl/MemberRankSettingServiceImpl.java

@@ -156,22 +156,22 @@ public class MemberRankSettingServiceImpl extends BaseServiceImpl<Integer, Membe
 
 		switch (periodEnum) {
 		case DAY:
-			actualAmount = memberFeeSetting.getOriginalDayFee();
+			actualAmount = memberFeeSetting.getCurrentDayFee();
 			cloudTeacherOrder.setType(1);
 			cloudTeacherOrder.setTime(1);
 			break;
 		case MONTH:
-			actualAmount = memberFeeSetting.getOriginalMonthFee();
+			actualAmount = memberFeeSetting.getCurrentMonthFee();
 			cloudTeacherOrder.setType(2);
 			cloudTeacherOrder.setTime(1);
 			break;
 		case YEAR_HALF:
-			actualAmount = memberFeeSetting.getOriginalHalfYearFee();
+			actualAmount = memberFeeSetting.getCurrentHalfYearFee();
 			cloudTeacherOrder.setType(2);
 			cloudTeacherOrder.setTime(6);
 			break;
 		case YEAR:
-			actualAmount = memberFeeSetting.getOriginalYearFee();
+			actualAmount = memberFeeSetting.getCurrentYearFee();
 			cloudTeacherOrder.setType(3);
 			cloudTeacherOrder.setTime(1);
 			break;

+ 7 - 7
mec-biz/src/main/java/com/ym/mec/biz/service/impl/MusicGroupPaymentCalenderServiceImpl.java

@@ -310,15 +310,15 @@ public class MusicGroupPaymentCalenderServiceImpl extends BaseServiceImpl<Long,
 				}
 				switch (musicGroupPaymentCalenderDto.getMemberValidDate()){
 					case 1 :
-						memberPaymentAmount = memberFee.getCurrentMonthFee().setScale(0, BigDecimal.ROUND_HALF_UP);
-						originalMemberPaymentAmount = memberFee.getCurrentMonthFee().setScale(0, BigDecimal.ROUND_HALF_UP);
+						memberPaymentAmount = memberFee.getGroupPurchaseMonthFee().setScale(0, BigDecimal.ROUND_HALF_UP);
+						originalMemberPaymentAmount = memberFee.getOriginalMonthFee().setScale(0, BigDecimal.ROUND_HALF_UP);
 						break;
 					case 6 :
-						memberPaymentAmount = memberFee.getCurrentHalfYearFee().setScale(0, BigDecimal.ROUND_HALF_UP);
+						memberPaymentAmount = memberFee.getGroupPurchaseHalfYearFee().setScale(0, BigDecimal.ROUND_HALF_UP);
 						originalMemberPaymentAmount = memberFee.getOriginalHalfYearFee().setScale(0, BigDecimal.ROUND_HALF_UP);
 						break;
 					case 12 :
-						memberPaymentAmount = memberFee.getCurrentYearFee().setScale(0, BigDecimal.ROUND_HALF_UP);
+						memberPaymentAmount = memberFee.getGroupPurchaseYearFee().setScale(0, BigDecimal.ROUND_HALF_UP);
 						originalMemberPaymentAmount = memberFee.getOriginalYearFee().setScale(0, BigDecimal.ROUND_HALF_UP);
 						break;
 					default:
@@ -714,15 +714,15 @@ public class MusicGroupPaymentCalenderServiceImpl extends BaseServiceImpl<Long,
 				}
 				switch (musicGroupPaymentCalenderDto.getMemberValidDate()){
 					case 1 :
-						memberPaymentAmount = memberFee.getCurrentMonthFee().setScale(0, BigDecimal.ROUND_HALF_UP);
+						memberPaymentAmount = memberFee.getGroupPurchaseMonthFee().setScale(0, BigDecimal.ROUND_HALF_UP);
 						originalMemberPaymentAmount = memberFee.getOriginalMonthFee().setScale(0, BigDecimal.ROUND_HALF_UP);
 						break;
 					case 6 :
-						memberPaymentAmount = memberFee.getCurrentHalfYearFee().setScale(0, BigDecimal.ROUND_HALF_UP);
+						memberPaymentAmount = memberFee.getGroupPurchaseHalfYearFee().setScale(0, BigDecimal.ROUND_HALF_UP);
 						originalMemberPaymentAmount = memberFee.getOriginalHalfYearFee().setScale(0, BigDecimal.ROUND_HALF_UP);
 						break;
 					case 12 :
-						memberPaymentAmount = memberFee.getCurrentYearFee().setScale(0, BigDecimal.ROUND_HALF_UP);
+						memberPaymentAmount = memberFee.getGroupPurchaseYearFee().setScale(0, BigDecimal.ROUND_HALF_UP);
 						originalMemberPaymentAmount = memberFee.getOriginalYearFee().setScale(0, BigDecimal.ROUND_HALF_UP);
 						break;
 					default:

+ 1 - 1
mec-biz/src/main/java/com/ym/mec/biz/service/impl/MusicGroupSchoolTermCourseDetailServiceImpl.java

@@ -302,7 +302,7 @@ public class MusicGroupSchoolTermCourseDetailServiceImpl extends BaseServiceImpl
 				musicGroupPaymentCalenderDto.setPayUserType(MusicGroupPaymentCalender.PayUserType.STUDENT);
 				musicGroupPaymentCalenderDto.setPaymentType(MusicGroupPaymentCalender.PaymentType.MUSIC_RENEW);
 				musicGroupPaymentCalenderDto.setPaymentPattern(1);
-				musicGroupPaymentCalenderDto.setMemberPaymentAmount(memberFee.getCurrentHalfYearFee().setScale(0, BigDecimal.ROUND_HALF_UP));
+				musicGroupPaymentCalenderDto.setMemberPaymentAmount(memberFee.getGroupPurchaseHalfYearFee().setScale(0, BigDecimal.ROUND_HALF_UP));
 				musicGroupPaymentCalenderDto.setAutoCreate(true);
 				musicGroupPaymentCalenderDto.setIsGiveMusicNetwork(false);
 				List<MusicGroupPaymentCalenderDto.MusicGroupPaymentDateRange> musicGroupPaymentDateRangeList = new ArrayList<>();

+ 0 - 119
mec-biz/src/main/java/com/ym/mec/biz/service/impl/StudentRegistrationServiceImpl.java

@@ -59,13 +59,11 @@ import com.ym.mec.biz.dal.dao.SubjectDao;
 import com.ym.mec.biz.dal.dao.SysConfigDao;
 import com.ym.mec.biz.dal.dao.SysUserCashAccountDao;
 import com.ym.mec.biz.dal.dao.TeacherDao;
-import com.ym.mec.biz.dal.dto.MusicalListDetailDto;
 import com.ym.mec.biz.dal.dto.NoClassMusicStudentDto;
 import com.ym.mec.biz.dal.dto.PageInfoReg;
 import com.ym.mec.biz.dal.dto.RegisterDto;
 import com.ym.mec.biz.dal.dto.StudentAddDto;
 import com.ym.mec.biz.dal.dto.StudentApplyDetailDto;
-import com.ym.mec.biz.dal.dto.StudentFeeDto;
 import com.ym.mec.biz.dal.dto.StudentInfo;
 import com.ym.mec.biz.dal.dto.StudentMusicDetailDto;
 import com.ym.mec.biz.dal.dto.StudentMusicGroupDto;
@@ -688,123 +686,6 @@ public class StudentRegistrationServiceImpl extends BaseServiceImpl<Long, Studen
 
     @Override
     @Transactional(rollbackFor = Exception.class)
-    public StudentPaymentOrder reAddOrder(Integer userId, BigDecimal amount, String orderNo, String paymentChannel, BigDecimal courseFee,
-                                          List<MusicGroupSubjectGoodsGroup> goodsGroups, String musicGroupId, StudentPaymentOrder oldOrder,
-                                          BigDecimal remitFee, BigDecimal courseRemitFee, List<MusicGroupPaymentCalenderCourseSettings> newCourses,
-                                          Boolean buyMaintenance,
-                                          Boolean buyCloudTeacher) {
-        //关闭老订单
-        oldOrder.setStatus(DealStatusEnum.CLOSE);
-        studentPaymentOrderService.update(oldOrder);
-        if (oldOrder.getBalancePaymentAmount() != null && oldOrder.getBalancePaymentAmount().compareTo(BigDecimal.ZERO) > 0) {
-            sysUserCashAccountService.updateBalance(oldOrder.getUserId(), oldOrder.getBalancePaymentAmount(), PlatformCashAccountDetailTypeEnum.REFUNDS, "关闭订单");
-        }
-        Date date = new Date();
-        StudentPaymentOrder studentPaymentOrder = new StudentPaymentOrder();
-        studentPaymentOrder.setUserId(userId);
-        studentPaymentOrder.setGroupType(GroupType.MUSIC);
-        studentPaymentOrder.setOrderNo(orderNo);
-        studentPaymentOrder.setType(OrderTypeEnum.APPLY);
-        studentPaymentOrder.setExpectAmount(amount);
-        studentPaymentOrder.setActualAmount(amount);
-        studentPaymentOrder.setStatus(DealStatusEnum.ING);
-        studentPaymentOrder.setPaymentChannel(paymentChannel);
-        studentPaymentOrder.setMusicGroupId(musicGroupId);
-        studentPaymentOrderService.insert(studentPaymentOrder);
-
-        List<StudentPaymentOrderDetail> studentPaymentOrderDetailList = new ArrayList<>();
-        StudentPaymentOrderDetail studentPaymentOrderDetail = new StudentPaymentOrderDetail();
-        studentPaymentOrderDetail.setType(OrderDetailTypeEnum.COURSE);
-        studentPaymentOrderDetail.setPrice(BigDecimal.ZERO);
-        studentPaymentOrderDetail.setRemitFee(BigDecimal.ZERO);
-        studentPaymentOrderDetail.setCreateTime(date);
-        studentPaymentOrderDetail.setUpdateTime(date);
-        studentPaymentOrderDetail.setPaymentOrderId(studentPaymentOrder.getId());
-        studentPaymentOrderDetailList.add(studentPaymentOrderDetail);
-        //乐器及打包辅件
-        String maintenanceGoodsId = "";
-        if (goodsGroups != null && goodsGroups.size() > 0) {
-            for (MusicGroupSubjectGoodsGroup goodsGroup : goodsGroups) {
-                StudentPaymentOrderDetail studentPaymentOrderDetail4goodsGroup = new StudentPaymentOrderDetail();
-                studentPaymentOrderDetail4goodsGroup.setRemitFee(BigDecimal.ZERO);
-                OrderDetailTypeEnum type = null;
-                if (goodsGroup.getType().equals(GoodsType.INSTRUMENT)) {
-                    type = OrderDetailTypeEnum.MUSICAL;
-                    goodsGroup.setPrice(goodsGroup.getPrice().subtract(remitFee));
-                    studentPaymentOrderDetail4goodsGroup.setRemitFee(remitFee);
-                } else if (goodsGroup.getType().equals(GoodsType.ACCESSORIES)) {
-                    type = OrderDetailTypeEnum.ACCESSORIES;
-                } else if (goodsGroup.getType().equals(GoodsType.OTHER)) {
-                    type = OrderDetailTypeEnum.TEACHING;
-                }
-                studentPaymentOrderDetail4goodsGroup.setType(type);
-                studentPaymentOrderDetail4goodsGroup.setPrice(goodsGroup.getPrice());
-                studentPaymentOrderDetail4goodsGroup.setGoodsIdList(goodsGroup.getGoodsIdList());
-                studentPaymentOrderDetail4goodsGroup.setCreateTime(date);
-                studentPaymentOrderDetail4goodsGroup.setUpdateTime(date);
-                studentPaymentOrderDetail4goodsGroup.setPaymentOrderId(studentPaymentOrder.getId());
-                studentPaymentOrderDetail4goodsGroup.setKitGroupPurchaseType(goodsGroup.getKitGroupPurchaseType());
-                studentPaymentOrderDetailList.add(studentPaymentOrderDetail4goodsGroup);
-                if (OrderDetailTypeEnum.MUSICAL.equals(type)) {
-                    maintenanceGoodsId = goodsGroup.getGoodsIdList();
-                }
-            }
-        }
-
-        //新的课程形态
-        if (newCourses != null && newCourses.size() > 0) {
-            for (MusicGroupPaymentCalenderCourseSettings newCourse : newCourses) {
-                StudentPaymentOrderDetail studentPaymentOrderDetailCourse = new StudentPaymentOrderDetail();
-                studentPaymentOrderDetailCourse.setType(OrderDetailTypeEnum.valueOf(newCourse.getCourseType().getCode()));
-                if (courseRemitFee.compareTo(BigDecimal.ZERO) > 0 && !newCourse.getIsStudentOptional()) {
-                    studentPaymentOrderDetailCourse.setPrice(BigDecimal.ZERO);
-                    studentPaymentOrderDetailCourse.setRemitFee(newCourse.getCourseCurrentPrice());
-                } else {
-                    studentPaymentOrderDetailCourse.setPrice(newCourse.getCourseCurrentPrice());
-                    studentPaymentOrderDetailCourse.setRemitFee(BigDecimal.ZERO);
-                }
-                studentPaymentOrderDetailCourse.setCreateTime(date);
-                studentPaymentOrderDetailCourse.setUpdateTime(date);
-                studentPaymentOrderDetailCourse.setPaymentOrderId(studentPaymentOrder.getId());
-                studentPaymentOrderDetailList.add(studentPaymentOrderDetailCourse);
-            }
-        }
-        if (buyMaintenance) {
-            if ("".equals(maintenanceGoodsId)) {
-                throw new BizException("有乐器才能购买乐保,请核查");
-            }
-            BigDecimal maintenancePrice = new BigDecimal(sysConfigDao.findConfigValue("maintenance_price"));
-            StudentPaymentOrderDetail maintenanceOrderDetail = new StudentPaymentOrderDetail();
-            maintenanceOrderDetail.setType(OrderDetailTypeEnum.MAINTENANCE);
-            maintenanceOrderDetail.setPrice(maintenancePrice);
-            maintenanceOrderDetail.setRemitFee(BigDecimal.ZERO);
-            maintenanceOrderDetail.setCreateTime(date);
-            maintenanceOrderDetail.setUpdateTime(date);
-            maintenanceOrderDetail.setPaymentOrderId(studentPaymentOrder.getId());
-            maintenanceOrderDetail.setIsRenew(0);
-            studentPaymentOrderDetailList.add(maintenanceOrderDetail);
-        }
-        //云教练
-        if (buyCloudTeacher) {
-            OrganizationCloudTeacherFee cloudTeacher = organizationCloudTeacherFeeDao.getByOrganId(oldOrder.getOrganId());
-            BigDecimal cloudTeacherPrice = cloudTeacher.getPrice();
-            StudentPaymentOrderDetail cloudTeacherOrderDetail = new StudentPaymentOrderDetail();
-            cloudTeacherOrderDetail.setType(OrderDetailTypeEnum.CLOUD_TEACHER);
-            cloudTeacherOrderDetail.setPrice(cloudTeacherPrice);
-            cloudTeacherOrderDetail.setRemitFee(BigDecimal.ZERO);
-            cloudTeacherOrderDetail.setCreateTime(date);
-            cloudTeacherOrderDetail.setUpdateTime(date);
-            cloudTeacherOrderDetail.setPaymentOrderId(studentPaymentOrder.getId());
-            cloudTeacherOrderDetail.setIsRenew(0);
-            studentPaymentOrderDetailList.add(cloudTeacherOrderDetail);
-        }
-        studentPaymentOrderDetailService.batchAdd(studentPaymentOrderDetailList);
-
-        return studentPaymentOrder;
-    }
-
-    @Override
-    @Transactional(rollbackFor = Exception.class)
     public StudentRegistration queryByUserIdAndMusicGroupId(Integer userId, String musicGroupId) {
         StudentRegistration registration = studentRegistrationDao.queryByUserIdAndMusicGroupId(userId, musicGroupId);
         if (registration == null) {

+ 0 - 2
mec-biz/src/main/resources/config/mybatis/EmployeeMapper.xml

@@ -137,9 +137,7 @@
             <if test="demissionDate != null">
                 demission_date_ = #{demissionDate},
             </if>
-            <if test="deptId != null">
                 dept_id_ = #{deptId},
-            </if>
             <if test="deptIds != null">
                 dept_ids_ = #{deptIds},
             </if>

+ 65 - 56
mec-biz/src/main/resources/config/mybatis/MemberFeeSettingMapper.xml

@@ -1,86 +1,95 @@
 <?xml version="1.0" encoding="UTF-8" ?>
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<!--
-这个文件是自动生成的。
-不要修改此文件。所有改动将在下次重新自动生成时丢失。
--->
+<!-- 这个文件是自动生成的。 不要修改此文件。所有改动将在下次重新自动生成时丢失。 -->
 <mapper namespace="com.ym.mec.biz.dal.dao.MemberFeeSettingDao">
-	
-	<resultMap type="com.ym.mec.biz.dal.entity.MemberFeeSetting" id="MemberFeeSetting">
+
+	<resultMap type="com.ym.mec.biz.dal.entity.MemberFeeSetting"
+		id="MemberFeeSetting">
 		<result column="id_" property="id" />
 		<result column="current_day_fee_" property="currentDayFee" />
+		<result column="group_purchase_day_fee_" property="groupPurchaseDayFee" />
 		<result column="original_day_fee_" property="originalDayFee" />
 		<result column="current_month_fee_" property="currentMonthFee" />
+		<result column="group_purchase_month_fee_" property="groupPurchaseMonthFee" />
 		<result column="original_month_fee_" property="originalMonthFee" />
+		<result column="current_quarterly_fee_" property="currentQuarterlyFee" />
+		<result column="group_purchase_quarterly_fee_" property="groupPurchaseQuarterlyFee" />
+		<result column="original_quarterly_fee_" property="originalQuarterlyFee" />
 		<result column="current_half_year_fee_" property="currentHalfYearFee" />
+		<result column="group_purchase_half_year_fee_" property="groupPurchaseHalfYearFee" />
 		<result column="original_half_year_fee_" property="originalHalfYearFee" />
 		<result column="current_year_fee_" property="currentYearFee" />
+		<result column="group_purchase_year_fee_" property="groupPurchaseYearFee" />
 		<result column="original_year_fee_" property="originalYearFee" />
 	</resultMap>
-	
+
 	<!-- 根据主键查询一条记录 -->
-	<select id="get" resultMap="MemberFeeSetting" >
-		SELECT * FROM member_fee_setting WHERE id_ = #{id} 
+	<select id="get" resultMap="MemberFeeSetting">
+		SELECT * FROM
+		member_fee_setting WHERE id_ = #{id}
 	</select>
-	
+
 	<!-- 全查询 -->
 	<select id="findAll" resultMap="MemberFeeSetting">
-		SELECT * FROM member_fee_setting ORDER BY id_
+		SELECT * FROM member_fee_setting
+		ORDER BY id_
 	</select>
-	
+
 	<!-- 向数据库增加一条记录 -->
-	<insert id="insert" parameterType="com.ym.mec.biz.dal.entity.MemberFeeSetting" useGeneratedKeys="true" keyColumn="id" keyProperty="id">
-		INSERT INTO member_fee_setting (current_day_fee_,original_day_fee_,current_month_fee_,original_month_fee_,current_half_year_fee_,original_half_year_fee_,current_year_fee_,original_year_fee_)
-		VALUES(#{currentDayFee},#{originalDayFee},#{currentMonthFee},#{originalMonthFee},#{currentHalfYearFee},#{originalHalfYearFee},#{currentYearFee},#{originalYearFee})
+	<insert id="insert" parameterType="com.ym.mec.biz.dal.entity.MemberFeeSetting"
+		useGeneratedKeys="true" keyColumn="id" keyProperty="id">
+		<!-- <selectKey resultClass="int" keyProperty="id" > SELECT SEQ_WSDEFINITION_ID.nextval 
+			AS ID FROM DUAL </selectKey> -->
+		INSERT INTO member_fee_setting
+		(id_,current_day_fee_,group_purchase_day_fee_,original_day_fee_,current_month_fee_,group_purchase_month_fee_,original_month_fee_,current_quarterly_fee_,group_purchase_quarterly_fee_,original_quarterly_fee_,current_half_year_fee_,group_purchase_half_year_fee_,original_half_year_fee_,current_year_fee_,group_purchase_year_fee_,original_year_fee_)
+		VALUES(#{id},#{currentDayFee},#{groupPurchaseDayFee},#{originalDayFee},#{currentMonthFee},#{groupPurchaseMonthFee},#{originalMonthFee},#{currentQuarterlyFee},#{groupPurchaseQuarterlyFee},#{originalQuarterlyFee},#{currentHalfYearFee},#{groupPurchaseHalfYearFee},#{originalHalfYearFee},#{currentYearFee},#{groupPurchaseYearFee},#{originalYearFee})
 	</insert>
-	
+
 	<!-- 根据主键查询一条记录 -->
 	<update id="update" parameterType="com.ym.mec.biz.dal.entity.MemberFeeSetting">
-		UPDATE member_fee_setting <set>
-		<if test="originalHalfYearFee != null">
-		original_half_year_fee_ = #{originalHalfYearFee},
-		</if>
-		<if test="originalDayFee != null">
-		original_day_fee_ = #{originalDayFee},
-		</if>
-		<if test="currentHalfYearFee != null">
-		current_half_year_fee_ = #{currentHalfYearFee},
-		</if>
-		<if test="currentMonthFee != null">
-		current_month_fee_ = #{currentMonthFee},
-		</if>
-		<if test="currentDayFee != null">
-		current_day_fee_ = #{currentDayFee},
-		</if>
-		<if test="originalMonthFee != null">
-		original_month_fee_ = #{originalMonthFee},
-		</if>
-		<if test="originalYearFee != null">
-		original_year_fee_ = #{originalYearFee},
-		</if>
-		<if test="currentYearFee != null">
-		current_year_fee_ = #{currentYearFee},
-		</if>
-		</set> WHERE id_ = #{id}
+		UPDATE member_fee_setting
+		<set>
+				original_half_year_fee_ = #{originalHalfYearFee},
+				original_quarterly_fee_ = #{originalQuarterlyFee},
+				original_day_fee_ = #{originalDayFee},
+			<if test="id != null">
+				id_ = #{id},
+			</if>
+				current_half_year_fee_ = #{currentHalfYearFee},
+				current_quarterly_fee_ = #{currentQuarterlyFee},
+				current_day_fee_ = #{currentDayFee},
+				group_purchase_quarterly_fee_ = #{groupPurchaseQuarterlyFee},
+				group_purchase_half_year_fee_ = #{groupPurchaseHalfYearFee},
+				current_year_fee_ = #{currentYearFee},
+				group_purchase_day_fee_ = #{groupPurchaseDayFee},
+				group_purchase_month_fee_ = #{groupPurchaseMonthFee},
+				group_purchase_year_fee_ = #{groupPurchaseYearFee},
+				current_month_fee_ = #{currentMonthFee},
+				original_month_fee_ = #{originalMonthFee},
+				original_year_fee_ = #{originalYearFee}
+		</set>
+		WHERE id_ = #{id}
 	</update>
-	
-	<!-- 根据主键删除一条记录 -->
-	<delete id="delete" >
-		DELETE FROM member_fee_setting WHERE id_ = #{id} 
-	</delete>
-	
+
 	<!-- 分页查询 -->
-	<select id="queryPage" resultMap="MemberFeeSetting" parameterType="map">
-		SELECT * FROM member_fee_setting ORDER BY id_ <include refid="global.limit"/>
+	<select id="queryPage" resultMap="MemberFeeSetting"
+		parameterType="map">
+		SELECT * FROM member_fee_setting ORDER BY id_
+		<include refid="global.limit" />
 	</select>
-	
+
 	<!-- 查询当前表的总记录数 -->
 	<select id="queryCount" resultType="int">
-		SELECT COUNT(*) FROM member_fee_setting
+		SELECT COUNT(*) FROM
+		member_fee_setting
 	</select>
-    <select id="findByRankIdAndOrganId" resultMap="MemberFeeSetting">
-		SELECT mfs.* FROM member_rank_organization_fee_mapper mro
-		LEFT JOIN member_fee_setting mfs ON mfs.id_ = mro.member_fee_setting_id_
-		WHERE mro.member_rank_setting_id_ = #{rankId} AND mro.organ_id_ = #{organId}
+	
+	<select id="findByRankIdAndOrganId" resultMap="MemberFeeSetting">
+		SELECT mfs.* FROM
+		member_rank_organization_fee_mapper mro
+		LEFT JOIN member_fee_setting
+		mfs ON mfs.id_ = mro.member_fee_setting_id_
+		WHERE
+		mro.member_rank_setting_id_ = #{rankId} AND mro.organ_id_ = #{organId}
 	</select>
 </mapper>

+ 15 - 8
mec-biz/src/main/resources/config/mybatis/MemberRankOrganizationFeeMapperMapper.xml

@@ -19,14 +19,21 @@
 		<result column="organ_name_" property="organName" />
 		<association property="memberFeeSetting" javaType="com.ym.mec.biz.dal.entity.MemberFeeSetting">
 			<result property="id" column="member_fee_setting_id_"/>
-			<result property="currentDayFee" column="current_day_fee_"/>
-			<result property="originalDayFee" column="original_day_fee_"/>
-			<result property="currentMonthFee" column="current_month_fee_"/>
-			<result property="originalMonthFee" column="original_month_fee_"/>
-			<result property="currentHalfYearFee" column="current_half_year_fee_"/>
-			<result property="originalHalfYearFee" column="original_half_year_fee_"/>
-			<result property="currentYearFee" column="current_year_fee_"/>
-			<result property="originalYearFee" column="original_year_fee_"/>
+			<result column="current_day_fee_" property="currentDayFee" />
+			<result column="group_purchase_day_fee_" property="groupPurchaseDayFee" />
+			<result column="original_day_fee_" property="originalDayFee" />
+			<result column="current_month_fee_" property="currentMonthFee" />
+			<result column="group_purchase_month_fee_" property="groupPurchaseMonthFee" />
+			<result column="original_month_fee_" property="originalMonthFee" />
+			<result column="current_quarterly_fee_" property="currentQuarterlyFee" />
+			<result column="group_purchase_quarterly_fee_" property="groupPurchaseQuarterlyFee" />
+			<result column="original_quarterly_fee_" property="originalQuarterlyFee" />
+			<result column="current_half_year_fee_" property="currentHalfYearFee" />
+			<result column="group_purchase_half_year_fee_" property="groupPurchaseHalfYearFee" />
+			<result column="original_half_year_fee_" property="originalHalfYearFee" />
+			<result column="current_year_fee_" property="currentYearFee" />
+			<result column="group_purchase_year_fee_" property="groupPurchaseYearFee" />
+			<result column="original_year_fee_" property="originalYearFee" />
 		</association>
 	</resultMap>