update app page size

This commit is contained in:
Shaun Chyxion 2018-03-25 21:44:54 +08:00
parent 55ae266381
commit ec2af6592e
8 changed files with 15 additions and 13 deletions

View File

@ -63,6 +63,7 @@ public class AuthCallbackSupport implements AuthCallback {
alForm.setUserId(userId);
alForm.setIp(ip);
alForm.setUserAgent(userAgent);
alForm.unlock();
alForm.setCreatedBy(userId);
authLogService.create(alForm);
// HttpServletResponse response = (HttpServletResponse) ws.getServletResponse();

View File

@ -50,15 +50,17 @@ public class BaseControllerAdvice {
Object target = binder.getTarget();
String userId = getUserId();
if (target instanceof FC2) {
log.debug("Base Form [{}] For Create Found, Set Created By [{}].", target, userId);
log.debug("Base form [{}] for create found, set created by [{}].", target, userId);
((FC2<String>) target).unlock();
((FC2<String>) target).setCreatedBy(userId);
}
else if (target instanceof FU2) {
log.debug("Base Form [{}] For Update Found, Set Updated By [{}].", target, userId);
log.debug("Base form [{}] for update found, set updated by [{}].", target, userId);
((FU2<String, String>) target).unlock();
((FU2<String, String>) target).setUpdatedBy(userId);
}
else if (target != null) {
log.debug("Set Form [{}] Created/Updated By [{}].", target, userId);
log.debug("Set form [{}] created/updated by [{}].", target, userId);
BeanUtils.copyProperty(target, "createdBy", userId);
BeanUtils.copyProperty(target, "updatedBy", userId);
}

View File

@ -12,7 +12,7 @@
<mapper namespace="com.pudonghot.ambition.crm.mapper.ApplicationImageMapper">
<select id="nextSort" resultType="int">
select if (application_id, max(sort) + 1, 0)
select if (application_id, max(sort) + 1, 1)
from <include refid="table" />
where application_id = #{applicationId}
</select>

View File

@ -182,7 +182,7 @@
<!-- application ids -->
(select group_concat(p.id order by p.name separator ',')
from crm_customer_application a
join crm_customer_property p
join crm_application p
on a.application_id = p.id
where a.customer_id = customer.id
group by a.customer_id) applications,
@ -190,7 +190,7 @@
<!-- applications names -->
(select group_concat(p.name order by p.name separator ',')
from crm_customer_application a
join crm_customer_property p
join crm_application p
on a.application_id = p.id
where a.customer_id = customer.id
group by a.customer_id) application_names

View File

@ -14,9 +14,10 @@
<bean id="dataSource" class="com.alibaba.druid.pool.DruidDataSource"
init-method="init"
destroy-method="close"
p:url="jdbc:mysql://${datasource.host}:${datasource.port}/${datasource.database-name}?useUnicode=true&amp;characterEncoding=utf-8&amp;zeroDateTimeBehavior=convertToNull"
p:url="jdbc:mysql://${datasource.host}:${datasource.port}/${datasource.database-name}?useUnicode=true&amp;zeroDateTimeBehavior=convertToNull&amp;useLegacyDatetimeCode=false&amp;serverTimezone=Asia/Shanghai"
p:username="${datasource.username}"
p:password="${datasource.password}"
p:connectionInitSqls="set names utf8mb4;"
/>
<!-- Transaction -->

View File

@ -327,10 +327,9 @@
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<!--<version>5.0.8</version>-->
<!--<version>6.0.6</version>-->
<version>6.0.6</version>
<!--<version>5.1.41</version>-->
<version>5.1.6</version>
<!--<version>5.1.6</version>-->
</dependency>
<!-- test -->
<dependency>

View File

@ -3,7 +3,7 @@ import Ember from 'ember';
export default Ember.Mixin.create({
store: Ember.inject.service(),
message: Ember.inject.service(),
pageSize: 10,
pageSize: 32,
constraints: {},
createConstraints: null,
updateConstraints: null,
@ -83,5 +83,3 @@ export default Ember.Mixin.create({
return this.get('store');
}
});

View File

@ -2,6 +2,7 @@ import Ember from 'ember';
import BaseService from '../service';
export default BaseService.extend({
pageSize: 128,
modelName: 'Application',
constraints: {
name: {